mtg: "bad time"error from Telegram X client
I have been trying to set up a mtproxy server using mtg, and encountered this problem:
After mtg started running, I tried to connect to it using a Telegram X android client, it was successful, however after a few minutes, the client was unable to connect. At the same time, server log gave this warning:
{"level":"warn","ts":1595240548.4428384,"logger":"proxy","msg":"Cannot perform client handshake","connection_id":"dc174eaae139afab","error":"failed tls handshake: bad time"}
Client gave an error 400 response hash mismatch
I saw https://github.com/9seconds/mtg/issues/132, so I have been experimenting a little bit. First of all, since you mentioned it was a bug introduced in a commit in Feb, I tried a Telegram X version from Jan, and it produced the same error.
Then I tried to use the official mtproxy code to build a binary, that works flawlessly.
Then I tried mtg with the latest Telegram android client (non-X version), and it works flawlessly too.
I also tried the python version (https://github.com/alexbers/mtprotoproxy) And it works just fine.
In summary: Telegram + mtg =fine Telegram X + original mtproxy = fine Telegram X + python mtproxy = fine Telegram X (old or new verison) + mtg = bad time error
P.S. This problem only occurs when using faketls mode. Also, successfully connecting to telegram server via other functioning proxy or VPN would somehow reset the situation, making this proxy usable again (for a couple of minutes, until same situation happens again).
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 17 (7 by maintainers)
Oh, good to know. Thank you a lot!
Update:
I reported to Telegram X’s developer, and they said it was a known issue, but they did not know it also affect faketls mtproxy.
Sorry for wasting your time, I thought it was mtg’s issue because original and python works for me…