Merged
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
Tardo
requested changes
Jun 24, 2025
Owner
Tardo
left a comment
There was a problem hiding this comment.
Thanks for this update! needed and addressing some of the issues :)
Comment on lines
+40
to
+45
| 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"' |
Owner
There was a problem hiding this comment.
ensure good interoperability
Suggested change
| 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"' |
Comment on lines
+6
to
+9
| 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 |
Owner
There was a problem hiding this comment.
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).
This was referenced Jun 24, 2025
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🚀 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_VERSIONfrom3.0.34to4.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-versionto4.0.0.Update pytest matrix and fixtures to target 4.0.0.
Enhanced
tests/conftest.pyto detect Windows/macOS hosts and use127.0.0.1for 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+.