From 7f19b3f78d4f1afc28419923c9ff77abfe78c18e Mon Sep 17 00:00:00 2001 From: Alexander Bersenev Date: Tue, 19 Nov 2019 05:22:49 +0500 Subject: [PATCH] more secure defaul settings --- config.py | 6 +++--- mtprotoproxy.py | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/config.py b/config.py index 5c0268d..00c3371 100644 --- a/config.py +++ b/config.py @@ -1,9 +1,9 @@ -PORT = 3256 +PORT = 443 # name -> secret (32 hex chars) USERS = { - "tg": "00000000000000000000000000000000", - "tg2": "0123456789abcdef0123456789abcdef" + "tg": "00000000000000000000000000000001", +# "tg2": "0123456789abcdef0123456789abcdef", } # Makes the proxy harder to detect diff --git a/mtprotoproxy.py b/mtprotoproxy.py index d3f4674..86705d9 100755 --- a/mtprotoproxy.py +++ b/mtprotoproxy.py @@ -2054,7 +2054,8 @@ def print_tg_info(): proxy_links.append({"user": user, "link": tls_link}) print("{}: {}".format(user, tls_link), flush=True) - if secret in ["00000000000000000000000000000000", "0123456789abcdef0123456789abcdef"]: + if secret in ["00000000000000000000000000000000", "0123456789abcdef0123456789abcdef", + "00000000000000000000000000000001"]: msg = "The default secret {} is used, this is not recommended".format(secret) print(msg, flush=True) random_secret = "".join(myrandom.choice("0123456789abcdef") for i in range(32))