Skip to main content

create_resolver

Function create_resolver 

Source
pub(crate) fn create_resolver() -> Result<TokioResolver, Error>
Expand description

Creates a resolver from the system DNS configuration.

Caching is delegated to the infrastructure (node-local DNS), so this resolver does no caching of its own. Fails if the system DNS configuration cannot be read. We must not fall back to hickory’s default config (Google public DNS) here, that would leak internal hostnames to an external party and could not resolve them anyway.