Pull request: all: imp docs, names

Merge in DNS/adguard-home from imp-text to master

Squashed commit of the following:

commit fa7d64014fb2ac379e1c137eaccc7aefca86419d
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Fri Jun 11 17:09:00 2021 +0300

    all: imp docs, names
This commit is contained in:
Ainar Garipov
2021-06-18 18:13:36 +03:00
parent 3ee0369cb9
commit dab7b439d1
25 changed files with 110 additions and 112 deletions

View File

@@ -621,11 +621,11 @@ func (s *Server) handleTestUpstreamDNS(w http.ResponseWriter, r *http.Request) {
// Control flow:
// web
// -> dnsforward.handleDOH -> dnsforward.ServeHTTP
// -> 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 {
func (s *Server) handleDoH(w http.ResponseWriter, r *http.Request) {
if !s.conf.TLSAllowUnencryptedDoH && r.TLS == nil {
httpError(r, w, http.StatusNotFound, "Not Found")
return
}
@@ -653,6 +653,6 @@ func (s *Server) registerHandlers() {
// See go doc net/http.ServeMux.
//
// See also https://github.com/AdguardTeam/AdGuardHome/issues/2628.
s.conf.HTTPRegister("", "/dns-query", s.handleDOH)
s.conf.HTTPRegister("", "/dns-query/", s.handleDOH)
s.conf.HTTPRegister("", "/dns-query", s.handleDoH)
s.conf.HTTPRegister("", "/dns-query/", s.handleDoH)
}