$ account mercurykd
This repository is a production-ready Telegram bot that manages a multi-protocol VPN/proxy server infrastructure deployed via Docker Compose. It supports WireGuard, Xray (VLESS), Shadowsocks, OpenConnect, NaiveProxy, Hysteria, MTProto, and others, plus AdGuard Home for DNS filtering and split tunneling via PAC files. The bot handles user subscriptions, configuration generation, service restarts, IP banning, and automated maintenance (cron, log analysis, backups). The architecture is monolithic: a single large PHP script (app/bot.php ~5000 lines) processes Telegram webhooks and executes commands on Docker containers via SSH. The codebase is functional and actively used (500+ stars) but suffers from lack of tests, tight coupling, hardcoded infrastructure assumptions, and security concerns (Docker socket exposure, SSH in every container). Reusable components are limited, with app/calc.php (CIDR calculation) being a standout isolated utility.