Fix processing SOCKS5 METHOD selection message

This commit is contained in:
BM-NBtA54BMK4ps9ZRUDiug4VtPKPpYsTp5 2018-02-22 06:39:28 +00:00
parent 1184b23223
commit 1e46ec49da
No known key found for this signature in database
GPG Key ID: A0BD59BD8533BAF1

View File

@ -39,7 +39,7 @@ class Socks5(Proxy):
return True return True
def state_auth_1(self): def state_auth_1(self):
ret = struct.unpack('BB', self.read_buf) ret = struct.unpack('BB', self.read_buf[0:2])
if ret[0] != 5: if ret[0] != 5:
# general error # general error
raise GeneralProxyError(1) raise GeneralProxyError(1)