Skip to content

Commit

Permalink
adjust
Browse files Browse the repository at this point in the history
  • Loading branch information
breakwa11 committed Jul 27, 2017
1 parent e8b4bb0 commit e3ec6bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion shadowsocks/obfsplugin/auth_chain.py
Expand Up @@ -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

Expand Down

0 comments on commit e3ec6bb

Please sign in to comment.