Merge: + new query logs API
* commit '59c4a2886a97143e3a36912ec895dc1a06be88cc': openapi If there are no more older entries, `"oldest":""` is returned. fix search by "whitelisted", "rewritten" doc fix whois test + "dot" openapi * minor + client_proto * openapi + new query logs API
This commit is contained in:
@@ -400,6 +400,11 @@ func checkDNS(input string, bootstrap []string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Control flow:
|
||||
// web
|
||||
// -> dnsforward.handleDOH -> dnsforward.ServeHTTP
|
||||
// -> proxy.ServeHTTP -> proxy.handleDNSRequest
|
||||
// -> dnsforward.handleDNSRequest
|
||||
func (s *Server) handleDOH(w http.ResponseWriter, r *http.Request) {
|
||||
if !s.conf.TLSAllowUnencryptedDOH && r.TLS == nil {
|
||||
httpError(r, w, http.StatusNotFound, "Not Found")
|
||||
|
||||
@@ -39,6 +39,13 @@ func processQueryLogsAndStats(ctx *dnsContext) int {
|
||||
Elapsed: elapsed,
|
||||
ClientIP: getIP(d.Addr),
|
||||
}
|
||||
|
||||
if d.Proto == "https" {
|
||||
p.ClientProto = "doh"
|
||||
} else if d.Proto == "tls" {
|
||||
p.ClientProto = "dot"
|
||||
}
|
||||
|
||||
if d.Upstream != nil {
|
||||
p.Upstream = d.Upstream.Address()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user