Use all resolvers simultaneously, even the ones from remote sources.
Fireworks!
This commit is contained in:
parent
df3a5f608d
commit
9dcd37093d
|
@ -125,11 +125,6 @@ func ConfigLoad(proxy *Proxy, svcFlag *string, config_file string) error {
|
||||||
proxy.blockNameLogFile = config.BlockName.LogFile
|
proxy.blockNameLogFile = config.BlockName.LogFile
|
||||||
|
|
||||||
proxy.forwardFile = config.ForwardFile
|
proxy.forwardFile = config.ForwardFile
|
||||||
if len(config.ServerNames) == 0 {
|
|
||||||
for serverName := range config.ServersConfig {
|
|
||||||
config.ServerNames = append(config.ServerNames, serverName)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
for sourceName, source := range config.SourcesConfig {
|
for sourceName, source := range config.SourcesConfig {
|
||||||
if source.URL == "" {
|
if source.URL == "" {
|
||||||
return fmt.Errorf("Missing URL for source [%s]", sourceName)
|
return fmt.Errorf("Missing URL for source [%s]", sourceName)
|
||||||
|
@ -157,13 +152,18 @@ func ConfigLoad(proxy *Proxy, svcFlag *string, config_file string) error {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
for _, registeredServer := range registeredServers {
|
for _, registeredServer := range registeredServers {
|
||||||
if !includesName(config.ServerNames, registeredServer.name) {
|
if len(config.ServerNames) > 0 && !includesName(config.ServerNames, registeredServer.name) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
dlog.Infof("Adding [%s] to the set of wanted resolvers", registeredServer.name)
|
dlog.Infof("Adding [%s] to the set of wanted resolvers", registeredServer.name)
|
||||||
proxy.registeredServers = append(proxy.registeredServers, registeredServer)
|
proxy.registeredServers = append(proxy.registeredServers, registeredServer)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if len(config.ServerNames) == 0 {
|
||||||
|
for serverName := range config.ServersConfig {
|
||||||
|
config.ServerNames = append(config.ServerNames, serverName)
|
||||||
|
}
|
||||||
|
}
|
||||||
for _, serverName := range config.ServerNames {
|
for _, serverName := range config.ServerNames {
|
||||||
serverConfig, ok := config.ServersConfig[serverName]
|
serverConfig, ok := config.ServersConfig[serverName]
|
||||||
if !ok {
|
if !ok {
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
## List of servers to use
|
## List of servers to use
|
||||||
## If this line is commented, all registered servers will be used
|
## If this line is commented, all registered servers will be used
|
||||||
|
|
||||||
server_names = ["dnscrypt.org-fr"]
|
# server_names = ["dnscrypt.org-fr"]
|
||||||
|
|
||||||
|
|
||||||
## List of local addresses and ports to listen to. Can be IPv4 and/or IPv6.
|
## List of local addresses and ports to listen to. Can be IPv4 and/or IPv6.
|
||||||
|
|
Loading…
Reference in New Issue