It is a Telegram bot shop powered by aiogram that provides VPN sales via Telegram This project is a fork. Original project.
git clone https://github.com/maxmenkov/marzban-shop.git
cd marzban-shop
docker compose build
After that edit goods.examples.json
{
"title": <your_title_here>,
"price": {
"en": <price_for_crypto_payments>,
"ru": <price_for_yookassa_payments>,
"stars": <price_for_telegram_payments>
},
"callback": <unique_id_for_good>,
"months": <umber_of_months>
}
And edit .env.example file (see configuration)
After all run this code
mv goods.example.json goods.json
mv .env.example .env
docker compose up -d
You can set settings below using environment variables or placing them in
.env
file.
Variable | Description |
---|---|
BOT_TOKEN | Telegram bot token obtained from BotFather |
SHOP_NAME | Name of the VPN shop |
TEST_PERIOD | Availability of test period (bool: true or false) |
PERIOD_LIMIT | Test period limit |
ABOUT | Service information |
RULES_LINK | Link to service rules |
SUPPORT_LINK | Link to service support |
YOOKASSA_TOKEN | YooKassa's token |
YOOKASSA_SHOPID | YooKassa's shopId |
Email for receipts | |
CRYPTO_TOKEN | Cryptomus token |
MERCHANT_UUID | Cryptomus' Merchant UUID |
DB_NAME | Database name |
DB_USER | Database username |
DB_PASS | Database password |
DB_PORT | Database port on host machine |
PANEL_HOST | URL to connect to the marzban panel (if installed on the same server as marzban-shop, specify localhost and port of the panel) |
PANEL_GLOBAL | URL to issue subscriptions (this parameter may be different from PANEL_HOST, more details here) |
PANEL_USER | Panel username |
PANEL_PASS | Panel password |
WEBHOOK_URL | Webhook adress (url) (more deteails here) |
WEBHOOK_PORT | Webhook port |
RENEW_NOTIFICATION_TIME | Scheduled time for exececute notify renew subscription task in format HH:mm |
EXPIRED_NOTIFICATION_TIME | Scheduled time for exececute notify users about expired subscription task in format HH:mm |
TG_INFO_CHANEL | Telegram chanel link |
STARS_PAYMENT_ENABLED | Enable stars payment |
There are two environment variables PANEL_HOST and PANEL_GLOBAL
PANEL_HOST - address of the panel for interaction with API. If the panel is on the same server as marzban-shop, then localhost should be specified as the address. For example, http://localhost:8080
PANEL_GLOBAL - address for issuing subscriptions. It is used for substitution of a link to the subscription. It should be accessible not only in the local network, but also outside it
!WARNING! If the XRAY_SUBSCRIPTION_LINK variable in your marzban panel is set, leave the PANEL_GLOBAL variable empty
To receive responses from the Telegram server and payment provider servers, webhook is used. This should be the address to which all these servers will contact. It must be a domain with TLS 1.2 or higher. Requests should be routed to the port you specified in .env in the WEBHOOK_PORT variable. In addition, for YooKassa to work correctly, you will need to specify a webhook url in your personal account with the following value at the end of /yookassa_payment (e.g. https://my-awesome-webhook.example.com/yookassa_payment) and select all values that begin with payment
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
The project is under the GPL-3.0 licence