Repository navigation
Releases
rusty-conduit 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_MITM_INSECURE_HOST,[mitm] insecure_hosts), or for all upstreams with--mitm-insecure(RUSTY_CONDUIT_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_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 v2.1.0
Changed
validatenow also checks the files your configuration names, as startup would: it loads the MITM CA (files, passphrase, validity, and that the key matches the certificate), checks that each log file can be opened without creating it, and prints the open-fileNOTICEstartup would log.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 suggests
--restart on-failure:5(Compose: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 CA or log directory does not exist, add --settings-only.
rusty-conduit v2.0.0
Breaking changes
- Removed the retired name for SOCKS web blocking. The hidden
--socks-block-web-in-mitmflag,RUSTY_CONDUIT_SOCKS_BLOCK_WEB_IN_MITM, and the[mitm] socks_block_webTOML key are gone. Use--socks-block-web,RUSTY_CONDUIT_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
validatesubcommand:rusty-conduit validate --config proxy.tomlloads and checks CLI flags, environment variables, and the TOML file without binding listeners, then exits0or1.- Automatic open-file limit: on Unix, the soft
RLIMIT_NOFILEis raised at startup to fit--max-connections, with aNOTICEwhen the hard limit is too low. - Allowlist exceptions: when both are set,
--allowentries are exceptions to--block(they were mutually exclusive). - SOCKS web blocking without MITM:
--socks-block-webworks with or without a CA. - 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 and 26 KB per open tunnel on any CPU count (it grew to 42 MB idle on 18 CPUs), and/var/log/rusty-conduitis writable for named volumes. --helpwording matches the rest of the family.- Docs: new Docker guide with tested Compose examples; sizing guide covers
somaxconnand memory; release archives include the wholedocs/folder. Docs now pin the image asghcr.io/jpbaking/rusty-conduit:2.
v1.4.0 was tagged but never published (its release run failed a formatting check), so its changes, allowlist exceptions and standalone SOCKS web blocking, ship here for the first time.
rusty-conduit v1.3.0
What's Changed
Shared Engine Migration (rusty-conduit-engine v0.2.0)
- Ported
rusty-conduitonto the sharedrusty-conduit-enginev0.2.0crate (default-features = false, keeping the binary lean without theregexrouting feature). - Preserved exact v1.2.0 CLI
--helpoutput, text/JSON access-log schemas, HTTP status codes (403/502/504), SOCKS reply codes, and DNS+IP allowlist filtering behavior.
Fixes & Divergence Ledger Notes (docs/DIVERGENCE-LEDGER.md)
- E3-01 (
option,logging): UsesAccessLogConfig::with_routing_fields(false)/AccessLogger::with_routing_fields(false)so the v1.2.0 access-log schema is unchanged (omittingrule,profile, andupstreamfields). - E3-02 (
option,filter,upstream::direct): InstallsHostFilteronDialerOptions(DirectDialer) rather than the router so IP/CIDR-only allowlists continue checking resolved IPs at dial time. - E3-03 (
keep,http,socks): BadCONNECTtarget400response body updated frominvalid CONNECT targettoCONNECT target must be host:port, and diagnosticERROR/INFO/DEBUGlog wording now uses the engine's unified format. HTTP status codes (403/502/504) and SOCKS reply codes are unchanged. - E3-04 (
option/fix,server,mitm): Explicitly retainsrusty-conduit's defaults (max_connections = 4096,mitm_cert_cache_max = 10_000) viaServerOptionsandMitmOptions, 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.2.0...v1.3.0
rusty-conduit v1.2.0
Feature release for rusty-conduit: adds TCP keepalive on client and upstream sockets, so long-silent connections (AI agents and harnesses waiting on a slow model response, idle SSH sessions over SOCKS, long polls) are no longer dropped by NAT gateways, firewalls, VPNs, or cloud load balancers.
What's Changed
- TCP Keepalive (on by default):
-
Once established, rusty-conduit connections have no idle or total-lifetime timeout. However, devices along the network path (NAT, stateful firewalls, OpenVPN servers, Docker/Kubernetes conntrack, cloud load balancers) silently expire connections that send no packets for a while. Keepalive probes now keep that state alive.
-
Enabled on every accepted client socket (HTTP, SOCKS, and multiplexed listeners) and every upstream connection (plain HTTP forwarding, HTTPS
CONNECT, HTTPS MITM, SOCKS4/4a/5). -
Defaults: first probe after
60sidle, then every10s. The connection is closed after5unanswered probes, so dead peers are detected ~110s after they vanish. -
Probes are empty TCP segments handled by the OS kernel. They are invisible to HTTP, TLS, SOCKS, and any tunneled protocol, and they don't interact with HTTP
Connection: keep-alive. -
Configurable via CLI, environment, or TOML:
CLI Flag Environment Variable TOML Key Default --tcp-keepalive <DURATION>RUSTY_CONDUIT_TCP_KEEPALIVEtcp_keepalive60s(0disables)--tcp-keepalive-interval <DURATION>RUSTY_CONDUIT_TCP_KEEPALIVE_INTERVALtcp_keepalive_interval10s--tcp-keepalive-retries <N>RUSTY_CONDUIT_TCP_KEEPALIVE_RETRIEStcp_keepalive_retries5 -
Out-of-range values are rejected at startup with exit code
1(durations1s–32767s, retries1–127). The startup config summary now shows the active setting, e.g.tcp_keepalive=1m/10sx5ortcp_keepalive=off. -
On platforms without per-socket interval/retry control, only the idle time is applied.
-
- Tests & Documentation:
- Added unit tests for config precedence, disabling, and validation, plus tests that read back the socket options on accepted and dialed sockets.
- New "Connection Lifetime & TCP Keepalive" section in
docs/USER-GUIDE-ADVANCED.md, including guidance for SSH over SOCKS (ServerAliveInterval) and VPN tunnel restarts (642506f).
Upgrade note: Keepalive is enabled by default. To restore v1.1.0 behavior exactly, pass
--tcp-keepalive 0.
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 \
ghcr.io/jpbaking/rusty-conduit:1.2.0Available tags: 1.2.0, 1.2, 1, latest (linux/amd64, linux/arm64).
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.2.0-linux-amd64.tar.gz |
| Linux | ARM64 (arm64) |
rusty-conduit-v1.2.0-linux-arm64.tar.gz |
| macOS | Apple Silicon (arm64) |
rusty-conduit-v1.2.0-macos-arm64.tar.gz |
| macOS | Intel (amd64) |
rusty-conduit-v1.2.0-macos-amd64.tar.gz |
| Windows | x86_64 (amd64) |
rusty-conduit-v1.2.0-windows-amd64.zip |
| Windows | ARM64 (arm64) |
rusty-conduit-v1.2.0-windows-arm64.zip |
Verify downloads with SHA256SUMS.txt:
sha256sum -c SHA256SUMS.txt --ignore-missingDocumentation & Roadmap
- Overview & quick start:
README.md - Everyday setup & Docker usage:
docs/USER-GUIDE-BASIC.md - Full CLI/env/TOML & MITM reference:
docs/USER-GUIDE-ADVANCED.md - Footprint,
ulimit -n, and sizing:docs/PERFORMANCE-AND-SIZING.md - Creating and trusting a private MITM CA:
docs/MITM-CA-GUIDE.md - Post-v1 roadmap:
FUTURE-PLANS.md
Full Changelog: v1.1.0...v1.2.0
rusty-conduit v1.1.0
Feature release for rusty-conduit — adding destination allowlist/blocklist filtering across HTTP, HTTPS (tunnel and MITM), and SOCKS4/4a/5 with pre-connect DNS resolution checks.
What's Changed
- Destination Allowlist & Blocklist Filtering:
- Added mutually exclusive destination filtering via CLI (
--allow/--block), environment variables (RUSTY_CONDUIT_ALLOW/RUSTY_CONDUIT_BLOCK), and TOML (allow/block). Supplying both is rejected at startup with exit code1. - Supports IPv4/IPv6 addresses (including canonical IPv4-mapped IPv6 matching), CIDR subnets, exact FQDNs, and
*.domainsubdomain wildcards; repeatable or comma-separated (e.g.,--block 127.0.0.0/8,::1,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16). - Checks both requested hostnames and OS-resolved IPs before opening upstream connections (
connect_upstream_filtered), preventing DNS-to-loopback and DNS-rebinding bypasses. - Enforced consistently across plain HTTP forwarding, HTTPS
CONNECTtunneling, HTTPS MITM, and SOCKS4/4a/5: rejected requests return HTTP403 Forbidden, SOCKS50x02(not_allowed), or SOCKS40x5B, and SOCKS access logs recordstatus=not_allowed.
- Added mutually exclusive destination filtering via CLI (
- Tests & Documentation:
- Added an end-to-end integration test suite covering allowlists, blocklists, wildcards, CIDRs, and protocol-specific rejections (
tests/filter_proxy.rs), and updatedREADME.md,docs/USER-GUIDE-BASIC.md, anddocs/USER-GUIDE-ADVANCED.md(dd9bbe1).
- Added an end-to-end integration test suite covering allowlists, blocklists, wildcards, CIDRs, and protocol-specific rejections (
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 \
ghcr.io/jpbaking/rusty-conduit:1.1.0Available tags: 1.1.0, 1.1, 1, latest (linux/amd64, linux/arm64).
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.1.0-linux-amd64.tar.gz |
| Linux | ARM64 (arm64) |
rusty-conduit-v1.1.0-linux-arm64.tar.gz |
| macOS | Apple Silicon (arm64) |
rusty-conduit-v1.1.0-macos-arm64.tar.gz |
| macOS | Intel (amd64) |
rusty-conduit-v1.1.0-macos-amd64.tar.gz |
| Windows | x86_64 (amd64) |
rusty-conduit-v1.1.0-windows-amd64.zip |
| Windows | ARM64 (arm64) |
rusty-conduit-v1.1.0-windows-arm64.zip |
Verify downloads with SHA256SUMS.txt:
sha256sum -c SHA256SUMS.txt --ignore-missingDocumentation & Roadmap
- Overview & quick start:
README.md - Everyday setup & Docker usage:
docs/USER-GUIDE-BASIC.md - Full CLI/env/TOML & MITM reference:
docs/USER-GUIDE-ADVANCED.md - Footprint,
ulimit -n, and sizing:docs/PERFORMANCE-AND-SIZING.md - Creating and trusting a private MITM CA:
docs/MITM-CA-GUIDE.md - Post-v1 roadmap:
FUTURE-PLANS.md
Full Changelog: v1.0.1...v1.1.0
rusty-conduit v1.0.1
Maintenance and container-distribution release for rusty-conduit — adding official multi-arch Docker images on GHCR, fixing a MITM certificate-cache count race, and splitting the user documentation into focused guides.
What's Changed
- Official Multi-Arch Docker Images (GHCR):
- Published to
ghcr.io/jpbaking/rusty-conduitforlinux/amd64andlinux/arm64on every release (1.0.1,1.0,1,latest). - Built on Ubuntu 26.04 LTS with
apt-get dist-upgrade,ca-certificates(for upstream TLS verification in MITM mode), a dedicated non-root user (rusty-conduit, UID10001), andRUSTY_CONDUIT_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 (725583e).
- Synchronized
- Documentation Restructure:
- Streamlined
README.mdand split user documentation into dedicated guides: Basic User Guide, Advanced User Guide, and Performance, Footprint & Sizing (8038b18).
- Streamlined
- CI & Testing:
- Added a
Docker Buildverification job to CI and pinned Linuxamd64release builds toubuntu-24.04for broad glibc compatibility. - Relaxed the MITM reaper TTL test window to avoid timing flakes on Windows CI runners (
e218d92).
- 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 \
ghcr.io/jpbaking/rusty-conduit:1.0.1Available tags: 1.0.1, 1.0, 1, latest (linux/amd64, linux/arm64).
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.1-linux-amd64.tar.gz |
| Linux | ARM64 (arm64) |
rusty-conduit-v1.0.1-linux-arm64.tar.gz |
| macOS | Apple Silicon (arm64) |
rusty-conduit-v1.0.1-macos-arm64.tar.gz |
| macOS | Intel (amd64) |
rusty-conduit-v1.0.1-macos-amd64.tar.gz |
| Windows | x86_64 (amd64) |
rusty-conduit-v1.0.1-windows-amd64.zip |
| Windows | ARM64 (arm64) |
rusty-conduit-v1.0.1-windows-arm64.zip |
Verify downloads with SHA256SUMS.txt:
sha256sum -c SHA256SUMS.txt --ignore-missingDocumentation & Roadmap
- Overview & quick start:
README.md - Everyday setup & Docker usage:
docs/USER-GUIDE-BASIC.md - Full CLI/env/TOML & MITM reference:
docs/USER-GUIDE-ADVANCED.md - Footprint,
ulimit -n, and sizing:docs/PERFORMANCE-AND-SIZING.md - Creating and trusting a private MITM CA:
docs/MITM-CA-GUIDE.md - Post-v1 roadmap:
FUTURE-PLANS.md
Full Changelog: v1.0.0...v1.0.1
rusty-conduit v1.0.0
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(default10000) and--mitm-cert-ttl(default1h) with lazy read-time expiry and a periodic background reaper.
- HTTP/HTTPS Proxy (
--http-port, default3128):- Streaming plain HTTP forwarding with RFC 9110 hop-by-hop header stripping.
- Opaque
CONNECTtunneling when MITM is off.
- SOCKS4, SOCKS4a & SOCKS5 (
--socks-port, default1080):- TCP
CONNECTsupporting IPv4, IPv6, and proxy-side domain resolution. - Optional
--socks-block-web-in-mitmguard 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.
- TCP
- Flexible Port Layout:
- Separate ports by default (
3128HTTP/HTTPS,1080SOCKS). - 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, and
101 Switching Protocolsupgrades (e.g., WebSocket). - Full CA generation and OS/browser trust guide in
docs/MITM-CA-GUIDE.md.
- Never auto-generates a CA; loads user-supplied PEM (
- Resource Caps & Graceful Shutdown:
--max-connections(default4096,0= unlimited) drops excess incoming connections immediately with no queueing.--mitm-cert-cache-max-entries(default10000,0= unlimited) reaps expired entries first, then evicts the oldest entries.- Clean
Ctrl+C/ UnixSIGTERMshutdown 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 structuredtext(logfmt) orjson(NDJSON) HTTP access logs and SOCKS connection logs (also dumped tostdoutatDEBUG/VERBOSE).
- Precedence:
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-missingDocumentation & Roadmap
- Usage, configuration reference, and sizing guide:
README.md - Creating and trusting a private MITM CA:
docs/MITM-CA-GUIDE.md - Post-v1 roadmap (proxy auth, SOCKS5
UDP ASSOCIATE, MITM bypass lists, etc.):FUTURE-PLANS.md
Full Changelog: https://github.com/jpbaking/rusty-conduit/commits/v1.0.0