A Rust-based local proxy designed for developers, offering robust configuration and upstream authentication support.
- PAC File Support: Seamlessly reads and interprets
.pacfiles for dynamic proxy configuration. PAC files are always fetched using a DIRECT connection (no proxy). All standard PAC helper functions are supported, includingisPlainHostName,dnsDomainIs,localHostOrDomainIs,isResolvable,isInNet,dnsDomainLevels,shExpMatch, and more. - Protocol Support: Routes both HTTP (GET, POST, etc.) and HTTPS (CONNECT) traffic efficiently.
- Smart Exceptions: configure exceptions based on domains, glob patterns, or IP addresses.
- Corporate Authentication: Supports Basic, NTLM, and Kerberos authentication for upstream proxies.
- Developer Friendly:
- Easy debugging with detailed logging.
- Simple configuration via a TOML file.
FerroVela includes a simple graphical interface for managing the configuration.
To launch the configuration editor:
./target/release/ferrovelaFerroVela supports multiple authentication methods for upstream proxies:
To use NTLM authentication:
- Set
auth_type = "ntlm"inconfig.toml. - Provide
username,password,domain, andworkstation.
[upstream]
auth_type = "ntlm"
username = "user"
password = "password"
domain = "CORP"
workstation = "MYPC"
proxy_url = "http://proxy.corp.com:8080"To use Kerberos authentication:
- Ensure your machine is joined to the domain or you have a valid Kerberos ticket (obtainable via
kinit). - Set
auth_type = "kerberos"inconfig.toml. - FerroVela will automatically use the cached credentials (TGT) to authenticate with the upstream proxy using SPNEGO.
[upstream]
auth_type = "kerberos"
proxy_url = "http://proxy.corp.com:8080"
# username/password/domain are ignored for Kerberos (uses system ticket)To use Basic authentication:
[upstream]
auth_type = "basic"
username = "user"
password = "password"
proxy_url = "http://proxy.corp.com:8080"Configuration can also be manually managed through a config.toml file.
[proxy]
port = 3128
pac_file = "http://wpad/wpad.dat" # or local path
[upstream]
auth_type = "ntlm" # or "basic", "kerberos", "none"
username = "user"
password = "password"
domain = "CORP" # Required for NTLM
workstation = "WORKSTATION" # Optional for NTLM
proxy_url = "http://upstream:8080"
[exceptions]
# bypass upstream proxy for these
hosts = ["localhost", "127.0.0.1", "*.local"]- Install Rust: Ensure you have Rust and Cargo installed.
- Install Dependencies:
- On Ubuntu/Debian:
sudo apt-get install libkrb5-dev libgssapi-krb5-2 - On MacOS: usually installed by default (via Xcode Command Line Tools).
- On Ubuntu/Debian:
- Build:
cargo build --release - Run:
./target/release/ferrovela
FerroVela includes a performance test suite to measure throughput and latency of the proxy logic.
To run the performance tests:
cargo test performance_tests -- --nocaptureThe output will display metrics such as:
- Total Requests
- Successful Requests
- Total Duration
- Requests Per Second (RPS)
Example output:
Starting performance test with 50 clients, 100 requests each (Total: 5000)
Performance Test Results:
Total Requests: 5000
Successful Requests: 5000
Total Duration: 800.16ms
Requests Per Second (RPS): 6248.71
pingora: For proxying and low-level HTTP handling.tokio: Asynchronous runtime.musli/serde/toml: Configuration parsing and serialization.boa_engine: Pure Rust JavaScript engine for PAC file evaluation.reqwest: HTTP client for remote PAC file fetching (DIRECT, no-proxy).iced: For the graphical user interface.libgssapi: For Kerberos/GSSAPI integration.ntlmclient: For NTLMv2 authentication.
See CHANGELOG.md for a detailed list of changes.
To run FerroVela as a background service on MacOS using launchd, you can use the provided installation script.
-
Run the install script:
./service/macos/install.sh
This script will:
- Build the release binary.
- Install the binary to
~/.local/bin/ferrovela. - Install the configuration to
~/.config/ferrovela/config.toml(if not already present). - Create and load a
launchdplist at~/Library/LaunchAgents/com.ferrovela.plist.
-
Manage the service:
- Stop:
launchctl unload ~/Library/LaunchAgents/com.ferrovela.plist - Start:
launchctl load ~/Library/LaunchAgents/com.ferrovela.plist - Logs: Check
/tmp/ferrovela.logand/tmp/ferrovela.err.
- Stop:
Ensure ~/.local/bin is in your PATH if you want to run ferrovela manually from the command line.