fix: udp dial support ip4p (#1377)

This commit is contained in:
HiMetre
2025-04-11 09:20:58 +08:00
committed by wwqgtxx
parent 8085c68b6d
commit 7a260f7bcf
4 changed files with 41 additions and 24 deletions

View File

@@ -54,6 +54,8 @@ func resolveUDPAddr(ctx context.Context, network, address string, prefer C.DNSPr
if err != nil {
return nil, err
}
ip, port = resolver.LookupIP4P(ip, port)
return net.ResolveUDPAddr(network, net.JoinHostPort(ip.String(), port))
}