Skip to main content

start_proxy

Function start_proxy 

Source
pub async fn start_proxy(config: ProxyConfig) -> Result<ProxyHandle>
Expand description

Start the opaque secret proxy as a background tokio task.

Binds to 127.0.0.1:0 (OS-assigned port) and returns a handle with the assigned port. The caller injects HTTP_PROXY=http://127.0.0.1:{port} into subprocess environments.

When the mitm feature is enabled, a local CA is generated (or loaded) and HTTPS CONNECT requests are intercepted with ephemeral per-host certificates for token scanning.