Expand description
Network utilities for tool crates.
Shared SSRF and domain-policy primitives used by every outbound-network tool
(scrape.rs, search/). Centralizing these here means new HTTP-based tools get the
same URL-scheme, private-IP, and allow/deny-list enforcement without re-implementing it.
Functionsยง
- check_
domain_ policy - Check
hostagainst a domain allowlist/denylist pair. - is_
private_ host - Returns
truewhenhostis a loopback/private-range IP literal or a reserved.localhost/.internal/.localdomain. - is_
private_ ip - Returns
trueifaddris a non-routable or private IP address that should be blocked for outbound connections (SSRF defense). - validate_
url - Validate that
rawis an HTTPS URL pointing at a non-private host.