webrecorder / pywb

Core Python Web Archiving Toolkit for replay and recording of web archives
https://pypi.python.org/pypi/pywb
GNU General Public License v3.0
1.34k stars 209 forks source link

Error in proxy mode #581

Open tripleo1 opened 3 years ago

tripleo1 commented 3 years ago

Describe the bug

Firefox gives an error MOZILLA_PKIX_ERROR_MITM_DETECTED because it sees pywb proxy cert

Steps to reproduce the bug

Enable proxy mode using docker (docker run -p 9090:8080 -v pwd/pywb-data/:/webarchive webrecorder/pywb wayback --proxy my-web-archive) Set Mozilla to proxy mode (Hamburger / Preferences / Network Settings) Browse to a URL (http://google.com)

Expected behavior

Expected proxy to pull URL

Screenshots

Environment

Firefox 81 Linux

Additional context

sydoluciani commented 3 years ago

Download and import the certificate in to Firefox as explained here and here

Importing the certificate shall fix the problem, however it is best to start pywb proxy directly to browse the archive files as explained here.

Then start the pywb proxy within docker while the same collection directory attached to container as volume, to make sure the same collection can be browsed either directly or through docker.

To browse current archives in my-web-archive collection through proxy: wayback --proxy my-web-archive

To record in my-web-archive collection through proxy: wayback --live -a --proxy-record --proxy my-web-archive

Please let us know if you have any further questions, or if there is any issues, otherwise please close this issue.