From 4da41b4d61e4384c94e5c8dd028a7554ad479766 Mon Sep 17 00:00:00 2001 From: Lucus Date: Mon, 27 Nov 2017 12:27:40 +0700 Subject: [PATCH] Better var naming --- socks/socks.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/socks/socks.go b/socks/socks.go index 047ea867..b4b8369e 100644 --- a/socks/socks.go +++ b/socks/socks.go @@ -188,12 +188,12 @@ func Handshake(rw io.ReadWriter) (Addr, error) { if _, err := io.ReadFull(rw, buf[:3]); err != nil { return nil, err } - buf1 := buf[1] + cmd := buf[1] addr, err := readAddr(rw, buf) if err != nil { return nil, err } - switch buf1 { + switch cmd { case CmdConnect: _, err = rw.Write([]byte{5, 0, 0, 1, 0, 0, 0, 0, 0, 0}) // SOCKS v5, reply succeeded case CmdUDPAssociate: