3. Configuration

3.1. Can I use my old config files?

There are major changes to Junkbuster/ Privoxy configuration from version 2.0.x to 2.9.x and later. Most of the older files will not work at all. This is especially true of blocklist. If this is the case, you will need to re-enter your old data into the new configuration structure. This is probably also a good recommendation even if upgrading from 2.9.x to 3.x since there were many minor changes along the way.

3.2. What is an "actions" file?

"actions" files are where various actions that Privoxy might take, are configured. Typically, you would define a set of default actions that apply to all URLs, then add exceptions to these defaults.

Actions can be defined on a per site basis, or for groups of sites. Actions can also be grouped together and then applied to one or more sites. There are many possible actions that might apply to any given site. As an example, if we are blocking cookies as one of our default actions, but need to accept cookies from a given site, we would define this in our "actions" file.

Privoxy comes with several default actions files, with varying degrees of filtering and blocking, as starting points for your own configuration (see below).

3.3. The "actions" concept confuses me. Please list some of these "actions".

These are all explained in the user-manual. Please refer to that.

3.4. How are actions files configured? What is the easiest way to do this?

The easiest way to do this, is to access Privoxy with your web browser at http://p.p/, and then select "Edit the actions list" from the selection list. You can also do this by editing the appropriate file with a text editor.

Please see the user-manual for a detailed explanation of these and other configuration files, and their various options and syntax.

3.5. What are the differences between intermediate.action, basic.action, etc.?

Configuring Privoxy is not easy. To help you get started, we provide you with three different default configurations. The following table shows you, which features are enabled in each configuration.

Table 1. Default Configurations

Featuredefault.actionbasic.actionintermediate.actionadvanced.action
ad-filtering?xxx
blank image?xxx
de-animate GIFs?xxx
referer forging?xxx
jon's +no-cookies-keep (i.e. session cookies only)?xxx
no-popup windows? xx
fast redirects? xx
hide-referrer? xx
hide-useragent? xx
content-modification?  x
feature-x?   
feature-y?   
feature-z?   

3.6. Why can I change the configuration with a browser? Does that not raise security issues?

What I don't understand, is how I can browser edit the config file as a regular user, while the whole /etc/privoxy hierarchy belongs to the user "privoxy", with only 644 permissions.

When you use the browser-based editor, Privoxy itself is writing to the config files. Because Privoxy is running as the user "privoxy", it can update the config files.

If you don't like this, setting "enable-edit-actions 0" in the config file will disable the browser-based editor. If you're that paranoid, you should also consider setting "enable-remote-toggle 0" to prevent browser-based enabling/disabling of Privoxy.

Note that normally only local users can connect to Privoxy, so this is not (normally) a security problem.

3.7. What is "default.filter"?

The "default.filter" file is used to "filter" any web page content. By "filtering" we mean it can modify, remove, or change anything on the page, including HTML tags, and JavaScript. Regular expressions are used to accomplish this, and operate on a line by line basis. This is potentially a very powerful feature, but requires some expertise.

If you are familiar with regular expressions, and HTML, you can look at the provided default.filter with a text editor and see some of things it can be used for.

Presently, there is no GUI editor option for this part of the configuration, but you can disable/enable various sections of the included default file with the "Actions List Editor" from your browser.

3.8. How can I set up Privoxy to act as a proxy for my LAN?

By default, Privoxy only responds to requests from localhost. To have it act as a server for a network, this needs to be changed in the main config file where the Privoxy configuration is located. In that file is a "listen-address" option. It may be commented out with a "#" symbol. Make sure it is uncommented, and assign it the address of the LAN gateway interface, and port number to use:

  listen-address  192.168.1.1:8118
 

Save the file, and restart Privoxy. Configure all browsers on the network then to use this address and port number.

3.9. Instead of ads, now I get a checkerboard pattern. I don't want to see anything.

This is a configuration option for images that Privoxy is stopping. You have the choice of a checkerboard pattern, a transparent 1x1 GIF image (aka "blank"), or a custom URL of your choice. Note that to fit this category, the URL must match both the "+image" and "+block" actions.

If you want to see nothing, then change the "+image-blocker" action to "+image-blocker{blank}". This can be done from the "Edit Actions List" selection at http://p.p/. Or by hand editing the appropriate actions file. This will only effect what is defined as "images" though. Also, some URLs that generate the bright red "Blocked" banner, can be moved to the "+image-blocker" section for the same reason, but there are some limits and risks to this (see below).

3.10. Why would anybody want to see a checkerboard pattern?

This can be helpful for troubleshooting problems. It might also be good for anyone new to Privoxy so that they can see if their favorite pages are displaying correctly, and Privoxy is not inadvertently removing something important.

3.11. I see large red banners on some pages that say "Blocked". Why and how do I get rid of this?

These are URLs that match something in one of Privoxy's block actions (+block). It is meant to be a warning so that you know something has been blocked and an easy way for you to see why. These are handled differently than what has been defined explicitly as "images" (e.g. ad banners). Depending on the URL itself, it is sometimes hard for Privoxy to really know whether there is indeed an ad image there or not. And there are limitations as to what Privoxy can do to "fool" the browser.

For instance, if the ad is in a frame, then it is embedded in the separate HTML page used for the frame. In this case, you cannot just substitute an aribitray image (like we would for a "blank" image), for an HTML page. The browser is expecting an HTML page, and that is what it must have for frames. So this situation can be a little trickier to deal with, and Privoxy will use the "Blocked" page.

If you want these to be treated as if they were images, so that they can be made invisible, you can try moving the offending URL from the "+block" section to the "+imageblock" section of your actions file. Just be forewarned, if any URL is made "invisible", you may not have any inkling that something has been removed from that page, or why. If this approach does not work, then you are probably dealing with a frame (or "ilayer"), and the only thing that can go there is an HTML page of some sort.

To deal with this situation, you could modify the "block" HTML template that is used by Privoxy to display this, and make it something more to your liking. Currently, there is no configuration option for this. You will have to modify, or create your own page, and use this to replace templates/blocked, which is what Privoxy uses to display the "Blocked" page.

Another way to deal with this is find why and where Privoxy is blocking the frame, and diable this. Then let the "+image-blocker" action handle the ad that is embedded in the frame's HTML page.

3.12. I cannot see all of the "Blocked" page banner. All I see is a bright red square.

There is not enough space to fit the entire page. Try right clicking on the visible, red portion, and select "Show Frame", or equivalent. This will usually allow you to see the entire Privoxy "Blocked" page, and from there you can see just what is being blocked, and why.

3.13. Can Privoxy run as a service on Win2K/NT?

Yes, it can run as a system service using srvany.exe. The only catch is that this will effectively disable the Privoxy icon in the taskbar. You can have one or the other, but not both at this time :(

There is a pending feature request for this functionality. See thread: http://sourceforge.net/tracker/?func=detail&atid=361118&aid=485617&group_id=11118, for details, and a sample configuration.

3.14. How can I make Privoxy work with other proxies like Squid?

This can be done. See the user manual, which describes how to do this.