ip2proxy-3.2.0: IP2Proxy Haskell package for proxy detection.
Copyright(c) IP2Location 2021
LicenseMIT
Maintainersales@ip2location.com
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

IP2Proxy

Description

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

Documentation

data Meta Source #

Contains the BIN database file metadata.

Instances

Instances details
Show Meta Source # 
Instance details

Defined in IP2Proxy

Methods

showsPrec :: Int -> Meta -> ShowS #

show :: Meta -> String #

showList :: [Meta] -> ShowS #

data IP2ProxyRecord Source #

Contains proxy results.

Constructors

IP2ProxyRecord 

Fields

Instances

Instances details
Show IP2ProxyRecord Source # 
Instance details

Defined in IP2Proxy

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).

open :: String -> IO Meta Source #

The open function returns the Meta record containing metadata from the BIN database file. It takes one argument, of type String, which is the path to the BIN database file.

getAll :: String -> Meta -> String -> IO IP2ProxyRecord Source #

The getAll function returns an IP2ProxyRecord containing proxy data 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).

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).

getRegion :: String -> Meta -> String -> IO String Source #

The getRegion function returns the region 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).

getCity :: String -> Meta -> String -> IO String Source #

The getCity function returns the city 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).

getISP :: String -> Meta -> String -> IO String Source #

The getISP function returns the ISP 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).

getDomain :: String -> Meta -> String -> IO String Source #

The getDomain function returns the domain 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).

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).

getASN :: String -> Meta -> String -> IO String Source #

The getASN function returns the autonomous system number 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).

getAS :: String -> Meta -> String -> IO String Source #

The getAS function returns the autonomous system 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).

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).

getThreat :: String -> Meta -> String -> IO String Source #

The getThreat function returns the threat type 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).

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).

isProxy :: String -> Meta -> String -> IO String Source #

The isProxy function returns 0 if IP is not a proxy, 1 if is a proxy and not data center IP, 2 if is a proxy and is a data center IP, -1 if error. It takes 3 arguments; the BIN database file path (String), the metadata from open function (Meta record) & either IPv4 or IPv6 address (String).