Documentation ¶
Overview ¶
Package ip2proxy allows user to query an IP address if it was being used as VPN anonymizer, open proxies, web proxies, Tor exits, data center, web hosting (DCH) range, search engine robots (SES) and residential (RES) by using the IP2Proxy database.
Index ¶
- func Close() int8deprecated
- func DatabaseVersion() stringdeprecated
- func GetAll(ipAddress string) map[string]stringdeprecated
- func GetAs(ipAddress string) stringdeprecated
- func GetAsn(ipAddress string) stringdeprecated
- func GetCity(ipAddress string) stringdeprecated
- func GetCountryLong(ipAddress string) stringdeprecated
- func GetCountryShort(ipAddress string) stringdeprecated
- func GetDomain(ipAddress string) stringdeprecated
- func GetIsp(ipAddress string) stringdeprecated
- func GetLastSeen(ipAddress string) stringdeprecated
- func GetProxyType(ipAddress string) stringdeprecated
- func GetRegion(ipAddress string) stringdeprecated
- func GetUsageType(ipAddress string) stringdeprecated
- func IsProxy(ipAddress string) int8deprecated
- func ModuleVersion() string
- func Open(dbPath string) int8deprecated
- func PackageVersion() stringdeprecated
- type DB
- func (d *DB) Close() error
- func (d *DB) DatabaseVersion() string
- func (d *DB) GetAll(ipAddress string) (map[string]string, error)
- func (d *DB) GetAs(ipAddress string) (string, error)
- func (d *DB) GetAsn(ipAddress string) (string, error)
- func (d *DB) GetCity(ipAddress string) (string, error)
- func (d *DB) GetCountryLong(ipAddress string) (string, error)
- func (d *DB) GetCountryShort(ipAddress string) (string, error)
- func (d *DB) GetDomain(ipAddress string) (string, error)
- func (d *DB) GetIsp(ipAddress string) (string, error)
- func (d *DB) GetLastSeen(ipAddress string) (string, error)
- func (d *DB) GetProvider(ipAddress string) (string, error)
- func (d *DB) GetProxyType(ipAddress string) (string, error)
- func (d *DB) GetRegion(ipAddress string) (string, error)
- func (d *DB) GetThreat(ipAddress string) (string, error)
- func (d *DB) GetUsageType(ipAddress string) (string, error)
- func (d *DB) IsProxy(ipAddress string) (int8, error)
- func (d *DB) PackageVersion() string
- type IP2ProxyCreditResult
- type IP2ProxyResult
- type WS
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DatabaseVersion
deprecated
func DatabaseVersion() string
DatabaseVersion returns the database version.
Deprecated: No longer being updated.
func GetCountryLong
deprecated
func GetCountryShort
deprecated
func GetLastSeen
deprecated
func GetProxyType
deprecated
func GetUsageType
deprecated
func ModuleVersion ¶
func ModuleVersion() string
ModuleVersion returns the version of the component.
func PackageVersion
deprecated
func PackageVersion() string
PackageVersion returns the database type.
Deprecated: No longer being updated.
Types ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
The DB struct is the main object used to query the IP2Proxy BIN file.
func OpenDB ¶
OpenDB takes the path to the IP2Proxy BIN database file. It will read all the metadata required to be able to extract the embedded proxy data, and return the underlining DB object.
func OpenDBWithReader ¶
OpenDBWithReader takes a dbReader to the IP2Proxy BIN database file. It will read all the metadata required to be able to extract the embedded proxy data, and return the underlining DB object.
func (*DB) DatabaseVersion ¶
DatabaseVersion returns the database version.
func (*DB) GetAsn ¶
GetAsn will return the autonomous system number based on the queried IP address.
func (*DB) GetCountryLong ¶
GetCountryLong will return the country name based on the queried IP address.
func (*DB) GetCountryShort ¶
GetCountryShort will return the ISO-3166 country code based on the queried IP address.
func (*DB) GetIsp ¶
GetIsp will return the Internet Service Provider name based on the queried IP address.
func (*DB) GetLastSeen ¶
GetLastSeen will return the number of days that the proxy was last seen based on the queried IP address.
func (*DB) GetProvider ¶
GetProvider will return the provider of the proxy.
func (*DB) GetProxyType ¶
GetProxyType will return the proxy type based on the queried IP address.
func (*DB) GetUsageType ¶
GetUsageType will return the usage type based on the queried IP address.
func (*DB) IsProxy ¶
IsProxy checks whether the queried IP address was a proxy. Returned value: -1 (errors), 0 (not a proxy), 1 (a proxy), 2 (a data center IP address or search engine robot).
func (*DB) PackageVersion ¶
PackageVersion returns the database type.
type IP2ProxyCreditResult ¶
type IP2ProxyCreditResult struct {
Response string `json:"response"`
}
The IP2ProxyCreditResult struct stores the credit balance for the IP2Proxy Web Service.
type IP2ProxyResult ¶
type IP2ProxyResult struct { Response string `json:"response"` CountryCode string `json:"countryCode"` CountryName string `json:"countryName"` RegionName string `json:"regionName"` CityName string `json:"cityName"` ISP string `json:"isp"` Domain string `json:"domain"` UsageType string `json:"usageType"` ASN string `json:"asn"` AS string `json:"as"` LastSeen string `json:"lastSeen"` ProxyType string `json:"proxyType"` Threat string `json:"threat"` IsProxy string `json:"isProxy"` Provider string `json:"provider"` }
The IP2ProxyResult struct stores all of the available proxy info found in the IP2Proxy Web Service.
type WS ¶
type WS struct {
// contains filtered or unexported fields
}
The WS struct is the main object used to query the IP2Proxy Web Service.
func (*WS) GetCredit ¶
func (w *WS) GetCredit() (IP2ProxyCreditResult, error)
GetCredit will return the web service credit balance.