mirror of
https://github.com/MetaCubeX/Clash.Meta.git
synced 2025-04-05 14:13:30 +03:00
fix: resolve ip of udp proxy error
This commit is contained in:
parent
7f197ede51
commit
d69e0bce4a
1 changed files with 5 additions and 2 deletions
|
@ -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…
Add table
Reference in a new issue