kraken.std.mitm
kraken.std.mitm
Manages a mitmweb
instance to run in the background for injecting basic-auth into requests to hosts for which
credentials are passed down. The mitmweb
web interface can be reached on localhost:8900
while it is running.
The proxy stays alive as a daemon process until its configuration changes.
start_mitmweb_proxy
start_mitmweb_proxy(
auth: Mapping[str, tuple[str, str]],
mitmweb_bin: str = "mitmweb",
additional_args: Sequence[str] = (),
) -> tuple[str, Path]
Ensure that a mitmweb
process with the given auth configuration and additional_args is running. If a
process is already running that doens't match the spec, it will be stopped and a new one will be started.
Note
This process is managed globally and the state is stored under ~/.mitmproxy
. Switching between projects
that require a different configuration will stop and start the proxy constantly.