diff --git a/config/config.go b/config/config.go index 7d44316ab..d9b060e64 100644 --- a/config/config.go +++ b/config/config.go @@ -28,6 +28,7 @@ type Config struct { AutoNAT AutoNATConfig Pubsub PubsubConfig Peering Peering + DNS DNSConfig Provider Provider Reprovider Reprovider diff --git a/config/dns.go b/config/dns.go new file mode 100644 index 000000000..5f18a9c69 --- /dev/null +++ b/config/dns.go @@ -0,0 +1,10 @@ +package config + +// DNSConfig specifies custom resolvers using DoH +type DNSConfig struct { + // DefaultResolver, if present, is a URL for the default DoH resolver. + // If empty, DNS resolution will use the system resolver. + DefaultResolver string `json:",omitempty"` + // CustomResolvers is a map of domains to URLs for custom DoH resolution. + CustomResolvers map[string]string `json:",omitempty"` +}