proxy_bridge
Module: proxy_bridge
Section titled “Module: proxy_bridge”Contents
Section titled “Contents”Structs
HostBridgeHandle- Owning handle for a host-side proxy bridge started on the non-structuralProxyBridgeInput- Lib-level input for [execute_proxy_bridge]. The CLI layer builds this
Functions
execute_proxy_bridge- Run the internal sandbox bridge process.
firma_run::proxy_bridge::HostBridgeHandle
Section titled “firma_run::proxy_bridge::HostBridgeHandle”Struct
Owning handle for a host-side proxy bridge started on the non-structural (macOS / proxy-mediated) path.
The bridge listens on an ephemeral loopback TCP port, injects attribution
headers (including x-firma-session-id) into every outbound HTTP/CONNECT
request, and relays the enriched traffic to the sidecar’s TCP endpoint.
[Drop] signals the listener thread to stop and joins it.
On the structural (Linux/bwrap) path the equivalent bridge is launched as a
subprocess inside the sandbox by bwrap_entrypoint.sh. On the
non-structural path no entrypoint script is run, so the bridge must live on
the host side.
Methods:
fn start(upstream: std::net::SocketAddr, attribution_headers: BTreeMap<String, String>) -> Result<Self, RunError>- Start a host-side proxy bridge.fn listen_addr(self: &Self) -> std::net::SocketAddr- TCP address the bridge is listening on.
Trait Implementations:
- Drop
fn drop(self: & mut Self)
firma_run::proxy_bridge::ProxyBridgeInput
Section titled “firma_run::proxy_bridge::ProxyBridgeInput”Struct
Lib-level input for [execute_proxy_bridge]. The CLI layer builds this
from its clap-derived args struct.
Fields:
listen: std::net::SocketAddr- TCP listen address reachable by the sandboxed agent process.upstream_uds: std::path::PathBuf- Upstream host-side Unix socket path exposed byfirma run.
Trait Implementations:
- Debug
fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
- Clone
fn clone(self: &Self) -> ProxyBridgeInput
firma_run::proxy_bridge::execute_proxy_bridge
Section titled “firma_run::proxy_bridge::execute_proxy_bridge”Function
Run the internal sandbox bridge process.
The bridge accepts HTTP proxy traffic over TCP (inside the sandbox) and relays bytes bidirectionally to a host-side Unix socket endpoint.
Errors
Section titled “Errors”Returns an error if the bridge cannot bind/listen or if the platform does not support Unix sockets.
fn execute_proxy_bridge(args: &ProxyBridgeInput) -> Result<i32, crate::error::RunError>