mirror of
https://github.com/m13253/dns-over-https.git
synced 2026-10-22 17:32:20 +00:00
Use dns.DefaultMsgSize instead of magic number 4096
This commit is contained in:
1 parent
dc14a70e9d
commit
874a3613e4
5 files changed
+5
-5
No files matched your search
@@ -72,7 +72,7 @@ func NewClient(conf *config) (c *Client, err error) {
|
||||
Addr: addr,
|
||||
Net: "udp",
|
||||
Handler: udpHandler,
|
||||
UDPSize: 4096,
|
||||
UDPSize: dns.DefaultMsgSize,
|
||||
})
|
||||
c.tcpServers = append(c.tcpServers, &dns.Server{
|
||||
Addr: addr,
|
||||
|
||||
+1
-1
@@ -73,7 +73,7 @@ func (c *Client) generateRequestIETF(w dns.ResponseWriter, r *dns.Msg, isTCP boo
|
||||
opt = new(dns.OPT)
|
||||
opt.Hdr.Name = "."
|
||||
opt.Hdr.Rrtype = dns.TypeOPT
|
||||
opt.SetUDPSize(4096)
|
||||
opt.SetUDPSize(dns.DefaultMsgSize)
|
||||
opt.SetDo(false)
|
||||
r.Extra = append(r.Extra, opt)
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user