Premium SOCKS5 proxy service bot with QR-code generation, advanced checking, and complete user analytics.
- 📱 QR-Code Generation - Scan to connect instantly (5-min lifetime)
- 🌍 Regional Organization - Proxies grouped by region with country flags
- ⏱️ Auto-Expiring QR - 1-minute warning before expiration
- 📊 User Analytics - Track proxy views, QR requests, connections globally and per-user
- 🔔 Smart Monitoring - Speed drop alerts & availability notifications
- 🚀 Quick Connect - One-click links and buttons
- 🔐 Admin Dashboard -
/statsfor bot analytics,/mystatsfor users - 🌐 Bilingual - Full English and Russian support
.
├── index.js # Main bot (Telegraf)
├── package.json # NPM dependencies
├── .env # Configuration (gitignored)
├── proxies.txt # region|type|proxy format
├── checks.json # Proxy check history
├── alerts.json # Active monitoring alerts
├── utils/
│ └── stats.js # User statistics module
├── db/
│ └── users.json # User data persistence
└── README.md # This file
- Node.js v16+
- npm/yarn
- Telegram Bot Token from @BotFather
# Install dependencies
npm install
# Copy and edit .env
cp .env .env.local
nano .env.local # Add TELEGRAM_BOT_TOKEN and ADMIN_ID# Required
TELEGRAM_BOT_TOKEN=your_bot_token_here
# Recommended
ADMIN_ID=your_telegram_id_for_admin_commands
# Optional (timings in milliseconds)
QR_LIFETIME_MS=300000 # Default: 5 min
MONITOR_INTERVAL_MS=300000 # Default: 5 min
SPEED_DROP_THRESHOLD_PERCENT=50 # Default: 50%
# Optional (monitoring)
MONITOR_CHAT_ID=your_chat_id
MONITOR_START_ON_LAUNCH=0Direct startup:
npm startWith token in PowerShell:
$env:TELEGRAM_BOT_TOKEN="your_token"; npm startWith .env file:
# Edit .env first, then:
npm start- Select region → pick proxy
- Click 📱 QR button
- QR-code generated (expires in 5 minutes)
- Scan in Telegram: Settings → Data & Storage → Proxy → Scan QR
- Bot notifies 1 minute before expiry
Leave QR_LIFETIME_MS in .env to change expiration time.
/stats # Global bot stats/mystats # Your personal stats
/start # Initialize/restart| Metric | Description |
|---|---|
| Total Users | Account creation count |
| Proxies Viewed | Region proxy list clicks |
| QR Requests | QR button clicks per user |
| Connect Clicks | Connection button clicks |
| Active Today | Last activity in 24hrs |
| Language Split | EN vs RU preferences |
Users automatically saved to db/users.json:
{
"123456789": {
"id": 123456789,
"joinedAt": "2026-03-03T14:30:00Z",
"proxiesViewed": 5,
"qrRequests": 3,
"connectClicks": 2,
"lastActivity": "2026-03-03T14:45:00Z",
"lang": "ru"
}
}- TCP connection (ping)
- Download speed (64KB file)
- Anonymity detection
- Availability tracking
⚠️ Proxy down- ✅ Proxy recovered
- 🐢 Speed drop > 50%
- ⚡ Speed recovered
/monitor_start # Begin checking (requires MONITOR_CHAT_ID)
/monitor_stop # Stop checkingEdit proxies.txt with one proxy per line:
region|type|proxy
nl|SOCKS5|user:password@188.227.220.178:1080
us|SOCKS5|user:password@proxy.example.com:1081
ru|SOCKS5|user:password@1.2.3.4:1082
Fields:
region→ 2-letter code (nl, us, ru, etc.) - shown with 🌍 flagtype→ SOCKS5, HTTP, etc.proxy→[user:password@]host:port
Comments start with #:
# Example proxies
nl|SOCKS5|user:pass@host:1080
# This line is ignored
-
Never commit .env
cat .gitignore # Should include .env -
Rotate token if exposed
- Use BotFather to regenerate
- Update .env immediately
-
Admin-only access
- Set your Telegram ID in
ADMIN_ID - Only you can run
/stats
- Set your Telegram ID in
-
HTTPS everywhere
- All external API calls use HTTPS
- Proxy creds transmitted securely
{
"telegraf": "^4.12.2", // Telegram API
"axios": "^1.4.0", // HTTP client
"qrcode": "^1.5.4", // QR generation
"socks-proxy-agent": "^7.0.0", // SOCKS5 support
"https-proxy-agent": "^7.0.0", // HTTPS proxy
"dotenv": "^16.3.1" // Config loading
}/start
↓
[Language: EN/RU]
↓
[Main Menu: Proxies | QR Help]
↓
[Select Region] 🇳🇱 NL (3)
↓
[Proxy List]
├─ #1 [SOCKS5] ✅ Active
│ ├─ 📱 QR (expires 5 min)
│ └─ 🔗 Connect (port 1080)
└─ #2 [SOCKS5] ✅ Active
├─ 📱 QR
└─ 🔗 Connect (port 1081)
Every 5 minutes:
↓
[Check each proxy]
├─ Ping
├─ Speed
└─ IP/Anonymity
↓
[Compare with previous check]
↓
[Alert if changed]
├─ Speed drop > 50% → 🐢 Alert
├─ Proxy down → ⚠️ Alert
└─ Proxy recovered → ✅ Alert
↓
[Save to checks.json + alerts.json]
| Problem | Solution |
|---|---|
| Bot won't start | Check TELEGRAM_BOT_TOKEN in .env |
| Can't generate QR | Verify proxy format, test connectivity |
| Stats not saving | Check db/ folder permissions, restart |
/stats shows "Access denied" |
Set ADMIN_ID=your_id_number in .env |
| No monitor alerts | Set MONITOR_CHAT_ID in .env |
- Add
ADMIN_IDto .env (your Telegram ID, not username) - Test
/statscommand - Add proxies to
proxies.txt - Set
QR_LIFETIME_MSif needed - Configure
MONITOR_CHAT_IDfor alerts - Backup
db/users.jsonregularly
| Metric | Typical |
|---|---|
| QR Generation | < 100ms |
| Single Proxy Check | 2-5s |
| Monitor Pass (10 proxies) | 5-10s |
| Memory Usage | 50-100MB |
| User Data Size | ~100KB per 100 users |
httpbin.org/ip- IP detectionhttpbin.org/stream-bytes/65536- Speed testip-api.com/json/{ip}- Country lookup (cached)
Questions? Check logs and make sure .env is properly configured.
Channel: @nexoraproxy