Documentation ¶
Index ¶
- Constants
- Variables
- func DnsCheck(record DnsServer) (net.IP, error)
- func HttpCheck(r HttpServer) (net.IP, error)
- func InetAddr(flagCheckType int) string
- func IpAddrIP(flagCheckType int) (net.IP, error)
- func IpAddrString(flagCheckType int) (string, error)
- type DnsServer
- type HttpServer
- type IPAddrResolver
Constants ¶
View Source
const ( OnlyDNS = iota OnlyHTTP BothMethod )
Variables ¶
View Source
var DnsServerS = []DnsServer{ {"resolver3.opendns.com", "myip.opendns.com", dns.TypeA}, {"resolver4.opendns.com", "myip.opendns.com", dns.TypeA}, {"resolver2.opendns.com", "myip.opendns.com", dns.TypeA}, {"resolver1.opendns.com", "myip.opendns.com", dns.TypeA}, {"ns1-1.akamaitech.net", "whoami.akamai.net", dns.TypeA}, {"za.akamaitech.net", "whoami.akamai.net", dns.TypeA}, {"zb.akamaitech.net", "whoami.akamai.net", dns.TypeA}, {"zc.akamaitech.net", "whoami.akamai.net", dns.TypeA}, {"zd.akamaitech.net", "whoami.akamai.net", dns.TypeA}, {"ns1.google.com", "o-o.myaddr.l.google.com", dns.TypeTXT}, {"ns2.google.com", "o-o.myaddr.l.google.com", dns.TypeTXT}, {"ns3.google.com", "o-o.myaddr.l.google.com", dns.TypeTXT}, }
View Source
var HttpServerS = []HttpServer{
{"https://ifconfig.me/"},
{"https://icanhazip.com/"},
{"https://ident.me/"},
{"https://ipecho.net/plain"},
{"https://checkip.amazonaws.com/"},
{"https://wgetip.com/"},
{"https://ip.tyk.nu/"},
{"https://bot.whatismyipaddress.com/"},
{"https://ipof.in/txt"},
{"https://l2.io/ip"},
{"https://eth0.me/"},
}
Functions ¶
func IpAddrString ¶
Types ¶
type HttpServer ¶
type HttpServer struct {
Server string
}
Click to show internal directories.
Click to hide internal directories.