1 <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook V3.1//EN" [
2 <!entity % dummy "IGNORE">
3 <!entity supported SYSTEM "supported.sgml">
4 <!entity newfeatures SYSTEM "newfeatures.sgml">
5 <!entity p-intro SYSTEM "privoxy.sgml">
6 <!entity seealso SYSTEM "seealso.sgml">
7 <!entity buildsource SYSTEM "buildsource.sgml">
8 <!entity contacting SYSTEM "contacting.sgml">
9 <!entity history SYSTEM "history.sgml">
10 <!entity copyright SYSTEM "copyright.sgml">
11 <!entity p-version "2.9.14">
12 <!entity p-status "beta">
13 <!entity % p-not-stable "INCLUDE">
14 <!entity % p-stable "IGNORE">
15 <!entity % p-text "IGNORE"> <!-- define we are not a text only doc -->
16 <!entity % p-doc "INCLUDE"> <!-- and we are a formal doc -->
17 <!entity % p-readme "IGNORE">
18 <!entity % p-config "IGNORE">
19 <!entity % p-supp-userman "IGNORE"> <!-- Omit some from supported.sgml -->
22 File : $Source: /cvsroot/ijbswa/current/doc/source/user-manual.sgml,v $
25 This file belongs into
26 ijbswa.sourceforge.net:/home/groups/i/ij/ijbswa/htdocs/
28 $Id: user-manual.sgml,v 1.101 2002/05/03 03:58:30 hal9 Exp $
30 Written by and Copyright (C) 2001 the SourceForge
31 Privoxy team. http://www.privoxy.org/
33 Based on the Internet Junkbuster originally written
34 by and Copyright (C) 1997 Anonymous Coders and
35 Junkbusters Corporation. http://www.junkbusters.com
38 ========================================================================
39 NOTE: Please read developer-manual/documentation.html before touching
40 anything in this, or other Privoxy documentation.
41 ========================================================================
47 <title>Privoxy User Manual</title>
49 <pubdate>$Id: user-manual.sgml,v 1.101 2002/05/03 03:58:30 hal9 Exp $</pubdate>
54 <orgname>By: Privoxy Developers</orgname>
63 This is here to keep vim syntax file from breaking :/
64 If I knew enough to fix it, I would.
65 PLEASE DO NOT REMOVE! HB: hal@foobox.net
71 The user manual gives users information on how to install, configure and use
73 url="http://www.privoxy.org/"><application>Privoxy</application></ulink>.
76 <!-- Include privoxy.sgml boilerplate: -->
78 <!-- end privoxy.sgml -->
81 You can find the latest version of the user manual at <ulink
82 url="http://www.privoxy.org/user-manual/">http://www.privoxy.org/user-manual/</ulink>.
83 Please see the <ulink url="contact.html">Contact section</ulink> on how to
84 contact the developers.
88 <!-- Feel free to send a note to the developers at <email>ijbswa-developers@lists.sourceforge.net</email>. -->
94 <!-- ~~~~~ New section ~~~~~ -->
95 <sect1 id="intro" label=""><title></title>
96 <!-- dummy section to force TOC on page by itself -->
97 <!-- DO NOT REMOVE! please ;) -->
101 <!-- ~~~~~ New section ~~~~~ -->
102 <sect1 label="1" id="introduction"><title>Introduction</title>
104 This documentation is included with the current &p-status; version of
105 <application>Privoxy</application>, v.&p-version;<![%p-not-stable;[,
106 and is mostly complete at this point. The most up to date reference for the
107 time being is still the comments in the source files and in the individual
108 configuration files. Development of version 3.0 is currently nearing
109 completion, and includes many significant changes and enhancements over
110 earlier versions. The target release date for
111 stable v3.0 is <quote>soon</quote> ;-)]]>.
114 <!-- include only in non-stable versions -->
117 Since this is a &p-status; version, not all new features are well tested. This
118 documentation may be slightly out of sync as a result (especially with
119 CVS sources). And there <emphasis>may be</emphasis> bugs, though hopefully
124 <!-- ~~~~~ New section ~~~~~ -->
125 <sect2 id="features"><title>Features</title>
127 In addition to <application>Internet Junkbuster's</application> traditional
128 features of ad and banner blocking and cookie management,
129 <application>Privoxy</application> provides new features<![%p-not-stable;[,
130 some of them currently under development]]>:
132 <!-- Include newfeatures.sgml boilerplate here: -->
134 <!-- end boilerplate -->
139 <!-- ~ End section ~ -->
142 <!-- ~~~~~ New section ~~~~~ -->
143 <sect1 id="installation"><title>Installation</title>
146 <application>Privoxy</application> is available both in convenient pre-compiled
147 packages for a wide range of operating systems, and as raw source code.
148 For most users, we recommend using the packages, which can be downloaded from our
149 <ulink url="http://sourceforge.net/projects/ijbswa/">Privoxy Project
154 Note: If you have a previous <application>Junkbuster</application> or
155 <application>Privoxy</application> installation on your system, you
156 will need to remove it. Some platforms do this for you as part
157 of their installation procedure. (See below for your platform).
158 In any case <emphasis>be sure to backup your old configuration
159 if it is valuable to you.</emphasis> See the
160 <link linkend="upgradersnote">note to upgraders</link> section
164 <!-- ~~~~~ New section ~~~~~ -->
165 <sect2 id="installation-packages"><title>Binary Packages</title>
167 How to install the binary packages depends on your operating system:
170 <!-- ~~~~~ New section ~~~~~ -->
171 <sect3 id="installation-pack-rpm"><title>Red Hat and SuSE RPMs</title>
174 RPMs can be installed with <literal>rpm -Uvh privoxy-&p-version;-1.rpm</literal>,
175 and will use <filename>/etc/privoxy</filename> for the location
176 of configuration files.
180 Note that on Red Hat, <application>Privoxy</application> will
181 <emphasis>not</emphasis> be automatically started on system boot. You will
182 need to enable that using <command>chkconfig</command>,
183 <command>ntsysv</command>, or similar methods. Note that SuSE will
184 automatically start Privoxy in the boot process.
188 If you have problems with failed dependencies, try rebuilding the SRC RPM:
189 <literal>rpm --rebuild privoxy-&p-version;-1.src.rpm;</literal>. This
190 will use your locally installed libraries and RPM version.
194 Also note that if you have a <application>Junkbuster</application> RPM installed
195 on your system, you need to remove it first, because the packages conflict.
196 Otherwise, RPM will try to remove <application>Junkbuster</application>
197 automatically, before installing <application>Privoxy</application>.
201 <!-- ~~~~~ New section ~~~~~ -->
202 <sect3 id="installation-deb"><title>Debian</title>
208 <!-- ~~~~~ New section ~~~~~ -->
209 <sect3 id="installation-pack-win"><title>Windows</title>
212 Just double-click the installer, which will guide you through
213 the installation process. You will find the configuration files
214 in the same directory as you installed Privoxy in. We do not
215 use the registry of Windows.
219 <!-- ~~~~~ New section ~~~~~ -->
220 <sect3 id="installation-pack-bintgz"><title>Solaris, NetBSD, FreeBSD, HP-UX</title>
223 Create a new directory, <literal>cd</literal> to it, then unzip and
224 untar the archive. For the most part, you'll have to figure out where
229 <!-- ~~~~~ New section ~~~~~ -->
230 <sect3 id="installation-os2"><title>OS/2</title>
233 First, make sure that no previous installations of
234 <application>Junkbuster</application> and / or
235 <application>Privoxy</application> are left on your
236 system. You can do this by
240 Then, just double-click the WarpIN self-installing archive, which will
241 guide you through the installation process. A shadow of the
242 <application>Privoxy</application> executable will be placed in your
243 startup folder so it will start automatically whenever OS/2 starts.
247 The directory you choose to install <application>Privoxy</application>
248 into will contain all of the configuration files.
252 <!-- ~~~~~ New section ~~~~~ -->
253 <sect3 id="installation-mac"><title>Max OSX</title>
255 Unzip the downloaded package (you can either double-click on the file
256 in the finder, or on the desktop if you downloaded it there). Then,
257 double-click on the package installer icon and follow the installation
259 <application>Privoxy</application> will be installed in the subdirectory
260 <literal>/Applications/Privoxy.app</literal>.
261 <application>Privoxy</application> will set itself up to start
262 automatically on system bring-up via
263 <literal>/System/Library/StartupItems/Privoxy</literal>.
267 <!-- ~~~~~ New section ~~~~~ -->
268 <sect3 id="installation-amiga"><title>AmigaOS</title>
270 Copy and then unpack the <filename>lha</filename> archive to a suitable location.
271 All necessary files will be installed into <application>Privoxy</application>
272 directory, including all configuration and log files. To uninstall, just
273 remove this directory.
276 Start <application>Privoxy</application> (with RUN <>NIL:) in your
277 <filename>startnet</filename> script (AmiTCP), in
278 <filename>s:user-startup</filename> (RoadShow), as startup program in your
279 startup script (Genesis), or as startup action (Miami and MiamiDx).
280 <application>Privoxy</application> will automatically quit when you quit your
281 TCP/IP stack (just ignore the harmless warning your TCP/IP stack may display that
282 <application>Privoxy</application> is still running).
287 <!-- ~~~~~ New section ~~~~~ -->
288 <sect2 id="installation-source"><title>Building from Source</title>
291 The most convenient way to obtain the <application>Privoxy</application> sources
292 is to download the source tarball from our <ulink url="http://sf.net/projects/ijbswa/">project
297 If you like to live on the bleeding edge and are not afraid of using
298 possibly unstable development versions, you can check out the up-to-the-minute
299 version directly from <ulink url="http://sourceforge.net/cvs/?group_id=11118">the
300 CVS repository</ulink> or simply download <ulink
301 url="http://cvs.sourceforge.net/cvstarballs/ijbswa-cvsroot.tar.gz">the nightly CVS
305 <!-- include buildsource.sgml boilerplate: -->
307 <!-- end boilerplate -->
315 <!-- ~ End section ~ -->
317 <!-- ~~~~~ New section ~~~~~ -->
318 <sect1 id="upgradersnote">
319 <title>Note to Upgraders</title>
321 There are very significant changes from earlier
322 <application>Junkbuster</application> versions to the current
323 <application>Privoxy</application>. The number, names, syntax, and
324 purposes of configuration files have substantially changed.
325 <application>Junkbuster 2.0.x</application> configuration
326 files will not migrate, <application>Junkbuster 2.9.x</application>
327 and <application>Privoxy</application> configurations will need to be
328 ported. The functionalities of the old <filename>blockfile</filename>,
329 <filename>cookiefile</filename> and <filename>imagelist</filename>
330 are now combined into the <ulink url="actions-file.html"><quote>actions
331 files</quote></ulink>.
332 <filename>default.action</filename>, is the main actions file. Local
333 exceptions should best be put into <filename>user.action</filename>.
336 A <ulink url="filter-file.html"><quote>filter file</quote></ulink> (typically
337 <filename>default.filter</filename>) is new as of <application>Privoxy
338 2.9.x</application>, and provides some of the new sophistication (explained
339 below). <filename>config</filename> is much the same as before.
342 If upgrading from a 2.0.x version, you will have to use the new config
343 files, and possibly adapt any personal rules from your older files.
344 When porting personal rules over from the old <filename>blockfile</filename>
345 to the new actions files, please note that even the pattern syntax has
346 changed. If upgrading from 2.9.x development versions, it is still
347 recommended to use the new configuration files.
350 A quick list of things to be aware of before upgrading:
358 The default listening port is now 8118 due to a conflict with another
364 Some installers may remove earlier versions completely. Save any
365 important configuration files!
370 <application>Privoxy</application> is controllable with a web browser
371 at the special URL: <ulink
372 url="http://config.privoxy.org/">http://config.privoxy.org/</ulink>
373 (Shortcut: <ulink url="http://p.p/">http://p.p/</ulink>). Many
374 aspects of configuration can be done here, including temporarily disabling
375 <application>Privoxy</application>.
380 The primary configuration file for cookie management, ad and banner
381 blocking, and many other aspects of <application>Privoxy</application>
382 configuration is in the <ulink url="actions-file.html">actions
383 files</ulink>. It is strongly recommended to become familiar with the new
384 actions concept below, before modifying these files. Locally defined rules
385 should go into <filename>user.action</filename>.
390 <!-- I think it is best to keep this somewhat vague, in case -->
391 <!-- the situation changes under our feet. -->
392 Some installers may not automatically start
393 <application>Privoxy</application> after installation.
401 <!-- ~~~~~ New section ~~~~~ -->
402 <sect1 id="quickstart"><title>Quickstart to Using <application>Privoxy</application></title>
408 Install <application>Privoxy</application>. See the section <link linkend="installation">Installing</link>.
414 Start <application>Privoxy</application>. See the section <link linkend="startup">Starting <application>Privoxy</application></link>.
420 Change your browser's configuration to use the proxy <literal>localhost</literal> on port
421 <literal>8118</literal>. See the section <link linkend="startup">Starting <application>Privoxy</application></link>.
427 Enjoy surfing with enhanced comfort and privacy. Please see the section
428 <link linkend="contact">Contacting the Developers</link> on how to report
429 bugs or problems with websites or to get help. You may want to change the
430 file <filename>user.action</filename> to further tweak your new browsing
440 <!-- ~~~~~ New section ~~~~~ -->
442 <title>Starting <application>Privoxy</application></title>
444 Before launching <application>Privoxy</application> for the first time, you
445 will want to configure your browser(s) to use
446 <application>Privoxy</application> as a HTTP and HTTPS proxy. The default is
447 localhost for the proxy address, and port 8118 (earlier versions used port
448 8000). This is the one configuration step that must be done!
452 With <application>Netscape</application> (and
453 <application>Mozilla</application>), this can be set under <literal>Edit
454 -> Preferences -> Advanced -> Proxies -> HTTP Proxy</literal>.
455 For <application>Internet Explorer</application>: <literal>Tools ->
456 Internet Properties -> Connections -> LAN Setting</literal>. Then,
457 check <quote>Use Proxy</quote> and fill in the appropriate info (Address:
458 localhost, Port: 8118). Include if HTTPS proxy support too.
462 After doing this, flush your browser's disk and memory caches to force a
463 re-reading of all pages and to get rid of any ads that may be cached. You
464 are now ready to start enjoying the benefits of using
465 <application>Privoxy</application>!
469 <application>Privoxy</application> is typically started by specifying the
470 main configuration file to be used on the command line. If no configuration
471 file is specified on the command line, <application>Privoxy</application>
472 will look for a file named <filename>config</filename> in the current
473 directory. Except on Win32 where it will try <filename>config.txt</filename>.
476 <sect2 id="start-redhatdebian">
477 <title>RedHat and Debian</title>
479 We use a script. Note that RedHat does not start Privoxy upon booting per
480 default. It will use the file <filename>/etc/privoxy/config</filename> as its
481 main configuration file. FIXME: Debian??
485 # /etc/rc.d/init.d/privoxy start
490 <sect2 id="start-suse">
493 We use a script. It will use the file <filename>/etc/privoxy/config</filename>
494 as its main configuration file. Note that SuSE starts Privoxy upon booting
504 <sect2 id="start-windows">
505 <title>Windows</title>
507 Click on the Privoxy Icon to start Privoxy. If no configuration file is
508 specified on the command line, <application>Privoxy</application> will look
509 for a file named <filename>config.txt</filename>. Note that Windows will
510 automatically start Privoxy upon booting you PC.
514 <sect2 id="start-unices">
515 <title>Solaris, NetBSD, FreeBSD, HP-UX and others</title>
517 Example Unix startup command:
521 # /usr/sbin/privoxy /etc/privoxy/config
526 <sect2 id="start-os2">
533 <sect2 id="start-macosx">
534 <title>MAX OSX</title>
541 <sect2 id="start-amigaos">
542 <title>AmigaOS</title>
551 See the section <link linkend="cmdoptions">Command line options</link> for
555 must find a better place for this paragraph
558 The included default configuration files should give a reasonable starting
559 point. Most of the per site configuration is done in the
560 <ulink url="actions-file.html"><quote>actions</quote></ulink> files. These are
561 where various cookie actions are defined, ad and banner blocking, and other
562 aspects of <application>Privoxy</application> configuration. There are several
563 such files included, with varying levels of aggressiveness.
567 You will probably want to keep an eye out for sites for which you may prefer
568 persistent cookies, and add these to your actions configuration as needed. By
569 default, most of these will be accepted only during the current browser
570 session (aka <quote>session cookies</quote>), unless you add them to the
571 configuration. If you want the browser to handle this instead, you will need
572 to edit <filename>user.action</filename> (or through the web based interface)
573 and disable this feature. If you use more than one browser, it would make
574 more sense to let <application>Privoxy</application> handle this. In which
575 case, the browser(s) should be set to accept all cookies.
579 Another feature where you will probably want to define exceptions for trusted
580 sites is the popup-killing (through the <ulink
581 url="actions-file.html#KILL-POPUPS"><quote>+kill-popups</quote></ulink> and
583 url="actions-file.html#FILTER-POPUPS"><quote>+filter{popups}</quote></ulink>
584 actions), because your favorite shopping, banking, or leisure site may need
585 popups (explained below).
589 <application>Privoxy</application> is HTTP/1.1 compliant, but not all of
590 the optional 1.1 features are as yet supported. In the unlikely event that
591 you experience inexplicable problems with browsers that use HTTP/1.1 per default
592 (like <application>Mozilla</application> or recent versions of I.E.), you might
593 try to force HTTP/1.0 compatibility. For Mozilla, look under <literal>Edit ->
594 Preferences -> Debug -> Networking</literal>.
595 Alternatively, set the <quote>+downgrade-http-version</quote> config option in
596 <filename>default.action</filename> which will downgrade your browser's HTTP
597 requests from HTTP/1.1 to HTTP/1.0 before processing them.
601 After running <application>Privoxy</application> for a while, you can
602 start to fine tune the configuration to suit your personal, or site,
603 preferences and requirements. There are many, many aspects that can
604 be customized. <quote>Actions</quote>
605 can be adjusted by pointing your browser to
606 <ulink url="http://config.privoxy.org/">http://config.privoxy.org/</ulink>
607 (shortcut: <ulink url="http://p.p/">http://p.p/</ulink>),
608 and then follow the link to <quote>View & Change the Current Configuration</quote>.
609 (This is an internal page and does not require Internet access.)
613 In fact, various aspects of <application>Privoxy</application>
614 configuration can be viewed from this page, including
615 current configuration parameters, source code version numbers,
616 the browser's request headers, and <quote>actions</quote> that apply
617 to a given URL. In addition to the actions file
618 editor mentioned above, <application>Privoxy</application> can also
619 be turned <quote>on</quote> and <quote>off</quote> (toggled) from this page.
623 If you encounter problems, try loading the page without
624 <application>Privoxy</application>. If that helps, enter the URL where
625 you have the problems into <ulink url="http://p.p/show-url-info">the browser
626 based rule tracing utility</ulink>. See which rules apply and why, and
627 then try turning them off for that site one after the other, until the problem
628 is gone. When you have found the culprit, you might want to turn the rest on
633 If the above paragraph sounds gibberish to you, you might want to <ulink
634 url="actions-file.html#ACTIONSFILE">read more about the actions concept</ulink>
635 or even dive deep into the <ulink url="appendix.html#ACTIONSANAT">Appendix
640 If you can't get rid of the problem at all, think you've found a bug in
641 Privoxy, want to propose a new feature or smarter rules, please see the
642 section <ulink url="contact.html"><quote>Contacting the
643 Developers</quote></ulink> below.
648 <!-- ~~~~~ New section ~~~~~ -->
649 <sect2 id="cmdoptions">
650 <title>Command Line Options</title>
652 <application>Privoxy</application> may be invoked with the following
653 command-line options:
661 <emphasis>--version</emphasis>
664 Print version info and exit. Unix only.
669 <emphasis>--help</emphasis>
672 Print short usage info and exit. Unix only.
677 <emphasis>--no-daemon</emphasis>
680 Don't become a daemon, i.e. don't fork and become process group
681 leader, and don't detach from controlling tty. Unix only.
686 <emphasis>--pidfile FILE</emphasis>
690 On startup, write the process ID to <emphasis>FILE</emphasis>. Delete the
691 <emphasis>FILE</emphasis> on exit. Failure to create or delete the
692 <emphasis>FILE</emphasis> is non-fatal. If no <emphasis>FILE</emphasis>
693 option is given, no PID file will be used. Unix only.
698 <emphasis>--user USER[.GROUP]</emphasis>
702 After (optionally) writing the PID file, assume the user ID of
703 <emphasis>USER</emphasis>, and if included the GID of GROUP. Exit if the
704 privileges are not sufficient to do so. Unix only.
709 <emphasis>configfile</emphasis>
712 If no <emphasis>configfile</emphasis> is included on the command line,
713 <application>Privoxy</application> will look for a file named
714 <quote>config</quote> in the current directory (except on Win32
715 where it will look for <quote>config.txt</quote> instead). Specify
716 full path to avoid confusion. If no config file is found,
717 <application>Privoxy</application> will fail to start.
728 <!-- ~ End section ~ -->
731 <!-- ~~~~~ New section ~~~~~ -->
732 <sect1 id="configuration"><title><application>Privoxy</application> Configuration</title>
734 All <application>Privoxy</application> configuration is stored
735 in text files. These files can be edited with a text editor.
736 Many important aspects of <application>Privoxy</application> can
737 also be controlled easily with a web browser.
741 <!-- ~~~~~ New section ~~~~~ -->
744 <title>Controlling <application>Privoxy</application> with Your Web Browser</title>
746 <application>Privoxy</application>'s user interface can be reached through the special
747 URL <ulink url="http://config.privoxy.org/">http://config.privoxy.org/</ulink>
748 (shortcut: <ulink url="http://p.p/">http://p.p/</ulink>),
749 which is a built-in page and works without Internet access.
750 You will see the following section:
754 <!-- Needs to be put in a table and colorized -->
757 <bridgehead renderas="sect2">Privoxy Menu</bridgehead>
761 ▪ <ulink url="http://config.privoxy.org/show-status">View & change the current configuration</ulink>
764 ▪ <ulink url="http://config.privoxy.org/show-version">View the source code version numbers</ulink>
767 ▪ <ulink url="http://config.privoxy.org/show-request">View the request headers.</ulink>
770 ▪ <ulink url="http://config.privoxy.org/show-url-info">Look up which actions apply to a URL and why</ulink>
773 ▪ <ulink url="http://config.privoxy.org/toggle">Toggle Privoxy on or off</ulink>
781 This should be self-explanatory. Note the first item leads to an editor for the
782 <link linkend="actions-file">actions files</link>, which is where the ad, banner,
783 cookie, and URL blocking magic is configured as well as other advanced features of
784 <application>Privoxy</application>. This is an easy way to adjust various
785 aspects of <application>Privoxy</application> configuration. The actions
786 file, and other configuration files, are explained in detail below.
790 <quote>Toggle Privoxy On or Off</quote> is handy for sites that might
791 have problems with your current actions and filters. You can in fact use
792 it as a test to see whether it is <application>Privoxy</application>
793 causing the problem or not. <application>Privoxy</application> continues
794 to run as a proxy in this case, but all manipulation is disabled, i.e.
795 <application>Privoxy</application> acts like a normal forwarding proxy. There
796 is even a toggle <link linkend="bookmarklets">Bookmarklet</link> offered, so
797 that you can toggle <application>Privoxy</application> with one click from
803 <!-- ~ End section ~ -->
808 <!-- ~~~~~ New section ~~~~~ -->
810 <sect2 id="confoverview">
811 <title>Configuration Files Overview</title>
813 For Unix, *BSD and Linux, all configuration files are located in
814 <filename>/etc/privoxy/</filename> by default. For MS Windows, OS/2, and
815 AmigaOS these are all in the same directory as the
816 <application>Privoxy</application> executable. <![%p-not-stable;[ The name
817 and number of configuration files has changed from previous versions, and is
818 subject to change as development progresses.]]>
822 The installed defaults provide a reasonable starting point, though
823 some settings may be aggressive by some standards. For the time being, the
824 principle configuration files are:
832 The <link linkend="config">main configuration file</link> is named <filename>config</filename>
833 on Linux, Unix, BSD, OS/2, and AmigaOS and <filename>config.txt</filename>
834 on Windows. This is a required file.
840 <filename>default.action</filename> (the main <link linkend="actions-file">actions file</link>)
841 is used to define which <quote>actions</quote> relating to banner-blocking, images, pop-ups,
842 content modification, cookie handling etc should be applied by default. It also defines many
843 exceptions (both positive and negative) from this default set of actions that enable
844 <application>Privoxy</application> to selectively eliminate the junk, and only the junk, on
845 as many websites as possible.
848 Multiple actions files may be defined in <filename>config</filename>. These
849 are processed in the order they are defined. Local customizations and locally
850 preferred exceptions to the default policies as defined in
851 <filename>default.action</filename> (which you will most propably want
852 to define sooner or later) are probably best applied in
853 <filename>user.action</filename>, where you can preserve them across
854 upgrades. <filename>standard.action</filename> is for
855 <application>Privoxy's</application> internal use.
858 There is also a web based editor that can be accessed from
860 url="http://config.privoxy.org/show-status">http://config.privoxy.org/show-status</ulink>
862 url="http://p.p/show-status">http://p.p/show-status</ulink>) for the
863 various actions files.
869 <filename>default.filter</filename> (the <link linkend="filter-file">filter
870 file</link>) can be used to re-write the raw page content, including
871 viewable text as well as embedded HTML and JavaScript, and whatever else
872 lurks on any given web page. The filtering jobs are only pre-defined here;
873 whether to apply them or not is up to the actions files.
881 All files use the <quote><literal>#</literal></quote> character to denote a
882 comment (the rest of the line will be ignored) and understand line continuation
883 through placing a backslash ("<literal>\</literal>") as the very last character
884 in a line. If the <literal>#</literal> is preceded by a backslash, it looses
885 its special function. Placing a <literal>#</literal> in front of an otherwise
886 valid configuration line to prevent it from being interpreted is called "commenting
891 The actions files and <filename>default.filter</filename>
892 can use Perl style <link linkend="regex">regular expressions</link> for
897 After making any changes, there is no need to restart
898 <application>Privoxy</application> in order for the changes to take
899 effect. <application>Privoxy</application> detects such changes
900 automatically. Note, however, that it may take one or two additional
901 requests for the change to take effect. When changing the listening address
902 of <application>Privoxy</application>, these <quote>wake up</quote> requests
903 must obviously be sent to the <emphasis>old</emphasis> listening address.
908 While under development, the configuration content is subject to change.
909 The below documentation may not be accurate by the time you read this.
910 Also, what constitutes a <quote>default</quote> setting, may change, so
911 please check all your configuration files on important issues.
917 <!-- ~ End section ~ -->
920 <!-- ~~~~~~~~ New section Header ~~~~~~~~~ -->
923 <title>The Main Configuration File</title>
926 Again, the main configuration file is named <filename>config</filename> on
927 Linux/Unix/BSD and OS/2, and <filename>config.txt</filename> on Windows.
928 Configuration lines consist of an initial keyword followed by a list of
929 values, all separated by whitespace (any number of spaces or tabs). For
937 <emphasis>confdir /etc/privoxy</emphasis></literallayout>
943 Assigns the value <literal>/etc/privoxy</literal> to the option
944 <literal>confdir</literal> and thus indicates that the configuration
945 directory is named <quote>/etc/privoxy/</quote>.
949 All options in the config file except for <literal>confdir</literal> and
950 <literal>logdir</literal> are optional. Watch out in the below description
951 for what happens if you leave them unset.
955 The main config file controls all aspects of <application>Privoxy</application>'s
956 operation that are not location dependent (i.e. they apply universally, no matter
957 where you may be surfing).
961 <!-- ~~~~~ New section ~~~~~ -->
963 <sect2 id="conf-log-loc">
964 <title>Configuration and Log File Locations</title>
967 <application>Privoxy</application> can (and normally does) use a number of
968 other files for additional configuration, help and logging.
969 This section of the configuration file tells <application>Privoxy</application>
970 where to find those other files.
974 The user running Privoxy, must have read permission for all
975 configuration files, and write permission to any files that would
976 be modified, such as log files.
979 <sect3 renderas="sect4" id="confdir"><title>confdir</title>
983 <term>Specifies:</term>
985 <para>The directory where the other configuration files are located</para>
989 <term>Type of value:</term>
991 <para>Path name</para>
995 <term>Default value:</term>
997 <para>/etc/privoxy (Unix) <emphasis>or</emphasis> <application>Privoxy</application> installation dir (Windows) </para>
1001 <term>Effect if unset:</term>
1003 <para><emphasis>Mandatory</emphasis></para>
1010 No trailing <quote><literal>/</literal></quote>, please
1013 When development goes modular and multi-user, the blocker, filter, and
1014 per-user config will be stored in subdirectories of <quote>confdir</quote>.
1015 For now, the configuration directory structure is flat, except for
1016 <filename>confdir/templates</filename>, where the HTML templates for CGI
1017 output reside (e.g. <application>Privoxy's</application> 404 error page).
1025 <sect3 renderas="sect4" id="logdir"><title>logdir</title>
1029 <term>Specifies:</term>
1032 The directory where all logging takes place (i.e. where <filename>logfile</filename> and
1033 <filename>jarfile</filename> are located)
1038 <term>Type of value:</term>
1040 <para>Path name</para>
1044 <term>Default value:</term>
1046 <para>/var/log/privoxy (Unix) <emphasis>or</emphasis> <application>Privoxy</application> installation dir (Windows) </para>
1050 <term>Effect if unset:</term>
1052 <para><emphasis>Mandatory</emphasis></para>
1059 No trailing <quote><literal>/</literal></quote>, please
1066 <sect3 renderas="sect4" id="actionsfile"><title>
1069 <anchor id="default.action">
1070 <anchor id="standard.action">
1071 <anchor id="user.action">
1072 <!-- Note: slightly modified this section 04/28/02, hal. See NOTE. -->
1075 <term>Specifies:</term>
1078 The <link linkend="actions-file">actions file(s)</link> to use
1083 <term>Type of value:</term>
1085 <para>File name, relative to <literal>confdir</literal>, without the <literal>.action</literal> suffix</para>
1089 <term>Default value:</term>
1093 <msgtext><literallayout> standard # Internal purposes, no editing recommended</literallayout></msgtext>
1096 <msgtext><literallayout> default # Main actions file</literallayout></msgtext>
1099 <msgtext><literallayout> user # User customizations</literallayout></msgtext>
1105 <term>Effect if unset:</term>
1108 No actions are taken at all. Simple neutral proxying.
1116 Multiple <literal>actionsfile</literal> lines are permitted, and are in fact recommended!
1119 The default values include standard.action, which is used for internal
1120 purposes and should be loaded, default.action, which is the
1121 <quote>main</quote> actions file maintained by the developers, and
1122 <filename>user.action</filename>, where you can make your personal additions.
1125 Actions files are where all the per site and per URL configuration is done for
1126 ad blocking, cookie management, privacy considerations, etc.
1127 There is no point in using <application>Privoxy</application> without at
1128 least one actions file.
1135 <sect3 renderas="sect4" id="filterfile"><title>filterfile</title>
1136 <anchor id="default.filter">
1139 <term>Specifies:</term>
1142 The <link linkend="filter">filter</link> file to use
1147 <term>Type of value:</term>
1149 <para>File name, relative to <literal>confdir</literal></para>
1153 <term>Default value:</term>
1155 <para>default.filter (Unix) <emphasis>or</emphasis> default.filter.txt (Windows)</para>
1159 <term>Effect if unset:</term>
1162 No textual content filtering takes place, i.e. all
1163 <literal>+filter{<replaceable class="parameter">name</replaceable>}</literal>
1164 actions in the actions files are turned neutral.
1172 The <quote>default.filter</quote> file contains content modification rules
1173 that use <quote>regular expressions</quote>. These rules permit powerful
1174 changes on the content of Web pages, e.g., you could disable your favorite
1175 JavaScript annoyances, re-write the actual displayed text, or just have some
1176 fun replacing <quote>Microsoft</quote> with <quote>MicroSuck</quote> wherever
1177 it appears on a Web page.
1184 <sect3 renderas="sect4" id="logfile"><title>logfile</title>
1188 <term>Specifies:</term>
1196 <term>Type of value:</term>
1198 <para>File name, relative to <literal>logdir</literal></para>
1202 <term>Default value:</term>
1204 <para>logfile (Unix) <emphasis>or</emphasis> privoxy.log (Windows)</para>
1208 <term>Effect if unset:</term>
1211 No log file is used, all log messages go to the console (<literal>stderr</literal>).
1219 The windows version will additionally log to the console.
1222 The logfile is where all logging and error messages are written. The level
1223 of detail and number of messages are set with the <literal>debug</literal>
1224 option (see below). The logfile can be useful for tracking down a problem with
1225 <application>Privoxy</application> (e.g., it's not blocking an ad you
1226 think it should block) but in most cases you probably will never look at it.
1229 Your logfile will grow indefinitely, and you will probably want to
1230 periodically remove it. On Unix systems, you can do this with a cron job
1231 (see <quote>man cron</quote>). For Red Hat, a <command>logrotate</command>
1232 script has been included.
1235 On SuSE Linux systems, you can place a line like <quote>/var/log/privoxy.*
1236 +1024k 644 nobody.nogroup</quote> in <filename>/etc/logfiles</filename>, with
1237 the effect that cron.daily will automatically archive, gzip, and empty the
1238 log, when it exceeds 1M size.
1241 Any log files must be writable by whatever user <application>Privoxy</application>
1242 is being run as (default on UNIX, user id is <quote>privoxy</quote>).
1249 <sect3 renderas="sect4" id="jarfile"><title>jarfile</title>
1253 <term>Specifies:</term>
1256 The file to store intercepted cookies in
1261 <term>Type of value:</term>
1263 <para>File name, relative to <literal>logdir</literal></para>
1267 <term>Default value:</term>
1269 <para>jarfile (Unix) <emphasis>or</emphasis> privoxy.jar (Windows)</para>
1273 <term>Effect if unset:</term>
1276 Intercepted cookies are not stored at all.
1284 The jarfile may grow to ridiculous sizes over time.
1291 <sect3 renderas="sect4" id="trustfile"><title>trustfile</title>
1294 <term>Specifies:</term>
1297 The trust file to use
1302 <term>Type of value:</term>
1304 <para>File name, relative to <literal>confdir</literal></para>
1308 <term>Default value:</term>
1310 <para><emphasis>Unset (commented out)</emphasis>. When activated: trust (Unix) <emphasis>or</emphasis> trust.txt (Windows)</para>
1314 <term>Effect if unset:</term>
1317 The whole trust mechanism is turned off.
1325 The trust mechanism is an experimental feature for building white-lists and should
1326 be used with care. It is <emphasis>NOT</emphasis> recommended for the casual user.
1329 If you specify a trust file, <application>Privoxy</application> will only allow
1330 access to sites that are named in the trustfile.
1331 You can also mark sites as trusted referrers (with <literal>+</literal>), with
1332 the effect that access to untrusted sites will be granted, if a link from a
1333 trusted referrer was used.
1334 The link target will then be added to the <quote>trustfile</quote>.
1335 Possible applications include limiting Internet access for children.
1338 If you use <literal>+</literal> operator in the trust file, it may grow considerably over time.
1346 <!-- ~ End section ~ -->
1350 <!-- ~~~~~ New section ~~~~~ -->
1352 <sect2 id="local-set-up">
1353 <title>Local Set-up Documentation</title>
1356 If you intend to operate <application>Privoxy</application> for more users
1357 that just yourself, it might be a good idea to let them know how to reach
1358 you, what you block and why you do that, your policies etc.
1361 <sect3 renderas="sect4" id="user-manual"><title>user-manual</title>
1364 <term>Specifies:</term>
1367 Location of the <application>Privoxy</application> User Manual.
1372 <term>Type of value:</term>
1374 <para>A fully qualified URI</para>
1378 <term>Default value:</term>
1380 <para><emphasis>Unset</emphasis></para>
1384 <term>Effect if unset:</term>
1387 <ulink url="http://www.privoxy.org/user-manual/">http://www.privoxy.org/<replaceable class="parameter">version</replaceable>/user-manual/</ulink>
1388 will be used, where <replaceable class="parameter">version</replaceable> is the <application>Privoxy</application> version.
1396 The User Manual URI is used for help links from some of the internal CGI pages.
1397 The manual itself is normally packaged with the binary distributions, so you propably want
1398 to set this to a locally installed copy. For multi-user setups, you could provide a copy on
1399 a local webserver for all your users and use the corresponding URL here.
1405 Unix, in local filesystem:
1408 <screen>user-manual file:///usr/share/doc/privoxy-&p-version;/user-manual/</screen>
1411 Any platform, on local webserver (called <quote>local-webserver</quote>):
1414 <screen>user-manual http://local-webserver/privoxy-user-manual/</screen>
1418 If set, this option should be <emphasis>the first option in the config file</emphasis>, because
1419 it is used while the config file is being read.
1427 <sect3 renderas="sect4" id="trust-info-url"><title>trust-info-url</title>
1431 <term>Specifies:</term>
1434 A URL to be displayed in the error page that users will see if access to an untrusted page is denied.
1439 <term>Type of value:</term>
1445 <term>Default value:</term>
1447 <para>Two example URL are provided</para>
1451 <term>Effect if unset:</term>
1454 No links are displayed on the "untrusted" error page.
1462 The value of this option only matters if the experimental trust mechanism has been
1463 activated. (See <literal>trustfile</literal> above.)
1466 If you use the trust mechanism, it is a good idea to write up some on-line
1467 documentation about your trust policy and to specify the URL(s) here.
1468 Use multiple times for multiple URLs.
1471 The URL(s) should be added to the trustfile as well, so users don't end up
1472 locked out from the information on why they were locked out in the first place!
1479 <sect3 renderas="sect4" id="admin-address"><title>admin-address</title>
1483 <term>Specifies:</term>
1486 An email address to reach the proxy administrator.
1491 <term>Type of value:</term>
1493 <para>Email address</para>
1497 <term>Default value:</term>
1499 <para><emphasis>Unset</emphasis></para>
1503 <term>Effect if unset:</term>
1506 No email address is displayed on error pages and the CGI user interface.
1514 If both <literal>admin-address</literal> and <literal>proxy-info-url</literal>
1515 are unset, the whole "Local Privoxy Support" box on all generated pages will
1523 <sect3 renderas="sect4" id="proxy-info-url"><title>proxy-info-url</title>
1527 <term>Specifies:</term>
1530 A URL to documentation about the local <application>Privoxy</application> setup,
1531 configuration or policies.
1536 <term>Type of value:</term>
1542 <term>Default value:</term>
1544 <para><emphasis>Unset</emphasis></para>
1548 <term>Effect if unset:</term>
1551 No link to local documentation is displayed on error pages and the CGI user interface.
1559 If both <literal>admin-address</literal> and <literal>proxy-info-url</literal>
1560 are unset, the whole "Local Privoxy Support" box on all generated pages will
1564 This URL shouldn't be blocked ;-)
1572 <!-- ~ End section ~ -->
1574 <!-- ~~~~~ New section ~~~~~ -->
1576 <sect2 id="debugging">
1577 <title>Debugging</title>
1580 These options are mainly useful when tracing a problem.
1581 Note that you might also want to invoke
1582 <application>Privoxy</application> with the <literal>--no-daemon</literal>
1583 command line option when debugging.
1586 <sect3 renderas="sect4" id="debug"><title>debug</title>
1590 <term>Specifies:</term>
1593 Key values that determine what information gets logged.
1598 <term>Type of value:</term>
1600 <para>Integer values</para>
1604 <term>Default value:</term>
1606 <para>12289 (i.e.: URLs plus informational and warning messages)</para>
1610 <term>Effect if unset:</term>
1613 Nothing gets logged.
1621 The available debug levels are:
1625 debug 1 # show each GET/POST/CONNECT request
1626 debug 2 # show each connection status
1627 debug 4 # show I/O status
1628 debug 8 # show header parsing
1629 debug 16 # log all data into the logfile
1630 debug 32 # debug force feature
1631 debug 64 # debug regular expression filter
1632 debug 128 # debug fast redirects
1633 debug 256 # debug GIF de-animation
1634 debug 512 # Common Log Format
1635 debug 1024 # debug kill pop-ups
1636 debug 4096 # Startup banner and warnings.
1637 debug 8192 # Non-fatal errors
1641 To select multiple debug levels, you can either add them or use
1642 multiple <literal>debug</literal> lines.
1645 A debug level of 1 is informative because it will show you each request
1646 as it happens. <emphasis>1, 4096 and 8192 are highly recommended</emphasis>
1647 so that you will notice when things go wrong. The other levels are probably
1648 only of interest if you are hunting down a specific problem. They can produce
1649 a hell of an output (especially 16).
1653 The reporting of <emphasis>fatal</emphasis> errors (i.e. ones which crash
1654 <application>Privoxy</application>) is always on and cannot be disabled.
1657 If you want to use CLF (Common Log Format), you should set <quote>debug
1658 512</quote> <emphasis>ONLY</emphasis> and not enable anything else.
1665 <sect3 renderas="sect4" id="single-threaded"><title>single-threaded</title>
1669 <term>Specifies:</term>
1672 Whether to run only one server thread
1677 <term>Type of value:</term>
1679 <para><emphasis>None</emphasis></para>
1683 <term>Default value:</term>
1685 <para><emphasis>Unset</emphasis></para>
1689 <term>Effect if unset:</term>
1692 Multi-threaded (or, where unavailable: forked) operation, i.e. the ability to
1693 serve multiple requests simultaneously.
1701 This option is only there for debug purposes and you should never
1702 need to use it. <emphasis>It will drastically reduce performance.</emphasis>
1711 <!-- ~~~~~ New section ~~~~~ -->
1713 <sect2 id="access-control">
1714 <title>Access Control and Security</title>
1717 This section of the config file controls the security-relevant aspects
1718 of <application>Privoxy</application>'s configuration.
1721 <sect3 renderas="sect4" id="listen-address"><title>listen-address</title>
1725 <term>Specifies:</term>
1728 The IP address and TCP port on which <application>Privoxy</application> will
1729 listen for client requests.
1734 <term>Type of value:</term>
1736 <para>[<replaceable class="parameter">IP-Address</replaceable>]:<replaceable class="parameter">Port</replaceable></para>
1741 <term>Default value:</term>
1743 <para>localhost:8118</para>
1747 <term>Effect if unset:</term>
1750 Bind to localhost (127.0.0.1), port 8118. This is suitable and recommended for
1751 home users who run <application>Privoxy</application> on the same machine as
1760 You will need to configure your browser(s) to this proxy address and port.
1763 If you already have another service running on port 8118, or if you want to
1764 serve requests from other machines (e.g. on your local network) as well, you
1765 will need to override the default.
1768 If you leave out the IP address, <application>Privoxy</application> will
1769 bind to all interfaces (addresses) on your machine and may become reachable
1770 from the Internet. In that case, consider using access control lists (ACL's)
1771 (see <quote>ACLs</quote> below), or a firewall.
1776 <term>Example:</term>
1779 Suppose you are running <application>Privoxy</application> on
1780 a machine which has the address 192.168.0.1 on your local private network
1781 (192.168.0.0) and has another outside connection with a different address.
1782 You want it to serve requests from inside only:
1786 listen-address 192.168.0.1:8118
1794 <sect3 renderas="sect4" id="toggle"><title>toggle</title>
1798 <term>Specifies:</term>
1801 Initial state of "toggle" status
1806 <term>Type of value:</term>
1812 <term>Default value:</term>
1818 <term>Effect if unset:</term>
1821 Act as if toggled on
1829 If set to 0, <application>Privoxy</application> will start in
1830 <quote>toggled off</quote> mode, i.e. behave like a normal, content-neutral
1831 proxy. See <literal>enable-remote-toggle</literal>
1832 below. This is not really useful anymore, since toggling is much easier
1833 via <ulink url="http://config.privoxy.org/toggle">the web
1834 interface</ulink> than via editing the <filename>conf</filename> file.
1837 The windows version will only display the toggle icon in the system tray
1838 if this option is present.
1846 <sect3 renderas="sect4" id="enable-remote-toggle"><title>enable-remote-toggle</title>
1849 <term>Specifies:</term>
1852 Whether or not the <ulink url="http://config.privoxy.org/toggle">web-based toggle
1853 feature</ulink> may be used
1858 <term>Type of value:</term>
1864 <term>Default value:</term>
1870 <term>Effect if unset:</term>
1873 The web-based toggle feature is disabled.
1881 When toggled off, <application>Privoxy</application> acts like a normal,
1882 content-neutral proxy, i.e. it acts as if none of the actions applied to
1886 For the time being, access to the toggle feature can <emphasis>not</emphasis> be
1887 controlled separately by <quote>ACLs</quote> or HTTP authentication,
1888 so that everybody who can access <application>Privoxy</application> (see
1889 <quote>ACLs</quote> and <literal>listen-address</literal> above) can
1890 toggle it for all users. So this option is <emphasis>not recommended</emphasis>
1891 for multi-user environments with untrusted users.
1894 Note that you must have compiled <application>Privoxy</application> with
1895 support for this feature, otherwise this option has no effect.
1903 <sect3 renderas="sect4" id="enable-edit-actions"><title>enable-edit-actions</title>
1906 <term>Specifies:</term>
1909 Whether or not the <ulink url="http://config.privoxy.org/show-status">web-based actions
1910 file editor</ulink> may be used
1915 <term>Type of value:</term>
1921 <term>Default value:</term>
1927 <term>Effect if unset:</term>
1930 The web-based actions file editor is disabled.
1938 For the time being, access to the editor can <emphasis>not</emphasis> be
1939 controlled separately by <quote>ACLs</quote> or HTTP authentication,
1940 so that everybody who can access <application>Privoxy</application> (see
1941 <quote>ACLs</quote> and <literal>listen-address</literal> above) can
1942 modify its configuration for all users. So this option is <emphasis>not
1943 recommended</emphasis> for multi-user environments with untrusted users.
1946 Note that you must have compiled <application>Privoxy</application> with
1947 support for this feature, otherwise this option has no effect.
1954 <sect3 renderas="sect4" id="acls"><title>
1955 ACLs: permit-access and deny-access</title>
1956 <anchor id="permit-acces">
1957 <anchor id="deny-acces">
1961 <term>Specifies:</term>
1964 Who can access what.
1969 <term>Type of value:</term>
1972 <replaceable class="parameter">src_addr</replaceable>[/<replaceable class="parameter">src_masklen</replaceable>]
1973 [<replaceable class="parameter">dst_addr</replaceable>[/<replaceable class="parameter">dst_masklen</replaceable>]]
1976 Where <replaceable class="parameter">src_addr</replaceable> and
1977 <replaceable class="parameter">dst_addr</replaceable> are IP addresses in dotted decimal notation or valid
1978 DNS names, and <replaceable class="parameter">src_masklen</replaceable> and
1979 <replaceable class="parameter">dst_masklen</replaceable> are subnet masks in CIDR notation, i.e. integer
1980 values from 2 to 30 representing the length (in bits) of the network address. The masks and the whole
1981 destination part are optional.
1986 <term>Default value:</term>
1988 <para><emphasis>Unset</emphasis></para>
1992 <term>Effect if unset:</term>
1995 Don't restrict access further than implied by <literal>listen-address</literal>
2003 Access controls are included at the request of ISPs and systems
2004 administrators, and <emphasis>are not usually needed by individual users</emphasis>.
2005 For a typical home user, it will normally suffice to ensure that
2006 <application>Privoxy</application> only listens on the localhost or internal (home)
2007 network address by means of the <literal>listen-address</literal> option.
2010 Please see the warnings in the FAQ that this proxy is not intended to be a substitute
2011 for a firewall or to encourage anyone to defer addressing basic security
2015 Multiple ACL lines are OK.
2016 If any ACLs are specified, then the <application>Privoxy</application>
2017 talks only to IP addresses that match at least one <literal>permit-access</literal> line
2018 and don't match any subsequent <literal>deny-access</literal> line. In other words, the
2019 last match wins, with the default being <literal>deny-access</literal>.
2022 If <application>Privoxy</application> is using a forwarder (see <literal>forward</literal> below)
2023 for a particular destination URL, the <replaceable class="parameter">dst_addr</replaceable>
2024 that is examined is the address of the forwarder and <emphasis>NOT</emphasis> the address
2025 of the ultimate target. This is necessary because it may be impossible for the local
2026 <application>Privoxy</application> to determine the IP address of the
2027 ultimate target (that's often what gateways are used for).
2030 You should prefer using IP addresses over DNS names, because the address lookups take
2031 time. All DNS names must resolve! You can <emphasis>not</emphasis> use domain patterns
2032 like <quote>*.org</quote> or partial domain names. If a DNS name resolves to multiple
2033 IP addresses, only the first one is used.
2036 Denying access to particular sites by ACL may have undesired side effects
2037 if the site in question is hosted on a machine which also hosts other sites.
2042 <term>Examples:</term>
2045 Explicitly define the default behavior if no ACL and
2046 <literal>listen-address</literal> are set: <quote>localhost</quote>
2047 is OK. The absence of a <replaceable class="parameter">dst_addr</replaceable> implies that
2048 <emphasis>all</emphasis> destination addresses are OK:
2052 permit-access localhost
2056 Allow any host on the same class C subnet as www.privoxy.org access to
2057 nothing but www.example.com:
2061 permit-access www.privoxy.org/24 www.example.com/32
2065 Allow access from any host on the 26-bit subnet 192.168.45.64 to anywhere,
2066 with the exception that 192.168.45.73 may not access www.dirty-stuff.example.com:
2070 permit-access 192.168.45.64/26
2071 deny-access 192.168.45.73 www.dirty-stuff.example.com
2079 <sect3 renderas="sect4" id="buffer-limit"><title>buffer-limit</title>
2083 <term>Specifies:</term>
2086 Maximum size of the buffer for content filtering.
2091 <term>Type of value:</term>
2093 <para>Size in Kbytes</para>
2097 <term>Default value:</term>
2103 <term>Effect if unset:</term>
2106 Use a 4MB (4096 KB) limit.
2114 For content filtering, i.e. the <literal>+filter</literal> and
2115 <literal>+deanimate-gif</literal> actions, it is necessary that
2116 <application>Privoxy</application> buffers the entire document body.
2117 This can be potentially dangerous, since a server could just keep sending
2118 data indefinitely and wait for your RAM to exhaust -- with nasty consequences.
2122 When a document buffer size reaches the <literal>buffer-limit</literal>, it is
2123 flushed to the client unfiltered and no further attempt to
2124 filter the rest of the document is made. Remember that there may be multiple threads
2125 running, which might require up to <literal>buffer-limit</literal> Kbytes
2126 <emphasis>each</emphasis>, unless you have enabled <quote>single-threaded</quote>
2136 <!-- ~ End section ~ -->
2139 <!-- ~~~~~ New section ~~~~~ -->
2141 <sect2 id="forwarding">
2142 <title>Forwarding</title>
2145 This feature allows routing of HTTP requests through a chain of
2147 It can be used to better protect privacy and confidentiality when
2148 accessing specific domains by routing requests to those domains
2149 through an anonymous public proxy (see e.g. <ulink
2150 url="http://www.multiproxy.org/anon_list.htm">http://www.multiproxy.org/anon_list.htm</ulink>)
2151 Or to use a caching proxy to speed up browsing. Or chaining to a parent
2152 proxy may be necessary because the machine that <application>Privoxy</application>
2153 runs on has no direct Internet access.
2157 Also specified here are SOCKS proxies. <application>Privoxy</application>
2158 supports the SOCKS 4 and SOCKS 4A protocols.
2161 <sect3 renderas="sect4" id="forward"><title>forward</title>
2164 <term>Specifies:</term>
2167 To which parent HTTP proxy specific requests should be routed.
2172 <term>Type of value:</term>
2175 <replaceable class="parameter">target_domain</replaceable>[:<replaceable class="parameter">port</replaceable>]
2176 <replaceable class="parameter">http_parent</replaceable>[/<replaceable class="parameter">port</replaceable>]
2179 Where <replaceable class="parameter">target_domain</replaceable> is a domain name pattern (see the
2180 chapter on domain matching in the <filename>default.action</filename> file),
2181 <replaceable class="parameter">http_parent</replaceable> is the address of the parent HTTP proxy
2182 as an IP addresses in dotted decimal notation or as a valid DNS name (or <quote>.</quote> to denote
2183 <quote>no forwarding</quote>, and the optional
2184 <replaceable class="parameter">port</replaceable> parameters are TCP ports, i.e. integer
2185 values from 1 to 64535
2190 <term>Default value:</term>
2192 <para><emphasis>Unset</emphasis></para>
2196 <term>Effect if unset:</term>
2199 Don't use parent HTTP proxies.
2207 If <replaceable class="parameter">http_parent</replaceable> is <quote>.</quote>, then requests are not
2208 forwarded to another HTTP proxy but are made directly to the web servers.
2211 Multiple lines are OK, they are checked in sequence, and the last match wins.
2216 <term>Examples:</term>
2219 Everything goes to an example anonymizing proxy, except SSL on port 443 (which it doesn't handle):
2223 forward .* anon-proxy.example.org:8080
2228 Everything goes to our example ISP's caching proxy, except for requests
2229 to that ISP's sites:
2233 forward .*. caching-proxy.example-isp.net:8000
2234 forward .example-isp.net .
2242 <sect3 renderas="sect4" id="socks"><title>
2243 forward-socks4 and forward-socks4a</title>
2244 <anchor id="forward-socks4">
2245 <anchor id="forward-socks4a">
2249 <term>Specifies:</term>
2252 Through which SOCKS proxy (and to which parent HTTP proxy) specific requests should be routed.
2257 <term>Type of value:</term>
2260 <replaceable class="parameter">target_domain</replaceable>[:<replaceable class="parameter">port</replaceable>]
2261 <replaceable class="parameter">socks_proxy</replaceable>[/<replaceable class="parameter">port</replaceable>]
2262 <replaceable class="parameter">http_parent</replaceable>[/<replaceable class="parameter">port</replaceable>]
2265 Where <replaceable class="parameter">target_domain</replaceable> is a domain name pattern (see the
2266 chapter on domain matching in the <filename>default.action</filename> file),
2267 <replaceable class="parameter">http_parent</replaceable> and <replaceable class="parameter">socks_proxy</replaceable>
2268 are IP addresses in dotted decimal notation or valid DNS names (<replaceable class="parameter">http_parent</replaceable>
2269 may be <quote>.</quote> to denote <quote>no HTTP forwarding</quote>), and the optional
2270 <replaceable class="parameter">port</replaceable> parameters are TCP ports, i.e. integer values from 1 to 64535
2275 <term>Default value:</term>
2277 <para><emphasis>Unset</emphasis></para>
2281 <term>Effect if unset:</term>
2284 Don't use SOCKS proxies.
2292 Multiple lines are OK, they are checked in sequence, and the last match wins.
2295 The difference between <literal>forward-socks4</literal> and <literal>forward-socks4a</literal>
2296 is that in the SOCKS 4A protocol, the DNS resolution of the target hostname happens on the SOCKS
2297 server, while in SOCKS 4 it happens locally.
2300 If <replaceable class="parameter">http_parent</replaceable> is <quote>.</quote>, then requests are not
2301 forwarded to another HTTP proxy but are made (HTTP-wise) directly to the web servers, albeit through
2307 <term>Examples:</term>
2310 From the company example.com, direct connections are made to all
2311 <quote>internal</quote> domains, but everything outbound goes through
2312 their ISP's proxy by way of example.com's corporate SOCKS 4A gateway to
2317 forward-socks4a .*. socks-gw.example.com:1080 www-cache.example-isp.net:8080
2318 forward .example.com .
2322 A rule that uses a SOCKS 4 gateway for all destinations but no HTTP parent looks like this:
2326 forward-socks4 .*. socks-gw.example.com:1080 .
2334 <sect3 renderas="sect4" id="advanced-forwarding-examples"><title>Advanced Forwarding Examples</title>
2337 If you have links to multiple ISPs that provide various special content
2338 only to their subscribers, you can configure multiple <application>Privoxies</application>
2339 which have connections to the respective ISPs to act as forwarders to each other, so that
2340 <emphasis>your</emphasis> users can see the internal content of all ISPs.
2344 Assume that host-a has a PPP connection to isp-a.net. And host-b has a PPP connection to
2345 isp-b.net. Both run <application>Privoxy</application>. Their forwarding
2346 configuration can look like this:
2356 forward .isp-b.net host-b:8118
2367 forward .isp-a.net host-a:8118
2372 Now, your users can set their browser's proxy to use either
2373 host-a or host-b and be able to browse the internal content
2374 of both isp-a and isp-b.
2378 If you intend to chain <application>Privoxy</application> and
2379 <application>squid</application> locally, then chain as
2380 <literal>browser -> squid -> privoxy</literal> is the recommended way.
2384 Assuming that <application>Privoxy</application> and <application>squid</application>
2385 run on the same box, your squid configuration could then look like this:
2390 # Define Privoxy as parent proxy (without ICP)
2391 cache_peer 127.0.0.1 parent 8118 7 no-query
2393 # Define ACL for protocol FTP
2396 # Do not forward FTP requests to Privoxy
2397 always_direct allow ftp
2399 # Forward all the rest to Privoxy
2400 never_direct allow all</screen>
2404 You would then need to change your browser's proxy settings to <application>squid</application>'s address and port.
2405 Squid normally uses port 3128. If unsure consult <literal>http_port</literal> in <filename>squid.conf</filename>.
2412 <!-- ~ End section ~ -->
2415 <!-- ~~~~~ New section ~~~~~ -->
2417 <sect2 id="windows-gui">
2418 <title>Windows GUI Options</title>
2420 <application>Privoxy</application> has a number of options specific to the
2421 Windows GUI interface:
2424 <anchor id="activity-animation">
2426 If <quote>activity-animation</quote> is set to 1, the
2427 <application>Privoxy</application> icon will animate when
2428 <quote>Privoxy</quote> is active. To turn off, set to 0.
2435 <emphasis>activity-animation 1</emphasis>
2441 <anchor id="log-messages">
2443 If <quote>log-messages</quote> is set to 1,
2444 <application>Privoxy</application> will log messages to the console
2452 <emphasis>log-messages 1</emphasis>
2458 <anchor id="log-buffer-size">
2460 If <quote>log-buffer-size</quote> is set to 1, the size of the log buffer,
2461 i.e. the amount of memory used for the log messages displayed in the
2462 console window, will be limited to <quote>log-max-lines</quote> (see below).
2466 Warning: Setting this to 0 will result in the buffer to grow infinitely and
2467 eat up all your memory!
2474 <emphasis>log-buffer-size 1</emphasis>
2480 <anchor id="log-max-lines">
2482 <application>log-max-lines</application> is the maximum number of lines held
2483 in the log buffer. See above.
2490 <emphasis>log-max-lines 200</emphasis>
2496 <anchor id="log-highlight-messages">
2498 If <quote>log-highlight-messages</quote> is set to 1,
2499 <application>Privoxy</application> will highlight portions of the log
2500 messages with a bold-faced font:
2507 <emphasis>log-highlight-messages 1</emphasis>
2513 <anchor id="log-font-name">
2515 The font used in the console window:
2522 <emphasis>log-font-name Comic Sans MS</emphasis>
2528 <anchor id="log-font-size">
2530 Font size used in the console window:
2537 <emphasis>log-font-size 8</emphasis>
2543 <anchor id="show-on-task-bar">
2545 <quote>show-on-task-bar</quote> controls whether or not
2546 <application>Privoxy</application> will appear as a button on the Task bar
2554 <emphasis>show-on-task-bar 0</emphasis>
2560 <anchor id="close-button-minimizes">
2562 If <quote>close-button-minimizes</quote> is set to 1, the Windows close
2563 button will minimize <application>Privoxy</application> instead of closing
2564 the program (close with the exit option on the File menu).
2571 <emphasis>close-button-minimizes 1</emphasis>
2577 <anchor id="hide-console">
2579 The <quote>hide-console</quote> option is specific to the MS-Win console
2580 version of <application>Privoxy</application>. If this option is used,
2581 <application>Privoxy</application> will disconnect from and hide the
2589 #<emphasis>hide-console</emphasis>
2598 <!-- ~ End section ~ -->
2602 <!-- ~~~~~~~~ New section Header ~~~~~~~~~ -->
2604 <sect1 id="actions-file"><title>Actions Files</title>
2607 The actions files are used to define what actions
2608 <application>Privoxy</application> takes for which URLs, and thus determine
2609 how ad images, cookies and various other aspects of HTTP content and
2610 transactions are handled, and on which sites (or even parts thereof). There
2611 are three such files included with <application>Privoxy</application> (as of
2612 version 2.9.15), with differing purposes:
2619 <filename>standard.action</filename> - is used by the web based editor,
2620 to set various pre-defined sets of rules for the default actions section
2621 in <filename>default.action</filename>. These have increasing levels of
2622 aggressiveness <emphasis>and have no influence on your browsing unless
2623 you select them explicitly in the editor</emphasis>. It is not recommend
2629 <filename>default.action</filename> - is the primary action file
2630 that sets the initial values for all actions. It is intended to
2631 provide a base level of functionality for
2632 <application>Privoxy's</application> array of features. So it is
2633 a set of broad rules that should work reasonably well for users everywhere.
2634 This is the file that the developers are keeping updated, and making
2640 <filename>user.action</filename> - is intended to be for local site
2641 preferences and exceptions. As an example, if your ISP or your bank
2642 has specific requirements, and need special handling, this kind of
2643 thing should go here. This file will not be upgraded.
2650 The list of actions files to be used are defined in the main configuration
2651 file, and are processed in the order they are defined. The content of these
2652 can all be viewed and edited from <ulink
2653 url="http://config.privoxy.org/show-status">http://config.privoxy.org/show-status</ulink>.
2657 An actions file typically has multiple sections. If you want to use
2658 <quote>aliases</quote> in an actions file, you have to place the (optional)
2659 <link linkend="aliases">alias section</link> at the top of that file.
2660 Then comes the default set of rules which will apply universally to all
2661 sites and pages (be <emphasis>very careful</emphasis> with using such a
2662 universal set in <filename>user.action</filename> or any other actions file after
2663 <filename>default.action</filename>, because it will override the result
2664 from consulting any previous file). And then below that,
2665 exceptions to the defined universal policies. You can regard
2666 <filename>user.action</filename> as an appendix to <filename>default.action</filename>,
2667 with the advantage that is a separate file, which makes preserving your
2668 personal settings across <application>Privoxy</application> upgrades easier.
2672 Actions can be used to block anything you want, including ads, banners, or
2673 just some obnoxious URL that you would rather not see. Cookies can be accepted
2674 or rejected, or accepted only during the current browser session (i.e. not
2675 written to disk), content can be modified, JavaScripts tamed, user-tracking
2676 fooled, and much more. See below for a <link linkend="actions">complete list
2680 <!-- ~~~~~ New section ~~~~~ -->
2682 <title>Finding the Right Mix</title>
2684 Note that some <link linkend="actions">actions</link>, like cookie suppression
2685 or script disabling, may render some sites unusable that rely on these
2686 techniques to work properly. Finding the right mix of actions is not always easy and
2687 certainly a matter of personal taste. In general, it can be said that the more
2688 <quote>aggressive</quote> your default settings (in the top section of the
2689 actions file) are, the more exceptions for <quote>trusted</quote> sites you
2690 will have to make later. If, for example, you want to kill popup windows per
2691 default, you'll have to make exceptions from that rule for sites that you
2692 regularly use and that require popups for actually useful content, like maybe
2693 your bank, favorite shop, or newspaper.
2697 We have tried to provide you with reasonable rules to start from in the
2698 distribution actions files. But there is no general rule of thumb on these
2699 things. There just are too many variables, and sites are constantly changing.
2700 Sooner or later you will want to change the rules (and read this chapter again :).
2704 <!-- ~~~~~ New section ~~~~~ -->
2706 <title>How to Edit</title>
2708 The easiest way to edit the actions files is with a browser by
2709 using our browser-based editor, which can be reached from <ulink
2710 url="http://config.privoxy.org/show-status">http://config.privoxy.org/show-status</ulink>.
2711 The editor allows both fine-grained control over every single feature on a
2712 per-URL basis, and easy choosing from wholesale sets of defaults like
2713 <quote>Cautious</quote>, <quote>Medium</quote> or <quote>Advanced</quote>.
2717 If you prefer plain text editing to GUIs, you can of course also directly edit the
2718 the actions files. Look at <filename>default.action</filename> which is richly
2725 <title>How Actions are Applied to URLs</title>
2727 Actions files are divided into sections. There are special sections,
2728 like the <quote><link linkend="aliases">alias</link></quote> sections which will be discussed later. For now
2729 let's concentrate on regular sections: They have a heading line (often split
2730 up to multiple lines for readability) which consist of a list of actions,
2731 separated by whitespace and enclosed in curly braces. Below that, there
2732 is a list of URL patterns, each on a separate line.
2736 To determine which actions apply to a request, the URL of the request is
2737 compared to all patterns in each action file file. Every time it matches, the list of
2738 applicable actions for the URL is incrementally updated, using the heading
2739 of the section in which the pattern is located. If multiple matches for
2740 the same URL set the same action differently, the last match wins. If not,
2741 the effects are aggregated (e.g. a URL might match both the
2742 <ulink url="actions-file.html#HANDLE-AS-IMAGE"><quote>+handle-as-image</quote></ulink>
2743 and <ulink url="actions-file.html#BLOCK"><quote>+block</quote></ulink> actions).
2748 You can trace this process for any given URL by visiting <ulink
2749 url="http://config.privoxy.org/show-url-info">http://config.privoxy.org/show-url-info</ulink>.
2753 More detail on this is provided in the Appendix, <link linkend="ACTIONSANAT">
2754 Anatomy of an Action</link>.
2758 <!-- ~~~~~ New section ~~~~~ -->
2760 <title>Patterns</title>
2762 Generally, a pattern has the form <literal><domain>/<path></literal>,
2763 where both the <literal><domain></literal> and <literal><path></literal>
2764 are optional. (This is why the pattern <literal>/</literal> matches all URLs).
2769 <term><literal>www.example.com/</literal></term>
2772 is a domain-only pattern and will match any request to <literal>www.example.com</literal>,
2773 regardless of which document on that server is requested.
2778 <term><literal>www.example.com</literal></term>
2781 means exactly the same. For domain-only patterns, the trailing <literal>/</literal> may
2787 <term><literal>www.example.com/index.html</literal></term>
2790 matches only the single document <literal>/index.html</literal>
2791 on <literal>www.example.com</literal>.
2796 <term><literal>/index.html</literal></term>
2799 matches the document <literal>/index.html</literal>, regardless of the domain,
2800 i.e. on <emphasis>any</emphasis> web server.
2805 <term><literal>index.html</literal></term>
2808 matches nothing, since it would be interpreted as a domain name and
2809 there is no top-level domain called <literal>.html</literal>.
2816 <!-- ~~~~~ New section ~~~~~ -->
2817 <sect3><title>The Domain Pattern</title>
2820 The matching of the domain part offers some flexible options: if the
2821 domain starts or ends with a dot, it becomes unanchored at that end.
2827 <term><literal>.example.com</literal></term>
2830 matches any domain that <emphasis>ENDS</emphasis> in
2831 <literal>.example.com</literal>
2836 <term><literal>www.</literal></term>
2839 matches any domain that <emphasis>STARTS</emphasis> with
2840 <literal>www.</literal>
2845 <term><literal>.example.</literal></term>
2848 matches any domain that <emphasis>CONTAINS</emphasis> <literal>.example.</literal>
2849 (Correctly speaking: It matches any FQDN that contains <literal>example</literal> as a domain.)
2856 Additionally, there are wild-cards that you can use in the domain names
2857 themselves. They work pretty similar to shell wild-cards: <quote>*</quote>
2858 stands for zero or more arbitrary characters, <quote>?</quote> stands for
2859 any single character, you can define character classes in square
2860 brackets and all of that can be freely mixed:
2865 <term><literal>ad*.example.com</literal></term>
2868 matches <quote>adserver.example.com</quote>,
2869 <quote>ads.example.com</quote>, etc but not <quote>sfads.example.com</quote>
2874 <term><literal>*ad*.example.com</literal></term>
2877 matches all of the above, and then some.
2882 <term><literal>.?pix.com</literal></term>
2885 matches <literal>www.ipix.com</literal>,
2886 <literal>pictures.epix.com</literal>, <literal>a.b.c.d.e.upix.com</literal> etc.
2891 <term><literal>www[1-9a-ez].example.c*</literal></term>
2894 matches <literal>www1.example.com</literal>,
2895 <literal>www4.example.cc</literal>, <literal>wwwd.example.cy</literal>,
2896 <literal>wwwz.example.com</literal> etc., but <emphasis>not</emphasis>
2897 <literal>wwww.example.com</literal>.
2905 <!-- ~ End section ~ -->
2908 <!-- ~~~~~ New section ~~~~~ -->
2909 <sect3><title>The Path Pattern</title>
2912 <application>Privoxy</application> uses Perl compatible regular expressions
2913 (through the <ulink url="http://www.pcre.org/">PCRE</ulink> library) for
2918 There is an <link linkend="regex">Appendix</link> with a brief quick-start into regular
2919 expressions, and full (very technical) documentation on PCRE regex syntax is available on-line
2920 at <ulink url="http://www.pcre.org/man.txt">http://www.pcre.org/man.txt</ulink>.
2921 You might also find the Perl man page on regular expressions (<literal>man perlre</literal>)
2922 useful, which is available on-line at <ulink
2923 url="http://www.perldoc.com/perl5.6/pod/perlre.html">http://www.perldoc.com/perl5.6/pod/perlre.html</ulink>.
2927 Note that the path pattern is automatically left-anchored at the <quote>/</quote>,
2928 i.e. it matches as if it would start with a <quote>^</quote> (regular expression speak
2929 for the beginning of a line).
2933 Please also note that matching in the path is case
2934 <emphasis>INSENSITIVE</emphasis> by default, but you can switch to case
2935 sensitive at any point in the pattern by using the
2936 <quote>(?-i)</quote> switch:
2937 <literal>www.example.com/(?-i)PaTtErN.*</literal> will match only
2938 documents whose path starts with <literal>PaTtErN</literal> in
2939 <emphasis>exactly</emphasis> this capitalization.
2945 <!-- ~ End section ~ -->
2948 <!-- ~~~~~ New section ~~~~~ -->
2950 <sect2 id="actions">
2951 <title>Actions</title>
2953 All actions are disabled by default, until they are explicitly enabled
2954 somewhere in an actions file. Actions are turned on if preceded with a
2955 <quote>+</quote>, and turned off if preceded with a <quote>-</quote>. So a
2956 <literal>+action</literal> means <quote>do that action</quote>, e.g.
2957 <literal>+block</literal> means <quote>please block URLs that match the
2958 following patterns</quote>, and <literal>-block</literal> means <quote>don't
2959 block URLs that match the following patterns, even if <literal>+block</literal>
2960 previously applied.</quote>
2965 Again, actions are invoked by placing them on a line, enclosed in curly braces and
2966 separated by whitespace, like in
2967 <literal>{+some-action -some-other-action{some-parameter}}</literal>,
2968 followed by a list of URL patterns, one per line, to which they apply.
2969 Together, the actions line and the following pattern lines make up a section
2970 of the actions file.
2974 There are three classes of actions:
2981 Boolean, i.e the action can only be <quote>enabled</quote> or
2982 <quote>disabled</quote>. Syntax:
2986 +<replaceable class="function">name</replaceable> # enable action <replaceable class="parameter">name</replaceable>
2987 -<replaceable class="function">name</replaceable> # disable action <replaceable class="parameter">name</replaceable></screen>
2990 Example: <literal>+block</literal>
2997 Parameterized, where some value is required in order to enable this type of action.
3002 +<replaceable class="function">name</replaceable>{<replaceable class="parameter">param</replaceable>} # enable action and set parameter to <replaceable class="parameter">param</replaceable>,
3003 # overwriting parameter from previous match if necessary
3004 -<replaceable class="function">name</replaceable> # disable action. The parameter can be omitted</screen>
3007 Note that if the URL matches multiple positive forms of a parameterized action,
3008 the last match wins, i.e. the params from earlier matches are simply ignored.
3011 Example: <literal>+hide-user-agent{ Mozilla 1.0 }</literal>
3017 Multi-value. These look exactly like parameterized actions,
3018 but they behave differently: If the action applies multiple times to the
3019 same URL, but with different parameters, <emphasis>all</emphasis> the parameters
3020 from <emphasis>all</emphasis> matches are remembered. This is used for actions
3021 that can be executed for the same request repeatedly, like adding multiple
3022 headers, or filtering through multiple filters. Syntax:
3026 +<replaceable class="function">name</replaceable>{<replaceable class="parameter">param</replaceable>} # enable action and add <replaceable class="parameter">param</replaceable> to the list of parameters
3027 -<replaceable class="function">name</replaceable>{<replaceable class="parameter">param</replaceable>} # remove the parameter <replaceable class="parameter">param</replaceable> from the list of parameters
3028 # If it was the last one left, disable the action.
3029 <replaceable class="parameter">-name</replaceable> # disable this action completely and remove all parameters from the list</screen>
3032 Examples: <literal>+add-header{X-Fun-Header: Some text}</literal> and
3033 <literal>+filter{html-annoyances}</literal>
3041 If nothing is specified in any actions file, no <quote>actions</quote> are
3042 taken. So in this case <application>Privoxy</application> would just be a
3043 normal, non-blocking, non-anonymizing proxy. You must specifically enable the
3044 privacy and blocking features you need (although the provided default actions
3045 files will give a good starting point).
3049 Later defined actions always over-ride earlier ones. So exceptions
3050 to any rules you make, should come in the latter part of the file (or
3051 in a file that is processed later when using multiple actions files). For
3052 multi-valued actions, the actions are applied in the order they are specified.
3053 Actions files are processed in the order they are defined in
3054 <filename>config</filename> (the default installation has three actions
3055 files). It also quite possible for any given URL pattern to match more than
3056 one pattern and thus more than one set of actions!
3059 <!-- start actions listing -->
3061 The list of valid <application>Privoxy</application> actions are:
3065 <!-- ********************************************************** -->
3066 <!-- Please note the below defined actions use id's that are -->
3067 <!-- probably linked from other places, so please don't change. -->
3069 <!-- ********************************************************** -->
3072 <!-- ~~~~~ New section ~~~~~ -->
3074 <sect3 renderas="sect4" id="add-header">
3075 <title><emphasis>+add-header</emphasis></title>
3080 <!-- boolean, parameterized, Multi-value -->
3082 <para>Multi-value.</para>
3087 <term>Purpose and typical uses:</term>
3090 Send a user defined HTTP header to the web server. Can be used to confuse log analysis.
3096 <term>Possible values:</term>
3099 Any value is possible. Validity of the defined HTTP headers is not checked.
3100 It is recommended that you use the <quote><literal>X-</literal></quote> prefix
3107 <term>Example usage:</term>
3110 <emphasis>{+add-header{X-User-Tracking: sucks}}</emphasis>
3111 <emphasis>.example.com</emphasis></literallayout>
3119 This action may be specified multiple times, in order to define multiple
3120 headers. This is rarely needed for the typical user. If you don't know what
3121 <quote>HTTP headers</quote> are, you definitely don't need to worry about this
3130 <!-- ~~~~~ New section ~~~~~ -->
3131 <sect3 renderas="sect4" id="block">
3132 <title><emphasis>+block</emphasis></title>
3137 <!-- boolean, parameterized, Multi-value -->
3139 <para>Boolean.</para>
3144 <term>Purpose and typical uses:</term>
3147 Requests for URLs to which this action applies are blocked, i.e. the requests are not
3148 forwarded to the remote server, but answered locally with a substitute page or image,
3149 as determined by the <link linkend="handle-as-image">handle-as-image</link> and
3150 <link linkend="set-image-blocker">set-image-blocker</link> actions.
3151 It is typically used to block ads or other obnoxious content.
3157 <term>Possible values:</term>
3164 <term>Example usage:</term>
3167 <emphasis>{+block}</emphasis>
3168 <emphasis>.banners.example.com</emphasis>
3169 <emphasis>.ads.r.us</emphasis>
3178 If a URL matches one of the blocked patterns, <application>Privoxy</application>
3179 will intercept the URL and display its special <quote>BLOCKED</quote> page
3180 instead. If there is sufficient space, a large red banner will appear with
3181 a friendly message about why the page was blocked, and a way to go there
3182 anyway. If there is insufficient space a smaller <quote>BLOCKED</quote>
3183 page will appear without the red banner.
3184 <ulink url="http://ads.bannerserver.example.com/nasty-ads/sponsor.html">Click here</ulink>
3185 to view the default blocked HTML page (<application>Privoxy</application> must be running
3186 for this to work as intended!).
3190 A very important exception is if the URL <emphasis>matches both</emphasis>
3191 <quote>+block</quote> and <ulink
3192 url="actions-file.html#HANDLE-AS-IMAGE"><quote>+handle-as-image</quote></ulink>,
3193 then it will be handled by
3194 <ulink url="actions-file.html#SET-IMAGE-BLOCKER"><quote>+set-image-blocker</quote></ulink>
3195 (see below). It is important to understand this process, in order
3196 to understand how <application>Privoxy</application> is able to deal with
3197 ads and other objectionable content.
3200 The <ulink url="actions-file.html#FILTER"><quote>+filter</quote></ulink>
3201 action can also perform some of the
3202 same functionality as <quote>+block</quote>, but by virtue of very
3203 different programming techniques, and is most often used for different
3213 <!-- ~~~~~ New section ~~~~~ -->
3214 <sect3 renderas="sect4" id="deanimate-gifs">
3215 <title><emphasis>+deanimate-gifs</emphasis></title>
3220 <!-- boolean, parameterized, Multi-value -->
3222 <para>Parameterized.</para>
3227 <term>Typical uses:</term>
3230 To stop those annoying, distracting animated GIF images.
3236 <term>Possible values:</term>
3239 <quote>last</quote> or <quote>first</quote>
3245 <term>Example usage:</term>
3248 <emphasis>{+deanimate-gifs{last}}</emphasis>
3249 <emphasis>.example.com</emphasis>
3258 De-animate all animated GIF images, i.e. reduce them to their last frame.
3259 This will also shrink the images considerably (in bytes, not pixels!). If
3260 the option <quote>first</quote> is given, the first frame of the animation
3261 is used as the replacement. If <quote>last</quote> is given, the last
3262 frame of the animation is used instead, which probably makes more sense for
3263 most banner animations, but also has the risk of not showing the entire
3264 last frame (if it is only a delta to an earlier frame).
3272 <!-- ~~~~~ New section ~~~~~ -->
3273 <sect3 renderas="sect4" id="downgrade-http-version">
3274 <title><emphasis>+downgrade-http-version</emphasis></title>
3279 <!-- boolean, parameterized, Multi-value -->
3281 <para>Boolean.</para>
3286 <term>Typical uses:</term>
3289 <quote>+downgrade-http-version</quote> will downgrade HTTP/1.1 client requests to
3290 HTTP/1.0 and downgrade the responses as well.
3296 <term>Possible values:</term>
3305 <term>Example usage:</term>
3308 <emphasis>{+downgrade-http-version}</emphasis>
3309 <emphasis>.example.com</emphasis>
3318 Use this action for servers that use HTTP/1.1 protocol features that
3319 <application>Privoxy</application> doesn't handle well yet. HTTP/1.1 is
3320 only partially implemented. Default is not to downgrade requests. This is
3321 an infrequently needed action, and is used to help with rare problem sites only.
3329 <!-- ~~~~~ New section ~~~~~ -->
3330 <sect3 renderas="sect4" id="fast-redirects">
3331 <title><emphasis>+fast-redirects</emphasis></title>
3336 <!-- boolean, parameterized, Multi-value -->
3338 <para>Boolean.</para>
3343 <term>Typical uses:</term>
3346 The <quote>+fast-redirects</quote> action enables interception of
3347 <quote>redirect</quote> requests from one server to another, which
3348 are used to track users.<application>Privoxy</application> can cut off
3349 all but the last valid URL in a redirect request and send a local redirect
3350 back to your browser without contacting the intermediate site(s).
3356 <term>Possible values:</term>
3365 <term>Example usage:</term>
3368 <emphasis>{+fast-redirects}</emphasis>
3369 <emphasis>.example.com</emphasis>
3378 Many sites, like yahoo.com, don't just link to other sites. Instead, they
3379 will link to some script on their own server, giving the destination as a
3380 parameter, which will then redirect you to the final target. URLs
3381 resulting from this scheme typically look like:
3382 <emphasis>http://some.place/some_script?http://some.where-else</emphasis>.
3385 Sometimes, there are even multiple consecutive redirects encoded in the
3386 URL. These redirections via scripts make your web browsing more traceable,
3387 since the server from which you follow such a link can see where you go
3388 to. Apart from that, valuable bandwidth and time is wasted, while your
3389 browser ask the server for one redirect after the other. Plus, it feeds
3393 This is a normally <quote>on</quote> feature, and often requires exceptions
3394 for sites that are sensitive to defeating this mechanism.
3403 <!-- ~~~~~ New section ~~~~~ -->
3404 <sect3 renderas="sect4" id="filter">
3405 <title><emphasis>+filter</emphasis></title>
3410 <!-- boolean, parameterized, Multi-value -->
3412 <para>Parameterized.</para>
3417 <term>Typical uses:</term>
3420 Apply page filtering as defined by named sections of the
3421 <filename>default.filter</filename> file to the specified site(s).
3422 <quote>Filtering</quote> can be any modification of the raw
3423 page content, including re-writing or deletion of content.
3429 <term>Possible values:</term>
3432 <quote>+filter</quote> must include the name of one of the section identifiers
3433 from <filename>default.filter</filename> (or whatever
3434 <emphasis>filterfile</emphasis> is specified in <filename>config</filename>).
3440 <term>Example usage (from the current <filename>default.filter</filename>):</term>
3444 <anchor id="filter-html-annoyances">
3445 <emphasis>+filter{html-annoyances}</emphasis>: Get rid of particularly annoying HTML abuse.
3450 <anchor id="filter-js-annoyances">
3451 <emphasis>+filter{js-annoyances}</emphasis>: Get rid of particularly annoying JavaScript abuse
3456 <anchor id="filter-content-cookies">
3457 <emphasis>+filter{content-cookies}</emphasis>: Kill cookies that come in the HTML or JS content
3462 <anchor id="filter-popups">
3463 <emphasis>+filter{popups}</emphasis>: Kill all popups in JS and HTML
3468 <anchor id="filter-frameset-borders">
3469 <emphasis>+filter{frameset-borders}</emphasis>: Give frames a border and make them resizable
3474 <anchor id="filter-webbugs">
3475 <emphasis>+filter{webbugs}</emphasis>: Squish WebBugs (1x1 invisible GIFs used for user tracking)
3480 <anchor id="filter-refresh-tags">
3481 <emphasis>+filter{refresh-tags}</emphasis>: Kill automatic refresh tags (for dial-on-demand setups)
3486 <anchor id="filter-fun">
3487 <emphasis>+filter{fun}</emphasis>: Text replacements for subversive browsing fun!
3492 <anchor id="filter-nimda">
3493 <emphasis>+filter{nimda}</emphasis>: Remove Nimda (virus) code.
3498 <anchor id="filter-banners-by-size">
3499 <emphasis>+filter{banners-by-size}</emphasis>: Kill banners by size (<emphasis>very</emphasis> efficient!)
3504 <anchor id="filter-shockwave-flash">
3505 <emphasis>+filter{shockwave-flash}</emphasis>: Kill embedded Shockwave Flash objects
3510 <anchor id="filter-crude-parental">
3511 <emphasis>+filter{crude-parental}</emphasis>: Kill all web pages that contain the words "sex" or "warez"
3521 This is potentially a very powerful feature! And requires a knowledge
3522 of regular expressions if you want to <quote>roll your own</quote>.
3523 Filtering operates on a line by line basis throughout the entire page.
3526 Filtering requires buffering the page content, which may appear to
3527 slow down page rendering since nothing is displayed until all content has
3528 passed the filters. (It does not really take longer, but seems that way
3529 since the page is not incrementally displayed.) This effect will be more
3530 noticeable on slower connections.
3533 Filtering can achieve some of the effects as the
3534 <ulink url="actions-file#BLOCK"><quote>+block</quote></ulink>
3535 action, i.e. it can be used to block ads and banners. In the overall
3536 scheme of things, filtering is one of the first things <quote>Privoxy</quote>
3537 does with a web page. So other most other actions are applied to the
3538 already <quote>filtered</quote> page.
3547 <!-- ~~~~~ New section ~~~~~ -->
3548 <sect3 renderas="sect4" id="hide-forwarded-for-headers">
3549 <title><emphasis>+hide-forwarded-for-headers</emphasis></title>
3554 <!-- Boolean, Parameterized, Multi-value -->
3556 <para>Boolean.</para>
3561 <term>Typical uses:</term>
3564 Block any existing X-Forwarded-for HTTP header, and do not add a new one.
3570 <term>Possible values:</term>
3579 <term>Example usage:</term>
3582 <emphasis>{+hide-forwarded-for-headers}</emphasis>
3583 <emphasis>.example.com</emphasis>
3592 It is fairly safe to leave this on. It does not seem to break many sites.
3601 <!-- ~~~~~ New section ~~~~~ -->
3602 <sect3 renderas="sect4" id="hide-from-header">
3603 <title><emphasis>+hide-from-header</emphasis></title>
3608 <!-- Boolean, Parameterized, Multi-value -->
3610 <para>Parameterized.</para>
3615 <term>Typical uses:</term>
3618 To block the browser from sending your email address in a <quote>From:</quote>
3625 <term>Possible values:</term>
3628 Keyword: <quote>block</quote>, or any user defined value.
3634 <term>Example usage:</term>
3637 <emphasis>{+hide-from-header{block}}</emphasis>
3638 <emphasis>.example.com</emphasis>
3647 The keyword <quote>block</quote> will completely remove the header
3648 (not to be confused with the <ulink
3649 url="actions-file.html#BLOCK"><quote>+block</quote></ulink> action).
3650 Alternately, you can specify any value you prefer to send to the web
3660 <!-- ~~~~~ New section ~~~~~ -->
3661 <sect3 renderas="sect4" id="hide-referer">
3662 <title><emphasis>+hide-referer</emphasis></title>
3663 <anchor id="hide-referrer">
3667 <!-- Boolean, Parameterized, Multi-value -->
3669 <para>Parameterized.</para>
3674 <term>Typical uses:</term>
3677 Don't send the <quote>Referer:</quote> (sic) HTTP header to the web site.
3678 Or, alternately send a forged header instead.
3684 <term>Possible values:</term>
3687 Prevent the header from being sent with the keyword, <quote>block</quote>.
3688 Or, <quote>forge</quote> a URL to one from the same server as the request.
3689 Or, set to user defined value of your choice.
3695 <term>Example usage:</term>
3698 <emphasis>{+hide-referer{forge}}</emphasis>
3699 <emphasis>.example.com</emphasis>
3708 <quote>forge</quote> is the preferred option here, since some servers will
3709 not send images back otherwise.
3712 <quote>+hide-referrer</quote> is an alternate spelling of
3713 <quote>+hide-referer</quote>. It has the exact same parameters, and can be freely
3714 mixed with, <quote>+hide-referer</quote>. (<quote>referrer</quote> is the
3715 correct English spelling, however the HTTP specification has a bug - it
3716 requires it to be spelled as <quote>referer</quote>.)
3725 <!-- ~~~~~ New section ~~~~~ -->
3726 <sect3 renderas="sect4" id="hide-user-agent">
3727 <title><emphasis>+hide-user-agent</emphasis></title>
3732 <!-- Boolean, Parameterized, Multi-value -->
3734 <para>Parameterized.</para>
3739 <term>Typical uses:</term>
3742 To change the <quote>User-Agent:</quote> header so web servers can't tell
3743 your browser type. Who's business is it anyway?
3749 <term>Possible values:</term>
3752 Any user defined string.
3758 <term>Example usage:</term>
3761 <emphasis>{+hide-user-agent{Netscape 6.1 (X11; I; Linux 2.4.18 i686)}}</emphasis>
3762 <emphasis>.msn.com</emphasis>
3771 Warning! This breaks many web sites that depend on this in order
3772 to determine how the target browser will respond to various
3773 requests. Use with caution.
3781 <!-- ~~~~~ New section ~~~~~ -->
3782 <sect3 renderas="sect4" id="handle-as-image">
3783 <title><emphasis>+handle-as-image</emphasis></title>
3788 <!-- Boolean, Parameterized, Multi-value -->
3790 <para>Boolean.</para>
3795 <term>Typical uses:</term>
3798 To define what <application>Privoxy</application> should treat
3799 automatically as an image, and is an important ingredient of how
3806 <term>Possible values:</term>
3815 <term>Example usage:</term>
3818 <emphasis>{+handle-as-image}</emphasis>
3819 <emphasis>/.*\.(gif|jpg|jpeg|png|bmp|ico)</emphasis>
3828 This only has meaning if the URL (or pattern) also is
3829 <quote>+block</quote>ed, in which case a user definable image can
3830 be sent rather than a HTML page. This is integral to the whole concept of
3831 ad blocking: the URL must match <emphasis>both</emphasis> a <ulink
3832 url="actions-file.html#BLOCK"><quote>+block</quote></ulink> rule,
3833 <emphasis>and</emphasis> <quote>+handle-as-image</quote>.
3835 url="actions-file.html#SET-IMAGE-BLOCKER"><quote>+set-image-blocker</quote></ulink>
3836 below for control over what will actually be displayed by the browser.)
3839 There is little reason to change the default definition for this action.
3848 <!-- ~~~~~ New section ~~~~~ -->
3849 <sect3 renderas="sect4" id="set-image-blocker">
3850 <title><emphasis>+set-image-blocker</emphasis></title>
3855 <!-- Boolean, Parameterized, Multi-value -->
3857 <para>Parameterized.</para>
3862 <term>Typical uses:</term>
3865 Decide what to do with URLs that end up tagged with <emphasis>both</emphasis>
3866 <ulink url="actions-file.html#BLOCK"><quote>+block</quote></ulink>
3868 url="actions-file.html#HANDLE-AS-IMAGE"><quote>+handle-as-image</quote></ulink>,
3869 e.g an advertisement.
3875 <term>Possible values:</term>
3878 There are four available options: <quote>-set-image-blocker</quote> will send a HTML
3879 <quote>blocked</quote> page, usually resulting in a <quote>broken
3881 <quote>+set-image-blocker{<emphasis>blank</emphasis>}</quote> will send a
3882 1x1 transparent GIF image.
3883 <quote>+set-image-blocker{<emphasis>pattern</emphasis>}</quote> will send a
3884 checkerboard type pattern (the default). And finally,
3885 <quote>+set-image-blocker{<emphasis>http://xyz.com</emphasis>}</quote> will
3886 send a HTTP temporary redirect to the specified image. This has the
3887 advantage of the icon being being cached by the browser, which will speed
3894 <term>Example usage:</term>
3897 <emphasis>{+set-image-blocker{blank}}</emphasis>
3898 <emphasis>.example.com</emphasis>
3907 If you want <emphasis>invisible</emphasis> ads, they need to meet
3908 criteria as matching both <emphasis>images</emphasis> and <emphasis>blocked</emphasis>
3909 actions. And then, <quote>image-blocker</quote> should be set to
3910 <quote>blank</quote> for invisibility. Note you cannot treat HTML pages as
3911 images in most cases. For instance, frames require an HTML page to
3912 display. So a frame that is an ad, typically cannot be treated as an image.
3913 Forcing an <quote>image</quote> in this situation just will not work
3922 <!-- ~~~~~ New section ~~~~~ -->
3923 <sect3 renderas="sect4" id="limit-connect">
3924 <title><emphasis>+limit-connect</emphasis></title>
3929 <!-- Boolean, Parameterized, Multi-value -->
3931 <para>Parameterized.</para>
3936 <term>Typical uses:</term>
3939 By default, <application>Privoxy</application> only allows HTTP CONNECT
3940 requests to port 443 (the standard, secure HTTPS port). Use
3941 <quote>+limit-connect</quote> to disable this altogether, or to allow
3948 <term>Possible values:</term>
3951 Any valid port number, or port number range.
3957 <term>Example usages:</term>
3959 <!-- I had trouble getting the spacing to look right in my browser -->
3960 <!-- I probably have the wrong font setup, bollocks. -->
3961 <!-- Apparently the emphasis tag uses a proportional font no matter what -->
3963 <emphasis>+limit-connect{443}</emphasis> # This is the default and need not be specified.
3964 <emphasis>+limit-connect{80,443}</emphasis> # Ports 80 and 443 are OK.
3965 <emphasis>+limit-connect{-3, 7, 20-100, 500-}</emphasis> # Port less than 3, 7, 20 to 100 and above 500 are OK.
3974 The CONNECT methods exists in HTTP to allow access to secure websites
3975 (https:// URLs) through proxies. It works very simply: the proxy connects
3976 to the server on the specified port, and then short-circuits its
3977 connections to the client <emphasis>and</emphasis> to the remote proxy.
3978 This can be a big security hole, since CONNECT-enabled proxies can be
3979 abused as TCP relays very easily.
3982 If you want to allow CONNECT for more ports than this, or want to forbid
3983 CONNECT altogether, you can specify a comma separated list of ports and
3984 port ranges (the latter using dashes, with the minimum defaulting to 0 and
3988 If you don't know what any of this means, there probably is no reason to
3997 <!-- ~~~~~ New section ~~~~~ -->
3998 <sect3 renderas="sect4" id="prevent-compression">
3999 <title><emphasis>+prevent-compression</emphasis></title>
4004 <!-- Boolean, Parameterized, Multi-value -->
4006 <para>Boolean.</para>
4011 <term>Typical uses:</term>
4014 Prevent the specified websites from compressing HTTP data.
4020 <term>Possible values:</term>
4029 <term>Example usage:</term>
4032 <emphasis>{+prevent-compression}</emphasis>
4033 <emphasis>.example.com</emphasis>
4042 Some websites do this, which can be a problem for
4043 <application>Privoxy</application>, since
4044 <ulink url="actions-file.html#FILTER"><quote>+filter</quote></ulink>,
4045 <ulink url="actions-file.html#KILL-POPUPS"><quote>+kill-popups</quote></ulink>
4047 url="actions-file.html#GIF-DEANIMATE"><quote>+gif-deanimate</quote></ulink>
4048 will not work on compressed data. This will slow down connections to those
4049 websites, though. Default typically is to turn
4050 <quote>prevent-compression</quote> on.
4058 <!-- ~~~~~ New section ~~~~~ -->
4059 <sect3 renderas="sect4" id="session-cookies-only">
4060 <title><emphasis>+session-cookies-only</emphasis></title>
4065 <!-- Boolean, Parameterized, Multi-value -->
4067 <para>Boolean.</para>
4072 <term>Typical uses:</term>
4075 Allow cookies for the current browser session <emphasis>only</emphasis>.
4081 <term>Possible values:</term>
4090 <term>Example usage (disabling):</term>
4093 <emphasis>{-session-cookies-only}</emphasis>
4094 <emphasis>.example.com</emphasis>
4103 If websites set cookies, <quote>+session-cookies-only</quote> will make sure
4104 they are erased when you exit and restart your web browser. This makes
4105 profiling cookies useless, but won't break sites which require cookies so
4106 that you can log in for transactions. This is generally turned on for all
4107 sites, and is the recommended setting.
4110 <quote>+prevent-*-cookies</quote> actions should be turned off as well (see
4111 below), for <quote>+session-cookies-only</quote> to work. Or, else no cookies
4112 will get through at all. For, <quote>persistent</quote> cookies that survive
4113 across browser sessions, see below as well.
4122 <!-- ~~~~~ New section ~~~~~ -->
4123 <sect3 renderas="sect4" id="prevent-reading-cookies">
4124 <title><emphasis>+prevent-reading-cookies</emphasis></title>
4129 <!-- Boolean, Parameterized, Multi-value -->
4131 <para>Boolean.</para>
4136 <term>Typical uses:</term>
4139 Explicitly prevent the web server from reading any cookies on your
4146 <term>Possible values:</term>
4155 <term>Example usage:</term>
4158 <emphasis>{+prevent-reading-cookies}</emphasis>
4159 <emphasis>.example.com</emphasis>
4168 Often used in conjunction with <quote>+prevent-setting-cookies</quote> to
4169 disable cookies completely. Note that
4170 <ulink url="actions-file.html#SESSION-COOKIES-ONLY"><quote>+session-cookies-only</quote></ulink>
4171 requires these to both be disabled (or else it never gets any cookies to cache).
4174 For <quote>persistent</quote> cookies to work (i.e. they survive across browser
4175 sessions and reboots), all three cookie settings should be <quote>off</quote>
4176 for the specified sites.
4185 <!-- ~~~~~ New section ~~~~~ -->
4186 <sect3 renderas="sect4" id="prevent-setting-cookies">
4187 <title><emphasis>+prevent-setting-cookies</emphasis></title>
4192 <!-- Boolean, Parameterized, Multi-value -->
4194 <para>Boolean.</para>
4199 <term>Typical uses:</term>
4202 Explicitly block the web server from storing cookies on your
4209 <term>Possible values:</term>
4218 <term>Example usage:</term>
4221 <emphasis>{+prevent-setting-cookies}</emphasis>
4222 <emphasis>.example.com</emphasis>
4231 Often used in conjunction with <quote>+prevent-reading-cookies</quote> to
4232 disable cookies completely (see above).
4241 <!-- ~~~~~ New section ~~~~~ -->
4242 <sect3 renderas="sect4" id="kill-popup">
4243 <title><emphasis>+kill-popups<anchor id="kill-popups"></emphasis></title>
4247 <!-- Boolean, Parameterized, Multi-value -->
4249 <para>Boolean.</para>
4254 <term>Typical uses:</term>
4257 Stop those annoying JavaScript pop-up windows!
4263 <term>Possible values:</term>
4272 <term>Example usage:</term>
4275 <emphasis>{+kill-popups}</emphasis>
4276 <emphasis>.example.com</emphasis>
4285 <quote>+kill-popups</quote> uses a built in filter to disable pop-ups
4286 that use the <literal>window.open()</literal> function, etc. This is
4287 one of the first actions processed by <application>Privoxy</application>
4288 as it contacts the remote web server. This action is not always 100% reliable,
4289 and is supplemented by <quote>+filter{<emphasis>popups</emphasis>}</quote>.
4293 An alternate spelling is <quote>+kill-popup</quote>, which is
4304 <!-- ~~~~~ New section ~~~~~ -->
4305 <sect3 renderas="sect4" id="send-vanilla-wafer">
4306 <title><emphasis>+send-vanilla-wafer</emphasis></title>
4311 <!-- Boolean, Parameterized, Multi-value -->
4313 <para>Boolean.</para>
4318 <term>Typical uses:</term>
4321 Sends a cookie for every site stating that you do not accept any copyright
4322 on cookies sent to you, and asking them not to track you.
4328 <term>Possible values:</term>
4337 <term>Example usage:</term>
4340 <emphasis>{+send-vanilla-wafer}</emphasis>
4341 <emphasis>.example.com</emphasis>
4350 This action only applies if you are using a <filename>jarfile</filename>
4351 for saving cookies. Of course, this is a (relatively) unique header and
4352 could conceivably be used to track you.
4361 <!-- ~~~~~ New section ~~~~~ -->
4362 <sect3 renderas="sect4" id="send-wafer">
4363 <title><emphasis>+send-wafer</emphasis></title>
4368 <!-- Boolean, Parameterized, Multi-value -->
4370 <para>Multi-value.</para>
4375 <term>Typical uses:</term>
4378 This allows you to send an arbitrary, user definable cookie.
4384 <term>Possible values:</term>
4387 User specified cookie name and corresponding value.
4393 <term>Example usage:</term>
4396 <emphasis>{+send-wafer{name=value}}</emphasis>
4397 <emphasis>.example.com</emphasis>
4406 This can be specified multiple times in order to add as many cookies as you
4416 <!-- ~~~~~ New section ~~~~~ -->
4418 <title>Summary</title>
4420 Note that many of these actions have the potential to cause a page to
4421 misbehave, possibly even not to display at all. There are many ways
4422 a site designer may choose to design his site, and what HTTP header
4423 content, and other criteria, he may depend on. There is no way to have hard
4424 and fast rules for all sites. See the <link
4425 linkend="ACTIONSANAT">Appendix</link> for a brief example on troubleshooting
4431 <!-- ~~~~~ New section ~~~~~ -->
4432 <sect3 renderas="sect2" id="act-examples">
4433 <title>Sample Actions Files</title>
4435 Remember that the meaning of any of the above references is reversed by preceding
4436 the action with a <quote>-</quote>, in place of the <quote>+</quote>. Also,
4437 that some actions are turned on in the default section of the actions file,
4438 and require little to no additional configuration. These are just <quote>on</quote>.
4442 But, other actions that are turned on in the default section <emphasis>do
4443 typically require</emphasis> exceptions to be listed in the latter sections of
4444 one of our actions file. For instance, by default no URLs are
4445 <quote>blocked</quote> (i.e. in the default definitions of
4446 <filename>default.action</filename>). We need exceptions to this in order to
4447 <emphasis>enable</emphasis> ad blocking in the lower sections. But we need to
4448 be very selective about what we do block. Thus, the default is <quote>off</quote>
4453 Below is a liberally commented sample <filename>default.action</filename> file
4454 to demonstrate how all the pieces come together. And to show how exceptions
4455 to the default policies can be handled. This is followed by a brief
4456 <filename>user.action</filename> with similar examples.
4463 # Sample default.action file <developers@privoxy.org>
4465 # Settings -- Don't change! For internal Privoxy use ONLY.
4467 for-privoxy-version=3.0
4470 ##########################################################################
4471 # <ulink url="actions-file.html#ALIASES">Aliases</ulink> must be defined *before* they are used. These are
4472 # easier to remember, and can combine several actions into one. Once
4473 # defined they can be used just like any built-in action -- but within
4474 # this file only! Aliases do not require a + or - sign.
4475 ##########################################################################
4477 # Some useful aliases.
4478 # Alias to turn off cookie handling, ie allow all cookies unmolested.
4479 -prevent-cookies = -prevent-setting-cookies -prevent-reading-cookies \
4480 -session-cookies-only
4482 # Alias to both block and treat as if an image for ad blocking
4484 +imageblock = +block +handle-as-image
4486 # Fragile sites should have the minimum changes:
4487 fragile = -block -deanimate-gifs -fast-redirects -filter -hide-referer \
4488 -prevent-cookies -kill-popups
4490 # Shops should be allowed to set persistent cookies
4491 shop = -filter -prevent-cookies -session-cookies-only
4494 ##########################################################################
4495 # Begin default action settings. Anything in this section will match
4496 # all URLs -- UNLESS we have exceptions that also match, defined below this
4497 # section. We will show all potential actions here whether they are on
4498 # or off. We could omit any disabled action if we wanted, since all
4499 # actions are 'off' by default anyway. Shown for completeness only.
4500 # Actions are enabled if preceded by a '+', otherwise they are disabled
4501 # (unless an alias has been defined without this).
4502 ##########################################################################
4504 <ulink url="actions-file.html#ADD-HEADER">-add-header</ulink> \
4505 <ulink url="actions-file.html#BLOCK">-block</ulink> \
4506 <ulink url="actions-file.html#DEANIMATE-GIFS">-deanimate-gifs</ulink> \
4507 <ulink url="actions-file.html#DOWNGRADE-HTTP-VERSION">-downgrade-http-version</ulink> \
4508 <ulink url="actions-file.html#FAST-REDIRECTS">+fast-redirects</ulink> \
4509 <ulink url="actions-file.html#FILTER-HTML-ANNOYANCES">+filter{html-annoyances}</ulink> \
4510 <ulink url="actions-file.html#FILTER-JS-ANNOYANCES">+filter{js-annoyances}</ulink> \
4511 <ulink url="actions-file.html#FILTER-CONTENT-COOKIES">-filter{content-cookies}</ulink> \
4512 <ulink url="actions-file.html#FILTER-POPUPS">-filter{popups}</ulink> \
4513 <ulink url="actions-file.html#FILTER-WEBBUGS">+filter{webbugs}</ulink> \
4514 <ulink url="actions-file.html#FILTER-REFRESH-TAGS">-filter{refresh-tags}</ulink> \
4515 <ulink url="actions-file.html#FILTER-FUN">-filter{fun}</ulink> \
4516 <ulink url="actions-file.html#FILTER-NIMDA">+filter{nimda}</ulink> \
4517 <ulink url="actions-file.html#FILTER-BANNERS-BY-SIZE">+filter{banners-by-size}</ulink> \
4518 <ulink url="actions-file.html#FILTER-SHOCKWAVE-FLASH">-filter{shockwave-flash}</ulink> \
4519 <ulink url="actions-file.html#FILTER-CRUDE-PARENTAL">-filter{crude-prental}</ulink> \
4520 <ulink url="actions-file.html#HIDE-FORWARDED-FOR-HEADERS">+hide-forwarded-for-headers</ulink> \
4521 <ulink url="actions-file.html#HIDE-FROM-HEADER">+hide-from-header{block}</ulink> \
4522 <ulink url="actions-file.html#HIDE-REFERER">-hide-referrer</ulink> \
4523 <ulink url="actions-file.html#HIDE-USER-AGENT">-hide-user-agent</ulink> \
4524 <ulink url="actions-file.html#HANDLE-AS-IMAGE">-handle-as-image</ulink> \
4525 <ulink url="actions-file.html#SET-IMAGE-BLOCKER">+set-image-blocker{pattern}</ulink> \
4526 <ulink url="actions-file.html#LIMIT-CONNECT">-limit-connect</ulink> \
4527 <ulink url="actions-file.html#PREVENT-COMPRESSION">+prevent-compression</ulink> \
4528 <ulink url="actions-file.html#SESSION-COOKIES-ONLY">-session-cookies-only</ulink> \
4529 <ulink url="actions-file.html#PREVENT-READING-COOKIES">-prevent-reading-cookies</ulink> \
4530 <ulink url="actions-file.html#PREVENT-SETTING-COOKIES">-prevent-setting-cookies</ulink> \
4531 <ulink url="actions-file.html#KILL-POPUPS">-kill-popups</ulink> \
4532 <ulink url="actions-file.html#SEND-VANILLA-WAFER">-send-vanilla-wafer</ulink> \
4533 <ulink url="actions-file.html#SEND-WAFER">-send-wafer</ulink> \
4535 / # forward slash will match *all* potential URL patterns.
4537 ##########################################################################
4538 # Default behavior is now set. Now we will define some exceptions to our
4539 # default action policies.
4540 ##########################################################################
4542 # These sites are very complex and require very minimal interference.
4543 # We'll disable most actions with our 'fragile' alias:
4545 .office.microsoft.com # surprise, surprise!
4546 .windowsupdate.microsoft.com
4549 # Shopping sites - not as fragile but require some special
4550 # handling. We still want to block ads, and we will allow
4551 # persistant cookies via the 'shop' alias:
4554 .worldpay.com # for quietpc.com
4559 # These sites require pop-ups too :( We'll combine our 'shop'
4560 # alias with two other actions into one rule to allow all popups.
4561 { shop <ulink url="actions-file.html#KILL-POPUPS">-kill-popups</ulink> <ulink url="actions-file.html#FILTER-POPUPS">-filter{popups}</ulink> }
4566 # The 'Fast-redirects' action breaks some sites. Disable this action
4567 # for these known sensitive sites:
4568 { <ulink url="actions-file.html#FAST-REDIRECTS">-fast-redirects</ulink> }
4570 edit.europe.yahoo.com
4572 .altavista.com/.*(like|url|link):http
4573 .altavista.com/trans.*urltext=http
4577 # Define which file types will be treated as images. Important
4579 { <ulink url="actions-file.html#HANDLE-AS-IMAGE">+handle-as-image</ulink> }
4580 /.*\.(gif|jpe?g|png|bmp|ico)
4583 # Now lets list some domains that are known ad generators. And
4584 # our alias that we use here will block these as well as force
4585 # them to be treated as images. This combination of actions is
4586 # important for ad blocking. What the browser will show instead is
4587 # determined by the setting of <ulink url="actions-file.html#SET-IMAGE-BLOCKER"><quote>+set-image-blocker</quote></ulink>
4591 .a.yimg.com/(?:(?!/i/).)*$
4592 .a[0-9].yimg.com/(?:(?!/i/).)*$
4596 ad.*.doubleclick.net
4599 # These will just simply be blocked. They will generate the BLOCKED
4600 # banner page, if matched. Heavy use of wildcards and regular
4601 # expressions in this example. Enable block action:
4602 { <ulink url="actions-file.html#BLOCK">+block</ulink> }
4607 /.*count(er)?\.(pl|cgi|exe|dll|asp|php[34]?)
4608 /(?:.*/)?(publicite|werbung|rekla(ma|me|am)|annonse|maino(kset|nta|s)?)/
4612 # The above block section will probably inadvertantly catch some
4613 # sites we DO NOT want blocked via the wildcards and regular expressions.
4614 # Now let's set exceptions to the exceptions so the good guys get better
4615 # treatment. Disable block action:
4616 { <ulink url="actions-file.html#BLOCK">-block</ulink> }
4621 # Let's just trust all .edu top level domains.
4623 www.ugu.com/sui/ugu/adv
4624 # We'll need to access to path names containing 'download'
4627 # 'adv' is for globalintersec and means advanced, not advertisement
4628 www.globalintersec.com/adv
4631 # Don't filter *anything* from our friends at sourceforge.
4632 # Notice we don't have to name the individual filter
4633 # identifiers -- we just turn them all off in one fell swoop.
4634 # Disable all filters for this one site:
4635 { <ulink url="actions-file.html#FILTER">-filter</ulink> }
4643 So far we are painting with a broad brush by setting general policies.
4644 The above would be a reasonable starting point for many situations. Now,
4645 we want to be more specific and have customized rules that are more suitable
4646 to our personal habits and preferences. These would be for narrowly defined
4647 situations like your ISP or your bank, and should be placed in
4648 <filename>user.action</filename>, which is parsed after all other
4649 actions files and should not be clobbered by upgrades. So any settings here,
4650 will have the last word and over-ride any previously defined actions.
4654 Now a few examples of some things that one might do with a
4655 <filename>user.action</filename> file.
4658 <!-- brief sample user.action here -->
4664 # Sample user.action file.
4666 # Any aliases you want to use need to be re-defined here.
4667 # Alias to turn off cookie handling, ie allow all cookies unmolested.
4668 -prevent-cookies = -prevent-setting-cookies -prevent-reading-cookies \
4669 -session-cookies-only
4671 # Fragile sites should have the minimum changes:
4672 fragile = -block -deanimate-gifs -fast-redirects -filter -hide-referer \
4673 -prevent-cookies -kill-popups
4675 # Allow persistent cookies for a few regular sites that we
4676 # trust via our above alias. These will be saved from one browser session
4677 # to the next. We are explicity turning off any and all cookie handling,
4678 # even though the prevent-*-cookie settings were disabled in our above
4679 # default.action anyway. So cookies from these domains will come through
4681 { -prevent-cookies }
4688 # My ISP uses obnoxious self promoting images on many pages.
4689 # Nuke them :) Note that <ulink url="actions-file.html#HANDLE-AS-IMAGE"><quote>+handle-as-image</quote></ulink> need not be specified,
4690 # since all URLs ending in .gif will be tagged as images by the
4691 # general rules in default.action anyway.
4692 { <ulink url="actions-file.html#BLOCK">+block</ulink> }
4693 www.my-isp-example.com/logo[0-9].gif
4696 # Say the site where you do your homebanking needs to open
4697 # popup windows, but you have chosen to kill popups by
4698 # default. This will allow it for your-example-bank.com:
4700 { <ulink url="actions-file.html#FILTER-POPUPS">-filter{popups}</ulink> <ulink url="actions-file.html#KILL-POPUPS">-kill-popups</ulink> }
4701 .my-example-bank.com
4704 # This site is delicate, and requires kid-glove
4716 <!-- ~ End section ~ -->
4719 <!-- ~~~~~ New section ~~~~~ -->
4720 <sect2 id="aliases">
4721 <title>Aliases</title>
4723 Custom <quote>actions</quote>, known to <application>Privoxy</application>
4724 as <quote>aliases</quote>, can be defined by combining other <quote>actions</quote>.
4725 These can in turn be invoked just like the built-in <quote>actions</quote>.
4726 Currently, an alias can contain any character except space, tab, <quote>=</quote>,
4727 <quote>{</quote> or <quote>}</quote>. But please use only <quote>a</quote>-
4728 <quote>z</quote>, <quote>0</quote>-<quote>9</quote>, <quote>+</quote>, and
4729 <quote>-</quote>. Alias names are not case sensitive, and
4730 <emphasis>must be defined before other actions</emphasis> in the
4731 actions file! And there can only be one set of <quote>aliases</quote>
4732 defined per file. Each actions file may have its own aliases, but they are
4733 only visible within that file. Aliases do not requir a <quote>+</quote> or
4734 <quote>-</quote> sign in front, since they are merely expanded.
4738 Now let's define a few aliases:
4745 # Useful custom aliases we can use later. These must come first!
4747 +prevent-cookies = +prevent-setting-cookies +prevent-reading-cookies
4748 -prevent-cookies = -prevent-setting-cookies -prevent-reading-cookies
4749 fragile = -block -prevent-cookies -filter -fast-redirects -hide-referer -kill-popups
4750 shop = -prevent-cookies -filter -fast-redirects
4751 +imageblock = +block +handle-as-image
4753 # Aliases defined from other aliases, for people who don't like to type
4755 c0 = +prevent-cookies
4756 c1 = -prevent-cookies
4757 #... etc. Customize to your heart's content.
4764 Some examples using our <quote>shop</quote> and <quote>fragile</quote>
4765 aliases from above. These would appear in the lower sections of an
4766 actions file as exceptions to the default actions (as defined in the
4774 # These sites are very complex and require
4775 # minimal interference.
4777 .office.microsoft.com
4778 .windowsupdate.microsoft.com
4781 # Shopping sites - but we still want to block ads.
4784 .worldpay.com # for quietpc.com
4787 # These shops require pop-ups also
4797 The <quote>shop</quote> and <quote>fragile</quote> aliases are often used for
4798 <quote>problem</quote> sites that require most actions to be disabled
4799 in order to function properly.
4806 <!-- ~ End section ~ -->
4810 <!-- ~~~~~~~~ New section Header ~~~~~~~~~ -->
4812 <sect1 id="filter-file">
4813 <title>The Filter File</title>
4815 Any web page can be dynamically modified with the filter file. This
4816 modification can be removal, or re-writing, of any web page content,
4817 including tags and non-visible content. The default filter file is
4818 oddly enough <filename>default.filter</filename>, located in the config
4823 This is potentially a very powerful feature, and requires knowledge of both
4824 <quote>regular expression</quote> and HTML in order create custom
4825 filters. But, there are a number of useful filters included with
4826 <application>Privoxy</application> for many common situations.
4830 The included example file is divided into sections. Each section begins
4831 with the <literal>FILTER</literal> keyword, followed by the identifier
4832 for that section, e.g. <quote>FILTER: webbugs</quote>. Each section performs
4833 a similar type of filtering, such as <quote>html-annoyances</quote>.
4837 This file uses regular expressions to alter or remove any string in the
4838 target page. The expressions can only operate on one line at a time. Some
4839 examples from the included default <filename>default.filter</filename>:
4843 Stop web pages from displaying annoying messages in the status bar by
4844 deleting such references:
4851 FILTER: html-annoyances
4853 # New browser windows should be resizeable and have a location and status
4856 s/resizable="?(no|0)"?/resizable=1/ig s/noresize/yesresize/ig
4857 s/location="?(no|0)"?/location=1/ig s/status="?(no|0)"?/status=1/ig
4858 s/scrolling="?(no|0|Auto)"?/scrolling=1/ig
4859 s/menubar="?(no|0)"?/menubar=1/ig
4861 # The <BLINK> tag was a crime!
4863 s*<blink>|</blink>**ig
4867 #s/framespacing="?(no|0)"?//ig
4868 #s/margin(height|width)=[0-9]*//gi
4875 Just for kicks, replace any occurrence of <quote>Microsoft</quote> with
4876 <quote>MicroSuck</quote>, and have a little fun with topical buzzwords:
4885 s/microsoft(?!.com)/MicroSuck/ig
4889 s/industry-leading|cutting-edge|award-winning/<font color=red><b>BINGO!</b></font>/ig
4896 Kill those pesky little web-bugs:
4903 # webbugs: Squish WebBugs (1x1 invisible GIFs used for user tracking)
4906 s/<img\s+[^>]*?(width|height)\s*=\s*['"]?1\D[^>]*?(width|height)\s*=\s*['"]?1(\D[^>]*?)?>/<!-- Squished WebBug -->/sig
4913 <!-- ~~~~~ New section ~~~~~ -->
4915 <title>The <emphasis>+filter</emphasis> Action</title>
4917 Filters are enabled with the <ulink
4918 url="actions-file.html#FILTER"><quote>+filter</quote></ulink> action from within
4919 one of the actions files. <quote>+filter</quote> requires one parameter, which
4920 should match one of the section identifiers in the filter file itself. Example:
4924 +filter{html-annoyances}
4928 This would activate that particular filter. Similarly, <quote>+filter</quote>
4929 can be turned off for selected sites as:
4930 <quote>-filter{html-annoyances}</quote>. Remember too, all actions are off by
4931 default, unless they are explicity enabled in one of the actions files.
4938 <!-- ~ End section ~ -->
4942 <!-- ~~~~~ New section ~~~~~ -->
4944 <sect1 id="templates">
4945 <title>Templates</title>
4947 When <application>Privoxy</application> displays one of its internal
4948 pages, such as a <ulink url="http://bogus_404_page.com">404 Not Found error page</ulink>
4949 (<application>Privoxy</application> must be running for link to work as
4950 intended), it uses the appropriate template. On Linux, BSD, and Unix, these
4951 are located in <filename>/etc/privoxy/templates</filename> by default. These
4952 may be customized, if desired. <filename>cgi-style.css</filename> is used to
4953 control the HTML attributes (fonts, etc).
4957 <ulink url="http://ads.bannerserver.example.com/nasty-ads/sponsor.html">Blocked
4958 (<application>Privoxy</application> needs to be running for page to display)</ulink>
4959 banner page with the bright red top
4960 banner, is called just <quote><filename>blocked</filename></quote>. This
4961 may be customized or replaced with something else if desired.
4966 <!-- ~ End section ~ -->
4970 <!-- ~~~~~ New section ~~~~~ -->
4972 <sect1 id="contact"><title>Contacting the Developers, Bug Reporting and Feature
4975 <!-- Include contacting.sgml boilerplate: -->
4977 <!-- end boilerplate -->
4982 <!-- ~~~~~ New section ~~~~~ -->
4983 <sect1 id="copyright"><title>Copyright and History</title>
4985 <sect2><title>Copyright</title>
4986 <!-- Include copyright.sgml: -->
4988 <!-- end copyright -->
4991 <!-- ~ End section ~ -->
4994 <!-- ~~~~~ New section ~~~~~ -->
4996 <sect2 id="history"><title>History</title>
4997 <!-- Include history.sgml: -->
4999 <!-- end history -->
5003 <!-- ~~~~~ New section ~~~~~ -->
5004 <sect1 id="seealso"><title>See Also</title>
5005 <!-- Include seealso.sgml: -->
5007 <!-- end seealso -->
5012 <!-- ~~~~~ New section ~~~~~ -->
5013 <sect1 id="appendix"><title>Appendix</title>
5016 <!-- ~~~~~ New section ~~~~~ -->
5018 <title>Regular Expressions</title>
5020 <application>Privoxy</application> can use <quote>regular expressions</quote>
5021 in various config files. Assuming support for <quote>pcre</quote> (Perl
5022 Compatible Regular Expressions) is compiled in, which is the default. Such
5023 configuration directives do not require regular expressions, but they can be
5024 used to increase flexibility by matching a pattern with wild-cards against
5029 If you are reading this, you probably don't understand what <quote>regular
5030 expressions</quote> are, or what they can do. So this will be a very brief
5031 introduction only. A full explanation would require a book ;-)
5035 <quote>Regular expressions</quote> is a way of matching one character
5036 expression against another to see if it matches or not. One of the
5037 <quote>expressions</quote> is a literal string of readable characters
5038 (letter, numbers, etc), and the other is a complex string of literal
5039 characters combined with wild-cards, and other special characters, called
5040 meta-characters. The <quote>meta-characters</quote> have special meanings and
5041 are used to build the complex pattern to be matched against. Perl Compatible
5042 Regular Expressions is an enhanced form of the regular expression language
5043 with backward compatibility.
5047 To make a simple analogy, we do something similar when we use wild-card
5048 characters when listing files with the <command>dir</command> command in DOS.
5049 <literal>*.*</literal> matches all filenames. The <quote>special</quote>
5050 character here is the asterisk which matches any and all characters. We can be
5051 more specific and use <literal>?</literal> to match just individual
5052 characters. So <quote>dir file?.text</quote> would match
5053 <quote>file1.txt</quote>, <quote>file2.txt</quote>, etc. We are pattern
5054 matching, using a similar technique to <quote>regular expressions</quote>!
5058 Regular expressions do essentially the same thing, but are much, much more
5059 powerful. There are many more <quote>special characters</quote> and ways of
5060 building complex patterns however. Let's look at a few of the common ones,
5061 and then some examples:
5066 <emphasis>.</emphasis> - Matches any single character, e.g. <quote>a</quote>,
5067 <quote>A</quote>, <quote>4</quote>, <quote>:</quote>, or <quote>@</quote>.
5069 </simplelist></para>
5073 <emphasis>?</emphasis> - The preceding character or expression is matched ZERO or ONE
5076 </simplelist></para>
5080 <emphasis>+</emphasis> - The preceding character or expression is matched ONE or MORE
5083 </simplelist></para>
5087 <emphasis>*</emphasis> - The preceding character or expression is matched ZERO or MORE
5090 </simplelist></para>
5094 <emphasis>\</emphasis> - The <quote>escape</quote> character denotes that
5095 the following character should be taken literally. This is used where one of the
5096 special characters (e.g. <quote>.</quote>) needs to be taken literally and
5097 not as a special meta-character. Example: <quote>example\.com</quote>, makes
5098 sure the period is recognized only as a period (and not expanded to its
5099 meta-character meaning of any single character).
5101 </simplelist></para>
5105 <emphasis>[]</emphasis> - Characters enclosed in brackets will be matched if
5106 any of the enclosed characters are encountered. For instance, <quote>[0-9]</quote>
5107 matches any numeric digit (zero through nine). As an example, we can combine
5108 this with <quote>+</quote> to match any digit one of more times: <quote>[0-9]+</quote>.
5110 </simplelist></para>
5114 <emphasis>()</emphasis> - parentheses are used to group a sub-expression,
5115 or multiple sub-expressions.
5117 </simplelist></para>
5121 <emphasis>|</emphasis> - The <quote>bar</quote> character works like an
5122 <quote>or</quote> conditional statement. A match is successful if the
5123 sub-expression on either side of <quote>|</quote> matches. As an example:
5124 <quote>/(this|that) example/</quote> uses grouping and the bar character
5125 and would match either <quote>this example</quote> or <quote>that
5126 example</quote>, and nothing else.
5128 </simplelist></para>
5132 <emphasis>s/string1/string2/g</emphasis> - This is used to rewrite strings of text.
5133 <quote>string1</quote> is replaced by <quote>string2</quote> in this
5134 example. There must of course be a match on <quote>string1</quote> first.
5136 </simplelist></para>
5139 These are just some of the ones you are likely to use when matching URLs with
5140 <application>Privoxy</application>, and is a long way from a definitive
5141 list. This is enough to get us started with a few simple examples which may
5142 be more illuminating:
5146 <emphasis><literal>/.*/banners/.*</literal></emphasis> - A simple example
5147 that uses the common combination of <quote>.</quote> and <quote>*</quote> to
5148 denote any character, zero or more times. In other words, any string at all.
5149 So we start with a literal forward slash, then our regular expression pattern
5150 (<quote>.*</quote>) another literal forward slash, the string
5151 <quote>banners</quote>, another forward slash, and lastly another
5152 <quote>.*</quote>. We are building
5153 a directory path here. This will match any file with the path that has a
5154 directory named <quote>banners</quote> in it. The <quote>.*</quote> matches
5155 any characters, and this could conceivably be more forward slashes, so it
5156 might expand into a much longer looking path. For example, this could match:
5157 <quote>/eye/hate/spammers/banners/annoy_me_please.gif</quote>, or just
5158 <quote>/banners/annoying.html</quote>, or almost an infinite number of other
5159 possible combinations, just so it has <quote>banners</quote> in the path
5164 A now something a little more complex:
5168 <emphasis><literal>/.*/adv((er)?ts?|ertis(ing|ements?))?/</literal></emphasis> -
5169 We have several literal forward slashes again (<quote>/</quote>), so we are
5170 building another expression that is a file path statement. We have another
5171 <quote>.*</quote>, so we are matching against any conceivable sub-path, just so
5172 it matches our expression. The only true literal that <emphasis>must
5173 match</emphasis> our pattern is <application>adv</application>, together with
5174 the forward slashes. What comes after the <quote>adv</quote> string is the
5179 Remember the <quote>?</quote> means the preceding expression (either a
5180 literal character or anything grouped with <quote>(...)</quote> in this case)
5181 can exist or not, since this means either zero or one match. So
5182 <quote>((er)?ts?|ertis(ing|ements?))</quote> is optional, as are the
5183 individual sub-expressions: <quote>(er)</quote>,
5184 <quote>(ing|ements?)</quote>, and the <quote>s</quote>. The <quote>|</quote>
5185 means <quote>or</quote>. We have two of those. For instance,
5186 <quote>(ing|ements?)</quote>, can expand to match either <quote>ing</quote>
5187 <emphasis>OR</emphasis> <quote>ements?</quote>. What is being done here, is an
5188 attempt at matching as many variations of <quote>advertisement</quote>, and
5189 similar, as possible. So this would expand to match just <quote>adv</quote>,
5190 or <quote>advert</quote>, or <quote>adverts</quote>, or
5191 <quote>advertising</quote>, or <quote>advertisement</quote>, or
5192 <quote>advertisements</quote>. You get the idea. But it would not match
5193 <quote>advertizements</quote> (with a <quote>z</quote>). We could fix that by
5194 changing our regular expression to:
5195 <quote>/.*/adv((er)?ts?|erti(s|z)(ing|ements?))?/</quote>, which would then match
5200 <emphasis><literal>/.*/advert[0-9]+\.(gif|jpe?g)</literal></emphasis> - Again
5201 another path statement with forward slashes. Anything in the square brackets
5202 <quote>[]</quote> can be matched. This is using <quote>0-9</quote> as a
5203 shorthand expression to mean any digit one through nine. It is the same as
5204 saying <quote>0123456789</quote>. So any digit matches. The <quote>+</quote>
5205 means one or more of the preceding expression must be included. The preceding
5206 expression here is what is in the square brackets -- in this case, any digit
5207 one through nine. Then, at the end, we have a grouping: <quote>(gif|jpe?g)</quote>.
5208 This includes a <quote>|</quote>, so this needs to match the expression on
5209 either side of that bar character also. A simple <quote>gif</quote> on one side, and the other
5210 side will in turn match either <quote>jpeg</quote> or <quote>jpg</quote>,
5211 since the <quote>?</quote> means the letter <quote>e</quote> is optional and
5212 can be matched once or not at all. So we are building an expression here to
5213 match image GIF or JPEG type image file. It must include the literal
5214 string <quote>advert</quote>, then one or more digits, and a <quote>.</quote>
5215 (which is now a literal, and not a special character, since it is escaped
5216 with <quote>\</quote>), and lastly either <quote>gif</quote>, or
5217 <quote>jpeg</quote>, or <quote>jpg</quote>. Some possible matches would
5218 include: <quote>//advert1.jpg</quote>,
5219 <quote>/nasty/ads/advert1234.gif</quote>,
5220 <quote>/banners/from/hell/advert99.jpg</quote>. It would not match
5221 <quote>advert1.gif</quote> (no leading slash), or
5222 <quote>/adverts232.jpg</quote> (the expression does not include an
5223 <quote>s</quote>), or <quote>/advert1.jsp</quote> (<quote>jsp</quote> is not
5224 in the expression anywhere).
5228 <emphasis><literal>s/microsoft(?!.com)/MicroSuck/i</literal></emphasis> - This is
5229 a substitution. <quote>MicroSuck</quote> will replace any occurrence of
5230 <quote>microsoft</quote>. The <quote>i</quote> at the end of the expression
5231 means ignore case. The <quote>(?!.com)</quote> means
5232 the match should fail if <quote>microsoft</quote> is followed by
5233 <quote>.com</quote>. In other words, this acts like a <quote>NOT</quote>
5234 modifier. In case this is a hyperlink, we don't want to break it ;-).
5238 We are barely scratching the surface of regular expressions here so that you
5239 can understand the default <application>Privoxy</application>
5240 configuration files, and maybe use this knowledge to customize your own
5241 installation. There is much, much more that can be done with regular
5242 expressions. Now that you know enough to get started, you can learn more on
5247 More reading on Perl Compatible Regular expressions:
5248 <ulink url="http://www.perldoc.com/perl5.6/pod/perlre.html">http://www.perldoc.com/perl5.6/pod/perlre.html</ulink>
5253 <!-- ~ End section ~ -->
5256 <!-- ~~~~~ New section ~~~~~ -->
5258 <title><application>Privoxy</application>'s Internal Pages</title>
5261 Since <application>Privoxy</application> proxies each requested
5262 web page, it is easy for <application>Privoxy</application> to
5263 trap certain special URLs. In this way, we can talk directly to
5264 <application>Privoxy</application>, and see how it is
5265 configured, see how our rules are being applied, change these
5266 rules and other configuration options, and even turn
5267 <application>Privoxy's</application> filtering off, all with
5273 The URLs listed below are the special ones that allow direct access
5274 to <application>Privoxy</application>. Of course,
5275 <application>Privoxy</application> must be running to access these. If
5276 not, you will get a friendly error message. Internet access is not
5289 <ulink url="http://config.privoxy.org/">http://config.privoxy.org/</ulink>
5293 Alternately, this may be reached at <ulink
5294 url="http://p.p/">http://p.p/</ulink>, but this
5295 variation may not work as reliably as the above in some configurations.
5301 Show information about the current configuration, including viewing and
5302 editing of actions files:
5306 <ulink url="http://config.privoxy.org/show-status">http://config.privoxy.org/show-status</ulink>
5313 Show the source code version numbers:
5317 <ulink url="http://config.privoxy.org/show-version">http://config.privoxy.org/show-version</ulink>
5324 Show the browser's request headers:
5328 <ulink url="http://config.privoxy.org/show-request">http://config.privoxy.org/show-request</ulink>
5335 Show which actions apply to a URL and why:
5339 <ulink url="http://config.privoxy.org/show-url-info">http://config.privoxy.org/show-url-info</ulink>
5346 Toggle Privoxy on or off. In this case, <quote>Privoxy</quote> continues
5347 to run, but only as a pass-through proxy, with no actions taking place:
5351 <ulink url="http://config.privoxy.org/toggle">http://config.privoxy.org/toggle</ulink>
5355 Short cuts. Turn off, then on:
5359 <ulink url="http://config.privoxy.org/toggle?set=disable">http://config.privoxy.org/toggle?set=disable</ulink>
5364 <ulink url="http://config.privoxy.org/toggle?set=enable">http://config.privoxy.org/toggle?set=enable</ulink>
5373 These may be bookmarked for quick reference. See next.
5377 <sect3 id="bookmarklets">
5378 <title>Bookmarklets</title>
5380 Below are some <quote>bookmarklets</quote> to allow you to easily access a
5381 <quote>mini</quote> version of some of <application>Privoxy's</application>
5382 special pages. They are designed for MS Internet Explorer, but should work
5383 equally well in Netscape, Mozilla, and other browsers which support
5384 JavaScript. They are designed to run directly from your bookmarks - not by
5385 clicking the links below (although that should work for testing).
5388 To save them, right-click the link and choose <quote>Add to Favorites</quote>
5389 (IE) or <quote>Add Bookmark</quote> (Netscape). You will get a warning that
5390 the bookmark <quote>may not be safe</quote> - just click OK. Then you can run the
5391 Bookmarklet directly from your favorites/bookmarks. For even faster access,
5392 you can put them on the <quote>Links</quote> bar (IE) or the <quote>Personal
5393 Toolbar</quote> (Netscape), and run them with a single click.
5402 url="javascript:void(window.open('http://config.privoxy.org/toggle?mini=y&set=enabled','ijbstatus','width=250,height=100,resizable=yes,scrollbars=no,toolbar=no,location=no,directories=no,status=no,menubar=no,copyhistory=no').focus());">Privoxy - Enable</ulink>
5409 url="javascript:void(window.open('http://config.privoxy.org/toggle?mini=y&set=disabled','ijbstatus','width=250,height=100,resizable=yes,scrollbars=no,toolbar=no,location=no,directories=no,status=no,menubar=no,copyhistory=no').focus());">Privoxy - Disable</ulink>
5416 url="javascript:void(window.open('http://config.privoxy.org/toggle?mini=y&set=toggle','ijbstatus','width=250,height=100,resizable=yes,scrollbars=no,toolbar=no,location=no,directories=no,status=no,menubar=no,copyhistory=no').focus());">Privoxy - Toggle Privoxy</ulink> (Toggles between enabled and disabled)
5423 url="javascript:void(window.open('http://config.privoxy.org/toggle?mini=y','ijbstatus','width=250,height=2,resizable=yes,scrollbars=no,toolbar=no,location=no,directories=no,status=no,menubar=no,copyhistory=no').focus());">Privoxy- View Status</ulink>
5429 <ulink url="javascript:w=Math.floor(screen.width/2);h=Math.floor(screen.height*0.9);void(window.open('http://www.privoxy.org/actions','Feedback','screenx='+w+',width='+w+',height='+h+',scrollbars=yes,toolbar=no,location=no,directories=no,status=no,menubar=no,copyhistory=no').focus());">Privoxy - Submit Filter Feedback</ulink>
5439 Credit: The site which gave me the general idea for these bookmarklets is
5440 <ulink url="http://www.bookmarklets.com">www.bookmarklets.com</ulink>. They
5441 have more information about bookmarklets.
5450 <!-- ~~~~~ New section ~~~~~ -->
5452 <title>Chain of Events</title>
5454 Let's take a quick look at the basic sequence of events when a web page is
5455 requested by your browser and <application>Privoxy</application> is on duty:
5462 First, your web browser requests a web page. The browser knows to send
5463 the request to <application>Privoxy</application>, which will in turn,
5464 relay the request to the remote web server after passing the following
5470 <application>Privoxy</application> traps any request for its own internal CGI
5471 pages (e.g http://p.p/) and sends the CGI page back to the browser.
5476 Next, <application>Privoxy</application> checks to see if the URL
5478 url="actions-file.html#BLOCK"><quote>+block</quote></ulink> patterns. If
5479 so, the URL is then blocked, and the remote web server will not be contacted.
5480 <ulink url="actions-file.html#HANDLE-AS-IMAGE"><quote>+handle-as-image</quote></ulink>
5481 is then checked and if it does not match, an
5482 HTML <quote>BLOCKED</quote> page is sent back. Otherwise, if it does match,
5483 an image is returned. The type of image depends on the setting of <ulink
5484 url="actions-file.html#SET-IMAGE-BLOCKER"><quote>+set-image-blocker</quote></ulink>
5485 (blank, checkerboard pattern, or an HTTP redirect to an image elsewhere).
5490 Untrusted URLs are blocked. If URLs are being added to the
5491 <filename>trust</filename> file, then that is done.
5496 If the URL pattern matches the <ulink
5497 url="actions-file.html#FAST-REDIRECTS"><quote>+fast-redirects</quote></ulink> action,
5498 it is then processed. Unwanted parts of the requested URL are stripped.
5503 Now the rest of the client browser's request headers are processed. If any
5504 of these match any of the relevant actions (e.g. <ulink
5505 url="actions-file.html#HIDE-USER-AGENT"><quote>+hide-user-agent</quote></ulink>,
5506 etc.), headers are suppressed or forged as determined by these actions and
5512 Now the web server starts sending its response back (i.e. typically a web page and related
5518 First, the server headers are read and processed to determine, among other
5519 things, the MIME type (document type) and encoding. The headers are then
5520 filtered as deterimed by the
5521 <ulink url="actions-file.html#PREVENT-SETTING-COOKIES"><quote>+prevent-setting-cookies</quote></ulink>,
5522 <ulink url="actions-file.html#SESSION-COOKIES-ONLY"><quote>+session-cookies-only</quote></ulink>,
5523 and <ulink url="actions-file.html#DOWNGRADE-HTTP-VERSION"><quote>+downgrade-http-version</quote></ulink>
5529 If the <ulink url="actions-file.html#KILL-POPUPS"><quote>+kill-popups</quote></ulink>
5530 action applies, and it is an HTML or JavaScript document, the popup-code in the
5531 response is filtered on-the-fly as it is received.
5536 If a <ulink url="actions-file.html#FILTER"><quote>+filter</quote></ulink>
5538 url="actions-file.html#DEANIMATE-GIFS"><quote>+deanimate-gifs</quote></ulink>
5539 action applies (and the document type fits the action), the rest of the page is
5540 read into memory (up to a configurable limit). Then the filter rules (from
5541 <filename>default.filter</filename>) are processed against the buffered
5542 content. Filters are applied in the order they are specified in the
5543 <filename>default.filter</filename> file. Animated GIFs, if present, are
5544 reduced to either the first or last frame, depending on the action
5545 setting.The entire page, which is now filtered, is then sent by
5546 <application>Privoxy</application> back to your browser.
5549 If neither <ulink url="actions-file.html#FILTER"><quote>+filter</quote></ulink>
5551 url="actions-file.html#DEANIMATE-GIFS"><quote>+deanimate-gifs</quote></ulink>
5552 matches, then <application>Privoxy</application> passes the raw data through
5553 to the client browser as it becomes available.
5558 As the browser receives the now (probably filtered) page content, it
5559 reads and then requests any URLs that may be embedded within the page
5560 source, e.g. ad images, stylesheets, JavaScript, other HTML documents (e.g.
5561 frames), sounds, etc. For each of these objects, the browser issues a new
5562 request. And each such request is in turn processed as above. Note that a
5563 complex web page may have many such embedded URLs.
5573 <!-- ~~~~~ New section ~~~~~ -->
5574 <sect2 id="actionsanat">
5575 <title>Anatomy of an Action</title>
5578 The way <application>Privoxy</application> applies
5579 <ulink url="actions-file.html#ACTIONS"><quote>actions</quote></ulink>
5580 and <ulink url="actions-file.html#FILTER"><quote>filters</quote></ulink>
5581 to any given URL can be complex, and not always so
5582 easy to understand what is happening. And sometimes we need to be able to
5583 <emphasis>see</emphasis> just what <application>Privoxy</application> is
5584 doing. Especially, if something <application>Privoxy</application> is doing
5585 is causing us a problem inadvertently. It can be a little daunting to look at
5586 the actions and filters files themselves, since they tend to be filled with
5587 <quote>regular expressions</quote> whose consequences are not always
5592 One quick test to see if <application>Privoxy</application> is causing a problem
5593 or not, is to disable it temporarily. This should be the first troubleshooting
5594 step. See <link linkend="bookmarklets">the Bookmarklets</link> section on a quick
5595 and easy way to do this (be sure to flush caches afterward!).
5599 <application>Privoxy</application> also provides the
5600 <ulink url="http://config.privoxy.org/show-url-info">http://config.privoxy.org/show-url-info</ulink>
5601 page that can show us very specifically how <application>actions</application>
5602 are being applied to any given URL. This is a big help for troubleshooting.
5606 First, enter one URL (or partial URL) at the prompt, and then
5607 <application>Privoxy</application> will tell us
5608 how the current configuration will handle it. This will not
5609 help with filtering effects (i.e. the <ulink
5610 url="actions-file.html#FILTER"><quote>+filter</quote></ulink> action) from
5611 the <filename>default.filter</filename> file since this is handled very
5612 differently and not so easy to trap! It also will not tell you about any other
5613 URLs that may be embedded within the URL you are testing. For instance, images
5614 such as ads are expressed as URLs within the raw page source of HTML pages. So
5615 you will only get info for the actual URL that is pasted into the prompt area
5616 -- not any sub-URLs. If you want to know about embedded URLs like ads, you
5617 will have to dig those out of the HTML source. Use your browser's <quote>View
5618 Page Source</quote> option for this. Or right click on the ad, and grab the
5623 Let's try an example, <ulink url="http://google.com">google.com</ulink>,
5624 and look at it one section at a time:
5629 Matches for http://google.com:
5631 --- File standard ---
5632 (no matches in this file)
5634 --- File default ---
5636 { -add-header -block +deanimate-gifs{last} -downgrade-http-version +fast-redirects
5637 -filter{popups} -filter{fun} -filter{shockwave-flash} -filter{crude-parental}
5638 +filter{html-annoyances} +filter{js-annoyances} +filter{content-cookies}
5639 +filter{webbugs} +filter{refresh-tags} +filter{nimda} +filter{banners-by-size}
5640 +hide-forwarded-for-headers +hide-from-header{block} +hide-referer{forge}
5641 -hide-user-agent -handle-as-image +set-image-blocker{pattern} -limit-connect
5642 +prevent-compression +session-cookies-only -prevent-reading-cookies
5643 -prevent-setting-cookies -kill-popups -send-vanilla-wafer -send-wafer }
5646 { -session-cookies-only }
5653 (no matches in this file)
5658 This tells us how we have defined our
5659 <ulink url="actions-file.html#ACTIONS"><quote>actions</quote></ulink>, and
5660 which ones match for our example, <quote>google.com</quote>. The first listing
5661 is any matches for the <filename>standard.action</filename> file. No hits at
5662 all here on <quote>standard</quote>. Then next is <quote>default</quote>, or
5663 our <filename>default.action</filename> file. The large, multi-line listing,
5664 is how the actions are set to match for all URLs, i.e. our default settings.
5665 If you look at your <quote>actions</quote> file, this would be the section
5666 just below the <quote>aliases</quote> section near the top. This will apply to
5667 all URLs as signified by the single forward slash at the end of the listing
5668 -- <quote>/</quote>.
5672 But we can define additional actions that would be exceptions to these general
5673 rules, and then list specific URLs (or patterns) that these exceptions would
5674 apply to. Last match wins. Just below this then are two explicit matches for
5675 <quote>.google.com</quote>. The first is negating our previous cookie setting,
5676 which was for <ulink
5677 url="actions-file.html#SESSION-COOKIES-ONLY"><quote>+session-cookies-only</quote></ulink>
5678 (i.e. not persistent). So we will allow persistent cookies for google. The
5679 second turns <emphasis>off</emphasis> any
5681 url="actions-file.html#FAST-REDIRECTS"><quote>+fast-redirects</quote></ulink>
5682 action, allowing this to take place unmolested. Note that there is a leading
5683 dot here -- <quote>.google.com</quote>. This will match any hosts and
5684 sub-domains, in the google.com domain also, such as
5685 <quote>www.google.com</quote>. So, apparently, we have these two actions
5686 defined somewhere in the lower part of our <filename>default.action</filename>
5687 file, and <quote>google.com</quote> is referenced somewhere in these latter
5692 Then, for our <filename>user.action</filename> file, we again have no hits.
5696 And finally we pull it all together in the bottom section and summarize how
5697 <application>Privoxy</application> is applying all its <quote>actions</quote>
5698 to <quote>google.com</quote>:
5706 -add-header -block +deanimate-gifs{last} -downgrade-http-version -fast-redirects
5707 -filter{popups} -filter{fun} -filter{shockwave-flash} -filter{crude-parental}
5708 +filter{html-annoyances} +filter{js-annoyances} +filter{content-cookies}
5709 +filter{webbugs} +filter{refresh-tags} +filter{nimda} +filter{banners-by-size}
5710 +hide-forwarded-for-headers +hide-from-header{block} +hide-referer{forge}
5711 -hide-user-agent -handle-as-image +set-image-blocker{pattern} -limit-connect
5712 +prevent-compression -session-cookies-only -prevent-reading-cookies
5713 -prevent-setting-cookies -kill-popups -send-vanilla-wafer -send-wafer
5718 Notice the only difference here to the previous listing, is to
5719 <quote>fast-redirects</quote> and <quote>session-cookies-only</quote>.
5723 Now another example, <quote>ad.doubleclick.net</quote>:
5729 { +block +handle-as-image }
5732 { +block +handle-as-image }
5735 { +block +handle-as-image }
5741 We'll just show the interesting part here, the explicit matches. It is
5742 matched three different times. Each as an <quote>+block +handle-as-image</quote>,
5743 which is the expanded form of one of our aliases that had been defined as:
5744 <quote>+imageblock</quote>. (<ulink
5745 url="actions-file.html#ALIASES"><quote>Aliases</quote></ulink> are defined in
5746 the first section of the actions file and typically used to combine more
5751 Any one of these would have done the trick and blocked this as an unwanted
5752 image. This is unnecessarily redundant since the last case effectively
5753 would also cover the first. No point in taking chances with these guys
5754 though ;-) Note that if you want an ad or obnoxious
5755 URL to be invisible, it should be defined as <quote>ad.doubleclick.net</quote>
5756 is done here -- as both a <ulink
5757 url="actions-file.html#BLOCK"><quote>+block</quote></ulink>
5758 <emphasis>and</emphasis> an
5760 url="actions-file.html#HANDLE-AS-IMAGE"><quote>+handle-as-image</quote></ulink>.
5761 The custom alias <quote>+imageblock</quote> just simplifies the process and make
5766 One last example. Let's try <quote>http://www.rhapsodyk.net/adsl/HOWTO/</quote>.
5767 This one is giving us problems. We are getting a blank page. Hmmm...
5773 Matches for http://www.rhapsodyk.net/adsl/HOWTO/:
5775 { -add-header -block +deanimate-gifs -downgrade-http-version +fast-redirects
5776 +filter{html-annoyances} +filter{js-annoyances} +filter{kill-popups}
5777 +filter{webbugs} +filter{nimda} +filter{banners-by-size} +filter{hal}
5778 +filter{fun} +hide-forwarded-for-headers +hide-from-header{block}
5779 +hide-referer{forge} -hide-user-agent -handle-as-image +set-image-blocker{blank}
5780 +prevent-compression +session-cookies-only -prevent-setting-cookies
5781 -prevent-reading-cookies +kill-popups -send-vanilla-wafer -send-wafer }
5784 { +block +handle-as-image }
5790 Ooops, the <quote>/adsl/</quote> is matching <quote>/ads</quote>! But
5791 we did not want this at all! Now we see why we get the blank page. We could
5792 now add a new action below this that explicitly does <emphasis>not</emphasis>
5793 block (<quote>{-block}</quote>) paths with <quote>adsl</quote>. There are
5794 various ways to handle such exceptions. Example:
5806 Now the page displays ;-) Be sure to flush your browser's caches when
5807 making such changes. Or, try using <literal>Shift+Reload</literal>.
5811 But now what about a situation where we get no explicit matches like
5818 { +block +handle-as-image }
5824 That actually was very telling and pointed us quickly to where the problem
5825 was. If you don't get this kind of match, then it means one of the default
5826 rules in the first section is causing the problem. This would require some
5827 guesswork, and maybe a little trial and error to isolate the offending rule.
5828 One likely cause would be one of the <quote>{+filter}</quote> actions. Try
5829 adding the URL for the site to one of aliases that turn off <quote>+filter</quote>:
5837 .worldpay.com # for quietpc.com
5845 <quote>{shop}</quote> is an <quote>alias</quote> that expands to
5846 <quote>{ -filter -session-cookies-only }</quote>.
5847 Or you could do your own exception to negate filtering:
5860 This would probably be most appropriately put in <filename>user.action</filename>,
5861 for local site exceptions.
5865 <quote>{fragile}</quote> is an alias that disables most actions. This can be
5866 used as a last resort for problem sites. Remember to flush caches! If this
5867 still does not work, you will have to go through the remaining actions one by
5868 one to find which one(s) is causing the problem.
5877 This program is free software; you can redistribute it
5878 and/or modify it under the terms of the GNU General
5879 Public License as published by the Free Software
5880 Foundation; either version 2 of the License, or (at
5881 your option) any later version.
5883 This program is distributed in the hope that it will
5884 be useful, but WITHOUT ANY WARRANTY; without even the
5885 implied warranty of MERCHANTABILITY or FITNESS FOR A
5886 PARTICULAR PURPOSE. See the GNU General Public
5887 License for more details.
5889 The GNU General Public License should be included with
5890 this file. If not, you can view it at
5891 http://www.gnu.org/copyleft/gpl.html
5892 or write to the Free Software Foundation, Inc., 59
5893 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
5895 $Log: user-manual.sgml,v $
5896 Revision 1.101 2002/05/03 03:58:30 hal9
5897 Move the user-manual config directive to top of section. Add note about
5898 Privoxy needing read permissions for configs, and write for logs.
5900 Revision 1.100 2002/04/29 03:05:55 hal9
5901 Add clarification on differences of new actions files.
5903 Revision 1.99 2002/04/28 16:59:05 swa
5904 more structure in starting section
5906 Revision 1.98 2002/04/28 05:43:59 hal9
5907 This is the break up of configuration.html into multiple files. This
5908 will probably break links elsewhere :(
5910 Revision 1.97 2002/04/27 21:04:42 hal9
5911 -Rewrite of Actions File example.
5912 -Add section for user-manual directive in config.
5914 Revision 1.96 2002/04/27 05:32:00 hal9
5915 -Add short section to Filter Files to tie in with +filter action.
5916 -Start rewrite of examples in Actions Examples (not finished).
5918 Revision 1.95 2002/04/26 17:23:29 swa
5919 bookmarks cleaned, changed structure of user manual, screen and programlisting cleanups, and numerous other changes that I forgot
5921 Revision 1.94 2002/04/26 05:24:36 hal9
5922 -Add most of Andreas suggestions to Chain of Events section.
5923 -A few other minor corrections and touch up.
5925 Revision 1.92 2002/04/25 18:55:13 hal9
5926 More catchups on new actions files, and new actions names.
5927 Other assorted cleanups, and minor modifications.
5929 Revision 1.91 2002/04/24 02:39:31 hal9
5930 Add 'Chain of Events' section.
5932 Revision 1.90 2002/04/23 21:41:25 hal9
5933 Linuxconf is deprecated on RH, substitute chkconfig.
5935 Revision 1.89 2002/04/23 21:05:28 oes
5936 Added hint for startup on Red Hat
5938 Revision 1.88 2002/04/23 05:37:54 hal9
5939 Add AmigaOS install stuff.
5941 Revision 1.87 2002/04/23 02:53:15 david__schmidt
5942 Updated OSX installation section
5943 Added a few English tweaks here an there
5945 Revision 1.86 2002/04/21 01:46:32 hal9
5946 Re-write actions section.
5948 Revision 1.85 2002/04/18 21:23:23 hal9
5949 Fix ugly typo (mine).
5951 Revision 1.84 2002/04/18 21:17:13 hal9
5952 Spell Redhat correctly (ie Red Hat). A few minor grammar corrections.
5954 Revision 1.83 2002/04/18 18:21:12 oes
5955 Added RPM install detail
5957 Revision 1.82 2002/04/18 12:04:50 oes
5960 Revision 1.81 2002/04/18 11:50:24 oes
5961 Extended Install section - needs fixing by packagers
5963 Revision 1.80 2002/04/18 10:45:19 oes
5964 Moved text to buildsource.sgml, renamed some filters, details
5966 Revision 1.79 2002/04/18 03:18:06 hal9
5967 Spellcheck, and minor touchups.
5969 Revision 1.78 2002/04/17 18:04:16 oes
5972 Revision 1.77 2002/04/17 13:51:23 oes
5973 Proofreading, part one
5975 Revision 1.76 2002/04/16 04:25:51 hal9
5976 -Added 'Note to Upgraders' and re-ordered the 'Quickstart' section.
5977 -Note about proxy may need requests to re-read config files.
5979 Revision 1.75 2002/04/12 02:08:48 david__schmidt
5980 Remove OS/2 building info... it is already in the developer-manual
5982 Revision 1.74 2002/04/11 00:54:38 hal9
5983 Add small section on submitting actions.
5985 Revision 1.73 2002/04/10 18:45:15 swa
5988 Revision 1.72 2002/04/10 04:06:19 hal9
5989 Added actions feedback to Bookmarklets section
5991 Revision 1.71 2002/04/08 22:59:26 hal9
5992 Version update. Spell chkconfig correctly :)
5994 Revision 1.70 2002/04/08 20:53:56 swa
5997 Revision 1.69 2002/04/06 05:07:29 hal9
5998 -Add privoxy-man-page.sgml, for man page.
5999 -Add authors.sgml for AUTHORS (and p-authors.sgml)
6000 -Reworked various aspects of various docs.
6001 -Added additional comments to sub-docs.
6003 Revision 1.68 2002/04/04 18:46:47 swa
6004 consistent look. reuse of copyright, history et. al.
6006 Revision 1.67 2002/04/04 17:27:57 swa
6007 more single file to be included at multiple points. make maintaining easier
6009 Revision 1.66 2002/04/04 06:48:37 hal9
6010 Structural changes to allow for conditional inclusion/exclusion of content
6011 based on entity toggles, e.g. 'entity % p-not-stable "INCLUDE"'. And
6012 definition of internal entities, e.g. 'entity p-version "2.9.13"' that will
6013 eventually be set by Makefile.
6014 More boilerplate text for use across multiple docs.
6016 Revision 1.65 2002/04/03 19:52:07 swa
6017 enhance squid section due to user suggestion
6019 Revision 1.64 2002/04/03 03:53:43 hal9
6020 A few minor bug fixes, and touch ups. Ready for review.
6022 Revision 1.63 2002/04/01 16:24:49 hal9
6023 Define entities to include boilerplate text. See doc/source/*.
6025 Revision 1.62 2002/03/30 04:15:53 hal9
6026 - Fix privoxy.org/config links.
6027 - Paste in Bookmarklets from Toggle page.
6028 - Move Quickstart nearer top, and minor rework.
6030 Revision 1.61 2002/03/29 01:31:08 hal9
6033 Revision 1.60 2002/03/27 01:57:34 hal9
6034 Added more to Anatomy section.
6036 Revision 1.59 2002/03/27 00:54:33 hal9
6037 Touch up intro for new name.
6039 Revision 1.58 2002/03/26 22:29:55 swa
6040 we have a new homepage!
6042 Revision 1.57 2002/03/24 20:33:30 hal9
6043 A few minor catch ups with name change.
6045 Revision 1.56 2002/03/24 16:17:06 swa
6046 configure needs to be generated.
6048 Revision 1.55 2002/03/24 16:08:08 swa
6049 we are too lazy to make a block-built
6050 privoxy logo. hence removed the option.
6052 Revision 1.54 2002/03/24 15:46:20 swa
6053 name change related issue.
6055 Revision 1.53 2002/03/24 11:51:00 swa
6056 name change. changed filenames.
6058 Revision 1.52 2002/03/24 11:01:06 swa
6061 Revision 1.51 2002/03/23 15:13:11 swa
6062 renamed every reference to the old name with foobar.
6063 fixed "application foobar application" tag, fixed
6064 "the foobar" with "foobar". left junkbustser in cvs
6065 comments and remarks to history untouched.
6067 Revision 1.50 2002/03/23 05:06:21 hal9
6070 Revision 1.49 2002/03/21 17:01:05 hal9
6071 New section in Appendix.
6073 Revision 1.48 2002/03/12 06:33:01 hal9
6074 Catching up to Andreas and re_filterfile changes.
6076 Revision 1.47 2002/03/11 13:13:27 swa
6077 correct feedback channels
6079 Revision 1.46 2002/03/10 00:51:08 hal9
6080 Added section on JB internal pages in Appendix.
6082 Revision 1.45 2002/03/09 17:43:53 swa
6085 Revision 1.44 2002/03/09 17:08:48 hal9
6086 New section on Jon's actions file editor, and move some stuff around.
6088 Revision 1.43 2002/03/08 00:47:32 hal9
6089 Added imageblock{pattern}.
6091 Revision 1.42 2002/03/07 18:16:55 swa
6094 Revision 1.41 2002/03/07 16:46:43 hal9
6095 Fix a few markup problems for jade.
6097 Revision 1.40 2002/03/07 16:28:39 swa
6098 provide correct feedback channels
6100 Revision 1.39 2002/03/06 16:19:28 hal9
6101 Note on perceived filtering slowdown per FR.
6103 Revision 1.38 2002/03/05 23:55:14 hal9
6104 Stupid I did it again. Double hyphen in comment breaks jade.
6106 Revision 1.37 2002/03/05 23:53:49 hal9
6107 jade barfs on '- -' embedded in comments. - -user option broke it.
6109 Revision 1.36 2002/03/05 22:53:28 hal9
6110 Add new - - user option.
6112 Revision 1.35 2002/03/05 00:17:27 hal9
6113 Added section on command line options.
6115 Revision 1.34 2002/03/04 19:32:07 oes
6116 Changed default port to 8118
6118 Revision 1.33 2002/03/03 19:46:13 hal9
6119 Emphasis on where/how to report bugs, etc
6121 Revision 1.32 2002/03/03 09:26:06 joergs
6122 AmigaOS changes, config is now loaded from PROGDIR: instead of
6123 AmiTCP:db/junkbuster/ if no configuration file is specified on the
6126 Revision 1.31 2002/03/02 22:45:52 david__schmidt
6129 Revision 1.30 2002/03/02 22:00:14 hal9
6130 Updated 'New Features' list. Ran through spell-checker.
6132 Revision 1.29 2002/03/02 20:34:07 david__schmidt
6133 Update OS/2 build section
6135 Revision 1.28 2002/02/24 14:34:24 jongfoster
6136 Formatting changes. Now changing the doctype to DocBook XML 4.1
6137 will work - no other changes are needed.
6139 Revision 1.27 2002/01/11 14:14:32 hal9
6140 Added a very short section on Templates
6142 Revision 1.26 2002/01/09 20:02:50 hal9
6143 Fix bug re: auto-detect config file changes.
6145 Revision 1.25 2002/01/09 18:20:30 hal9
6146 Touch ups for *.action files.
6148 Revision 1.24 2001/12/02 01:13:42 hal9
6151 Revision 1.23 2001/12/02 00:20:41 hal9
6152 Updates for recent changes.
6154 Revision 1.22 2001/11/05 23:57:51 hal9
6155 Minor update for startup now daemon mode.
6157 Revision 1.21 2001/10/31 21:11:03 hal9
6158 Correct 2 minor errors
6160 Revision 1.18 2001/10/24 18:45:26 hal9
6161 *** empty log message ***
6163 Revision 1.17 2001/10/24 17:10:55 hal9
6164 Catching up with Jon's recent work, and a few other things.
6166 Revision 1.16 2001/10/21 17:19:21 swa
6167 wrong url in documentation
6169 Revision 1.15 2001/10/14 23:46:24 hal9
6170 Various minor changes. Fleshed out SEE ALSO section.
6172 Revision 1.13 2001/10/10 17:28:33 hal9
6175 Revision 1.12 2001/09/28 02:57:04 hal9
6178 Revision 1.11 2001/09/28 02:25:20 hal9
6181 Revision 1.9 2001/09/27 23:50:29 hal9
6182 A few changes. A short section on regular expression in appendix.
6184 Revision 1.8 2001/09/25 00:34:59 hal9
6185 Some additions, and re-arranging.
6187 Revision 1.7 2001/09/24 14:31:36 hal9
6190 Revision 1.6 2001/09/24 14:10:32 hal9
6191 Including David's OS/2 installation instructions.
6193 Revision 1.2 2001/09/13 15:27:40 swa
6196 Revision 1.1 2001/09/12 15:36:41 swa
6197 source files for junkbuster documentation
6199 Revision 1.3 2001/09/10 17:43:59 swa
6200 first proposal of a structure.
6202 Revision 1.2 2001/06/13 14:28:31 swa
6203 docs should have an author.
6205 Revision 1.1 2001/06/13 14:20:37 swa
6206 first import of project's documentation for the webserver.