Documentation ¶
Index ¶
- type DB
- func (db *DB) Count() uint32
- func (db *DB) Date() time.Time
- func (db *DB) LookupIPV4(ip net.IP) (*Result, error)
- func (db *DB) LookupIPV4Dot(ip string) (*Result, error)
- func (db *DB) LookupIPV4Num(ip uint32) (*Result, error)
- func (db *DB) Type() DbType
- func (db *DB) TypeName() string
- func (db *DB) Version() string
- type DbType
- type ProxyType
- type Result
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
DB holds a parsed database instance
func FromBytes ¶
FromBytes takes a byte slice corresponding to a IP2Proxy file and returns the parsed DB object.
func (*DB) LookupIPV4 ¶
LookupIPV4 lookups a net.IP ipv4 address in database
func (*DB) LookupIPV4Dot ¶
LookupIPV4Dot lookups a dot notation (1.2.3.4) ipv4 address in database
func (*DB) LookupIPV4Num ¶
LookupIPV4Num lookups a numeric ipv4 address in database
type DbType ¶
type DbType uint8
DbType is the type of db
const ( // UnknownDbType is the type for unknown db type UnknownDbType DbType = 0 // PX1 is the IP2Proxy IP-COUNTRY database PX1 DbType = 1 // PX2 is the IP2Proxy IP-PROXYTYPE-COUNTRY database PX2 DbType = 2 // PX3 is the IP2Proxy IP-PROXYTYPE-COUNTRY-REGION-CITY database PX3 DbType = 3 // PX4 is the P2Proxy IP-PROXYTYPE-COUNTRY-REGION-CITY-ISP database PX4 DbType = 4 )
type ProxyType ¶
type ProxyType uint8
ProxyType is the type of proxy detected
const ( // ProxyNA are hosts which proxy status is not available (db without the info or invalid data). ProxyNA ProxyType = iota // ProxyNOT are hosts not detected as proxy. ProxyNOT // ProxyVPN are Anonymizing VPN services. These services offer users a publicly accessible VPN for the purpose of // hiding their IP address. ProxyVPN // ProxyTOR are Tor Exit Nodes. The Tor Project is an open network used by those who wish to maintain anonymity. ProxyTOR // ProxyDCH Are Hosting Provider, Data Center or Content Delivery Network. Since hosting providers and data centers // can serve to provide anonymity, the Anonymous IP database flags IP addresses associated with them. ProxyDCH // ProxyPUB are Public Proxies. These are services which make connection requests on a user's behalf. // Proxy server software can be configured by the administrator to listen on some specified port. // These differ from VPNs in that the proxies usually have limited functions compare to VPNs. ProxyPUB // ProxyWEB are Web Proxies. These are web services which make web requests on a user's behalf. // These differ from VPNs or Public Proxies in that they are simple web-based proxies rather than operating at the IP address and other ports level. ProxyWEB )
Click to show internal directories.
Click to hide internal directories.