About this project

TG WS Proxy is a local MTProto proxy server for Telegram Desktop that speeds up Telegram by routing traffic through WebSocket connections. Data is transmitted encrypted, and no third-party servers are required for operation. The application runs an MTProto proxy on 127.0.0.1:1443, intercepts connections to Telegram IP addresses, extracts the DC ID from the MTProto obfuscation init packet, and establishes a WebSocket connection (TLS) to the corresponding DC via Telegram domains. If WebSocket is unavailable (302 redirect), it automatically switches to CfProxy or a direct TCP connection. Supported platforms include Windows (10+, ARM64, Windows 7), macOS (Intel and Apple Silicon), Linux, and Docker. For Windows, pre-built binaries are available that minimize to the system tray with a menu: open in Telegram, copy link, restart proxy, settings, open logs, and exit. The repository includes detailed instructions for setting up a Cloudflare Worker, Cloudflare domain, Telegram test environment, Fake TLS with upstream in Nginx, Tray application configuration files, and installation from source. The project is automatically built using PyInstaller and GitHub Actions.