(Very) fast Telegram MTProxy in Go with TLS fronting.
-
High-Performance Networking
- Event-driven architecture with gnet (epoll/kqueue)
- 512KB TCP buffers for maximum throughput
TCP_NODELAYandTCP_QUICKACKfor low latencySO_REUSEPORTfor kernel-level load balancing- Buffer pooling to minimize allocations
-
TLS Fronting (inspired by Telemt)
- Fetches real certificates from mask host
- Forwards unrecognized clients to mask host (probe resistance)
- Indistinguishable from legitimate HTTPS traffic
-
Multi-User Support
- Multiple named secrets (per-user tracking)
git clone https://github.com/scratch-net/telego.git
cd telego
make build- Generate a secret:
telego generate www.google.com- Create
config.toml:
bind-to = "0.0.0.0:443"
[secrets]
user1 = "0123456789abcdef0123456789abcdef"
[tls-fronting]
mask-host = "www.google.com"- Run:
telego run -c config.toml -lThe -l flag prints Telegram proxy links with auto-detected public IP.
docker run -d -p 443:443 -v /path/to/config.toml:/config.toml scratchnet/telego:latestOr build locally:
docker build -t telego .make install CONFIG=/etc/telego/config.toml
systemctl enable telego
systemctl start telegotelego run -c config.toml Run proxy server
-c, --config Path to config file (required)
-b, --bind Override bind address
-l, --link Print Telegram links on startup
telego generate <host> Generate a new secret key
telego version Show version
PRs are welcome. Note that Middle-End (ME) protocol and ad-tags will not be supported.
Apache License 2.0
This project was inspired by and builds upon ideas from:
- mtg by Sergey Arkhipov - The original Go MTProxy implementation
- mtprotoproxy by Alexander Borzunov - Python reference implementation
- telemt - High-performance Rust MTProxy implementation