diff --git a/config.py b/config.py index 0e578bb..d3c423a 100644 --- a/config.py +++ b/config.py @@ -15,4 +15,4 @@ SECURE_ONLY = True # TLS_ONLY = True # Tag for advertising, obtainable from @MTProxybot -# AD_TAG = "3c09c680b76ee91a4c25ad51f742267d" \ No newline at end of file +# AD_TAG = "3c09c680b76ee91a4c25ad51f742267d" diff --git a/mtprotoproxy.py b/mtprotoproxy.py index 80d597a..dbcfbaf 100755 --- a/mtprotoproxy.py +++ b/mtprotoproxy.py @@ -1424,7 +1424,7 @@ def print_tg_info(): print("{}: tg://proxy?{}".format(user, params_encodeded), flush=True) tls_secret = bytes.fromhex("ee" + secret) + config.TLS_DOMAIN.encode() - tls_secret_base64 = base64.b64encode(tls_secret) + tls_secret_base64 = base64.urlsafe_b64encode(tls_secret) params = {"server": ip, "port": config.PORT, "secret": tls_secret_base64} params_encodeded = urllib.parse.urlencode(params, safe=':') print("{}: tg://proxy?{} (experimental)".format(user, params_encodeded), flush=True)