Community-driven Telegram proxy aggregator with real-time ping monitoring, voting system, and automatic cleanup.
- Proxy Aggregation: Add and manage MTProto and WEB proxies from multiple sources
- Real-time Ping Monitoring: Uses protocol-specific GET checks with TCP fallback
- 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
- Proxy Notes: Add an optional 200-character label to manual proxies and edit it later
- Responsive Design: Material Design 3 UI with dark/light theme support
- Useful logging: System logs use
logs/YYYY-MM-DD-system.log; HTTP access logs uselogs/YYYY-MM-DD-access.log. Secrets and full proxy links are excluded from log messages.
MTProto entries use the MTProto Proxy-get protocol (not simple TCP connect) to accurately check proxy availability. WEB entries use the HTTPS bridge GET endpoint and fall back to a TCP connect check when the bridge request fails.
For MTProto, the checker sends a valid obfuscated handshake and measures the response. For WEB, it sends an HTTPS GET to the bridge URL derived from the hostname and secret.
This ensures proxies actually work with Telegram, not just accept TCP connections.
- Runs every 5 minutes
- Checks all proxies using their protocol-specific GET check
- 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": "...", "note": "optional label" }
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
Update or clear a proxy note. Requires the configured app password.
- Body:
{ "password": "...", "note": "provider or location" }
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)note: Optional label, up to 200 characterslikes: 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=...tg://webproxy?server=...&secret=...https://t.me/webproxy?server=...&secret=...
WEB proxies use port 443 implicitly. Their bridge capability is derived from the hostname and decoded MTProxy secret; ee TLS-emulation secrets are not supported by the WEB transport.
Configuration is loaded from config.toml.
Example config.toml:
[app]
debug = false
[logging]
level = "INFO"
file = "logs/{time:YYYY-MM-DD}-system.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. - Default channels include
telemtrs,telemt_free_proxy, andtelemtfreeproxy; configured channels are added to that list. - 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.