mirror of
https://gitclone.com/github.com/MetaCubeX/Clash.Meta
synced 2025-05-24 02:48:02 +08:00
fix: truncated UDP response in system dns
https://github.com/MetaCubeX/mihomo/issues/2031
This commit is contained in:
parent
2116640886
commit
6e35cf9399
@ -77,7 +77,7 @@ func (c *client) ExchangeContext(ctx context.Context, m *D.Msg) (*D.Msg, error)
|
||||
msg, _, err := c.Client.ExchangeWithConn(m, dConn)
|
||||
|
||||
// Resolvers MUST resend queries over TCP if they receive a truncated UDP response (with TC=1 set)!
|
||||
if msg != nil && msg.Truncated && c.Client.Net == "" {
|
||||
if msg != nil && msg.Truncated && network == "udp" {
|
||||
tcpClient := *c.Client // copy a client
|
||||
tcpClient.Net = "tcp"
|
||||
network = "tcp"
|
||||
|
Loading…
Reference in New Issue
Block a user