8b859fff6f089cb1243b5e9cbcbb067649de7e02
Add async Telegram Stars VPN bot with Marzban integration
Telegram VPN bot (Marzban + Telegram Stars)
Async Telegram bot for selling and extending Marzban VPN subscriptions.
Features
- Plans:
- 1 month = ⭐️100
- 3 months = ⭐️270
- 6 months = ⭐️500
- Marzban username format:
tg<telegram_user_id>(example:tg12345678). - New users are created with:
data_limit = 50 GBdata_limit_reset_strategy = monthproxies = {"vless": {"flow": "xtls-rprx-vision"}}inbounds = {"vless": ["VLESS TCP REALITY"]}
- If user has active subscription, a new purchase extends from current expiration.
- Bot sends subscription URL after successful purchase.
- Admin notifications for every creation/extension.
/statscommand for admins:- payments count
- stars earned
- sold months
- marzban users
- traffic usage/total quota
Setup
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .env
Fill .env and run:
export $(grep -v '^#' .env | xargs)
python bot.py
Notes
- Telegram Stars invoices use
currency="XTR"and emptyprovider_token. - Local SQLite database stores only payment statistics. User state is read from Marzban API.
Languages
Python
98%
Dockerfile
2%