Expand description
Local MITM capture, CA, and HAR export (one-shot). One-shot local MITM capture helpers (PRD §5E).
This module:
- Generates/loads a local CA under XDG data (
mitm/ca) - Stores invocation captures under XDG state (
mitm/) - Exports HAR JSON without Python mitmproxy
Full TLS intercept proxy (hudsucker) can attach to the same capture store. CDP Network remains complementary and can feed the same HAR exporter.
Structs§
- Captured
Exchange - One captured HTTP(S) exchange (agent-facing, secrets redacted by default).
- Captured
WsFrame - One captured WebSocket frame (agent-facing, truncated).
- Mitm
Capture - In-memory + disk-backed capture for one process.
Functions§
- allow_
host - Persist allowlist host under XDG state.
- apis
- Discover REST/GraphQL-ish endpoints from capture.
- block_
rule - Persist block rule note under XDG state (applied on next capture when hosts filter used).
- capture_
url_ oneshot - One-shot: bind MITM on 127.0.0.1, launch Chrome with proxy, navigate
url, capture, DIE (GAP-011). - default_
capture_ path - Default capture file for this user (latest).
- domains
- List unique hosts.
- ensure_
ca - Ensure CA key/cert exist under XDG; return paths.
- export_
har - Export HAR 1.2 JSON (hand-built; no Python).
- get
- Get one exchange by id.
- graphql
- List GraphQL-ish exchanges from the current capture (GAP-019).
- import_
cdp_ network - Import CDP-style network events (array of {method,url,status,…}) into capture.
- list
- List captured requests.
- redact_
policy - Redact policy status (always redacts Authorization/Cookie by default in capture store).
- shared_
capture - Create shared capture bound to default path.
- start_
proxy_ oneshot - One-shot MITM proxy on
127.0.0.1:0using hudsucker + local CA. - status
- Status of MITM readiness + capture counts.
- ws_get
- Get one WebSocket frame by index id (GAP-019).
- ws_list
- List WebSocket frames from capture (GAP-019).
Type Aliases§
- BTree
MapString - Stable map type alias for headers.
- Shared
Capture - Shared capture for optional in-process proxy (thread-safe).