Documentation
¶
Index ¶
- Variables
- func Get() (port int, err error)
- func GetClientIP(r *http.Request) (ip string)
- func GetDefaultInterfaceName() string
- func GetInterfaceIP() (string, error)
- func GetIp138(ip string) string
- func GetLocalIP() (ip string)
- func GetLocalIp() string
- func GetOutboundIP() string
- func GetPublicIP() (string, error)
- func GetValidAddressCount(cidr string) int
- func GetWwwIP() (exip string)
- func Intersect(n1, n2 *net.IPNet) bool
- func IpAddress() string
- func LocalIP() (string, error)
- func LocalMac() (string, error)
- func ToCommonString(ip string, prefix uint32) string
Constants ¶
This section is empty.
Variables ¶
View Source
var NameServer = "ns1.google.com:53"
NameServer the name server to use for this lib
Functions ¶
func GetDefaultInterfaceName ¶
func GetDefaultInterfaceName() string
func GetInterfaceIP ¶
GetInterfaceIP get the ip of your interface, useful when you want to get your ip inside a private network, such as wifi network.
func GetLocalIp ¶
func GetLocalIp() string
func GetPublicIP ¶
GetPublicIP get the ip that is public to global.
func GetValidAddressCount ¶
func ToCommonString ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.