From be5ce6249f1dd84cccbc0b4d9296badf62821456 Mon Sep 17 00:00:00 2001 From: wwqgtxx Date: Sun, 26 Feb 2023 13:52:10 +0800 Subject: [PATCH] fix: dns resolve in dialer --- component/dialer/dialer.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/component/dialer/dialer.go b/component/dialer/dialer.go index b9c897d2..3d1be1d6 100644 --- a/component/dialer/dialer.go +++ b/component/dialer/dialer.go @@ -314,7 +314,7 @@ func parseAddr(ctx context.Context, network, address string, preferResolver reso } default: if preferResolver == nil { - ips, err = resolver.LookupIP(ctx, host) + ips, err = resolver.LookupIPProxyServerHost(ctx, host) } else { 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) { for _, v := range ips { if v.Is4() || v.Is4In6() { - ipv4s = append(ipv4s, v) + ipv4s = append(ipv4s, v.Unmap()) } else { ipv6s = append(ipv6s, v) }