mtg is a lightweight MTPROTO proxy for Telegram designed to enable access in restricted or censored environments.
The tool addresses the problem of connecting to Telegram when network access is blocked or monitored. It works by proxying MTPROTO connections while employing techniques to evade detection. Domain fronting allows the proxy to fall back to serving legitimate website content if a request fails, making the connection appear to be accessing a real website rather than Telegram. The proxy also implements a doppelganger mode that mimics the TLS traffic patterns of the website it fronts, artificially introducing delays and chunking patterns to match the statistical characteristics of genuine traffic from that site, making detection by censors significantly harder.
The tool suits operators who need a minimal, unbloated proxy capable of handling around ten to twenty thousand simultaneous connections without user management overhead. It prioritizes simplicity and resource efficiency over feature completeness. The README acknowledges that other MTPROTO proxy implementations exist with feature parity on basics like replay attack protection and domain fronting, and notes that if adtag support for channel promotion is required, the telemt project is recommended instead. mtg deliberately omits adtag support, viewing its complex setup requirements and performance trade-offs as unreasonable for the proxy's core purpose.
The project shows active maintenance with breaking changes between major versions that require users to review upgrade documentation. Development focuses on practical deployment concerns, with emphasis on resource reuse patterns and zero-waste memory management rather than minimizing absolute memory footprint.