by codedokode · 8y ago · 0 comments
So even if hosting providers like Amazon or Google will refuse to work with Telegram (because they don't want to get blocked in Russia for this), it will be difficult to find and ban all people hosting proxy servers.
Sadly, these proxy servers can be used only for connecting to Telegram.
The link looks like tg://proxy?arguments
Proxy uses MTProto, the same protocol that client uses to talk to the server. It is described here: https://core.telegram.org/mtproto The client connects to the proxy as if it were a server, and proxy just relays encrypted packets to the real server. Also, the client may wrap packets with an obfuscation layer (described below) to prevent signature detection. In exchange, the server tells the client to display a channel of the proxy owner in the contact list while proxy is being used.
Proxy source on Github (with Docker image link): https://github.com/TelegramMessenger/MTProxy
Bing-translated Russian article about this proxy: https://www.microsofttranslator.com/bv.aspx?from=&to=en&a=ht...
Bing-translated review of methods Telegram uses to bypass filtering by an independent researcher: https://www.microsofttranslator.com/bv.aspx?from=&to=en&a=ht...
And a little more on obfuscation: https://blog.susanka.eu/how-telegram-obfuscates-its-mtproto-...
This article mentions that Telegram uses modified version of obfuscated2 protocol. To detect it the DPI just needs to decode all packets using AES but that would require a lot of CPU power which ISPs currently don't have. Initially all encrypted packets had fixed length so some ISPs started filtering packets by length (of course accidentally filtering non-Telegram packets too but who cares), and Telegram added random padding to prevent this.