MTProxyMax
The Ultimate Telegram MTProto Proxy Manager
One script. Full control. Zero hassle.
Quick Start •
Features •
Comparison •
Telegram Bot •
CLI Reference •
Changelog •
Full Guide ↗
MTProxyMax is a full-featured Telegram MTProto proxy manager powered by the telemt 3.x Rust engine. It wraps the raw proxy engine with an interactive TUI, a complete CLI, a Telegram bot for remote management, per-user access control, traffic monitoring, proxy chaining, and automatic updates — all in a single bash script.
sudo bash -c "$(curl -fsSL https://raw.githubusercontent.com/SamNet-dev/MTProxyMax/main/install.sh)"
Why MTProxyMax?
Most MTProxy tools give you a proxy and a link. That's it. MTProxyMax gives you the absolute maximum of features possible from a proxy manager with a Rust engine (telemt) — providing everything you need in one single script:
- 🏎️ Real-Time QoS Bandwidth Shaping (
speed-limit) — Linux kernel tc and htb hierarchical rate limits dynamically mapped to active per-user IP sessions without container restarts.
- 🌐 Multi-Server Fleet Federation (
fleet) — Centralized Master-Slave telemetry aggregation, global concurrent connection health, and pooled Gbps/TB bandwidth tracking across your entire server mesh.
- 🔐 Automated Let's Encrypt / SSL Shield (
ssl-shield) — Automated openssl certificate issuance and domain TLS SNI validation.
- ☁️ Automated Off-Site Cloud Backups (
backup-cloud) — 1-click & cron tarball offloading directly to a Telegram admin chat (sendDocument) or multi-cloud storage (rclone/S3/R2).
- 🤖 Dual-Tier Self-Service Telegram Bot (
telegram) — Public unauthenticated tier for end-users (/start, /my_status <label>, /voucher) and a protected Admin Control Plane (/mp_fleet, /mp_secrets, /mp_lockdown).
- 🏆 Comprehensive Enterprise Platform — Over 35 enterprise features across Networking, Quota Governance, DevOps Automation, and Live Telemetry.
- 👥 Shared Quota Pools & Calendar Schedules — Group users under shared bandwidth ceilings (
pool) and offer unmetered weekend/holiday data passes (calendar).
- ⚡ Autonomous Failover & SNI Hunter — Self-healing upstream watchdog (
failover), automated cover domain hunting (auto-sni), and TLS fingerprint randomization (cert-shield).
- 🚑 1-Click Emergency Evacuation & Webhooks — Instant SSH/rsync server migration (
evacuate) and multi-channel JSON notifications for Discord, Slack, and DingTalk (webhook).
- 📊 Live Telemetry & Audit Reports — Real-time ASCII traffic dashboard (
live-diag), printable QR onboarding sheets (qr-sheet), and monthly billing export reports (export-report).
- 🏢 Enterprise Commercial Suite — Batch gift code vouchers (
voucher create/redeem), Role-Based Access Control (admin add), and static glassmorphism Status Portal (portal).
- 🛡️ Automated Hostile Threat Shield — Live Shodan/Censys scanner blacklisting via
ipset (scanner-shield)
- 🛡️ Next-Gen Anti-DPI & Stealth Suite — BBRv3 congestion control (
bbr), Anti-DPI packet padding (shield), Reverse-proxy probe trapdoor (cover-shield), and active forensic inspection (dpi-inspect)
- 🏎️ Bandwidth Shaping & Quotas — Linux
tc per-IP QoS limits, off-peak Happy Hours quota exclusions, and automated Telegram abuse/expiry alerts
- 🚨 Emergency Lockdown Switch — Instant panic posture hardening via CLI or Telegram bot (
/mp_lockdown)
- 🌐 DevOps & Clustering Automation — HAProxy/Nginx load balancer config exporter, Cloudflare DDNS updater, and forensic snapshots
- 🔐 Multi-user secrets with individual bandwidth quotas, device limits, and expiry dates
- 🏷️ Tags & templates — group users by category, onboard in seconds with reusable limit sets
- 📅 Monthly quota reset — subscription-style automatic traffic resets per user
- 🤖 Telegram bot with 21 administrative commands — manage users, view health digests, and trigger lockdowns from chat
- 🗂️ Replication — sync config to slave servers automatically via rsync+SSH
- 📦 Server migration — tarball-based export/import with one command
- 💾 Encrypted backups — AES-256 backups with autoclean policy
- 🖥️ Interactive TUI — no need to memorize commands, menu-driven setup
- 📊 Prometheus metrics — real per-user traffic stats, not just iptables guesses
- 🔗 Proxy chaining — route through SOCKS5 upstreams for extra privacy
- 🚨 Maintenance mode + IP banlist — graceful pre-restart, fine-grained blocking
- 🩺 Doctor, verify, audit log — comprehensive diagnostics and change history
- ⚙️ Engine tuning — whitelisted parameter tuning without editing raw TOML
- 🔄 Auto-recovery + auto-rotate — detects downtime, rotates aging secrets automatically
- 🐳 Pre-built Docker images — installs in seconds, not minutes
🚀 Quick Start
One-Line Install
sudo bash -c "$(curl -fsSL https://raw.githubusercontent.com/SamNet-dev/MTProxyMax/main/install.sh)"
The interactive wizard walks you through everything: port, domain, first user secret, and optional Telegram bot setup.
Manual Install
curl -fsSL https://raw.githubusercontent.com/SamNet-dev/MTProxyMax/main/mtproxymax.sh -o mtproxymax
chmod +x mtproxymax
sudo ./mtproxymax install
After Install
mtproxymax # Open interactive TUI
mtproxymax status # Check proxy health
🐳 Official Docker Image & Registry
MTProxyMax is powered by pre-compiled multi-architecture (linux/amd64, linux/arm64) Docker images hosted on GitHub Container Registry (GHCR):
docker pull ghcr.io/samnet-dev/mtproxymax-telemt:latest
How it Works:
- Pre-compiled High Performance Engine: Packages the high-performance Rust/Tokio
telemt MTProto engine built with Link-Time Optimization (LTO).
- Multi-Arch Support: Runs natively on
x86_64 (AMD64) servers and aarch64 (ARM64 / Raspberry Pi / Ampere Cloud) instances.
- Automated Container Orchestration: During
mtproxymax install or mtproxymax start, MTProxyMax automatically pulls ghcr.io/samnet-dev/mtproxymax-telemt:latest and manages it inside an isolated Docker container with host network permissions.
- Offline / Source Fallback: If internet access to GHCR is restricted, MTProxyMax automatically compiles
telemt from Rust source locally.
⚡ Post-Install Performance & Anti-DPI Setup Guide
Why aren't advanced kernel & Anti-DPI settings asked during the initial setup wizard (mtproxymax install)?
Our installation philosophy prioritizes zero-friction speed. The initial wizard gets a secure, fully functional proxy running in under 30 seconds without overwhelming new users with Linux kernel tuning, TCP window scaling, or netfilter conntrack concepts.
How easy is it to configure advanced enhancements after setup?
It is ultra-easy (1-Click or 1-Line)! All 13 advanced network, kernel, and anti-censorship features can be toggled instantly without restarting your server or breaking active user connections.
- Interactive Menu: Run
mtproxymax -> Select [p] Performance & Self-Healing Suite -> Press [1], [2], [a], [b], or [c] to toggle any shield or booster instantly.
- Direct CLI Commands: Run
mtproxymax bbr on, mtproxymax shield on, or mtproxymax syn-shield on directly from your terminal.
📊 Enhancement Tradeoff & Recommendation Matrix
| Enhancement Command / Option |
What It Does to the Proxy |
Recommended Use Case |
System Impact |
mtproxymax bbr on (BBRv3 & ECN Auto-Tuning) |
Activates Google's TCP BBRv3 congestion control, Fair Queueing (fq), Explicit Congestion Notification (tcp_ecn=1), and expands TCP buffer memory to 16MB. Prevents packet drop bottlenecks on high-latency international links. |
Recommended for ALL servers. Dramatically improves user download speeds and voice/video call quality across long-distance routes. |
Negligible CPU, uses up to ~16MB extra RAM during peak concurrent traffic bursts. |
mtproxymax shield on (Anti-DPI Packet Padding) |
Randomizes TCP MSS clamping (1360) and injects dynamic FakeTLS record padding variations to scrub packet size distributions, defeating heuristic Deep Packet Inspection (DPI) classifiers. |
Recommended for strict censorship regions (GFW, TSPU, TIC). Essential when ISPs throttle or block standard FakeTLS connections based on statistical packet sizes. |
Zero CPU overhead (enforced natively by kernel netfilter hooks). Slight (~1–2%) increase in header bandwidth. |
mtproxymax syn-shield on (Kernel SYN Shield) |
Engages OS-level conntrack and recent netfilter rules to tarpit and drop aggressive active probes (>15 SYN handshakes / 5s per IP) before they reach user space or the application layer. |
Recommended for public proxies or servers under scan attack. Protects your proxy engine from handshake exhaustion and hostile censorship discovery bots. |
Reduces CPU load during SYN flood attacks by dropping packets in kernel space. |
mtproxymax cover-shield on (Reverse-Proxy Cover Shield) |
Acts as an active trapdoor: when non-MTProto HTTP GET requests or invalid TLS handshakes arrive, they are silently forwarded to your primary website (cloudlfare.com) without closing the TCP socket. |
Recommended when facing active forensic probes. Ensures ISP censorship bots see a real, working HTTPS website when inspecting your proxy port. |
Low CPU, requires a few kilobytes of bandwidth when forwarding probe traffic to the fallback domain. |
mtproxymax tcp-fastpath on (TCP Fast-Path & SACK) |
Enables RFC-compliant TCP Window Scaling, Selective Acknowledgments (SACK), and automatic Path MTU Discovery (tcp_mtu_probing=1). |
Recommended for mobile users (4G/LTE/5G) whose networks frequently change cell towers or suffer from variable MTU fragmentation. |
Zero overhead, improves connection recovery after packet drops. |
mtproxymax cpu-tune on (Multi-Core IRQ Spreading) |
Distributes incoming encrypted network packets evenly across all available CPU cores using Linux Receive Packet Steering (RPS/RFS). |
Recommended for multi-core servers (2+ cores) serving >500 concurrent users. Eliminates single-core bottlenecks under heavy traffic loads. |
Optimizes CPU utilization across cores. Automatically skipped safely on single-core or LXC containers. |
✨ Features
🛡️ FakeTLS V2 & Advanced Anti-DPI Defenses
Your proxy traffic looks identical to normal HTTPS traffic. The Fake TLS V2 engine mirrors real TLS 1.3 sessions — per-domain profiles, real cipher suites, dynamic certificate lengths, and realistic record fragmentation.
- Multi-Domain SNI Pool (
tls_domains): Rotate between multiple high-reputation cover domains (e.g., cloudflare.com,www.microsoft.com,www.google.com) within the same proxy engine instance to evade single-domain DPI throttling and SNI blacklisting (mtproxymax domain-pool <domains>).
- Kernel SYN Shield: Built-in iptables/nftables rate limiter (
conntrack + recent module) that tarpits aggressive DPI active scanners (>15 SYN packets in 5 seconds per IP) before they reach the application layer (mtproxymax syn-shield on).
- Anti-DPI Packet Padding Shield (
mtproxymax shield on): Randomizes TCP MSS clamping (1360) and scrubs FakeTLS packet size distributions to defeat GFW, TSPU, and TIC heuristic analysis.
- Reverse-Proxy Cover Shield (
mtproxymax cover-shield on): Active scanner trapdoor that seamlessly forwards non-MTProto HTTP GETs and invalid TLS handshakes directly to a fallback website (e.g., https://cloudflare.com) instead of closing or resetting the TCP socket.
- Stealth Presets (
normal vs ultra): Hot-swappable anti-replay hardening (mtproxymax stealth ultra). ultra tightens the replay window to 180 seconds, expands the nonce cache to 131,072 entries, and drops unknown SNI probes immediately.
- TCP MSS Clamping: