proxy-pilot
Core-agnostic proxy health monitor, automatic failover daemon, and multi-channel alerting tool written in Rust for Linux servers — battle-tested on Iran server deployments and designed to work on any restricted or geo-blocked network worldwide.
Features
- Real End-to-End Health Probes: Tests actual access to sanctioned/filtered targets (e.g. Gemini, YouTube, Telegram) through the active proxy, distinguishing tunnel outages from IP geo-blocks (
403/429). - Automatic Failover & Anti-Flapping: Switches to the next healthy proxy profile only after consecutive failures (
failure_threshold), and automatically recovers previously failed profiles. - Non-Disruptive Periodic Background Benchmarking: Every
15minutes (benchmark_interval_secs: 900), probes all profiles in parallel using an isolated temporary core session without interrupting active traffic, updatingpriorityorder automatically. - Safe Auto-Prune with Direct Connectivity Check: Automatically removes profiles that stay continuously dead for
24hours (auto_prune_after_hours), guarded by a configurable direct (non-proxied)direct_check_url(e.g., a domestic site in Iran or any local reachable URL in other regions) so a host internet outage never deletes valid profiles. - VPN-Independent Alerting:
- Bale Bot API (default Iranian messenger channel)
- Planned: Heartbeat / Dead Man's Switch, SMS, Email, Webhook
- Core-Agnostic Architecture: Starts with Xray (including automatic installation and profile management), designed to support sing-box and other cores without changing the engine.
- Single Static Binary: Distributed via GitHub Releases (
muslstatic Linux binaries) with zero runtime dependencies on the target server.
Quick Install
Linux (recommended for servers)
Downloads the static binary, verifies SHA-256, installs Xray if needed, sets up /etc/proxy-pilot/config.yaml, and enables systemd:
|
macOS (Intel & Apple Silicon)
|
Windows (PowerShell)
irm https://raw.githubusercontent.com/amirhosein2004/proxy-pilot/main/scripts/install.ps1 | iex
Cargo (crates.io)
If you have Rust/Cargo installed:
Note:
cargo installonly installs theproxy-pilotbinary into~/.cargo/bin(it does not createconfig.yaml, install Xray, or set upsystemd). After installing with Cargo:
- Download
config.example.yamlasconfig.yaml, then runproxy-pilot import --config config.yamlandproxy-pilot run --config config.yaml.- Or, on a Linux server where you want automatic Xray +
systemdsetup, run the Linux installer script (scripts/install.sh) instead.
Manual install (Linux, without script)
# 1. Download binary + checksum (replace amd64 with arm64 on ARM servers)
# 2. Config & systemd service
# 3. Import your vless:// links
Quick Usage
# Import vless:// profiles interactively
# Benchmark all profiles in parallel and reorder by latency
# Remove all dead/unhealthy profiles
# Check active core and profile status
# Run the watchdog daemon in the foreground
Documentation
See docs/README.md for the full technical documentation index, architecture overview, coding standards, and extension guides.
License
MIT