From 51c8d6827135339b2636d1036aab41fcb635b8f8 Mon Sep 17 00:00:00 2001 From: Alexander Bersenev Date: Sun, 8 Sep 2019 01:09:44 +0500 Subject: [PATCH] disable the first bad packet heuristics if the tls-only mode activated, it has time-based protection instead --- mtprotoproxy.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mtprotoproxy.py b/mtprotoproxy.py index 075faea..5c6dec1 100755 --- a/mtprotoproxy.py +++ b/mtprotoproxy.py @@ -160,10 +160,10 @@ def init_config(): conf_dict.setdefault("USER_DATA_QUOTA", {}) # length of used handshake randoms for active fingerprinting protection, zero to disable - conf_dict.setdefault("REPLAY_CHECK_LEN", 32768) + conf_dict.setdefault("REPLAY_CHECK_LEN", 65536) # block bad first packets to even more protect against replay-based fingerprinting - conf_dict.setdefault("BLOCK_IF_FIRST_PKT_BAD", True) + conf_dict.setdefault("BLOCK_IF_FIRST_PKT_BAD", not conf_dict["TLS_ONLY"]) # delay in seconds between stats printing conf_dict.setdefault("STATS_PRINT_PERIOD", 600)