Revision a617c52f57f20956f8ecd7cca3b4cb36e68bb67e authored by Jorropo on 22 November 2023, 05:04:24 UTC, committed by Jorropo on 22 November 2023, 05:06:15 UTC
See https://github.com/libp2p/go-libp2p/pull/2650.
1 parent 6a51849
Raw File
dns.go
package config

// DNS specifies DNS resolution rules using custom resolvers.
type DNS struct {
	// Resolvers is a map of FQDNs to URLs for custom DNS resolution.
	// URLs starting with `https://` indicate DoH endpoints.
	// Support for other resolver types can be added in the future.
	// https://en.wikipedia.org/wiki/Fully_qualified_domain_name
	// https://en.wikipedia.org/wiki/DNS_over_HTTPS
	//
	// Example:
	// - Custom resolver for ENS:          `eth.` → `https://dns.eth.limo/dns-query`
	// - Override the default OS resolver: `.`    → `https://doh.applied-privacy.net/query`
	Resolvers map[string]string
	// MaxCacheTTL is the maximum duration DNS entries are valid in the cache.
	MaxCacheTTL *OptionalDuration `json:",omitempty"`
}
back to top