armon / go-socks5

SOCKS5 server in Golang
MIT License
1.95k stars 524 forks source link

It seems to me the author lacks some basic understanding of how TCP works #33

Closed Jimmy-Z closed 4 years ago

Jimmy-Z commented 4 years ago

It seems this project attracts a lot of attention since this is the 1st hit if you search "go socks5", but be warned this is not what you're looking for, for example:

https://github.com/armon/go-socks5/blob/master/socks5.go#L127

I don't want go to details, but TCP is a stream protocol, there is no guarantee the first Read will only read the 1st byte magically, this is just plain wrong.

Jimmy-Z commented 4 years ago

Oops, my bad, just realized []byte{0} initialized a slice with len = 1.