addr

package
v0.0.0-...-9fc37f3 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2022 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExternalIPs

func ExternalIPs() []string

func GetClientIP

func GetClientIP(ctx *http.Request) string

GetClientIP get client ip from http request

func GetIPFromAddr

func GetIPFromAddr(addr net.Addr, onlyV4 bool) net.IP

GetIPFromAddr get ip from addr

func IPs

func IPs(ofs ...Option) []string

Types

type Option

type Option func(*Options)

func NetFlagLoopback

func NetFlagLoopback(flag bool) Option

func NetFlagUP

func NetFlagUP(flag bool) Option

func NetOnlyV4

func NetOnlyV4(flag bool) Option

type Options

type Options struct {
	FlagUp       bool
	FlagLoopback bool

	OnlyV4 bool
}

Jump to

Keyboard shortcuts

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