A security-hardened, IPv4-only Privoxy HTTP proxy for Docker, designed for ad-blocking and to run behind a VPN gateway.
p.p / config.privoxy.org) is disabled to prevent unauthorized configuration changes from your network.docker logs.This image is configured using the bundled privoxy.conf file and does not use environment variables.
There are two primary ways to use this proxy:
Run the proxy directly and expose its port to your host machine.
services:
http-proxy:
image: boingbasti/nordvpn-privoxy:latest
build: .
container_name: privoxy-proxy
ports:
# Exposes Privoxy's default port 8118 to the host
- "8118:8118"
restart: unless-stopped
➡️ Clients can now connect to the HTTP proxy at HOST_IP:8118.
Attach the proxy to a VPN gateway container (e.g., docker-nordvpn-gateway) so all its traffic is routed through the VPN tunnel.
# In your existing docker-compose.yml with the vpn-gateway service...
services:
vpn-gateway:
# ... your vpn-gateway configuration ...
http-proxy:
image: boingbasti/nordvpn-privoxy:latest
container_name: nordvpn-privoxy
# This line is crucial: it shares the gateway's network stack
network_mode: "service:vpn-gateway"
depends_on:
- vpn-gateway
restart: unless-stopped
➡️ Clients should connect to the VPN gateway’s LAN IP (e.g., 192.168.1.240:8118).
If you need custom rules, you can mount your own config to /etc/privoxy/config. This allows you to extend the functionality without building a new image.
Create your own configuration file locally (e.g., my-privoxy.conf).
It’s often easiest to start with the default config and modify it.
Mount your file into the container using a volume in your docker-compose.yml:
services:
http-proxy:
# ...
volumes:
- ./my-privoxy.conf:/etc/privoxy/config:ro
# ...
⚠️ Important: Your custom configuration file must contain
listen-address 0.0.0.0:8118, otherwise the proxy will not be accessible from your network.
Connection refused / not working
In standalone mode, ensure the ports mapping (8118:8118) is correct and the port is not blocked by a firewall.
Forbidden or Blocked errors when browsing
This is likely Privoxy working as intended, blocking an ad or tracker.
You can view the container logs (docker logs privoxy-proxy) to see details about what is being blocked.
Cannot access IPv6 websites
This is intentional. The proxy is strictly IPv4-only and will block requests to IPv6 addresses.
Content type
Image
Digest
sha256:cea910365…
Size
6.4 MB
Last updated
about 1 month ago
docker pull boingbasti/nordvpn-privoxy