Skip to content

Commit

Permalink
more secure defaul settings
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbers committed Nov 19, 2019
1 parent 0549fd7 commit 7f19b3f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions config.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 2 additions & 1 deletion mtprotoproxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 7f19b3f

Please sign in to comment.