From 956f16c10757707c2d555c3b9dfdfe42607df129 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Fri, 10 Jan 2025 23:02:41 +0100 Subject: [PATCH] Log the actual server IP --- .ci/forwarding-rules.txt | 3 +-- dnscrypt-proxy/plugin_forward.go | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.ci/forwarding-rules.txt b/.ci/forwarding-rules.txt index f255ff52..771e3840 100644 --- a/.ci/forwarding-rules.txt +++ b/.ci/forwarding-rules.txt @@ -1,3 +1,2 @@ darpa.mil 208.67.222.222 -download.windowsupdate.com $DHCP - +download.windowsupdate.com $BOOTSTRAP diff --git a/dnscrypt-proxy/plugin_forward.go b/dnscrypt-proxy/plugin_forward.go index 4f6837c3..9a21cb0e 100644 --- a/dnscrypt-proxy/plugin_forward.go +++ b/dnscrypt-proxy/plugin_forward.go @@ -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 }