Community-driven MTProto proxy aggregator with real-time ping monitoring, voting system, and automatic cleanup.
- Proxy Aggregation: Add and manage MTProto proxies from multiple sources
- Real-time Ping Monitoring: Uses MTProto Proxy-get protocol for accurate availability checks
- Voting System: Like/dislike proxies to help community find the best ones
- Automatic Cleanup:
- Removes most disliked proxies (5+ dislikes) every 30 minutes
- Removes proxies that have been down for 5+ days
- QR Code Support: Generate QR codes for quick Telegram proxy connection
- Bulk Import: Parse and add multiple proxies from text
- Responsive Design: Material Design 3 UI with dark/light theme support
The system uses MTProto Proxy-get protocol (not simple TCP connect) to accurately check proxy availability:
- Sends a valid MTProto handshake request with magic bytes
0x00010001 - Includes secret as padding (or handles domain fronting with
eeprefix) - Waits for proper MTProto response
- Measures round-trip time for ping value
This ensures proxies actually work with Telegram, not just accept TCP connections.
- Runs every 5 minutes
- Checks all proxies using MTProto Proxy-get
- Updates ping status (OK/WARNING/FAILED)
- Skips recently failed proxies (2 hour cooldown) to reduce load
- Runs every 30 minutes
- Deletes the most disliked proxy if it has 5+ dislikes
- Deletes all proxies that have been in FAILED status for 5+ days
- Updates last_cleanup timestamp in stats
- Python 3.11+
- SQLite (included via aiosqlite)
uv syncpython main.pyThe application will be available at http://localhost:8000
Main HTML page with proxy list
Get list of proxies
- Query params:
sort(likes/ping/newest),limit,offset
Add a single proxy
- Body:
{ "server": "...", "port": ..., "secret": "..." }
Parse proxy links from text
- Body:
{ "text": "tg://proxy?..." }
Parse and add multiple proxies
- Body:
{ "text": "multiple links..." }
Vote on a proxy
- Body:
{ "proxy_id": ..., "vote_type": "like"|"dislike" }
Get current user's vote for a proxy
Get aggregate statistics
Manually trigger ping check for a proxy
Add proxy via API (supports both single and bulk)
- Body:
{ "server": "...", "port": ..., "secret": "..." }or{ "links": "..." }
id: Primary keyserver: Hostname or IPport: Port numbersecret: Hex secret (32-512 chars)likes: Vote countdislikes: Vote countping_ms: Last ping in millisecondsping_status: OK/WARNING/FAILED/PENDINGtcp_ok: TCP connection successdns_ok: DNS resolution successcreated_at: Creation timestamplast_checked: Last ping check timestamp
id: Primary keyproxy_id: Foreign keyvoter_id: Cookie-based voter IDvote_type: like/dislikecreated_at: Vote timestamp
- Single row tracking last cleanup time
Supported formats for parsing:
tg://proxy?server=...&port=...&secret=...https://t.me/proxy?server=...&port=...&secret=...
Configuration is loaded from config.toml.
Example config.toml:
[app]
debug = false
[logging]
level = "INFO"
file = "logs/proxyhub.log"
rotation = "10 MB"
retention = "7 days"
[telegram]
enabled = false
api_id = 123456
api_hash = "your_api_hash"
session_name = "proxyhub"
channels = ["telemtrs", "@your_channel_id"]When telegram.enabled is true, the app will start a Telethon client at startup and listen for new messages in configured Telegram channels.
- Only authorized channels listed in
config.tomlare processed. - New message text is parsed for
tg://proxyandhttps://t.me/proxylinks. - Valid proxies are added automatically to the database.
api_idandapi_hashare required when Telegram ingestion is enabled.- Session files are stored under
.session/. - If Telegram is disabled, the app still works with manual and bulk proxy import.