[GH-ISSUE #1392] New Feature: Provide deeper mitmproxy integration out-of-the-box in Docker #3867

Open
opened 2026-03-15 00:46:13 +03:00 by kerem · 1 comment
Owner

Originally created by @pirate on GitHub (Mar 29, 2024).
Original GitHub issue: https://github.com/ArchiveBox/ArchiveBox/issues/1392

Features mitmproxy provides: https://mitmproxy.org/

# convert .pem to .crt if needed
openssl x509 -in foo.pem -inform PEM -out foo.crt
# convert .cer to .crt
openssl x509 -inform DER -in foo.cer -out foo.crt
# https://askubuntu.com/questions/73287/how-do-i-install-a-root-certificate/94861#94861

# move mitm CA cert into system store
ln -s /root/.mitmproxy/ca.crt /usr/local/share/ca-certificates/mitmproxy-ca-cert.crt

dpkg-reconfigure ca-certificates
update-ca-certificates
mitmproxy --mode=socks5

# then start chrome pointing to the proxy using socks5
chromium-browser --user-data-dir=/data/personas/Default/chromium --proxy-server='socks5://localhost:8080' --no-sandbox --disable-suid-sandbox --ignore-certificate-errors --ignore-ssl-errors --ignore-certificate-errors-spki-list --allow-running-insecure-content

Alternative option proxy.py: https://github.com/abhinavsingh/proxy.py#run-dashboard

Originally created by @pirate on GitHub (Mar 29, 2024). Original GitHub issue: https://github.com/ArchiveBox/ArchiveBox/issues/1392 Features `mitmproxy` provides: https://mitmproxy.org/ - Man-in-the-middle recording,interception,modifying HTTP/HTTPS requests during archiving `save_stream_file` - https://docs.mitmproxy.org/stable/tute-clientreplay/#client-playback-a-30-second-example - Graphical web UI to inspect/intercept web flows - [Sticky auth + server-side replay](https://docs.mitmproxy.org/stable/overview-features/#sticky-auth), authenticate once in chrome and apply auth cookies automatically on all subsequent requests, even if they're done from other tools like wget/curl/etc. - Ability to dump entire SSL certificate chain for intercepted requests to `cert.pem` - https://docs.mitmproxy.org/stable/api/mitmproxy/connection.html#Connection.certificate_list - https://docs.mitmproxy.org/stable/api/events.html - https://lucaslegname.github.io/mitmproxy/2020/04/10/mitmproxy.html ```bash # convert .pem to .crt if needed openssl x509 -in foo.pem -inform PEM -out foo.crt # convert .cer to .crt openssl x509 -inform DER -in foo.cer -out foo.crt # https://askubuntu.com/questions/73287/how-do-i-install-a-root-certificate/94861#94861 # move mitm CA cert into system store ln -s /root/.mitmproxy/ca.crt /usr/local/share/ca-certificates/mitmproxy-ca-cert.crt dpkg-reconfigure ca-certificates update-ca-certificates mitmproxy --mode=socks5 # then start chrome pointing to the proxy using socks5 chromium-browser --user-data-dir=/data/personas/Default/chromium --proxy-server='socks5://localhost:8080' --no-sandbox --disable-suid-sandbox --ignore-certificate-errors --ignore-ssl-errors --ignore-certificate-errors-spki-list --allow-running-insecure-content ``` Alternative option `proxy.py`: https://github.com/abhinavsingh/proxy.py#run-dashboard
Author
Owner

@pirate commented on GitHub (May 11, 2024):

For anyone who finds this via Google, FYI we have: https://github.com/archiveBox/archivebox-proxy

<!-- gh-comment-id:2105620047 --> @pirate commented on GitHub (May 11, 2024): For anyone who finds this via Google, FYI we have: https://github.com/archiveBox/archivebox-proxy
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ArchiveBox#3867
No description provided.