ArchiveBox / ArchiveBox

🗃 Open source self-hosted web archiving. Takes URLs/browser history/bookmarks/Pocket/Pinboard/etc., saves HTML, JS, PDFs, media, and more...
https://archivebox.io
MIT License
22.45k stars 1.19k forks source link

New Feature: Provide deeper `mitmproxy` integration out-of-the-box in Docker #1392

Open pirate opened 8 months ago

pirate commented 8 months ago

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

pirate commented 6 months ago

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