ip

package
v0.1.113 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var VPNFilteredNetworks = []net.IPNet{
	filtertransport.MustParseCIDR("10.0.0.0/8"),
	filtertransport.MustParseCIDR("172.16.0.0/12"),
	filtertransport.MustParseCIDR("192.168.0.0/16"),
}

Functions

func ElementumURL

func ElementumURL(xbmcHost *xbmc.XBMCHost) string

ElementumURL returns elementum url for external calls

func GetContextHTTPHost

func GetContextHTTPHost(ctx *gin.Context) string

GetContextHTTPHost ...

func GetHTTPHost

func GetHTTPHost(xbmcHost *xbmc.XBMCHost) string

GetHTTPHost ...

func GetInterfaceAddrs added in v0.1.107

func GetInterfaceAddrs(input string) (v4 net.IP, v6 net.IP, err error)

GetInterfaceAddrs returns IPv4 and IPv6 for an interface string.

func GetLocalHTTPHost

func GetLocalHTTPHost() string

GetLocalHTTPHost ...

func GetLocalHost

func GetLocalHost() string

func GetPossibleGateways added in v0.1.107

func GetPossibleGateways(addr net.IP) (ret []net.IP)

GetPossibleGateways calculates possible gateways for interface IP

func InternalProxyURL

func InternalProxyURL(xbmcHost *xbmc.XBMCHost) string

InternalProxyURL returns internal proxy url

func IsAddrLocal added in v0.1.107

func IsAddrLocal(ip net.IP) bool

func IsAddrVPN added in v0.1.112

func IsAddrVPN(ip net.IP) bool

func LocalIP

func LocalIP(xbmcHost *xbmc.XBMCHost) (net.IP, error)

func LocalIPs added in v0.1.112

func LocalIPs() ([]net.IP, error)

func ParseListenPort added in v0.1.113

func ParseListenPort(message string) (int, error)

func RequestUserIP

func RequestUserIP(r *http.Request) string

func TestRepositoryURL added in v0.1.102

func TestRepositoryURL() error

func VPNIPs added in v0.1.112

func VPNIPs() ([]net.IP, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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