fix: dns resolve in dialer
This commit is contained in:
parent
0321fe93cf
commit
be5ce6249f
1 changed files with 2 additions and 2 deletions
|
@ -314,7 +314,7 @@ func parseAddr(ctx context.Context, network, address string, preferResolver reso
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
if preferResolver == nil {
|
if preferResolver == nil {
|
||||||
ips, err = resolver.LookupIP(ctx, host)
|
ips, err = resolver.LookupIPProxyServerHost(ctx, host)
|
||||||
} else {
|
} else {
|
||||||
ips, err = resolver.LookupIPWithResolver(ctx, host, preferResolver)
|
ips, err = resolver.LookupIPWithResolver(ctx, host, preferResolver)
|
||||||
}
|
}
|
||||||
|
@ -328,7 +328,7 @@ func parseAddr(ctx context.Context, network, address string, preferResolver reso
|
||||||
func sortationAddr(ips []netip.Addr) (ipv4s, ipv6s []netip.Addr) {
|
func sortationAddr(ips []netip.Addr) (ipv4s, ipv6s []netip.Addr) {
|
||||||
for _, v := range ips {
|
for _, v := range ips {
|
||||||
if v.Is4() || v.Is4In6() {
|
if v.Is4() || v.Is4In6() {
|
||||||
ipv4s = append(ipv4s, v)
|
ipv4s = append(ipv4s, v.Unmap())
|
||||||
} else {
|
} else {
|
||||||
ipv6s = append(ipv6s, v)
|
ipv6s = append(ipv6s, v)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue