A Rust-based sshuttle-style transparent proxy orchestrator. It turns an upstream SOCKS/HTTP proxy into system-wide traffic steering, with native backends for Linux and Windows.
- Upstream proxy types:
socks5,socks4,http(CONNECT) - Linux transparent backend:
iptables/ip6tablesandnftselector - Linux bypass controls:
--bypass-uid,--bypass-gid - Windows modes:
system-proxy(WinINET registry)transparent(built-in native WinDivert dataplane, with external engine fallback)
- DNS capture: optional (
--dns-capture), SOCKS5 UDP path supported - Operations helpers:
doctor,cleanup - Policy engine: JSON/YAML (
--policy-file) +explain+doctor --bypass-check-process
sshuttle-rs is usable as a preview/early release. The core paths are implemented and CI-covered, but long-running production validation is still ongoing.
cargo run -- run --mode transparent --proxy 127.0.0.1:1080 --proxy-type socks5 --listen 127.0.0.1:18080UDP capture (non-DNS) example on Linux:
sudo cargo run -- run \
--mode transparent \
--proxy 127.0.0.1:1080 \
--proxy-type socks5 \
--udp-capture \
--udp-listen 127.0.0.1:19090 \
--udp-port 443 \
--udp-port 3478Linux (kernel-level owner match):
sudo cargo run -- run \
--mode transparent \
--proxy 127.0.0.1:1080 \
--proxy-type socks5 \
--bypass-uid 1001 \
--bypass-gid 1001Windows (transparent mode; passed to worker/native backend):
cargo run -- run `
--mode transparent `
--platform windows `
--proxy 127.0.0.1:1080 `
--proxy-type socks5 `
--bypass-process "program-a.exe" `
--bypass-process "program-b.exe"Policy file (recommended for precise matching):
cargo run -- run `
--mode transparent `
--platform windows `
--proxy 127.0.0.1:1080 `
--proxy-type socks5 `
--policy-file .\\examples\\policy.sample.yamlWindows native dataplane dependency (required):
- place
WinDivert.dlland matchingWinDivert*.sysbesidesshuttle-rs.exe - or set build/runtime env to driver bundle path via
WINDIVERT_PATH - run in elevated shell (Administrator)
- Official release zip already bundles WinDivert runtime for
x86_64andi686Windows targets.
You can use either json or yaml; see:
examples/policy.sample.yamlexamples/policy.sample.json
Dry-run:
cargo run -- run --mode transparent --proxy 127.0.0.1:1080 --proxy-type socks5 --dry-runDoctor:
cargo run -- doctor --mode transparent --platform auto --linux-backend auto --dns-captureDoctor bypass-check with policy:
cargo run -- doctor `
--platform windows `
--policy-file .\\examples\\policy.sample.yaml `
--bypass-check-process "sslocal.exe" `
--bypass-check-dst 8.8.8.8:443 `
--bypass-check-proto tcp `
--policy-strictExplain one flow:
cargo run -- explain `
--policy-file .\\examples\\policy.sample.yaml `
--process-name "sslocal.exe" `
--dst 8.8.8.8:443 `
--proto tcpCleanup:
cargo run -- cleanup --mode transparent --platform auto --listen 127.0.0.1:18080| Capability | Linux | Windows |
|---|---|---|
| Transparent TCP redirect | Yes | Yes (built-in WinDivert dataplane) |
| Per-process bypass | Yes (uid/gid) |
Yes (--bypass-process and policy) |
| DNS capture | Yes | Yes (--dns-capture) |
| UDP capture (non-DNS) | Yes (selected UDP ports) | Yes (selected UDP ports) |
| IPv6 packet handling | Linux backend-dependent | Yes on native dataplane practical path |
| Upstream socks5/socks4/http | Yes | Yes |
CI runs:
cargo checkcargo testcargo clippy -D warnings
Release is tag-driven (v*) with multi-arch artifacts.
Build matrix:
- Linux AMD64:
x86_64-unknown-linux-gnu - Linux ARM64:
aarch64-unknown-linux-gnu - Linux ARM32:
armv7-unknown-linux-gnueabihf - Linux RISC-V64 (best-effort):
riscv64gc-unknown-linux-gnu - macOS Apple Silicon (M-series):
aarch64-apple-darwin - Windows AMD64:
x86_64-pc-windows-msvc - Windows ARM64:
aarch64-pc-windows-msvc - Windows 32-bit x86:
i686-pc-windows-msvc
Native packaging note:
- Windows release artifact must include:
sshuttle-rs.exeWinDivert.dllWinDivert64.sys(and architecture variants when applicable)
aarch64-pc-windows-msvcartifact includes a note file only for WinDivert runtime because official WinDivert arm64 package is unavailable.