Skip to main content

Module private

Module private 

Available on crate feature net only.
Expand description

Helpers for IP ranges that should bypass public-Internet interception.

The goal here is intentionally narrower than “all IANA special-purpose addresses”. Some IANA special-purpose blocks contain globally reachable anycast or transition addresses, so treating the entire registry as passthrough would be too broad for proxying.

References:

Functions§

is_private_ip
Returns true when the address belongs to a range that should be treated as private instead of a normal public-Internet destination.
is_private_ipv4
Returns true for IPv4 ranges that are not meant to be treated as ordinary public-Internet destinations.
is_private_ipv6
Returns true for IPv6 ranges that are not meant to be treated as ordinary public-Internet destinations.