Skip to content

iPmartNetwork/iPBotS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

66 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

iPBotS Logo

Professional V2Ray VPN Shop Telegram Bot
Sell VPN configs with ease β€” supports 3x-ui, Hiddify & Marzban

Version License Python Aiogram Docker

Stars Forks Issues Last Commit

Quick Start β€’ Features β€’ Panels β€’ Payments β€’ Deployment β€’ فارسی


πŸ“‹ Overview

iPBotS is a full-featured Telegram bot for selling V2Ray/Xray VPN configurations. It connects to popular panels (3x-ui, Hiddify, Marzban), handles payments, manages subscriptions, and provides a complete shop experience β€” all through Telegram.

Built with modern async Python (Aiogram 3 + FastAPI + SQLAlchemy), it's designed for performance, scalability, and ease of deployment.

⚑ Quick Start

One-line install:

sudo bash -c "$(curl -sL https://raw.githubusercontent.com/iPmartNetwork/iPBotS/master/install.sh)"

Or manually:

git clone https://github.com/iPmartNetwork/iPBotS.git
cd iPBotS
sudo bash install.sh

After installation, use the ipbots command:

ipbots status     # Service status
ipbots logs       # View logs
ipbots restart    # Restart
ipbots update     # Update to latest
ipbots backup     # Database backup

✨ Features

πŸ›’ Shop & Sales

Feature Description
Plan Categories Organized plans with icons and sorting
Custom Plans Users build their own plan (data + duration + IPs)
Free Trial Attract new users with limited free service
Bundles Sell multiple plans together at discount
Discount Codes Percentage or fixed amount coupons
Auto-Renewal Automatic renewal from wallet before expiry
Server Selection Users choose their preferred location
QR Code Generate QR for subscription links
Deep Link Direct link to specific plan (/start plan_5)
Subscription Upgrade Upgrade to higher plan from bot
Subscription Transfer Transfer service to another user

πŸ’³ Payments

Gateway Type
ZarinPal Iranian Rial (online)
NowPayments Cryptocurrency
Cryptomus Cryptocurrency
Card-to-Card Manual with admin approval + auto-activation
IDPay Iranian Rial (online)
Wallet Internal balance

πŸ‘₯ User System

Feature Description
Wallet Deposit, withdraw, transaction history
Referral Invite friends, earn commission (auto-applied)
Loyalty Points Earn points per purchase, redeem rewards
Reseller Agency system with tiered discounts
Tickets Support ticket system
Tutorials Connection guides for all platforms
Family Plan Share subscription with family members
Review/Rating Rate service after purchase

πŸ›‘οΈ Admin Panel

Feature Description
Dashboard Revenue, users, orders, real-time stats
User Management Search, ban/unban, credit, message, wallet view
Server Management Add/edit/test/delete VPN servers
Plan Management Create/edit/delete plans, assign category & server
Payment Management Approve/reject card-to-card payments
Broadcast Send messages to all/active/selected users
Backup Automatic + manual database backups
Daily Reports Auto-generated revenue & growth reports
CSV Export Export users and payments to CSV
Status Page Public server health page at /status

πŸ€– Smart Features

Feature Description
AI Support FAQ matching + optional GPT integration
Marketing Automation Re-engage inactive users, expired offers
Health Monitoring Server uptime checks every 5 minutes
Traffic Alerts Notify users at 80% traffic usage
Expiry Notifications Warn 3 days before subscription ends
Audit Log Track all admin actions
Forced Channel Join Require users to join channels before use
Anti-Spam Redis rate limiting (5 msg/10s)
Forward Broadcast Forward any message type to all users
Scheduled Messages Time-based message scheduling
Protocol Management Configure protocols per server
Bot Text Customization Admin can change all bot texts

�️ Panels

Panel Status
3x-ui (Sanaei) βœ… Full support
Hiddify Manager βœ… Full support
Marzban βœ… Full support
Marzneshin βœ… Full support

🌐 Mini App (WebApp)

Modern Telegram Mini App with:

  • Shop browsing with categories
  • Service management with traffic charts
  • Wallet with transaction history
  • Profile and referral system
  • Responsive dark theme UI

πŸ› οΈ Tech Stack

πŸš€ Deployment

Requirements

Requirement Minimum
OS Ubuntu 20.04+ / Debian 11+
RAM 512 MB
Disk 5 GB
Domain Optional (for webhook mode)

Installation

See INSTALL.md for detailed instructions.

Configuration

All settings in .env file. See .env.example for all options.

Management

ipbots status      # Check status
ipbots start       # Start services
ipbots stop        # Stop services
ipbots restart     # Restart
ipbots logs        # View bot logs
ipbots logs redis  # View Redis logs
ipbots update      # Update to latest
ipbots backup      # Create backup
ipbots config      # Edit .env
ipbots seed        # Seed sample data
ipbots uninstall   # Remove completely

πŸ“ Project Structure

iPBotS/
β”œβ”€β”€ bot/                 Telegram bot (Aiogram 3)
β”‚   β”œβ”€β”€ handlers/        Message & callback handlers
β”‚   β”‚   β”œβ”€β”€ user/        User handlers (17 modules)
β”‚   β”‚   └── admin/       Admin handlers (8 modules)
β”‚   β”œβ”€β”€ keyboards/       Inline & reply keyboards
β”‚   β”œβ”€β”€ middlewares/     Auth, throttle, locale
β”‚   β”œβ”€β”€ states/          FSM states
β”‚   └── utils/           Helpers, QR code
β”œβ”€β”€ core/                Business logic
β”‚   β”œβ”€β”€ database/        Models, repositories, engine
β”‚   β”œβ”€β”€ services/        Panel, payment, AI, marketing
β”‚   └── scheduler/       Background jobs (12 tasks)
β”œβ”€β”€ api/                 FastAPI (webhook + WebApp API)
β”œβ”€β”€ webapp/              Telegram Mini App (HTML/CSS/JS)
β”œβ”€β”€ locales/             i18n (Persian + English)
β”œβ”€β”€ templates/           Payment result pages
β”œβ”€β”€ migrations/          Alembic migrations
β”œβ”€β”€ docker-compose.yml   Docker orchestration
β”œβ”€β”€ install.sh           Auto-installer & manager
└── nginx.conf.example   Nginx reverse proxy config

πŸ”’ Security

  • AES encryption for panel passwords in database
  • Nginx with rate limiting & security headers
  • HSTS + TLS 1.2/1.3
  • Firewall (UFW) auto-configured
  • Audit logging for admin actions
  • Input validation on all user inputs
  • Redis-based rate limiting

πŸ“„ License

AGPL-3.0


Made with ❀️ by iPmart Network