mirror of
https://github.com/DNSCrypt/dnscrypt-proxy.git
synced 2025-01-19 03:00:29 +01:00
Don't log a server name for synthetic responses and cloaking
This commit is contained in:
parent
23aa3dd57d
commit
3d3b5bbc00
@ -66,6 +66,11 @@ func (plugin *PluginQueryLog) Eval(pluginsState *PluginsState, msg *dns.Msg) err
|
||||
clientIPStr = (*pluginsState.clientAddr).(*net.TCPAddr).IP.String()
|
||||
}
|
||||
qName := StripTrailingDot(question.Name)
|
||||
|
||||
switch pluginsState.returnCode {
|
||||
case PluginsReturnCodeSynth, PluginsReturnCodeCloak, PluginsReturnCodeParseError:
|
||||
pluginsState.serverName = "-"
|
||||
}
|
||||
returnCode, ok := PluginsReturnCodeToString[pluginsState.returnCode]
|
||||
if !ok {
|
||||
returnCode = string(returnCode)
|
||||
@ -75,7 +80,6 @@ func (plugin *PluginQueryLog) Eval(pluginsState *PluginsState, msg *dns.Msg) err
|
||||
if !pluginsState.requestStart.IsZero() && !pluginsState.requestEnd.IsZero() {
|
||||
requestDuration = pluginsState.requestEnd.Sub(pluginsState.requestStart)
|
||||
}
|
||||
|
||||
var line string
|
||||
if plugin.format == "tsv" {
|
||||
now := time.Now()
|
||||
|
Loading…
Reference in New Issue
Block a user