Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetClientIP ¶ added in v1.8.68
GetClientIP 获取客户端的 IP 地址
func GetLocalPrivateIP ¶ added in v1.8.68
func GetLocalPrivateIP() string
GetLocalPrivateIP 获取本机第一个私有环回地址
func GetLocalPublicIP ¶ added in v1.8.68
GetLocalPublicIP 获取本机的公网IP地址
func IsPrivateIP ¶ added in v1.8.68
IsPrivateIP 判断给定的 IP 地址是否是私有IP(包括环回IP和局域网IP)
func IsValidPublicIP ¶ added in v1.8.68
IsValidPublicIP 验证一个 IP 地址是否是有效的公网 IP 和ip_address文件里面的检测是否私有地址是不同的
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.