Copyright | (c) IP2Location 2021 |
---|---|
License | MIT |
Maintainer | sales@ip2location.com |
Stability | experimental |
Safe Haskell | None |
Language | Haskell2010 |
This Haskell package allows users to query an IP address to determine if it was being used as open proxy, web proxy, VPN anonymizer and TOR exits.
IP2Proxy LITE BIN databases are available for free at http://lite.ip2location.com/
Synopsis
- data Meta
- data IP2ProxyRecord = IP2ProxyRecord {}
- getModuleVersion :: String
- getPackageVersion :: Meta -> String
- getDatabaseVersion :: Meta -> String
- open :: String -> IO Meta
- getAll :: String -> Meta -> String -> IO IP2ProxyRecord
- getCountryShort :: String -> Meta -> String -> IO String
- getCountryLong :: String -> Meta -> String -> IO String
- getRegion :: String -> Meta -> String -> IO String
- getCity :: String -> Meta -> String -> IO String
- getISP :: String -> Meta -> String -> IO String
- getProxyType :: String -> Meta -> String -> IO String
- getDomain :: String -> Meta -> String -> IO String
- getUsageType :: String -> Meta -> String -> IO String
- getASN :: String -> Meta -> String -> IO String
- getAS :: String -> Meta -> String -> IO String
- getLastSeen :: String -> Meta -> String -> IO String
- getThreat :: String -> Meta -> String -> IO String
- getProvider :: String -> Meta -> String -> IO String
- isProxy :: String -> Meta -> String -> IO String
Documentation
Contains the BIN database file metadata.
data IP2ProxyRecord Source #
Contains proxy results.
IP2ProxyRecord | |
|
Instances
Show IP2ProxyRecord Source # | |
Defined in IP2Proxy showsPrec :: Int -> IP2ProxyRecord -> ShowS # show :: IP2ProxyRecord -> String # showList :: [IP2ProxyRecord] -> ShowS # |
getModuleVersion :: String Source #
The getModuleVersion
function returns a string containing the module version.
getPackageVersion :: Meta -> String Source #
The getPackageVersion
function returns a string containing the package version.
It takes 1 argument; the metadata from open
function (Meta record).
getDatabaseVersion :: Meta -> String Source #
The getDatabaseVersion
function returns a string containing the database version.
It takes 1 argument; the metadata from open
function (Meta record).
getCountryShort :: String -> Meta -> String -> IO String Source #
The getCountryShort
function returns the country code for an IP address.
It takes 3 arguments; the BIN database file path (String), the metadata from open
function (Meta record) & either IPv4 or IPv6 address (String).
getCountryLong :: String -> Meta -> String -> IO String Source #
The getCountryLong
function returns the country name for an IP address.
It takes 3 arguments; the BIN database file path (String), the metadata from open
function (Meta record) & either IPv4 or IPv6 address (String).
getProxyType :: String -> Meta -> String -> IO String Source #
The getProxyType
function returns the proxy type for an IP address.
It takes 3 arguments; the BIN database file path (String), the metadata from open
function (Meta record) & either IPv4 or IPv6 address (String).
getUsageType :: String -> Meta -> String -> IO String Source #
The getUsageType
function returns the usage type for an IP address.
It takes 3 arguments; the BIN database file path (String), the metadata from open
function (Meta record) & either IPv4 or IPv6 address (String).
getLastSeen :: String -> Meta -> String -> IO String Source #
The getLastSeen
function returns the number of days last seen for an IP address.
It takes 3 arguments; the BIN database file path (String), the metadata from open
function (Meta record) & either IPv4 or IPv6 address (String).
getProvider :: String -> Meta -> String -> IO String Source #
The getProvider
function returns the provider of the proxy.
It takes 3 arguments; the BIN database file path (String), the metadata from open
function (Meta record) & either IPv4 or IPv6 address (String).