ipaddr

package
v0.0.0-...-82b5ac7 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2026 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsPrivateIP

func IsPrivateIP(ip string) bool

IsPrivateIP checks if an IP address is a private/local IP address. This matches the Node.js implementation's isPrivateIP function. Private IPs are always allowed even when an allow list is configured.

func Parse

func Parse(ip string) (netip.Addr, error)

Types

type MatchList

type MatchList struct {
	Description string

	Count int
	// contains filtered or unexported fields
}

func BuildMatchList

func BuildMatchList(name, description string, ipsList []string) MatchList

func (*MatchList) Matches

func (list *MatchList) Matches(ip netip.Addr) bool

Jump to

Keyboard shortcuts

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