Smart proxy load balancer for Xray-core with automatic failover, latency monitoring, and intelligent node switching.
-
Smart automatic node switching
-
Lowest-latency balancing
-
Automatic failover
-
Round-robin balancing mode
-
Interactive CLI
-
SOCKS5 + HTTP local proxy
-
Colored terminal logs
-
Multi-protocol support:
- VMess
- VLESS
- Trojan
- Shadowsocks
-
Lightweight and fast
-
Cross-platform:
- Windows
- Linux
- macOS
-
Built with Go
Managing multiple Xray nodes manually can be frustrating.
Xray Balancer automatically monitors node latency and switches to the best available proxy without interrupting your workflow.
Perfect for:
- unstable networks
- multi-node setups
- automatic failover
- low-latency routing
- daily proxy usage
Download the latest release from the Releases page.
git clone https://github.com/mehdirzfx/xray-balancer
cd xray-balancer
go build -o xray-balancer ./cmdCGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o release/xray-balancer-linux ./cmdCGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -o release/xray-balancer.exe ./cmdCGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -o release/xray-balancer-macos ./cmdvmess://...
vless://...
trojan://...
ss://..../xray-balancerAfter startup:
SOCKS5 → 127.0.0.1:10808
HTTP → 127.0.0.1:10809-f <file> Config file
-c <file> App config JSON
-port <int> Local SOCKS5 port
-ping-interval <n> Ping interval
-mode <mode> best | round_robin
-log <level> none|error|warning|info|debug
-i=false Disable interactive CLI
-v Show versionstatus Show node status
switch N Manually switch node
ping Show latency information
help Show help
quit Exit{
"local_port": 10808,
"ping_interval": 30,
"ping_timeout": 10,
"ping_url": "http://www.gstatic.com/generate_204",
"switch_mode": "best",
"log_level": "warning"
}cmd/ Application entrypoint
internal/
balancer/ Core balancing logic
config/ Config parser
ping/ Latency checking
proxy/ Xray proxy management
core/ Core binaries
release/ Build outputs- Web dashboard
- REST API
- Prometheus metrics
- Geo balancing
- Smart health scoring
- Historical latency tracking
- Benchmark mode
Pull requests and ideas are welcome.
If you find bugs or want new features, open an issue.
MIT License
Developed by:
GitHub: https://github.com/mehdirzfx