DNS DoH: Use EDNS0 with 100-300 padding by default (body padding)

https://github.com/XTLS/Xray-core/pull/4516#issuecomment-2744093003
This commit is contained in:
RPRX 2025-03-21 20:13:09 +00:00 committed by GitHub
parent b585b26f29
commit 607c2a6d31
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 51 additions and 39 deletions

View file

@ -160,7 +160,7 @@ func (s *QUICNameServer) newReqID() uint16 {
func (s *QUICNameServer) sendQuery(ctx context.Context, domain string, clientIP net.IP, option dns_feature.IPOption) {
errors.LogInfo(ctx, s.name, " querying: ", domain)
reqs := buildReqMsgs(domain, option, s.newReqID, genEDNS0Options(clientIP))
reqs := buildReqMsgs(domain, option, s.newReqID, genEDNS0Options(clientIP, 0))
var deadline time.Time
if d, ok := ctx.Deadline(); ok {