mirror of
https://github.com/DNSCrypt/dnscrypt-proxy.git
synced 2024-10-27 05:49:51 +03:00
Require stamps in static server definitions
Provider names, etc. are not future-proof. In particular, they are incompatible with other protocols such as DoH.
This commit is contained in:
parent
1d18a230c0
commit
8324b29b42
@ -62,13 +62,6 @@ func newConfig() Config {
|
||||
|
||||
type ServerConfig struct {
|
||||
Stamp string
|
||||
ProviderName string `toml:"provider_name"`
|
||||
Address string
|
||||
PublicKey string `toml:"public_key"`
|
||||
DNSSEC bool `toml:"dnssec"`
|
||||
NoLog bool `toml:"no_log"`
|
||||
IPv4 bool `toml:"ipv4"`
|
||||
IPv6 bool `toml:"ipv6"`
|
||||
}
|
||||
|
||||
type SourceConfig struct {
|
||||
@ -274,14 +267,7 @@ func ConfigLoad(proxy *Proxy, svcFlag *string, config_file string) error {
|
||||
if len(serverConfig.Stamp) > 0 {
|
||||
stamp, err = NewServerStampFromString(serverConfig.Stamp)
|
||||
} else {
|
||||
props := ServerInformalProperties(0)
|
||||
if serverConfig.DNSSEC {
|
||||
props |= ServerInformalPropertyDNSSEC
|
||||
}
|
||||
if serverConfig.NoLog {
|
||||
props |= ServerInformalPropertyNoLog
|
||||
}
|
||||
stamp, err = NewServerStampFromLegacy(serverConfig.Address, serverConfig.PublicKey, serverConfig.ProviderName, props)
|
||||
dlog.Fatalf("Missing stamp for the static [%s] definition", serverName)
|
||||
}
|
||||
if err != nil {
|
||||
return err
|
||||
|
Loading…
Reference in New Issue
Block a user