Documentation
¶
Index ¶
- func GetExternalIP() (string, error)
- func GetHostIP() (string, error)
- func GetInternalIP() (string, error)
- func GetInternalIPByDevName(dev string) ([]string, error)
- func GetLocalConnectIP(proto string, addr string) (string, error)
- func GetRequestIP(r *http.Request) string
- func GetUploadFileSize(upfile multipart.File) (int64, error)
- func Inet_aton(ipnr net.IP) int64
- func Inet_ntoa(ipnr int64) net.IP
- func IsPublicIP(IP net.IP) bool
- type Dsn
- type Size
- type Stat
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetInternalIPByDevName ¶
根据网卡设备名称返回内部IP
func GetLocalConnectIP ¶
在主机拥有多个IP地址时,返回能够连通对端网络的自身主机IP
func GetRequestIP ¶
返回HTTP请求IP,优先级(X-Real-IP>X-Forwarded-For>Proxy-Client-IP>WL-Proxy-Client-IP")
func GetUploadFileSize ¶
返回HTTP upload文件的大小
func IsPublicIP ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.