Skip to content

Releases

rusty-conduit-ssh v2.2.0

Choose a tag to compare

@github-actions github-actions released this 27 Nov 03:27

New

  • MITM upstream TLS certificate trust controls: When MITM is enabled, you can now relax upstream certificate verification for specific hosts, wildcards, IPs, or CIDRs with --mitm-insecure-host <RULE> (RUSTY_CONDUIT_SSH_MITM_INSECURE_HOST, [mitm] insecure_hosts), or for all upstreams with --mitm-insecure (RUSTY_CONDUIT_SSH_MITM_INSECURE, [mitm] insecure = true). Strict verification remains the default, TLS handshake signatures are still verified, and relaxed modes log explicit WARN: lines on startup and validate.
  • HTML proxy error pages & custom templates: Proxy-generated HTTP errors (400, 403, 407, 502, 504, etc.) now serve a clean, unbranded built-in HTML5 error page instead of plain text. You can supply a custom HTML template via --error-page <PATH>, RUSTY_CONDUIT_SSH_ERROR_PAGE, or top-level TOML error_page = "/path/to/error.html" using {{status}}, {{reason}}, {{message}}, and {{target}} placeholders. Upstream origin 4xx/5xx responses are always passed through untouched.

Changed

  • validate checks that any configured error_page template file exists and is readable (unless --settings-only is passed) and reports any relaxed MITM TLS trust warnings.
  • Updated rusty-conduit-engine to v0.5.0.

Full Changelog: v2.1.0...v2.2.0

rusty-conduit-ssh v2.1.0

Choose a tag to compare

@github-actions github-actions released this 26 Nov 23:06

Changed

  • Startup checks local problems before it launches ssh. A missing or unreadable -i key, an unreadable or broken SSH config (checked with ssh -G), a missing ssh program, or a bad MITM CA now stops the proxy at once with one FATAL line, instead of turning into failed logins and reconnects against the SSH server.
  • validate now runs the same checks and also checks that each log file can be opened (without creating it) and prints the open-file NOTICE startup would log. It still never connects to the SSH server: ssh -G only evaluates the SSH config. config OK now means the configuration will not stop the proxy at startup.

New

  • validate --settings-only keeps the previous behaviour and checks only the settings. Use it where the files exist only on the server, for example in CI.

Docs

  • The Docker guide's validate examples mount the SSH files, since validate now reads them, and the guide suggests --restart on-failure:5 while you set things up, so a broken configuration stops after five failed starts instead of restarting forever.

If you run validate somewhere the SSH files, CA, or log directory do not exist, add --settings-only.

rusty-conduit-ssh v2.0.0

Choose a tag to compare

@github-actions github-actions released this 26 Nov 22:29

Breaking changes

  • Removed the retired name for SOCKS web blocking. The hidden --socks-block-web-in-mitm flag, RUSTY_CONDUIT_SSH_SOCKS_BLOCK_WEB_IN_MITM, and the [mitm] socks_block_web TOML key are gone. Use --socks-block-web, RUSTY_CONDUIT_SSH_SOCKS_BLOCK_WEB, or the top-level socks_block_web key. The old flag is now a usage error and the old key fails with unknown field. The startup summary prints socks_block_web=.
  • Container user and group are now 10001:10001. The image sets a numeric USER 10001:10001; the group ID was 999 before. Update anything that grants access by the old group.

New

  • validate [TARGET] subcommand: loads and checks CLI flags, environment variables, and the TOML file without starting ssh or binding listeners, then exits 0 or 1.
  • Automatic open-file limit: on Unix, the soft RLIMIT_NOFILE is raised at startup to fit the forward plus reverse connection caps, before ssh starts, with a NOTICE when the hard limit is too low.
  • Engine v0.4.1: listeners request a 4096 listen backlog, and access-log files are written as records arrive instead of in 8 KiB blocks.

