Versions in this module Expand all Collapse all v1 v1.9999.9999 Jul 8, 2025 v1.75.6 Jul 8, 2025 Changes in this version + const ErrNoReply + const ErrNoUpstreams + const NextProtoDQ + const QUICCodeInternalError + const QUICCodeNoError + const QUICKeepAlivePeriod + var DefaultHTTPVersions = []HTTPVersion + type CachingResolver struct + func NewCachingResolver(r *UpstreamResolver) (cr *CachingResolver) + func (r *CachingResolver) LookupNetIP(ctx context.Context, network bootstrap.Network, host string) (addrs []netip.Addr, err error) + type ConsequentResolver = bootstrap.ConsequentResolver + type DialerInitializer func() (handler bootstrap.DialHandler, err error) + type ExchangeAllResult struct + Resp *dns.Msg + Upstream Upstream + func ExchangeAll(ups []Upstream, req *dns.Msg) (res []ExchangeAllResult, err error) + type HTTPVersion string + const HTTPVersion11 + const HTTPVersion2 + const HTTPVersion3 + type HostsResolver struct + func NewDefaultHostsResolver(rootFSys fs.FS, l *slog.Logger) (hr *HostsResolver, err error) + func NewHostsResolver(hosts hostsfile.Storage) (hr *HostsResolver) + func (hr *HostsResolver) LookupNetIP(context context.Context, network string, host string) (addrs []netip.Addr, err error) + type NotBootstrapError struct + func (e NotBootstrapError) Error() (msg string) + func (e NotBootstrapError) Unwrap() (reason error) + type Options struct + Bootstrap Resolver + CipherSuites []uint16 + HTTPVersions []HTTPVersion + InsecureSkipVerify bool + Logger *slog.Logger + PreferIPv6 bool + QUICTracer QUICTraceFunc + RootCAs *x509.CertPool + Timeout time.Duration + VerifyConnection func(state tls.ConnectionState) error + VerifyDNSCryptCertificate func(cert *dnscrypt.Cert) error + VerifyServerCertificate func(rawCerts [][]byte, verifiedChains [][]*x509.Certificate) error + func (o *Options) Clone() (clone *Options) + type ParallelResolver = bootstrap.ParallelResolver + type ProxyType int + const ProxyTypeHTTP + const ProxyTypeNone + const ProxyTypeSOCKS + type QUICTraceFunc func(ctx context.Context, role logging.Perspective, connID quic.ConnectionID) (tracer *logging.ConnectionTracer) + type Resolver = bootstrap.Resolver + type StaticResolver = bootstrap.StaticResolver + type Upstream interface + Address func() (addr string) + Exchange func(req *dns.Msg) (resp *dns.Msg, err error) + func AddressToUpstream(addr string, opts *Options) (u Upstream, err error) + func ExchangeParallel(ups []Upstream, req *dns.Msg) (reply *dns.Msg, resolved Upstream, err error) + type UpstreamResolver struct + func NewUpstreamResolver(resolverAddress string, opts *Options) (r *UpstreamResolver, err error) + func (r *UpstreamResolver) LookupNetIP(ctx context.Context, network bootstrap.Network, host string) (ips []netip.Addr, err error)