A Telegram bot that sells VPN access with automatic key generation for Myanmar users, bypassing censorship using VLESS+REALITY and Shadowsocks protocols.
- Multi-Protocol Support: Shadowsocks (working) & VLESS+REALITY (experimental)
- Unique Per-User Keys: Each user gets a unique password (UUID-based)
- Bandwidth Tracking: Ready for per-user bandwidth limits via Watchdog
- Device Limits: Can enforce one device per key
- Automated Deployment: Systemd services for bot and VPN server
- Ubuntu 22.04+ server (AWS Mumbai recommended)
- Telegram Bot Token from @BotFather
- SSH access to server
# 1. Clone repository
git clone <repo-url>
cd vpn-bot
# 2. Configure bot token
export BOT_TOKEN="your-telegram-bot-token"
# 3. Install dependencies
pip3 install -r requirements.txt
# 4. Initialize database
python3 <<EOF
from db.database import init_db
init_db()
EOF
# 5. Deploy to server (see DEPLOYMENT.md)- Bot (
bot/): Telegram bot handling user interactions - Database (
db/): SQLite for user management - Watchdog (
watchdog/): Traffic monitoring service - Config Manager: Automatic Sing-Box configuration updates
| Protocol | Port | Status |
|---|---|---|
| Shadowsocks | 9388 | ✅ Working |
| VLESS+REALITY | 8443 |
- DEPLOYMENT.md - Complete deployment guide
- architecture.md - System design overview
- vpn-bot.md - Configuration reference
- walkthrough.md - Development history
- User sends
/buyto bot - Bot presents protocol choice (Shadowsocks recommended)
- User sends payment screenshot
- Bot generates unique key + QR code
- User imports into v2rayNG or NekoBox
✅ Production Ready (Shadowsocks)
- Unique per-user passwords
- Automatic config updates
- Service monitoring
- Handshake issues under investigation
- Use for testing only
- Instance: AWS EC2 t3.nano (Mumbai)
- OS: Ubuntu 22.04
- VPN Server: Sing-Box
- Firewall: UFW with ports 8443, 9388 open
MIT