By: Privoxy Developers
-$Id: user-manual.sgml,v 1.95 2002/04/26 17:23:29 swa Exp $
+$Id: user-manual.sgml,v 1.103 2002/05/04 00:40:53 hal9 Exp $
The user manual gives users information on how to install, configure and use
Privoxy.
-------------------------------------------------------------------------------
Table of Contents
-
1. Introduction
1.1. Features
-3. Installation
+2. Installation
+
+ 2.1. Binary Packages
+
+ 2.1.1. Red Hat and SuSE RPMs
+ 2.1.2. Debian
+ 2.1.3. Windows
+ 2.1.4. Solaris, NetBSD, FreeBSD, HP-UX
+ 2.1.5. OS/2
+ 2.1.6. Max OSX
+ 2.1.7. AmigaOS
+
+ 2.2. Building from Source
+
+3. Note to Upgraders
+4. Quickstart to Using Privoxy
+5. Starting Privoxy
- 3.1. Red Hat and SuSE RPMs
- 3.2. Debian
- 3.3. Windows
- 3.4. Solaris, NetBSD, FreeBSD, HP-UX
- 3.5. OS/2
- 3.6. Max OSX
- 3.7. AmigaOS
+ 5.1. RedHat and Debian
+ 5.2. SuSE
+ 5.3. Windows
+ 5.4. Solaris, NetBSD, FreeBSD, HP-UX and others
+ 5.5. OS/2
+ 5.6. MAX OSX
+ 5.7. AmigaOS
+ 5.8. Command Line Options
-4. Note to Upgraders
-5. Quickstart to Using Privoxy
-6. Starting Privoxy
+6. Privoxy Configuration
- 6.1. Command Line Options
+ 6.1. Controlling Privoxy with Your Web Browser
+ 6.2. Configuration Files Overview
-7. Privoxy Configuration
+7. The Main Configuration File
- 7.1. Controlling Privoxy with Your Web Browser
- 7.2. Configuration Files Overview
- 7.3. The Main Configuration File
+ 7.1. Configuration and Log File Locations
+
+ 7.1.1. confdir
+ 7.1.2. logdir
+ 7.1.3. actionsfile
+ 7.1.4. filterfile
+ 7.1.5. logfile
+ 7.1.6. jarfile
+ 7.1.7. trustfile
- 7.3.1. Configuration and Log File Locations
-
- 7.3.1.1. confdir
- 7.3.1.2. logdir
- 7.3.1.3. actionsfile
- 7.3.1.4. filterfile
- 7.3.1.5. logfile
- 7.3.1.6. jarfile
- 7.3.1.7. trustfile
-
- 7.3.2. Local Set-up Documentation
-
- 7.3.2.1. trust-info-url
- 7.3.2.2. admin-address
- 7.3.2.3. proxy-info-url
-
- 7.3.3. Debugging
-
- 7.3.3.1. debug
- 7.3.3.2. single-threaded
-
- 7.3.4. Access Control and Security
-
- 7.3.4.1. listen-address
- 7.3.4.2. toggle
- 7.3.4.3. enable-remote-toggle
- 7.3.4.4. enable-edit-actions
- 7.3.4.5. ACLs: permit-access and deny-access
- 7.3.4.6. buffer-limit
-
- 7.3.5. Forwarding
-
- 7.3.5.1. forward
- 7.3.5.2. forward-socks4 and forward-socks4a
- 7.3.5.3. Advanced Forwarding Examples
-
- 7.3.6. Windows GUI Options
+ 7.2. Local Set-up Documentation
- 7.4. Actions Files
+ 7.2.1. user-manual
+ 7.2.2. trust-info-url
+ 7.2.3. admin-address
+ 7.2.4. proxy-info-url
- 7.4.1. Finding the Right Mix
- 7.4.2. How to Edit
- 7.4.3. How Actions are Applied to URLs
- 7.4.4. Patterns
-
- 7.4.4.1. The Domain Pattern
- 7.4.4.2. The Path Pattern
-
- 7.4.5. Actions
-
- 7.4.5.1. +add-header
- 7.4.5.2. +block
- 7.4.5.3. +deanimate-gifs
- 7.4.5.4. +downgrade-http-version
- 7.4.5.5. +fast-redirects
- 7.4.5.6. +filter
- 7.4.5.7. +hide-forwarded-for-headers
- 7.4.5.8. +hide-from-header
- 7.4.5.9. +hide-referer
- 7.4.5.10. +hide-user-agent
- 7.4.5.11. +handle-as-image
- 7.4.5.12. +set-image-blocker
- 7.4.5.13. +limit-connect
- 7.4.5.14. +prevent-compression
- 7.4.5.15. +session-cookies-only
- 7.4.5.16. +prevent-reading-cookies
- 7.4.5.17. +prevent-setting-cookies
- 7.4.5.18. +kill-popups
- 7.4.5.19. +send-vanilla-wafer
- 7.4.5.20. +send-wafer
- 7.4.5.21. Actions Examples
-
- 7.4.6. Aliases
+ 7.3. Debugging
- 7.5. The Filter File
+ 7.3.1. debug
+ 7.3.2. single-threaded
- 7.5.1. The +filter Action
+ 7.4. Access Control and Security
- 7.6. Templates
+ 7.4.1. listen-address
+ 7.4.2. toggle
+ 7.4.3. enable-remote-toggle
+ 7.4.4. enable-edit-actions
+ 7.4.5. ACLs: permit-access and deny-access
+ 7.4.6. buffer-limit
+
+ 7.5. Forwarding
+
+ 7.5.1. forward
+ 7.5.2. forward-socks4 and forward-socks4a
+ 7.5.3. Advanced Forwarding Examples
+
+ 7.6. Windows GUI Options
-8. Contacting the Developers, Bug Reporting and Feature Requests
+8. Actions Files
- 8.1. Get Support
- 8.2. Report bugs
- 8.3. Request new features
- 8.4. Report ads or other filter problems
- 8.5. Other
+ 8.1. Finding the Right Mix
+ 8.2. How to Edit
+ 8.3. How Actions are Applied to URLs
+ 8.4. Patterns
+
+ 8.4.1. The Domain Pattern
+ 8.4.2. The Path Pattern
+
+ 8.5. Actions
+
+ 8.5.1. +add-header
+ 8.5.2. +block
+ 8.5.3. +deanimate-gifs
+ 8.5.4. +downgrade-http-version
+ 8.5.5. +fast-redirects
+ 8.5.6. +filter
+ 8.5.7. +hide-forwarded-for-headers
+ 8.5.8. +hide-from-header
+ 8.5.9. +hide-referer
+ 8.5.10. +hide-user-agent
+ 8.5.11. +handle-as-image
+ 8.5.12. +set-image-blocker
+ 8.5.13. +limit-connect
+ 8.5.14. +prevent-compression
+ 8.5.15. +session-cookies-only
+ 8.5.16. +prevent-reading-cookies
+ 8.5.17. +prevent-setting-cookies
+ 8.5.18. +kill-popups
+ 8.5.19. +send-vanilla-wafer
+ 8.5.20. +send-wafer
+ 8.5.21. Summary
+ 8.5.22. Sample Actions Files
+
+ 8.6. Aliases
+
+9. The Filter File
+
+ 9.1. The +filter Action
+
+10. Templates
+11. Contacting the Developers, Bug Reporting and Feature Requests
-9. Copyright and History
+ 11.1. Get Support
+ 11.2. Report bugs
+ 11.3. Request new features
+ 11.4. Report ads or other filter problems
+ 11.5. Other
- 9.1. Copyright
- 9.2. History
+12. Copyright and History
-10. See Also
-11. Appendix
+ 12.1. Copyright
+ 12.2. History
- 11.1. Regular Expressions
- 11.2. Privoxy's Internal Pages
+13. See Also
+14. Appendix
+
+ 14.1. Regular Expressions
+ 14.2. Privoxy's Internal Pages
- 11.2.1. Bookmarklets
+ 14.2.1. Bookmarklets
- 11.3. Chain of Events
- 11.4. Anatomy of an Action
+ 14.3. Chain of Events
+ 14.4. Anatomy of an Action
--------------------------------------------------------------------------------
-
1. Introduction
This documentation is included with the current beta version of Privoxy,
-v.2.9.14, and is mostly complete at this point. The most up to date reference
+v.2.9.15, and is mostly complete at this point. The most up to date reference
for the time being is still the comments in the source files and in the
individual configuration files. Development of version 3.0 is currently nearing
completion, and includes many significant changes and enhancements over earlier
blocking and cookie management, Privoxy provides new features, some of them
currently under development:
- * FIXME: complete the list of features. change the order: most important
- features to the top of the list. prefix new features with "NEW".
-
* Integrated browser based configuration and control utility at http://
config.privoxy.org/ (shortcut: http://p.p/). Browser-based tracing of rule
and filter effects. Remote toggling.
- * Blocking of annoying pop-up browser windows.
+ * Web page content filtering (removes banners based on size, invisible
+ "web-bugs", JavaScript and HTML annoyances, pop-up windows, etc.)
+
+ * Modularized configuration that allows for standard settings and user
+ settings to reside in separate files, so that installing updated actions
+ files won't overwrite idividual user settings.
* HTTP/1.1 compliant (but not all optional 1.1 features are supported).
and generally a more sophisticated and flexible configuration syntax over
previous versions.
- * GIF de-animation.
+ * Improved cookie management features (e.g. session based cookies).
- * Web page content filtering (removes banners based on size, invisible
- "web-bugs", JavaScript and HTML annoyances, pop-ups, etc.)
+ * GIF de-animation.
* Bypass many click-tracking scripts (avoids script redirection).
* Multi-threaded (POSIX and native threads).
- * Auto-detection and re-reading of config file changes.
-
- * User-customizable HTML templates (e.g. 404 error page).
+ * User-customizable HTML templates for all proxy-generated pages (e.g.
+ "blocked" page).
- * Improved cookie management features (e.g. session based cookies).
+ * Auto-detection and re-reading of config file changes.
* Improved signal handling, and a true daemon mode (Unix).
-------------------------------------------------------------------------------
-3. Installation
+2. Installation
Privoxy is available both in convenient pre-compiled packages for a wide range
of operating systems, and as raw source code. For most users, we recommend
-using the packages, which can be downloaded from our Privoxy Project Page. For
-installing and compiling the source code, please look into our Developer
-Manual.
-
-If you like to live on the bleeding edge and are not afraid of using possibly
-unstable development versions, you can check out the up-to-the-minute version
-directly from the CVS repository or simply download the nightly CVS tarball.
-Again, we refer you to the Developer Manual.
-
-At present, Privoxy is known to run on Windows(95, 98, ME, 2000, XP), Linux
-(RedHat, Suse, Debian), Mac OSX, OS/2, AmigaOS, FreeBSD, NetBSD, BeOS, and many
-more flavors of Unix.
+using the packages, which can be downloaded from our Privoxy Project Page.
Note: If you have a previous Junkbuster or Privoxy installation on your system,
you will need to remove it. Some platforms do this for you as part of their
-installation procedure. (See below for your platform).
+installation procedure. (See below for your platform). In any case be sure to
+backup your old configuration if it is valuable to you. See the note to
+upgraders section below.
+
+-------------------------------------------------------------------------------
+
+2.1. Binary Packages
-In any case be sure to backup your old configuration if it is valuable to you.
-See the note to upgraders section below.
+How to install the binary packages depends on your operating system:
-------------------------------------------------------------------------------
-3.1. Red Hat and SuSE RPMs
+2.1.1. Red Hat and SuSE RPMs
-RPMs can be installed with rpm -Uvh privoxy-2.9.14-1.rpm, and will use /etc/
+RPMs can be installed with rpm -Uvh privoxy-2.9.15-1.rpm, and will use /etc/
privoxy for the location of configuration files.
Note that on Red Hat, Privoxy will not be automatically started on system boot.
that SuSE will automatically start Privoxy in the boot process.
If you have problems with failed dependencies, try rebuilding the SRC RPM: rpm
---rebuild privoxy-2.9.14-1.src.rpm;. This will use your locally installed
+--rebuild privoxy-2.9.15-1.src.rpm;. This will use your locally installed
libraries and RPM version.
Also note that if you have a Junkbuster RPM installed on your system, you need
-------------------------------------------------------------------------------
-3.2. Debian
+2.1.2. Debian
FIXME.
-------------------------------------------------------------------------------
-3.3. Windows
+2.1.3. Windows
Just double-click the installer, which will guide you through the installation
process. You will find the configuration files in the same directory as you
-------------------------------------------------------------------------------
-3.4. Solaris, NetBSD, FreeBSD, HP-UX
+2.1.4. Solaris, NetBSD, FreeBSD, HP-UX
Create a new directory, cd to it, then unzip and untar the archive. For the
most part, you'll have to figure out where things go. FIXME.
-------------------------------------------------------------------------------
-3.5. OS/2
+2.1.5. OS/2
First, make sure that no previous installations of Junkbuster and / or Privoxy
are left on your system. You can do this by
-------------------------------------------------------------------------------
-3.6. Max OSX
+2.1.6. Max OSX
Unzip the downloaded package (you can either double-click on the file in the
finder, or on the desktop if you downloaded it there). Then, double-click on
-------------------------------------------------------------------------------
-3.7. AmigaOS
+2.1.7. AmigaOS
Copy and then unpack the lha archive to a suitable location. All necessary
files will be installed into Privoxy directory, including all configuration and
-------------------------------------------------------------------------------
-4. Note to Upgraders
+2.2. Building from Source
+
+The most convenient way to obtain the Privoxy sources is to download the source
+tarball from our project page.
+
+If you like to live on the bleeding edge and are not afraid of using possibly
+unstable development versions, you can check out the up-to-the-minute version
+directly from the CVS repository or simply download the nightly CVS tarball.
+
+To build Privoxy from source, autoconf, GNU make (gmake), and, of course, a C
+compiler like gcc are required.
+
+When building from a source tarball (either release version or nightly CVS
+tarball), first unpack the source:
+
+ tar xzvf privoxy-2.9.15-beta-src* [.tgz or .tar.gz]
+ cd privoxy-2.9.15-beta
+
+For retrieving the current CVS sources, you'll need CVS installed. Note that
+sources from CVS are development quality, and may not be stable, or well
+tested. To download CVS source:
+
+ cvs -d:pserver:anonymous@cvs.ijbswa.sourceforge.net:/cvsroot/ijbswa login
+ cvs -z3 -d:pserver:anonymous@cvs.ijbswa.sourceforge.net:/cvsroot/ijbswa co current
+ cd current
+
+This will create a directory named current/, which will contain the source
+tree.
+
+Then, in either case, to build from unpacked tarball or CVS source:
+
+ autoheader
+ autoconf
+ ./configure # (--help to see options)
+ make # (the make from gnu, gmake for *BSD)
+ su
+ make -n install # (to see where all the files will go)
+ make install # (to really install)
+
+If you have gnu make, you can have the first four steps automatically done for
+you by just typing:
+
+ make
+
+in the freshly downloaded or unpacked source directory.
+
+For more detailed instructions on how to build Redhat and SuSE RPMs, Windows
+self-extracting installers, building on platforms with special requirements
+etc, please consult the developer manual.
+
+-------------------------------------------------------------------------------
+
+3. Note to Upgraders
-There are very significant changes from older versions of Junkbuster to the
-current Privoxy. Configuration is substantially changed. Junkbuster 2.0.x and
-earlier configuration files will not migrate. The functionality of the old
-blockfile, cookiefile and imagelist, are now combined into the "actions files".
-default.action, is the main actions file. Local exceptions should best be put
-into user.action.
+There are very significant changes from earlier Junkbuster versions to the
+current Privoxy. The number, names, syntax, and purposes of configuration files
+have substantially changed. Junkbuster 2.0.x configuration files will not
+migrate, Junkbuster 2.9.x and Privoxy configurations will need to be ported.
+The functionalities of the old blockfile, cookiefile and imagelist are now
+combined into the "actions files". default.action, is the main actions file.
+Local exceptions should best be put into user.action.
A "filter file" (typically default.filter) is new as of Privoxy 2.9.x, and
provides some of the new sophistication (explained below). config is much the
can be done here, including temporarily disabling Privoxy.
* The primary configuration file for cookie management, ad and banner
- blocking, and many other aspects of Privoxy configuration is in the
- "actions" files. It is strongly recommended to become familiar with the new
- actions concept below, before modifying these files. Locally defined rules
- should go into user.action.
+ blocking, and many other aspects of Privoxy configuration is in the actions
+ files. It is strongly recommended to become familiar with the new actions
+ concept below, before modifying these files. Locally defined rules should
+ go into user.action.
* Some installers may not automatically start Privoxy after installation.
-------------------------------------------------------------------------------
-5. Quickstart to Using Privoxy
+4. Quickstart to Using Privoxy
- * Install Privoxy. See the section Installing.
+ * If upgrading, please back up any configuration files. See the Note to
+ Upgraders Section.
+
+ * Install Privoxy. See the Installation Section for platform specific
+ information.
+
+ * Start Privoxy, if the installation program has not done this already. See
+ the section Starting Privoxy.
+
+ * Set your browser to use Privoxy as HTTP and HTTPS proxy by setting the
+ proxy configuration for address of localhost and port 8118. (Junkbuster and
+ earlier versions of Privoxy used port 8000.) See the section Starting
+ Privoxy.
+
+ * Flush your browser's caches, to remove any cached ad images.
- * Start Privoxy. See the section Starting Privoxy.
+ * Enjoy surfing with enhanced comfort and privacy. You may want to customize
+ the user.action file to personalize your new browsing experience. See the
+ Configuration section for more configuration options, and how to further
+ customize your installation.
- * Change your browser's configuration to use the proxy localhost on port
- 8118. See the section Starting Privoxy.
+ * If you experience problems with sites that "misbehave", see the Anatomy of
+ an Action section in the Appendix.
- * Enjoy surfing with enhanced comfort and privacy. Please see the section
- Contacting the Developers on how to report bugs or problems with websites
- or to get help. You may want to change the file user.action to further
- tweak your new browsing experience.
+ * Please see the section Contacting the Developers on how to report bugs or
+ problems with websites or to get help.
-------------------------------------------------------------------------------
-6. Starting Privoxy
+5. Starting Privoxy
Before launching Privoxy for the first time, you will want to configure your
browser(s) to use Privoxy as a HTTP and HTTPS proxy. The default is localhost
now ready to start enjoying the benefits of using Privoxy!
Privoxy is typically started by specifying the main configuration file to be
-used on the command line. Example Unix startup command:
+used on the command line. If no configuration file is specified on the command
+line, Privoxy will look for a file named config in the current directory.
+Except on Win32 where it will try config.txt.
- # /usr/sbin/privoxy /etc/privoxy/config
+-------------------------------------------------------------------------------
+
+5.1. RedHat and Debian
+
+We use a script. Note that RedHat does not start Privoxy upon booting per
+default. It will use the file /etc/privoxy/config as its main configuration
+file. FIXME: Debian??
+
+ # /etc/rc.d/init.d/privoxy start
+
+-------------------------------------------------------------------------------
+
+5.2. SuSE
+
+We use a script. It will use the file /etc/privoxy/config as its main
+configuration file. Note that SuSE starts Privoxy upon booting your PC.
+
+ # rcprivoxy start
-See below for other command line options.
+-------------------------------------------------------------------------------
+
+5.3. Windows
-An init script is provided for SuSE and Red Hat.
+Click on the Privoxy Icon to start Privoxy. If no configuration file is
+specified on the command line, Privoxy will look for a file named config.txt.
+Note that Windows will automatically start Privoxy upon booting you PC.
-For for SuSE: rcprivoxy start
+-------------------------------------------------------------------------------
-For Red Hat and Debian: /etc/rc.d/init.d/privoxy start
+5.4. Solaris, NetBSD, FreeBSD, HP-UX and others
-If no configuration file is specified on the command line, Privoxy will look
-for a file named config in the current directory. Except on Win32 where it will
-try config.txt. If no file is specified on the command line and no default
-configuration file can be found, Privoxy will fail to start.
+Example Unix startup command:
+
+ # /usr/sbin/privoxy /etc/privoxy/config
-The included default configuration files should give a reasonable starting
-point. Most of the per site configuration is done in the "actions" files. These
-are where various cookie actions are defined, ad and banner blocking, and other
-aspects of Privoxy configuration. There are several such files included, with
-varying levels of aggressiveness.
+-------------------------------------------------------------------------------
-You will probably want to keep an eye out for sites for which you may prefer
-persistent cookies, and add these to your actions configuration as needed. By
-default, most of these will be accepted only during the current browser session
-(aka "session cookies"), unless you add them to the configuration. If you want
-the browser to handle this instead, you will need to edit user.action (or
-through the web based interface) and disable this feature. If you use more than
-one browser, it would make more sense to let Privoxy handle this. In which
-case, the browser(s) should be set to accept all cookies.
+5.5. OS/2
-Another feature where you will probably want to define exceptions for trusted
-sites is the popup-killing (through the +popup and +filter{popups} actions),
-because your favorite shopping, banking, or leisure site may need popups
-(explained below).
+FIXME.
-Privoxy is HTTP/1.1 compliant, but not all of the optional 1.1 features are as
-yet supported. In the unlikely event that you experience inexplicable problems
-with browsers that use HTTP/1.1 per default (like Mozilla or recent versions of
-I.E.), you might try to force HTTP/1.0 compatibility. For Mozilla, look under
-Edit -> Preferences -> Debug -> Networking. Alternatively, set the
-"+downgrade-http-version" config option in default.action which will downgrade
-your browser's HTTP requests from HTTP/1.1 to HTTP/1.0 before processing them.
+-------------------------------------------------------------------------------
-After running Privoxy for a while, you can start to fine tune the configuration
-to suit your personal, or site, preferences and requirements. There are many,
-many aspects that can be customized. "Actions" can be adjusted by pointing your
-browser to http://config.privoxy.org/ (shortcut: http://p.p/), and then follow
-the link to "View & Change the Current Configuration". (This is an internal
-page and does not require Internet access.)
+5.6. MAX OSX
-In fact, various aspects of Privoxy configuration can be viewed from this page,
-including current configuration parameters, source code version numbers, the
-browser's request headers, and "actions" that apply to a given URL. In addition
-to the actions file editor mentioned above, Privoxy can also be turned "on" and
-"off" (toggled) from this page.
+FIXME.
-If you encounter problems, try loading the page without Privoxy. If that helps,
-enter the URL where you have the problems into the browser based rule tracing
-utility. See which rules apply and why, and then try turning them off for that
-site one after the other, until the problem is gone. When you have found the
-culprit, you might want to turn the rest on again.
+-------------------------------------------------------------------------------
-If the above paragraph sounds gibberish to you, you might want to read more
-about the actions concept or even dive deep into the Appendix on actions.
+5.7. AmigaOS
-If you can't get rid of the problem at all, think you've found a bug in
-Privoxy, want to propose a new feature or smarter rules, please see the section
-"Contacting the Developers" below.
+FIXME.
-------------------------------------------------------------------------------
-6.1. Command Line Options
+5.8. Command Line Options
Privoxy may be invoked with the following command-line options:
-------------------------------------------------------------------------------
-7. Privoxy Configuration
+6. Privoxy Configuration
All Privoxy configuration is stored in text files. These files can be edited
with a text editor. Many important aspects of Privoxy can also be controlled
-------------------------------------------------------------------------------
-7.1. Controlling Privoxy with Your Web Browser
+6.1. Controlling Privoxy with Your Web Browser
Privoxy's user interface can be reached through the special URL http://
config.privoxy.org/ (shortcut: http://p.p/), which is a built-in page and works
without Internet access. You will see the following section:
Privoxy Menu
- ? View & change the current configuration
- ? View the source code version numbers
- ? View the request headers.
- ? Look up which actions apply to a URL and why
- ? Toggle Privoxy on or off
+ ?? View & change the current configuration
+ ?? View the source code version numbers
+ ?? View the request headers.
+ ?? Look up which actions apply to a URL and why
+ ?? Toggle Privoxy on or off
This should be self-explanatory. Note the first item leads to an editor for the
-"actions list", which is where the ad, banner, cookie, and URL blocking magic
-is configured as well as other advanced features of Privoxy. This is an easy
-way to adjust various aspects of Privoxy configuration. The actions file, and
-other configuration files, are explained in detail below.
+actions files, which is where the ad, banner, cookie, and URL blocking magic is
+configured as well as other advanced features of Privoxy. This is an easy way
+to adjust various aspects of Privoxy configuration. The actions file, and other
+configuration files, are explained in detail below.
"Toggle Privoxy On or Off" is handy for sites that might have problems with
your current actions and filters. You can in fact use it as a test to see
whether it is Privoxy causing the problem or not. Privoxy continues to run as a
-proxy in this case, but all filtering is disabled. There is even a toggle
-Bookmarklet offered, so that you can toggle Privoxy with one click from your
-browser.
+proxy in this case, but all manipulation is disabled, i.e. Privoxy acts like a
+normal forwarding proxy. There is even a toggle Bookmarklet offered, so that
+you can toggle Privoxy with one click from your browser.
-------------------------------------------------------------------------------
-7.2. Configuration Files Overview
+6.2. Configuration Files Overview
For Unix, *BSD and Linux, all configuration files are located in /etc/privoxy/
by default. For MS Windows, OS/2, and AmigaOS these are all in the same
* The main configuration file is named config on Linux, Unix, BSD, OS/2, and
AmigaOS and config.txt on Windows. This is a required file.
- * default.action (the main actions file) is used to define the default
- settings for various "actions" relating to images, banners, pop-ups, access
- restrictions, banners and cookies.
+ * default.action (the main actions file) is used to define which "actions"
+ relating to banner-blocking, images, pop-ups, content modification, cookie
+ handling etc should be applied by default. It also defines many exceptions
+ (both positive and negative) from this default set of actions that enable
+ Privoxy to selectively eliminate the junk, and only the junk, on as many
+ websites as possible.
Multiple actions files may be defined in config. These are processed in the
order they are defined. Local customizations and locally preferred
- exceptions to the default policies as defined in default.action are
- probably best applied in user.action, which should be preserved across
- upgrades. standard.action is also included. This is mostly for Privoxy's
- internal use.
+ exceptions to the default policies as defined in default.action (which you
+ will most propably want to define sooner or later) are probably best
+ applied in user.action, where you can preserve them across upgrades.
+ standard.action is for Privoxy's internal use.
There is also a web based editor that can be accessed from http://
- config.privoxy.org/show-status/ (Shortcut: http://p.p/show-status/) for the
+ config.privoxy.org/show-status (Shortcut: http://p.p/show-status) for the
various actions files.
* default.filter (the filter file) can be used to re-write the raw page
pre-defined here; whether to apply them or not is up to the actions files.
All files use the "#" character to denote a comment (the rest of the line will
-be ignored) angd understand line continuation through placing a backslash ("\")
+be ignored) and understand line continuation through placing a backslash ("\")
as the very last character in a line. If the # is preceded by a backslash, it
looses its special function. Placing a # in front of an otherwise valid
configuration line to prevent it from being interpreted is called "commenting
-------------------------------------------------------------------------------
-7.3. The Main Configuration File
+7. The Main Configuration File
Again, the main configuration file is named config on Linux/Unix/BSD and OS/2,
and config.txt on Windows. Configuration lines consist of an initial keyword
or tabs). For example:
confdir /etc/privoxy
-
Assigns the value /etc/privoxy to the option confdir and thus indicates that
the configuration directory is named "/etc/privoxy/".
-------------------------------------------------------------------------------
-7.3.1. Configuration and Log File Locations
+7.1. Configuration and Log File Locations
Privoxy can (and normally does) use a number of other files for additional
-configuration and logging. This section of the configuration file tells Privoxy
-where to find those other files.
+configuration, help and logging. This section of the configuration file tells
+Privoxy where to find those other files.
+
+The user running Privoxy, must have read permission for all configuration
+files, and write permission to any files that would be modified, such as log
+files.
-------------------------------------------------------------------------------
-7.3.1.1. confdir
+7.1.1. confdir
Specifies:
-------------------------------------------------------------------------------
-7.3.1.2. logdir
+7.1.2. logdir
Specifies:
-------------------------------------------------------------------------------
-7.3.1.3. actionsfile
+7.1.3. actionsfile
Specifies:
Type of value:
- File name, relative to confdir
+ File name, relative to confdir, without the .action suffix
Default value:
- standard # Internal purposes, recommended not editing
-
- default # Main actions file
-
- user # User customizations
+ standard # Internal purposes, no editing recommended
+
+ default # Main actions file
+
+ user # User customizations
Effect if unset:
Notes:
- Multiple actionsfile lines are OK and are in fact recommended!
+ Multiple actionsfile lines are permitted, and are in fact recommended!
The default values include standard.action, which is used for internal
purposes and should be loaded, default.action, which is the "main" actions
file maintained by the developers, and user.action, where you can make your
personal additions.
- There is no point in using Privoxy without an actions file.
+ Actions files are where all the per site and per URL configuration is done
+ for ad blocking, cookie management, privacy considerations, etc. There is
+ no point in using Privoxy without at least one actions file.
-------------------------------------------------------------------------------
-7.3.1.4. filterfile
+7.1.4. filterfile
Specifies:
Effect if unset:
No textual content filtering takes place, i.e. all +filter{name} actions in
- the actions files are turned off
+ the actions files are turned neutral.
Notes:
-------------------------------------------------------------------------------
-7.3.1.5. logfile
+7.1.5. logfile
Specifies:
644 nobody.nogroup" in /etc/logfiles, with the effect that cron.daily will
automatically archive, gzip, and empty the log, when it exceeds 1M size.
+ Any log files must be writable by whatever user Privoxy is being run as
+ (default on UNIX, user id is "privoxy").
+
-------------------------------------------------------------------------------
-7.3.1.6. jarfile
+7.1.6. jarfile
Specifies:
-------------------------------------------------------------------------------
-7.3.1.7. trustfile
+7.1.7. trustfile
Specifies:
-------------------------------------------------------------------------------
-7.3.2. Local Set-up Documentation
+7.2. Local Set-up Documentation
If you intend to operate Privoxy for more users that just yourself, it might be
a good idea to let them know how to reach you, what you block and why you do
-------------------------------------------------------------------------------
-7.3.2.1. trust-info-url
+7.2.1. user-manual
+
+Specifies:
+
+ Location of the Privoxy User Manual.
+
+Type of value:
+
+ A fully qualified URI
+
+Default value:
+
+ Unset
+
+Effect if unset:
+
+ http://www.privoxy.org/version/user-manual/ will be used, where version is
+ the Privoxy version.
+
+Notes:
+
+ The User Manual URI is used for help links from some of the internal CGI
+ pages. The manual itself is normally packaged with the binary
+ distributions, so you propably want to set this to a locally installed
+ copy. For multi-user setups, you could provide a copy on a local webserver
+ for all your users and use the corresponding URL here.
+
+ Examples:
+
+ Unix, in local filesystem:
+
+ user-manual file:///usr/share/doc/privoxy-2.9.15/user-manual/
+
+ Any platform, on local webserver (called "local-webserver"):
+
+ user-manual http://local-webserver/privoxy-user-manual/
+
+ +-----------------------------------------------------------------+
+ | Warning |
+ |-----------------------------------------------------------------|
+ |If set, this option should be the first option in the config |
+ |file, because it is used while the config file is being read. |
+ +-----------------------------------------------------------------+
+
+-------------------------------------------------------------------------------
+
+7.2.2. trust-info-url
Specifies:
-------------------------------------------------------------------------------
-7.3.2.2. admin-address
+7.2.3. admin-address
Specifies:
-------------------------------------------------------------------------------
-7.3.2.3. proxy-info-url
+7.2.4. proxy-info-url
Specifies:
-------------------------------------------------------------------------------
-7.3.3. Debugging
+7.3. Debugging
These options are mainly useful when tracing a problem. Note that you might
also want to invoke Privoxy with the --no-daemon command line option when
-------------------------------------------------------------------------------
-7.3.3.1. debug
+7.3.1. debug
Specifies:
-------------------------------------------------------------------------------
-7.3.3.2. single-threaded
+7.3.2. single-threaded
Specifies:
-------------------------------------------------------------------------------
-7.3.4. Access Control and Security
+7.4. Access Control and Security
This section of the config file controls the security-relevant aspects of
Privoxy's configuration.
-------------------------------------------------------------------------------
-7.3.4.1. listen-address
+7.4.1. listen-address
Specifies:
-------------------------------------------------------------------------------
-7.3.4.2. toggle
+7.4.2. toggle
Specifies:
If set to 0, Privoxy will start in "toggled off" mode, i.e. behave like a
normal, content-neutral proxy. See enable-remote-toggle below. This is not
really useful anymore, since toggling is much easier via the web interface
- then via editing the conf file.
+ than via editing the conf file.
The windows version will only display the toggle icon in the system tray if
this option is present.
-------------------------------------------------------------------------------
-7.3.4.3. enable-remote-toggle
+7.4.3. enable-remote-toggle
Specifies:
-------------------------------------------------------------------------------
-7.3.4.4. enable-edit-actions
+7.4.4. enable-edit-actions
Specifies:
-------------------------------------------------------------------------------
-7.3.4.5. ACLs: permit-access and deny-access
+7.4.5. ACLs: permit-access and deny-access
Specifies:
-------------------------------------------------------------------------------
-7.3.4.6. buffer-limit
+7.4.6. buffer-limit
Specifies:
-------------------------------------------------------------------------------
-7.3.5. Forwarding
+7.5. Forwarding
This feature allows routing of HTTP requests through a chain of multiple
proxies. It can be used to better protect privacy and confidentiality when
-------------------------------------------------------------------------------
-7.3.5.1. forward
+7.5.1. forward
Specifies:
-------------------------------------------------------------------------------
-7.3.5.2. forward-socks4 and forward-socks4a
+7.5.2. forward-socks4 and forward-socks4a
Specifies:
-------------------------------------------------------------------------------
-7.3.5.3. Advanced Forwarding Examples
+7.5.3. Advanced Forwarding Examples
If you have links to multiple ISPs that provide various special content only to
their subscribers, you can configure multiple Privoxies which have connections
-------------------------------------------------------------------------------
-7.3.6. Windows GUI Options
+7.6. Windows GUI Options
Privoxy has a number of options specific to the Windows GUI interface:
-------------------------------------------------------------------------------
-7.4. Actions Files
+8. Actions Files
The actions files are used to define what actions Privoxy takes for which URLs,
-and thus determines how ad images, cookies and various other aspects of HTTP
+and thus determine how ad images, cookies and various other aspects of HTTP
content and transactions are handled, and on which sites (or even parts
-thereof). There are three such files included with Privoxy, with slightly
-different purposes. default.action sets the default policies. standard.action
-is used by Privoxy and the web based editor to set pre-defined values (and
-normally should not be edited). Local exceptions are best done in user.action.
-The content of these can all be viewed and edited from http://
-config.privoxy.org/show-status.
-
-Anything you want can be blocked, including ads, banners, or just some
-obnoxious URL that you would rather not see is done here. Cookies can be
-accepted or rejected, or accepted only during the current browser session (i.e.
-not written to disk), content can be modified, JavaScripts tamed, user-tracking
-fooled, and much more. See below for a complete list of available actions.
-
-An actions file typically has sections. Near the top, "aliases" are optionally
-defined (discussed below), then the default set of rules which will apply
-universally to all sites and pages. And then below that, exceptions to the
-defined universal policies.
-
--------------------------------------------------------------------------------
-
-7.4.1. Finding the Right Mix
-
-Note that some actions like cookie suppression or script disabling may render
-some sites unusable, which rely on these techniques to work properly. Finding
-the right mix of actions is not easy and certainly a matter of personal taste.
-In general, it can be said that the more "aggressive" your default settings (in
-the top section of the actions file) are, the more exceptions for "trusted"
-sites you will have to make later. If, for example, you want to kill popup
-windows per default, you'll have to make exceptions from that rule for sites
-that you regularly use and that require popups for actually useful content,
-like maybe your bank, favorite shop, or newspaper.
+thereof). There are three such files included with Privoxy (as of version
+2.9.15), with differing purposes:
+
+ * standard.action - is used by the web based editor, to set various
+ pre-defined sets of rules for the default actions section in
+ default.action. These have increasing levels of aggressiveness and have no
+ influence on your browsing unless you select them explicitly in the editor.
+ It is not recommend to edit this file.
+
+ * default.action - is the primary action file that sets the initial values
+ for all actions. It is intended to provide a base level of functionality
+ for Privoxy's array of features. So it is a set of broad rules that should
+ work reasonably well for users everywhere. This is the file that the
+ developers are keeping updated, and making available to users.
+
+ * user.action - is intended to be for local site preferences and exceptions.
+ As an example, if your ISP or your bank has specific requirements, and need
+ special handling, this kind of thing should go here. This file will not be
+ upgraded.
+
+The list of actions files to be used are defined in the main configuration
+file, and are processed in the order they are defined. The content of these can
+all be viewed and edited from http://config.privoxy.org/show-status.
+
+An actions file typically has multiple sections. If you want to use "aliases"
+in an actions file, you have to place the (optional) alias section at the top
+of that file. Then comes the default set of rules which will apply universally
+to all sites and pages (be very careful with using such a universal set in
+user.action or any other actions file after default.action, because it will
+override the result from consulting any previous file). And then below that,
+exceptions to the defined universal policies. You can regard user.action as an
+appendix to default.action, with the advantage that is a separate file, which
+makes preserving your personal settings across Privoxy upgrades easier.
+
+Actions can be used to block anything you want, including ads, banners, or just
+some obnoxious URL that you would rather not see. Cookies can be accepted or
+rejected, or accepted only during the current browser session (i.e. not written
+to disk), content can be modified, JavaScripts tamed, user-tracking fooled, and
+much more. See below for a complete list of actions.
+
+-------------------------------------------------------------------------------
+
+8.1. Finding the Right Mix
+
+Note that some actions, like cookie suppression or script disabling, may render
+some sites unusable that rely on these techniques to work properly. Finding the
+right mix of actions is not always easy and certainly a matter of personal
+taste. In general, it can be said that the more "aggressive" your default
+settings (in the top section of the actions file) are, the more exceptions for
+"trusted" sites you will have to make later. If, for example, you want to kill
+popup windows per default, you'll have to make exceptions from that rule for
+sites that you regularly use and that require popups for actually useful
+content, like maybe your bank, favorite shop, or newspaper.
We have tried to provide you with reasonable rules to start from in the
distribution actions files. But there is no general rule of thumb on these
-------------------------------------------------------------------------------
-7.4.2. How to Edit
+8.2. How to Edit
-The easiest way to edit the "actions" files is with a browser by using our
+The easiest way to edit the actions files is with a browser by using our
browser-based editor, which can be reached from http://config.privoxy.org/
-show-status.
+show-status. The editor allows both fine-grained control over every single
+feature on a per-URL basis, and easy choosing from wholesale sets of defaults
+like "Cautious", "Medium" or "Advanced".
If you prefer plain text editing to GUIs, you can of course also directly edit
-the the actions files.
+the the actions files. Look at default.action which is richly commented.
-------------------------------------------------------------------------------
-7.4.3. How Actions are Applied to URLs
+8.3. How Actions are Applied to URLs
Actions files are divided into sections. There are special sections, like the "
alias" sections which will be discussed later. For now let's concentrate on
on a separate line.
To determine which actions apply to a request, the URL of the request is
-compared to all patterns in this file. Every time it matches, the list of
-applicable actions for the URL is incrementally updated, using the heading of
-the section in which the pattern is located. If multiple matches for the same
-URL set the same action differently, the last match wins. If not, the effects
-are aggregated (e.g. a URL might match both the "+handle-as-image" and "+block"
-actions).
+compared to all patterns in each action file file. Every time it matches, the
+list of applicable actions for the URL is incrementally updated, using the
+heading of the section in which the pattern is located. If multiple matches for
+the same URL set the same action differently, the last match wins. If not, the
+effects are aggregated (e.g. a URL might match both the "+handle-as-image" and
+"+block" actions).
-You can trace this process by visiting http://config.privoxy.org/show-url-info.
+You can trace this process for any given URL by visiting http://
+config.privoxy.org/show-url-info.
More detail on this is provided in the Appendix, Anatomy of an Action.
-------------------------------------------------------------------------------
-7.4.4. Patterns
+8.4. Patterns
Generally, a pattern has the form <domain>/<path>, where both the <domain> and
<path> are optional. (This is why the pattern / matches all URLs).
-------------------------------------------------------------------------------
-7.4.4.1. The Domain Pattern
+8.4.1. The Domain Pattern
The matching of the domain part offers some flexible options: if the domain
starts or ends with a dot, it becomes unanchored at that end. For example:
-------------------------------------------------------------------------------
-7.4.4.2. The Path Pattern
+8.4.2. The Path Pattern
Privoxy uses Perl compatible regular expressions (through the PCRE library) for
matching the path.
-------------------------------------------------------------------------------
-7.4.5. Actions
+8.5. Actions
All actions are disabled by default, until they are explicitly enabled
somewhere in an actions file. Actions are turned on if preceded with a "+", and
-turned off if preceded with a "-". So a "+action" means "do that action", e.g.
-"+block" means please "block the following URL patterns".
+turned off if preceded with a "-". So a +action means "do that action", e.g.
++block means "please block URLs that match the following patterns", and -block
+means "don't block URLs that match the following patterns, even if +block
+previously applied."
-Actions are invoked by enclosing the action name in curly braces (e.g.
-{+some_action}), followed by a list of URLs (or patterns that match URLs) to
-which the action applies. There are three classes of actions:
+Again, actions are invoked by placing them on a line, enclosed in curly braces
+and separated by whitespace, like in {+some-action -some-other-action
+{some-parameter}}, followed by a list of URL patterns, one per line, to which
+they apply. Together, the actions line and the following pattern lines make up
+a section of the actions file.
- * Boolean, i.e the action can only be "on" or "off". Examples:
+There are three classes of actions:
+
+ * Boolean, i.e the action can only be "enabled" or "disabled". Syntax:
+
+ +name # enable action name
+ -name # disable action name
+
+ Example: +block
+
+ * Parameterized, where some value is required in order to enable this type of
+ action. Syntax:
+
+ +name{param} # enable action and set parameter to param,
+ # overwriting parameter from previous match if necessary
+ -name # disable action. The parameter can be omitted
- {+name} # enable this action
- {-name} # disable this action
-
+ Note that if the URL matches multiple positive forms of a parameterized
+ action, the last match wins, i.e. the params from earlier matches are
+ simply ignored.
- * Parameterized, e.g. "+/-hide-user-agent{ Mozilla 1.0 }", where some value
- is required in order to enable this type of action. Examples:
+ Example: +hide-user-agent{ Mozilla 1.0 }
- {+name{param}} # enable action and set parameter to "param"
- {-name} # disable action ("parameter") can be omitted
-
+ * Multi-value. These look exactly like parameterized actions, but they behave
+ differently: If the action applies multiple times to the same URL, but with
+ different parameters, all the parameters from all matches are remembered.
+ This is used for actions that can be executed for the same request
+ repeatedly, like adding multiple headers, or filtering through multiple
+ filters. Syntax:
- * Multi-value, e.g. "{+/-add-header{Name: value}}" or "{+/-send-wafer{name=
- value}}"), where some value needs to be defined in addition to simply
- enabling the action. Examples:
+ +name{param} # enable action and add param to the list of parameters
+ -name{param} # remove the parameter param from the list of parameters
+ # If it was the last one left, disable the action.
+ -name # disable this action completely and remove all parameters from the list
- {+name{param=value}} # enable action and set "param" to "value"
- {-name{param=value}} # remove the parameter "param" completely
- {-name} # disable this action totally and remove param too
-
+ Examples: +add-header{X-Fun-Header: Some text} and +filter{html-annoyances}
If nothing is specified in any actions file, no "actions" are taken. So in this
case Privoxy would just be a normal, non-blocking, non-anonymizing proxy. You
the actions are applied in the order they are specified. Actions files are
processed in the order they are defined in config (the default installation has
three actions files). It also quite possible for any given URL pattern to match
-more than one action!
+more than one pattern and thus more than one set of actions!
-The list of valid Privoxy "actions" are:
+The list of valid Privoxy actions are:
-------------------------------------------------------------------------------
-7.4.5.1. +add-header
+8.5.1. +add-header
Type:
Multi-value.
-Typical uses:
+Purpose and typical uses:
- Send a user defined HTTP header to the web server.
+ Send a user defined HTTP header to the web server. Can be used to confuse
+ log analysis.
Possible values:
Any value is possible. Validity of the defined HTTP headers is not checked.
+ It is recommended that you use the "X-" prefix for custom headers.
Example usage:
{+add-header{X-User-Tracking: sucks}}
.example.com
-
Notes:
-------------------------------------------------------------------------------
-7.4.5.2. +block
+8.5.2. +block
Type:
Boolean.
-Typical uses:
+Purpose and typical uses:
- Used to block a URL from reaching your browser. The URL may be anything,
- but is typically used to block ads or other obnoxious content.
+ Requests for URLs to which this action applies are blocked, i.e. the
+ requests are not forwarded to the remote server, but answered locally with
+ a substitute page or image, as determined by the handle-as-image and
+ set-image-blocker actions. It is typically used to block ads or other
+ obnoxious content.
Possible values:
-------------------------------------------------------------------------------
-7.4.5.3. +deanimate-gifs
+8.5.3. +deanimate-gifs
Type:
-------------------------------------------------------------------------------
-7.4.5.4. +downgrade-http-version
+8.5.4. +downgrade-http-version
Type:
-------------------------------------------------------------------------------
-7.4.5.5. +fast-redirects
+8.5.5. +fast-redirects
Type:
-------------------------------------------------------------------------------
-7.4.5.6. +filter
+8.5.6. +filter
Type:
-------------------------------------------------------------------------------
-7.4.5.7. +hide-forwarded-for-headers
+8.5.7. +hide-forwarded-for-headers
Type:
-------------------------------------------------------------------------------
-7.4.5.8. +hide-from-header
+8.5.8. +hide-from-header
Type:
-------------------------------------------------------------------------------
-7.4.5.9. +hide-referer
+8.5.9. +hide-referer
Type:
-------------------------------------------------------------------------------
-7.4.5.10. +hide-user-agent
+8.5.10. +hide-user-agent
Type:
-------------------------------------------------------------------------------
-7.4.5.11. +handle-as-image
+8.5.11. +handle-as-image
Type:
-------------------------------------------------------------------------------
-7.4.5.12. +set-image-blocker
+8.5.12. +set-image-blocker
Type:
-------------------------------------------------------------------------------
-7.4.5.13. +limit-connect
+8.5.13. +limit-connect
Type:
-------------------------------------------------------------------------------
-7.4.5.14. +prevent-compression
+8.5.14. +prevent-compression
Type:
-------------------------------------------------------------------------------
-7.4.5.15. +session-cookies-only
+8.5.15. +session-cookies-only
Type:
-------------------------------------------------------------------------------
-7.4.5.16. +prevent-reading-cookies
+8.5.16. +prevent-reading-cookies
Type:
-------------------------------------------------------------------------------
-7.4.5.17. +prevent-setting-cookies
+8.5.17. +prevent-setting-cookies
Type:
-------------------------------------------------------------------------------
-7.4.5.18. +kill-popups
+8.5.18. +kill-popups
Type:
-------------------------------------------------------------------------------
-7.4.5.19. +send-vanilla-wafer
+8.5.19. +send-vanilla-wafer
Type:
-------------------------------------------------------------------------------
-7.4.5.20. +send-wafer
+8.5.20. +send-wafer
Type:
-------------------------------------------------------------------------------
-7.4.5.21. Actions Examples
+8.5.21. Summary
+
+Note that many of these actions have the potential to cause a page to
+misbehave, possibly even not to display at all. There are many ways a site
+designer may choose to design his site, and what HTTP header content, and other
+criteria, he may depend on. There is no way to have hard and fast rules for all
+sites. See the Appendix for a brief example on troubleshooting actions.
+
+-------------------------------------------------------------------------------
+
+8.5.22. Sample Actions Files
+
+Remember that the meaning of any of the above references is reversed by
+preceding the action with a "-", in place of the "+". Also, that some actions
+are turned on in the default section of the actions file, and require little to
+no additional configuration. These are just "on".
+
+But, other actions that are turned on in the default section do typically
+require exceptions to be listed in the latter sections of one of our actions
+file. For instance, by default no URLs are "blocked" (i.e. in the default
+definitions of default.action). We need exceptions to this in order to enable
+ad blocking in the lower sections. But we need to be very selective about what
+we do block. Thus, the default is "off" for blocking.
-Note that the meaning of any of the above examples is reversed by preceding the
-action with a "-", in place of the "+". Also, that some actions are turned on
-in the default section of the actions file, and require little to no additional
-configuration. These are just "on". But, other actions that are turned on the
-default section do typically require exceptions to be listed in the latter
-sections of one of our actions file. For instance, by default no URLs are
-"blocked" (i.e. in the default definitions of default.action). We need
-exceptions to this in order to enable ad blocking in the lower sections. But we
-need to be very selective about what we do block.
+Below is a liberally commented sample default.action file to demonstrate how
+all the pieces come together. And to show how exceptions to the default
+policies can be handled. This is followed by a brief user.action with similar
+examples.
-Below is a liberally commented default.action file to demonstrate the pieces
-all come together. And to show how exceptions to the default policies can be
-handled. This is followed by a user.action with similar examples.
+# Sample default.action file <developers@privoxy.org>
+
+# Settings -- Don't change! For internal Privoxy use ONLY.
+{{settings}}
+for-privoxy-version=3.0
##########################################################################
# Aliases must be defined *before* they are used. These are
-# easier to remember, and combine several actions into one:
+# easier to remember, and can combine several actions into one. Once
+# defined they can be used just like any built-in action -- but within
+# this file only! Aliases do not require a + or - sign.
##########################################################################
# Some useful aliases.
- +prevent-cookies = +prevent-setting-cookies +prevent-reading-cookies
- -prevent-cookies = -prevent-setting-cookies -prevent-reading-cookies
+# Alias to turn off cookie handling, ie allow all cookies unmolested.
+ -prevent-cookies = -prevent-setting-cookies -prevent-reading-cookies \
+ -session-cookies-only
+
+# Alias to both block and treat as if an image for ad blocking
+# purposes.
+imageblock = +block +handle-as-image
# Fragile sites should have the minimum changes:
-prevent-cookies -kill-popups
# Shops should be allowed to set persistent cookies
- shop = -filter -prevent-cookies -prevent-keeping-cookies
+ shop = -filter -prevent-cookies -session-cookies-only
##########################################################################
# Begin default action settings. Anything in this section will match
-# all URLs -- UNLESS we have exceptions defined below this section.
-# We will show all potential actions here whether they are on or off.
-# We could omit any disabled action if we wanted, since all actions are
-# 'off' by default anyway. Shown for completeness only.
+# all URLs -- UNLESS we have exceptions that also match, defined below this
+# section. We will show all potential actions here whether they are on
+# or off. We could omit any disabled action if we wanted, since all
+# actions are 'off' by default anyway. Shown for completeness only.
+# Actions are enabled if preceded by a '+', otherwise they are disabled
+# (unless an alias has been defined without this).
##########################################################################
{ \
-add-header \
-send-vanilla-wafer \
-send-wafer \
}
- / # forward slash will match all potential URLs patterns.
+ / # forward slash will match *all* potential URL patterns.
##########################################################################
-# Default behavior is now set. Time for some exceptions to our
-# default actions.
+# Default behavior is now set. Now we will define some exceptions to our
+# default action policies.
##########################################################################
# These sites are very complex and require very minimal interference.
-# We'll disable most actions with our 'fragile' alias.
- {fragile}
- .office.microsoft.com
+# We'll disable most actions with our 'fragile' alias:
+ { fragile }
+ .office.microsoft.com # surprise, surprise!
.windowsupdate.microsoft.com
-# Shopping sites - not as fragile. We still want to block ads.
- {shop}
+# Shopping sites - not as fragile but require some special
+# handling. We still want to block ads, and we will allow
+# persistant cookies via the 'shop' alias:
+ { shop }
.quietpc.com
.worldpay.com # for quietpc.com
.jungle.com
# These sites require pop-ups too :( We'll combine our 'shop'
# alias with two other actions into one rule to allow all popups.
- {shop -no-popups -filter{popups}}
+ { shop -kill-popups -filter{popups} }
.dabs.com
.overclockers.co.uk
# The 'Fast-redirects' action breaks some sites. Disable this action
-# for these known sensitive sites.
- {-fast-redirects}
- www.ukc.ac.uk/cgi-bin/wac\.cgi\?
+# for these known sensitive sites:
+ { -fast-redirects }
login.yahoo.com
edit.europe.yahoo.com
.google.com
# Define which file types will be treated as images. Important
# for ad blocking.
- {+handle-as-image}
+ { +handle-as-image }
/.*\.(gif|jpe?g|png|bmp|ico)
# Now lets list some domains that are known ad generators. And
-# our alias here will block these as well as force them to be
-# treated as images. This combination of actions is important
-# for ad blocking. What the browser will show instead is
+# our alias that we use here will block these as well as force
+# them to be treated as images. This combination of actions is
+# important for ad blocking. What the browser will show instead is
# determined by the setting of "+set-image-blocker"
- {+imageblock}
+ { +imageblock }
ar.atwola.com
.ad.doubleclick.net
.a.yimg.com/(?:(?!/i/).)*$
# These will just simply be blocked. They will generate the BLOCKED
# banner page, if matched. Heavy use of wildcards and regular
-# expressions in this example.
- {+block}
+# expressions in this example. Enable block action:
+ { +block }
ad*.
.*ads.
banner?.
.hitbox.com
-# The above block section will catch some sites we DO NOT want
-# blocked via wildcards and regular expressions. Now set exceptions
-# to the exceptions so the good guys get better treatment.
- {-block}
+# The above block section will probably inadvertantly catch some
+# sites we DO NOT want blocked via the wildcards and regular expressions.
+# Now let's set exceptions to the exceptions so the good guys get better
+# treatment. Disable block action:
+ { -block }
advogato.org
adsl.
ad[ud]*.
advice.
-# Let's just trust universities
+# Let's just trust all .edu top level domains.
.edu
www.ugu.com/sui/ugu/adv
# We'll need to access to path names containing 'download'
.*downloads.
/downloads/
-# 'adv' is for globalintersec means advanced, not advertisement
+# 'adv' is for globalintersec and means advanced, not advertisement
www.globalintersec.com/adv
# Don't filter *anything* from our friends at sourceforge.
# Notice we don't have to name the individual filter
-# identifiers -- we just turn them all off.
- {-filter}
+# identifiers -- we just turn them all off in one fell swoop.
+# Disable all filters for this one site:
+ { -filter }
.sourceforge.net
-
-Some examples:
+So far we are painting with a broad brush by setting general policies. The
+above would be a reasonable starting point for many situations. Now, we want to
+be more specific and have customized rules that are more suitable to our
+personal habits and preferences. These would be for narrowly defined situations
+like your ISP or your bank, and should be placed in user.action, which is
+parsed after all other actions files and should not be clobbered by upgrades.
+So any settings here, will have the last word and over-ride any previously
+defined actions.
-Turn off cookies by default, then allow a few through for specified sites
-(showing an excerpt from the "default" section of an actions file ONLY):
+Now a few examples of some things that one might do with a user.action file.
- # Excerpt only:
- # Allow cookies to and from the server, but
- # for this browser session ONLY
- {
- # other actions normally listed here...
- -prevent-setting-cookies \
- -prevent-reading-cookies \
- +session-cookies-only \
- }
- / # match all URLs
+# Sample user.action file.
- # Exceptions to the above, sites that benefit from persistent cookies
- # that are saved from one browser session to the next.
- { -session-cookies-only }
- .javasoft.com
- .sun.com
- .yahoo.com
- .msdn.microsoft.com
- .redhat.com
+# Any aliases you want to use need to be re-defined here.
+# Alias to turn off cookie handling, ie allow all cookies unmolested.
+ -prevent-cookies = -prevent-setting-cookies -prevent-reading-cookies \
+ -session-cookies-only
-
+# Fragile sites should have the minimum changes:
+ fragile = -block -deanimate-gifs -fast-redirects -filter -hide-referer \
+ -prevent-cookies -kill-popups
-Now turn off "fast redirects", and then we allow two exceptions:
+# Allow persistent cookies for a few regular sites that we
+# trust via our above alias. These will be saved from one browser session
+# to the next. We are explicity turning off any and all cookie handling,
+# even though the prevent-*-cookie settings were disabled in our above
+# default.action anyway. So cookies from these domains will come through
+# unmolested.
+ { -prevent-cookies }
+ .sun.com
+ .yahoo.com
+ .msdn.microsoft.com
+ .redhat.com
- # Turn them off (excerpt only)!
- {
- # other actions normally listed here...
- +fast-redirects
- }
- / # match all URLs
-
- # Reverse it for these two sites, which don't work right without it.
- {-fast-redirects}
- www.ukc.ac.uk/cgi-bin/wac\.cgi\?
- login.yahoo.com
-
-Turn on page filtering according to rules in the defined sections of
-default.filter, and make one exception for Sourceforge:
+# My ISP uses obnoxious self promoting images on many pages.
+# Nuke them :) Note that "+handle-as-image" need not be specified,
+# since all URLs ending in .gif will be tagged as images by the
+# general rules in default.action anyway.
+ { +block }
+ www.my-isp-example.com/logo[0-9].gif
- # Run everything through the filter file, using only certain
- # specified sections:
- {
- # other actions normally listed here...
- +filter{html-annoyances} +filter{js-annoyances} +filter{kill-popups}\
- +filter{webbugs} +filter{nimda} +filter{banners-by-size}
- }
- / #match all URLs
-
- # Then disable filtering of code from all sourceforge domains!
- {-filter}
- .sourceforge.net
-
-
-Now some URLs that we want "blocked" (normally generates the "blocked" banner).
-Typically, the "block" action is off by default in the upper section of an
-actions file, then enabled against certain URLs and patterns in the lower part
-of the file. Many of these use regular expressions that will expand to match
-multiple URLs:
-
- # Blocklist:
- {+block}
- ad*.
- .*ads.
- banner?.
- count*.
- /.*count(er)?\.(pl|cgi|exe|dll|asp|php[34]?)
- /(?:.*/)?(publicite|werbung|rekla(ma|me|am)|annonse|maino(kset|nta|s)?)/
- .hitbox.com
- /.*/(ng)?adclient\.cgi
- /.*/(plain|live|rotate)[-_.]?ads?/
- /.*/abanners/
- /autoads/
-
-Note that many of these actions have the potential to cause a page to
-misbehave, possibly even not to display at all. There are many ways a site
-designer may choose to design his site, and what HTTP header content, and other
-criteria, he may depend on. There is no way to have hard and fast rules for all
-sites. See the Appendix for a brief example on troubleshooting actions.
+# Say the site where you do your homebanking needs to open
+# popup windows, but you have chosen to kill popups by
+# default. This will allow it for your-example-bank.com:
+#
+ { -filter{popups} -kill-popups }
+ .my-example-bank.com
+
+
+# This site is delicate, and requires kid-glove
+# treatment.
+ { fragile }
+ .forbes.com
+
-------------------------------------------------------------------------------
-7.4.6. Aliases
+8.6. Aliases
Custom "actions", known to Privoxy as "aliases", can be defined by combining
other "actions". These can in turn be invoked just like the built-in "actions".
". But please use only "a"- "z", "0"-"9", "+", and "-". Alias names are not
case sensitive, and must be defined before other actions in the actions file!
And there can only be one set of "aliases" defined per file. Each actions file
-may have its own aliases, but they are only visible within that file.
+may have its own aliases, but they are only visible within that file. Aliases
+do not requir a "+" or "-" sign in front, since they are merely expanded.
Now let's define a few aliases:
-------------------------------------------------------------------------------
-7.5. The Filter File
+9. The Filter File
Any web page can be dynamically modified with the filter file. This
modification can be removal, or re-writing, of any web page content, including
-tags and non-visible content. The default filter file is default.filter,
-located in the config directory.
+tags and non-visible content. The default filter file is oddly enough
+default.filter, located in the config directory.
This is potentially a very powerful feature, and requires knowledge of both
"regular expression" and HTML in order create custom filters. But, there are a
-------------------------------------------------------------------------------
-7.5.1. The +filter Action
+9.1. The +filter Action
Filters are enabled with the "+filter" action from within one of the actions
files. "+filter" requires one parameter, which should match one of the section
identifiers in the filter file itself. Example:
+filter{html-annoyances}
-
This would activate that particular filter. Similarly, "+filter" can be turned
-off for selected sites as: "-filter{html-annoyances}". Remember, all actions
-are off by default, unless they are explicity enabled in one of the actions
-files.
+off for selected sites as: "-filter{html-annoyances}". Remember too, all
+actions are off by default, unless they are explicity enabled in one of the
+actions files.
-------------------------------------------------------------------------------
-7.6. Templates
+10. Templates
When Privoxy displays one of its internal pages, such as a 404 Not Found error
-page, it uses the appropriate template. On Linux, BSD, and Unix, these are
-located in /etc/privoxy/templates by default. These may be customized, if
-desired. cgi-style.css is used to control the HTML attributes (fonts, etc).
+page (Privoxy must be running for link to work as intended), it uses the
+appropriate template. On Linux, BSD, and Unix, these are located in /etc/
+privoxy/templates by default. These may be customized, if desired.
+cgi-style.css is used to control the HTML attributes (fonts, etc).
-The default "Blocked" banner page with the bright red top banner, is called
-just "blocked". This may be customized or replaced with something else if
-desired.
+The default Blocked (Privoxy needs to be running for page to display) banner
+page with the bright red top banner, is called just "blocked". This may be
+customized or replaced with something else if desired.
-------------------------------------------------------------------------------
-8. Contacting the Developers, Bug Reporting and Feature Requests
+11. Contacting the Developers, Bug Reporting and Feature Requests
We value your feedback. However, to provide you with the best support, please
note the following sections.
-------------------------------------------------------------------------------
-8.1. Get Support
+11.1. Get Support
To get support, use the Sourceforge Support Forum:
http://sourceforge.net/tracker/?group_id=11118&atid=211118
-
-------------------------------------------------------------------------------
-8.2. Report bugs
+11.2. Report bugs
To submit bugs, use the Sourceforge Bug Forum:
http://sourceforge.net/tracker/?group_id=11118&atid=111118.
-
Make sure that the bug has not already been submitted. Please try to verify
that it is a Privoxy bug, and not a browser or site bug first. If you are using
-------------------------------------------------------------------------------
-8.3. Request new features
+11.3. Request new features
To submit ideas on new features, use the Sourceforge feature request forum:
http://sourceforge.net/tracker/?atid=361118&group_id=11118&func=browse.
-
-------------------------------------------------------------------------------
-8.4. Report ads or other filter problems
+11.4. Report ads or other filter problems
You can also send feedback on websites that Privoxy has problems with. Please
bookmark the following link: "Privoxy - Submit Filter Feedback". Once you surf
-------------------------------------------------------------------------------
-8.5. Other
+11.5. Other
For any other issues, feel free to use the mailing lists:
http://sourceforge.net/mail/?group_id=11118.
-
Anyone interested in actively participating in development and related
discussions can also join the appropriate mailing list. Archives are available,
-------------------------------------------------------------------------------
-9. Copyright and History
+12. Copyright and History
-9.1. Copyright
+12.1. Copyright
Privoxy is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
-------------------------------------------------------------------------------
-9.2. History
+12.2. History
Privoxy is evolved, and derived from, the Internet Junkbuster, with many
improvments and enhancements over the original.
-------------------------------------------------------------------------------
-10. See Also
+13. See Also
Other references and sites of interest to Privoxy users:
http://p.p/, access Privoxy from your browser. Alternately, http://
config.privoxy.org may work in some situations where the first does not.
-http://p.p/, and select "actions file feedback system" to submit "misses" to
-the developers.
+http://p.p/, and select "Privoxy - Submit Filter Feedback" to submit "misses"
+to the developers.
http://www.junkbusters.com/ht/en/cookies.html
-------------------------------------------------------------------------------
-11. Appendix
+14. Appendix
-11.1. Regular Expressions
+14.1. Regular Expressions
Privoxy can use "regular expressions" in various config files. Assuming support
for "pcre" (Perl Compatible Regular Expressions) is compiled in, which is the
-------------------------------------------------------------------------------
-11.2. Privoxy's Internal Pages
+14.2. Privoxy's Internal Pages
Since Privoxy proxies each requested web page, it is easy for Privoxy to trap
certain special URLs. In this way, we can talk directly to Privoxy, and see how
-------------------------------------------------------------------------------
-11.2.1. Bookmarklets
+14.2.1. Bookmarklets
Below are some "bookmarklets" to allow you to easily access a "mini" version of
some of Privoxy's special pages. They are designed for MS Internet Explorer,
-------------------------------------------------------------------------------
-11.3. Chain of Events
+14.3. Chain of Events
Let's take a quick look at the basic sequence of events when a web page is
requested by your browser and Privoxy is on duty:
-------------------------------------------------------------------------------
-11.4. Anatomy of an Action
+14.4. Anatomy of an Action
The way Privoxy applies "actions" and "filters" to any given URL can be
complex, and not always so easy to understand what is happening. And sometimes
And finally we pull it all together in the bottom section and summarize how
Privoxy is applying all its "actions" to "google.com":
- Final results:
+ Final results:
-add-header -block +deanimate-gifs{last} -downgrade-http-version -fast-redirects
-filter{popups} -filter{fun} -filter{shockwave-flash} -filter{crude-parental}
+filter{html-annoyances} +filter{js-annoyances} +filter{content-cookies}
Now another example, "ad.doubleclick.net":
- { +block +handle-as-image }
+ { +block +handle-as-image }
.ad.doubleclick.net
{ +block +handle-as-image }
One last example. Let's try "http://www.rhapsodyk.net/adsl/HOWTO/". This one is
giving us problems. We are getting a blank page. Hmmm...
- Matches for http://www.rhapsodyk.net/adsl/HOWTO/:
+ Matches for http://www.rhapsodyk.net/adsl/HOWTO/:
{ -add-header -block +deanimate-gifs -downgrade-http-version +fast-redirects
+filter{html-annoyances} +filter{js-annoyances} +filter{kill-popups}
explicitly does not block ("{-block}") paths with "adsl". There are various
ways to handle such exceptions. Example:
- { -block }
+ { -block }
/adsl
Now the page displays ;-) Be sure to flush your browser's caches when making
But now what about a situation where we get no explicit matches like we did
with:
- { +block +handle-as-image }
+ { +block +handle-as-image }
/ads
That actually was very telling and pointed us quickly to where the problem was.
cause would be one of the "{+filter}" actions. Try adding the URL for the site
to one of aliases that turn off "+filter":
- {shop}
+ {shop}
.quietpc.com
.worldpay.com # for quietpc.com
.jungle.com
"{shop}" is an "alias" that expands to "{ -filter -session-cookies-only }". Or
you could do your own exception to negate filtering:
- {-filter}
+ {-filter}
.forbes.com
This would probably be most appropriately put in user.action, for local site