From 780dbc5866fac612f6c878137423e0422d168ec3 Mon Sep 17 00:00:00 2001 From: Alexander Bersenev Date: Thu, 20 Sep 2018 04:03:32 +0500 Subject: [PATCH] document all advanced options --- mtprotoproxy.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/mtprotoproxy.py b/mtprotoproxy.py index 82691f4..2787d51 100755 --- a/mtprotoproxy.py +++ b/mtprotoproxy.py @@ -144,20 +144,31 @@ USERS = config["USERS"] AD_TAG = bytes.fromhex(config.get("AD_TAG", "")) # load advanced settings +# if IPv6 avaliable, use it by default PREFER_IPV6 = config.get("PREFER_IPV6", socket.has_ipv6) # disables tg->client trafic reencryption, faster but less secure FAST_MODE = config.get("FAST_MODE", True) # doesn't allow to connect in not-secure mode SECURE_ONLY = config.get("SECURE_ONLY", False) +# delay in seconds between stats printing STATS_PRINT_PERIOD = config.get("STATS_PRINT_PERIOD", 600) +# delay in seconds between middle proxy info updates PROXY_INFO_UPDATE_PERIOD = config.get("PROXY_INFO_UPDATE_PERIOD", 24*60*60) +# max socket buffer size to the client direction, the more the faster, but more RAM hungry TO_CLT_BUFSIZE = config.get("TO_CLT_BUFSIZE", 16384) +# max socket buffer size to the telegram servers direction TO_TG_BUFSIZE = config.get("TO_TG_BUFSIZE", 65536) +# keepalive period for clients in secs CLIENT_KEEPALIVE = config.get("CLIENT_KEEPALIVE", 10*60) +# drop client after this timeout if the handshake fail CLIENT_HANDSHAKE_TIMEOUT = config.get("CLIENT_HANDSHAKE_TIMEOUT", 10) +# if client doesn't confirm data for this number of seconds, it is dropped CLIENT_ACK_TIMEOUT = config.get("CLIENT_ACK_TIMEOUT", 5*60) +# telegram servers connect timeout in seconds TG_CONNECT_TIMEOUT = config.get("TG_CONNECT_TIMEOUT", 10) +# listen address for IPv4 LISTEN_ADDR_IPV4 = config.get("LISTEN_ADDR_IPV4", "0.0.0.0") +# listen address for IPv6 LISTEN_ADDR_IPV6 = config.get("LISTEN_ADDR_IPV6", "::") TG_DATACENTER_PORT = 443