From cadf0e11bb11d8263089b5f9d0c66abc6f611cf2 Mon Sep 17 00:00:00 2001 From: clowwindy Date: Mon, 2 Jun 2014 13:11:20 +0800 Subject: [PATCH] fix header parsing --- shadowsocks/tcprelay.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/shadowsocks/tcprelay.py b/shadowsocks/tcprelay.py index 85a5d90..8ada73d 100644 --- a/shadowsocks/tcprelay.py +++ b/shadowsocks/tcprelay.py @@ -200,14 +200,12 @@ class TCPRelayHandler(object): return elif cmd == CMD_CONNECT: + # just trim VER CMD RSV data = data[3:] else: logging.error('unknown command %d', cmd) self.destroy() return - assert cmd == CMD_CONNECT - # just trim VER CMD RSV - data = data[3:] header_result = parse_header(data) if header_result is None: raise Exception('can not parse header')