http
Module: interceptor::http
Section titled “Module: interceptor::http”Contents
Section titled “Contents”Structs
HttpInterceptor- HTTP forward proxy interceptor.
firma_sidecar::interceptor::http::HttpInterceptor
Section titled “firma_sidecar::interceptor::http::HttpInterceptor”Struct
HTTP forward proxy interceptor.
Listens on a configurable TCP port (default 8080) and captures every
outbound HTTP request made by the agent. Each request is converted into a
RawRequest and handled through the
RequestHandler provided in
Interceptor::run.
Malformed requests that cannot be parsed into a valid RawRequest are
rejected with a structured DENY carrying reason MALFORMED_REQUEST
(fail-closed).
Methods:
fn new(address: SocketAddr) -> Self- Create a new [HttpInterceptor] that listens on the specified address.fn with_https_mitm(self: Self, config: HttpsMitmConfig, ca_dir: PathBuf) -> Self- Attach HTTPS MITM configuration to this interceptor.fn with_max_request_body_bytes(self: Self, max_request_body_bytes: usize) -> Self- Set the maximum request body size accepted by the interceptor.fn with_connect_relay(self: Self, connect_relay: ConnectRelayConfig) -> Self- Set CONNECT tunnel/MITM relay timeout controls.fn run_with_listener(self: Self, listener: TcpListener, handler: Arc<RequestHandler>, cancel: CancellationToken) -> Result<(), InterceptorError>- Run the interceptor loop using an already bound listener.
Trait Implementations:
- Interceptor
fn run(self: Self, handler: Arc<RequestHandler>, cancel: CancellationToken) -> Result<(), InterceptorError>
- From
fn from(address: SocketAddr) -> Self