Trying to save the captured web traffic of the raw HTTP request/response while using mitmproxy
:
Followed https://github.com/mitmproxy/mitmproxy/blob/main/examples/contrib/jsondump.py with
mitmproxy -s /pkg/mitmproxy/jsondump.py
, and with
$ cat ~/.mitmproxy/config.yaml
dump_destination: "/tmp/mitmproxy.log.json"
But my "/tmp/mitmproxy.log.json
" was never written to.
Then tried mitmproxy -w outfile
as per Dump packets collected with mitmproxy, but the output is not in JSON format
Then tried mitmproxy -s /pkg/mitmproxy/jsondump.py -w outfile
and the output is still not in JSON format.
Mitmproxy currently has no JSON export. We're tentatively planning to support HAR export soon though. There's a community-contributed example for this here, which I think is in better shape than the jsondump one: https://github.com/mitmproxy/mitmproxy/blob/main/examples/contrib/har_dump.py