1 unstable release
| new 0.1.0 | Dec 23, 2025 |
|---|
#30 in #pac
71KB
823 lines
proxyparser
A cross-platform system proxy detector written in Rust, with strong support for complex enterprise PAC scripts.
Currently fully supports macOS (manual + automatic proxy configuration).
Windows and Linux support is actively in development.
Features
-
Accurate system proxy detection across platforms
- macOS: Complete implementation using SystemConfiguration / CoreFoundation
- Windows: WinHTTP API (in progress)
- Linux: GNOME/KDE config reading (in progress)
-
Full-featured PAC script support
- Automatic download of PAC files (http/https)
- Pure-Rust JavaScript execution via
boa_engine - Implements all standard PAC functions (
dnsResolve,myIpAddress,isInNet,shExpMatch, etc.) - Handles complex enterprise scenarios (Zscaler, corporate networks, etc.)
-
Correct proxy priority order
- Environment variables (
HTTP_PROXY, etc.) → System proxy → DIRECT
- Environment variables (
-
Lightweight binary (~4.7 MB release build, heavily optimized)
Installation
cargo install proxyparser
# Query the proxy for a specific URL
proxyparser https://httpbin.org/ip
# Use the default target (google.com) if no URL is provided
proxyparser
git clone https://github.com/l16659/rustproxyparser.git
cd rustproxyparser
cargo build --release
./target/release/proxyparser https://example.com
# Current Status
This project is under active development and maintenance.
# License
This project is licensed under the MIT License.
Dependencies
~23–39MB
~585K SLoC