-
Notifications
You must be signed in to change notification settings - Fork 1
Update Privoxy base image to v4.0.0 #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…lity - Apply necessary changes to support Privoxy 4.0.0. - Adjust settings as required by the new version.
- Add -addext options to openssl command for CA and key usage extensions. - Ensure compatibility with new Privoxy 4.x requirements.
…ility - Update entrypoint to repopulate /usr/local/etc/privoxy from /opt/privoxy-default if empty. - Ensure all scripts use LF line endings and are executable. - Add step to copy default config to /opt/privoxy-default during build.
- Bump python version to 3.13.5, python-on-whales to ^0.77.0, and pytest to ^8.4.1. - Update poetry.lock accordingly. - Add /.pytest_cache and /.venv to .gitignore for better local environment isolation.
- Update Dockerfile to build Privoxy 4.0.0 and switch to pcre2. - Update GitHub Actions workflows to use PRIVOXY_VERSION 4.0.0. - Update test matrix and pytest default version to 4.0.0. - Improve Dockerfile build steps for better compatibility with Privoxy 4.x.
- Update .github/workflows/ci.yml matrix to - Now matches the pyproject.toml ^3.13.5 constraint
- Add requests ^2.32.4 to [tool.poetry.dependencies] in pyproject.toml - Regenerate poetry.lock via poetry lock so pytest’s conftest can import requests
Update privoxy 4.0.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this update! needed and addressing some of the issues :)
f'openssl req -new -x509 ' | ||
f'-key {ca_key_file} -sha384 -days 3650 ' | ||
f'-out {ca_bundle_file} ' | ||
f'-subj "{subj}" ' | ||
f'-addext "basicConstraints=critical,CA:TRUE" ' | ||
f'-addext "keyUsage=critical,keyCertSign,cRLSign"' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ensure good interoperability
f'openssl req -new -x509 ' | |
f'-key {ca_key_file} -sha384 -days 3650 ' | |
f'-out {ca_bundle_file} ' | |
f'-subj "{subj}" ' | |
f'-addext "basicConstraints=critical,CA:TRUE" ' | |
f'-addext "keyUsage=critical,keyCertSign,cRLSign"' | |
'openssl req -new -x509 ' | |
f'-key {ca_key_file} -sha384 -days 3650 ' | |
f'-out {ca_bundle_file} ' | |
f'-subj "{subj}" ' | |
'-addext "basicConstraints=critical,CA:TRUE" ' | |
'-addext "keyUsage=critical,keyCertSign,cRLSign" ' | |
'-addext "subjectKeyIdentifier=hash"' |
if [ ! -e /usr/local/etc/privoxy/config ] || [ -z "$(ls -A /usr/local/etc/privoxy)" ]; then | ||
echo "[entrypoint] void config, populating defaults..." | ||
cp -a /opt/privoxy-default/* /usr/local/etc/privoxy/ | ||
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be documented in the README and warn that changing the configuration may break compatibility with the “privman” script (if not preserving the filterfile and actionsfile options).
🚀 Feature: Upgrade Privoxy to 4.0.0
📝 Motivation
Privoxy 4.0.0 includes important security fixes, performance improvements, and updated dependencies compared to the 3.x series. This PR updates the Dockerfile and test suite to build, run, and verify Privoxy 4.0.0.
📋 Key Changes
Dockerfile
Bumped
ARG PRIVOXY_VERSION
from3.0.34
to4.0.0
.Switched from pcre-dev to pcre2-dev, as required by Privoxy 4.x.
Added
net-tools
(e.g.netstat
) for easier debugging.Strip out any stray \r (“CRLF”) from shipped scripts and configs via sed -i 's/\r$//' so they work properly on Alpine/Linux.
Preserve original Privoxy defaults under /opt/privoxy-default for volume-based overrides.
Tests (pytest)
Updated default
--privoxy-version
to4.0.0
.Update pytest matrix and fixtures to target 4.0.0.
Enhanced
tests/conftest.py
to detect Windows/macOS hosts and use127.0.0.1
for proxy binding on those platforms.Verified that all HTTP/HTTPS connectivity, blocking, and adblock filter tests pass locally.
We’re keeping the project and the CI on Python 3.12 for now because Poetry (and some dependencies, such as pydantic-core) fail to build on 3.13. Once those issues are resolved upstream, we can bump to 3.13+.