Skip to content

rusty-conduit v1.0.0

Choose a tag to compare

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

Initial stable release of rusty-conduit — a lightweight, cross-platform Rust CLI proxy server supporting HTTP/HTTPS and SOCKS4/SOCKS4a/SOCKS5 with optional pure-Rust HTTPS MITM inspection.

Built with a pure-Rust TLS stack (rustls + ring, rcgen, p12-keystore) and zero OpenSSL or native system library dependencies.


Highlights

  • Zero-Caching Architecture:
    • 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 Proxy (--http-port, default 3128):
    • Streaming plain HTTP forwarding with RFC 9110 hop-by-hop header stripping.
    • Opaque CONNECT tunneling when MITM is off.
  • SOCKS4, SOCKS4a & SOCKS5 (--socks-port, default 1080):
    • TCP CONNECT supporting IPv4, IPv6, and proxy-side domain resolution.
    • Optional --socks-block-web-in-mitm guard to reject HTTP/HTTPS traffic over SOCKS when MITM is active while keeping raw TCP and server-speaks-first protocols (e.g., SSH, SMTP, Postgres) working normally.
  • Flexible Port Layout:
    • Separate ports by default (3128 HTTP/HTTPS, 1080 SOCKS).
    • 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, and 101 Switching Protocols upgrades (e.g., WebSocket).
    • Full CA generation and OS/browser trust guide in docs/MITM-CA-GUIDE.md.
  • Resource Caps & Graceful Shutdown:
    • --max-connections (default 4096, 0 = unlimited) drops excess incoming connections immediately with no queueing.
    • --mitm-cert-cache-max-entries (default 10000, 0 = unlimited) reaps expired entries first, then evicts the oldest entries.
    • Clean Ctrl+C / Unix SIGTERM shutdown with bounded connection draining and log flushing.
  • Configuration & Logging:
    • Precedence: CLI flags > RUSTY_CONDUIT_* 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 (also dumped to stdout at DEBUG/VERBOSE).

Prebuilt Packages

Each archive includes the rusty-conduit binary, README.md, LICENSE (BSD-3-Clause), and docs/MITM-CA-GUIDE.md.

Platform Architecture Package
Linux x86_64 (amd64) rusty-conduit-v1.0.0-linux-amd64.tar.gz
Linux ARM64 (arm64) rusty-conduit-v1.0.0-linux-arm64.tar.gz
macOS Apple Silicon (arm64) rusty-conduit-v1.0.0-macos-arm64.tar.gz
macOS Intel (amd64) rusty-conduit-v1.0.0-macos-amd64.tar.gz
Windows x86_64 (amd64) rusty-conduit-v1.0.0-windows-amd64.zip
Windows ARM64 (arm64) rusty-conduit-v1.0.0-windows-arm64.zip

Verify downloads with SHA256SUMS.txt:

sha256sum -c SHA256SUMS.txt --ignore-missing

Documentation & Roadmap

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