rama-0.4.0 #1130
GlenDC
announced in
Announcements
rama-0.4.0
#1130
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Rama 0.4.0 is the first regular release train after 0.3.0. It came with
a bunch of improvements, as well as another correctness and reliability
pass for our Apple Network Extension (NE) foundations. Our Peek
and relay concepts were also improved. A last-minute improvement
also came at our doorsteps in the form of WebSocket support for HAR.
It's a feature that originated from chromium and now is also supported by rama.
This release brings system proxy support for all supported platforms.
In function this we also added
rama-jssupport (Javascript runtimesupport within a WASM runtime) as well as
rama-pacto addProxy Auto Configuration (PAC) support. With the latter making use
of the possibility to run a javascript (JS) runtime in an isolated manner,
to safely and swiftly run PAC scripts.
Together with improved environment variable, native proxy setting auto-discovery
and refresh hooks, as well as the ability to add bypass rules (e.g.
NO_PROXY)we have now for the first time full system proxy support for network clients built with rama.
The rama CLI tool also makes use of it by default.
It is also the first release where we have
ttRPCsupport,a lightweight alternative to
gRPCrunning directly onthe transport layer (e.g.
tcp). And for those use cases where you do still wantgRPC,it is now also possible to define your models using macros provided by rama
in case you do not fancy those proto files.
Please read Breaking API Changes before upgrading.
As always, this changelog calls out the user-visible work; the code diff is the
authoritative source of truth.
Community
Thank you to everyone who contributed code, reviews, documentation, testing,
bug reports, ideas, and production feedback during the 0.4 cycle. This release
includes work from Glen De Cauwsemaecker, Brecht Stamper, Abdelkader Boudih,
bitterpanda, Abhinav, Sean McArthur, 0x676e67, Bailey Hayes, Brent Echols,
Catwoman08, Clemens Losbichler, Darius, Dorian Verlaine, Frédéric Soumaré,
Jess Izen, Jihun Kim, John Howard, Langning Zhang, Logan, Martin Taillefer,
Morax, MsfPablo, Murilo Silva, Murph Murphy, Nam2ee, Recoordinate, Sam
Landfried, Sander Saares, SCADA StrangeLove, dswij, tottoto, Árni Dagur, and
the other upstream contributors whose work arrived through the HTTP stack
sync. Thank you also to zeeshan8281 for reporting the CLI default-command
regression (#1089).
Thank you also to our GitHub Sponsors for directly funding Rama development,
and to our commercial partners for funding a significant part of the work in
this cycle. If you want to support Rama, you can become a
GitHub Sponsor. If your organisation is
looking for a long-term partner around proxies, protocol work, support,
training, or custom integrations, see ramaproxy.com.
Highlights
protocol-independent
ConnectRequest, supports ordered direct and proxyroutes with fallback and failure backoff, and can resolve routes from
explicit configuration, proxy environment variables, operating-system proxy
settings, and PAC scripts. Rama CLI applies these sources with a predictable
precedence while preserving decisions already made by an outer layer
(Add route-aware connector services #1095, Fork request extensions per hop and retry attempt #1098, add JavaScript PAC support #1099, Improve rate limiting and PAC support #1103, Add cross-platform system proxy routing #1124).
rama-jsandrama-paccrates providebounded JavaScript execution and classic plus Microsoft IPv6-aware PAC
helpers. PAC programs are compiled and reused, DNS goes through Rama, and
resource, time, result, and disclosure budgets are configurable. The CLI can
evaluate and generate PAC files (add rama-pac: initial implementaiton with
PacConnectoras the main API support #566, add JavaScript PAC support #1099, Improve rate limiting and PAC support #1103, harden JS engine lifecycle and cache handling #1106, Add cross-platform system proxy routing #1124).request and keyed rate limits, shape stream or datagram bandwidth, and choose
between waiting and failing fast. A continuously driven blocking runtime,
HTTP(S) client, response reader, and WebSocket APIs make the same foundations
available to synchronous applications (feat: add rate and bandwidth limiting #1100, Add blocking stack support #1115).
to collect an entire body before handing data to a sink. Traffic recording
streams frames and messages, HTTP request/response parts gained serde
support, and HAR exports can include Chromium-compatible WebSocket messages
in chronological request order (add streaming HTTP body capture #1102, fix HTTP capture and serde edge cases #1105, Add support for chrome _websocketMessages in rama's har implementation #1118, support WS in HAR #1123, sync with upstream deps 2026-08-19 #1127).
pinning work across Rustls and BoringSSL, TLS tunnels use an explicit server
identity, HTTP CONNECT establishes proxy egress before returning success by
default, and TLS relay egress behavior is configurable (Add TLS certificate pinning #1072, Align TLS server identity handling #1110, Establish proxy egress during handshakes by default #1120,
Add configurable TLS relay egress policy #1121).
protobuf-free gRPC services with custom codecs, Linux systemd-resolved
Varlink DNS, local interface discovery, modern Apple Network Extension UDP
callbacks, and native unified logging (rama-ttrpc #1064, Add Apple unified logging tracing layer #1069, feat: use systemd-resolved (varlink) for linux dns when available #1087, feat: add local network interface enumeration to rama-net #1091, Easily support grpc with custom codecs and no build steps #1093,
Modernize UDP callbacks and signed E2E coverage #1094).
and middleware forks were synchronized with upstream fixes and performance
work. The result includes bounded tiny-frame handling, safer trailers and
header values, correct dropped-stream capacity accounting, pooling fixes,
and fewer lock-held flushes (sync with upstream deps 2026-08-19 #1127).
Recommendations
HttpPeekConfigshould consider.with_known_non_http_protocol_methods(). It rejects request-line prefixescommonly belonging to Redis (
PING), SMTP (EHLO/HELO), FTP (USER),IRC (
NICK), SSH, and HAProxy PROXY v1 instead of waiting for more HTTPbytes. The match is deliberately case-sensitive and prefix-based; do not use
the preset if an HTTP extension method such as
PINGorPINGXis valid foryour application. Use
.with_skipped_http1_methods(...)for an explicitlist, and pair a configured peek timeout with
PeekTimeoutPolicy::FailClosedwhere ambiguous traffic must never reach the fallback service (validate full request-line in HTTP peek routing #1076, fix(io): fail-fast protocol peekers instead of blocking #1104,
add generic peek routing and HTTP method exclusions #1108, Add configurable timeout policy to protocol peekers #1119).
target-derived layers inside redirect and retry layers. Extensions are now
forked for each hop or attempt, so this placement recalculates policy for the
actual target without leaking decisions from a previous request (Fork request extensions per hop and retry attempt #1098,
Improve rate limiting and PAC support #1103). Rama CLI uses
NO_PROXY, an explicit--proxy, proxy environmentvariables, and operating-system settings in that order. System settings are
routing input for clients that honor them, not an enforcement boundary; use
transparent interception when all traffic must traverse the proxy (Add cross-platform system proxy routing #1124).
the request when the script cannot be fetched, compiled, or evaluated. Keep
that fail-closed behavior when PAC is an enforcement boundary. Select the
browser-like direct fallback only when bypassing the proxy is acceptable;
PAC selects routes but does not itself provide proxy authentication, TLS, or
connection reuse (add JavaScript PAC support #1099, Improve rate limiting and PAC support #1103, Add cross-platform system proxy routing #1124).
concurrency limits when rejected or delayed traffic should not occupy a
scarce service slot. Use keyed limits for tenant/client fairness, and choose
shared rather than per-connection throttling when the configured bandwidth
is meant to cap an aggregate.
KeyedRatePolicyallows inputs with noderivable key by default; set
.with_missing_key_allowed(false)when amissing identity must fail closed (feat: add rate and bandwidth limiting #1100).
identity into TLS tunnels and keep automatic verification enabled. DNS names
use SNI and DNS-name validation; IP destinations validate the IP SAN without
sending an IP address as SNI. Add custom roots or pins intentionally instead
of bypassing verification (Add TLS certificate pinning #1072, Align TLS server identity handling #1110).
APIs are intended for synchronous callers. When used from async code, move
them to an appropriate blocking thread rather than blocking an executor
worker (Add blocking stack support #1115).
Breaking API Changes
Rama remains below 1.0, so a
0.xminor release may change public APIs. Theitems below are the main migration points, not an exhaustive symbol-by-symbol
inventory. Users with a broad public-API footprint should also inspect the
rama-0.3.0..rama-0.4.0diff when the release tag is published.client::Requestwasrenamed and generalized to
ConnectRequest. Connector failures now use thestructured
ConnectionError, and route intent is represented byProxyRoute/ProxyRoutesinstead of a single bareProxyAddressextension.Custom connectors and pool builders need to adopt the new input, error, and
builder stages (Add route-aware connector services #1095).
HttpProxyAddressLayerandHttpProxyAddressServicewere replaced by protocol-independent networkinglayers. Migrate to
ProxyAddressLayer,ProxyEnvLayer,NoProxyEnvLayer,and, when desired,
SystemProxyLayer. Their public types are re-exportedfrom
rama_net::client; the implementation module is private (Add cross-platform system proxy routing #1124).receives a fork of the original extensions. The old
RedirectExtensionsBehaviourchoice was removed. Mutable state that must beshared across attempts should live behind an explicitly shared handle; route
decisions should generally be inserted inside the redirect/retry stack
(Fork request extensions per hop and retry attempt #1098, Improve rate limiting and PAC support #1103).
IoForwardServiceno longer returns(). Itreturns an
IoForwardOutcomedescribing why forwarding stopped, bytes moved,connection age, and any fatal error. A genuine non-connection I/O failure is
returned as
IoForwardError, which retains the complete outcome. Callersmatching the old output or error type must be updated (IoForwardService first byte timeout #1080, IoForwardService expose result #1081).
TlsTunnel::snibecameserver_identity: Option<Host>, and the BoringSSL client handshake requiresan identity when automatic verification is used. The old
SelfSignedData,SelfSignedKeyKind, andself_signed_server_authfamily was replaced byexplicit CA, leaf request, subject, validity, key-kind, and generated server
auth types. Dynamic issuers now receive
CertificateIssuanceContext(Add TLS certificate pinning #1072, Align TLS server identity handling #1110).
path: it establishes egress before a successful CONNECT reply and maps
timeout/failure to
504/502. The former default lazy reply service is namedLazyHttpProxyConnectReplyServiceand remains available for stacks that mustobtain the upgraded stream before routing. Upgrade layer construction and
composition changed alongside this work (Establish proxy egress during handshakes by default #1120).
RamaGrpcMethodBuilder, WebSocket handshake/upgrade wrappers are generic overtheir socket so they can be mapped or wrapped, and payload-aware curl export
moved to
try_cmd_string_for_request_parts_and_payloadandprepare_cmd_for_request_parts_and_payload, withCurlExportOptions. Codethat names the old concrete wrappers or helper functions will need adjustment
(Easily support grpc with custom codecs and no build steps #1093, Add control-aware WebSocket relay #1112, Improve curl export fidelity and compatibility #1113, Add blocking stack support #1115).
XpcMessage::Datedocumentation nowcorrectly defines the native value as nanoseconds since the Unix epoch, not
the macOS 2001 reference date. Code that followed the old guidance must
remove that epoch conversion;
XpcDateprovides an explicit serde wrapperfor the native value (Add cross-platform system proxy routing #1124).
examples/srcinto a standalone workspace crate. Tooling, documentation links, or scripts
that used the old example paths must be updated (Make examples a crate so these are fully external #1074).
Added
rama-js, an engine-agnostic JavaScript API with local and workerruntimes, bounded execution, warm-up, and compiled-module caching. The
default PAC path runs a WebAssembly-contained SpiderMonkey engine without
ambient WASI capabilities (add JavaScript PAC support #1099, Improve rate limiting and PAC support #1103, harden JS engine lifecycle and cache handling #1106).
rama-pacwith classic and Microsoft IPv6-aware PAC helpers,Rama-backed DNS, URL sanitization controls, route/result limits, and CLI
pac eval/pac generateworkflows (add rama-pac: initial implementaiton withPacConnectoras the main API support #566, add JavaScript PAC support #1099, Improve rate limiting and PAC support #1103).failed-route backoff, ProxyDB integration, and pooling-aware route
selection (Add route-aware connector services #1095).
WinINET settings, Apple CFNetwork, Android, GNOME, and KDE. Native monitors
refresh macOS, Windows, and Linux snapshots early while a TTL and last-known
valid snapshot provide resilience (Add cross-platform system proxy routing #1124).
rama-ttrpcandrama-ttrpc-build, providing unary and streaminglightweight RPC over a length-prefixed byte stream with prost-based code
generation and transport-independent client/server services (rama-ttrpc #1064).
define_service!soRust-native services can be defined without protobuf files or
build.rs.Protobuf remains the interoperability-oriented default (Easily support grpc with custom codecs and no build steps #1093).
429plusRetry-Aftermapping; per-connection/shared stream throttling; and paceddatagram sinks (feat: add rate and bandwidth limiting #1100).
continuously driven core runtime (Add blocking stack support #1115).
Varlink DNS with per-query fallback to
res_nsearch/getaddrinfo, plus TXTResolveRecordsupport (feat: use systemd-resolved (varlink) for linux dns when available #1087, feat: add local network interface enumeration to rama-net #1091).http-backendfeature for HTTP-capable builds that do not needthe complete server stack, substantially reducing the dependency graph
(feat: add http-backend feature for slimmer http builds #1078).
PeekRouterwith bounded growing buffers,replay, match/reject/need-more verdicts, fixed-prefix convenience, and
configurable fail-open/fail-closed timeout policy (add generic peek routing and HTTP method exclusions #1108, Add configurable timeout policy to protocol peekers #1119).
avoiding mandatory full-body collection and allowing sinks to process
frames asynchronously (add streaming HTTP body capture #1102, fix HTTP capture and serde edge cases #1105).
binary, and relay-error records in Chromium's
_webSocketMessagesformat(Add support for chrome _websocketMessages in rama's har implementation #1118, support WS in HAR #1123).
relay, configurable high-fidelity curl export, and per-request send
timeouts in the high-level client builder (Add zero-copy owned request-parts extractors #1109, Add control-aware WebSocket relay #1112, Improve curl export fidelity and compatibility #1113).
and certificate pinning for Rustls and BoringSSL (Add TLS certificate pinning #1072).
establishment, more TCP egress socket options, and first-byte forwarding
timeouts (expose more TCP socket options for NE egress connections #1079, IoForwardService first byte timeout #1080, Establish proxy egress during handshakes by default #1120, Add configurable TLS relay egress policy #1121).
UDP callback path with signed end-to-end coverage (Add Apple unified logging tracing layer #1069, Modernize UDP callbacks and signed E2E coverage #1094).
Changed
ConnectRequest, structured connectionfailures, ordered routes, pooled reuse, and target-aware fallback (Add route-aware connector services #1095).
inserted target-specific values isolated while preserving explicitly shared
handles (Fork request extensions per hop and retry attempt #1098, Improve rate limiting and PAC support #1103).
default, and TLS MITM relays can choose when and how egress is established
(Establish proxy egress during handshakes by default #1120, Add configurable TLS relay egress policy #1121).
than fixed during stack construction. Rama CLI now combines
NO_PROXY,explicit, environment, and system routes without overwriting an existing
outer decision (Add cross-platform system proxy routing #1124).
publication is ordered chronologically even when asynchronous capture workers
finish out of order (add streaming HTTP body capture #1102, fix HTTP capture and serde edge cases #1105, sync with upstream deps 2026-08-19 #1127).
http,hyper,h2, andtower-httpforks,bringing URI/header performance work, smaller HTTP/2 reservations, safer
trailer and multipart handling, better directory-service error propagation,
HPACK table/buffer improvements, and extensive flow-control/scheduling fixes.
HTTP/2 no longer flushes a socket while stream locks are held; the upstream
multi-worker benchmarks reported an 11.8–33.5% improvement (sync with upstream deps 2026-08-19 #1127).
user of Rama's public APIs (Make examples a crate so these are fully external #1074).
selection correctly distinguishes latest stable releases from prereleases
(Dispatch Homebrew tap updates after CLI releases #1065).
Fixed
configured bound, releases its replay buffer when possible, rejects known
non-HTTP prefixes early, preserves partially peeked TLS ClientHello bytes,
and supports explicit timeout policy (validate full request-line in HTTP peek routing #1076, fix(tls): truncate partial ClientHello peek buffer #1101, fix(io): fail-fast protocol peekers instead of blocking #1104, add generic peek routing and HTTP method exclusions #1108, Add configurable timeout policy to protocol peekers #1119).
destinations send and validate SNI, while IP destinations validate IP SANs
without sending invalid IP SNI (Align TLS server identity handling #1110).
worker pool, Windows DNS cancellation deadlocks, and systemd-resolved
fallback behavior (fix windows dns cancel deadlock + add resolver tests #1077, lookup_cached_stream cache partial consumed results #1086, feat: use systemd-resolved (varlink) for linux dns when available #1087).
socket, reconnect, logging, and shutdown edge cases (Harden Apple NE passthrough and overload handling #1063, Harden Apple FFI stack (NE/XPC/SE) + fix dist spec & docs #1066, Improve Apple transparent proxy reliability #1070,
expose more TCP socket options for NE egress connections #1079, Modernize UDP callbacks and signed E2E coverage #1094).
dropped-stream flow-control capacity, END_STREAM handling around
RST_STREAM(NO_ERROR), 1xx push counting, connection-specific trailers, andexcessive tiny DATA-frame resource use (sync with upstream deps 2026-08-19 #1127).
Connection: close, buffered writerechecks, partial line-ending detection, trailer negotiation, empty-path URI
building, non-ASCII header construction, decompression across empty frames,
and multipart range validation (sync with upstream deps 2026-08-19 #1127).
Content-Lengthappears beforeTransfer-Encoding: the cancelled length is removed and the connection isclosed after the message, avoiding propagation of confusing dual-framing
headers (upstream Hyper sync).
version/export, and HTTP capture/serde edge cases (fix forwarding header utilities #1111, Improve curl export fidelity and compatibility #1113, Fix proxy, TLS, WebSocket, and replay regressions #1114,
fix http version output for curl export #1116).
rama-cli's implicitsendfallback so theresolvesubcommand is notswallowed when invoking the binary without an explicit command (rama-cli:
resolvemissing from default-send fallback list, sorama resolve <bad args>reports asenderror #1089,rama-cli: use clap native default subcommand for implicit send #1092).
Removed
client::Requestname and single-value proxy routemodel in favor of
ConnectRequest,ConnectionError, and orderedProxyRoutes(Add route-aware connector services #1095).rama-netproxy layers, including environment and system sources (Add cross-platform system proxy routing #1124).
RedirectExtensionsBehaviour; extensions are always forked for eachredirect or retry boundary (Fork request extensions per hop and retry attempt #1098, Improve rate limiting and PAC support #1103).
explicit CA, leaf, identity, subject, validity, and key-kind types (Add TLS certificate pinning #1072,
Align TLS server identity handling #1110).
infallible curl helpers in favor of explicit lazy/eager services and fallible,
configurable export (Improve curl export fidelity and compatibility #1113, Establish proxy egress during handshakes by default #1120).
package workflow.
This discussion was created from the release rama-0.4.0.
All reactions