mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2024-11-16 11:42:43 +08:00
fix: resolve ip of udp proxy error
This commit is contained in:
parent
c7c80cf90e
commit
843e1c0f27
|
@ -104,7 +104,7 @@ func resolveUDPAddrWithPrefer(network, address string, prefer C.DNSPrefer) (*net
|
|||
ip = fallback
|
||||
}
|
||||
default:
|
||||
// C.IPv4Prefer, C.DualStack and other
|
||||
// C.IPv4Prefer, C.DualStack and other
|
||||
var ips []netip.Addr
|
||||
ips, err = resolver.ResolveAllIPProxyServerHost(host)
|
||||
var fallback netip.Addr
|
||||
|
@ -119,7 +119,10 @@ func resolveUDPAddrWithPrefer(network, address string, prefer C.DNSPrefer) (*net
|
|||
}
|
||||
}
|
||||
}
|
||||
ip = fallback
|
||||
|
||||
if !ip.IsValid() && fallback.IsValid() {
|
||||
ip = fallback
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user