Changes

  • Default --mitm-cert-cache-max-entries is 10240 (was 10000).
  • Container image: MALLOC_ARENA_MAX=2 keeps memory at about 7 MB idle on any CPU count (it was 42 MB on 18 CPUs), and /var/log/rusty-conduit-ssh is writable for named volumes.
  • Containers: the Docker guide now mounts SSH files at /ssh with -F /ssh/config, and on Linux runs the container as your own UID (--user "$(id -u):$(id -g)"), so keys stay at mode 600 with no chown.
  • --help describes the ssh -D tunnel and matches the rest of the family.
  • Docs: Basic and Advanced user guides, MITM CA guide, sizing guide, and Docker guide with tested Compose examples; release archives include the whole docs/ folder. Docs now pin the image as ghcr.io/jpbaking/rusty-conduit-ssh:2.

rusty-conduit-ssh v1.5.0

Choose a tag to compare

@github-actions github-actions released this 26 Nov 11:32

New

  • Allowlist exceptions to blocklist: Combining allowlist and blocklist rules now lets allowlist entries punch specific exceptions through broader blocklist rules (powered by rusty-conduit-engine v0.3.0).
  • Standalone --socks-block-web: Blocking web ports (80/443) on the SOCKS listener can now be enabled independently without requiring MITM to be active.

Changed

  • Updated rusty-conduit-engine to v0.3.0.

Full Changelog: v1.4.0...v1.5.0

rusty-conduit-ssh v1.4.0

Choose a tag to compare

@github-actions github-actions released this 25 Nov 21:12

What's Changed

Shared Engine Migration (rusty-conduit-engine v0.2.0)

  • Ported rusty-conduit-ssh onto the shared rusty-conduit-engine v0.2.0 crate (default-features = false).
  • Preserved exact v1.3.0 CLI --help output, error exit codes, direction=forward|reverse access-log schema, reconnect behavior, and reverse-proxy filtering.

Fixes & Divergence Ledger Notes (docs/DIVERGENCE-LEDGER.md)

  • E4-01 (option, logging): Uses ProxyDirection + AccessLogger::with_direction(...) alongside with_routing_fields(false) so forward and reverse servers share one writer while keeping the exact v1.3.0 direction=forward|reverse log schema (omitting rule, profile, and upstream).
  • E4-02 (keep, net, upstream): Socks5UpstreamDialer implements rusty_conduit_engine::upstream::UpstreamDialer (UpstreamStream::Tcp, typed DialError::NotConnected/Timeout) and is registered as an API-only ProfileType::External profile (ssh-tunnel). Forward HostFilter runs in the router without local DNS.
  • E4-03 (keep, reverse, server, filter): ReverseProxy runs as a second engine Server with direct egress and its reverse HostFilter on DialerOptions only, preserving resolved-IP checking for IP/CIDR-only allowlists.
  • E4-04 (keep / fix, http, socks, mitm): Status and reply mapping flows through typed DialError with identical HTTP (403/502/504) and SOCKS (0x01–0x05) codes; MitmState dials through routing and inherits the E2 MITM CA loader fixes:
    • E2-01 (fix, mitm::ca): Unencrypted EC private keys with explicit P-256/P-384 curve parameters now load automatically; other explicit curves return CaError::ExplicitEcParameters with an openssl ec -param_enc named_curve hint.
    • E2-02 (fix, mitm::ca): Keys encrypted with PBES2 HMAC-SHA1 PRF now fail early with CaError::Pbes2Sha1Prf and a corrected OpenSSL/PKCS#12 re-encryption hint.

Full Changelog: v1.3.0...v1.4.0

rusty-conduit-ssh v1.3.0

Choose a tag to compare

@github-actions github-actions released this 24 Nov 20:42

New

  • TCP keepalive on forward and reverse sockets: Enabled SO_KEEPALIVE on accepted client sockets for both forward and reverse listeners and on reverse proxy upstream dials, preventing NAT/firewall/VPN idle timeouts from silently dropping long-lived idle connections.
  • Defaults to 60s idle, 10s interval, 5 retries; configurable via --tcp-keepalive, --tcp-keepalive-interval, --tcp-keepalive-retries (RUSTY_CONDUIT_SSH_TCP_KEEPALIVE* and TOML; set 0 to disable). Settings are validated at startup and shown in the startup summary.

