It is a Telegram bot shop powered by aiogram that provides VPN sales via Telegram
git clone https://github.com/gunsh1p/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>
},
"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_URL | Url (like postgresql+psycopg://user:password@server/db) there user is DB_USER, password is DB_PASS, server is database IP (localhost by default) and db is DB_NAME |
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 |
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
- Storing items in db
- Web-panel for admins
- Code refactoring
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
- BTC:
bc1qmrwu6uv00xcvsjvjkwnaw2ky6aenhjgqewg0w4
- LTC:
ltc1qrl3fp7cwwxsun2fsk60zxgncuutkrydwgju6a2
- USDT (TRC-20):
TJUUhJpeaZBBXpG6yUtzLsQmT3XQjViowV
- ETH:
0x052D18812fA247Ce6853a6D95213CEbdb45c6277
- TON:
UQBtG5NZECAH7wc2MrHnoVTv1mRzC9z-vqB-5cUpUaMJbptZ
The project is under the GPL-3.0 licence
Email: [email protected]
Telegram: @blackbloodredkiss