Skip to content

Commit

Permalink
Log the actual server IP
Browse files Browse the repository at this point in the history
  • Loading branch information
jedisct1 committed Jan 10, 2025
1 parent 5aa958e commit 956f16c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
3 changes: 1 addition & 2 deletions .ci/forwarding-rules.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
darpa.mil 208.67.222.222
download.windowsupdate.com $DHCP

download.windowsupdate.com $BOOTSTRAP
4 changes: 1 addition & 3 deletions dnscrypt-proxy/plugin_forward.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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
}
Expand Down

0 comments on commit 956f16c

Please sign in to comment.