Expand description
Host address classification shared by the daemon and the CLI (ADR 001 § Node Discovery).
is_publishable decides whether an IP address is reachable from the
public internet. route_public_ips reports the host’s own public
addresses: the source address the kernel picks for its default route, per
address family, kept only when it is publishable. A host with a public IP on
its interface (a typical dedicated or cloud server) reports it; a host
behind NAT (a home connection) reports none, because its route source is a
private address.
Functions§
- is_
publishable - Whether
ipis reachable from the public internet. A stable stand-in for the unstableIpAddr::is_global. An IPv4-mapped IPv6 address is judged as its IPv4 address. - quic_
multiaddr - The QUIC multiaddr a node at
iplistening on UDPportregisters, e.g./ip4/203.0.113.10/udp/4433/quic-v1. - route_
public_ ips - The host’s public IP addresses: for IPv4 and IPv6, the source address of
the default route, kept when
is_publishable. Empty on a host behind NAT or with no default route.