package
1.0.1
Repository: https://github.com/apus-run/van.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# Functions

AnyOverlap checks if any network in ns overlaps with n1.
FormatEndpoint formats the results for ParseEndpoint as a single endpoint string.
GetPrivateSubnets returns a slice of IPv4 and IPv6 addresses considered as private ranges including localhost addresses.
IsEphemeralPort returns a confidence value indicating how confident we are that a given port is ephemeral.
IsIPAddress returns whether the given host is a numeric IP address.
IsIPNetOverlapingPrivateRange checks if network overlaps with private subnets.
IsIPNetSubset checks if maybeSubset is fully contained within ipNet.
IsIPv4 works the same way as net.ParseIP, but without check for IPv6 case and without returning net.IP slice, whereby IsIPv4 makes no allocations.
IsIPv6 works the same way as net.ParseIP, but without check for IPv4 case and without returning net.IP slice, whereby IsIPv6 makes no allocations.
IsLocalEndpoint checks whether the given endpoint refers to the local host.
IsLocalHost checks whether the given hostname or IP address refers to the local host.
MustParseCIDR parses the given CIDR string and returns the corresponding IPNet.
Overlap checks if two networks overlap.
ParseEndpoint parses an endpoint into a host, an optional zone, and an optional port.
WithDefaultPort translates the given "<host>[:<port>]" string into a "<host>:<port>" string, adding the given default port if none is set.

# Constants

AbsoluteEphemeralPortConfidenceThreshold is the confidence threshold when a port can be assumed to be ephemeral in the absence of the port of a remote counterpart to compare it to.

# Variables

IPv4LocalHost is the local host IP range 127.0.0.0/8.
IPv4MappedIPv6Loopback is the IPv4 loopback address mapped in IPv6 range.
IPv4PrivateNetworks holds RFC1918 addresses plus other reserved IPv4 ranges.
IPv6LocalHost is the local host IP range ::1/128.
IPv6PrivateNetworks holds IPv6 private range and IPv4-mapped private addresses in IPv6 range.

# Type aliases

No description provided by the author