New Feature: Surge as MTProto Server
Surge now can operate as an incoming MTProto proxy server for Telegram.
Please read manual for more information: https://manual.nssurge.com/others/mtproto.html
TL;DR
Using MTProto instead of SOCKS or VIF to take over Telegram can:
1. Telegram has a notorious SOCKS5 bug in which it can put an IPv6 destination address into an IPv4 request. The malformed destination causes a large number of invalid connection attempts to be sent to Surge. MTProto avoids this path entirely.
2. Force connections to Telegram servers over IPv6. Telegram’s IPv4 servers have a bug that can easily cause the connection to hang without responding. IPv6 nodes do not have this issue, and MTProto allows the intermediary proxy to determine the specific DC service address. Therefore, setting
Surge now can operate as an incoming MTProto proxy server for Telegram.
Please read manual for more information: https://manual.nssurge.com/others/mtproto.html
TL;DR
Using MTProto instead of SOCKS or VIF to take over Telegram can:
1. Telegram has a notorious SOCKS5 bug in which it can put an IPv6 destination address into an IPv4 request. The malformed destination causes a large number of invalid connection attempts to be sent to Surge. MTProto avoids this path entirely.
2. Force connections to Telegram servers over IPv6. Telegram’s IPv4 servers have a bug that can easily cause the connection to hang without responding. IPv6 nodes do not have this issue, and MTProto allows the intermediary proxy to determine the specific DC service address. Therefore, setting
ipv6=true can resolve this persistent problem. (The proxy server must support IPv6 forwarding.)