go-socks5
go-socks5 copied to clipboard
Fix panic when target.LocalAddr() is not *net.TCPAddr
This happens when you use custom dialer that returns custom net.Conn
that returns a non-*net.TCPAddr
net.Addr
for LocalAddr()
calls.
For example, if you dial through an SSH connection, it might be difficult to figure out remote local address, so you return a stub instead.