fix: the ip should be 'To4'

This commit is contained in:
mzz2017 2020-12-12 13:26:29 +08:00
parent 121f3680e2
commit 74215066aa

View File

@ -132,7 +132,7 @@ func (s *SOCKS4) connect(conn net.Conn, target string) error {
if s.socks4a { if s.socks4a {
// The client should set the first three bytes of DSTIP to NULL // The client should set the first three bytes of DSTIP to NULL
// and the last byte to a non-zero value. // 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 bufSize += len(host) + 1
} else { } else {
ip, err = s.lookupIP(host) ip, err = s.lookupIP(host)