Skip to content

Commit

Permalink
Merge pull request shadowsocks#79 from mohuishou/master
Browse files Browse the repository at this point in the history
  • Loading branch information
riobard authored Nov 26, 2017
2 parents c2e7710 + c033587 commit 87b55c9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion socks/socks.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,11 +188,12 @@ func Handshake(rw io.ReadWriter) (Addr, error) {
if _, err := io.ReadFull(rw, buf[:3]); err != nil {
return nil, err
}
buf1 := buf[1]
addr, err := readAddr(rw, buf)
if err != nil {
return nil, err
}
switch buf[1] {
switch buf1 {
case CmdConnect:
_, err = rw.Write([]byte{5, 0, 0, 1, 0, 0, 0, 0, 0, 0}) // SOCKS v5, reply succeeded
case CmdUDPAssociate:
Expand Down

0 comments on commit 87b55c9

Please sign in to comment.