network

package
v0.0.0-...-560f09a Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2023 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRemoteAddr

func GetRemoteAddr(r *http.Request, publicIp string) string

GetRemoteAddr Extracts the remote IP address from a request object If no IP address ForwardFor header is found then the Host header will be used

r     - *http.Request, request object that will be used to retrieve remote IP address

Returns:

out   - string, remote IP address for the passed request object

func GetRequestIP

func GetRequestIP(r *http.Request) string

GetRequestIP Extracts the remote IP address from a request object If no IP address ForwardFor header is found then the Host header will be used

r     - *http.Request, request object that will be used to retrieve remote IP address

Returns:

out   - string, remote IP address for the passed request object

func GetSelfPublicIP

func GetSelfPublicIP() (string, error)

GetSelfPublicIP Retrieves the current servers remote IP address Returns:

out   - string, remote IP address for this server

Types

This section is empty.

Jump to

Keyboard shortcuts

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