Docs

  • Documented connection lifetime, per-hop keepalive ownership, and how sshd's GatewayPorts (no, clientspecified, yes) controls the effective reverse proxy bind address (with sshd -T inspection and --reverse-block guidance).

Full Changelog: v1.2.0...v1.3.0

rusty-conduit-ssh v1.2.0

Choose a tag to compare

@github-actions github-actions released this 24 Nov 13:14

New

  • Independent reverse proxy connection cap: Added --reverse-max-connections (RUSTY_CONDUIT_SSH_REVERSE_MAX_CONNECTIONS, [reverse] max_connections) so the reverse proxy can enforce its own concurrent connection limit separate from the forward proxy. When unset, it inherits --max-connections so existing configurations behave unchanged.

Changed

  • The startup configuration summary now reports reverse_max_connections.

Docs

  • Documented per-direction connection caps (shared by each direction's HTTP and SOCKS listeners) in the user guide.

Full Changelog: v1.1.0...v1.2.0

rusty-conduit-ssh v1.1.0

Choose a tag to compare

@github-actions github-actions released this 23 Nov 07:07

Feature release for rusty-conduit-ssh — adding an optional reverse proxy (ssh -R), destination allowlist/blocklist filtering for both forward and reverse paths, and direction tagging in HTTP and SOCKS access logs.


What's Changed

  • Optional Reverse Proxy (ssh -R):
    • Expose an HTTP/HTTPS and/or SOCKS4/4a/5 proxy on the SSH target over the same supervised SSH connection so clients on the remote host can egress through your machine (--reverse-bind, --reverse-http-port, --reverse-socks-port; env RUSTY_CONDUIT_SSH_REVERSE_*; TOML [reverse]).
    • Supports separate ports, first-byte protocol multiplexing when both reverse ports match, or reverse-only mode (--http-port 0 --socks-port 0).
    • Dials directly from the local machine (never looping back through ssh -D), keeps ephemeral local loopback listeners stable across reconnects, enforces --max-connections independently from the forward proxy, supports optional HTTPS MITM with its own certificate cache, and drains cleanly on shutdown.
    • Defaults to 127.0.0.1 on the SSH target and logs a security notice when bound to a non-loopback address.
  • Destination Allowlist & Blocklist Filtering:
    • Added mutually exclusive destination filters independently for the forward proxy (--allow / --block, RUSTY_CONDUIT_SSH_ALLOW / RUSTY_CONDUIT_SSH_BLOCK, TOML allow / block) and reverse proxy (--reverse-allow / --reverse-block, RUSTY_CONDUIT_SSH_REVERSE_ALLOW / RUSTY_CONDUIT_SSH_REVERSE_BLOCK, TOML reverse.allow / reverse.block).
    • Matches IPv4/IPv6 addresses (including IPv4-mapped IPv6), CIDR subnets, exact FQDNs, and *.domain subdomain wildcards; repeatable or comma-separated.
    • On the reverse path, hostnames are resolved locally before connecting so IP/CIDR rules also block DNS-to-loopback / DNS-rebinding bypasses (e.g., blocking 127.0.0.0/8,::1,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16 prevents remote clients from reaching your loopback or LAN). On the forward path, DNS remains remote-only.
    • Rejected requests return HTTP 403 Forbidden, SOCKS5 0x02 (not_allowed), or SOCKS4 0x5B.
  • Access-Log Direction Tagging:
    • Added direction=forward (local → SSH target via -D) and direction=reverse (SSH target → local via -R) to all HTTP (kind=http) and SOCKS (kind=socks) access log records in both text (logfmt) and json (NDJSON) formats.
  • Tests & Documentation:
    • Added end-to-end integration tests for reverse proxying (tests/reverse_proxy.rs) and destination filtering (tests/filter_proxy.rs), and updated README.md and docs/USER-GUIDE.md with full reference tables, examples, and security notes (c7949fd).

Docker Image

# Publish to host loopback only (recommended — v1 has no proxy authentication)
docker run --rm \
  -p 127.0.0.1:3128:3128 \
  -p 127.0.0.1:1080:1080 \
  -v ~/.ssh:/home/rusty-conduit-ssh/.ssh:ro \
  ghcr.io/jpbaking/rusty-conduit-ssh:1.1.0 my-bastion

Available tags: 1.1.0, 1.1, 1, latest (linux/amd64, linux/arm64).


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.1.0-linux-amd64.tar.gz
Linux ARM64 (arm64) rusty-conduit-ssh-v1.1.0-linux-arm64.tar.gz
macOS Apple Silicon (arm64) rusty-conduit-ssh-v1.1.0-macos-arm64.tar.gz
macOS Intel (amd64) rusty-conduit-ssh-v1.1.0-macos-amd64.tar.gz
Windows x86_64 (amd64) rusty-conduit-ssh-v1.1.0-windows-amd64.zip
Windows ARM64 (arm64) rusty-conduit-ssh-v1.1.0-windows-arm64.zip

Verify downloads with SHA256SUMS.txt:

sha256sum -c SHA256SUMS.txt --ignore-missing

Documentation

Full Changelog: v1.0.1...v1.1.0

rusty-conduit-ssh v1.0.1

Choose a tag to compare

@github-actions github-actions released this 23 Nov 01:55

Maintenance and container-distribution release for rusty-conduit-ssh — adding official multi-arch Docker images on GHCR (with openssh-client pre-installed) and fixing a MITM certificate-cache count race.


What's Changed

  • Official Multi-Arch Docker Images (GHCR):
    • Published to ghcr.io/jpbaking/rusty-conduit-ssh for linux/amd64 and linux/arm64 on every release (1.0.1, 1.0, 1, latest).
    • Built on Ubuntu 26.04 LTS with apt-get dist-upgrade, openssh-client, ca-certificates (for upstream TLS verification in MITM mode), a dedicated non-root user (rusty-conduit-ssh, UID 10001, home /home/rusty-conduit-ssh for mounting .ssh), and RUSTY_CONDUIT_SSH_BIND=0.0.0.0 by default.
    • Multi-stage Dockerfile supports both local docker build . and fast native CI packaging.
  • MITM Certificate Cache Concurrency Fix:
    • Synchronized CertCache::len with insert_lock to prevent torn DashMap counts under concurrent insertions and evictions (190b2d7).
  • CI & Packaging:
    • Added a Docker Build verification job to CI and pinned Linux amd64 release builds to ubuntu-24.04 for broad glibc compatibility.

Docker Image

# Publish to host loopback only (recommended — v1 has no proxy authentication)
docker run --rm \
  -p 127.0.0.1:3128:3128 \
  -p 127.0.0.1:1080:1080 \
  -v ~/.ssh:/home/rusty-conduit-ssh/.ssh:ro \
  ghcr.io/jpbaking/rusty-conduit-ssh:1.0.1 my-bastion

Available tags: 1.0.1, 1.0, 1, latest (linux/amd64, linux/arm64).


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.1-linux-amd64.tar.gz
Linux ARM64 (arm64) rusty-conduit-ssh-v1.0.1-linux-arm64.tar.gz
macOS Apple Silicon (arm64) rusty-conduit-ssh-v1.0.1-macos-arm64.tar.gz
macOS Intel (amd64) rusty-conduit-ssh-v1.0.1-macos-amd64.tar.gz
Windows x86_64 (amd64) rusty-conduit-ssh-v1.0.1-windows-amd64.zip
Windows ARM64 (arm64) rusty-conduit-ssh-v1.0.1-windows-arm64.zip

Verify downloads with SHA256SUMS.txt:

sha256sum -c SHA256SUMS.txt --ignore-missing

Documentation

Full Changelog: v1.0.0...v1.0.1

rusty-conduit-ssh v1.0.0

Choose a tag to compare

@github-actions github-actions released this 22 Nov 23:32

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