A production-quality Python tool for fetching, filtering, and benchmarking VLESS proxy configurations using sing-box.
- Asynchronous Execution: Built with
asynciofor high-performance concurrent testing. - Pre-filtering: Uses high-speed TCP ping to quickly discard dead hosts.
- Dynamic Configuration: Automatically generates
sing-boxJSON configs for various transport types (TCP, WS, gRPC, HTTP) and security protocols (TLS, Reality). - Comprehensive Metrics:
- Latency: Measures RTT to a target URL (default: Google Connectivity Check).
- Speed: Benchmarks download throughput in Mbps using a test file.
- Rich CLI Interface: Beautifully formatted tables and progress bars powered by
rich. - Export Options: Results are saved to
results.csv, and the top N working configurations are exported totop_servers.txt.
- Python 3.8+
- sing-box: Ensure the
sing-boxbinary is installed and available in your PATH (usually/usr/bin/sing-box).
- Clone or download this repository.
- Install the required Python packages:
pip install -r requirements.txtThis repository includes a GitHub Actions workflow that automatically runs the benchmark every 6 hours and sends the top 20 servers to a Telegram bot.
- Create a Telegram Bot: Talk to @BotFather to create a bot and get your API Token.
- Get your Chat ID: Talk to @userinfobot to find your Chat ID.
- Add GitHub Secrets:
- Go to your repository Settings > Secrets and variables > Actions.
- Add
TELEGRAM_BOT_TOKENwith your bot's token. - Add
TELEGRAM_CHAT_IDwith your chat ID.
- Enable Workflow Write Permissions:
- Go to your repository Settings > Actions > General.
- Scroll down to Workflow permissions.
- Select Read and write permissions and click Save.
The workflow will also update results.csv and top_servers.txt in the repository after each run.
You can still run the script manually: ...
python3 vless_benchmarker.py --workers 20 --top 10To enable Telegram notifications locally, set the environment variables:
export TELEGRAM_BOT_TOKEN="your_token"
export TELEGRAM_CHAT_ID="your_chat_id"
python3 vless_benchmarker.pyusage: vless_benchmarker.py [-h] [--url URL] [--timeout TIMEOUT] [--workers WORKERS]
[--top TOP] [--singbox-path SINGBOX_PATH]
[--test-url TEST_URL] [--show-all]
options:
-h, --help show this help message and exit
--url URL Config list URL
--timeout TIMEOUT Timeout per test in seconds (default: 10)
--workers WORKERS Max concurrent testers (default: 10)
--top TOP Number of top servers to export (default: 10)
--singbox-path PATH Path to sing-box binary (default: /usr/bin/sing-box)
--test-url URL URL for latency test
--show-all Show all benchmarked servers in the table (default: Top 50)Benchmark with 20 workers and a 5-second timeout:
python3 vless_benchmarker.py --workers 20 --timeout 5Export the top 20 working servers:
python3 vless_benchmarker.py --top 20- CLI Table: A sorted list of servers based on status and latency.
- results.csv: Full benchmark data for all tested servers.
- top_servers.txt: A list of raw
vless://URIs for the fastest working servers.
MIT