mirror of
https://github.com/DNSCrypt/dnscrypt-proxy.git
synced 2025-03-04 18:30:57 +01:00
cleanup: config: rename static config as StaticsConfig
Naming similar as SourcesConfig.
This commit is contained in:
parent
084896c3e1
commit
6ba2ff4fdc
1 changed files with 3 additions and 3 deletions
|
@ -58,7 +58,7 @@ type Config struct {
|
||||||
BlockIP BlockIPConfig `toml:"ip_blacklist"`
|
BlockIP BlockIPConfig `toml:"ip_blacklist"`
|
||||||
ForwardFile string `toml:"forwarding_rules"`
|
ForwardFile string `toml:"forwarding_rules"`
|
||||||
CloakFile string `toml:"cloaking_rules"`
|
CloakFile string `toml:"cloaking_rules"`
|
||||||
ServersConfig map[string]StaticConfig `toml:"static"`
|
StaticsConfig map[string]StaticConfig `toml:"static"`
|
||||||
SourcesConfig map[string]SourceConfig `toml:"sources"`
|
SourcesConfig map[string]SourceConfig `toml:"sources"`
|
||||||
SourceRequireDNSSEC bool `toml:"require_dnssec"`
|
SourceRequireDNSSEC bool `toml:"require_dnssec"`
|
||||||
SourceRequireNoLog bool `toml:"require_nolog"`
|
SourceRequireNoLog bool `toml:"require_nolog"`
|
||||||
|
@ -570,12 +570,12 @@ func (config *Config) loadSources(proxy *Proxy) error {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if len(config.ServerNames) == 0 {
|
if len(config.ServerNames) == 0 {
|
||||||
for serverName := range config.ServersConfig {
|
for serverName := range config.StaticsConfig {
|
||||||
config.ServerNames = append(config.ServerNames, serverName)
|
config.ServerNames = append(config.ServerNames, serverName)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for _, serverName := range config.ServerNames {
|
for _, serverName := range config.ServerNames {
|
||||||
staticConfig, ok := config.ServersConfig[serverName]
|
staticConfig, ok := config.StaticsConfig[serverName]
|
||||||
if !ok {
|
if !ok {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue