From 74215066aa41bca2b387c7edce00d442a677c8b2 Mon Sep 17 00:00:00 2001 From: mzz2017 Date: Sat, 12 Dec 2020 13:26:29 +0800 Subject: [PATCH] fix: the ip should be 'To4' --- proxy/socks4/socks4.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proxy/socks4/socks4.go b/proxy/socks4/socks4.go index 87e626f..148e362 100644 --- a/proxy/socks4/socks4.go +++ b/proxy/socks4/socks4.go @@ -132,7 +132,7 @@ func (s *SOCKS4) connect(conn net.Conn, target string) error { if s.socks4a { // The client should set the first three bytes of DSTIP to NULL // and the last byte to a non-zero value. - ip = net.ParseIP("0.0.0.1") + ip = []byte{0, 0, 0, 1} bufSize += len(host) + 1 } else { ip, err = s.lookupIP(host)