From 81c8f1d29723342f0b9bfae20d2b3683d24d0805 Mon Sep 17 00:00:00 2001 From: David Dean Date: Tue, 26 Dec 2023 07:31:26 +1100 Subject: [PATCH] fix --- vendor/github.com/armon/go-socks5/resolver.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vendor/github.com/armon/go-socks5/resolver.go b/vendor/github.com/armon/go-socks5/resolver.go index 9c9b82d..45d4809 100644 --- a/vendor/github.com/armon/go-socks5/resolver.go +++ b/vendor/github.com/armon/go-socks5/resolver.go @@ -2,6 +2,7 @@ package socks5 import ( "context" + "net" "net/netip" ) @@ -14,10 +15,12 @@ type NameResolver interface { type DNSResolver struct{} func (d DNSResolver) Resolve(ctx context.Context, name string) (context.Context, netip.Addr, error) { - addr, err := netip.ParseAddr(name) + ipAddr, err := net.ResolveIPAddr("ip", name) if err != nil { return ctx, netip.Addr{}, err } + + addr := netip.MustParseAddr(ipAddr.String()) return ctx, addr, err }