1 <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook V3.1//EN" [
2 <!entity % dummy "INCLUDE">
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-supp-userman "IGNORE"> <!-- Omit some from supported.sgml -->
21 File : $Source: /cvsroot/ijbswa/current/doc/source/user-manual.sgml,v $
24 This file belongs into
25 ijbswa.sourceforge.net:/home/groups/i/ij/ijbswa/htdocs/
27 $Id: user-manual.sgml,v 1.77 2002/04/17 13:51:23 oes Exp $
29 Written by and Copyright (C) 2001 the SourceForge
30 Privoxy team. http://www.privoxy.org/
32 Based on the Internet Junkbuster originally written
33 by and Copyright (C) 1997 Anonymous Coders and
34 Junkbusters Corporation. http://www.junkbusters.com
37 ========================================================================
38 NOTE: Please read developer-manual/documentation.html before touching
39 anything in this, or other Privoxy documentation.
40 ========================================================================
46 <title>Privoxy User Manual</title>
48 <pubdate>$Id: user-manual.sgml,v 1.77 2002/04/17 13:51:23 oes Exp $</pubdate>
53 <orgname>By: Privoxy Developers</orgname>
62 This is here to keep vim syntax file from breaking :/
63 If I knew enough to fix it, I would.
64 PLEASE DO NOT REMOVE! HB: hal@foobox.net
70 The user manual gives users information on how to install, configure and use
72 url="http://www.privoxy.org/"><application>Privoxy</application></ulink>.
75 <!-- Include privoxy.sgml boilerplate: -->
77 <!-- end privoxy.sgml -->
80 You can find the latest version of the user manual at <ulink
81 url="http://www.privoxy.org/user-manual/">http://www.privoxy.org/user-manual/</ulink>.
82 Please see the <ulink url="contact.html">Contact section</ulink> on how to
83 contact the developers.
87 <!-- Feel free to send a note to the developers at <email>ijbswa-developers@lists.sourceforge.net</email>. -->
93 <!-- ~~~~~ New section ~~~~~ -->
94 <sect1 id="intro" label=""><title></title>
95 <!-- dummy section to force TOC on page by itself -->
96 <!-- DO NOT REMOVE! please ;) -->
100 <!-- ~~~~~ New section ~~~~~ -->
102 <sect1 label="1" id="introduction"><title>Introduction</title>
105 This documentation is included with the current &p-status; version of
106 <application>Privoxy</application>, v.&p-version;<![%p-not-stable;[,
107 and is mostly complete at this point. The most up to date reference for the
108 time being is still the comments in the source files and in the individual
109 configuration files. Development of version 3.0 is currently nearing
110 completion, and includes many significant changes and enhancements over
111 earlier versions. The target release date for
112 stable v3.0 is <quote>soon</quote> ;-)]]>.
116 <!-- include only in non-stable versions -->
118 Since this is a &p-status; version, not all new features are well tested. This
119 documentation may be slightly out of sync as a result (especially with
120 CVS sources). And there <emphasis>may be</emphasis> bugs, though hopefully
125 <!-- ~~~~~ New section ~~~~~ -->
126 <sect2 id="newfeatures">
127 <title>New Features</title>
129 In addition to <application>Internet Junkbuster's</application> traditional
130 feature of ad and banner blocking and cookie management,
131 <application>Privoxy</application> provides new features<![%p-not-stable;[,
132 some of them currently under development]]>:
133 <anchor id="testing"/>
136 <!-- Include newfeatures.sgml boilerplate here: -->
138 <!-- end boilerplate -->
143 <!-- ~ End section ~ -->
146 <!-- ~~~~~ New section ~~~~~ -->
147 <sect1 id="installation"><title>Installation</title>
149 <application>Privoxy</application> is available both in convenient pre-compiled
150 packages for a wide range of operating systems, and as raw source code.
151 For most users, we recommend using the packages, which can be downloaded from our
152 <ulink url="http://sourceforge.net/projects/ijbswa/">Privoxy Project Page</ulink>.
155 If you like to live on the bleeding edge and are not afraid of using
156 possibly unstable development versions, you can check out the up-to-the-minute
157 version directly from <ulink url="http://sourceforge.net/cvs/?group_id=11118">the
158 CVS repository</ulink> or simply download <ulink
159 url="http://cvs.sourceforge.net/cvstarballs/ijbswa-cvsroot.tar.gz">the nightly CVS
163 <!-- Include supported.sgml boilerplate -->
165 <!-- end boilerplate -->
167 <!-- ~~~~~ New section ~~~~~ -->
168 <sect2 id="installation-packages"><title>Binary Packages</title>
170 The packages can be downloaded from our <ulink
171 url="http://sourceforge.net/projects/ijbswa/">Privoxy Project Page</ulink>.
175 How to install them depends on your operating system:
178 <!-- ~~~~~ New section ~~~~~ -->
179 <sect3 id="installation-pack-rpm"><title>Redhat and SuSE RPMs</title>
182 RPMs can be installed with <literal>rpm -i <name-of-rpm.rpm></literal>,
183 and will use <filename>/etc/privoxy</filename> for configuration files.
187 Note that if you have a Junkbuster RPM installed on your system, you
188 need to remove it first, because the packages conflict.
192 <!-- ~~~~~ New section ~~~~~ -->
193 <sect3 id="installation-pack-bintgz"><title>Solaris, NetBSD, HP-UX</title>
196 Create a new directory, <literal>cd</literal> to it, then unzip and
197 untar the archive. For the most part, you'll have to figure out where
202 <!-- ~~~~~ New section ~~~~~ -->
203 <sect3 id="installation-pack-win"><title>Windows</title>
206 Just double-click the installer, which will guide you through
207 the installation process.
211 <!-- ~~~~~ New section ~~~~~ -->
212 <sect3 id="installation-os2"><title>OS/2</title>
215 Just double-click the WarpIN self-installing archive, which will guide
216 you through the installation process. A shadow of the
217 <application>Privoxy</application> executable will be placed in your
218 startup folder so it will start automatically whenever OS/2 starts.
222 The directory you choose to install <application>Privoxy</application>
223 into will contain all of the configuration files.
227 <!-- ~~~~~ New section ~~~~~ -->
228 <sect3 id="installation-deb"><title>Debian</title>
234 <!-- ~~~~~ New section ~~~~~ -->
235 <sect3 id="installation-amiga"><title>AmigaOS</title>
237 Unpack the <literal>.lha</literal> archive, then FIXME.
242 <!-- ~~~~~ New section ~~~~~ -->
243 <sect2 id="installation-source"><title>Building from Source</title>
245 <!-- include buildsource.sgml boilerplate: -->
247 <!-- end boilerplate -->
250 For more detailed instructions, on how to build Redhat and SuSE RPMs,
251 Windows self-extracting installers etc, please consult the <ulink
252 url="../developer-manual/newrelease.html">developer manual</ulink>.
258 <!-- ~ End section ~ -->
261 <!-- ~~~~~ New section ~~~~~ -->
263 <sect1 id="quickstart"><title>Quickstart to Using <application>Privoxy</application></title>
266 <!-- ~~~~~ New section ~~~~~ -->
267 <sect2 id="upgradersnote">
268 <title>Note to Upgraders</title>
270 There are very significant changes from older versions of
271 <application>Junkbuster</application> to the current
272 <application>Privoxy</application>. Configuration is substantially
273 changed. <application>Junkbuster 2.0.x</application> and earlier
274 configuration files will not migrate. The functionality of the old
275 <filename>blockfile</filename>, <filename>cookiefile</filename> and
276 <filename>imagelist</filename>, are now combined into the
277 <quote>actions file</quote> (<filename>default.action</filename>
278 for most installations).
281 A <quote>filter file</quote> (typically <filename>default.filter</filename>)
282 is new with <application>Privoxy 2.9.x</application>, and provides some
283 of the new sophisticaton (explained below). <filename>config</filename> is
284 much the same as before.
287 If upgrading from a 2.0.x version, you will have to use the new config
288 files, and possibly adapt any personal rules from your older files.
289 When porting personal rules over from the old <filename>blockfile</filename>
290 to the new actions file, please note that even the pattern syntax has
292 If upgrading from 2.9.x development versions, it is still recommended
293 to use the new configuration files.
296 A quick list of things to be aware of before upgrading:
304 The default listening port is now 8118 due to a conflict with another
310 Some installers may remove earlier versions completely. Save any
311 important configuration files!
316 <application>Privoxy</application> is controllable with a web browser
317 at the special URL: <ulink
318 url="http://config.privoxy.org/">http://config.privoxy.org/</ulink>
319 (Shortcut: <ulink url="http://p.p/">http://p.p/</ulink>). Many
320 aspects of configuration can be done here, including temporarily disabling
321 <application>Privoxy</application>.
326 The primary configuration file for cookie management, ad and banner
327 blocking, and many other aspects of <application>Privoxy</application>
328 configuration is <filename>default.action</filename>. It is strongly
329 recommended to make oneself familiar with the new actions concept below
330 before modifying that file.
335 <!-- I think it is best to keep this somewhat vague, in case -->
336 <!-- the situation changes under our feet. -->
337 Some installers may not automatically start
338 <application>Privoxy</application> after installation.
347 <!-- ~~~~~ New section ~~~~~ -->
349 <title>Starting <application>Privoxy</application></title>
351 Before launching <application>Privoxy</application> for the first time, you
352 will want to configure your browser(s) to use <application>Privoxy</application>
353 as a HTTP and HTTPS proxy. The default is localhost for the proxy address,
354 and port 8118 (earlier versions used port 8000). This is the one required
355 configuration that must be done!
359 With <application>Netscape</application> (and
360 <application>Mozilla</application>), this can be set under <literal>Edit
361 -> Preferences -> Advanced -> Proxies -> HTTP Proxy</literal>.
362 For <application>Internet Explorer</application>: <literal>Tools ->
363 Internet Properties -> Connections -> LAN Setting</literal>. Then,
364 check <quote>Use Proxy</quote> and fill in the appropriate info (Address:
365 localhost, Port: 8118). Include if HTTPS proxy support too.
369 After doing this, flush your browser's disk and memory caches to force a
370 re-reading of all pages and get rid of any ads that may be cached. You
371 are now ready to start enjoying the benefits of using
372 <application>Privoxy</application>.
377 <application>Privoxy</application> is typically started by specifying the
378 main configuration file to be used on the command line. Example Unix startup
385 # /usr/sbin/privoxy /etc/privoxy/config
391 An init script is provided for SuSE and Redhat.
395 For for SuSE: <command>rcprivoxy start</command>
399 For RedHat: <command>/etc/rc.d/init.d/privoxy start</command>
404 If no configuration file is specified on the command line,
405 <application>Privoxy</application> will look for a file named
406 <filename>config</filename> in the current directory. Except on Win32 where
407 it will try <filename>config.txt</filename>. If no file is specified on the
408 command line and no default configuration file can be found,
409 <application>Privoxy</application> will fail to start.
414 The included default configuration files should give a reasonable starting
415 point. Most of the per site configuration is done in the
416 <quote>actions</quote> files. These are where various cookie actions are
417 defined, ad and banner blocking, and other aspects of
418 <application>Privoxy</application> configuration. There are several such
419 files included, with varying levels of aggressiveness.
423 You will probably want to keep an eye out for sites that require persistent
424 cookies, and add these to <filename>default.action</filename> as needed. By
425 default, most of these will be accepted only during the current browser
426 session (aka <quote>session cookies</quote>), until you add them to the
427 configuration. If you want the browser to handle this instead, you will need
428 to edit <filename>default.action</filename> and disable this feature. If you
429 use more than one browser, it would make more sense to let
430 <application>Privoxy</application> handle this. In which case, the
431 browser(s) should be set to accept all cookies.
435 Another feature where you will propably want to define exceptions for trusted
436 sites is the popup-killing (through the <literal>+popup</literal> and
437 <literal>+filter{popups}</literal> actions), because your favourite shopping,
438 banking, or leisure site may need popups.
442 <application>Privoxy</application> is HTTP/1.1 compliant, but not all of
443 the optional 1.1 features are as yet supported. In the unlikely event that
444 you experience inexplicable problems with browsers that use HTTP/1.1 per default
445 (like <application>Mozilla</application> or recent versions of I.E.), you might
446 try to force HTTP/1.0 compatibility. For Mozilla, look under <literal>Edit ->
447 Preferences -> Debug -> Networking</literal>.
448 Alternatively, set the <quote>+downgrade</quote> config option in
449 <filename>default.action</filename> which will downgrade you brower's HTTP
450 requests from HTTP/1.1 to HTTP/1.0 before processing them.
454 After running <application>Privoxy</application> for a while, you can
455 start to fine tune the configuration to suit your personal, or site,
456 preferences and requirements. There are many, many aspects that can
457 be customized. <quote>Actions</quote> (as specified in <filename>default.action</filename>)
458 can be adjusted by pointing your browser to
459 <ulink url="http://config.privoxy.org/">http://config.privoxy.org/</ulink>
460 (shortcut: <ulink url="http://p.p/">http://p.p/</ulink>),
461 and then follow the link to <quote>edit the actions list</quote>.
462 (This is an internal page and does not require Internet access.)
466 In fact, various aspects of <application>Privoxy</application>
467 configuration can be viewed from this page, including
468 current configuration parameters, source code version numbers,
469 the browser's request headers, and <quote>actions</quote> that apply
470 to a given URL. In addition to the <filename>default.action</filename> file
471 editor mentioned above, <application>Privoxy</application> can also
472 be turned <quote>on</quote> and <quote>off</quote> (toggled) from this page.
476 If you encounter problems, try loading the page without
477 <application>Privoxy</application>. If that helps, enter the URL where
478 you have the problems into <ulink url="http://p.p/show-url-info">the browser
479 based rule tracing utility</ulink>. Watch out which rules apply and why, and
480 then try turning them off for that site one after the other, until the problem
481 is gone. When you have found the culprit, you might want to turn the rest on
486 If the above paragraph sounds gibberish to you, you might want to <ulink
487 url="configuration.html#ACTIONSFILE">read more about the actions concept</ulink>
488 or even dive deep into the <ulink url="appendix.html#ACTIONSANAT">Appendix
493 If you can't get rid of the problem at all, think you've found a bug in
494 Privoxy, want to propose a new feature or smarter rules, please see the
495 chapter "Contacting the Developers, .." below.
501 <!-- ~~~~~ New section ~~~~~ -->
503 <title>Command Line Options</title>
505 <application>Privoxy</application> may be invoked with the following
506 command-line options:
514 <emphasis>--version</emphasis>
517 Print version info and exit, Unix only.
522 <emphasis>--help</emphasis>
525 Print a short usage info and exit, Unix only.
530 <emphasis>--no-daemon</emphasis>
533 Don't become a daemon, i.e. don't fork and become process group
534 leader, don't detach from controlling tty. Unix only.
539 <emphasis>--pidfile FILE</emphasis>
543 On startup, write the process ID to <emphasis>FILE</emphasis>. Delete the
544 <emphasis>FILE</emphasis> on exit. Failiure to create or delete the
545 <emphasis>FILE</emphasis> is non-fatal. If no <emphasis>FILE</emphasis>
546 option is given, no PID file will be used. Unix only.
551 <emphasis>--user USER[.GROUP]</emphasis>
555 After (optionally) writing the PID file, assume the user ID of
556 <emphasis>USER</emphasis>, and if included the GID of GROUP. Exit if the
557 privileges are not sufficient to do so. Unix only.
562 <emphasis>configfile</emphasis>
565 If no <emphasis>configfile</emphasis> is included on the command line,
566 <application>Privoxy</application> will look for a file named
567 <quote>config</quote> in the current directory (except on Win32
568 where it will look for <quote>config.txt</quote> instead). Specify
569 full path to avoid confusion.
580 <!-- ~ End section ~ -->
583 <!-- ~~~~~ New section ~~~~~ -->
584 <sect1 id="configuration"><title><application>Privoxy</application> Configuration</title>
586 All <application>Privoxy</application> configuration is stored
587 in text files. These files can be edited with a text editor.
588 Many important aspects of <application>Privoxy</application> can
589 also be controlled easily with a web browser.
594 <!-- ~~~~~ New section ~~~~~ -->
597 <title>Controlling <application>Privoxy</application> with Your Web Browser</title>
599 <application>Privoxy</application>'s user interface can be reached through the special
600 URL <ulink url="http://config.privoxy.org/">http://config.privoxy.org/</ulink>
601 (shortcut: <ulink url="http://p.p/">http://p.p/</ulink>),
602 which is a built-in page and works without internet access.
603 You will see the following section:
610 Please choose from the following options:
613 * Show information about the current configuration
614 * Show the source code version numbers
615 * Show the request headers.
616 * Show which actions apply to a URL and why
617 * Toggle Privoxy on or off
618 * Edit the actions list
624 This should be self-explanatory. Note the last item is an editor for the
625 <quote>actions list</quote>, which is where much of the ad, banner, cookie,
626 and URL blocking magic is configured as well as other advanced features of
627 <application>Privoxy</application>. This is an easy way to adjust various
628 aspects of <application>Privoxy</application> configuration. The actions
629 file, and other configuration files, are explained in detail below.
633 <quote>Toggle Privoxy On or Off</quote> is handy for sites that might
634 have problems with your current actions and filters. You can in fact use
635 it as a test to see whether it is <application>Privoxy</application>
636 causing the problem or not. <application>Privoxy</application> continues
637 to run as a proxy in this case, but all filtering is disabled. There
638 is even a toggle Bookmarklet offered, so that you can toggle
639 <application>Privoxy</application> with one click from your browser.
645 <!-- ~ End section ~ -->
650 <!-- ~~~~~ New section ~~~~~ -->
653 <title>Configuration Files Overview</title>
655 For Unix, *BSD and Linux, all configuration files are located in
656 <filename>/etc/privoxy/</filename> by default. For MS Windows, OS/2, and
657 AmigaOS these are all in the same directory as the
658 <application>Privoxy</application> executable. <![%p-not-stable;[ The name
659 and number of configuration files has changed from previous versions, and is
660 subject to change as development progresses.]]>
664 The installed defaults provide a reasonable starting point, though possibly
665 aggressive by some standards. For the time being, there are only three
666 default configuration files (this may change in time):
674 The main configuration file is named <filename>config</filename>
675 on Linux, Unix, BSD, OS/2, and AmigaOS and <filename>config.txt</filename>
682 <filename>default.action</filename> (the actions file) is used to define
683 which of a set of various <quote>actions</quote> relating to images, banners,
684 pop-ups, access restrictions, banners and cookies are to be applied where.
685 There is a web based editor for this file that can be accessed at <ulink
686 url="http://config.privoxy.org/edit-actions/">http://config.privoxy.org/edit-actions/</ulink>
687 (Shortcut: <ulink url="http://p.p/edit-actions/">http://p.p/edit-actions/</ulink>).
688 (Other actions files are included as well with differing levels of filtering
689 and blocking, e.g. <filename>basic.action</filename>.)
695 <filename>default.filter</filename> (the filter file) can be used to re-write the raw
696 page content, including viewable text as well as embedded HTML and JavaScript,
697 and whatever else lurks on any given web page. The filtering jobs are only
698 pre-defined here; whether to apply them or not is up to the actions file.
706 All files use the <quote><literal>#</literal></quote> character to denote a
707 comment (the rest of the line will be ignored) and understand line continuation
708 through placing a backslash ("<literal>\</literal>") as the very last character
709 in a line. If the <literal>#</literal> is preceded by a backslash, it looses
710 its special function. Placing a <literal>#</literal> in front of an otherwise
711 valid configuration line to prevent it from being interpreted is called "commenting
716 <filename>default.action</filename> and <filename>default.filter</filename>
717 can use Perl style regular expressions for maximum flexibility.
721 After making any changes, there is no need to restart
722 <application>Privoxy</application> in order for the changes to take
723 effect. <application>Privoxy</application> detects such changes
724 automatically. Note, however, that it may take one or two additional
725 requests for the change to take effect. When changing the listening address
726 of <application>Privoxy</application>, these <quote>wake up</quote> requests
727 must obviously be sent to the <emphasis>old</emphasis> listening address.
732 While under development, the configuration content is subject to change.
733 The below documentation may not be accurate by the time you read this.
734 Also, what constitutes a <quote>default</quote> setting, may change, so
735 please check all your configuration files on important issues.
741 <!-- ~~~~~ New section ~~~~~ -->
744 <title>The Main Configuration File</title>
746 Again, the main configuration file is named <filename>config</filename> on
747 Linux/Unix/BSD and OS/2, and <filename>config.txt</filename> on Windows.
748 Configuration lines consist of an initial keyword followed by a list of
749 values, all separated by whitespace (any number of spaces or tabs). For
757 <emphasis>confdir /etc/privoxy</emphasis>
764 Assigns the value <literal>/etc/privoxy</literal> to the option
765 <literal>confdir</literal> and thus indicates that the configuration
766 directory is named <quote>/etc/privoxy/</quote>.
770 All options in the config file except for <literal>confdir</literal> and
771 <literal>logdir</literal> are optional. Watch out in the below description
772 for what happens if you leave them unset.
776 The main config file controls all aspects of <application>Privoxy</application>'s
777 operation that are not location dependent (i.e. that apply invariantly no matter
778 where in the web you are surfing).
782 <!-- ~~~~~ New section ~~~~~ -->
785 <title>Configuration and Log File Locations</title>
788 <application>Privoxy</application> can (and normally does) use a number of
789 other files for addidtional configuration and logging.
790 This section of the configuration file tells <application>Privoxy</application>
791 where to find those other files.
795 <sect4><title>confdir</title>
799 <term>Specifies:</term>
801 <para>The directory where the other configuration files are located</para>
805 <term>Type of value:</term>
807 <para>Path name</para>
811 <term>Default value:</term>
813 <para>/etc/privoxy (Unix) <emphasis>or</emphasis> <application>Privoxy</application> installation dir (Windows) </para>
817 <term>Effect if unset:</term>
819 <para><emphasis>Mandatory</emphasis></para>
826 No trailing <quote><literal>/</literal></quote>, please
829 When development goes modular and multi-user, the blocker, filter, and
830 per-user config will be stored in subdirectories of <quote>confdir</quote>.
831 For now, the configuration dir structure is flat, except for
832 <filename>confdir/templates</filename>, where the HTML templates for CGI
841 <sect4><title>logdir</title>
845 <term>Specifies:</term>
848 The directory where all logging takes place (i.e. where <filename>logfile</filename> and
849 <filename>jarfile</filename> are located)
854 <term>Type of value:</term>
856 <para>Path name</para>
860 <term>Default value:</term>
862 <para>/var/log/privoxy (Unix) <emphasis>or</emphasis> <application>Privoxy</application> installation dir (Windows) </para>
866 <term>Effect if unset:</term>
868 <para><emphasis>Mandatory</emphasis></para>
875 No trailing <quote><literal>/</literal></quote>, please
882 <sect4><title>actionsfile</title>
886 <term>Specifies:</term>
889 The actions file to use
894 <term>Type of value:</term>
896 <para>File name, relative to <literal>confdir</literal></para>
900 <term>Default value:</term>
902 <para>default.action (Unix) <emphasis>or</emphasis> default.action.txt (Windows)</para>
906 <term>Effect if unset:</term>
909 No action is taken at all. Simple neutral proxying.
917 There is no point in using <application>Privoxy</application> without
925 <sect4><title>actionsfile</title>
929 <term>Specifies:</term>
932 The actions file to use
937 <term>Type of value:</term>
939 <para>File name, relative to <literal>confdir</literal></para>
943 <term>Default value:</term>
945 <para>default.action (Unix) <emphasis>or</emphasis> default.action.txt (Windows)</para>
949 <term>Effect if unset:</term>
952 No action is taken at all. Simple neutral proxying.
960 There is no point in using <application>Privoxy</application> without
961 an actions file. There are three diffrent actions files included in the
962 distribution, with varying degrees of aggressiveness:
963 <filename>default.action</filename>, <filename>intermediate.action</filename> and
964 <filename>advanced.action</filename>.
971 <sect4><title>filterfile</title>
975 <term>Specifies:</term>
978 The filter file to use
983 <term>Type of value:</term>
985 <para>File name, relative to <literal>confdir</literal></para>
989 <term>Default value:</term>
991 <para>default.filter (Unix) <emphasis>or</emphasis> default.filter.txt (Windows)</para>
995 <term>Effect if unset:</term>
998 No textual content filtering takes place, i.e. all
999 <literal>+filter{<replaceable class="parameter">name</replaceable>}</literal>
1000 actions in the actions file are turned off
1008 The <quote>default.filter</quote> file contains content modification rules
1009 that use <quote>regular expressions</quote>. These rules permit powerful
1010 changes on the content of Web pages, e.g., you could disable your favorite
1011 JavaScript annoyances, re-write the actual displayed text, or just have some
1012 fun replacing <quote>Microsoft</quote> with <quote>MicroSuck</quote> wherever
1013 it appears on a Web page.
1020 <sect4><title>logfile</title>
1024 <term>Specifies:</term>
1032 <term>Type of value:</term>
1034 <para>File name, relative to <literal>logdir</literal></para>
1038 <term>Default value:</term>
1040 <para>logfile (Unix) <emphasis>or</emphasis> privoxy.log (Windows)</para>
1044 <term>Effect if unset:</term>
1047 No log file is used, all log messages go to the console (<literal>stderr</literal>).
1055 The windows version will additionally log to the console
1058 The logfile is where all logging and error messages are written. The level
1059 of detail and number of messages are set with the <literal>debug</literal>
1060 option (see below). The logfile can be useful for tracking down a problem with
1061 <application>Privoxy</application> (e.g., it's not blocking an ad you
1062 think it should block) but in most cases you probably will never look at it.
1065 Your logfile will grow indefinitely, and you will probably want to
1066 periodically remove it. On Unix systems, you can do this with a cron job
1067 (see <quote>man cron</quote>). For Redhat, a <command>logrotate</command>
1068 script has been included.
1071 On SuSE Linux systems, you can place a line like <quote>/var/log/privoxy.*
1072 +1024k 644 nobody.nogroup</quote> in <filename>/etc/logfiles</filename>, with
1073 the effect that cron.daily will automatically archive, gzip, and empty the
1074 log, when it exceeds 1M size.
1081 <sect4><title>jarfile</title>
1085 <term>Specifies:</term>
1088 The file to store intercepted cookies in
1093 <term>Type of value:</term>
1095 <para>File name, relative to <literal>logdir</literal></para>
1099 <term>Default value:</term>
1101 <para>jarfile (Unix) <emphasis>or</emphasis> privoxy.jar (Windows)</para>
1105 <term>Effect if unset:</term>
1108 Intercepted cookies are not stored at all.
1116 The jarfile may grow to ridiculous sizes over time.
1123 <sect4><title>trustfile</title>
1127 <term>Specifies:</term>
1130 The trust file to use
1135 <term>Type of value:</term>
1137 <para>File name, relative to <literal>confdir</literal></para>
1141 <term>Default value:</term>
1143 <para><emphasis>Unset (commented out)</emphasis>. When activated: trust (Unix) <emphasis>or</emphasis> trust.txt (Windows)</para>
1147 <term>Effect if unset:</term>
1150 The whole trust mechansim is turned off.
1158 The trust mechansim is an experimental feature for building whitelists and should
1159 be used with care. It is <emphasis>NOT</emphasis> recommended for the casual user.
1162 If you specify a trust file, <application>Privoxy</application> will only allow
1163 access to sites that are named in the trustfile.
1164 You can also mark sites as trusted referrers (with <literal>+</literal>), with
1165 the effect that access to untrusted sites will be granted, if a link from a
1166 trusted referrer was used.
1167 The link target will then be added to the <quote>trustfile</quote>.
1168 Possible applications include limiting internet access for children.
1171 If you use <literal>+</literal> operator in the trust file, it may grow considerably over time.
1180 <!-- ~ End section ~ -->
1184 <!-- ~~~~~ New section ~~~~~ -->
1187 <title>Local Setup Documentation</title>
1190 If you intend to operate <application>Privoxy</application> for more users
1191 that just yourself, it might be a good idea to let them know how to reach
1192 you, what you block and why you do that, your policies etc.
1195 <sect4><title>trust-info-url</title>
1199 <term>Specifies:</term>
1202 A URL to be displayed in the error page that users will see if access to an untrusted page is denied.
1207 <term>Type of value:</term>
1213 <term>Default value:</term>
1215 <para>Two example URL are provided</para>
1219 <term>Effect if unset:</term>
1222 No links are displayed on the "untrusted" error page.
1230 The value of this option only matters if the experimental trust mechanism has been
1231 activated. (See <literal>trustfile</literal> above.)
1234 If you use the trust mechanism, it is a good idea to write up some online
1235 documentation about your trust policy and to specify the URL(s) here.
1236 Use multiple times for multiple URLs.
1239 The URL(s) should be added to the trustfile as well, so users don't end up
1240 locked out from the information on why they were locked out in the first place!
1247 <sect4><title>admin-address</title>
1251 <term>Specifies:</term>
1254 An email address to reach the proxy administrator.
1259 <term>Type of value:</term>
1261 <para>Email address</para>
1265 <term>Default value:</term>
1267 <para><emphasis>Unset</emphasis></para>
1271 <term>Effect if unset:</term>
1274 No email address is displayed on error pages and the CGI user interface.
1282 If both <literal>admin-address</literal> and <literal>proxy-info-url</literal>
1283 are unset, the whole "Local Privoxy Support" box on all generated pages will
1291 <sect4><title>proxy-info-url</title>
1295 <term>Specifies:</term>
1298 A URL to documentation about the local <application>Privoxy</application> setup,
1299 configuration or policies.
1304 <term>Type of value:</term>
1310 <term>Default value:</term>
1312 <para><emphasis>Unset</emphasis></para>
1316 <term>Effect if unset:</term>
1319 No link to local documentation is displayed on error pages and the CGI user interface.
1327 If both <literal>admin-address</literal> and <literal>proxy-info-url</literal>
1328 are unset, the whole "Local Privoxy Support" box on all generated pages will
1332 This URL shouldn't be blocked ;-)
1340 <!-- ~ End section ~ -->
1342 <!-- ~~~~~ New section ~~~~~ -->
1345 <title>Debugging</title>
1348 These options are mainly useful when tracing a problem.
1349 Note that you might also want to invoke
1350 <application>Privoxy</application> with the <literal>--no-daemon</literal>
1351 command line option when debugging.
1354 <sect4><title>debug</title>
1358 <term>Specifies:</term>
1361 Keys that determine what information gets logged.
1366 <term>Type of value:</term>
1368 <para>Integer values</para>
1372 <term>Default value:</term>
1374 <para>12289 (i.e.: URLs plus informational and warning messages)</para>
1378 <term>Effect if unset:</term>
1381 Nothing gets logged.
1389 The available debug levels are:
1393 debug 1 # show each GET/POST/CONNECT request
1394 debug 2 # show each connection status
1395 debug 4 # show I/O status
1396 debug 8 # show header parsing
1397 debug 16 # log all data into the logfile
1398 debug 32 # debug force feature
1399 debug 64 # debug regular expression filter
1400 debug 128 # debug fast redirects
1401 debug 256 # debug GIF de-animation
1402 debug 512 # Common Log Format
1403 debug 1024 # debug kill pop-ups
1404 debug 4096 # Startup banner and warnings.
1405 debug 8192 # Non-fatal errors
1409 To select multiple debug levels, you can either add them or use
1410 multiple <literal>debug</literal> lines.
1413 A debug level of 1 is informative because it will show you each request
1414 as it happens. <emphasis>1, 4096 and 8192 are highly recommended</emphasis>
1415 so that you will notice when things go wrong. The other levels are probably
1416 only of interest if you are hunting down a specific problem. They can produce
1417 a hell of output (especially 16).
1420 The reporting of <emphasis>fatal</emphasis> errors (i.e. ones which crash
1421 <application>Privoxy</application>) is always on and cannot be disabled.
1424 If you want to use CLF (Common Log Format), you should set <quote>debug
1425 512</quote> <emphasis>ONLY</emphasis> and not enable anything else.
1432 <sect4><title>single-threaded</title>
1436 <term>Specifies:</term>
1439 Whether to run only one server thread
1444 <term>Type of value:</term>
1446 <para><emphasis>None</emphasis></para>
1450 <term>Default value:</term>
1452 <para><emphasis>Unset</emphasis></para>
1456 <term>Effect if unset:</term>
1459 Multi-threaded (or, where unavailable: forked) operation, i.e. the ability to
1460 serve multiple requests simultaneously.
1468 This option is only there for debug purposes and you should never
1469 need to use it. <emphasis>It will drastically reduce performance.</emphasis>
1478 <!-- ~~~~~ New section ~~~~~ -->
1481 <title>Access Control and Security</title>
1484 This section of the config file controls the security-relevant aspects
1485 of <application>Privoxy</application>'s configuration.
1488 <sect4><title>listen-address</title>
1492 <term>Specifies:</term>
1495 The IP address and TCP port on which <application>Privoxy</application> will
1496 listen for client requests.
1501 <term>Type of value:</term>
1503 <para>[<replaceable class="parameter">IP-Adddress</replaceable>]:<replaceable class="parameter">Port</replaceable></para>
1507 <term>Default value:</term>
1509 <para>localhost:8118</para>
1513 <term>Effect if unset:</term>
1516 Bind to localhost (127.0.0.1), port 8118. This is suitable and recommended for
1517 home users who run <application>Privoxy</application> on the same machine as
1526 You will need to configure your browser(s) to this proxy address and port.
1529 If you already have another service running on port 8118, or if you want to
1530 serve requests from other machines (e.g. on your local network) as well, you
1531 will need to override the default.
1534 If you leave out the IP address, <application>Privoxy</application> will
1535 bind to all interfaces (addresses) on your machine and may become reachable
1536 from the Internet. In that case, consider using access control lists (acl's)
1537 (see <quote>Acls</quote> below), or a firewall.
1542 <term>Example:</term>
1545 Suppose you are running <application>Privoxy</application> on
1546 a machine which has the address 192.168.0.1 on your local private network
1547 (192.168.0.0) and has another outside connection with a different address.
1548 You want it to serve requests from inside only:
1552 listen-address 192.168.0.1:8118
1560 <sect4><title>toggle</title>
1564 <term>Specifies:</term>
1567 Initial state of "toggle" status
1572 <term>Type of value:</term>
1578 <term>Default value:</term>
1584 <term>Effect if unset:</term>
1587 Act as if toggled on
1595 If set to 0, <application>Privoxy</application> will start in
1596 <quote>toggled off</quote> mode, i.e. behave like a normal, content-neutral
1597 proxy. See <literal>enable-remote-toggle</literal>
1598 below. This is not really useful anymore, since toggling is much easier
1599 via <ulink url="http://config.privoxy.org/toggle">the web
1600 interface</ulink> then via editing the <filename>conf</filename> file.
1603 The windows version will only display the toggle icon in the system tray
1604 if this option is present.
1612 <sect4><title>enable-remote-toggle</title>
1615 <term>Specifies:</term>
1618 Whether or not the <ulink url="http://config.privoxy.org/toggle">web-based toggle
1619 feature</ulink> may be used
1624 <term>Type of value:</term>
1630 <term>Default value:</term>
1636 <term>Effect if unset:</term>
1639 The web-based toggle feature is disabled.
1647 When toggled off, <application>Privoxy</application> acts like a normal,
1648 content-neutral proxy, i.e. it acts as if none of the actions applied to
1652 For the time being, access to the toggle feature can <emphasis>not</emphasis> be
1653 controlled separately by <quote>Acls</quote> or HTTP authentication,
1654 so that everybody who can access <application>Privoxy</application> (see
1655 <quote>Acls</quote> and <literal>listen-address</literal> above) can
1656 toggle it for all users. So this option is <emphasis>not recommended</emphasis>
1657 for multi-user environments with untrusted users.
1660 Note that you must have compiled <application>Privoxy</application> with
1661 support for this feature, otherwise this option has no effect.
1669 <sect4><title>enable-edit-actions</title>
1672 <term>Specifies:</term>
1675 Whether or not the <ulink url="http://config.privoxy.org/edit-actions">web-based actions
1676 file editor</ulink> may be used
1681 <term>Type of value:</term>
1687 <term>Default value:</term>
1693 <term>Effect if unset:</term>
1696 The web-based actions file editor is disabled.
1704 For the time being, access to the editor can <emphasis>not</emphasis> be
1705 controlled separately by <quote>Acls</quote> or HTTP authentication,
1706 so that everybody who can access <application>Privoxy</application> (see
1707 <quote>Acls</quote> and <literal>listen-address</literal> above) can
1708 modify its configuration for all users. So this option is <emphasis>not
1709 recommended</emphasis> for multi-user environments with untrusted users.
1712 Note that you must have compiled <application>Privoxy</application> with
1713 support for this feature, otherwise this option has no effect.
1720 <sect4><title>Acls: permit-access and deny-access</title>
1723 <term>Specifies:</term>
1726 Who can access what.
1731 <term>Type of value:</term>
1734 <replaceable class="parameter">src_addr</replaceable>[/<replaceable class="parameter">src_masklen</replaceable>]
1735 [<replaceable class="parameter">dst_addr</replaceable>[/<replaceable class="parameter">dst_masklen</replaceable>]]
1738 Where <replaceable class="parameter">src_addr</replaceable> and
1739 <replaceable class="parameter">dst_addr</replaceable> are IP addresses in dotted decimal notation or valid
1740 DNS names, and <replaceable class="parameter">src_masklen</replaceable> and
1741 <replaceable class="parameter">dst_masklen</replaceable> are subnet masks in CIDR notation, i.e. integer
1742 values from 2 to 30 representing the length (in bits) of the network address. The masks and the whole
1743 destination part are optional.
1748 <term>Default value:</term>
1750 <para><emphasis>Unset</emphasis></para>
1754 <term>Effect if unset:</term>
1757 Don't restrict access further than implied by <literal>listen-address</literal>
1765 Access controls are included at the request of ISPs and systems
1766 administrators, and <emphasis>are not usually needed by individual users</emphasis>.
1767 For a typical home user, it will normally suffice to ensure that
1768 <application>Privoxy</application> only listens on the localhost or internal (home)
1769 network address by means of the <literal>listen-address</literal> option.
1772 Please see the warnings in the FAQ that this proxy is not intended to be a substitute
1773 for a firewall or to encourage anyone to defer addressing basic security
1777 Multiple acl lines are OK.
1778 If any acls are specified, then the <application>Privoxy</application>
1779 talks only to IP addresses that match at least one <literal>permit-access</literal> line
1780 and don't match any subsequent <literal>deny-access</literal> line. In other words, the
1781 last match wins, with the default being <literal>deny-access</literal>.
1784 If <application>Privoxy</application> is using a forwarder (see <literal>forward</literal> below)
1785 for a particular destination URL, the <replaceable class="parameter">dst_addr</replaceable>
1786 that is examined is the address of the forwarder and <emphasis>NOT</emphasis> the address
1787 of the ultimate target. This is necessary because it may be impossible for the local
1788 <application>Privoxy</application> to determine the IP address of the
1789 ultimate target (that's often what gateways are used for).
1792 You should prefer using IP addresses over DNS names, because the address lookups take
1793 time. All DNS names must resolve! You can <emphasis>not</emphasis> use domain patterns
1794 like <quote>*.org</quote> or partial domain names. If a DNS name resolves to multiple
1795 IP addresses, only the first one is used.
1798 Denying access to particular sites by acl may have undesired side effects
1799 if the site in question is hosted on a machine which also hosts other sites.
1804 <term>Examples:</term>
1807 Explicitly define the defauklt behaviour if no acl and
1808 <literal>listen-address</literal> are set: <quote>localhost</quote>
1809 is OK. The absence of a <replaceable class="parameter">dst_addr</replaceable> implies that
1810 <emphasis>all</emphasis> destination addresses are OK:
1814 permit-access localhost
1818 Allow any host on the same class C subnet as www.privoxy.org access to
1819 nothing but www.example.com:
1823 permit-access www.privoxy.org/24 www.example.com/32
1827 Allow access from any host on the 26-bit subnet 192.168.45.64 to anywhere,
1828 with the exception that 192.168.45.73 may not access www.dirty-stuff.example.com:
1832 permit-access 192.168.45.64/26
1833 deny-access 192.168.45.73 www.dirty-stuff.example.com
1841 <sect4><title>buffer-limit</title>
1845 <term>Specifies:</term>
1848 Maximum size of the buffer for content filtering.
1853 <term>Type of value:</term>
1855 <para>Size in Kbytes</para>
1859 <term>Default value:</term>
1865 <term>Effect if unset:</term>
1868 Use a 4MB (4096 KB) limit.
1876 For content filtering, i.e. the <literal>+filter</literal> and
1877 <literal>+deanimate-gif</literal> actions, it is necessary that
1878 <application>Privoxy</application> buffers the entire document body.
1879 This can be potentially dangerous, since a server could just keep sending
1880 data indefinitely and wait for your RAM to exhaust -- with nasty consequences.
1884 When a document buffer size reaches the <literal>buffer-limit</literal>, it is
1885 flushed to the client unfiltered and no further attempt to
1886 filter the rest of the document is made. Remember that there may be multiple threads
1887 running, which might require up to <literal>buffer-limit</literal> Kbytes
1888 <emphasis>each</emphasis>, unless you have enabled <quote>single-threaded</quote>
1898 <!-- ~ End section ~ -->
1901 <!-- ~~~~~ New section ~~~~~ -->
1903 <sect3 id="forwarding">
1904 <title>Forwarding</title>
1907 This feature allows routing of HTTP requests through a chain of
1909 It can be used to better protect privacy and confidentiality when
1910 accessing specific domains by routing requests to those domains
1911 through an anonymous public proxy (see e.g. <ulink
1912 url="http://www.multiproxy.org/anon_list.htm">http://www.multiproxy.org/anon_list.htm</ulink>)
1913 Or to use a caching proxy to speed up browsing. Or chaining to a parent
1914 proxy may be necessary because the mackine that <application>Privoxy</application>
1915 runs on has no direct internet access.
1919 Also specified here are SOCKS proxies. <application>Privoxy</application>
1920 supports the SOCKS 4 and SOCKS 4A protocols.
1923 <sect4><title>forward</title>
1926 <term>Specifies:</term>
1929 To which parent HTTP proxy specific requests should be routed.
1934 <term>Type of value:</term>
1937 <replaceable class="parameter">target_domain</replaceable>[:<replaceable class="parameter">port</replaceable>]
1938 <replaceable class="parameter">http_parent</replaceable>[/<replaceable class="parameter">port</replaceable>]
1941 Where <replaceable class="parameter">target_domain</replaceable> is a domain name pattern (see the
1942 chapter on domain matching in the actions file),
1943 <replaceable class="parameter">http_parent</replaceable> is the address of the parent HTTP proxy
1944 as an IP addresses in dotted decimal notation or as a valid DNS name (or <quote>.</quote> to denote
1945 <quote>no forwarding</quote>, and the optional
1946 <replaceable class="parameter">port</replaceable> parameters are TCP ports, i.e. integer
1947 values from 1 to 64535
1952 <term>Default value:</term>
1954 <para><emphasis>Unset</emphasis></para>
1958 <term>Effect if unset:</term>
1961 Don't use parent HTTP proxies.
1969 If <replaceable class="parameter">http_parent</replaceable> is <quote>.</quote>, then requests are not
1970 forwarded to another HTTP proxy but are made directly to the web servers.
1973 Multiple lines are OK, they are checked in sequence, and the last match wins.
1978 <term>Examples:</term>
1981 Everything goes to an example anonymizing proxy, except SSL on port 443 (which it doesn't handle):
1985 forward .* anon-proxy.example.org:8080
1990 Everything goes to our example ISP's caching proxy, except for requests
1991 to that ISP's sites:
1995 forward .*. caching-proxy.example-isp.net:8000
1996 forward .example-isp.net .
2004 <sect4><title>forward-socks4 and forward-socks4a</title>
2007 <term>Specifies:</term>
2010 Through which SOCKS proxy (and to which parent HTTP proxy) specific requests should be routed.
2015 <term>Type of value:</term>
2018 <replaceable class="parameter">target_domain</replaceable>[:<replaceable class="parameter">port</replaceable>]
2019 <replaceable class="parameter">socks_proxy</replaceable>[/<replaceable class="parameter">port</replaceable>]
2020 <replaceable class="parameter">http_parent</replaceable>[/<replaceable class="parameter">port</replaceable>]
2023 Where <replaceable class="parameter">target_domain</replaceable> is a domain name pattern (see the
2024 chapter on domain matching in the actions file),
2025 <replaceable class="parameter">http_parent</replaceable> and <replaceable class="parameter">socks_proxy</replaceable>
2026 are IP addresses in dotted decimal notation or valid DNS names (<replaceable class="parameter">http_parent</replaceable>
2027 may be <quote>.</quote> to denote <quote>no HTTP forwarding</quote>), and the optional
2028 <replaceable class="parameter">port</replaceable> parameters are TCP ports, i.e. integer values from 1 to 64535
2033 <term>Default value:</term>
2035 <para><emphasis>Unset</emphasis></para>
2039 <term>Effect if unset:</term>
2042 Don't use SOCKS proxies.
2050 Multiple lines are OK, they are checked in sequence, and the last match wins.
2053 The difference between <literal>forward-socks4</literal> and <literal>forward-socks4a</literal>
2054 is that in the SOCKS 4A protocol, the DNS resolution of the target hostname happens on the SOCKS
2055 server, while in SOCKS 4 it happens locally.
2058 If <replaceable class="parameter">http_parent</replaceable> is <quote>.</quote>, then requests are not
2059 forwarded to another HTTP proxy but are made (HTTP-wise) directly to the web servers, albeit through
2065 <term>Examples:</term>
2068 From the company example.com, direct connections are made to all <quote>internal</quote>
2069 domains, but everything outbound goes through their ISP's proxy by way example.com's
2070 corporate SOCKS 4A gateway to the Internet.
2074 forward-socks4a .*. socks-gw.example.com:1080 www-cache.example-isp.net:8080
2075 forward .example.com .
2079 A rule that uses a SOCKS 4 gateway for all destinations but no HTTP parent looks like this:
2083 forward-socks4 .*. socks-gw.example.com:1080 .
2091 <sect4><title>Advanced Forwarding Examples</title>
2094 If you have links to multiple ISPs that provide various special content
2095 only to their subscribers, you can configure multiple <application>Privoxies</application>
2096 which have connections to the respective ISPs to act as forwarders to each other, so that
2097 <emphasis>your</emphasis> users can see the internal content of all ISPs.
2101 Assume that host-a has a PPP connection to isp-a.net. And host-b has a PPP connection to
2102 isp-b.net. Both run <application>Privoxy</application>. Their forwarding
2103 configuration can look like this:
2113 forward .isp-b.net host-b:8118
2124 forward .isp-a.net host-a:8118
2129 Now, you users can set their browser's proxy to use either
2130 host-a or host-b and be able to browse the internal content
2131 on both isp-a or isp-b.
2135 If you intend to chain <application>Privoxy</application> and
2136 <application>squid</application> locally, then chain as
2137 <literal>browser -> squid -> privoxy</literal> is the recommended way.
2141 Assuming that <application>Privoxy</application> and <application>squid</application>
2142 run on the same box, your squid configuration could then look like this:
2147 # Define Privoxy as parent proxy (without ICP)
2148 cache_peer 127.0.0.1 parent 8118 7 no-query
2150 # Define ACL for protocol FTP
2153 # Do not forward FTP requests to Privoxy
2154 always_direct allow ftp
2156 # Forward all the rest to Privoxy
2157 never_direct allow all
2162 You would then need to change your browser's proxy settings to <application>squid</application>'s address and port.
2163 Squid normally uses port 3128. If unsure consult <literal>http_port</literal> in <filename>squid.conf</filename>.
2170 <!-- ~ End section ~ -->
2173 <!-- ~~~~~ New section ~~~~~ -->
2176 <title>Windows GUI Options</title>
2178 Removed references to Win32. HB 09/23/01
2181 <application>Privoxy</application> has a number of options specific to the
2182 Windows GUI interface:
2186 If <quote>activity-animation</quote> is set to 1, the
2187 <application>Privoxy</application> icon will animate when
2188 <quote>Privoxy</quote> is active. To turn off, set to 0.
2195 <emphasis>activity-animation 1</emphasis>
2202 If <quote>log-messages</quote> is set to 1,
2203 <application>Privoxy</application> will log messages to the console
2211 <emphasis>log-messages 1</emphasis>
2218 If <quote>log-buffer-size</quote> is set to 1, the size of the log buffer,
2219 i.e. the amount of memory used for the log messages displayed in the
2220 console window, will be limited to <quote>log-max-lines</quote> (see below).
2224 Warning: Setting this to 0 will result in the buffer to grow infinitely and
2225 eat up all your memory!
2232 <emphasis>log-buffer-size 1</emphasis>
2239 <application>log-max-lines</application> is the maximum number of lines held
2240 in the log buffer. See above.
2247 <emphasis>log-max-lines 200</emphasis>
2254 If <quote>log-highlight-messages</quote> is set to 1,
2255 <application>Privoxy</application> will highlight portions of the log
2256 messages with a bold-faced font:
2263 <emphasis>log-highlight-messages 1</emphasis>
2270 The font used in the console window:
2277 <emphasis>log-font-name Comic Sans MS</emphasis>
2284 Font size used in the console window:
2291 <emphasis>log-font-size 8</emphasis>
2298 <quote>show-on-task-bar</quote> controls whether or not
2299 <application>Privoxy</application> will appear as a button on the Task bar
2307 <emphasis>show-on-task-bar 0</emphasis>
2314 If <quote>close-button-minimizes</quote> is set to 1, the Windows close
2315 button will minimize <application>Privoxy</application> instead of closing
2316 the program (close with the exit option on the File menu).
2323 <emphasis>close-button-minimizes 1</emphasis>
2330 The <quote>hide-console</quote> option is specific to the MS-Win console
2331 version of <application>Privoxy</application>. If this option is used,
2332 <application>Privoxy</application> will disconnect from and hide the
2349 <!-- ~ End section ~ -->
2352 <!-- ~~~~~ New section ~~~~~ -->
2353 <sect2 id="actionsfile">
2354 <title>The Actions File</title>
2357 The actions file (<filename>default.action</filename>, formerly:
2358 <filename>actionsfile</filename> or <filename>ijb.action</filename>) is used
2359 to define what actions <application>Privoxy</application> takes for which
2360 URLs, and thus determines how ad images, cookies and various other aspects
2361 of HTTP content and transactions are handled on which sites (or even parts
2366 Anything you want can blocked, including ads, banners, or just some obnoxious
2367 URL that you would rather not see. Cookies can be accepted or rejected, or
2368 accepted only during the current browser session (i.e. not written to disk),
2369 content can be modified, JavaScripts tamed, user-tracking fooled, and much more.
2370 See below for a complete list of available actions.
2373 <!-- ~~~~~ New section ~~~~~ -->
2375 <title>Finding the Right Mix</title>
2377 Note that some actions like cookie suppression or script disabling may
2378 render some sites unusable, which rely on these techniques to work properly.
2379 Finding the right mix of actions is not easy and sure a matter of personal
2380 taste. In general, it can be said that the more <quote>aggressive</quote>
2381 your default settings (in the top section of the actions file) are,
2382 the more exceptions for <quote>trustes</quote> sites you will have to
2383 make later. If, for example, you want to kill popup windows per default, you'll
2384 have to make exceptions from that rule for sites that you regularly use
2385 and that require popups for actually useful content, like maybe your bank,
2386 favourite shop, or newspaper.
2390 We have tried to provide you with reasonable rules to start from in the
2391 distribution actions file. But there is no general rule of thumb on these
2392 things. There just are too many variables, and sites are constantly changing.
2393 Sooner or later you will want to change the rules (and read this chapter).
2397 <!-- ~~~~~ New section ~~~~~ -->
2399 <title>How to Edit</title>
2401 The easiest way to edit the <quote>actions</quote> file is with a browser by
2402 using our browser-based editor, which is available at <ulink
2403 url="http://config.privoxy.org/edit-actions">http://config.privoxy.org/edit-actions</ulink>.
2407 If you prefer plain text editing to GUIs, you can of course also directly edit the
2408 <filename>default.action</filename> file.
2414 <title>How Actions are Applied to URLs</title>
2416 The actions file is separated into sections. There are special sections,
2417 like the alias sections which will be discussed later. For now let's
2418 concentrate on regular sectiions: They have a heading line (often split
2419 up to multiple lines for readability) which consist of a list of actions,
2420 separated by whitespace and enclosed in curly braces. Below that, there
2421 is a list of URL patterns, each on a separate line.
2425 To determine which actions apply to a request, the URL of the request is
2426 compared to all patterns in this file. Every time it matches, the list of
2427 applicable actions for the URL is incrementally updated, using the heading
2428 of the section in which the pattern is located. If multiple matches for
2429 the same URL set the same action differently, the last match wins.
2433 You can trace this process by visiting <ulink
2434 url="http://config.privoxy.org/show-url-info">http://config.privoxy.org/show-url-info</ulink>.
2438 More detail on this is provided in the Appendix <quote>Anatomy of an Action</quote>.
2442 <!-- ~~~~~ New section ~~~~~ -->
2444 <title>Patterns</title>
2446 Generally, a pattern has the form <domain>/<path>, where both the
2447 <domain> and <path> part are optional. If you only specify a
2448 domain part, the <quote>/</quote> can be left out:
2453 <term><literal>www.example.com</literal></term>
2456 is a domain only pattern and will match any request to <literal>www.example.com</literal>,
2457 regardless of which document on that server is requested.
2462 <term><literal>www.example.com/</literal></term>
2465 means exactly the same.
2470 <term><literal>www.example.com/index.html</literal></term>
2473 matches only the single document <literal>/index.html</literal>
2474 on <literal>www.example.com</literal>.
2479 <term><literal>/index.html</literal></term>
2482 matches the document <literal>/index.html</literal>, regardless of the domain,
2483 i.e. on <emphasis>any</emphasis> web server.
2488 <term><literal>index.html</literal></term>
2491 matches nothing, since it would be interpreted as a domain name and
2492 there is no top-level domain called <literal>.html</literal>.
2498 <sect4><title>The Domain Pattern</title>
2501 The matching of the domain part offers some flexible options: if the
2502 domain starts or ends with a dot, it becomes unanchored at that end.
2508 <term><literal>.example.com</literal></term>
2511 matches any domain that <emphasis>ENDS</emphasis> in
2512 <literal>.example.com</literal>
2517 <term><literal>www.</literal></term>
2520 matches any domain that <emphasis>STARTS</emphasis> with
2521 <literal>www.</literal>
2526 <term><literal>.example.</literal></term>
2529 matches any domain that <emphasis>CONTAINS</emphasis> <literal>.example.</literal>
2530 (Correctly speaking: It matches any FQDN that contains <literal>example</literal> as a domain.)
2537 Additionally, there are wild-cards that you can use in the domain names
2538 themselves. They work pretty similar to shell wild-cards: <quote>*</quote>
2539 stands for zero or more arbitrary characters, <quote>?</quote> stands for
2540 any single character, you can define character classes in square
2541 brackets and all of that can be freely mixed:
2546 <term><literal>ad*.example.com</literal></term>
2549 matches <quote>adserver.example.com</quote>,
2550 <quote>ads.example.com</quote>, etc but not <quote>sfads.example.com</quote>
2555 <term><literal>*ad*.example.com</literal></term>
2558 matches all of the above, and then some.
2563 <term><literal>.?pix.com</literal></term>
2566 matches <literal>www.ipix.com</literal>,
2567 <literal>pictures.epix.com</literal>, <literal>a.b.c.d.e.upix.com</literal> etc.
2572 <term><literal>www[1-9a-ez].example.c*</literal></term>
2575 matches <literal>www1.example.com</literal>,
2576 <literal>www4.example.cc</literal>, <literal>wwwd.example.cy</literal>,
2577 <literal>wwwz.example.com</literal> etc., but <emphasis>not</emphasis>
2578 <literal>wwww.example.com</literal>.
2586 <sect4><title>The Path Pattern</title>
2589 <application>Privoxy</application> uses Perl compatible regular expressions
2590 (through the <ulink url="http://www.pcre.org/">PCRE</ulink> library) for
2595 There is an <link linkend="regex">Appendix</link> with a brief quickstart into regular
2596 expressions, and full (very technical) documentation on PCRE regex syntax is available online
2597 at <ulink url="http://www.pcre.org/man.txt">http://www.pcre.org/man.txt</ulink>.
2598 You might also find the Perl man page on regular expressions (<literal>man perlre</literal>)
2599 useful, which is available online at <ulink
2600 url="http://www.perldoc.com/perl5.6/pod/perlre.html">http://www.perldoc.com/perl5.6/pod/perlre.html</ulink>.
2604 Note that the pattern is automatically left-anchored at the <quote>/</quote>,
2605 i.e. it matches as if it would start with a <quote>^</quote>.
2609 Please also note that matching in the path is case
2610 <emphasis>INSENSITIVE</emphasis> by default, but you can switch to case
2611 sensitive at any point in the pattern by using the
2612 <quote>(?-i)</quote> switch:
2613 <literal>www.example.com/(?-i)PaTtErN.*</literal> will match only
2614 documents whose path starts with <literal>PaTtErN</literal> in
2615 <emphasis>exactly</emphasis> this capitalization.
2621 <!-- ~ End section ~ -->
2625 <!-- ~~~~~ New section ~~~~~ -->
2628 <title>Actions</title>
2630 Actions are enabled if preceded with a <quote>+</quote>, and disabled if
2631 preceded with a <quote>-</quote>. Actions are invoked by enclosing the
2632 action name in curly braces (e.g. {+some_action}), followed by a list of
2633 URLs to which the action applies. There are three classes of actions:
2641 Boolean (e.g. <quote>+/-block</quote>):
2647 <emphasis>{+name}</emphasis> # enable this action
2648 <emphasis>{-name}</emphasis> # disable this action
2658 parameterized (e.g. <quote>+/-hide-user-agent</quote>):
2664 <emphasis>{+name{param}}</emphasis> # enable action and set parameter to <quote>param</quote>
2665 <emphasis>{-name}</emphasis> # disable action
2674 Multi-value (e.g. <quote>{+/-add-header{Name: value}}</quote>, <quote>{+/-wafer{name=value}}</quote>):
2680 <emphasis>{+name{param}}</emphasis> # enable action and add parameter <quote>param</quote>
2681 <emphasis>{-name{param}}</emphasis> # remove the parameter <quote>param</quote>
2682 <emphasis>{-name}</emphasis> # disable this action totally
2693 If nothing is specified in this file, no <quote>actions</quote> are taken.
2694 So in this case <application>Privoxy</application> would just be a
2695 normal, non-blocking, non-anonymizing proxy. You must specifically
2696 enable the privacy and blocking features you need (although the
2697 provided default <filename>default.action</filename> file will
2698 give a good starting point).
2702 Later defined actions always over-ride earlier ones. So exceptions
2703 to any rules you make, should come in the latter part of the file. For
2704 multi-valued actions, the actions are applied in the order they are
2709 The list of valid <application>Privoxy</application> <quote>actions</quote> are:
2717 Add the specified HTTP header, which is not checked for validity.
2718 You may specify this many times to specify many different headers:
2724 <emphasis>+add-header{Name: value}</emphasis>
2734 Block this URL totally. In a default installation, a <quote>blocked</quote>
2735 URL will result in bright red banner that says <quote>BLOCKED</quote>,
2736 with a reason why it is being blocked, and an option to see it anyway.
2737 The page displayed for this is the <quote>blocked</quote> template
2744 <emphasis>+block</emphasis>
2754 De-animate all animated GIF images, i.e. reduce them to their last frame.
2755 This will also shrink the images considerably (in bytes, not pixels!). If
2756 the option <quote>first</quote> is given, the first frame of the animation
2757 is used as the replacement. If <quote>last</quote> is given, the last frame
2758 of the animation is used instead, which probably makes more sense for most
2759 banner animations, but also has the risk of not showing the entire last
2760 frame (if it is only a delta to an earlier frame).
2766 <emphasis>+deanimate-gifs{last}</emphasis>
2767 <emphasis>+deanimate-gifs{first}</emphasis>
2776 <quote>+downgrade</quote> will downgrade HTTP/1.1 client requests to
2777 HTTP/1.0 and downgrade the responses as well. Use this action for servers
2778 that use HTTP/1.1 protocol features that
2779 <application>Privoxy</application> doesn't handle well yet. HTTP/1.1
2780 is only partially implemented. Default is not to downgrade requests.
2786 <emphasis>+downgrade</emphasis>
2795 Many sites, like yahoo.com, don't just link to other sites. Instead, they
2796 will link to some script on their own server, giving the destination as a
2797 parameter, which will then redirect you to the final target. URLs resulting
2798 from this scheme typically look like:
2799 <emphasis>http://some.place/some_script?http://some.where-else</emphasis>.
2802 Sometimes, there are even multiple consecutive redirects encoded in the
2803 URL. These redirections via scripts make your web browsing more traceable,
2804 since the server from which you follow such a link can see where you go to.
2805 Apart from that, valuable bandwidth and time is wasted, while your browser
2806 ask the server for one redirect after the other. Plus, it feeds the
2810 The <quote>+fast-redirects</quote> option enables interception of these
2811 types of requests by <application>Privoxy</application>, who will cut off
2812 all but the last valid URL in the request and send a local redirect back to
2813 your browser without contacting the intermediate site(s).
2819 <emphasis>+fast-redirects</emphasis>
2828 Apply the filters in the <literal>section_header</literal>
2829 section of the <filename>default.filter</filename> file to the site(s).
2830 <filename>default.filter</filename> sections are grouped according to like
2831 functionality. <application>Filters</application> can be used to
2832 re-write any of the raw page content. This is a potentially a
2833 very powerful feature!
2840 <emphasis>+filter{section_header}</emphasis>
2847 Filter sections that are pre-defined in the supplied
2848 <filename>default.filter</filename> include:
2854 <emphasis>html-annoyances</emphasis>: Get rid of particularly annoying HTML abuse.
2859 <emphasis>js-annoyances</emphasis>: Get rid of particularly annoying JavaScript abuse
2864 <emphasis>no-poups</emphasis>: Kill all popups in JS and HTML
2869 <emphasis>frameset-borders</emphasis>: Give frames a border
2874 <emphasis>webbugs</emphasis>: Squish WebBugs (1x1 invisible GIFs used for user tracking)
2879 <emphasis>no-refresh</emphasis>: Automatic refresh sucks on auto-dialup lines
2884 <emphasis>fun</emphasis>: Text replacements for subversive browsing fun!
2889 <emphasis>nimda</emphasis>: Remove (virus) Nimda code.
2894 <emphasis>banners-by-size</emphasis>: Kill banners by size
2899 <emphasis>crude-parental</emphasis>: Kill all web pages that contain the words "sex" or "warez"
2905 Note: Filtering requires buffering the page content, which may appear to slow down
2906 page rendering since nothing is displayed until all content has passed
2907 the filters. (It does not really take longer, but seems that way since
2908 the page is not incrementally displayed.) This effect will be more noticeable
2909 on slower connections.
2916 Block any existing X-Forwarded-for header, and do not add a new one:
2922 <emphasis>+hide-forwarded</emphasis>
2931 If the browser sends a <quote>From:</quote> header containing your e-mail
2932 address, this either completely removes the header (<quote>block</quote>), or
2933 changes it to the specified e-mail address.
2939 <emphasis>+hide-from{block}</emphasis>
2940 <emphasis>+hide-from{spam@sittingduck.xqq}</emphasis>
2949 Don't send the <quote>Referer:</quote> (sic) header to the web site. You
2950 can block it, forge a URL to the same server as the request (which is
2951 preferred because some sites will not send images otherwise) or set it to a
2952 constant, user defined string of your choice.
2958 <emphasis>+hide-referer{block}</emphasis>
2959 <emphasis>+hide-referer{forge}</emphasis>
2960 <emphasis>+hide-referer{http://nowhere.com}</emphasis>
2969 Alternative spelling of <quote>+hide-referer</quote>. It has the same
2970 parameters, and can be freely mixed with, <quote>+hide-referer</quote>.
2971 (<quote>referrer</quote> is the correct English spelling, however the HTTP
2972 specification has a bug - it requires it to be spelled <quote>referer</quote>.)
2978 <emphasis>+hide-referrer{...}</emphasis>
2987 Change the <quote>User-Agent:</quote> header so web servers can't tell your
2988 browser type. Warning! This breaks many web sites. Specify the
2989 user-agent value you want. Example, pretend to be using Netscape on
2996 <emphasis>+hide-user-agent{Mozilla (X11; I; Linux 2.0.32 i586)}</emphasis>
3003 Or to identify yourself explicitly as a <application>Privoxy</application> user:
3009 <emphasis>+hide-user-agent{Privoxy/1.0}</emphasis>
3014 (Don't change the version number from 1.0 - after all, why tell them?)
3021 <emphasis>+hide-user-agent{browser-type}</emphasis>
3031 Treat this URL as an image. This only matters if it's also <quote>+block</quote>ed,
3032 in which case a <quote>blocked</quote> image can be sent rather than a HTML page.
3033 See <quote>+image-blocker{}</quote> below for the control over what is actually sent.
3034 If you want <emphasis>invisible</emphasis> ads, they should be defined as
3035 <emphasis>images</emphasis> and <emphasis>blocked</emphasis>. And also,
3036 <quote>image-blocker</quote> should be set to <quote>blank</quote>. Note you
3037 cannot treat HTML pages as images in most cases. For instance, frames
3038 require an HTML page to display. So a frame that is an ad, cannot be
3039 treated as an image. Forcing an <quote>image</quote> in this
3040 situation just will not work.
3046 <emphasis>+image</emphasis>
3054 <para> Decides what to do with URLs that end up tagged with <quote>{+block
3055 +image}</quote>, e.g an advertizement. There are five options.
3056 <quote>-image-blocker</quote> will send a HTML <quote>blocked</quote> page,
3057 usually resulting in a <quote>broken image</quote> icon.
3058 <!-- <quote>+image-blocker{logo}</quote> will send a -->
3059 <!-- <application>Privoxy</application> logo -->
3061 <quote>+image-blocker{blank}</quote> will send a 1x1 transparent GIF
3062 image. And finally, <quote>+image-blocker{http://xyz.com}</quote> will send a
3063 HTTP temporary redirect to the specified image. This has the advantage of the
3064 icon being being cached by the browser, which will speed up the display.
3065 <quote>+image-blocker{pattern}</quote> will send a checkboard type pattern
3067 <!-- which scales better than the logo (which can get blocky if the browser -->
3068 <!-- enlarges it too much). -->
3074 <!-- <emphasis>+image-blocker{logo}</emphasis> -->
3075 <emphasis>+image-blocker{blank}</emphasis>
3076 <emphasis>+image-blocker{pattern}</emphasis>
3077 <emphasis>+image-blocker{http://p.p/send-banner}</emphasis>
3086 By default (i.e. in the absence of a <quote>+limit-connect</quote>
3087 action), <application>Privoxy</application> will only allow CONNECT
3088 requests to port 443, which is the standard port for https as a
3093 The CONNECT methods exists in HTTP to allow access to secure websites
3094 (https:// URLs) through proxies. It works very simply: the proxy
3095 connects to the server on the specified port, and then short-circuits
3096 its connections to the client <emphasis>and</emphasis> to the remote proxy.
3097 This can be a big security hole, since CONNECT-enabled proxies can
3098 be abused as TCP relays very easily.
3102 If you want to allow CONNECT for more ports than this, or want to forbid
3103 CONNECT altogether, you can specify a comma separated list of ports and
3104 port ranges (the latter using dashes, with the minimum defaulting to 0 and
3112 <emphasis>+limit-connect{443} # This is the default and need no be specified.</emphasis>
3113 <emphasis>+limit-connect{80,443} # Ports 80 and 443 are OK.</emphasis>
3114 <emphasis>+limit-connect{-3, 7, 20-100, 500-} # Port less than 3, 7, 20 to 100</emphasis>
3115 <emphasis> #and above 500 are OK.</emphasis>
3125 <quote>+no-compression</quote> prevents the website from compressing the
3126 data. Some websites do this, which can be a problem for
3127 <application>Privoxy</application>, since <quote>+filter</quote>,
3128 <quote>+no-popup</quote> and <quote>+gif-deanimate</quote> will not work on
3129 compressed data. This will slow down connections to those websites,
3130 though. Default is <quote>no-compression</quote> is turned on.
3137 <emphasis>+nocompression</emphasis>
3146 If the website sets cookies, <quote>no-cookies-keep</quote> will make sure
3147 they are erased when you exit and restart your web browser. This makes
3148 profiling cookies useless, but won't break sites which require cookies so
3149 that you can log in for transactions. Default: on.
3155 <emphasis>+no-cookies-keep</emphasis>
3164 Prevent the website from reading cookies:
3170 <emphasis>+no-cookies-read</emphasis>
3179 Prevent the website from setting cookies:
3185 <emphasis>+no-cookies-set</emphasis>
3194 Filter the website through a built-in filter to disable those obnoxious
3195 JavaScript pop-up windows via window.open(), etc. The two alternative
3196 spellings are equivalent.
3202 <emphasis>+no-popup</emphasis>
3203 <emphasis>+no-popups</emphasis>
3212 This action only applies if you are using a <filename>jarfile</filename>
3213 for saving cookies. It sends a cookie to every site stating that you do not
3214 accept any copyright on cookies sent to you, and asking them not to track
3215 you. Of course, this is a (relatively) unique header they could use to
3222 <emphasis>+vanilla-wafer</emphasis>
3231 This allows you to add an arbitrary cookie. It can be specified multiple
3232 times in order to add as many cookies as you like.
3238 <emphasis>+wafer{name=value}</emphasis>
3249 The meaning of any of the above is reversed by preceding the action with a
3250 <quote>-</quote>, in place of the <quote>+</quote>.
3258 Turn off cookies by default, then allow a few through for specified sites:
3265 # Turn off all persistent cookies
3266 { +no-cookies-read }
3268 # Allow cookies for this browser session ONLY
3269 { +no-cookies-keep }
3271 # Exceptions to the above, sites that benefit from persistent cookies
3272 { -no-cookies-read }
3274 { -no-cookies-keep }
3281 # Alternative way of saying the same thing
3282 {-no-cookies-set -no-cookies-read -no-cookies-keep}
3291 Now turn off <quote>fast redirects</quote>, and then we allow two exceptions:
3301 # Reverse it for these two sites, which don't work right without it.
3303 www.ukc.ac.uk/cgi-bin/wac\.cgi\?
3311 Turn on page filtering according to rules in the defined sections
3312 of <filename>refilterfile</filename>, and make one exception for
3320 # Run everything through the filter file, using only the
3321 # specified sections:
3322 +filter{html-annoyances} +filter{js-annoyances} +filter{no-popups}\
3323 +filter{webbugs} +filter{nimda} +filter{banners-by-size}
3325 # Then disable filtering of code from sourceforge!
3327 .cvs.sourceforge.net
3334 Now some URLs that we want <quote>blocked</quote> (normally generates
3335 the <quote>blocked</quote> banner). Many of these use regular expressions
3336 that will expand to match multiple URLs:
3345 /.*/(.*[-_.])?ads?[0-9]?(/|[-_.].*|\.(gif|jpe?g))
3346 /.*/(.*[-_.])?count(er)?(\.cgi|\.dll|\.exe|[?/])
3347 /.*/(ng)?adclient\.cgi
3348 /.*/(plain|live|rotate)[-_.]?ads?/
3349 /.*/(sponsor)s?[0-9]?/
3350 /.*/_?(plain|live)?ads?(-banners)?/
3352 /.*/ad(sdna_image|gifs?)/
3353 /.*/ad(server|stream|juggler)\.(cgi|pl|dll|exe)
3357 /.*/adv((er)?ts?|ertis(ing|ements?))?/
3361 /.*/cgi-bin/centralad/getimage
3362 /.*/images/addver\.gif
3363 /.*/images/marketing/.*\.(gif|jpe?g)
3367 /.*/sponsors?[0-9]?/
3368 /.*/advert[0-9]+\.jpg
3375 /graphics/defaultAd/
3377 /image\.ng/transactionID
3378 /images/.*/.*_anim\.gif # alvin brattli
3379 /ip_img/.*\.(gif|jpe?g)
3383 /cgi-bin/nph-adclick.exe/
3384 /.*/Image/BannerAdvertising/
3386 /.*/adlib/server\.cgi
3394 Note that many of these actions have the potential to cause a page to
3395 misbehave, possibly even not to display at all. There are many ways
3396 a site designer may choose to design his site, and what HTTP header
3397 content he may depend on. There is no way to have hard and fast rules
3398 for all sites. See the <link linkend="ACTIONSANAT">Appendix</link>
3399 for a brief example on troubleshooting actions.
3404 <!-- ~ End section ~ -->
3407 <!-- ~~~~~ New section ~~~~~ -->
3409 <title>Aliases</title>
3411 Custom <quote>actions</quote>, known to <application>Privoxy</application>
3412 as <quote>aliases</quote>, can be defined by combining other <quote>actions</quote>.
3413 These can in turn be invoked just like the built-in <quote>actions</quote>.
3414 Currently, an alias can contain any character except space, tab, <quote>=</quote>,
3415 <quote>{</quote> or <quote>}</quote>. But please use only <quote>a</quote>-
3416 <quote>z</quote>, <quote>0</quote>-<quote>9</quote>, <quote>+</quote>, and
3417 <quote>-</quote>. Alias names are not case sensitive, and
3418 <emphasis>must be defined before anything</emphasis> else in the
3419 <filename>default.action</filename>file! And there can only be one set of
3420 <quote>aliases</quote> defined.
3424 Now let's define a few aliases:
3431 # Useful custom aliases we can use later. These must come first!
3433 +no-cookies = +no-cookies-set +no-cookies-read
3434 -no-cookies = -no-cookies-set -no-cookies-read
3435 fragile = -block -no-cookies -filter -fast-redirects -hide-referer -no-popups
3436 shop = -no-cookies -filter -fast-redirects
3437 +imageblock = +block +image
3439 #For people who don't like to type too much: ;-)
3442 c2 = -no-cookies-set +no-cookies-read
3443 c3 = +no-cookies-set -no-cookies-read
3444 #... etc. Customize to your heart's content.
3451 Some examples using our <quote>shop</quote> and <quote>fragile</quote>
3459 # These sites are very complex and require
3460 # minimal interference.
3462 .office.microsoft.com
3463 .windowsupdate.microsoft.com
3466 # Shopping sites - still want to block ads.
3469 .worldpay.com # for quietpc.com
3473 # These shops require pop-ups
3483 The <quote>shop</quote> and <quote>fragile</quote> aliases are often used for
3484 <quote>problem</quote> sites that require most actions to be disabled
3485 in order to function properly.
3492 <!-- ~ End section ~ -->
3495 <!-- ~~~~~ New section ~~~~~ -->
3496 <sect2 id="filterfile">
3497 <title>The Filter File</title>
3499 Any web page can be dynamically modified with the filter file. This
3500 modification can be removal, or re-writing, of any web page content,
3501 including tags and non-visible content. The default filter file is
3502 <filename>default.filter</filename>, located in the config directory.
3506 This is potentially a very powerful feature, and requires knowledge of both
3507 <quote>regular expression</quote> and HTML in order create custom
3508 filters. But, there are a number of useful filters included with
3509 <application>Privoxy</application> for many common situations.
3513 The included example file is divided into sections. Each section begins
3514 with the <literal>FILTER</literal> keyword, followed by the identifier
3515 for that section, e.g. <quote>FILTER: webbugs</quote>. Each section performs
3516 a similar type of filtering, such as <quote>html-annoyances</quote>.
3520 This file uses regular expressions to alter or remove any string in the
3521 target page. The expressions can only operate on one line at a time. Some
3522 examples from the included default <filename>default.filter</filename>:
3526 Stop web pages from displaying annoying messages in the status bar by
3527 deleting such references:
3534 FILTER: html-annoyances
3536 # New browser windows should be resizeable and have a location and status
3539 s/resizable="?(no|0)"?/resizable=1/ig s/noresize/yesresize/ig
3540 s/location="?(no|0)"?/location=1/ig s/status="?(no|0)"?/status=1/ig
3541 s/scrolling="?(no|0|Auto)"?/scrolling=1/ig
3542 s/menubar="?(no|0)"?/menubar=1/ig
3544 # The <BLINK> tag was a crime!
3546 s*<blink>|</blink>**ig
3550 #s/framespacing="?(no|0)"?//ig
3551 #s/margin(height|width)=[0-9]*//gi
3558 Just for kicks, replace any occurrence of <quote>Microsoft</quote> with
3559 <quote>MicroSuck</quote>, and have a little fun with topical buzzwords:
3568 s/microsoft(?!.com)/MicroSuck/ig
3572 s/industry-leading|cutting-edge|award-winning/<font color=red><b>BINGO!</b></font>/ig
3579 Kill those pesky little web-bugs:
3586 # webbugs: Squish WebBugs (1x1 invisible GIFs used for user tracking)
3589 s/<img\s+[^>]*?(width|height)\s*=\s*['"]?1\D[^>]*?(width|height)\s*=\s*['"]?1(\D[^>]*?)?>/<!-- Squished WebBug -->/sig
3597 <!-- ~ End section ~ -->
3601 <!-- ~~~~~ New section ~~~~~ -->
3604 <title>Templates</title>
3606 When <application>Privoxy</application> displays one of its internal
3607 pages, such as a 404 Not Found error page, it uses the appropriate template.
3608 On Linux, BSD, and Unix, these are located in
3609 <filename>/etc/privoxy/templates</filename> by default. These may be
3610 customized, if desired. <filename>cgi-style.css</filename> is
3611 used to control the HTML attributes (fonts, etc).
3614 The default <quote>Blocked</quote> banner page with the bright red top
3615 banner, is called just <quote><filename>blocked</filename></quote>. This
3616 may be customized or replaced with something else if desired.
3623 <!-- ~ End section ~ -->
3627 <!-- ~~~~~ New section ~~~~~ -->
3629 <sect1 id="contact"><title>Contacting the Developers, Bug Reporting and Feature
3632 <!-- Include contacting.sgml boilerplate: -->
3634 <!-- end boilerplate -->
3637 <!-- ~~~~~ New section ~~~~~ -->
3638 <sect2 id="submitactions">
3639 <title>Submitting Ads and <quote>Action</quote> Problems</title>
3641 Ads and banners that are not stopped by <application>Privoxy</application>
3642 can be submitted to the developers by accessing a special page and filling
3643 out the brief, required form. Conversely, you can also report pages, images,
3644 etc. that <application>Privoxy</application> is blocking, but should not.
3645 The form itself does require Internet access.
3648 To do this, point your browser to <application>Privoxy</application>
3649 at <ulink url="http://config.privoxy.org/">http://config.privoxy.org/</ulink>
3650 (shortcut: <ulink url="http://p.p/">http://p.p/</ulink>), and then select
3651 <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());">Actions file feedback system</ulink>,
3652 near the bottom of the page. Paste in the URL that is the cause of the
3653 unwanted behavior, and follow the prompts. The developers will
3654 try to incorporate a fix for the problem you reported into future versions.
3658 New <filename>default.actions</filename> files will occasionally be made
3659 available based on your feedback. These
3660 will be announced on the
3662 url="http://lists.sourceforge.net/lists/listinfo/ijbswa-announce">ijbswa-announce</ulink>
3670 <!-- ~~~~~ New section ~~~~~ -->
3671 <sect1 id="copyright"><title>Copyright and History</title>
3673 <sect2><title>Copyright</title>
3674 <!-- Include copyright.sgml: -->
3676 <!-- end copyright -->
3679 <!-- ~ End section ~ -->
3682 <!-- ~~~~~ New section ~~~~~ -->
3684 <sect2 id="history"><title>History</title>
3685 <!-- Include history.sgml: -->
3687 <!-- end history -->
3691 <!-- ~~~~~ New section ~~~~~ -->
3692 <sect1 id="seealso"><title>See Also</title>
3693 <!-- Include seealso.sgml: -->
3695 <!-- end seealso -->
3700 <!-- ~~~~~ New section ~~~~~ -->
3701 <sect1 id="appendix"><title>Appendix</title>
3704 <!-- ~~~~~ New section ~~~~~ -->
3706 <title>Regular Expressions</title>
3708 <application>Privoxy</application> can use <quote>regular expressions</quote>
3709 in various config files. Assuming support for <quote>pcre</quote> (Perl
3710 Compatible Regular Expressions) is compiled in, which is the default. Such
3711 configuration directives do not require regular expressions, but they can be
3712 used to increase flexibility by matching a pattern with wild-cards against
3717 If you are reading this, you probably don't understand what <quote>regular
3718 expressions</quote> are, or what they can do. So this will be a very brief
3719 introduction only. A full explanation would require a book ;-)
3723 <quote>Regular expressions</quote> is a way of matching one character
3724 expression against another to see if it matches or not. One of the
3725 <quote>expressions</quote> is a literal string of readable characters
3726 (letter, numbers, etc), and the other is a complex string of literal
3727 characters combined with wild-cards, and other special characters, called
3728 meta-characters. The <quote>meta-characters</quote> have special meanings and
3729 are used to build the complex pattern to be matched against. Perl Compatible
3730 Regular Expressions is an enhanced form of the regular expression language
3731 with backward compatibility.
3735 To make a simple analogy, we do something similar when we use wild-card
3736 characters when listing files with the <command>dir</command> command in DOS.
3737 <literal>*.*</literal> matches all filenames. The <quote>special</quote>
3738 character here is the asterisk which matches any and all characters. We can be
3739 more specific and use <literal>?</literal> to match just individual
3740 characters. So <quote>dir file?.text</quote> would match
3741 <quote>file1.txt</quote>, <quote>file2.txt</quote>, etc. We are pattern
3742 matching, using a similar technique to <quote>regular expressions</quote>!
3746 Regular expressions do essentially the same thing, but are much, much more
3747 powerful. There are many more <quote>special characters</quote> and ways of
3748 building complex patterns however. Let's look at a few of the common ones,
3749 and then some examples:
3754 <emphasis>.</emphasis> - Matches any single character, e.g. <quote>a</quote>,
3755 <quote>A</quote>, <quote>4</quote>, <quote>:</quote>, or <quote>@</quote>.
3757 </simplelist></para>
3761 <emphasis>?</emphasis> - The preceding character or expression is matched ZERO or ONE
3764 </simplelist></para>
3768 <emphasis>+</emphasis> - The preceding character or expression is matched ONE or MORE
3771 </simplelist></para>
3775 <emphasis>*</emphasis> - The preceding character or expression is matched ZERO or MORE
3778 </simplelist></para>
3782 <emphasis>\</emphasis> - The <quote>escape</quote> character denotes that
3783 the following character should be taken literally. This is used where one of the
3784 special characters (e.g. <quote>.</quote>) needs to be taken literally and
3785 not as a special meta-character.
3787 </simplelist></para>
3791 <emphasis>[]</emphasis> - Characters enclosed in brackets will be matched if
3792 any of the enclosed characters are encountered.
3794 </simplelist></para>
3798 <emphasis>()</emphasis> - parentheses are used to group a sub-expression,
3799 or multiple sub-expressions.
3801 </simplelist></para>
3805 <emphasis>|</emphasis> - The <quote>bar</quote> character works like an
3806 <quote>or</quote> conditional statement. A match is successful if the
3807 sub-expression on either side of <quote>|</quote> matches.
3809 </simplelist></para>
3813 <emphasis>s/string1/string2/g</emphasis> - This is used to rewrite strings of text.
3814 <quote>string1</quote> is replaced by <quote>string2</quote> in this
3817 </simplelist></para>
3820 These are just some of the ones you are likely to use when matching URLs with
3821 <application>Privoxy</application>, and is a long way from a definitive
3822 list. This is enough to get us started with a few simple examples which may
3823 be more illuminating:
3827 <emphasis><literal>/.*/banners/.*</literal></emphasis> - A simple example
3828 that uses the common combination of <quote>.</quote> and <quote>*</quote> to
3829 denote any character, zero or more times. In other words, any string at all.
3830 So we start with a literal forward slash, then our regular expression pattern
3831 (<quote>.*</quote>) another literal forward slash, the string
3832 <quote>banners</quote>, another forward slash, and lastly another
3833 <quote>.*</quote>. We are building
3834 a directory path here. This will match any file with the path that has a
3835 directory named <quote>banners</quote> in it. The <quote>.*</quote> matches
3836 any characters, and this could conceivably be more forward slashes, so it
3837 might expand into a much longer looking path. For example, this could match:
3838 <quote>/eye/hate/spammers/banners/annoy_me_please.gif</quote>, or just
3839 <quote>/banners/annoying.html</quote>, or almost an infinite number of other
3840 possible combinations, just so it has <quote>banners</quote> in the path
3845 A now something a little more complex:
3849 <emphasis><literal>/.*/adv((er)?ts?|ertis(ing|ements?))?/</literal></emphasis> -
3850 We have several literal forward slashes again (<quote>/</quote>), so we are
3851 building another expression that is a file path statement. We have another
3852 <quote>.*</quote>, so we are matching against any conceivable sub-path, just so
3853 it matches our expression. The only true literal that <emphasis>must
3854 match</emphasis> our pattern is <application>adv</application>, together with
3855 the forward slashes. What comes after the <quote>adv</quote> string is the
3860 Remember the <quote>?</quote> means the preceding expression (either a
3861 literal character or anything grouped with <quote>(...)</quote> in this case)
3862 can exist or not, since this means either zero or one match. So
3863 <quote>((er)?ts?|ertis(ing|ements?))</quote> is optional, as are the
3864 individual sub-expressions: <quote>(er)</quote>,
3865 <quote>(ing|ements?)</quote>, and the <quote>s</quote>. The <quote>|</quote>
3866 means <quote>or</quote>. We have two of those. For instance,
3867 <quote>(ing|ements?)</quote>, can expand to match either <quote>ing</quote>
3868 <emphasis>OR</emphasis> <quote>ements?</quote>. What is being done here, is an
3869 attempt at matching as many variations of <quote>advertisement</quote>, and
3870 similar, as possible. So this would expand to match just <quote>adv</quote>,
3871 or <quote>advert</quote>, or <quote>adverts</quote>, or
3872 <quote>advertising</quote>, or <quote>advertisement</quote>, or
3873 <quote>advertisements</quote>. You get the idea. But it would not match
3874 <quote>advertizements</quote> (with a <quote>z</quote>). We could fix that by
3875 changing our regular expression to:
3876 <quote>/.*/adv((er)?ts?|erti(s|z)(ing|ements?))?/</quote>, which would then match
3881 <emphasis><literal>/.*/advert[0-9]+\.(gif|jpe?g)</literal></emphasis> - Again
3882 another path statement with forward slashes. Anything in the square brackets
3883 <quote>[]</quote> can be matched. This is using <quote>0-9</quote> as a
3884 shorthand expression to mean any digit one through nine. It is the same as
3885 saying <quote>0123456789</quote>. So any digit matches. The <quote>+</quote>
3886 means one or more of the preceding expression must be included. The preceding
3887 expression here is what is in the square brackets -- in this case, any digit
3888 one through nine. Then, at the end, we have a grouping: <quote>(gif|jpe?g)</quote>.
3889 This includes a <quote>|</quote>, so this needs to match the expression on
3890 either side of that bar character also. A simple <quote>gif</quote> on one side, and the other
3891 side will in turn match either <quote>jpeg</quote> or <quote>jpg</quote>,
3892 since the <quote>?</quote> means the letter <quote>e</quote> is optional and
3893 can be matched once or not at all. So we are building an expression here to
3894 match image GIF or JPEG type image file. It must include the literal
3895 string <quote>advert</quote>, then one or more digits, and a <quote>.</quote>
3896 (which is now a literal, and not a special character, since it is escaped
3897 with <quote>\</quote>), and lastly either <quote>gif</quote>, or
3898 <quote>jpeg</quote>, or <quote>jpg</quote>. Some possible matches would
3899 include: <quote>//advert1.jpg</quote>,
3900 <quote>/nasty/ads/advert1234.gif</quote>,
3901 <quote>/banners/from/hell/advert99.jpg</quote>. It would not match
3902 <quote>advert1.gif</quote> (no leading slash), or
3903 <quote>/adverts232.jpg</quote> (the expression does not include an
3904 <quote>s</quote>), or <quote>/advert1.jsp</quote> (<quote>jsp</quote> is not
3905 in the expression anywhere).
3909 <emphasis><literal>s/microsoft(?!.com)/MicroSuck/i</literal></emphasis> - This is
3910 a substitution. <quote>MicroSuck</quote> will replace any occurrence of
3911 <quote>microsoft</quote>. The <quote>i</quote> at the end of the expression
3912 means ignore case. The <quote>(?!.com)</quote> means
3913 the match should fail if <quote>microsoft</quote> is followed by
3914 <quote>.com</quote>. In other words, this acts like a <quote>NOT</quote>
3915 modifier. In case this is a hyperlink, we don't want to break it ;-).
3919 We are barely scratching the surface of regular expressions here so that you
3920 can understand the default <application>Privoxy</application>
3921 configuration files, and maybe use this knowledge to customize your own
3922 installation. There is much, much more that can be done with regular
3923 expressions. Now that you know enough to get started, you can learn more on
3928 More reading on Perl Compatible Regular expressions:
3929 <ulink url="http://www.perldoc.com/perl5.6/pod/perlre.html">http://www.perldoc.com/perl5.6/pod/perlre.html</ulink>
3934 <!-- ~ End section ~ -->
3937 <!-- ~~~~~ New section ~~~~~ -->
3939 <title><application>Privoxy</application>'s Internal Pages</title>
3942 Since <application>Privoxy</application> proxies each requested
3943 web page, it is easy for <application>Privoxy</application> to
3944 trap certain special URLs. In this way, we can talk directly to
3945 <application>Privoxy</application>, and see how it is
3946 configured, see how our rules are being applied, change these
3947 rules and other configuration options, and even turn
3948 <application>Privoxy's</application> filtering off, all with
3954 The URLs listed below are the special ones that allow direct access
3955 to <application>Privoxy</application>. Of course,
3956 <application>Privoxy</application> must be running to access these. If
3957 not, you will get a friendly error message. Internet access is not
3970 <ulink url="http://config.privoxy.org/">http://config.privoxy.org/</ulink>
3974 Alternately, this may be reached at <ulink
3975 url="http://p.p/">http://p.p/</ulink>, but this
3976 variation may not work as reliably as the above in some configurations.
3982 Show information about the current configuration:
3986 <ulink url="http://config.privoxy.org/show-status">http://config.privoxy.org/show-status</ulink>
3993 Show the source code version numbers:
3997 <ulink url="http://config.privoxy.org/show-version">http://config.privoxy.org/show-version</ulink>
4004 Show the client's request headers:
4008 <ulink url="http://config.privoxy.org/show-request">http://config.privoxy.org/show-request</ulink>
4015 Show which actions apply to a URL and why:
4019 <ulink url="http://config.privoxy.org/show-url-info">http://config.privoxy.org/show-url-info</ulink>
4026 Toggle Privoxy on or off. In this case, <quote>Privoxy</quote> continues
4027 to run, but only as a pass-through proxy, with no actions taking place:
4031 <ulink url="http://config.privoxy.org/toggle">http://config.privoxy.org/toggle</ulink>
4035 Short cuts. Turn off, then on:
4039 <ulink url="http://config.privoxy.org/toggle?set=disable">http://config.privoxy.org/toggle?set=disable</ulink>
4044 <ulink url="http://config.privoxy.org/toggle?set=enable">http://config.privoxy.org/toggle?set=enable</ulink>
4051 Edit the actions list file:
4055 <ulink url="http://config.privoxy.org/edit-actions">http://config.privoxy.org/edit-actions</ulink>
4064 These may be bookmarked for quick reference.
4068 <sect3 id="bookmarklets">
4069 <title>Bookmarklets</title>
4071 Below are some <quote>bookmarklets</quote> to allow you to easily access a
4072 <quote>mini</quote> version of some of <application>Privoxy's</application>
4073 special pages. They are designed for MS Internet Explorer, but should work
4074 equally well in Netscape, Mozilla, and other browsers which support
4075 JavaScript. They are designed to run directly from your bookmarks - not by
4076 clicking the links below (although that should work for testing).
4079 To save them, right-click the link and choose <quote>Add to Favorites</quote>
4080 (IE) or <quote>Add Bookmark</quote> (Netscape). You will get a warning that
4081 the bookmark <quote>may not be safe</quote> - just click OK. Then you can run the
4082 Bookmarklet directly from your favourites/bookmarks. For even faster access,
4083 you can put them on the <quote>Links</quote> bar (IE) or the <quote>Personal
4084 Toolbar</quote> (Netscape), and run them with a single click.
4092 <ulink 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());">Enable Privoxy</ulink>
4098 <ulink 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());">Disable Privoxy</ulink>
4104 <ulink 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());">Toggle Privoxy</ulink> (Toggles between enabled and disabled)
4110 <ulink 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());">View Privoxy Status</ulink>
4116 <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());">Actions file feedback system</ulink>
4126 Credit: The site which gave me the general idea for these bookmarklets is
4127 <ulink url="http://www.bookmarklets.com">www.bookmarklets.com</ulink>. They
4128 have more information about bookmarklets.
4137 <!-- ~~~~~ New section ~~~~~ -->
4138 <sect2 id="actionsanat">
4139 <title>Anatomy of an Action</title>
4142 The way <application>Privoxy</application> applies <quote>actions</quote>
4143 and <quote>filters</quote> to any given URL can be complex, and not always so
4144 easy to understand what is happening. And sometimes we need to be able to
4145 <emphasis>see</emphasis> just what <application>Privoxy</application> is
4146 doing. Especially, if something <application>Privoxy</application> is doing
4147 is causing us a problem inadvertantly. It can be a little daunting to look at
4148 the actions and filters files themselves, since they tend to be filled with
4149 <quote>regular expressions</quote> whose consequences are not always
4150 so obvious. <application>Privoxy</application> provides the
4151 <ulink url="http://config.privoxy.org/show-url-info">http://config.privoxy.org/show-url-info</ulink>
4152 page that can show us very specifically how <application>actions</application>
4153 are being applied to any given URL. This is a big help for troubleshooting.
4157 First, enter one URL (or partial URL) at the prompt, and then
4158 <application>Privoxy</application> will tell us
4159 how the current configuration will handle it. This will not
4160 help with filtering effects from the <filename>default.filter</filename> file! It
4161 also will not tell you about any other URLs that may be embedded within the
4162 URL you are testing. For instance, images such as ads are expressed as URLs
4163 within the raw page source of HTML pages. So you will only get info for the
4164 actual URL that is pasted into the prompt area -- not any sub-URLs. If you
4165 want to know about embedded URLs like ads, you will have to dig those out of
4166 the HTML source. Use your browser's <quote>View Page Source</quote> option
4167 for this. Or right click on the ad, and grab the URL.
4171 Let's look at an example, <ulink url="http://google.com">google.com</ulink>,
4172 one section at a time:
4177 System default actions:
4179 { -add-header -block -deanimate-gifs -downgrade -fast-redirects -filter
4180 -hide-forwarded -hide-from -hide-referer -hide-user-agent -image
4181 -image-blocker -limit-connect -no-compression -no-cookies-keep
4182 -no-cookies-read -no-cookies-set -no-popups -vanilla-wafer -wafer }
4188 This is the top section, and only tells us of the compiled in defaults. This
4189 is basically what <application>Privoxy</application> would do if there
4190 were not any <quote>actions</quote> defined, i.e. it does nothing. Every action
4191 is disabled. This is not particularly informative for our purposes here. OK,
4198 Matches for http://google.com:
4200 { -add-header -block +deanimate-gifs -downgrade +fast-redirects
4201 +filter{html-annoyances} +filter{js-annoyances} +filter{no-popups}
4202 +filter{webbugs} +filter{nimda} +filter{banners-by-size} +filter{hal}
4203 +filter{fun} +hide-forwarded +hide-from{block} +hide-referer{forge}
4204 -hide-user-agent -image +image-blocker{blank} +no-compression
4205 +no-cookies-keep -no-cookies-read -no-cookies-set +no-popups
4206 -vanilla-wafer -wafer }
4209 { -no-cookies-keep -no-cookies-read -no-cookies-set }
4219 This is much more informative, and tells us how we have defined our
4220 <quote>actions</quote>, and which ones match for our example,
4221 <quote>google.com</quote>. The first grouping shows our default
4222 settings, which would apply to all URLs. If you look at your <quote>actions</quote>
4223 file, this would be the section just below the <quote>aliases</quote> section
4224 near the top. This applies to all URLs as signified by the single forward
4225 slash -- <quote>/</quote>.
4230 These are the default actions we have enabled. But we can define additional
4231 actions that would be exceptions to these general rules, and then list
4232 specific URLs that these exceptions would apply to. Last match wins.
4233 Just below this then are two explict matches for <quote>.google.com</quote>.
4234 The first is negating our various cookie blocking actions (i.e. we will allow
4235 cookies here). The second is allowing <quote>fast-redirects</quote>. Note
4236 that there is a leading dot here -- <quote>.google.com</quote>. This will
4237 match any hosts and sub-domains, in the google.com domain also, such as
4238 <quote>www.google.com</quote>. So, apparently, we have these actions defined
4239 somewhere in the lower part of our actions file, and
4240 <quote>google.com</quote> is referenced in these sections.
4245 And now we pull it altogether in the bottom section and summarize how
4246 <application>Privoxy</application> is appying all its <quote>actions</quote>
4247 to <quote>google.com</quote>:
4256 -add-header -block -deanimate-gifs -downgrade -fast-redirects
4257 +filter{html-annoyances} +filter{js-annoyances} +filter{no-popups}
4258 +filter{webbugs} +filter{nimda} +filter{banners-by-size} +filter{hal}
4259 +filter{fun} +hide-forwarded +hide-from{block} +hide-referer{forge}
4260 -hide-user-agent -image +image-blocker{blank} -limit-connect +no-compression
4261 -no-cookies-keep -no-cookies-read -no-cookies-set +no-popups -vanilla-wafer
4268 Now another example, <quote>ad.doubleclick.net</quote>:
4287 We'll just show the interesting part here, the explicit matches. It is
4288 matched three different times. Each as an <quote>+block +image</quote>,
4289 which is the expanded form of one of our aliases that had been defined as:
4290 <quote>+imageblock</quote>. (<quote>Aliases</quote> are defined in the
4291 first section of the actions file and typically used to combine more
4296 Any one of these would have done the trick and blocked this as an unwanted
4297 image. This is unnecessarily redundant since the last case effectively
4298 would also cover the first. No point in taking chances with these guys
4299 though ;-) Note that if you want an ad or obnoxious
4300 URL to be invisible, it should be defined as <quote>ad.doubleclick.net</quote>
4301 is done here -- as both a <quote>+block</quote> <emphasis>and</emphasis> an
4302 <quote>+image</quote>. The custom alias <quote>+imageblock</quote> does this
4307 One last example. Let's try <quote>http://www.rhapsodyk.net/adsl/HOWTO/</quote>.
4308 This one is giving us problems. We are getting a blank page. Hmmm...
4314 Matches for http://www.rhapsodyk.net/adsl/HOWTO/:
4316 { -add-header -block +deanimate-gifs -downgrade +fast-redirects
4317 +filter{html-annoyances} +filter{js-annoyances} +filter{no-popups}
4318 +filter{webbugs} +filter{nimda} +filter{banners-by-size} +filter{hal}
4319 +filter{fun} +hide-forwarded +hide-from{block} +hide-referer{forge}
4320 -hide-user-agent -image +image-blocker{blank} +no-compression
4321 +no-cookies-keep -no-cookies-read -no-cookies-set +no-popups
4322 -vanilla-wafer -wafer }
4332 Ooops, the <quote>/adsl/</quote> is matching <quote>/ads</quote>! But
4333 we did not want this at all! Now we see why we get the blank page. We could
4334 now add a new action below this that explictly does <emphasis>not</emphasis>
4335 block (-block) pages with <quote>adsl</quote>. There are various ways to
4336 handle such exceptions. Example:
4349 Now the page displays ;-) Be sure to flush your browser's caches when
4350 making such changes. Or, try using <literal>Shift+Reload</literal>.
4354 But now what about a situation where we get no explicit matches like
4368 That actually was very telling and pointed us quickly to where the problem
4369 was. If you don't get this kind of match, then it means one of the default
4370 rules in the first section is causing the problem. This would require some
4371 guesswork, and maybe a little trial and error to isolate the offending rule.
4372 One likely cause would be one of the <quote>{+filter}</quote> actions. Try
4373 adding the URL for the site to one of aliases that turn off <quote>+filter</quote>:
4381 .worldpay.com # for quietpc.com
4390 <quote>{shop}</quote> is an <quote>alias</quote> that expands to
4391 <quote>{ -filter -no-cookies -no-cookies-keep }</quote>. Or you could do
4392 your own exception to negate filtering:
4406 <quote>{fragile}</quote> is an alias that disables most actions. This can be
4407 used as a last resort for problem sites. Remember to flush caches! If this
4408 still does not work, you will have to go through the remaining actions one by
4409 one to find which one(s) is causing the problem.
4418 This program is free software; you can redistribute it
4419 and/or modify it under the terms of the GNU General
4420 Public License as published by the Free Software
4421 Foundation; either version 2 of the License, or (at
4422 your option) any later version.
4424 This program is distributed in the hope that it will
4425 be useful, but WITHOUT ANY WARRANTY; without even the
4426 implied warranty of MERCHANTABILITY or FITNESS FOR A
4427 PARTICULAR PURPOSE. See the GNU General Public
4428 License for more details.
4430 The GNU General Public License should be included with
4431 this file. If not, you can view it at
4432 http://www.gnu.org/copyleft/gpl.html
4433 or write to the Free Software Foundation, Inc., 59
4434 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
4436 $Log: user-manual.sgml,v $
4437 Revision 1.77 2002/04/17 13:51:23 oes
4438 Proofreading, part one
4440 Revision 1.76 2002/04/16 04:25:51 hal9
4441 -Added 'Note to Upgraders' and re-ordered the 'Quickstart' section.
4442 -Note about proxy may need requests to re-read config files.
4444 Revision 1.75 2002/04/12 02:08:48 david__schmidt
4445 Remove OS/2 building info... it is already in the developer-manual
4447 Revision 1.74 2002/04/11 00:54:38 hal9
4448 Add small section on submitting actions.
4450 Revision 1.73 2002/04/10 18:45:15 swa
4453 Revision 1.72 2002/04/10 04:06:19 hal9
4454 Added actions feedback to Bookmarklets section
4456 Revision 1.71 2002/04/08 22:59:26 hal9
4457 Version update. Spell chkconfig correctly :)
4459 Revision 1.70 2002/04/08 20:53:56 swa
4462 Revision 1.69 2002/04/06 05:07:29 hal9
4463 -Add privoxy-man-page.sgml, for man page.
4464 -Add authors.sgml for AUTHORS (and p-authors.sgml)
4465 -Reworked various aspects of various docs.
4466 -Added additional comments to sub-docs.
4468 Revision 1.68 2002/04/04 18:46:47 swa
4469 consistent look. reuse of copyright, history et. al.
4471 Revision 1.67 2002/04/04 17:27:57 swa
4472 more single file to be included at multiple points. make maintaining easier
4474 Revision 1.66 2002/04/04 06:48:37 hal9
4475 Structural changes to allow for conditional inclusion/exclusion of content
4476 based on entity toggles, e.g. 'entity % p-not-stable "INCLUDE"'. And
4477 definition of internal entities, e.g. 'entity p-version "2.9.13"' that will
4478 eventually be set by Makefile.
4479 More boilerplate text for use across multiple docs.
4481 Revision 1.65 2002/04/03 19:52:07 swa
4482 enhance squid section due to user suggestion
4484 Revision 1.64 2002/04/03 03:53:43 hal9
4485 A few minor bug fixes, and touch ups. Ready for review.
4487 Revision 1.63 2002/04/01 16:24:49 hal9
4488 Define entities to include boilerplate text. See doc/source/*.
4490 Revision 1.62 2002/03/30 04:15:53 hal9
4491 - Fix privoxy.org/config links.
4492 - Paste in Bookmarklets from Toggle page.
4493 - Move Quickstart nearer top, and minor rework.
4495 Revision 1.61 2002/03/29 01:31:08 hal9
4498 Revision 1.60 2002/03/27 01:57:34 hal9
4499 Added more to Anatomy section.
4501 Revision 1.59 2002/03/27 00:54:33 hal9
4502 Touch up intro for new name.
4504 Revision 1.58 2002/03/26 22:29:55 swa
4505 we have a new homepage!
4507 Revision 1.57 2002/03/24 20:33:30 hal9
4508 A few minor catch ups with name change.
4510 Revision 1.56 2002/03/24 16:17:06 swa
4511 configure needs to be generated.
4513 Revision 1.55 2002/03/24 16:08:08 swa
4514 we are too lazy to make a block-built
4515 privoxy logo. hence removed the option.
4517 Revision 1.54 2002/03/24 15:46:20 swa
4518 name change related issue.
4520 Revision 1.53 2002/03/24 11:51:00 swa
4521 name change. changed filenames.
4523 Revision 1.52 2002/03/24 11:01:06 swa
4526 Revision 1.51 2002/03/23 15:13:11 swa
4527 renamed every reference to the old name with foobar.
4528 fixed "application foobar application" tag, fixed
4529 "the foobar" with "foobar". left junkbustser in cvs
4530 comments and remarks to history untouched.
4532 Revision 1.50 2002/03/23 05:06:21 hal9
4535 Revision 1.49 2002/03/21 17:01:05 hal9
4536 New section in Appendix.
4538 Revision 1.48 2002/03/12 06:33:01 hal9
4539 Catching up to Andreas and re_filterfile changes.
4541 Revision 1.47 2002/03/11 13:13:27 swa
4542 correct feedback channels
4544 Revision 1.46 2002/03/10 00:51:08 hal9
4545 Added section on JB internal pages in Appendix.
4547 Revision 1.45 2002/03/09 17:43:53 swa
4550 Revision 1.44 2002/03/09 17:08:48 hal9
4551 New section on Jon's actions file editor, and move some stuff around.
4553 Revision 1.43 2002/03/08 00:47:32 hal9
4554 Added imageblock{pattern}.
4556 Revision 1.42 2002/03/07 18:16:55 swa
4559 Revision 1.41 2002/03/07 16:46:43 hal9
4560 Fix a few markup problems for jade.
4562 Revision 1.40 2002/03/07 16:28:39 swa
4563 provide correct feedback channels
4565 Revision 1.39 2002/03/06 16:19:28 hal9
4566 Note on perceived filtering slowdown per FR.
4568 Revision 1.38 2002/03/05 23:55:14 hal9
4569 Stupid I did it again. Double hyphen in comment breaks jade.
4571 Revision 1.37 2002/03/05 23:53:49 hal9
4572 jade barfs on '- -' embedded in comments. - -user option broke it.
4574 Revision 1.36 2002/03/05 22:53:28 hal9
4575 Add new - - user option.
4577 Revision 1.35 2002/03/05 00:17:27 hal9
4578 Added section on command line options.
4580 Revision 1.34 2002/03/04 19:32:07 oes
4581 Changed default port to 8118
4583 Revision 1.33 2002/03/03 19:46:13 hal9
4584 Emphasis on where/how to report bugs, etc
4586 Revision 1.32 2002/03/03 09:26:06 joergs
4587 AmigaOS changes, config is now loaded from PROGDIR: instead of
4588 AmiTCP:db/junkbuster/ if no configuration file is specified on the
4591 Revision 1.31 2002/03/02 22:45:52 david__schmidt
4594 Revision 1.30 2002/03/02 22:00:14 hal9
4595 Updated 'New Features' list. Ran through spell-checker.
4597 Revision 1.29 2002/03/02 20:34:07 david__schmidt
4598 Update OS/2 build section
4600 Revision 1.28 2002/02/24 14:34:24 jongfoster
4601 Formatting changes. Now changing the doctype to DocBook XML 4.1
4602 will work - no other changes are needed.
4604 Revision 1.27 2002/01/11 14:14:32 hal9
4605 Added a very short section on Templates
4607 Revision 1.26 2002/01/09 20:02:50 hal9
4608 Fix bug re: auto-detect config file changes.
4610 Revision 1.25 2002/01/09 18:20:30 hal9
4611 Touch ups for *.action files.
4613 Revision 1.24 2001/12/02 01:13:42 hal9
4616 Revision 1.23 2001/12/02 00:20:41 hal9
4617 Updates for recent changes.
4619 Revision 1.22 2001/11/05 23:57:51 hal9
4620 Minor update for startup now daemon mode.
4622 Revision 1.21 2001/10/31 21:11:03 hal9
4623 Correct 2 minor errors
4625 Revision 1.18 2001/10/24 18:45:26 hal9
4626 *** empty log message ***
4628 Revision 1.17 2001/10/24 17:10:55 hal9
4629 Catching up with Jon's recent work, and a few other things.
4631 Revision 1.16 2001/10/21 17:19:21 swa
4632 wrong url in documentation
4634 Revision 1.15 2001/10/14 23:46:24 hal9
4635 Various minor changes. Fleshed out SEE ALSO section.
4637 Revision 1.13 2001/10/10 17:28:33 hal9
4640 Revision 1.12 2001/09/28 02:57:04 hal9
4643 Revision 1.11 2001/09/28 02:25:20 hal9
4646 Revision 1.9 2001/09/27 23:50:29 hal9
4647 A few changes. A short section on regular expression in appendix.
4649 Revision 1.8 2001/09/25 00:34:59 hal9
4650 Some additions, and re-arranging.
4652 Revision 1.7 2001/09/24 14:31:36 hal9
4655 Revision 1.6 2001/09/24 14:10:32 hal9
4656 Including David's OS/2 installation instructions.
4658 Revision 1.2 2001/09/13 15:27:40 swa
4661 Revision 1.1 2001/09/12 15:36:41 swa
4662 source files for junkbuster documentation
4664 Revision 1.3 2001/09/10 17:43:59 swa
4665 first proposal of a structure.
4667 Revision 1.2 2001/06/13 14:28:31 swa
4668 docs should have an author.
4670 Revision 1.1 2001/06/13 14:20:37 swa
4671 first import of project's documentation for the webserver.