DEV Community

kingyou
kingyou

Posted on

open-source non-caching web proxy - Privoxy

Privoxy is a free, open-source non-caching web proxy that filters HTTP/HTTPS traffic at the application layer to boost privacy, remove ads, manage cookies, and apply custom rules for content control.

Key Features

Privoxy excels in user-configurable filtering without storing pages. Highlights include:

  • Ad and tracker blocking: Targets banners, pop-ups, and web bugs for cleaner, faster browsing.
  • Cookie and header management: Strips tracking cookies, spoofs User-Agent, and hides Referer data.
  • Proxy chaining: Forwards to Tor or SOCKS for anonymity.
  • Access controls: IP-based restrictions and stealth mode for secure setups.
  • Cross-platform: Runs on Linux, Windows, macOS at https://www.privoxy.org.

Installation Guide

Linux (Ubuntu/Debian)

sudo apt update && sudo apt install privoxy -y
sudo systemctl start privoxy
sudo systemctl enable privoxy
Enter fullscreen mode Exit fullscreen mode

Config at /etc/privoxy/config.

Windows

Download installer from privoxy.org, run as admin. Install service: privoxy.exe --install. Edit C:\Program Files\Privoxy\config.txt.

Basic Configuration Steps

  1. Edit config: Uncomment/set listen-address 127.0.0.1:8118.
  2. Enable actions: actionsfile default.action and actionsfile user.action.
  3. Add logging: debug 1 and logfile logfile.
  4. Reload: sudo systemctl reload privoxy (Linux) or restart service (Windows).

Set browser proxy to 127.0.0.1:8118 for HTTP/HTTPS. Test at http://config.privoxy.org/show-status/.

Usage Examples

Block Ads (user.action)

{ +block{Ads} }
.* /ads/ /banner/ /doubleclick.net/
Enter fullscreen mode Exit fullscreen mode

Filters common ad paths.

Forward to Tor/socks (config)

forward-socks5t / 127.0.0.1:9050 .
forward-socks5 / 127.0.0.1:9050 .
Enter fullscreen mode Exit fullscreen mode

Routes all traffic via Tor.

LAN Sharing (config)

listen-address 0.0.0.0:8118
permit-access 192.168.1.0/24
Enter fullscreen mode Exit fullscreen mode

Serves local network; firewall essential.

Why Choose Privoxy?

Perfect for privacy enthusiasts, parents, or low-bandwidth users—unlike Squid (caching-focused) or Nginx (load balancing).

Top comments (0)