Privoxy Custom Config

From DD-WRT Wiki

Revision as of 18:33, 18 February 2014 by Magick777 (Talk | contribs)
Jump to: navigation, search

This guide assumes that you are running a version of DD-WRT that has Privoxy included into the DD-WRT firmware; it does not cover installing Privoxy from Optware, although many of the same instructions might still be useful if you do.

Contents

Privoxy basic configuration

Set up custom config for DD-WRT's built-in privoxy

In order to be able to customise Privoxy's configuration files, you will need to

  • set up read/write storage i.e. JFFS2 or USB
  • enable custom privoxy config (in GUI)
  • paste contents of /tmp/privoxy.conf into custom config window in GUI
  • turn on enable-edit-actions
  • adjust the config to use /jffs/privoxy as confdir
  • copy any relevant files from old confdir to new confdir
  • now visit config.privoxy.org in your browser and you'll find "Edit" buttons next to the actions files

Add exception for a site blocked in error

  • edit user.actions
  • scroll down until you find a ruleset that starts with:

-block, -crunch-incoming-cookies, -crunch-outgoing-cookies, -fast-redirects, -filter, -hide-referrer, -prevent-compression

  • add a suitable URL pattern to that section and voila, you're unblocked.

Chaining Privoxy to other software

Privoxy supports selectively forwarding web traffic over HTTP or SOCKS proxy, which means you can use it to route some or all of your web traffic over Tor, and/or to a proxy server of your choice. This has a variety of possible uses, including

  • cacheing HTTP GET requests to minimise bandwidth use
  • circumventing the blocking of e.g. torrent websites by ISPs or governments
  • providing access to Tor hidden services
  • routing specific HTTP connections through a preferred country or jurisdiction


Local HTTP proxy

Tor

Warning: transparently routing your HTTP connections through Tor provides obfuscation but not full anonymity. Your connections to TCP port 80 will be proxied via the Tor network, where so configured, but any other connections that your systems might make will not. For many users this is adequate, e.g. if you're just using Tor to get around website blocking, but it is not as secure as the dedicated Tor bundle. If that is a serious concern to you, read the Tor documentation on the subject (and don't rely on transparent proxying).

With that said, there are (at least) two useful things you can do with Tor chained to Privoxy:

Unblock torrent sites and the like

We assume that you have Tor set up on your router (or another local machine), and exposing a SOCKS proxy on 127.0.0.1:9050. You'll want to configure a Privoxy rule in user.action for selective forwarding to Tor. From the config.privoxy.org interface, edit user.actions, scroll to the end of the file, and add a new section below. Select "enable" for the forward-override match, and in the textbox, enter "forward-socks5 127.0.0.1:9050". Then add the sites that you want to route via Tor.

If you'd rather work at command line, edit /jffs/privoxy/user.action and add a section at the end that reads

+forward-override{forward-socks5 127.0.0.1:9050 .}
torrentz.eu
thepiratebay.se

and so on. This will circumvent basic web filtering by passing your connections to the listed sites off to Tor.

Transparent access to .onion sites

See https://grepular.com/Transparent_Access_to_Tor_Hidden_Services for the general idea. More to follow on making it work with DD-WRT.

SSH