Skip to content

Commit 956f16c

Browse files
committed
Log the actual server IP
1 parent 5aa958e commit 956f16c

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

.ci/forwarding-rules.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
darpa.mil 208.67.222.222
2-
download.windowsupdate.com $DHCP
3-
2+
download.windowsupdate.com $BOOTSTRAP

dnscrypt-proxy/plugin_forward.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,10 +178,8 @@ func (plugin *PluginForward) Eval(pluginsState *PluginsState, msg *dns.Msg) erro
178178
switch item.typ {
179179
case Explicit:
180180
server = item.servers[rand.Intn(len(item.servers))]
181-
pluginsState.serverName = server
182181
case Bootstrap:
183182
server = plugin.bootstrapResolvers[rand.Intn(len(plugin.bootstrapResolvers))]
184-
pluginsState.serverName = "[BOOTSTRAP]"
185183
case DHCP:
186184
const maxInconsistency = 9
187185
for _, dhcpdns := range plugin.dhcpdns {
@@ -198,8 +196,8 @@ func (plugin *PluginForward) Eval(pluginsState *PluginsState, msg *dns.Msg) erro
198196
dlog.Warn("DHCP didn't provide any DNS server")
199197
continue
200198
}
201-
pluginsState.serverName = "[DHCP]"
202199
}
200+
pluginsState.serverName = server
203201
if len(server) == 0 {
204202
continue
205203
}

0 commit comments

Comments
 (0)