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
truewhen the address belongs to a range that should be treated as private instead of a normal public-Internet destination. - is_
private_ ipv4 - Returns
truefor IPv4 ranges that are not meant to be treated as ordinary public-Internet destinations. - is_
private_ ipv6 - Returns
truefor IPv6 ranges that are not meant to be treated as ordinary public-Internet destinations.