realip

package
v0.7.3 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2022 License: BSD-3-Clause, MIT, BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromRequest

func FromRequest(ctx *fasthttp.RequestCtx) string

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

func IsPrivateAddress

func IsPrivateAddress(address string) (bool, error)

IsPrivateAddress works by checking if the address is under private CIDR blocks. List of private CIDR blocks can be seen on :

https://en.wikipedia.org/wiki/Private_network

https://en.wikipedia.org/wiki/Link-local_address

Types

This section is empty.

Jump to

Keyboard shortcuts

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