From 293a937501e0d982af9bedf5c098947b5f5b86d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=B4=E5=A8=83=E9=85=B1?= Date: Mon, 3 Oct 2016 14:04:48 +0800 Subject: [PATCH] wait extra data --- shadowsocks/obfsplugin/auth.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/shadowsocks/obfsplugin/auth.py b/shadowsocks/obfsplugin/auth.py index f96ab3b..3d82c93 100644 --- a/shadowsocks/obfsplugin/auth.py +++ b/shadowsocks/obfsplugin/auth.py @@ -1485,6 +1485,9 @@ class auth_aes128_sha1(auth_base): mac_key = self.server_info.recv_iv + self.server_info.key sha1data = hmac.new(mac_key, self.recv_buf[:3], self.hashfunc).digest()[:4] if sha1data != self.recv_buf[3:7]: + if self.method == self.no_compatible_method: + if len(self.recv_buf) < 31 + self.extra_wait_size: + return (b'', False) return self.not_match_return(self.recv_buf) if len(self.recv_buf) < 31: