iputil

package
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 30, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	XForwardedFor = "X-Forwarded-For"
	XRealIP       = "X-Real-IP"
	XClientIP     = "x-client-ip"
)

http headers.

Variables

This section is empty.

Functions

func GetLocalExternalIPV4 added in v0.6.0

func GetLocalExternalIPV4() (string, error)

GetLocalExternalIPV4 获取本机外网IP

func GetLocalIP

func GetLocalIP() string

GetLocalIP 返回主机的本地IP。

func GetRemoteIP

func GetRemoteIP(req *http.Request) string

GetRemoteIP 返回请求的远程ip

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL