Repository navigation
Releases
rusty-conduit-ssh v2.2.0
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 explicitWARN:lines on startup andvalidate. - 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 TOMLerror_page = "/path/to/error.html"using{{status}},{{reason}},{{message}}, and{{target}}placeholders. Upstream origin 4xx/5xx responses are always passed through untouched.
Changed
validatechecks that any configurederror_pagetemplate file exists and is readable (unless--settings-onlyis passed) and reports any relaxed MITM TLS trust warnings.- Updated
rusty-conduit-enginetov0.5.0.
Full Changelog: v2.1.0...v2.2.0
rusty-conduit-ssh v2.1.0
Changed
- Startup checks local problems before it launches
ssh. A missing or unreadable-ikey, an unreadable or broken SSH config (checked withssh -G), a missingsshprogram, or a bad MITM CA now stops the proxy at once with oneFATALline, instead of turning into failed logins and reconnects against the SSH server. validatenow runs the same checks and also checks that each log file can be opened (without creating it) and prints the open-fileNOTICEstartup would log. It still never connects to the SSH server:ssh -Gonly evaluates the SSH config.config OKnow means the configuration will not stop the proxy at startup.
New
validate --settings-onlykeeps 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
validateexamples mount the SSH files, sincevalidatenow reads them, and the guide suggests--restart on-failure:5while 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
Breaking changes
- Removed the retired name for SOCKS web blocking. The hidden
--socks-block-web-in-mitmflag,RUSTY_CONDUIT_SSH_SOCKS_BLOCK_WEB_IN_MITM, and the[mitm] socks_block_webTOML key are gone. Use--socks-block-web,RUSTY_CONDUIT_SSH_SOCKS_BLOCK_WEB, or the top-levelsocks_block_webkey. The old flag is now a usage error and the old key fails withunknown field. The startup summary printssocks_block_web=. - Container user and group are now
10001:10001. The image sets a numericUSER 10001:10001; the group ID was999before. 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 startingsshor binding listeners, then exits0or1.- Automatic open-file limit: on Unix, the soft
RLIMIT_NOFILEis raised at startup to fit the forward plus reverse connection caps, beforesshstarts, with aNOTICEwhen 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-entriesis10240(was10000). - Container image:
MALLOC_ARENA_MAX=2keeps memory at about 7 MB idle on any CPU count (it was 42 MB on 18 CPUs), and/var/log/rusty-conduit-sshis writable for named volumes. - Containers: the Docker guide now mounts SSH files at
/sshwith-F /ssh/config, and on Linux runs the container as your own UID (--user "$(id -u):$(id -g)"), so keys stay at mode600with nochown. --helpdescribes thessh -Dtunnel 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 asghcr.io/jpbaking/rusty-conduit-ssh:2.
rusty-conduit-ssh v1.5.0
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-enginetov0.3.0.
Full Changelog: v1.4.0...v1.5.0
rusty-conduit-ssh v1.4.0
What's Changed
Shared Engine Migration (rusty-conduit-engine v0.2.0)
- Ported
rusty-conduit-sshonto the sharedrusty-conduit-enginev0.2.0crate (default-features = false). - Preserved exact v1.3.0 CLI
--helpoutput, error exit codes,direction=forward|reverseaccess-log schema, reconnect behavior, and reverse-proxy filtering.
Fixes & Divergence Ledger Notes (docs/DIVERGENCE-LEDGER.md)
- E4-01 (
option,logging): UsesProxyDirection+AccessLogger::with_direction(...)alongsidewith_routing_fields(false)so forward and reverse servers share one writer while keeping the exact v1.3.0direction=forward|reverselog schema (omittingrule,profile, andupstream). - E4-02 (
keep,net,upstream):Socks5UpstreamDialerimplementsrusty_conduit_engine::upstream::UpstreamDialer(UpstreamStream::Tcp, typedDialError::NotConnected/Timeout) and is registered as an API-onlyProfileType::Externalprofile (ssh-tunnel). ForwardHostFilterruns in the router without local DNS. - E4-03 (
keep,reverse,server,filter):ReverseProxyruns as a second engineServerwith direct egress and its reverseHostFilteronDialerOptionsonly, preserving resolved-IP checking for IP/CIDR-only allowlists. - E4-04 (
keep/fix,http,socks,mitm): Status and reply mapping flows through typedDialErrorwith identical HTTP (403/502/504) and SOCKS (0x01–0x05) codes;MitmStatedials 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 returnCaError::ExplicitEcParameterswith anopenssl ec -param_enc named_curvehint. - E2-02 (
fix,mitm::ca): Keys encrypted with PBES2 HMAC-SHA1 PRF now fail early withCaError::Pbes2Sha1Prfand a corrected OpenSSL/PKCS#12 re-encryption hint.
- E2-01 (
Full Changelog: v1.3.0...v1.4.0
rusty-conduit-ssh v1.3.0
New
- TCP keepalive on forward and reverse sockets: Enabled
SO_KEEPALIVEon 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
60sidle,10sinterval,5retries; configurable via--tcp-keepalive,--tcp-keepalive-interval,--tcp-keepalive-retries(RUSTY_CONDUIT_SSH_TCP_KEEPALIVE*and TOML; set0to disable). Settings are validated at startup and shown in the startup summary.
Docs
- Documented connection lifetime, per-hop keepalive ownership, and how
sshd'sGatewayPorts(no,clientspecified,yes) controls the effective reverse proxy bind address (withsshd -Tinspection and--reverse-blockguidance).
Full Changelog: v1.2.0...v1.3.0
rusty-conduit-ssh v1.2.0
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-connectionsso 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
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; envRUSTY_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-connectionsindependently from the forward proxy, supports optional HTTPS MITM with its own certificate cache, and drains cleanly on shutdown. - Defaults to
127.0.0.1on the SSH target and logs a security notice when bound to a non-loopback address.
- 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 (
- Destination Allowlist & Blocklist Filtering:
- Added mutually exclusive destination filters independently for the forward proxy (
--allow/--block,RUSTY_CONDUIT_SSH_ALLOW/RUSTY_CONDUIT_SSH_BLOCK, TOMLallow/block) and reverse proxy (--reverse-allow/--reverse-block,RUSTY_CONDUIT_SSH_REVERSE_ALLOW/RUSTY_CONDUIT_SSH_REVERSE_BLOCK, TOMLreverse.allow/reverse.block). - Matches IPv4/IPv6 addresses (including IPv4-mapped IPv6), CIDR subnets, exact FQDNs, and
*.domainsubdomain 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/16prevents remote clients from reaching your loopback or LAN). On the forward path, DNS remains remote-only. - Rejected requests return HTTP
403 Forbidden, SOCKS50x02(not_allowed), or SOCKS40x5B.
- Added mutually exclusive destination filters independently for the forward proxy (
- Access-Log Direction Tagging:
- Added
direction=forward(local → SSH target via-D) anddirection=reverse(SSH target → local via-R) to all HTTP (kind=http) and SOCKS (kind=socks) access log records in bothtext(logfmt) andjson(NDJSON) formats.
- Added
- Tests & Documentation:
- Added end-to-end integration tests for reverse proxying (
tests/reverse_proxy.rs) and destination filtering (tests/filter_proxy.rs), and updatedREADME.mdanddocs/USER-GUIDE.mdwith full reference tables, examples, and security notes (c7949fd).
- Added end-to-end integration tests for reverse proxying (
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-bastionAvailable 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-missingDocumentation
- Overview & quick start:
README.md - Full CLI, environment, TOML, SSH, reverse proxy, filtering, and MITM reference:
docs/USER-GUIDE.md
Full Changelog: v1.0.1...v1.1.0
rusty-conduit-ssh v1.0.1
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-sshforlinux/amd64andlinux/arm64on 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, UID10001, home/home/rusty-conduit-sshfor mounting.ssh), andRUSTY_CONDUIT_SSH_BIND=0.0.0.0by default. - Multi-stage
Dockerfilesupports both localdocker build .and fast native CI packaging.
- Published to
- MITM Certificate Cache Concurrency Fix:
- Synchronized
CertCache::lenwithinsert_lockto prevent tornDashMapcounts under concurrent insertions and evictions (190b2d7).
- Synchronized
- CI & Packaging:
- Added a
Docker Buildverification job to CI and pinned Linuxamd64release builds toubuntu-24.04for broad glibc compatibility.
- Added a
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
- Overview & quick start:
README.md - Full CLI, environment, TOML, SSH, and MITM reference:
docs/USER-GUIDE.md
Full Changelog: v1.0.0...v1.0.1
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