alexbers / mtprotoproxy

Async MTProto proxy for Telegram
MIT License
1.59k stars 351 forks source link

Telegram X error 400 #223

Open MAHDITX opened 4 years ago

MAHDITX commented 4 years ago

I sometimes get this error on Telegram X

error (400: response hash mismatch)

Telegram X support gave me this link : https://github.com/tdlib/td/issues/292

What do I need to change to solve this problem?

alexbers commented 4 years ago

Ok, I'll try to dig into that issue, thanks

someoneIG commented 4 years ago

I also saw this error a lot

alexbers commented 4 years ago

I am trying to reproduce the issue and it seems the proxy working for me. Could you please provide more details to reproduce the bug:

someoneIG commented 4 years ago

My OS is Android 10, Telegram X v0.22.8.1361 ee mode (TLS) Yes, I use the latest version and I don't use Docker No, there is nothing interesting in the log

proxy works on official Telegram and Plus Most of the time, when I open Telegram after a few hours, I see this error (response hash mismatch)

After connecting to a proxy with the official source or Erlang that error is cleared and I can connect to python proxy

Also, my friends with Telegram X have the same problem with different phones and ISPs

alexbers commented 4 years ago

could you please try to add IGNORE_TIME_SKEW=True in the end of config.py and restart the proxy. Does the problem persists?

MAHDITX commented 4 years ago

could you please try to add IGNORE_TIME_SKEW=True in the end of config.py and restart the proxy. Does the problem persists?

I tested it and it works this "TIME_SKEW" does it effect on filtering?

alexbers commented 4 years ago

some clients on telegram X are trying to reach the proxy with the bad time. This is detected as a replay-attack to detect the proxy. The IGNORE_TIME_SKEW=False disables this protection

skipik commented 4 years ago

The IGNORE_TIME_SKEW=False disables this protection

Actually =True in this case disables the protection. I think you misspelled :-)

alexbers commented 4 years ago

Yes, you are right