pub async fn validate_url(url: &Url) -> Result<Vec<SocketAddr>, BlockedUrl>Expand description
Validate a URL’s scheme, port and host, resolving and classifying the host. On success returns the validated socket addresses (host resolved to public IPs) so the caller can pin the connection and avoid a DNS-rebinding TOCTOU window.
Host classification is skipped when the guard is disabled via env; the scheme and port checks always run.
Async because domain validation resolves DNS via tokio::net::lookup_host
rather than the blocking std resolver — important on the async fetch path
(and the concurrent MCP server) so a slow lookup never blocks a tokio worker.