Files
telemt/README.md
T

104 lines
3.3 KiB
Markdown
Raw Normal View History

2025-12-30 21:29:04 +03:00
# Telemt - MTProxy on Rust + Tokio
2025-12-30 22:18:22 +03:00
**Telemt** is a fast, secure, and feature-rich server written in Rust: it fully implements the official Telegram proxy algo and adds many production-ready improvements such as connection pooling, replay protection, detailed statistics, masking from "prying" eyes
2025-12-30 21:29:04 +03:00
# GOTO
- [Features](#features)
- [Quick Start Guide](#quick-start-guide)
- [Build](#build)
- [How to use?](#how-to-use)
- [Systemd Method](#telemt-via-systemd)
2025-12-30 22:18:22 +03:00
- [Why Rust?](#why-rust)
2025-12-30 21:29:04 +03:00
## Features
- Full support for all official MTProto proxy modes:
- Classic
- Secure - with `dd` prefix
- Fake TLS - with `ee` prefix + SNI fronting
- Replay attack protection
- Optional traffic masking: forward unrecognized connections to a real web server, e.g. GitHub 🤪
- Configurable keepalives + timeouts + IPv6 and "Fast Mode"
- Graceful shutdown on Ctrl+C
- Extensive logging via `trace` and `debug` with `RUST_LOG` method
## Quick Start Guide
### Build
```bash
# Cloning repo
git clone https://github.com/telemt/telemt
# Changing Directory to telemt
cd telemt
# Starting Release Build
cargo build --release
2025-12-30 21:31:54 +03:00
# Move to /bin
mv ./target/release/telemt /bin
# Make executable
chmod +x /bin/telemt
2025-12-30 21:29:04 +03:00
# Lets go!
2025-12-30 21:31:54 +03:00
telemt config.toml
2025-12-30 21:29:04 +03:00
```
## How to use?
### Telemt via Systemd
1. Place your config to /etc/telemt.toml
2. Create service on /etc/systemd/system/telemt.service
```bash
[Unit]
Description=Telemt
After=network.target
[Service]
Type=simple
WorkingDirectory=/bin
ExecStart=/bin/telemt /etc/telemt.toml
Restart=on-failure
[Install]
WantedBy=multi-user.target
```
3. In Shell type `systemctl start telemt` - it must start with zero exit-code
4. In Shell type `systemctl status telemt` - there you can reach info about current MTProxy status
5. In Shell type `systemctl enable telemt` - then telemt will start with system startup, after the network is up
2025-12-30 22:18:22 +03:00
2025-12-31 05:28:32 +03:00
## FAQ
### Telegram Calls via MTProxy
- Telegram architecture does **NOT allow calls via MTProxy**, but only via SOCKS5, which cannot be obfuscated
### How does DPI see MTProxy TLS?
- DPI sees MTProxy in Fake TLS mode as TLS
- the SNI you specify sends both the client and the server;
- ALPN is similar to HTTP 1.1/2;
- high entropy, which is normal for AES-encrypted traffic;
### Whitelist on IP
- MTProxy cannot work when there is:
- no IP connectivity to the target host
- OR all TCP traffic is blocked
- OR all TLS traffic is blocked,
2025-12-31 05:29:09 +03:00
- like most protocols on the Internet;
- this situation is observed in China behind the Great Chinese Firewall and in Russia on mobile networks
2025-12-31 05:28:32 +03:00
2025-12-30 22:18:22 +03:00
## Why Rust?
- Long-running reliability and idempotent behavior
- Rusts deterministic resource management - RAII
- No garbage collector
- Memory safety and reduced attack surface
- Tokio's asynchronous architecture
## Roadmap
2025-12-31 04:39:49 +03:00
- Public IP in links
2025-12-30 22:18:22 +03:00
- Config Reload-on-fly
2025-12-31 04:39:49 +03:00
- Bind to device or IP for outbound/inbound connections
- Adtag Support per SNI / Secret
2025-12-30 22:18:22 +03:00
- Fail-fast on start + Fail-soft on runtime (only WARN/ERROR)
2025-12-31 04:39:49 +03:00
- Zero-copy, minimal allocs on hotpath
- DC Healthchecks + global fallback
- No global mutable state
2025-12-31 04:45:28 +03:00
- Client isolation + Fair Bandwidth
2025-12-30 22:18:22 +03:00
- Backpressure-aware IO
- "Secret Policy" - SNI / Secret Routing :D
- Multi-upstream Balancer and Failover
- Strict FSM per handshake
- Session-based Antireplay with Sliding window, non-broking reconnects
- Web Control: statistic, state of health, latency, client experience...