Skip to content

rusty-conduit-ssh v1.0.0

Choose a tag to compare

@github-actions github-actions released this 22 Nov 23:32
· 20 commits to main since this release

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 ssh binary (--ssh-bin, default ssh), 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 --.
  • Auto-Reconnecting Tunnel Supervisor:
    • Monitors the ssh -N -T -4 -D listener with configurable keepalives (--ssh-server-alive-interval default 15s, --ssh-server-alive-count-max default 3) and startup deadline (--ssh-startup-timeout default 30s).
    • Automatically restarts dropped tunnels with exponential backoff (--reconnect-initial-delay default 1s, --reconnect-max-delay default 30s), or exits immediately with --no-reconnect.
  • No Local DNS Leaks & Zero-Caching Architecture:
    • All proxied hostnames are passed unresolved to the ssh -D SOCKS5 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 (default 10000) and --mitm-cert-ttl (default 1h) with lazy read-time expiry and a periodic background reaper.
  • HTTP/HTTPS & SOCKS4/4a/5 with Flexible Port Layout:
    • Separate ports by default (3128 HTTP/HTTPS, 1080 SOCKS4/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 0 to disable that listener.
  • 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 - 5m to now + TTL + 5m) and single-flight deduplication.
    • Supports HTTP/1.1, HTTP/2, 101 Switching Protocols upgrades (e.g., WebSocket), and --socks-block-web-in-mitm.
  • Resource Caps, Configuration & Logging:
    • --max-connections (default 4096, 0 = unlimited) and clean Ctrl+C / Unix SIGTERM shutdown 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 structured text (logfmt) or json (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-missing

Documentation

Full Changelog: https://github.com/jpbaking/rusty-conduit-ssh/commits/v1.0.0