fix conn termination null data
This commit is contained in:
parent
f04c45a43d
commit
0e340dec5e
1 changed files with 1 additions and 1 deletions
2
local.py
2
local.py
|
@ -103,7 +103,7 @@ class Socks5Server(SocketServer.StreamRequestHandler):
|
||||||
sock = self.connection
|
sock = self.connection
|
||||||
sock.recv(262)
|
sock.recv(262)
|
||||||
sock.send("\x05\x00")
|
sock.send("\x05\x00")
|
||||||
data = self.rfile.read(4)
|
data = self.rfile.read(4) or '\x00' * 4
|
||||||
mode = ord(data[1])
|
mode = ord(data[1])
|
||||||
if mode != 1:
|
if mode != 1:
|
||||||
logging.warn('mode != 1')
|
logging.warn('mode != 1')
|
||||||
|
|
Loading…
Add table
Reference in a new issue