mirror of
https://gitclone.com/github.com/MetaCubeX/Clash.Meta
synced 2025-02-23 04:53:29 +08:00
Fix: expand UDPSize to avoid resolving error (#139)
This commit is contained in:
parent
acf55a7f64
commit
63446da5fa
@ -234,6 +234,7 @@ func transform(servers []NameServer) []*nameserver {
|
|||||||
TLSConfig: &tls.Config{
|
TLSConfig: &tls.Config{
|
||||||
ClientSessionCache: globalSessionCache,
|
ClientSessionCache: globalSessionCache,
|
||||||
},
|
},
|
||||||
|
UDPSize: 4096,
|
||||||
},
|
},
|
||||||
Address: s.Addr,
|
Address: s.Addr,
|
||||||
})
|
})
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
package dns
|
package dns
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"net"
|
"net"
|
||||||
|
|
||||||
|
"github.com/Dreamacro/clash/log"
|
||||||
D "github.com/miekg/dns"
|
D "github.com/miekg/dns"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -20,6 +22,11 @@ func (s *Server) ServeDNS(w D.ResponseWriter, r *D.Msg) {
|
|||||||
msg, err := s.r.Exchange(r)
|
msg, err := s.r.Exchange(r)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
if len(r.Question) > 0 {
|
||||||
|
q := r.Question[0]
|
||||||
|
qString := fmt.Sprintf("%s %s %s", q.Name, D.Class(q.Qclass).String(), D.Type(q.Qtype).String())
|
||||||
|
log.Debugln("[DNS Server] Exchange %s failed: %v", qString, err)
|
||||||
|
}
|
||||||
D.HandleFailed(w, r)
|
D.HandleFailed(w, r)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user