Documentation ¶
Index ¶
- Variables
- func FakeIPEnabled() bool
- func FindHostByIP(ip net.IP) (string, bool)
- func IsExistFakeIP(ip net.IP) bool
- func IsFakeIP(ip net.IP) bool
- func MappingEnabled() bool
- func ResolveIP(host string) (net.IP, error)
- func ResolveIPWithResolver(host string, r Resolver) (net.IP, error)
- func ResolveIPv4(host string) (net.IP, error)
- func ResolveIPv6(host string) (net.IP, error)
- type Enhancer
- type Resolver
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // DefaultResolver aim to resolve ip DefaultResolver Resolver // DisableIPv6 means don't resolve ipv6 host // default value is true DisableIPv6 = true // DefaultHosts aim to resolve hosts DefaultHosts = trie.New() // DefaultDNSTimeout defined the default dns request timeout DefaultDNSTimeout = time.Second * 5 )
Functions ¶
func FakeIPEnabled ¶ added in v1.2.0
func FakeIPEnabled() bool
func IsExistFakeIP ¶ added in v1.3.0
func MappingEnabled ¶ added in v1.2.0
func MappingEnabled() bool
func ResolveIPWithResolver ¶ added in v1.5.0
ResolveIPWithResolver same as ResolveIP, but with a resolver
func ResolveIPv4 ¶
ResolveIPv4 with a host, return ipv4
Types ¶
Click to show internal directories.
Click to hide internal directories.