telEgo Combines MTProxy and WEB Proxy on Single Port 443 with TLS Fronting

telEgo, a Go-based Telegram MTProxy implementation using the gnet network engine, now supports all four WEB proxy transport modes alongside traditional MTProxy connections on the same public port 443. The solution allows FakeTLS with ee secrets, Obfuscated2 with dd secrets, and WEB carriers including https, https-lanes, websocket, and websocket-lanes without requiring separate ports or secret changes. telEgo performs handshake detection, forwards ordinary TLS traffic to Nginx on a private port using PROXY protocol v2, and routes authenticated WEB streams back to the internal MTProxy backend. The setup uses Docker Compose with separate containers for telEgo, Nginx, and certificate management via Certbot, keeping ports 8080, 8443, and 8444 internal. Existing MTProxy links continue to function while new WEB proxy links become available for Telegram Desktop. The configuration supports Prometheus metrics, connection limits, and automatic certificate renewal through systemd timers.

HabrTranslated from Russian

Read at source

telEgo is a fast Telegram proxy written in Go that leverages the gnet library for epoll and kqueue-based networking. In its latest release, the tool added support for all four WEB proxy transport modes while continuing to handle classic MTProxy traffic.

Telegram Desktop can now connect through WEB proxies. From the outside, the connection appears as ordinary HTTPS traffic to a website, which then serves as the transport between the client and the proxy.

How MTProxy and WEB Share Port 443

The architecture keeps only one public listener on port 443. telEgo inspects incoming connections: valid MTProxy handshakes are handled directly, while regular TLS sessions are spliced to Nginx on private port 8443 using PROXY protocol v2. Nginx terminates the real TLS certificate, serves the website, and forwards authenticated WEB carrier requests to the internal telEgo WEB listener on port 8080.

Four carrier modes are available: https, https-lanes, websocket, and websocket-lanes. The https-lanes mode uses separate HTTP/2 channels per Telegram stream, while websocket-lanes creates an individual WebSocket per stream.

Deployment with Docker Compose

The example repository provides docker-compose.yml, telego.toml, and an Nginx configuration. Users generate a base secret with the Docker image, configure the [web-proxy] section, obtain a Let's Encrypt certificate via standalone mode, and start the stack. Only port 443 is exposed publicly for telEgo.

Existing ee and dd MTProxy links remain valid. WEB links are generated automatically from the same secret and can be added directly in Telegram Desktop.

The setup requires a VPS with open ports 80 and 443, a domain with an A record, and Docker with Compose. When an existing Nginx instance is present, its server blocks must be adapted to listen on private ports only.

Meridian digestThe week's most consequential security stories, distilled into one briefing.See the digest

More in Privacy & Surveillance

Maximizing iPhone Privacy: Essential Settings to Enable, Disable, and Verify Immediately
Top 10 Secure DNS Servers for Privacy, Threat Blocking and Ad Filtering in 2026
WebRTC IP Leaks Explained: Why Disabling the Protocol Harms Anonymity in Anti-Detect Browsers