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.82 2002/04/18 12:04:50 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.82 2002/04/18 12:04:50 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 features 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>
150 <application>Privoxy</application> is available both in convenient pre-compiled
151 packages for a wide range of operating systems, and as raw source code.
152 For most users, we recommend using the packages, which can be downloaded from our
153 <ulink url="http://sourceforge.net/projects/ijbswa/">Privoxy Project Page</ulink>.
157 If you like to live on the bleeding edge and are not afraid of using
158 possibly unstable development versions, you can check out the up-to-the-minute
159 version directly from <ulink url="http://sourceforge.net/cvs/?group_id=11118">the
160 CVS repository</ulink> or simply download <ulink
161 url="http://cvs.sourceforge.net/cvstarballs/ijbswa-cvsroot.tar.gz">the nightly CVS
165 <!-- Include supported.sgml boilerplate -->
167 <!-- end boilerplate -->
169 <!-- ~~~~~ New section ~~~~~ -->
170 <sect2 id="installation-packages"><title>Binary Packages</title>
173 Note: If you have a previous <application>Junkbuster</application> or
174 <application>Privoxy</application> installation on your system, you
175 will either need to remove it, or that might be done by the setup
176 procedure. (See below for your platform).
180 In any case <emphasis>be sure to backup your old configuration
181 if it is valuable to you.</emphasis> In that case, also see the
182 <link linkend="upgradersnote">note to upgraders</link>.
186 How to install the binary packages depends on your operating system:
189 <!-- ~~~~~ New section ~~~~~ -->
190 <sect3 id="installation-pack-rpm"><title>Redhat and SuSE RPMs</title>
193 RPMs can be installed with <literal>rpm -Uvh <name-of-rpm.rpm></literal>,
194 and will use <filename>/etc/privoxy</filename> for configuration files.
198 Note that if you have a <application>Junkbuster</application> RPM installed
199 on your system, you need to remove it first, because the packages conflict.
200 Otherwise, RPM will try removing Junkbuster automaticaly, before installing
205 <!-- ~~~~~ New section ~~~~~ -->
206 <sect3 id="installation-deb"><title>Debian</title>
212 <!-- ~~~~~ New section ~~~~~ -->
213 <sect3 id="installation-pack-win"><title>Windows</title>
216 Just double-click the installer, which will guide you through
217 the installation process.
221 <!-- ~~~~~ New section ~~~~~ -->
222 <sect3 id="installation-pack-bintgz"><title>Solaris, NetBSD, FreeBSD, HP-UX</title>
225 Create a new directory, <literal>cd</literal> to it, then unzip and
226 untar the archive. For the most part, you'll have to figure out where
231 <!-- ~~~~~ New section ~~~~~ -->
232 <sect3 id="installation-os2"><title>OS/2</title>
235 First, make sure that no previous installations of
236 <application>Junkbuster</application> and / or
237 <application>Privoxy</application> are left on your
242 Then, just double-click the WarpIN self-installing archive, which will
243 guide you through the installation process. A shadow of the
244 <application>Privoxy</application> executable will be placed in your
245 startup folder so it will start automatically whenever OS/2 starts.
249 The directory you choose to install <application>Privoxy</application>
250 into will contain all of the configuration files.
254 <!-- ~~~~~ New section ~~~~~ -->
255 <sect3 id="installation-mac"><title>Max OSX</title>
261 <!-- ~~~~~ New section ~~~~~ -->
262 <sect3 id="installation-amiga"><title>AmigaOS</title>
264 Unpack the <literal>.lha</literal> archive, then FIXME.
269 <!-- ~~~~~ New section ~~~~~ -->
270 <sect2 id="installation-source"><title>Building from Source</title>
272 <!-- include buildsource.sgml boilerplate: -->
274 <!-- end boilerplate -->
279 <!-- ~ End section ~ -->
282 <!-- ~~~~~ New section ~~~~~ -->
284 <sect1 id="quickstart"><title>Quickstart to Using <application>Privoxy</application></title>
287 <!-- ~~~~~ New section ~~~~~ -->
288 <sect2 id="upgradersnote">
289 <title>Note to Upgraders</title>
291 There are very significant changes from older versions of
292 <application>Junkbuster</application> to the current
293 <application>Privoxy</application>. Configuration is substantially
294 changed. <application>Junkbuster 2.0.x</application> and earlier
295 configuration files will not migrate. The functionality of the old
296 <filename>blockfile</filename>, <filename>cookiefile</filename> and
297 <filename>imagelist</filename>, are now combined into the
298 <quote>actions file</quote> (<filename>default.action</filename>
299 for most installations).
302 A <quote>filter file</quote> (typically <filename>default.filter</filename>)
303 is new with <application>Privoxy 2.9.x</application>, and provides some
304 of the new sophistication (explained below). <filename>config</filename> is
305 much the same as before.
308 If upgrading from a 2.0.x version, you will have to use the new config
309 files, and possibly adapt any personal rules from your older files.
310 When porting personal rules over from the old <filename>blockfile</filename>
311 to the new actions file, please note that even the pattern syntax has
313 If upgrading from 2.9.x development versions, it is still recommended
314 to use the new configuration files.
317 A quick list of things to be aware of before upgrading:
325 The default listening port is now 8118 due to a conflict with another
331 Some installers may remove earlier versions completely. Save any
332 important configuration files!
337 <application>Privoxy</application> is controllable with a web browser
338 at the special URL: <ulink
339 url="http://config.privoxy.org/">http://config.privoxy.org/</ulink>
340 (Shortcut: <ulink url="http://p.p/">http://p.p/</ulink>). Many
341 aspects of configuration can be done here, including temporarily disabling
342 <application>Privoxy</application>.
347 The primary configuration file for cookie management, ad and banner
348 blocking, and many other aspects of <application>Privoxy</application>
349 configuration is <filename>default.action</filename>. It is strongly
350 recommended to become familiar with the new actions concept below,
351 before modifying this file.
356 <!-- I think it is best to keep this somewhat vague, in case -->
357 <!-- the situation changes under our feet. -->
358 Some installers may not automatically start
359 <application>Privoxy</application> after installation.
368 <!-- ~~~~~ New section ~~~~~ -->
370 <title>Starting <application>Privoxy</application></title>
372 Before launching <application>Privoxy</application> for the first time, you
373 will want to configure your browser(s) to use <application>Privoxy</application>
374 as a HTTP and HTTPS proxy. The default is localhost for the proxy address,
375 and port 8118 (earlier versions used port 8000). This is the one required
376 configuration that must be done!
380 With <application>Netscape</application> (and
381 <application>Mozilla</application>), this can be set under <literal>Edit
382 -> Preferences -> Advanced -> Proxies -> HTTP Proxy</literal>.
383 For <application>Internet Explorer</application>: <literal>Tools ->
384 Internet Properties -> Connections -> LAN Setting</literal>. Then,
385 check <quote>Use Proxy</quote> and fill in the appropriate info (Address:
386 localhost, Port: 8118). Include if HTTPS proxy support too.
390 After doing this, flush your browser's disk and memory caches to force a
391 re-reading of all pages and to get rid of any ads that may be cached. You
392 are now ready to start enjoying the benefits of using
393 <application>Privoxy</application>.
398 <application>Privoxy</application> is typically started by specifying the
399 main configuration file to be used on the command line. Example Unix startup
406 # /usr/sbin/privoxy /etc/privoxy/config
412 An init script is provided for SuSE and Redhat.
416 For for SuSE: <command>rcprivoxy start</command>
420 For RedHat: <command>/etc/rc.d/init.d/privoxy start</command>
425 If no configuration file is specified on the command line,
426 <application>Privoxy</application> will look for a file named
427 <filename>config</filename> in the current directory. Except on Win32 where
428 it will try <filename>config.txt</filename>. If no file is specified on the
429 command line and no default configuration file can be found,
430 <application>Privoxy</application> will fail to start.
435 The included default configuration files should give a reasonable starting
436 point. Most of the per site configuration is done in the
437 <quote>actions</quote> files. These are where various cookie actions are
438 defined, ad and banner blocking, and other aspects of
439 <application>Privoxy</application> configuration. There are several such
440 files included, with varying levels of aggressiveness.
444 You will probably want to keep an eye out for sites that require persistent
445 cookies, and add these to <filename>default.action</filename> as needed. By
446 default, most of these will be accepted only during the current browser
447 session (aka <quote>session cookies</quote>), until you add them to the
448 configuration. If you want the browser to handle this instead, you will need
449 to edit <filename>default.action</filename> and disable this feature. If you
450 use more than one browser, it would make more sense to let
451 <application>Privoxy</application> handle this. In which case, the
452 browser(s) should be set to accept all cookies.
456 Another feature where you will probably want to define exceptions for trusted
457 sites is the popup-killing (through the <literal>+popup</literal> and
458 <literal>+filter{popups}</literal> actions), because your favorite shopping,
459 banking, or leisure site may need popups.
463 <application>Privoxy</application> is HTTP/1.1 compliant, but not all of
464 the optional 1.1 features are as yet supported. In the unlikely event that
465 you experience inexplicable problems with browsers that use HTTP/1.1 per default
466 (like <application>Mozilla</application> or recent versions of I.E.), you might
467 try to force HTTP/1.0 compatibility. For Mozilla, look under <literal>Edit ->
468 Preferences -> Debug -> Networking</literal>.
469 Alternatively, set the <quote>+downgrade</quote> config option in
470 <filename>default.action</filename> which will downgrade your browser's HTTP
471 requests from HTTP/1.1 to HTTP/1.0 before processing them.
475 After running <application>Privoxy</application> for a while, you can
476 start to fine tune the configuration to suit your personal, or site,
477 preferences and requirements. There are many, many aspects that can
478 be customized. <quote>Actions</quote> (as specified in <filename>default.action</filename>)
479 can be adjusted by pointing your browser to
480 <ulink url="http://config.privoxy.org/">http://config.privoxy.org/</ulink>
481 (shortcut: <ulink url="http://p.p/">http://p.p/</ulink>),
482 and then follow the link to <quote>edit the actions list</quote>.
483 (This is an internal page and does not require Internet access.)
487 In fact, various aspects of <application>Privoxy</application>
488 configuration can be viewed from this page, including
489 current configuration parameters, source code version numbers,
490 the browser's request headers, and <quote>actions</quote> that apply
491 to a given URL. In addition to the <filename>default.action</filename> file
492 editor mentioned above, <application>Privoxy</application> can also
493 be turned <quote>on</quote> and <quote>off</quote> (toggled) from this page.
497 If you encounter problems, try loading the page without
498 <application>Privoxy</application>. If that helps, enter the URL where
499 you have the problems into <ulink url="http://p.p/show-url-info">the browser
500 based rule tracing utility</ulink>. See which rules apply and why, and
501 then try turning them off for that site one after the other, until the problem
502 is gone. When you have found the culprit, you might want to turn the rest on
507 If the above paragraph sounds gibberish to you, you might want to <ulink
508 url="configuration.html#ACTIONSFILE">read more about the actions concept</ulink>
509 or even dive deep into the <ulink url="appendix.html#ACTIONSANAT">Appendix
514 If you can't get rid of the problem at all, think you've found a bug in
515 Privoxy, want to propose a new feature or smarter rules, please see the
516 chapter "Contacting the Developers, .." below.
522 <!-- ~~~~~ New section ~~~~~ -->
524 <title>Command Line Options</title>
526 <application>Privoxy</application> may be invoked with the following
527 command-line options:
535 <emphasis>--version</emphasis>
538 Print version info and exit, Unix only.
543 <emphasis>--help</emphasis>
546 Print a short usage info and exit, Unix only.
551 <emphasis>--no-daemon</emphasis>
554 Don't become a daemon, i.e. don't fork and become process group
555 leader, don't detach from controlling tty. Unix only.
560 <emphasis>--pidfile FILE</emphasis>
564 On startup, write the process ID to <emphasis>FILE</emphasis>. Delete the
565 <emphasis>FILE</emphasis> on exit. Failure to create or delete the
566 <emphasis>FILE</emphasis> is non-fatal. If no <emphasis>FILE</emphasis>
567 option is given, no PID file will be used. Unix only.
572 <emphasis>--user USER[.GROUP]</emphasis>
576 After (optionally) writing the PID file, assume the user ID of
577 <emphasis>USER</emphasis>, and if included the GID of GROUP. Exit if the
578 privileges are not sufficient to do so. Unix only.
583 <emphasis>configfile</emphasis>
586 If no <emphasis>configfile</emphasis> is included on the command line,
587 <application>Privoxy</application> will look for a file named
588 <quote>config</quote> in the current directory (except on Win32
589 where it will look for <quote>config.txt</quote> instead). Specify
590 full path to avoid confusion.
601 <!-- ~ End section ~ -->
604 <!-- ~~~~~ New section ~~~~~ -->
605 <sect1 id="configuration"><title><application>Privoxy</application> Configuration</title>
607 All <application>Privoxy</application> configuration is stored
608 in text files. These files can be edited with a text editor.
609 Many important aspects of <application>Privoxy</application> can
610 also be controlled easily with a web browser.
615 <!-- ~~~~~ New section ~~~~~ -->
618 <title>Controlling <application>Privoxy</application> with Your Web Browser</title>
620 <application>Privoxy</application>'s user interface can be reached through the special
621 URL <ulink url="http://config.privoxy.org/">http://config.privoxy.org/</ulink>
622 (shortcut: <ulink url="http://p.p/">http://p.p/</ulink>),
623 which is a built-in page and works without Internet access.
624 You will see the following section:
631 Please choose from the following options:
634 * Show information about the current configuration
635 * Show the source code version numbers
636 * Show the request headers.
637 * Show which actions apply to a URL and why
638 * Toggle Privoxy on or off
639 * Edit the actions list
645 This should be self-explanatory. Note the last item is an editor for the
646 <quote>actions list</quote>, which is where much of the ad, banner, cookie,
647 and URL blocking magic is configured as well as other advanced features of
648 <application>Privoxy</application>. This is an easy way to adjust various
649 aspects of <application>Privoxy</application> configuration. The actions
650 file, and other configuration files, are explained in detail below.
654 <quote>Toggle Privoxy On or Off</quote> is handy for sites that might
655 have problems with your current actions and filters. You can in fact use
656 it as a test to see whether it is <application>Privoxy</application>
657 causing the problem or not. <application>Privoxy</application> continues
658 to run as a proxy in this case, but all filtering is disabled. There
659 is even a toggle Bookmarklet offered, so that you can toggle
660 <application>Privoxy</application> with one click from your browser.
666 <!-- ~ End section ~ -->
671 <!-- ~~~~~ New section ~~~~~ -->
674 <title>Configuration Files Overview</title>
676 For Unix, *BSD and Linux, all configuration files are located in
677 <filename>/etc/privoxy/</filename> by default. For MS Windows, OS/2, and
678 AmigaOS these are all in the same directory as the
679 <application>Privoxy</application> executable. <![%p-not-stable;[ The name
680 and number of configuration files has changed from previous versions, and is
681 subject to change as development progresses.]]>
685 The installed defaults provide a reasonable starting point, though possibly
686 aggressive by some standards. For the time being, there are only three
687 default configuration files (this may change in time):
695 The main configuration file is named <filename>config</filename>
696 on Linux, Unix, BSD, OS/2, and AmigaOS and <filename>config.txt</filename>
703 <filename>default.action</filename> (the actions file) is used to define
704 which of a set of various <quote>actions</quote> relating to images, banners,
705 pop-ups, access restrictions, banners and cookies are to be applied where.
706 There is a web based editor for this file that can be accessed at <ulink
707 url="http://config.privoxy.org/edit-actions/">http://config.privoxy.org/edit-actions/</ulink>
708 (Shortcut: <ulink url="http://p.p/edit-actions/">http://p.p/edit-actions/</ulink>).
709 (Other actions files are included as well with differing levels of filtering
710 and blocking, e.g. <filename>basic.action</filename>.)
716 <filename>default.filter</filename> (the filter file) can be used to re-write the raw
717 page content, including viewable text as well as embedded HTML and JavaScript,
718 and whatever else lurks on any given web page. The filtering jobs are only
719 pre-defined here; whether to apply them or not is up to the actions file.
727 All files use the <quote><literal>#</literal></quote> character to denote a
728 comment (the rest of the line will be ignored) and understand line continuation
729 through placing a backslash ("<literal>\</literal>") as the very last character
730 in a line. If the <literal>#</literal> is preceded by a backslash, it looses
731 its special function. Placing a <literal>#</literal> in front of an otherwise
732 valid configuration line to prevent it from being interpreted is called "commenting
737 <filename>default.action</filename> and <filename>default.filter</filename>
738 can use Perl style regular expressions for maximum flexibility.
742 After making any changes, there is no need to restart
743 <application>Privoxy</application> in order for the changes to take
744 effect. <application>Privoxy</application> detects such changes
745 automatically. Note, however, that it may take one or two additional
746 requests for the change to take effect. When changing the listening address
747 of <application>Privoxy</application>, these <quote>wake up</quote> requests
748 must obviously be sent to the <emphasis>old</emphasis> listening address.
753 While under development, the configuration content is subject to change.
754 The below documentation may not be accurate by the time you read this.
755 Also, what constitutes a <quote>default</quote> setting, may change, so
756 please check all your configuration files on important issues.
762 <!-- ~~~~~ New section ~~~~~ -->
765 <title>The Main Configuration File</title>
767 Again, the main configuration file is named <filename>config</filename> on
768 Linux/Unix/BSD and OS/2, and <filename>config.txt</filename> on Windows.
769 Configuration lines consist of an initial keyword followed by a list of
770 values, all separated by whitespace (any number of spaces or tabs). For
778 <emphasis>confdir /etc/privoxy</emphasis>
785 Assigns the value <literal>/etc/privoxy</literal> to the option
786 <literal>confdir</literal> and thus indicates that the configuration
787 directory is named <quote>/etc/privoxy/</quote>.
791 All options in the config file except for <literal>confdir</literal> and
792 <literal>logdir</literal> are optional. Watch out in the below description
793 for what happens if you leave them unset.
797 The main config file controls all aspects of <application>Privoxy</application>'s
798 operation that are not location dependent (i.e. they apply universally, no matter
799 where you may be surfing).
803 <!-- ~~~~~ New section ~~~~~ -->
806 <title>Configuration and Log File Locations</title>
809 <application>Privoxy</application> can (and normally does) use a number of
810 other files for additional configuration and logging.
811 This section of the configuration file tells <application>Privoxy</application>
812 where to find those other files.
816 <sect4><title>confdir</title>
820 <term>Specifies:</term>
822 <para>The directory where the other configuration files are located</para>
826 <term>Type of value:</term>
828 <para>Path name</para>
832 <term>Default value:</term>
834 <para>/etc/privoxy (Unix) <emphasis>or</emphasis> <application>Privoxy</application> installation dir (Windows) </para>
838 <term>Effect if unset:</term>
840 <para><emphasis>Mandatory</emphasis></para>
847 No trailing <quote><literal>/</literal></quote>, please
850 When development goes modular and multi-user, the blocker, filter, and
851 per-user config will be stored in subdirectories of <quote>confdir</quote>.
852 For now, the configuration directory structure is flat, except for
853 <filename>confdir/templates</filename>, where the HTML templates for CGI
854 output reside (e.g. <application>Privoxy's</application> 404 error page).
862 <sect4><title>logdir</title>
866 <term>Specifies:</term>
869 The directory where all logging takes place (i.e. where <filename>logfile</filename> and
870 <filename>jarfile</filename> are located)
875 <term>Type of value:</term>
877 <para>Path name</para>
881 <term>Default value:</term>
883 <para>/var/log/privoxy (Unix) <emphasis>or</emphasis> <application>Privoxy</application> installation dir (Windows) </para>
887 <term>Effect if unset:</term>
889 <para><emphasis>Mandatory</emphasis></para>
896 No trailing <quote><literal>/</literal></quote>, please
903 <sect4><title>actionsfile</title>
907 <term>Specifies:</term>
910 The actions file to use
915 <term>Type of value:</term>
917 <para>File name, relative to <literal>confdir</literal></para>
921 <term>Default value:</term>
923 <para>default.action (Unix) <emphasis>or</emphasis> default.action.txt (Windows)</para>
927 <term>Effect if unset:</term>
930 No action is taken at all. Simple neutral proxying.
938 There is no point in using <application>Privoxy</application> without
939 an actions file. There are three different actions files included in the
940 distribution, with varying degrees of aggressiveness:
941 <filename>default.action</filename>, <filename>intermediate.action</filename> and
942 <filename>advanced.action</filename>.
949 <sect4><title>filterfile</title>
953 <term>Specifies:</term>
956 The filter file to use
961 <term>Type of value:</term>
963 <para>File name, relative to <literal>confdir</literal></para>
967 <term>Default value:</term>
969 <para>default.filter (Unix) <emphasis>or</emphasis> default.filter.txt (Windows)</para>
973 <term>Effect if unset:</term>
976 No textual content filtering takes place, i.e. all
977 <literal>+filter{<replaceable class="parameter">name</replaceable>}</literal>
978 actions in the actions file are turned off
986 The <quote>default.filter</quote> file contains content modification rules
987 that use <quote>regular expressions</quote>. These rules permit powerful
988 changes on the content of Web pages, e.g., you could disable your favorite
989 JavaScript annoyances, re-write the actual displayed text, or just have some
990 fun replacing <quote>Microsoft</quote> with <quote>MicroSuck</quote> wherever
991 it appears on a Web page.
998 <sect4><title>logfile</title>
1002 <term>Specifies:</term>
1010 <term>Type of value:</term>
1012 <para>File name, relative to <literal>logdir</literal></para>
1016 <term>Default value:</term>
1018 <para>logfile (Unix) <emphasis>or</emphasis> privoxy.log (Windows)</para>
1022 <term>Effect if unset:</term>
1025 No log file is used, all log messages go to the console (<literal>stderr</literal>).
1033 The windows version will additionally log to the console.
1036 The logfile is where all logging and error messages are written. The level
1037 of detail and number of messages are set with the <literal>debug</literal>
1038 option (see below). The logfile can be useful for tracking down a problem with
1039 <application>Privoxy</application> (e.g., it's not blocking an ad you
1040 think it should block) but in most cases you probably will never look at it.
1043 Your logfile will grow indefinitely, and you will probably want to
1044 periodically remove it. On Unix systems, you can do this with a cron job
1045 (see <quote>man cron</quote>). For Redhat, a <command>logrotate</command>
1046 script has been included.
1049 On SuSE Linux systems, you can place a line like <quote>/var/log/privoxy.*
1050 +1024k 644 nobody.nogroup</quote> in <filename>/etc/logfiles</filename>, with
1051 the effect that cron.daily will automatically archive, gzip, and empty the
1052 log, when it exceeds 1M size.
1059 <sect4><title>jarfile</title>
1063 <term>Specifies:</term>
1066 The file to store intercepted cookies in
1071 <term>Type of value:</term>
1073 <para>File name, relative to <literal>logdir</literal></para>
1077 <term>Default value:</term>
1079 <para>jarfile (Unix) <emphasis>or</emphasis> privoxy.jar (Windows)</para>
1083 <term>Effect if unset:</term>
1086 Intercepted cookies are not stored at all.
1094 The jarfile may grow to ridiculous sizes over time.
1101 <sect4><title>trustfile</title>
1105 <term>Specifies:</term>
1108 The trust file to use
1113 <term>Type of value:</term>
1115 <para>File name, relative to <literal>confdir</literal></para>
1119 <term>Default value:</term>
1121 <para><emphasis>Unset (commented out)</emphasis>. When activated: trust (Unix) <emphasis>or</emphasis> trust.txt (Windows)</para>
1125 <term>Effect if unset:</term>
1128 The whole trust mechanism is turned off.
1136 The trust mechanism is an experimental feature for building white-lists and should
1137 be used with care. It is <emphasis>NOT</emphasis> recommended for the casual user.
1140 If you specify a trust file, <application>Privoxy</application> will only allow
1141 access to sites that are named in the trustfile.
1142 You can also mark sites as trusted referrers (with <literal>+</literal>), with
1143 the effect that access to untrusted sites will be granted, if a link from a
1144 trusted referrer was used.
1145 The link target will then be added to the <quote>trustfile</quote>.
1146 Possible applications include limiting Internet access for children.
1149 If you use <literal>+</literal> operator in the trust file, it may grow considerably over time.
1158 <!-- ~ End section ~ -->
1162 <!-- ~~~~~ New section ~~~~~ -->
1165 <title>Local Set-up Documentation</title>
1168 If you intend to operate <application>Privoxy</application> for more users
1169 that just yourself, it might be a good idea to let them know how to reach
1170 you, what you block and why you do that, your policies etc.
1173 <sect4><title>trust-info-url</title>
1177 <term>Specifies:</term>
1180 A URL to be displayed in the error page that users will see if access to an untrusted page is denied.
1185 <term>Type of value:</term>
1191 <term>Default value:</term>
1193 <para>Two example URL are provided</para>
1197 <term>Effect if unset:</term>
1200 No links are displayed on the "untrusted" error page.
1208 The value of this option only matters if the experimental trust mechanism has been
1209 activated. (See <literal>trustfile</literal> above.)
1212 If you use the trust mechanism, it is a good idea to write up some on-line
1213 documentation about your trust policy and to specify the URL(s) here.
1214 Use multiple times for multiple URLs.
1217 The URL(s) should be added to the trustfile as well, so users don't end up
1218 locked out from the information on why they were locked out in the first place!
1225 <sect4><title>admin-address</title>
1229 <term>Specifies:</term>
1232 An email address to reach the proxy administrator.
1237 <term>Type of value:</term>
1239 <para>Email address</para>
1243 <term>Default value:</term>
1245 <para><emphasis>Unset</emphasis></para>
1249 <term>Effect if unset:</term>
1252 No email address is displayed on error pages and the CGI user interface.
1260 If both <literal>admin-address</literal> and <literal>proxy-info-url</literal>
1261 are unset, the whole "Local Privoxy Support" box on all generated pages will
1269 <sect4><title>proxy-info-url</title>
1273 <term>Specifies:</term>
1276 A URL to documentation about the local <application>Privoxy</application> setup,
1277 configuration or policies.
1282 <term>Type of value:</term>
1288 <term>Default value:</term>
1290 <para><emphasis>Unset</emphasis></para>
1294 <term>Effect if unset:</term>
1297 No link to local documentation is displayed on error pages and the CGI user interface.
1305 If both <literal>admin-address</literal> and <literal>proxy-info-url</literal>
1306 are unset, the whole "Local Privoxy Support" box on all generated pages will
1310 This URL shouldn't be blocked ;-)
1318 <!-- ~ End section ~ -->
1320 <!-- ~~~~~ New section ~~~~~ -->
1323 <title>Debugging</title>
1326 These options are mainly useful when tracing a problem.
1327 Note that you might also want to invoke
1328 <application>Privoxy</application> with the <literal>--no-daemon</literal>
1329 command line option when debugging.
1332 <sect4><title>debug</title>
1336 <term>Specifies:</term>
1339 Key values that determine what information gets logged.
1344 <term>Type of value:</term>
1346 <para>Integer values</para>
1350 <term>Default value:</term>
1352 <para>12289 (i.e.: URLs plus informational and warning messages)</para>
1356 <term>Effect if unset:</term>
1359 Nothing gets logged.
1367 The available debug levels are:
1371 debug 1 # show each GET/POST/CONNECT request
1372 debug 2 # show each connection status
1373 debug 4 # show I/O status
1374 debug 8 # show header parsing
1375 debug 16 # log all data into the logfile
1376 debug 32 # debug force feature
1377 debug 64 # debug regular expression filter
1378 debug 128 # debug fast redirects
1379 debug 256 # debug GIF de-animation
1380 debug 512 # Common Log Format
1381 debug 1024 # debug kill pop-ups
1382 debug 4096 # Startup banner and warnings.
1383 debug 8192 # Non-fatal errors
1387 To select multiple debug levels, you can either add them or use
1388 multiple <literal>debug</literal> lines.
1391 A debug level of 1 is informative because it will show you each request
1392 as it happens. <emphasis>1, 4096 and 8192 are highly recommended</emphasis>
1393 so that you will notice when things go wrong. The other levels are probably
1394 only of interest if you are hunting down a specific problem. They can produce
1395 a hell of an output (especially 16).
1399 The reporting of <emphasis>fatal</emphasis> errors (i.e. ones which crash
1400 <application>Privoxy</application>) is always on and cannot be disabled.
1403 If you want to use CLF (Common Log Format), you should set <quote>debug
1404 512</quote> <emphasis>ONLY</emphasis> and not enable anything else.
1411 <sect4><title>single-threaded</title>
1415 <term>Specifies:</term>
1418 Whether to run only one server thread
1423 <term>Type of value:</term>
1425 <para><emphasis>None</emphasis></para>
1429 <term>Default value:</term>
1431 <para><emphasis>Unset</emphasis></para>
1435 <term>Effect if unset:</term>
1438 Multi-threaded (or, where unavailable: forked) operation, i.e. the ability to
1439 serve multiple requests simultaneously.
1447 This option is only there for debug purposes and you should never
1448 need to use it. <emphasis>It will drastically reduce performance.</emphasis>
1457 <!-- ~~~~~ New section ~~~~~ -->
1460 <title>Access Control and Security</title>
1463 This section of the config file controls the security-relevant aspects
1464 of <application>Privoxy</application>'s configuration.
1467 <sect4><title>listen-address</title>
1471 <term>Specifies:</term>
1474 The IP address and TCP port on which <application>Privoxy</application> will
1475 listen for client requests.
1480 <term>Type of value:</term>
1482 <para>[<replaceable class="parameter">IP-Address</replaceable>]:<replaceable class="parameter">Port</replaceable></para>
1486 <term>Default value:</term>
1488 <para>localhost:8118</para>
1492 <term>Effect if unset:</term>
1495 Bind to localhost (127.0.0.1), port 8118. This is suitable and recommended for
1496 home users who run <application>Privoxy</application> on the same machine as
1505 You will need to configure your browser(s) to this proxy address and port.
1508 If you already have another service running on port 8118, or if you want to
1509 serve requests from other machines (e.g. on your local network) as well, you
1510 will need to override the default.
1513 If you leave out the IP address, <application>Privoxy</application> will
1514 bind to all interfaces (addresses) on your machine and may become reachable
1515 from the Internet. In that case, consider using access control lists (acl's)
1516 (see <quote>ACLs</quote> below), or a firewall.
1521 <term>Example:</term>
1524 Suppose you are running <application>Privoxy</application> on
1525 a machine which has the address 192.168.0.1 on your local private network
1526 (192.168.0.0) and has another outside connection with a different address.
1527 You want it to serve requests from inside only:
1531 listen-address 192.168.0.1:8118
1539 <sect4><title>toggle</title>
1543 <term>Specifies:</term>
1546 Initial state of "toggle" status
1551 <term>Type of value:</term>
1557 <term>Default value:</term>
1563 <term>Effect if unset:</term>
1566 Act as if toggled on
1574 If set to 0, <application>Privoxy</application> will start in
1575 <quote>toggled off</quote> mode, i.e. behave like a normal, content-neutral
1576 proxy. See <literal>enable-remote-toggle</literal>
1577 below. This is not really useful anymore, since toggling is much easier
1578 via <ulink url="http://config.privoxy.org/toggle">the web
1579 interface</ulink> then via editing the <filename>conf</filename> file.
1582 The windows version will only display the toggle icon in the system tray
1583 if this option is present.
1591 <sect4><title>enable-remote-toggle</title>
1594 <term>Specifies:</term>
1597 Whether or not the <ulink url="http://config.privoxy.org/toggle">web-based toggle
1598 feature</ulink> may be used
1603 <term>Type of value:</term>
1609 <term>Default value:</term>
1615 <term>Effect if unset:</term>
1618 The web-based toggle feature is disabled.
1626 When toggled off, <application>Privoxy</application> acts like a normal,
1627 content-neutral proxy, i.e. it acts as if none of the actions applied to
1631 For the time being, access to the toggle feature can <emphasis>not</emphasis> be
1632 controlled separately by <quote>ACLs</quote> or HTTP authentication,
1633 so that everybody who can access <application>Privoxy</application> (see
1634 <quote>ACLs</quote> and <literal>listen-address</literal> above) can
1635 toggle it for all users. So this option is <emphasis>not recommended</emphasis>
1636 for multi-user environments with untrusted users.
1639 Note that you must have compiled <application>Privoxy</application> with
1640 support for this feature, otherwise this option has no effect.
1648 <sect4><title>enable-edit-actions</title>
1651 <term>Specifies:</term>
1654 Whether or not the <ulink url="http://config.privoxy.org/edit-actions">web-based actions
1655 file editor</ulink> may be used
1660 <term>Type of value:</term>
1666 <term>Default value:</term>
1672 <term>Effect if unset:</term>
1675 The web-based actions file editor is disabled.
1683 For the time being, access to the editor can <emphasis>not</emphasis> be
1684 controlled separately by <quote>ACLs</quote> or HTTP authentication,
1685 so that everybody who can access <application>Privoxy</application> (see
1686 <quote>ACLs</quote> and <literal>listen-address</literal> above) can
1687 modify its configuration for all users. So this option is <emphasis>not
1688 recommended</emphasis> for multi-user environments with untrusted users.
1691 Note that you must have compiled <application>Privoxy</application> with
1692 support for this feature, otherwise this option has no effect.
1699 <sect4><title>ACLs: permit-access and deny-access</title>
1702 <term>Specifies:</term>
1705 Who can access what.
1710 <term>Type of value:</term>
1713 <replaceable class="parameter">src_addr</replaceable>[/<replaceable class="parameter">src_masklen</replaceable>]
1714 [<replaceable class="parameter">dst_addr</replaceable>[/<replaceable class="parameter">dst_masklen</replaceable>]]
1717 Where <replaceable class="parameter">src_addr</replaceable> and
1718 <replaceable class="parameter">dst_addr</replaceable> are IP addresses in dotted decimal notation or valid
1719 DNS names, and <replaceable class="parameter">src_masklen</replaceable> and
1720 <replaceable class="parameter">dst_masklen</replaceable> are subnet masks in CIDR notation, i.e. integer
1721 values from 2 to 30 representing the length (in bits) of the network address. The masks and the whole
1722 destination part are optional.
1727 <term>Default value:</term>
1729 <para><emphasis>Unset</emphasis></para>
1733 <term>Effect if unset:</term>
1736 Don't restrict access further than implied by <literal>listen-address</literal>
1744 Access controls are included at the request of ISPs and systems
1745 administrators, and <emphasis>are not usually needed by individual users</emphasis>.
1746 For a typical home user, it will normally suffice to ensure that
1747 <application>Privoxy</application> only listens on the localhost or internal (home)
1748 network address by means of the <literal>listen-address</literal> option.
1751 Please see the warnings in the FAQ that this proxy is not intended to be a substitute
1752 for a firewall or to encourage anyone to defer addressing basic security
1756 Multiple ACL lines are OK.
1757 If any ACLs are specified, then the <application>Privoxy</application>
1758 talks only to IP addresses that match at least one <literal>permit-access</literal> line
1759 and don't match any subsequent <literal>deny-access</literal> line. In other words, the
1760 last match wins, with the default being <literal>deny-access</literal>.
1763 If <application>Privoxy</application> is using a forwarder (see <literal>forward</literal> below)
1764 for a particular destination URL, the <replaceable class="parameter">dst_addr</replaceable>
1765 that is examined is the address of the forwarder and <emphasis>NOT</emphasis> the address
1766 of the ultimate target. This is necessary because it may be impossible for the local
1767 <application>Privoxy</application> to determine the IP address of the
1768 ultimate target (that's often what gateways are used for).
1771 You should prefer using IP addresses over DNS names, because the address lookups take
1772 time. All DNS names must resolve! You can <emphasis>not</emphasis> use domain patterns
1773 like <quote>*.org</quote> or partial domain names. If a DNS name resolves to multiple
1774 IP addresses, only the first one is used.
1777 Denying access to particular sites by ACL may have undesired side effects
1778 if the site in question is hosted on a machine which also hosts other sites.
1783 <term>Examples:</term>
1786 Explicitly define the default behavior if no ACL and
1787 <literal>listen-address</literal> are set: <quote>localhost</quote>
1788 is OK. The absence of a <replaceable class="parameter">dst_addr</replaceable> implies that
1789 <emphasis>all</emphasis> destination addresses are OK:
1793 permit-access localhost
1797 Allow any host on the same class C subnet as www.privoxy.org access to
1798 nothing but www.example.com:
1802 permit-access www.privoxy.org/24 www.example.com/32
1806 Allow access from any host on the 26-bit subnet 192.168.45.64 to anywhere,
1807 with the exception that 192.168.45.73 may not access www.dirty-stuff.example.com:
1811 permit-access 192.168.45.64/26
1812 deny-access 192.168.45.73 www.dirty-stuff.example.com
1820 <sect4><title>buffer-limit</title>
1824 <term>Specifies:</term>
1827 Maximum size of the buffer for content filtering.
1832 <term>Type of value:</term>
1834 <para>Size in Kbytes</para>
1838 <term>Default value:</term>
1844 <term>Effect if unset:</term>
1847 Use a 4MB (4096 KB) limit.
1855 For content filtering, i.e. the <literal>+filter</literal> and
1856 <literal>+deanimate-gif</literal> actions, it is necessary that
1857 <application>Privoxy</application> buffers the entire document body.
1858 This can be potentially dangerous, since a server could just keep sending
1859 data indefinitely and wait for your RAM to exhaust -- with nasty consequences.
1863 When a document buffer size reaches the <literal>buffer-limit</literal>, it is
1864 flushed to the client unfiltered and no further attempt to
1865 filter the rest of the document is made. Remember that there may be multiple threads
1866 running, which might require up to <literal>buffer-limit</literal> Kbytes
1867 <emphasis>each</emphasis>, unless you have enabled <quote>single-threaded</quote>
1877 <!-- ~ End section ~ -->
1880 <!-- ~~~~~ New section ~~~~~ -->
1882 <sect3 id="forwarding">
1883 <title>Forwarding</title>
1886 This feature allows routing of HTTP requests through a chain of
1888 It can be used to better protect privacy and confidentiality when
1889 accessing specific domains by routing requests to those domains
1890 through an anonymous public proxy (see e.g. <ulink
1891 url="http://www.multiproxy.org/anon_list.htm">http://www.multiproxy.org/anon_list.htm</ulink>)
1892 Or to use a caching proxy to speed up browsing. Or chaining to a parent
1893 proxy may be necessary because the machine that <application>Privoxy</application>
1894 runs on has no direct Internet access.
1898 Also specified here are SOCKS proxies. <application>Privoxy</application>
1899 supports the SOCKS 4 and SOCKS 4A protocols.
1902 <sect4><title>forward</title>
1905 <term>Specifies:</term>
1908 To which parent HTTP proxy specific requests should be routed.
1913 <term>Type of value:</term>
1916 <replaceable class="parameter">target_domain</replaceable>[:<replaceable class="parameter">port</replaceable>]
1917 <replaceable class="parameter">http_parent</replaceable>[/<replaceable class="parameter">port</replaceable>]
1920 Where <replaceable class="parameter">target_domain</replaceable> is a domain name pattern (see the
1921 chapter on domain matching in the actions file),
1922 <replaceable class="parameter">http_parent</replaceable> is the address of the parent HTTP proxy
1923 as an IP addresses in dotted decimal notation or as a valid DNS name (or <quote>.</quote> to denote
1924 <quote>no forwarding</quote>, and the optional
1925 <replaceable class="parameter">port</replaceable> parameters are TCP ports, i.e. integer
1926 values from 1 to 64535
1931 <term>Default value:</term>
1933 <para><emphasis>Unset</emphasis></para>
1937 <term>Effect if unset:</term>
1940 Don't use parent HTTP proxies.
1948 If <replaceable class="parameter">http_parent</replaceable> is <quote>.</quote>, then requests are not
1949 forwarded to another HTTP proxy but are made directly to the web servers.
1952 Multiple lines are OK, they are checked in sequence, and the last match wins.
1957 <term>Examples:</term>
1960 Everything goes to an example anonymizing proxy, except SSL on port 443 (which it doesn't handle):
1964 forward .* anon-proxy.example.org:8080
1969 Everything goes to our example ISP's caching proxy, except for requests
1970 to that ISP's sites:
1974 forward .*. caching-proxy.example-isp.net:8000
1975 forward .example-isp.net .
1983 <sect4><title>forward-socks4 and forward-socks4a</title>
1986 <term>Specifies:</term>
1989 Through which SOCKS proxy (and to which parent HTTP proxy) specific requests should be routed.
1994 <term>Type of value:</term>
1997 <replaceable class="parameter">target_domain</replaceable>[:<replaceable class="parameter">port</replaceable>]
1998 <replaceable class="parameter">socks_proxy</replaceable>[/<replaceable class="parameter">port</replaceable>]
1999 <replaceable class="parameter">http_parent</replaceable>[/<replaceable class="parameter">port</replaceable>]
2002 Where <replaceable class="parameter">target_domain</replaceable> is a domain name pattern (see the
2003 chapter on domain matching in the actions file),
2004 <replaceable class="parameter">http_parent</replaceable> and <replaceable class="parameter">socks_proxy</replaceable>
2005 are IP addresses in dotted decimal notation or valid DNS names (<replaceable class="parameter">http_parent</replaceable>
2006 may be <quote>.</quote> to denote <quote>no HTTP forwarding</quote>), and the optional
2007 <replaceable class="parameter">port</replaceable> parameters are TCP ports, i.e. integer values from 1 to 64535
2012 <term>Default value:</term>
2014 <para><emphasis>Unset</emphasis></para>
2018 <term>Effect if unset:</term>
2021 Don't use SOCKS proxies.
2029 Multiple lines are OK, they are checked in sequence, and the last match wins.
2032 The difference between <literal>forward-socks4</literal> and <literal>forward-socks4a</literal>
2033 is that in the SOCKS 4A protocol, the DNS resolution of the target hostname happens on the SOCKS
2034 server, while in SOCKS 4 it happens locally.
2037 If <replaceable class="parameter">http_parent</replaceable> is <quote>.</quote>, then requests are not
2038 forwarded to another HTTP proxy but are made (HTTP-wise) directly to the web servers, albeit through
2044 <term>Examples:</term>
2047 From the company example.com, direct connections are made to all
2048 <quote>internal</quote> domains, but everything outbound goes through
2049 their ISP's proxy by way of example.com's corporate SOCKS 4A gateway to
2054 forward-socks4a .*. socks-gw.example.com:1080 www-cache.example-isp.net:8080
2055 forward .example.com .
2059 A rule that uses a SOCKS 4 gateway for all destinations but no HTTP parent looks like this:
2063 forward-socks4 .*. socks-gw.example.com:1080 .
2071 <sect4><title>Advanced Forwarding Examples</title>
2074 If you have links to multiple ISPs that provide various special content
2075 only to their subscribers, you can configure multiple <application>Privoxies</application>
2076 which have connections to the respective ISPs to act as forwarders to each other, so that
2077 <emphasis>your</emphasis> users can see the internal content of all ISPs.
2081 Assume that host-a has a PPP connection to isp-a.net. And host-b has a PPP connection to
2082 isp-b.net. Both run <application>Privoxy</application>. Their forwarding
2083 configuration can look like this:
2093 forward .isp-b.net host-b:8118
2104 forward .isp-a.net host-a:8118
2109 Now, your users can set their browser's proxy to use either
2110 host-a or host-b and be able to browse the internal content
2111 of both isp-a and isp-b.
2115 If you intend to chain <application>Privoxy</application> and
2116 <application>squid</application> locally, then chain as
2117 <literal>browser -> squid -> privoxy</literal> is the recommended way.
2121 Assuming that <application>Privoxy</application> and <application>squid</application>
2122 run on the same box, your squid configuration could then look like this:
2127 # Define Privoxy as parent proxy (without ICP)
2128 cache_peer 127.0.0.1 parent 8118 7 no-query
2130 # Define ACL for protocol FTP
2133 # Do not forward FTP requests to Privoxy
2134 always_direct allow ftp
2136 # Forward all the rest to Privoxy
2137 never_direct allow all
2142 You would then need to change your browser's proxy settings to <application>squid</application>'s address and port.
2143 Squid normally uses port 3128. If unsure consult <literal>http_port</literal> in <filename>squid.conf</filename>.
2150 <!-- ~ End section ~ -->
2153 <!-- ~~~~~ New section ~~~~~ -->
2156 <title>Windows GUI Options</title>
2158 Removed references to Win32. HB 09/23/01
2161 <application>Privoxy</application> has a number of options specific to the
2162 Windows GUI interface:
2166 If <quote>activity-animation</quote> is set to 1, the
2167 <application>Privoxy</application> icon will animate when
2168 <quote>Privoxy</quote> is active. To turn off, set to 0.
2175 <emphasis>activity-animation 1</emphasis>
2182 If <quote>log-messages</quote> is set to 1,
2183 <application>Privoxy</application> will log messages to the console
2191 <emphasis>log-messages 1</emphasis>
2198 If <quote>log-buffer-size</quote> is set to 1, the size of the log buffer,
2199 i.e. the amount of memory used for the log messages displayed in the
2200 console window, will be limited to <quote>log-max-lines</quote> (see below).
2204 Warning: Setting this to 0 will result in the buffer to grow infinitely and
2205 eat up all your memory!
2212 <emphasis>log-buffer-size 1</emphasis>
2219 <application>log-max-lines</application> is the maximum number of lines held
2220 in the log buffer. See above.
2227 <emphasis>log-max-lines 200</emphasis>
2234 If <quote>log-highlight-messages</quote> is set to 1,
2235 <application>Privoxy</application> will highlight portions of the log
2236 messages with a bold-faced font:
2243 <emphasis>log-highlight-messages 1</emphasis>
2250 The font used in the console window:
2257 <emphasis>log-font-name Comic Sans MS</emphasis>
2264 Font size used in the console window:
2271 <emphasis>log-font-size 8</emphasis>
2278 <quote>show-on-task-bar</quote> controls whether or not
2279 <application>Privoxy</application> will appear as a button on the Task bar
2287 <emphasis>show-on-task-bar 0</emphasis>
2294 If <quote>close-button-minimizes</quote> is set to 1, the Windows close
2295 button will minimize <application>Privoxy</application> instead of closing
2296 the program (close with the exit option on the File menu).
2303 <emphasis>close-button-minimizes 1</emphasis>
2310 The <quote>hide-console</quote> option is specific to the MS-Win console
2311 version of <application>Privoxy</application>. If this option is used,
2312 <application>Privoxy</application> will disconnect from and hide the
2329 <!-- ~ End section ~ -->
2332 <!-- ~~~~~ New section ~~~~~ -->
2333 <sect2 id="actionsfile">
2334 <title>The Actions File</title>
2337 The actions file (<filename>default.action</filename>, formerly:
2338 <filename>actionsfile</filename> or <filename>ijb.action</filename>) is used
2339 to define what actions <application>Privoxy</application> takes for which
2340 URLs, and thus determines how ad images, cookies and various other aspects
2341 of HTTP content and transactions are handled on which sites (or even parts
2346 Anything you want can blocked, including ads, banners, or just some obnoxious
2347 URL that you would rather not see. Cookies can be accepted or rejected, or
2348 accepted only during the current browser session (i.e. not written to disk),
2349 content can be modified, JavaScripts tamed, user-tracking fooled, and much more.
2350 See below for a complete list of available actions.
2353 <!-- ~~~~~ New section ~~~~~ -->
2355 <title>Finding the Right Mix</title>
2357 Note that some actions like cookie suppression or script disabling may
2358 render some sites unusable, which rely on these techniques to work properly.
2359 Finding the right mix of actions is not easy and certainly a matter of personal
2360 taste. In general, it can be said that the more <quote>aggressive</quote>
2361 your default settings (in the top section of the actions file) are,
2362 the more exceptions for <quote>trusted</quote> sites you will have to
2363 make later. If, for example, you want to kill popup windows per default, you'll
2364 have to make exceptions from that rule for sites that you regularly use
2365 and that require popups for actually useful content, like maybe your bank,
2366 favorite shop, or newspaper.
2370 We have tried to provide you with reasonable rules to start from in the
2371 distribution actions file. But there is no general rule of thumb on these
2372 things. There just are too many variables, and sites are constantly changing.
2373 Sooner or later you will want to change the rules (and read this chapter).
2377 <!-- ~~~~~ New section ~~~~~ -->
2379 <title>How to Edit</title>
2381 The easiest way to edit the <quote>actions</quote> file is with a browser by
2382 using our browser-based editor, which is available at <ulink
2383 url="http://config.privoxy.org/edit-actions">http://config.privoxy.org/edit-actions</ulink>.
2387 If you prefer plain text editing to GUIs, you can of course also directly edit the
2388 <filename>default.action</filename> file.
2394 <title>How Actions are Applied to URLs</title>
2396 The actions file is divided into sections. There are special sections,
2397 like the alias sections which will be discussed later. For now let's
2398 concentrate on regular sections: They have a heading line (often split
2399 up to multiple lines for readability) which consist of a list of actions,
2400 separated by whitespace and enclosed in curly braces. Below that, there
2401 is a list of URL patterns, each on a separate line.
2405 To determine which actions apply to a request, the URL of the request is
2406 compared to all patterns in this file. Every time it matches, the list of
2407 applicable actions for the URL is incrementally updated, using the heading
2408 of the section in which the pattern is located. If multiple matches for
2409 the same URL set the same action differently, the last match wins.
2413 You can trace this process by visiting <ulink
2414 url="http://config.privoxy.org/show-url-info">http://config.privoxy.org/show-url-info</ulink>.
2418 More detail on this is provided in the Appendix, <link linkend="ACTIONSANAT">
2419 Anatomy of an Action</link>.
2423 <!-- ~~~~~ New section ~~~~~ -->
2425 <title>Patterns</title>
2427 Generally, a pattern has the form <literal><domain>/<path></literal>,
2428 where both the <literal><domain></literal> and <literal><path></literal>
2429 are optional. (This is why the pattern <literal>/</literal> matches all URLs).
2434 <term><literal>www.example.com/</literal></term>
2437 is a domain-only pattern and will match any request to <literal>www.example.com</literal>,
2438 regardless of which document on that server is requested.
2443 <term><literal>www.example.com</literal></term>
2446 means exactly the same. For domain-only patterns, the trailing <literal>/</literal> may
2452 <term><literal>www.example.com/index.html</literal></term>
2455 matches only the single document <literal>/index.html</literal>
2456 on <literal>www.example.com</literal>.
2461 <term><literal>/index.html</literal></term>
2464 matches the document <literal>/index.html</literal>, regardless of the domain,
2465 i.e. on <emphasis>any</emphasis> web server.
2470 <term><literal>index.html</literal></term>
2473 matches nothing, since it would be interpreted as a domain name and
2474 there is no top-level domain called <literal>.html</literal>.
2480 <sect4><title>The Domain Pattern</title>
2483 The matching of the domain part offers some flexible options: if the
2484 domain starts or ends with a dot, it becomes unanchored at that end.
2490 <term><literal>.example.com</literal></term>
2493 matches any domain that <emphasis>ENDS</emphasis> in
2494 <literal>.example.com</literal>
2499 <term><literal>www.</literal></term>
2502 matches any domain that <emphasis>STARTS</emphasis> with
2503 <literal>www.</literal>
2508 <term><literal>.example.</literal></term>
2511 matches any domain that <emphasis>CONTAINS</emphasis> <literal>.example.</literal>
2512 (Correctly speaking: It matches any FQDN that contains <literal>example</literal> as a domain.)
2519 Additionally, there are wild-cards that you can use in the domain names
2520 themselves. They work pretty similar to shell wild-cards: <quote>*</quote>
2521 stands for zero or more arbitrary characters, <quote>?</quote> stands for
2522 any single character, you can define character classes in square
2523 brackets and all of that can be freely mixed:
2528 <term><literal>ad*.example.com</literal></term>
2531 matches <quote>adserver.example.com</quote>,
2532 <quote>ads.example.com</quote>, etc but not <quote>sfads.example.com</quote>
2537 <term><literal>*ad*.example.com</literal></term>
2540 matches all of the above, and then some.
2545 <term><literal>.?pix.com</literal></term>
2548 matches <literal>www.ipix.com</literal>,
2549 <literal>pictures.epix.com</literal>, <literal>a.b.c.d.e.upix.com</literal> etc.
2554 <term><literal>www[1-9a-ez].example.c*</literal></term>
2557 matches <literal>www1.example.com</literal>,
2558 <literal>www4.example.cc</literal>, <literal>wwwd.example.cy</literal>,
2559 <literal>wwwz.example.com</literal> etc., but <emphasis>not</emphasis>
2560 <literal>wwww.example.com</literal>.
2568 <sect4><title>The Path Pattern</title>
2571 <application>Privoxy</application> uses Perl compatible regular expressions
2572 (through the <ulink url="http://www.pcre.org/">PCRE</ulink> library) for
2577 There is an <link linkend="regex">Appendix</link> with a brief quick-start into regular
2578 expressions, and full (very technical) documentation on PCRE regex syntax is available on-line
2579 at <ulink url="http://www.pcre.org/man.txt">http://www.pcre.org/man.txt</ulink>.
2580 You might also find the Perl man page on regular expressions (<literal>man perlre</literal>)
2581 useful, which is available on-line at <ulink
2582 url="http://www.perldoc.com/perl5.6/pod/perlre.html">http://www.perldoc.com/perl5.6/pod/perlre.html</ulink>.
2586 Note that the path pattern is automatically left-anchored at the <quote>/</quote>,
2587 i.e. it matches as if it would start with a <quote>^</quote>.
2591 Please also note that matching in the path is case
2592 <emphasis>INSENSITIVE</emphasis> by default, but you can switch to case
2593 sensitive at any point in the pattern by using the
2594 <quote>(?-i)</quote> switch:
2595 <literal>www.example.com/(?-i)PaTtErN.*</literal> will match only
2596 documents whose path starts with <literal>PaTtErN</literal> in
2597 <emphasis>exactly</emphasis> this capitalization.
2603 <!-- ~ End section ~ -->
2607 <!-- ~~~~~ New section ~~~~~ -->
2610 <title>Actions</title>
2612 Actions are enabled if preceded with a <quote>+</quote>, and disabled if
2613 preceded with a <quote>-</quote>. Actions are invoked by enclosing the
2614 action name in curly braces (e.g. {+some_action}), followed by a list of
2615 URLs to which the action applies. There are three classes of actions:
2623 Boolean (e.g. <quote>+/-block</quote>):
2629 <emphasis>{+name}</emphasis> # enable this action
2630 <emphasis>{-name}</emphasis> # disable this action
2640 parameterized (e.g. <quote>+/-hide-user-agent</quote>):
2646 <emphasis>{+name{param}}</emphasis> # enable action and set parameter to <quote>param</quote>
2647 <emphasis>{-name}</emphasis> # disable action
2656 Multi-value (e.g. <quote>{+/-add-header{Name: value}}</quote>, <quote>{+/-wafer{name=value}}</quote>):
2662 <emphasis>{+name{param}}</emphasis> # enable action and add parameter <quote>param</quote>
2663 <emphasis>{-name{param}}</emphasis> # remove the parameter <quote>param</quote>
2664 <emphasis>{-name}</emphasis> # disable this action totally
2675 If nothing is specified in this file, no <quote>actions</quote> are taken.
2676 So in this case <application>Privoxy</application> would just be a
2677 normal, non-blocking, non-anonymizing proxy. You must specifically
2678 enable the privacy and blocking features you need (although the
2679 provided default <filename>default.action</filename> file will
2680 give a good starting point).
2684 Later defined actions always over-ride earlier ones. So exceptions
2685 to any rules you make, should come in the latter part of the file. For
2686 multi-valued actions, the actions are applied in the order they are
2691 The list of valid <application>Privoxy</application> <quote>actions</quote> are:
2699 Add the specified HTTP header, which is not checked for validity.
2700 You may specify this many times to specify many different headers:
2706 <emphasis>+add-header{Name: value}</emphasis>
2716 Block this URL totally. In a default installation, a <quote>blocked</quote>
2717 URL will result in bright red banner that says <quote>BLOCKED</quote>,
2718 with a reason why it is being blocked, and an option to see it anyway.
2719 The page displayed for this is the <quote>blocked</quote> template
2726 <emphasis>+block</emphasis>
2736 De-animate all animated GIF images, i.e. reduce them to their last frame.
2737 This will also shrink the images considerably (in bytes, not pixels!). If
2738 the option <quote>first</quote> is given, the first frame of the animation
2739 is used as the replacement. If <quote>last</quote> is given, the last frame
2740 of the animation is used instead, which probably makes more sense for most
2741 banner animations, but also has the risk of not showing the entire last
2742 frame (if it is only a delta to an earlier frame).
2748 <emphasis>+deanimate-gifs{last}</emphasis>
2749 <emphasis>+deanimate-gifs{first}</emphasis>
2758 <quote>+downgrade</quote> will downgrade HTTP/1.1 client requests to
2759 HTTP/1.0 and downgrade the responses as well. Use this action for servers
2760 that use HTTP/1.1 protocol features that
2761 <application>Privoxy</application> doesn't handle well yet. HTTP/1.1
2762 is only partially implemented. Default is not to downgrade requests.
2768 <emphasis>+downgrade</emphasis>
2777 Many sites, like yahoo.com, don't just link to other sites. Instead, they
2778 will link to some script on their own server, giving the destination as a
2779 parameter, which will then redirect you to the final target. URLs resulting
2780 from this scheme typically look like:
2781 <emphasis>http://some.place/some_script?http://some.where-else</emphasis>.
2784 Sometimes, there are even multiple consecutive redirects encoded in the
2785 URL. These redirections via scripts make your web browsing more traceable,
2786 since the server from which you follow such a link can see where you go to.
2787 Apart from that, valuable bandwidth and time is wasted, while your browser
2788 ask the server for one redirect after the other. Plus, it feeds the
2792 The <quote>+fast-redirects</quote> option enables interception of these
2793 types of requests by <application>Privoxy</application>, who will cut off
2794 all but the last valid URL in the request and send a local redirect back to
2795 your browser without contacting the intermediate site(s).
2801 <emphasis>+fast-redirects</emphasis>
2810 Apply the filters in the <literal>section_header</literal>
2811 section of the <filename>default.filter</filename> file to the site(s).
2812 <filename>default.filter</filename> sections are grouped according to like
2813 functionality. <application>Filters</application> can be used to
2814 re-write any of the raw page content. This is a potentially a
2815 very powerful feature!
2822 <emphasis>+filter{section_header}</emphasis>
2829 Filter sections that are pre-defined in the supplied
2830 <filename>default.filter</filename> include:
2836 <emphasis>html-annoyances</emphasis>: Get rid of particularly annoying HTML abuse.
2841 <emphasis>js-annoyances</emphasis>: Get rid of particularly annoying JavaScript abuse
2846 <emphasis>content-cookies</emphasis>: Kill cookies that come in the HTML or JS content
2851 <emphasis>popups</emphasis>: Kill all popups in JS and HTML
2856 <emphasis>frameset-borders</emphasis>: Give frames a border and make them resizable
2861 <emphasis>webbugs</emphasis>: Squish WebBugs (1x1 invisible GIFs used for user tracking)
2866 <emphasis>refresh-tags</emphasis>: Kill automatic refresh tags (for dial-on-demand setups)
2871 <emphasis>fun</emphasis>: Text replacements for subversive browsing fun!
2876 <emphasis>nimda</emphasis>: Remove Nimda (virus) code.
2881 <emphasis>banners-by-size</emphasis>: Kill banners by size (<emphasis>very</emphasis> efficient!)
2886 <emphasis>shockwave-flash</emphasis>: Kill embedded Shockwave Flash objects
2891 <emphasis>crude-parental</emphasis>: Kill all web pages that contain the words "sex" or "warez"
2898 Note: Filtering requires buffering the page content, which may appear to slow down
2899 page rendering since nothing is displayed until all content has passed
2900 the filters. (It does not really take longer, but seems that way since
2901 the page is not incrementally displayed.) This effect will be more noticeable
2902 on slower connections.
2909 Block any existing X-Forwarded-for header, and do not add a new one:
2915 <emphasis>+hide-forwarded</emphasis>
2924 If the browser sends a <quote>From:</quote> header containing your e-mail
2925 address, this either completely removes the header (<quote>block</quote>), or
2926 changes it to the specified e-mail address.
2932 <emphasis>+hide-from{block}</emphasis>
2933 <emphasis>+hide-from{spam@sittingduck.xqq}</emphasis>
2942 Don't send the <quote>Referer:</quote> (sic) header to the web site. You
2943 can block it, forge a URL to the same server as the request (which is
2944 preferred because some sites will not send images otherwise) or set it to a
2945 constant, user defined string of your choice.
2951 <emphasis>+hide-referer{block}</emphasis>
2952 <emphasis>+hide-referer{forge}</emphasis>
2953 <emphasis>+hide-referer{http://nowhere.com}</emphasis>
2962 Alternative spelling of <quote>+hide-referer</quote>. It has the same
2963 parameters, and can be freely mixed with, <quote>+hide-referer</quote>.
2964 (<quote>referrer</quote> is the correct English spelling, however the HTTP
2965 specification has a bug - it requires it to be spelled <quote>referer</quote>.)
2971 <emphasis>+hide-referrer{...}</emphasis>
2980 Change the <quote>User-Agent:</quote> header so web servers can't tell your
2981 browser type. Warning! This breaks many web sites. Specify the
2982 user-agent value you want. Example, pretend to be using Netscape on
2989 <emphasis>+hide-user-agent{Mozilla (X11; I; Linux 2.0.32 i586)}</emphasis>
2996 Or to identify yourself explicitly as a <application>Privoxy</application> user:
3002 <emphasis>+hide-user-agent{Privoxy/1.0}</emphasis>
3007 (Don't change the version number from 1.0 - after all, why tell them?)
3014 <emphasis>+hide-user-agent{browser-type}</emphasis>
3024 Treat this URL as an image. This only matters if it's also <quote>+block</quote>ed,
3025 in which case a <quote>blocked</quote> image can be sent rather than a HTML page.
3026 See <quote>+image-blocker{}</quote> below for the control over what is actually sent.
3027 If you want <emphasis>invisible</emphasis> ads, they should be defined as
3028 <emphasis>images</emphasis> and <emphasis>blocked</emphasis>. And also,
3029 <quote>image-blocker</quote> should be set to <quote>blank</quote>. Note you
3030 cannot treat HTML pages as images in most cases. For instance, frames
3031 require an HTML page to display. So a frame that is an ad, cannot be
3032 treated as an image. Forcing an <quote>image</quote> in this
3033 situation just will not work.
3039 <emphasis>+image</emphasis>
3047 <para> Decides what to do with URLs that end up tagged with <quote>{+block
3048 +image}</quote>, e.g an advertisement. There are four options.
3049 <quote>-image-blocker</quote> will send a HTML <quote>blocked</quote> page,
3050 usually resulting in a <quote>broken image</quote> icon.
3051 <!-- <quote>+image-blocker{logo}</quote> will send a -->
3052 <!-- <application>Privoxy</application> logo -->
3054 <quote>+image-blocker{blank}</quote> will send a 1x1 transparent GIF
3055 image. And finally, <quote>+image-blocker{http://xyz.com}</quote> will send a
3056 HTTP temporary redirect to the specified image. This has the advantage of the
3057 icon being being cached by the browser, which will speed up the display.
3058 <quote>+image-blocker{pattern}</quote> will send a checkerboard type pattern:
3060 <!-- which scales better than the logo (which can get blocky if the browser -->
3061 <!-- enlarges it too much). -->
3067 <!-- <emphasis>+image-blocker{logo}</emphasis> -->
3068 <emphasis>+image-blocker{blank}</emphasis>
3069 <emphasis>+image-blocker{pattern}</emphasis>
3070 <emphasis>+image-blocker{http://p.p/send-banner}</emphasis>
3079 By default (i.e. in the absence of a <quote>+limit-connect</quote>
3080 action), <application>Privoxy</application> will only allow CONNECT
3081 requests to port 443, which is the standard port for https as a
3086 The CONNECT methods exists in HTTP to allow access to secure websites
3087 (https:// URLs) through proxies. It works very simply: the proxy
3088 connects to the server on the specified port, and then short-circuits
3089 its connections to the client <emphasis>and</emphasis> to the remote proxy.
3090 This can be a big security hole, since CONNECT-enabled proxies can
3091 be abused as TCP relays very easily.
3095 If you want to allow CONNECT for more ports than this, or want to forbid
3096 CONNECT altogether, you can specify a comma separated list of ports and
3097 port ranges (the latter using dashes, with the minimum defaulting to 0 and
3105 <emphasis>+limit-connect{443} # This is the default and need no be specified.</emphasis>
3106 <emphasis>+limit-connect{80,443} # Ports 80 and 443 are OK.</emphasis>
3107 <emphasis>+limit-connect{-3, 7, 20-100, 500-} # Port less than 3, 7, 20 to 100</emphasis>
3108 <emphasis> #and above 500 are OK.</emphasis>
3118 <quote>+no-compression</quote> prevents the website from compressing the
3119 data. Some websites do this, which can be a problem for
3120 <application>Privoxy</application>, since <quote>+filter</quote>,
3121 <quote>+no-popup</quote> and <quote>+gif-deanimate</quote> will not work on
3122 compressed data. This will slow down connections to those websites,
3123 though. Default is <quote>no-compression</quote> is turned on.
3130 <emphasis>+nocompression</emphasis>
3139 If the website sets cookies, <quote>no-cookies-keep</quote> will make sure
3140 they are erased when you exit and restart your web browser. This makes
3141 profiling cookies useless, but won't break sites which require cookies so
3142 that you can log in for transactions. Default: on.
3148 <emphasis>+no-cookies-keep</emphasis>
3157 Prevent the website from reading cookies:
3163 <emphasis>+no-cookies-read</emphasis>
3172 Prevent the website from setting cookies:
3178 <emphasis>+no-cookies-set</emphasis>
3187 Filter the website through a built-in filter to disable those obnoxious
3188 JavaScript pop-up windows via window.open(), etc. The two alternative
3189 spellings are equivalent.
3195 <emphasis>+no-popup</emphasis>
3196 <emphasis>+no-popups</emphasis>
3205 This action only applies if you are using a <filename>jarfile</filename>
3206 for saving cookies. It sends a cookie to every site stating that you do not
3207 accept any copyright on cookies sent to you, and asking them not to track
3208 you. Of course, this is a (relatively) unique header they could use to
3215 <emphasis>+vanilla-wafer</emphasis>
3224 This allows you to add an arbitrary cookie. It can be specified multiple
3225 times in order to add as many cookies as you like.
3231 <emphasis>+wafer{name=value}</emphasis>
3242 The meaning of any of the above is reversed by preceding the action with a
3243 <quote>-</quote>, in place of the <quote>+</quote>.
3251 Turn off cookies by default, then allow a few through for specified sites:
3258 # Turn off all persistent cookies
3259 { +no-cookies-read }
3261 # Allow cookies for this browser session ONLY
3262 { +no-cookies-keep }
3264 # Exceptions to the above, sites that benefit from persistent cookies
3265 { -no-cookies-read }
3267 { -no-cookies-keep }
3274 # Alternative way of saying the same thing
3275 {-no-cookies-set -no-cookies-read -no-cookies-keep}
3284 Now turn off <quote>fast redirects</quote>, and then we allow two exceptions:
3294 # Reverse it for these two sites, which don't work right without it.
3296 www.ukc.ac.uk/cgi-bin/wac\.cgi\?
3304 Turn on page filtering according to rules in the defined sections
3305 of <filename>default.filter</filename>, and make one exception for
3313 # Run everything through the filter file, using only the
3314 # specified sections:
3315 +filter{html-annoyances} +filter{js-annoyances} +filter{no-popups}\
3316 +filter{webbugs} +filter{nimda} +filter{banners-by-size}
3318 # Then disable filtering of code from sourceforge!
3320 .cvs.sourceforge.net
3327 Now some URLs that we want <quote>blocked</quote> (normally generates
3328 the <quote>blocked</quote> banner). Many of these use regular expressions
3329 that will expand to match multiple URLs:
3338 /.*/(.*[-_.])?ads?[0-9]?(/|[-_.].*|\.(gif|jpe?g))
3339 /.*/(.*[-_.])?count(er)?(\.cgi|\.dll|\.exe|[?/])
3340 /.*/(ng)?adclient\.cgi
3341 /.*/(plain|live|rotate)[-_.]?ads?/
3342 /.*/(sponsor)s?[0-9]?/
3343 /.*/_?(plain|live)?ads?(-banners)?/
3345 /.*/ad(sdna_image|gifs?)/
3346 /.*/ad(server|stream|juggler)\.(cgi|pl|dll|exe)
3350 /.*/adv((er)?ts?|ertis(ing|ements?))?/
3354 /.*/cgi-bin/centralad/getimage
3355 /.*/images/addver\.gif
3356 /.*/images/marketing/.*\.(gif|jpe?g)
3360 /.*/sponsors?[0-9]?/
3361 /.*/advert[0-9]+\.jpg
3368 /graphics/defaultAd/
3370 /image\.ng/transactionID
3371 /images/.*/.*_anim\.gif # alvin brattli
3372 /ip_img/.*\.(gif|jpe?g)
3376 /cgi-bin/nph-adclick.exe/
3377 /.*/Image/BannerAdvertising/
3379 /.*/adlib/server\.cgi
3387 Note that many of these actions have the potential to cause a page to
3388 misbehave, possibly even not to display at all. There are many ways
3389 a site designer may choose to design his site, and what HTTP header
3390 content he may depend on. There is no way to have hard and fast rules
3391 for all sites. See the <link linkend="ACTIONSANAT">Appendix</link>
3392 for a brief example on troubleshooting actions.
3397 <!-- ~ End section ~ -->
3400 <!-- ~~~~~ New section ~~~~~ -->
3402 <title>Aliases</title>
3404 Custom <quote>actions</quote>, known to <application>Privoxy</application>
3405 as <quote>aliases</quote>, can be defined by combining other <quote>actions</quote>.
3406 These can in turn be invoked just like the built-in <quote>actions</quote>.
3407 Currently, an alias can contain any character except space, tab, <quote>=</quote>,
3408 <quote>{</quote> or <quote>}</quote>. But please use only <quote>a</quote>-
3409 <quote>z</quote>, <quote>0</quote>-<quote>9</quote>, <quote>+</quote>, and
3410 <quote>-</quote>. Alias names are not case sensitive, and
3411 <emphasis>must be defined before anything</emphasis> else in the
3412 <filename>default.action</filename>file! And there can only be one set of
3413 <quote>aliases</quote> defined.
3417 Now let's define a few aliases:
3424 # Useful custom aliases we can use later. These must come first!
3426 +no-cookies = +no-cookies-set +no-cookies-read
3427 -no-cookies = -no-cookies-set -no-cookies-read
3428 fragile = -block -no-cookies -filter -fast-redirects -hide-referer -no-popups
3429 shop = -no-cookies -filter -fast-redirects
3430 +imageblock = +block +image
3432 #For people who don't like to type too much: ;-)
3435 c2 = -no-cookies-set +no-cookies-read
3436 c3 = +no-cookies-set -no-cookies-read
3437 #... etc. Customize to your heart's content.
3444 Some examples using our <quote>shop</quote> and <quote>fragile</quote>
3452 # These sites are very complex and require
3453 # minimal interference.
3455 .office.microsoft.com
3456 .windowsupdate.microsoft.com
3459 # Shopping sites - still want to block ads.
3462 .worldpay.com # for quietpc.com
3466 # These shops require pop-ups
3476 The <quote>shop</quote> and <quote>fragile</quote> aliases are often used for
3477 <quote>problem</quote> sites that require most actions to be disabled
3478 in order to function properly.
3485 <!-- ~ End section ~ -->
3488 <!-- ~~~~~ New section ~~~~~ -->
3489 <sect2 id="filterfile">
3490 <title>The Filter File</title>
3492 Any web page can be dynamically modified with the filter file. This
3493 modification can be removal, or re-writing, of any web page content,
3494 including tags and non-visible content. The default filter file is
3495 <filename>default.filter</filename>, located in the config directory.
3499 This is potentially a very powerful feature, and requires knowledge of both
3500 <quote>regular expression</quote> and HTML in order create custom
3501 filters. But, there are a number of useful filters included with
3502 <application>Privoxy</application> for many common situations.
3506 The included example file is divided into sections. Each section begins
3507 with the <literal>FILTER</literal> keyword, followed by the identifier
3508 for that section, e.g. <quote>FILTER: webbugs</quote>. Each section performs
3509 a similar type of filtering, such as <quote>html-annoyances</quote>.
3513 This file uses regular expressions to alter or remove any string in the
3514 target page. The expressions can only operate on one line at a time. Some
3515 examples from the included default <filename>default.filter</filename>:
3519 Stop web pages from displaying annoying messages in the status bar by
3520 deleting such references:
3527 FILTER: html-annoyances
3529 # New browser windows should be resizeable and have a location and status
3532 s/resizable="?(no|0)"?/resizable=1/ig s/noresize/yesresize/ig
3533 s/location="?(no|0)"?/location=1/ig s/status="?(no|0)"?/status=1/ig
3534 s/scrolling="?(no|0|Auto)"?/scrolling=1/ig
3535 s/menubar="?(no|0)"?/menubar=1/ig
3537 # The <BLINK> tag was a crime!
3539 s*<blink>|</blink>**ig
3543 #s/framespacing="?(no|0)"?//ig
3544 #s/margin(height|width)=[0-9]*//gi
3551 Just for kicks, replace any occurrence of <quote>Microsoft</quote> with
3552 <quote>MicroSuck</quote>, and have a little fun with topical buzzwords:
3561 s/microsoft(?!.com)/MicroSuck/ig
3565 s/industry-leading|cutting-edge|award-winning/<font color=red><b>BINGO!</b></font>/ig
3572 Kill those pesky little web-bugs:
3579 # webbugs: Squish WebBugs (1x1 invisible GIFs used for user tracking)
3582 s/<img\s+[^>]*?(width|height)\s*=\s*['"]?1\D[^>]*?(width|height)\s*=\s*['"]?1(\D[^>]*?)?>/<!-- Squished WebBug -->/sig
3590 <!-- ~ End section ~ -->
3594 <!-- ~~~~~ New section ~~~~~ -->
3597 <title>Templates</title>
3599 When <application>Privoxy</application> displays one of its internal
3600 pages, such as a 404 Not Found error page, it uses the appropriate template.
3601 On Linux, BSD, and Unix, these are located in
3602 <filename>/etc/privoxy/templates</filename> by default. These may be
3603 customized, if desired. <filename>cgi-style.css</filename> is
3604 used to control the HTML attributes (fonts, etc).
3607 The default <quote>Blocked</quote> banner page with the bright red top
3608 banner, is called just <quote><filename>blocked</filename></quote>. This
3609 may be customized or replaced with something else if desired.
3616 <!-- ~ End section ~ -->
3620 <!-- ~~~~~ New section ~~~~~ -->
3622 <sect1 id="contact"><title>Contacting the Developers, Bug Reporting and Feature
3625 <!-- Include contacting.sgml boilerplate: -->
3627 <!-- end boilerplate -->
3630 <!-- ~~~~~ New section ~~~~~ -->
3631 <sect2 id="submitactions">
3632 <title>Submitting Ads and <quote>Action</quote> Problems</title>
3634 Ads and banners that are not stopped by <application>Privoxy</application>
3635 can be submitted to the developers by accessing a special page and filling
3636 out the brief, required form. Conversely, you can also report pages, images,
3637 etc. that <application>Privoxy</application> is blocking, but should not.
3638 The form itself does require Internet access.
3641 To do this, point your browser to <application>Privoxy</application>
3642 at <ulink url="http://config.privoxy.org/">http://config.privoxy.org/</ulink>
3643 (shortcut: <ulink url="http://p.p/">http://p.p/</ulink>), and then select
3644 <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>,
3645 near the bottom of the page. Paste in the URL that is the cause of the
3646 unwanted behavior, and follow the prompts. The developers will
3647 try to incorporate a fix for the problem you reported into future versions.
3651 New <filename>default.actions</filename> files will occasionally be made
3652 available based on your feedback. These
3653 will be announced on the
3655 url="http://lists.sourceforge.net/lists/listinfo/ijbswa-announce">ijbswa-announce</ulink>
3663 <!-- ~~~~~ New section ~~~~~ -->
3664 <sect1 id="copyright"><title>Copyright and History</title>
3666 <sect2><title>Copyright</title>
3667 <!-- Include copyright.sgml: -->
3669 <!-- end copyright -->
3672 <!-- ~ End section ~ -->
3675 <!-- ~~~~~ New section ~~~~~ -->
3677 <sect2 id="history"><title>History</title>
3678 <!-- Include history.sgml: -->
3680 <!-- end history -->
3684 <!-- ~~~~~ New section ~~~~~ -->
3685 <sect1 id="seealso"><title>See Also</title>
3686 <!-- Include seealso.sgml: -->
3688 <!-- end seealso -->
3693 <!-- ~~~~~ New section ~~~~~ -->
3694 <sect1 id="appendix"><title>Appendix</title>
3697 <!-- ~~~~~ New section ~~~~~ -->
3699 <title>Regular Expressions</title>
3701 <application>Privoxy</application> can use <quote>regular expressions</quote>
3702 in various config files. Assuming support for <quote>pcre</quote> (Perl
3703 Compatible Regular Expressions) is compiled in, which is the default. Such
3704 configuration directives do not require regular expressions, but they can be
3705 used to increase flexibility by matching a pattern with wild-cards against
3710 If you are reading this, you probably don't understand what <quote>regular
3711 expressions</quote> are, or what they can do. So this will be a very brief
3712 introduction only. A full explanation would require a book ;-)
3716 <quote>Regular expressions</quote> is a way of matching one character
3717 expression against another to see if it matches or not. One of the
3718 <quote>expressions</quote> is a literal string of readable characters
3719 (letter, numbers, etc), and the other is a complex string of literal
3720 characters combined with wild-cards, and other special characters, called
3721 meta-characters. The <quote>meta-characters</quote> have special meanings and
3722 are used to build the complex pattern to be matched against. Perl Compatible
3723 Regular Expressions is an enhanced form of the regular expression language
3724 with backward compatibility.
3728 To make a simple analogy, we do something similar when we use wild-card
3729 characters when listing files with the <command>dir</command> command in DOS.
3730 <literal>*.*</literal> matches all filenames. The <quote>special</quote>
3731 character here is the asterisk which matches any and all characters. We can be
3732 more specific and use <literal>?</literal> to match just individual
3733 characters. So <quote>dir file?.text</quote> would match
3734 <quote>file1.txt</quote>, <quote>file2.txt</quote>, etc. We are pattern
3735 matching, using a similar technique to <quote>regular expressions</quote>!
3739 Regular expressions do essentially the same thing, but are much, much more
3740 powerful. There are many more <quote>special characters</quote> and ways of
3741 building complex patterns however. Let's look at a few of the common ones,
3742 and then some examples:
3747 <emphasis>.</emphasis> - Matches any single character, e.g. <quote>a</quote>,
3748 <quote>A</quote>, <quote>4</quote>, <quote>:</quote>, or <quote>@</quote>.
3750 </simplelist></para>
3754 <emphasis>?</emphasis> - The preceding character or expression is matched ZERO or ONE
3757 </simplelist></para>
3761 <emphasis>+</emphasis> - The preceding character or expression is matched ONE or MORE
3764 </simplelist></para>
3768 <emphasis>*</emphasis> - The preceding character or expression is matched ZERO or MORE
3771 </simplelist></para>
3775 <emphasis>\</emphasis> - The <quote>escape</quote> character denotes that
3776 the following character should be taken literally. This is used where one of the
3777 special characters (e.g. <quote>.</quote>) needs to be taken literally and
3778 not as a special meta-character.
3780 </simplelist></para>
3784 <emphasis>[]</emphasis> - Characters enclosed in brackets will be matched if
3785 any of the enclosed characters are encountered.
3787 </simplelist></para>
3791 <emphasis>()</emphasis> - parentheses are used to group a sub-expression,
3792 or multiple sub-expressions.
3794 </simplelist></para>
3798 <emphasis>|</emphasis> - The <quote>bar</quote> character works like an
3799 <quote>or</quote> conditional statement. A match is successful if the
3800 sub-expression on either side of <quote>|</quote> matches.
3802 </simplelist></para>
3806 <emphasis>s/string1/string2/g</emphasis> - This is used to rewrite strings of text.
3807 <quote>string1</quote> is replaced by <quote>string2</quote> in this
3810 </simplelist></para>
3813 These are just some of the ones you are likely to use when matching URLs with
3814 <application>Privoxy</application>, and is a long way from a definitive
3815 list. This is enough to get us started with a few simple examples which may
3816 be more illuminating:
3820 <emphasis><literal>/.*/banners/.*</literal></emphasis> - A simple example
3821 that uses the common combination of <quote>.</quote> and <quote>*</quote> to
3822 denote any character, zero or more times. In other words, any string at all.
3823 So we start with a literal forward slash, then our regular expression pattern
3824 (<quote>.*</quote>) another literal forward slash, the string
3825 <quote>banners</quote>, another forward slash, and lastly another
3826 <quote>.*</quote>. We are building
3827 a directory path here. This will match any file with the path that has a
3828 directory named <quote>banners</quote> in it. The <quote>.*</quote> matches
3829 any characters, and this could conceivably be more forward slashes, so it
3830 might expand into a much longer looking path. For example, this could match:
3831 <quote>/eye/hate/spammers/banners/annoy_me_please.gif</quote>, or just
3832 <quote>/banners/annoying.html</quote>, or almost an infinite number of other
3833 possible combinations, just so it has <quote>banners</quote> in the path
3838 A now something a little more complex:
3842 <emphasis><literal>/.*/adv((er)?ts?|ertis(ing|ements?))?/</literal></emphasis> -
3843 We have several literal forward slashes again (<quote>/</quote>), so we are
3844 building another expression that is a file path statement. We have another
3845 <quote>.*</quote>, so we are matching against any conceivable sub-path, just so
3846 it matches our expression. The only true literal that <emphasis>must
3847 match</emphasis> our pattern is <application>adv</application>, together with
3848 the forward slashes. What comes after the <quote>adv</quote> string is the
3853 Remember the <quote>?</quote> means the preceding expression (either a
3854 literal character or anything grouped with <quote>(...)</quote> in this case)
3855 can exist or not, since this means either zero or one match. So
3856 <quote>((er)?ts?|ertis(ing|ements?))</quote> is optional, as are the
3857 individual sub-expressions: <quote>(er)</quote>,
3858 <quote>(ing|ements?)</quote>, and the <quote>s</quote>. The <quote>|</quote>
3859 means <quote>or</quote>. We have two of those. For instance,
3860 <quote>(ing|ements?)</quote>, can expand to match either <quote>ing</quote>
3861 <emphasis>OR</emphasis> <quote>ements?</quote>. What is being done here, is an
3862 attempt at matching as many variations of <quote>advertisement</quote>, and
3863 similar, as possible. So this would expand to match just <quote>adv</quote>,
3864 or <quote>advert</quote>, or <quote>adverts</quote>, or
3865 <quote>advertising</quote>, or <quote>advertisement</quote>, or
3866 <quote>advertisements</quote>. You get the idea. But it would not match
3867 <quote>advertizements</quote> (with a <quote>z</quote>). We could fix that by
3868 changing our regular expression to:
3869 <quote>/.*/adv((er)?ts?|erti(s|z)(ing|ements?))?/</quote>, which would then match
3874 <emphasis><literal>/.*/advert[0-9]+\.(gif|jpe?g)</literal></emphasis> - Again
3875 another path statement with forward slashes. Anything in the square brackets
3876 <quote>[]</quote> can be matched. This is using <quote>0-9</quote> as a
3877 shorthand expression to mean any digit one through nine. It is the same as
3878 saying <quote>0123456789</quote>. So any digit matches. The <quote>+</quote>
3879 means one or more of the preceding expression must be included. The preceding
3880 expression here is what is in the square brackets -- in this case, any digit
3881 one through nine. Then, at the end, we have a grouping: <quote>(gif|jpe?g)</quote>.
3882 This includes a <quote>|</quote>, so this needs to match the expression on
3883 either side of that bar character also. A simple <quote>gif</quote> on one side, and the other
3884 side will in turn match either <quote>jpeg</quote> or <quote>jpg</quote>,
3885 since the <quote>?</quote> means the letter <quote>e</quote> is optional and
3886 can be matched once or not at all. So we are building an expression here to
3887 match image GIF or JPEG type image file. It must include the literal
3888 string <quote>advert</quote>, then one or more digits, and a <quote>.</quote>
3889 (which is now a literal, and not a special character, since it is escaped
3890 with <quote>\</quote>), and lastly either <quote>gif</quote>, or
3891 <quote>jpeg</quote>, or <quote>jpg</quote>. Some possible matches would
3892 include: <quote>//advert1.jpg</quote>,
3893 <quote>/nasty/ads/advert1234.gif</quote>,
3894 <quote>/banners/from/hell/advert99.jpg</quote>. It would not match
3895 <quote>advert1.gif</quote> (no leading slash), or
3896 <quote>/adverts232.jpg</quote> (the expression does not include an
3897 <quote>s</quote>), or <quote>/advert1.jsp</quote> (<quote>jsp</quote> is not
3898 in the expression anywhere).
3902 <emphasis><literal>s/microsoft(?!.com)/MicroSuck/i</literal></emphasis> - This is
3903 a substitution. <quote>MicroSuck</quote> will replace any occurrence of
3904 <quote>microsoft</quote>. The <quote>i</quote> at the end of the expression
3905 means ignore case. The <quote>(?!.com)</quote> means
3906 the match should fail if <quote>microsoft</quote> is followed by
3907 <quote>.com</quote>. In other words, this acts like a <quote>NOT</quote>
3908 modifier. In case this is a hyperlink, we don't want to break it ;-).
3912 We are barely scratching the surface of regular expressions here so that you
3913 can understand the default <application>Privoxy</application>
3914 configuration files, and maybe use this knowledge to customize your own
3915 installation. There is much, much more that can be done with regular
3916 expressions. Now that you know enough to get started, you can learn more on
3921 More reading on Perl Compatible Regular expressions:
3922 <ulink url="http://www.perldoc.com/perl5.6/pod/perlre.html">http://www.perldoc.com/perl5.6/pod/perlre.html</ulink>
3927 <!-- ~ End section ~ -->
3930 <!-- ~~~~~ New section ~~~~~ -->
3932 <title><application>Privoxy</application>'s Internal Pages</title>
3935 Since <application>Privoxy</application> proxies each requested
3936 web page, it is easy for <application>Privoxy</application> to
3937 trap certain special URLs. In this way, we can talk directly to
3938 <application>Privoxy</application>, and see how it is
3939 configured, see how our rules are being applied, change these
3940 rules and other configuration options, and even turn
3941 <application>Privoxy's</application> filtering off, all with
3947 The URLs listed below are the special ones that allow direct access
3948 to <application>Privoxy</application>. Of course,
3949 <application>Privoxy</application> must be running to access these. If
3950 not, you will get a friendly error message. Internet access is not
3963 <ulink url="http://config.privoxy.org/">http://config.privoxy.org/</ulink>
3967 Alternately, this may be reached at <ulink
3968 url="http://p.p/">http://p.p/</ulink>, but this
3969 variation may not work as reliably as the above in some configurations.
3975 Show information about the current configuration:
3979 <ulink url="http://config.privoxy.org/show-status">http://config.privoxy.org/show-status</ulink>
3986 Show the source code version numbers:
3990 <ulink url="http://config.privoxy.org/show-version">http://config.privoxy.org/show-version</ulink>
3997 Show the client's request headers:
4001 <ulink url="http://config.privoxy.org/show-request">http://config.privoxy.org/show-request</ulink>
4008 Show which actions apply to a URL and why:
4012 <ulink url="http://config.privoxy.org/show-url-info">http://config.privoxy.org/show-url-info</ulink>
4019 Toggle Privoxy on or off. In this case, <quote>Privoxy</quote> continues
4020 to run, but only as a pass-through proxy, with no actions taking place:
4024 <ulink url="http://config.privoxy.org/toggle">http://config.privoxy.org/toggle</ulink>
4028 Short cuts. Turn off, then on:
4032 <ulink url="http://config.privoxy.org/toggle?set=disable">http://config.privoxy.org/toggle?set=disable</ulink>
4037 <ulink url="http://config.privoxy.org/toggle?set=enable">http://config.privoxy.org/toggle?set=enable</ulink>
4044 Edit the actions list file:
4048 <ulink url="http://config.privoxy.org/edit-actions">http://config.privoxy.org/edit-actions</ulink>
4057 These may be bookmarked for quick reference.
4061 <sect3 id="bookmarklets">
4062 <title>Bookmarklets</title>
4064 Below are some <quote>bookmarklets</quote> to allow you to easily access a
4065 <quote>mini</quote> version of some of <application>Privoxy's</application>
4066 special pages. They are designed for MS Internet Explorer, but should work
4067 equally well in Netscape, Mozilla, and other browsers which support
4068 JavaScript. They are designed to run directly from your bookmarks - not by
4069 clicking the links below (although that should work for testing).
4072 To save them, right-click the link and choose <quote>Add to Favorites</quote>
4073 (IE) or <quote>Add Bookmark</quote> (Netscape). You will get a warning that
4074 the bookmark <quote>may not be safe</quote> - just click OK. Then you can run the
4075 Bookmarklet directly from your favorites/bookmarks. For even faster access,
4076 you can put them on the <quote>Links</quote> bar (IE) or the <quote>Personal
4077 Toolbar</quote> (Netscape), and run them with a single click.
4085 <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>
4091 <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>
4097 <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)
4103 <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>
4109 <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>
4119 Credit: The site which gave me the general idea for these bookmarklets is
4120 <ulink url="http://www.bookmarklets.com">www.bookmarklets.com</ulink>. They
4121 have more information about bookmarklets.
4130 <!-- ~~~~~ New section ~~~~~ -->
4131 <sect2 id="actionsanat">
4132 <title>Anatomy of an Action</title>
4135 The way <application>Privoxy</application> applies <quote>actions</quote>
4136 and <quote>filters</quote> to any given URL can be complex, and not always so
4137 easy to understand what is happening. And sometimes we need to be able to
4138 <emphasis>see</emphasis> just what <application>Privoxy</application> is
4139 doing. Especially, if something <application>Privoxy</application> is doing
4140 is causing us a problem inadvertently. It can be a little daunting to look at
4141 the actions and filters files themselves, since they tend to be filled with
4142 <quote>regular expressions</quote> whose consequences are not always
4143 so obvious. <application>Privoxy</application> provides the
4144 <ulink url="http://config.privoxy.org/show-url-info">http://config.privoxy.org/show-url-info</ulink>
4145 page that can show us very specifically how <application>actions</application>
4146 are being applied to any given URL. This is a big help for troubleshooting.
4150 First, enter one URL (or partial URL) at the prompt, and then
4151 <application>Privoxy</application> will tell us
4152 how the current configuration will handle it. This will not
4153 help with filtering effects from the <filename>default.filter</filename> file! It
4154 also will not tell you about any other URLs that may be embedded within the
4155 URL you are testing (i.e. a web page). For instance, images such as ads are expressed as URLs
4156 within the raw page source of HTML pages. So you will only get info for the
4157 actual URL that is pasted into the prompt area -- not any sub-URLs. If you
4158 want to know about embedded URLs like ads, you will have to dig those out of
4159 the HTML source. Use your browser's <quote>View Page Source</quote> option
4160 for this. Or right click on the ad, and grab the URL.
4164 Let's look at an example, <ulink url="http://google.com">google.com</ulink>,
4165 one section at a time:
4170 System default actions:
4172 { -add-header -block -deanimate-gifs -downgrade -fast-redirects -filter
4173 -hide-forwarded -hide-from -hide-referer -hide-user-agent -image
4174 -image-blocker -limit-connect -no-compression -no-cookies-keep
4175 -no-cookies-read -no-cookies-set -no-popups -vanilla-wafer -wafer }
4181 This is the top section, and only tells us of the compiled in defaults. This
4182 is basically what <application>Privoxy</application> would do if there
4183 were not any <quote>actions</quote> defined, i.e. it does nothing. Every action
4184 is disabled. This is not particularly informative for our purposes here. OK,
4191 Matches for http://google.com:
4193 { -add-header -block +deanimate-gifs -downgrade +fast-redirects
4194 +filter{html-annoyances} +filter{js-annoyances} +filter{no-popups}
4195 +filter{webbugs} +filter{nimda} +filter{banners-by-size} +filter{hal}
4196 +filter{fun} +hide-forwarded +hide-from{block} +hide-referer{forge}
4197 -hide-user-agent -image +image-blocker{blank} +no-compression
4198 +no-cookies-keep -no-cookies-read -no-cookies-set +no-popups
4199 -vanilla-wafer -wafer }
4202 { -no-cookies-keep -no-cookies-read -no-cookies-set }
4212 This is much more informative, and tells us how we have defined our
4213 <quote>actions</quote>, and which ones match for our example,
4214 <quote>google.com</quote>. The first grouping shows our default
4215 settings, which would apply to all URLs. If you look at your <quote>actions</quote>
4216 file, this would be the section just below the <quote>aliases</quote> section
4217 near the top. This applies to all URLs as signified by the single forward
4218 slash -- <quote>/</quote>.
4223 These are the default actions we have enabled. But we can define additional
4224 actions that would be exceptions to these general rules, and then list
4225 specific URLs that these exceptions would apply to. Last match wins.
4226 Just below this then are two explicit matches for <quote>.google.com</quote>.
4227 The first is negating our various cookie blocking actions (i.e. we will allow
4228 cookies here). The second is allowing <quote>fast-redirects</quote>. Note
4229 that there is a leading dot here -- <quote>.google.com</quote>. This will
4230 match any hosts and sub-domains, in the google.com domain also, such as
4231 <quote>www.google.com</quote>. So, apparently, we have these actions defined
4232 somewhere in the lower part of our actions file, and
4233 <quote>google.com</quote> is referenced in these sections.
4238 And now we pull it altogether in the bottom section and summarize how
4239 <application>Privoxy</application> is applying all its <quote>actions</quote>
4240 to <quote>google.com</quote>:
4249 -add-header -block -deanimate-gifs -downgrade -fast-redirects
4250 +filter{html-annoyances} +filter{js-annoyances} +filter{no-popups}
4251 +filter{webbugs} +filter{nimda} +filter{banners-by-size} +filter{hal}
4252 +filter{fun} +hide-forwarded +hide-from{block} +hide-referer{forge}
4253 -hide-user-agent -image +image-blocker{blank} -limit-connect +no-compression
4254 -no-cookies-keep -no-cookies-read -no-cookies-set +no-popups -vanilla-wafer
4261 Now another example, <quote>ad.doubleclick.net</quote>:
4280 We'll just show the interesting part here, the explicit matches. It is
4281 matched three different times. Each as an <quote>+block +image</quote>,
4282 which is the expanded form of one of our aliases that had been defined as:
4283 <quote>+imageblock</quote>. (<quote>Aliases</quote> are defined in the
4284 first section of the actions file and typically used to combine more
4289 Any one of these would have done the trick and blocked this as an unwanted
4290 image. This is unnecessarily redundant since the last case effectively
4291 would also cover the first. No point in taking chances with these guys
4292 though ;-) Note that if you want an ad or obnoxious
4293 URL to be invisible, it should be defined as <quote>ad.doubleclick.net</quote>
4294 is done here -- as both a <quote>+block</quote> <emphasis>and</emphasis> an
4295 <quote>+image</quote>. The custom alias <quote>+imageblock</quote> does this
4300 One last example. Let's try <quote>http://www.rhapsodyk.net/adsl/HOWTO/</quote>.
4301 This one is giving us problems. We are getting a blank page. Hmmm...
4307 Matches for http://www.rhapsodyk.net/adsl/HOWTO/:
4309 { -add-header -block +deanimate-gifs -downgrade +fast-redirects
4310 +filter{html-annoyances} +filter{js-annoyances} +filter{no-popups}
4311 +filter{webbugs} +filter{nimda} +filter{banners-by-size} +filter{hal}
4312 +filter{fun} +hide-forwarded +hide-from{block} +hide-referer{forge}
4313 -hide-user-agent -image +image-blocker{blank} +no-compression
4314 +no-cookies-keep -no-cookies-read -no-cookies-set +no-popups
4315 -vanilla-wafer -wafer }
4325 Ooops, the <quote>/adsl/</quote> is matching <quote>/ads</quote>! But
4326 we did not want this at all! Now we see why we get the blank page. We could
4327 now add a new action below this that explicitly does <emphasis>not</emphasis>
4328 block (-block) pages with <quote>adsl</quote>. There are various ways to
4329 handle such exceptions. Example:
4342 Now the page displays ;-) Be sure to flush your browser's caches when
4343 making such changes. Or, try using <literal>Shift+Reload</literal>.
4347 But now what about a situation where we get no explicit matches like
4361 That actually was very telling and pointed us quickly to where the problem
4362 was. If you don't get this kind of match, then it means one of the default
4363 rules in the first section is causing the problem. This would require some
4364 guesswork, and maybe a little trial and error to isolate the offending rule.
4365 One likely cause would be one of the <quote>{+filter}</quote> actions. Try
4366 adding the URL for the site to one of aliases that turn off <quote>+filter</quote>:
4374 .worldpay.com # for quietpc.com
4383 <quote>{shop}</quote> is an <quote>alias</quote> that expands to
4384 <quote>{ -filter -no-cookies -no-cookies-keep }</quote>. Or you could do
4385 your own exception to negate filtering:
4399 <quote>{fragile}</quote> is an alias that disables most actions. This can be
4400 used as a last resort for problem sites. Remember to flush caches! If this
4401 still does not work, you will have to go through the remaining actions one by
4402 one to find which one(s) is causing the problem.
4411 This program is free software; you can redistribute it
4412 and/or modify it under the terms of the GNU General
4413 Public License as published by the Free Software
4414 Foundation; either version 2 of the License, or (at
4415 your option) any later version.
4417 This program is distributed in the hope that it will
4418 be useful, but WITHOUT ANY WARRANTY; without even the
4419 implied warranty of MERCHANTABILITY or FITNESS FOR A
4420 PARTICULAR PURPOSE. See the GNU General Public
4421 License for more details.
4423 The GNU General Public License should be included with
4424 this file. If not, you can view it at
4425 http://www.gnu.org/copyleft/gpl.html
4426 or write to the Free Software Foundation, Inc., 59
4427 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
4429 $Log: user-manual.sgml,v $
4430 Revision 1.82 2002/04/18 12:04:50 oes
4433 Revision 1.81 2002/04/18 11:50:24 oes
4434 Extended Install section - needs fixing by packagers
4436 Revision 1.80 2002/04/18 10:45:19 oes
4437 Moved text to buildsource.sgml, renamed some filters, details
4439 Revision 1.79 2002/04/18 03:18:06 hal9
4440 Spellcheck, and minor touchups.
4442 Revision 1.78 2002/04/17 18:04:16 oes
4445 Revision 1.77 2002/04/17 13:51:23 oes
4446 Proofreading, part one
4448 Revision 1.76 2002/04/16 04:25:51 hal9
4449 -Added 'Note to Upgraders' and re-ordered the 'Quickstart' section.
4450 -Note about proxy may need requests to re-read config files.
4452 Revision 1.75 2002/04/12 02:08:48 david__schmidt
4453 Remove OS/2 building info... it is already in the developer-manual
4455 Revision 1.74 2002/04/11 00:54:38 hal9
4456 Add small section on submitting actions.
4458 Revision 1.73 2002/04/10 18:45:15 swa
4461 Revision 1.72 2002/04/10 04:06:19 hal9
4462 Added actions feedback to Bookmarklets section
4464 Revision 1.71 2002/04/08 22:59:26 hal9
4465 Version update. Spell chkconfig correctly :)
4467 Revision 1.70 2002/04/08 20:53:56 swa
4470 Revision 1.69 2002/04/06 05:07:29 hal9
4471 -Add privoxy-man-page.sgml, for man page.
4472 -Add authors.sgml for AUTHORS (and p-authors.sgml)
4473 -Reworked various aspects of various docs.
4474 -Added additional comments to sub-docs.
4476 Revision 1.68 2002/04/04 18:46:47 swa
4477 consistent look. reuse of copyright, history et. al.
4479 Revision 1.67 2002/04/04 17:27:57 swa
4480 more single file to be included at multiple points. make maintaining easier
4482 Revision 1.66 2002/04/04 06:48:37 hal9
4483 Structural changes to allow for conditional inclusion/exclusion of content
4484 based on entity toggles, e.g. 'entity % p-not-stable "INCLUDE"'. And
4485 definition of internal entities, e.g. 'entity p-version "2.9.13"' that will
4486 eventually be set by Makefile.
4487 More boilerplate text for use across multiple docs.
4489 Revision 1.65 2002/04/03 19:52:07 swa
4490 enhance squid section due to user suggestion
4492 Revision 1.64 2002/04/03 03:53:43 hal9
4493 A few minor bug fixes, and touch ups. Ready for review.
4495 Revision 1.63 2002/04/01 16:24:49 hal9
4496 Define entities to include boilerplate text. See doc/source/*.
4498 Revision 1.62 2002/03/30 04:15:53 hal9
4499 - Fix privoxy.org/config links.
4500 - Paste in Bookmarklets from Toggle page.
4501 - Move Quickstart nearer top, and minor rework.
4503 Revision 1.61 2002/03/29 01:31:08 hal9
4506 Revision 1.60 2002/03/27 01:57:34 hal9
4507 Added more to Anatomy section.
4509 Revision 1.59 2002/03/27 00:54:33 hal9
4510 Touch up intro for new name.
4512 Revision 1.58 2002/03/26 22:29:55 swa
4513 we have a new homepage!
4515 Revision 1.57 2002/03/24 20:33:30 hal9
4516 A few minor catch ups with name change.
4518 Revision 1.56 2002/03/24 16:17:06 swa
4519 configure needs to be generated.
4521 Revision 1.55 2002/03/24 16:08:08 swa
4522 we are too lazy to make a block-built
4523 privoxy logo. hence removed the option.
4525 Revision 1.54 2002/03/24 15:46:20 swa
4526 name change related issue.
4528 Revision 1.53 2002/03/24 11:51:00 swa
4529 name change. changed filenames.
4531 Revision 1.52 2002/03/24 11:01:06 swa
4534 Revision 1.51 2002/03/23 15:13:11 swa
4535 renamed every reference to the old name with foobar.
4536 fixed "application foobar application" tag, fixed
4537 "the foobar" with "foobar". left junkbustser in cvs
4538 comments and remarks to history untouched.
4540 Revision 1.50 2002/03/23 05:06:21 hal9
4543 Revision 1.49 2002/03/21 17:01:05 hal9
4544 New section in Appendix.
4546 Revision 1.48 2002/03/12 06:33:01 hal9
4547 Catching up to Andreas and re_filterfile changes.
4549 Revision 1.47 2002/03/11 13:13:27 swa
4550 correct feedback channels
4552 Revision 1.46 2002/03/10 00:51:08 hal9
4553 Added section on JB internal pages in Appendix.
4555 Revision 1.45 2002/03/09 17:43:53 swa
4558 Revision 1.44 2002/03/09 17:08:48 hal9
4559 New section on Jon's actions file editor, and move some stuff around.
4561 Revision 1.43 2002/03/08 00:47:32 hal9
4562 Added imageblock{pattern}.
4564 Revision 1.42 2002/03/07 18:16:55 swa
4567 Revision 1.41 2002/03/07 16:46:43 hal9
4568 Fix a few markup problems for jade.
4570 Revision 1.40 2002/03/07 16:28:39 swa
4571 provide correct feedback channels
4573 Revision 1.39 2002/03/06 16:19:28 hal9
4574 Note on perceived filtering slowdown per FR.
4576 Revision 1.38 2002/03/05 23:55:14 hal9
4577 Stupid I did it again. Double hyphen in comment breaks jade.
4579 Revision 1.37 2002/03/05 23:53:49 hal9
4580 jade barfs on '- -' embedded in comments. - -user option broke it.
4582 Revision 1.36 2002/03/05 22:53:28 hal9
4583 Add new - - user option.
4585 Revision 1.35 2002/03/05 00:17:27 hal9
4586 Added section on command line options.
4588 Revision 1.34 2002/03/04 19:32:07 oes
4589 Changed default port to 8118
4591 Revision 1.33 2002/03/03 19:46:13 hal9
4592 Emphasis on where/how to report bugs, etc
4594 Revision 1.32 2002/03/03 09:26:06 joergs
4595 AmigaOS changes, config is now loaded from PROGDIR: instead of
4596 AmiTCP:db/junkbuster/ if no configuration file is specified on the
4599 Revision 1.31 2002/03/02 22:45:52 david__schmidt
4602 Revision 1.30 2002/03/02 22:00:14 hal9
4603 Updated 'New Features' list. Ran through spell-checker.
4605 Revision 1.29 2002/03/02 20:34:07 david__schmidt
4606 Update OS/2 build section
4608 Revision 1.28 2002/02/24 14:34:24 jongfoster
4609 Formatting changes. Now changing the doctype to DocBook XML 4.1
4610 will work - no other changes are needed.
4612 Revision 1.27 2002/01/11 14:14:32 hal9
4613 Added a very short section on Templates
4615 Revision 1.26 2002/01/09 20:02:50 hal9
4616 Fix bug re: auto-detect config file changes.
4618 Revision 1.25 2002/01/09 18:20:30 hal9
4619 Touch ups for *.action files.
4621 Revision 1.24 2001/12/02 01:13:42 hal9
4624 Revision 1.23 2001/12/02 00:20:41 hal9
4625 Updates for recent changes.
4627 Revision 1.22 2001/11/05 23:57:51 hal9
4628 Minor update for startup now daemon mode.
4630 Revision 1.21 2001/10/31 21:11:03 hal9
4631 Correct 2 minor errors
4633 Revision 1.18 2001/10/24 18:45:26 hal9
4634 *** empty log message ***
4636 Revision 1.17 2001/10/24 17:10:55 hal9
4637 Catching up with Jon's recent work, and a few other things.
4639 Revision 1.16 2001/10/21 17:19:21 swa
4640 wrong url in documentation
4642 Revision 1.15 2001/10/14 23:46:24 hal9
4643 Various minor changes. Fleshed out SEE ALSO section.
4645 Revision 1.13 2001/10/10 17:28:33 hal9
4648 Revision 1.12 2001/09/28 02:57:04 hal9
4651 Revision 1.11 2001/09/28 02:25:20 hal9
4654 Revision 1.9 2001/09/27 23:50:29 hal9
4655 A few changes. A short section on regular expression in appendix.
4657 Revision 1.8 2001/09/25 00:34:59 hal9
4658 Some additions, and re-arranging.
4660 Revision 1.7 2001/09/24 14:31:36 hal9
4663 Revision 1.6 2001/09/24 14:10:32 hal9
4664 Including David's OS/2 installation instructions.
4666 Revision 1.2 2001/09/13 15:27:40 swa
4669 Revision 1.1 2001/09/12 15:36:41 swa
4670 source files for junkbuster documentation
4672 Revision 1.3 2001/09/10 17:43:59 swa
4673 first proposal of a structure.
4675 Revision 1.2 2001/06/13 14:28:31 swa
4676 docs should have an author.
4678 Revision 1.1 2001/06/13 14:20:37 swa
4679 first import of project's documentation for the webserver.