Module net_guard
Expand description
Network-safety primitives shared across crates that must reject SSRF and
local/private targets. Lives in zeroclaw-infra so both the tool layer
(zeroclaw-tools domain guard) and the plugin host (zeroclaw-plugins
zc_http_request) read one implementation without a tool-to-plugin
Functionsยง
- is_
non_ global_ v4 - True when an IPv4 address is not globally routable (loopback, RFC 1918, link-local, CGNAT, documentation, benchmarking, reserved, multicast).
- is_
non_ global_ v6 - True when an IPv6 address is not globally routable (loopback, ULA, link-local, documentation, multicast, or an IPv4-mapped non-global v4).
- is_
private_ or_ local_ host - True when
hostis loopback, private, link-local, a documentation/ benchmark range, or one of thelocalhost/*.localname forms. Accepts bracketed IPv6 ([::1]) and is case-insensitive.