Browse Source

fix header parsing

auth
clowwindy 11 years ago
parent
commit
cadf0e11bb
  1. 4
      shadowsocks/tcprelay.py

4
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')

Loading…
Cancel
Save