mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-21 18:37:45 +08:00
go-ipfs-config: add default empty config for DNS, rename struct from DNSConfig to DNS
This commit is contained in:
parent
f264de4139
commit
c932e6b700
@ -28,7 +28,7 @@ type Config struct {
|
||||
AutoNAT AutoNATConfig
|
||||
Pubsub PubsubConfig
|
||||
Peering Peering
|
||||
DNS DNSConfig
|
||||
DNS DNS
|
||||
|
||||
Provider Provider
|
||||
Reprovider Reprovider
|
||||
|
||||
@ -1,13 +1,13 @@
|
||||
package config
|
||||
|
||||
// DNSConfig specifies DNS resolution rules using custom resolvers
|
||||
type DNSConfig struct {
|
||||
// Resolvers is a map of FQDNs to URLs for custom DNS resolution.
|
||||
// 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
|
||||
//
|
||||
// https://en.wikipedia.org/wiki/DNS_over_HTTPS
|
||||
//
|
||||
// Example:
|
||||
// - Custom resolver for ENS: `eth.` → `https://eth.link/dns-query`
|
||||
// - Override the default OS resolver: `.` → `https://doh.applied-privacy.net/query`
|
||||
|
||||
@ -89,6 +89,9 @@ func InitWithIdentity(identity Identity) (*Config, error) {
|
||||
Pinning: Pinning{
|
||||
RemoteServices: map[string]RemotePinningService{},
|
||||
},
|
||||
DNS: DNS{
|
||||
Resolvers: map[string]string{},
|
||||
},
|
||||
}
|
||||
|
||||
return conf, nil
|
||||
|
||||
Loading…
Reference in New Issue
Block a user