Repository navigation
rusty-conduit-ssh v1.0.0
Initial stable release of rusty-conduit-ssh — a single-binary, cross-platform Rust CLI forward proxy supporting HTTP/HTTPS and SOCKS4/SOCKS4a/SOCKS5 that routes all upstream traffic and DNS through an auto-reconnecting OpenSSH dynamic tunnel (ssh -NT4D), with optional pure-Rust HTTPS MITM inspection.
Built with a pure-Rust TLS stack (rustls + ring, rcgen, p12-keystore) and zero OpenSSL dependencies, delegating SSH transport to the system OpenSSH ssh client.
Highlights
- Real OpenSSH Client, Unchanged:
- Spawns the system
sshbinary (--ssh-bin, defaultssh), so~/.ssh/config,ssh-agent,ProxyJump(-J), FIDO2/hardware keys, and interactive password or 2FA prompts all work natively. - Dedicated flags for common SSH options (
-p,-i,-F,-J,--ssh-ip-version) plus verbatim pass-through arguments after--.
- Spawns the system
- Auto-Reconnecting Tunnel Supervisor:
- Monitors the
ssh -N -T -4 -Dlistener with configurable keepalives (--ssh-server-alive-intervaldefault15s,--ssh-server-alive-count-maxdefault3) and startup deadline (--ssh-startup-timeoutdefault30s). - Automatically restarts dropped tunnels with exponential backoff (
--reconnect-initial-delaydefault1s,--reconnect-max-delaydefault30s), or exits immediately with--no-reconnect.
- Monitors the
- No Local DNS Leaks & Zero-Caching Architecture:
- All proxied hostnames are passed unresolved to the
ssh -DSOCKS5 listener so DNS resolution happens on the SSH target. - Never caches HTTP responses (plain or decrypted MITM), DNS lookups, upstream connections, or full request/response bodies. The only in-memory cache is for dynamically signed MITM leaf certificates, strictly bounded by
--mitm-cert-cache-max-entries(default10000) and--mitm-cert-ttl(default1h) with lazy read-time expiry and a periodic background reaper.
- All proxied hostnames are passed unresolved to the
- HTTP/HTTPS & SOCKS4/4a/5 with Flexible Port Layout:
- Separate ports by default (
3128HTTP/HTTPS,1080SOCKS4/4a/5). - Set both ports equal to enable automatic single-port first-byte multiplexing (
0x04→ SOCKS4/4a,0x05→ SOCKS5,A–Z→ HTTP). - Set either port to
0to disable that listener.
- Separate ports by default (
- Opt-In HTTPS MITM Inspection (OFF by default):
- Never auto-generates a CA; loads user-supplied PEM (
--mitm-ca-cert+--mitm-ca-key, including encrypted PKCS#8) or PKCS#12 (--mitm-ca-p12+ passphrase via env var or file). - Dynamically signs per-host ECDSA P-256 leaf certificates with a 5-minute clock-skew/grace buffer (
now - 5mtonow + TTL + 5m) and single-flight deduplication. - Supports HTTP/1.1, HTTP/2,
101 Switching Protocolsupgrades (e.g., WebSocket), and--socks-block-web-in-mitm.
- Never auto-generates a CA; loads user-supplied PEM (
- Resource Caps, Configuration & Logging:
--max-connections(default4096,0= unlimited) and cleanCtrl+C/ UnixSIGTERMshutdown with bounded connection draining and tunnel teardown.- Precedence:
CLI flags > RUSTY_CONDUIT_SSH_* env vars > --config <file.toml> > defaults. - 6 diagnostic levels on
stderr(QUIET,FATAL,ERROR,INFO,DEBUG,VERBOSE) plus structuredtext(logfmt) orjson(NDJSON) HTTP access logs and SOCKS connection logs.
Prebuilt Packages
Each archive includes the rusty-conduit-ssh binary, README.md, LICENSE (BSD-3-Clause), and docs/USER-GUIDE.md.
| Platform | Architecture | Package |
|---|---|---|
| Linux | x86_64 (amd64) |
rusty-conduit-ssh-v1.0.0-linux-amd64.tar.gz |
| Linux | ARM64 (arm64) |
rusty-conduit-ssh-v1.0.0-linux-arm64.tar.gz |
| macOS | Apple Silicon (arm64) |
rusty-conduit-ssh-v1.0.0-macos-arm64.tar.gz |
| macOS | Intel (amd64) |
rusty-conduit-ssh-v1.0.0-macos-amd64.tar.gz |
| Windows | x86_64 (amd64) |
rusty-conduit-ssh-v1.0.0-windows-amd64.zip |
| Windows | ARM64 (arm64) |
rusty-conduit-ssh-v1.0.0-windows-arm64.zip |
Verify downloads with SHA256SUMS.txt:
sha256sum -c SHA256SUMS.txt --ignore-missingDocumentation
- Overview & quick start:
README.md - Full CLI, environment, TOML, SSH, and MITM reference:
docs/USER-GUIDE.md
Full Changelog: https://github.com/jpbaking/rusty-conduit-ssh/commits/v1.0.0