fix header parsing
This commit is contained in:
parent
c225b808d6
commit
cadf0e11bb
1 changed files with 1 additions and 3 deletions
|
@ -200,14 +200,12 @@ class TCPRelayHandler(object):
|
||||||
return
|
return
|
||||||
|
|
||||||
elif cmd == CMD_CONNECT:
|
elif cmd == CMD_CONNECT:
|
||||||
|
# just trim VER CMD RSV
|
||||||
data = data[3:]
|
data = data[3:]
|
||||||
else:
|
else:
|
||||||
logging.error('unknown command %d', cmd)
|
logging.error('unknown command %d', cmd)
|
||||||
self.destroy()
|
self.destroy()
|
||||||
return
|
return
|
||||||
assert cmd == CMD_CONNECT
|
|
||||||
# just trim VER CMD RSV
|
|
||||||
data = data[3:]
|
|
||||||
header_result = parse_header(data)
|
header_result = parse_header(data)
|
||||||
if header_result is None:
|
if header_result is None:
|
||||||
raise Exception('can not parse header')
|
raise Exception('can not parse header')
|
||||||
|
|
Loading…
Add table
Reference in a new issue