mirror of
https://github.com/DNSCrypt/dnscrypt-proxy.git
synced 2025-03-04 02:14:40 +01:00
Log the actual server IP
This commit is contained in:
parent
5aa958e282
commit
956f16c107
2 changed files with 2 additions and 5 deletions
|
@ -1,3 +1,2 @@
|
|||
darpa.mil 208.67.222.222
|
||||
download.windowsupdate.com $DHCP
|
||||
|
||||
download.windowsupdate.com $BOOTSTRAP
|
||||
|
|
|
@ -178,10 +178,8 @@ func (plugin *PluginForward) Eval(pluginsState *PluginsState, msg *dns.Msg) erro
|
|||
switch item.typ {
|
||||
case Explicit:
|
||||
server = item.servers[rand.Intn(len(item.servers))]
|
||||
pluginsState.serverName = server
|
||||
case Bootstrap:
|
||||
server = plugin.bootstrapResolvers[rand.Intn(len(plugin.bootstrapResolvers))]
|
||||
pluginsState.serverName = "[BOOTSTRAP]"
|
||||
case DHCP:
|
||||
const maxInconsistency = 9
|
||||
for _, dhcpdns := range plugin.dhcpdns {
|
||||
|
@ -198,8 +196,8 @@ func (plugin *PluginForward) Eval(pluginsState *PluginsState, msg *dns.Msg) erro
|
|||
dlog.Warn("DHCP didn't provide any DNS server")
|
||||
continue
|
||||
}
|
||||
pluginsState.serverName = "[DHCP]"
|
||||
}
|
||||
pluginsState.serverName = server
|
||||
if len(server) == 0 {
|
||||
continue
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue