From d42ab831846659455590f52d655bd815f0c1f52a Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Wed, 31 Jan 2018 08:43:49 +0100 Subject: [PATCH] ServerConfig -> StaticConfig to match the config file --- dnscrypt-proxy/config.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dnscrypt-proxy/config.go b/dnscrypt-proxy/config.go index e9406bad..2f825ae9 100644 --- a/dnscrypt-proxy/config.go +++ b/dnscrypt-proxy/config.go @@ -34,7 +34,7 @@ type Config struct { BlockName BlockNameConfig `toml:"blacklist"` BlockIP BlockIPConfig `toml:"ip_blacklist"` ForwardFile string `toml:"forwarding_rules"` - ServersConfig map[string]ServerConfig `toml:"static"` + ServersConfig map[string]StaticConfig `toml:"static"` SourcesConfig map[string]SourceConfig `toml:"sources"` SourceRequireDNSSEC bool `toml:"require_dnssec"` SourceRequireNoLog bool `toml:"require_nolog"` @@ -68,7 +68,7 @@ func newConfig() Config { } } -type ServerConfig struct { +type StaticConfig struct { Stamp string } @@ -247,14 +247,14 @@ func (config *Config) loadSources(proxy *Proxy) error { } } for _, serverName := range config.ServerNames { - serverConfig, ok := config.ServersConfig[serverName] + staticConfig, ok := config.ServersConfig[serverName] if !ok { continue } - if len(serverConfig.Stamp) == 0 { + if len(staticConfig.Stamp) == 0 { dlog.Fatalf("Missing stamp for the static [%s] definition", serverName) } - stamp, err := NewServerStampFromString(serverConfig.Stamp) + stamp, err := NewServerStampFromString(staticConfig.Stamp) if err != nil { return err }