liafanx/mtproxy-reanimation — explained in plain English
Analysis updated 2026-05-18
Stop one misbehaving client from overwhelming a Telemt or MTProxyMax proxy server with connection floods.
Apply per-client nftables rate limits automatically across host, Docker, or MTProxyMax deployments.
Tune Telemt timeout parameters like handshake wait time for slow mobile networks.
Switch between strict, medium, and relaxed limiter presets using the mtpr menu tool.
| liafanx/mtproxy-reanimation | peppy/dotfiles | zealchou/fable5-scaffold | |
|---|---|---|---|
| Stars | 49 | 48 | 47 |
| Language | Shell | Shell | Shell |
| Last pushed | — | 2026-07-01 | — |
| Maintenance | — | Active | — |
| Setup difficulty | moderate | moderate | moderate |
| Complexity | 3/5 | 2/5 | 3/5 |
| Audience | ops devops | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
Requires root access and a systemd-based Linux system, meant as an add-on to an existing Telemt install.
MTproxy-reanimation is a shell script utility for Linux servers that run Telemt or MTProxyMax, which are Telegram proxy servers. The tool solves a specific stability problem: when many clients try to connect at the same moment, the proxy can choke on the flood of incoming TCP connection requests. This script adds a per-client rate limit on those initial connection packets so that one misbehaving client cannot knock over service for everyone else. The limiting works at the kernel network level using nftables, a Linux firewall system built into the kernel. Each connecting IP address gets its own independent counter, so a noisy client gets throttled without affecting other users. The script automatically figures out whether Telemt is running directly on the host, inside a Docker container, or via the MTProxyMax variant, and applies the correct nftables hook accordingly. Beyond the connection limiter, the script also applies a set of Telemt timing parameters: how long to wait for the upstream Telegram connection, how long to wait for the initial client handshake, and how long an idle client can sit before being dropped. These timeouts have sensible defaults and the README explains when to raise them, for example on mobile networks where connections are slow to establish. Installation is a single curl command that downloads and runs the installer. After that, a menu tool called mtpr gives access to all options: applying or removing the nftables rules, switching between three preset strictness levels (strict, medium, and relaxed), viewing a live drop counter, and managing the systemd service that keeps the limiter running across reboots. Before modifying any config file, the script automatically saves a timestamped backup. The script is intended as an add-on to existing Telemt installations, not a replacement. It does not touch the Telemt Panel configuration and removes only its own files when uninstalled. It requires root access and a Linux system with systemd, nftables is installed automatically if missing.
A shell script that adds per-client connection rate limiting to Telegram proxy servers (Telemt or MTProxyMax) to stop connection floods from crashing the service.
Mainly Shell. The stack also includes Shell, nftables, systemd.
Setup difficulty is rated moderate, with roughly 30min to a first successful run.
Mainly ops devops.
This repo across BitVibe Labs
Verify against the repo before relying on details.