This commit is contained in:
Simon Zolin 2020-05-29 11:46:37 +03:00
parent 78648649fe
commit bccb939346
4 changed files with 9 additions and 4 deletions

View File

@ -1276,7 +1276,7 @@ Response:
"upstream":"...", // Upstream URL starting with tcp://, tls://, https://, or with an IP address
"answer_dnssec": true,
"client":"127.0.0.1",
"client_proto": "" (plain) | "doh",
"client_proto": "" (plain) | "doh" | "dot",
"elapsedMs":"0.098403",
"filterId":1,
"question":{

View File

@ -40,8 +40,10 @@ func processQueryLogsAndStats(ctx *dnsContext) int {
ClientIP: getIP(d.Addr),
}
if d.HTTPRequest != nil {
if d.Proto == "https" {
p.ClientProto = "doh"
} else if d.Proto == "tls" {
p.ClientProto = "dot"
}
if d.Upstream != nil {

View File

@ -1422,7 +1422,10 @@ components:
type: string
example: 192.168.0.1
client_proto:
type: string
enum:
- dot
- doh
- ""
elapsedMs:
type: string
example: "54.023928"

View File

@ -48,7 +48,7 @@ type AddParams struct {
Elapsed time.Duration // Time spent for processing the request
ClientIP net.IP
Upstream string // Upstream server URL
ClientProto string // Protocol for the client connection: "" (plain), "doh"
ClientProto string // Protocol for the client connection: "" (plain), "doh", "dot"
}
// New - create a new instance of the query log