Merge pull request #78 from leiless/DNSSEC-OK

[JSON-DOH] Honor DNSSEC OK flag for incoming DNS requests
This commit is contained in:
Star Brilliant
2020-04-19 14:49:55 +08:00
committed by GitHub
2 changed files with 6 additions and 0 deletions

3
.gitignore vendored
View File

@@ -3,6 +3,9 @@
*.dll
*.so
*.dylib
darwin-wrapper/doh-logger
doh-client/doh-client
doh-server/doh-server
# Test binary, build with `go test -c`
*.test

View File

@@ -67,6 +67,9 @@ func (c *Client) generateRequestGoogle(ctx context.Context, w dns.ResponseWriter
udpSize := uint16(512)
if opt := r.IsEdns0(); opt != nil {
udpSize = opt.UDPSize()
if opt.Do() {
requestURL += "&do=1"
}
}
ednsClientAddress, ednsClientNetmask := c.findClientIP(w, r)