@cryptotaxi247 / kubo / commits / 8a8b161da

go-ipfs-config: add custom DNS Resolver configuration

vyzo committed Apr 12, 2021 at 13:53 UTC 8a8b161da461c8e340f7a37178df3e1ea882fad9
2 files changed +11
config/config.go
+1
@@ -28,6 +28,7 @@ type Config struct {
28 AutoNAT AutoNATConfig
29 Pubsub PubsubConfig
30 Peering Peering
31 + DNS DNSConfig
32
33 Provider Provider
34 Reprovider Reprovider
config/dns.go new
+10
@@ -0,0 +1,10 @@
1 +package config
2 +
3 +// DNSConfig specifies custom resolvers using DoH
4 +type DNSConfig struct {
5 + // DefaultResolver, if present, is a URL for the default DoH resolver.
6 + // If empty, DNS resolution will use the system resolver.
7 + DefaultResolver string `json:",omitempty"`
8 + // CustomResolvers is a map of domains to URLs for custom DoH resolution.
9 + CustomResolvers map[string]string `json:",omitempty"`
10 +}