# Packages
No description provided by the author
# Functions
AppendPortIfNeeded appends the given port to IP address unless it is already in "ipv4:port" or "[ipv6]:port" format.
BuildPortsToEndpointsMap builds a map of portname -> all ip:ports for that portname.
FilterIncorrectCIDRVersion filters out the incorrect IP version case from a slice of CIDR strings.
FilterIncorrectIPVersion filters out the incorrect IP version case from a slice of IP strings.
GetNodeAddresses return all matched node IP addresses based on given cidr slice.
IPPart returns just the IP part of an IP or IP:port or endpoint string.
IsLocalIP checks if a given IP address is bound to an interface on the local system.
IsProxyableHostname checks if the IP addresses for a given hostname are permitted to be proxied.
IsProxyableIP checks if a given IP address is permitted to be proxied.
IsZeroCIDR checks whether the input CIDR string is either the IPv4 or IPv6 zero CIDR.
LogAndEmitIncorrectIPVersionEvent logs and emits incorrect IP version event.
PortPart returns just the port part of an endpoint string.
RevertPorts is closing ports in replacementPortsMap but not in originalPortsMap.
ShouldSkipService checks if a given service should skip proxying.
ShuffleStrings copies strings from the specified slice into a copy in random order.
ToCIDR returns a host address of the form <ip-address>/32 for IPv4 and <ip-address>/128 for IPv6.
# Constants
IPv4ZeroCIDR is the CIDR block for the whole IPv4 address space.
IPv6ZeroCIDR is the CIDR block for the whole IPv6 address space.
# Variables
ErrAddressNotAllowed indicates the address is not allowed.
ErrNoAddresses indicates there are no addresses for the hostname.
# Structs
LocalPort describes a port on specific IP address and protocol.
RealNetwork implements the NetworkInterfacer interface for production code, just wrapping the underlying net library function calls.
# Interfaces
Closeable is an interface around closing a port.
NetworkInterfacer defines an interface for several net library functions.
PortOpener is an interface around port opening/closing.
Resolver is an interface for net.Resolver.