mtprotoproxy icon indicating copy to clipboard operation
mtprotoproxy copied to clipboard

High ping and connection issues

Open FreedomPrevails opened this issue 6 years ago • 3 comments
trafficstars

Yesterday I noticed my telegram client which is configured to use my private mtprotoproxy (shared by like 10 people) is having difficulty connecting to proxy and ping is about 800ms. It was in "connecting ..." mode for a few seconds then got connected and then disconnected again and again. I checked the mtprotoproxy log and there was no warning messages about replay attacks or anything. completely silent. I checked the connections with netstat and noticed there are like 10-20 connections from my IP address in TIME_WAIT state, meaning the connections were being closed by mtprotoproxy (without printing any error or warning messages) I thought may be this has something to do with internet filtering so I installed https://github.com/seriyps/mtproto_proxy quickly and configured it to run on the same IP and same port with same secret and security settings and the issue was immediately resolved. The ping was reduced to 300ms and telegram client got connected with no issues. This issue happened after the commits of 21 Aug and before 23 Aug. Here is the config which I was using :

PORT = 443
USERS = {
    "tg":  "xxxxx"
}
SECURE_ONLY = True
TLS_ONLY = True
TLS_DOMAIN = "www.xxxx.com"
AD_TAG = "xxxx"
TO_TG_BUFSIZE = 655360
TO_CLT_BUFSIZE = 655360

Let me know if you need any additional info.

FreedomPrevails avatar Aug 23 '19 14:08 FreedomPrevails

Doest the bug reproducible with the latest version? I added more error printing

alexbers avatar Aug 23 '19 18:08 alexbers

Sorry, I am using erlang version right now. Could have this happened due to increasing the buffer sizes too much ?

FreedomPrevails avatar Aug 23 '19 20:08 FreedomPrevails

Thats unlikely caused by buffer sizes, since the number of people is no such big. The TCP should work with any buffer size

alexbers avatar Aug 23 '19 21:08 alexbers