iputil

package
v2.2.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const DEFAULT_MAX_DISTANCE = 128

set default max distance from two ips to length of ipv6

Variables

This section is empty.

Functions

func FromRequest

func FromRequest(r *http.Request) string

FromRequest return client's real public IP address from http request headers.

func GetDistance

func GetDistance(a, b net.IP) int

func RealIP

func RealIP(r *http.Request) string

RealIP is depreciated, use FromRequest instead

Types

This section is empty.

Jump to

Keyboard shortcuts

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