From e3ec6bb5f81a8672db21ddd69bcc77bb26a81a76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=B4=E5=A8=83=E9=85=B1?= Date: Thu, 27 Jul 2017 14:20:57 +0800 Subject: [PATCH] adjust --- shadowsocks/obfsplugin/auth_chain.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shadowsocks/obfsplugin/auth_chain.py b/shadowsocks/obfsplugin/auth_chain.py index 67a2a7e64..8e7d5c7f2 100644 --- a/shadowsocks/obfsplugin/auth_chain.py +++ b/shadowsocks/obfsplugin/auth_chain.py @@ -671,7 +671,7 @@ def rnd_data_len(self, buf_size, last_hash, random): return 0 random.init_from_bin_len(last_hash, buf_size) pos = bisect.bisect_left(self.data_size_list, buf_size + self.server_info.overhead) - final_pos = pos + random.next() % (len(self.data_size_list) * 2) + final_pos = pos + random.next() % (len(self.data_size_list) + int(len(self.data_size_list) / 2)) if final_pos < len(self.data_size_list): return self.data_size_list[final_pos] - buf_size - self.server_info.overhead