Expand description
Domain validation and SSRF protection utilities
Functions§
- describe_
reserved_ ip - Returns a human-readable reason why an IP is blocked, or
Noneif it is safe. Intended for error messages — callers should still useis_private_or_reserved_ipfor the fast boolean check. - is_
private_ or_ reserved_ ip - Checks if an IP address is in a private or reserved range.
- normalize_
domain - Normalizes and validates a domain name.
- validate_
domain_ safe - Validates that a domain is safe to query (SSRF protection).