shadowsocks / go-shadowsocks2

Modern Shadowsocks in Go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TCP Redirect doesn't work on Macos

ssrshz opened this issue · comments

OS: Macos 10.14.6
Go Version: go1.16.12 darwin/amd64

in order to figure it out,i insert the log here

if _, _, errno := syscall.Syscall(syscall.SYS_IOCTL, uintptr(fd), DIOCNATLOOK, uintptr(unsafe.Pointer(&nl))); errno != 0 > {
   fmt.Println("syscall errno: ", errno)
   return nil, errno
  }

Error info:
~# ./shadowsocks2-macos-amd64 -c 'ss://AEAD_CHACHA20_POLY1305:12345@127.0.0.1:1080' -redir :12345 -verbose
syscall errno: invalid argument
2022/01/07 09:22:37 tcp.go:72: failed to get target address: invalid argument

must be full addr