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.81 2002/04/18 11:50:24 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.81 2002/04/18 11:50:24 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.
203 <!-- ~~~~~ New section ~~~~~ -->
204 <sect3 id="installation-deb"><title>Debian</title>
210 <!-- ~~~~~ New section ~~~~~ -->
211 <sect3 id="installation-pack-win"><title>Windows</title>
214 Just double-click the installer, which will guide you through
215 the installation process.
219 <!-- ~~~~~ New section ~~~~~ -->
220 <sect3 id="installation-pack-bintgz"><title>Solaris, NetBSD, FreeBSD, HP-UX</title>
223 Create a new directory, <literal>cd</literal> to it, then unzip and
224 untar the archive. For the most part, you'll have to figure out where
229 <!-- ~~~~~ New section ~~~~~ -->
230 <sect3 id="installation-os2"><title>OS/2</title>
233 First, make sure that no previous installations of
234 <application>Junkbuster</application> and / or
235 <application>Privoxy</application> are left on your
240 Then, just double-click the WarpIN self-installing archive, which will
241 guide you through the installation process. A shadow of the
242 <application>Privoxy</application> executable will be placed in your
243 startup folder so it will start automatically whenever OS/2 starts.
247 The directory you choose to install <application>Privoxy</application>
248 into will contain all of the configuration files.
252 <!-- ~~~~~ New section ~~~~~ -->
253 <sect3 id="installation-mac"><title>Max OSX</title>
259 <!-- ~~~~~ New section ~~~~~ -->
260 <sect3 id="installation-amiga"><title>AmigaOS</title>
262 Unpack the <literal>.lha</literal> archive, then FIXME.
267 <!-- ~~~~~ New section ~~~~~ -->
268 <sect2 id="installation-source"><title>Building from Source</title>
270 <!-- include buildsource.sgml boilerplate: -->
272 <!-- end boilerplate -->
277 <!-- ~ End section ~ -->
280 <!-- ~~~~~ New section ~~~~~ -->
282 <sect1 id="quickstart"><title>Quickstart to Using <application>Privoxy</application></title>
285 <!-- ~~~~~ New section ~~~~~ -->
286 <sect2 id="upgradersnote">
287 <title>Note to Upgraders</title>
289 There are very significant changes from older versions of
290 <application>Junkbuster</application> to the current
291 <application>Privoxy</application>. Configuration is substantially
292 changed. <application>Junkbuster 2.0.x</application> and earlier
293 configuration files will not migrate. The functionality of the old
294 <filename>blockfile</filename>, <filename>cookiefile</filename> and
295 <filename>imagelist</filename>, are now combined into the
296 <quote>actions file</quote> (<filename>default.action</filename>
297 for most installations).
300 A <quote>filter file</quote> (typically <filename>default.filter</filename>)
301 is new with <application>Privoxy 2.9.x</application>, and provides some
302 of the new sophistication (explained below). <filename>config</filename> is
303 much the same as before.
306 If upgrading from a 2.0.x version, you will have to use the new config
307 files, and possibly adapt any personal rules from your older files.
308 When porting personal rules over from the old <filename>blockfile</filename>
309 to the new actions file, please note that even the pattern syntax has
311 If upgrading from 2.9.x development versions, it is still recommended
312 to use the new configuration files.
315 A quick list of things to be aware of before upgrading:
323 The default listening port is now 8118 due to a conflict with another
329 Some installers may remove earlier versions completely. Save any
330 important configuration files!
335 <application>Privoxy</application> is controllable with a web browser
336 at the special URL: <ulink
337 url="http://config.privoxy.org/">http://config.privoxy.org/</ulink>
338 (Shortcut: <ulink url="http://p.p/">http://p.p/</ulink>). Many
339 aspects of configuration can be done here, including temporarily disabling
340 <application>Privoxy</application>.
345 The primary configuration file for cookie management, ad and banner
346 blocking, and many other aspects of <application>Privoxy</application>
347 configuration is <filename>default.action</filename>. It is strongly
348 recommended to become familiar with the new actions concept below,
349 before modifying this file.
354 <!-- I think it is best to keep this somewhat vague, in case -->
355 <!-- the situation changes under our feet. -->
356 Some installers may not automatically start
357 <application>Privoxy</application> after installation.
366 <!-- ~~~~~ New section ~~~~~ -->
368 <title>Starting <application>Privoxy</application></title>
370 Before launching <application>Privoxy</application> for the first time, you
371 will want to configure your browser(s) to use <application>Privoxy</application>
372 as a HTTP and HTTPS proxy. The default is localhost for the proxy address,
373 and port 8118 (earlier versions used port 8000). This is the one required
374 configuration that must be done!
378 With <application>Netscape</application> (and
379 <application>Mozilla</application>), this can be set under <literal>Edit
380 -> Preferences -> Advanced -> Proxies -> HTTP Proxy</literal>.
381 For <application>Internet Explorer</application>: <literal>Tools ->
382 Internet Properties -> Connections -> LAN Setting</literal>. Then,
383 check <quote>Use Proxy</quote> and fill in the appropriate info (Address:
384 localhost, Port: 8118). Include if HTTPS proxy support too.
388 After doing this, flush your browser's disk and memory caches to force a
389 re-reading of all pages and to get rid of any ads that may be cached. You
390 are now ready to start enjoying the benefits of using
391 <application>Privoxy</application>.
396 <application>Privoxy</application> is typically started by specifying the
397 main configuration file to be used on the command line. Example Unix startup
404 # /usr/sbin/privoxy /etc/privoxy/config
410 An init script is provided for SuSE and Redhat.
414 For for SuSE: <command>rcprivoxy start</command>
418 For RedHat: <command>/etc/rc.d/init.d/privoxy start</command>
423 If no configuration file is specified on the command line,
424 <application>Privoxy</application> will look for a file named
425 <filename>config</filename> in the current directory. Except on Win32 where
426 it will try <filename>config.txt</filename>. If no file is specified on the
427 command line and no default configuration file can be found,
428 <application>Privoxy</application> will fail to start.
433 The included default configuration files should give a reasonable starting
434 point. Most of the per site configuration is done in the
435 <quote>actions</quote> files. These are where various cookie actions are
436 defined, ad and banner blocking, and other aspects of
437 <application>Privoxy</application> configuration. There are several such
438 files included, with varying levels of aggressiveness.
442 You will probably want to keep an eye out for sites that require persistent
443 cookies, and add these to <filename>default.action</filename> as needed. By
444 default, most of these will be accepted only during the current browser
445 session (aka <quote>session cookies</quote>), until you add them to the
446 configuration. If you want the browser to handle this instead, you will need
447 to edit <filename>default.action</filename> and disable this feature. If you
448 use more than one browser, it would make more sense to let
449 <application>Privoxy</application> handle this. In which case, the
450 browser(s) should be set to accept all cookies.
454 Another feature where you will probably want to define exceptions for trusted
455 sites is the popup-killing (through the <literal>+popup</literal> and
456 <literal>+filter{popups}</literal> actions), because your favorite shopping,
457 banking, or leisure site may need popups.
461 <application>Privoxy</application> is HTTP/1.1 compliant, but not all of
462 the optional 1.1 features are as yet supported. In the unlikely event that
463 you experience inexplicable problems with browsers that use HTTP/1.1 per default
464 (like <application>Mozilla</application> or recent versions of I.E.), you might
465 try to force HTTP/1.0 compatibility. For Mozilla, look under <literal>Edit ->
466 Preferences -> Debug -> Networking</literal>.
467 Alternatively, set the <quote>+downgrade</quote> config option in
468 <filename>default.action</filename> which will downgrade your browser's HTTP
469 requests from HTTP/1.1 to HTTP/1.0 before processing them.
473 After running <application>Privoxy</application> for a while, you can
474 start to fine tune the configuration to suit your personal, or site,
475 preferences and requirements. There are many, many aspects that can
476 be customized. <quote>Actions</quote> (as specified in <filename>default.action</filename>)
477 can be adjusted by pointing your browser to
478 <ulink url="http://config.privoxy.org/">http://config.privoxy.org/</ulink>
479 (shortcut: <ulink url="http://p.p/">http://p.p/</ulink>),
480 and then follow the link to <quote>edit the actions list</quote>.
481 (This is an internal page and does not require Internet access.)
485 In fact, various aspects of <application>Privoxy</application>
486 configuration can be viewed from this page, including
487 current configuration parameters, source code version numbers,
488 the browser's request headers, and <quote>actions</quote> that apply
489 to a given URL. In addition to the <filename>default.action</filename> file
490 editor mentioned above, <application>Privoxy</application> can also
491 be turned <quote>on</quote> and <quote>off</quote> (toggled) from this page.
495 If you encounter problems, try loading the page without
496 <application>Privoxy</application>. If that helps, enter the URL where
497 you have the problems into <ulink url="http://p.p/show-url-info">the browser
498 based rule tracing utility</ulink>. See which rules apply and why, and
499 then try turning them off for that site one after the other, until the problem
500 is gone. When you have found the culprit, you might want to turn the rest on
505 If the above paragraph sounds gibberish to you, you might want to <ulink
506 url="configuration.html#ACTIONSFILE">read more about the actions concept</ulink>
507 or even dive deep into the <ulink url="appendix.html#ACTIONSANAT">Appendix
512 If you can't get rid of the problem at all, think you've found a bug in
513 Privoxy, want to propose a new feature or smarter rules, please see the
514 chapter "Contacting the Developers, .." below.
520 <!-- ~~~~~ New section ~~~~~ -->
522 <title>Command Line Options</title>
524 <application>Privoxy</application> may be invoked with the following
525 command-line options:
533 <emphasis>--version</emphasis>
536 Print version info and exit, Unix only.
541 <emphasis>--help</emphasis>
544 Print a short usage info and exit, Unix only.
549 <emphasis>--no-daemon</emphasis>
552 Don't become a daemon, i.e. don't fork and become process group
553 leader, don't detach from controlling tty. Unix only.
558 <emphasis>--pidfile FILE</emphasis>
562 On startup, write the process ID to <emphasis>FILE</emphasis>. Delete the
563 <emphasis>FILE</emphasis> on exit. Failure to create or delete the
564 <emphasis>FILE</emphasis> is non-fatal. If no <emphasis>FILE</emphasis>
565 option is given, no PID file will be used. Unix only.
570 <emphasis>--user USER[.GROUP]</emphasis>
574 After (optionally) writing the PID file, assume the user ID of
575 <emphasis>USER</emphasis>, and if included the GID of GROUP. Exit if the
576 privileges are not sufficient to do so. Unix only.
581 <emphasis>configfile</emphasis>
584 If no <emphasis>configfile</emphasis> is included on the command line,
585 <application>Privoxy</application> will look for a file named
586 <quote>config</quote> in the current directory (except on Win32
587 where it will look for <quote>config.txt</quote> instead). Specify
588 full path to avoid confusion.
599 <!-- ~ End section ~ -->
602 <!-- ~~~~~ New section ~~~~~ -->
603 <sect1 id="configuration"><title><application>Privoxy</application> Configuration</title>
605 All <application>Privoxy</application> configuration is stored
606 in text files. These files can be edited with a text editor.
607 Many important aspects of <application>Privoxy</application> can
608 also be controlled easily with a web browser.
613 <!-- ~~~~~ New section ~~~~~ -->
616 <title>Controlling <application>Privoxy</application> with Your Web Browser</title>
618 <application>Privoxy</application>'s user interface can be reached through the special
619 URL <ulink url="http://config.privoxy.org/">http://config.privoxy.org/</ulink>
620 (shortcut: <ulink url="http://p.p/">http://p.p/</ulink>),
621 which is a built-in page and works without Internet access.
622 You will see the following section:
629 Please choose from the following options:
632 * Show information about the current configuration
633 * Show the source code version numbers
634 * Show the request headers.
635 * Show which actions apply to a URL and why
636 * Toggle Privoxy on or off
637 * Edit the actions list
643 This should be self-explanatory. Note the last item is an editor for the
644 <quote>actions list</quote>, which is where much of the ad, banner, cookie,
645 and URL blocking magic is configured as well as other advanced features of
646 <application>Privoxy</application>. This is an easy way to adjust various
647 aspects of <application>Privoxy</application> configuration. The actions
648 file, and other configuration files, are explained in detail below.
652 <quote>Toggle Privoxy On or Off</quote> is handy for sites that might
653 have problems with your current actions and filters. You can in fact use
654 it as a test to see whether it is <application>Privoxy</application>
655 causing the problem or not. <application>Privoxy</application> continues
656 to run as a proxy in this case, but all filtering is disabled. There
657 is even a toggle Bookmarklet offered, so that you can toggle
658 <application>Privoxy</application> with one click from your browser.
664 <!-- ~ End section ~ -->
669 <!-- ~~~~~ New section ~~~~~ -->
672 <title>Configuration Files Overview</title>
674 For Unix, *BSD and Linux, all configuration files are located in
675 <filename>/etc/privoxy/</filename> by default. For MS Windows, OS/2, and
676 AmigaOS these are all in the same directory as the
677 <application>Privoxy</application> executable. <![%p-not-stable;[ The name
678 and number of configuration files has changed from previous versions, and is
679 subject to change as development progresses.]]>
683 The installed defaults provide a reasonable starting point, though possibly
684 aggressive by some standards. For the time being, there are only three
685 default configuration files (this may change in time):
693 The main configuration file is named <filename>config</filename>
694 on Linux, Unix, BSD, OS/2, and AmigaOS and <filename>config.txt</filename>
701 <filename>default.action</filename> (the actions file) is used to define
702 which of a set of various <quote>actions</quote> relating to images, banners,
703 pop-ups, access restrictions, banners and cookies are to be applied where.
704 There is a web based editor for this file that can be accessed at <ulink
705 url="http://config.privoxy.org/edit-actions/">http://config.privoxy.org/edit-actions/</ulink>
706 (Shortcut: <ulink url="http://p.p/edit-actions/">http://p.p/edit-actions/</ulink>).
707 (Other actions files are included as well with differing levels of filtering
708 and blocking, e.g. <filename>basic.action</filename>.)
714 <filename>default.filter</filename> (the filter file) can be used to re-write the raw
715 page content, including viewable text as well as embedded HTML and JavaScript,
716 and whatever else lurks on any given web page. The filtering jobs are only
717 pre-defined here; whether to apply them or not is up to the actions file.
725 All files use the <quote><literal>#</literal></quote> character to denote a
726 comment (the rest of the line will be ignored) and understand line continuation
727 through placing a backslash ("<literal>\</literal>") as the very last character
728 in a line. If the <literal>#</literal> is preceded by a backslash, it looses
729 its special function. Placing a <literal>#</literal> in front of an otherwise
730 valid configuration line to prevent it from being interpreted is called "commenting
735 <filename>default.action</filename> and <filename>default.filter</filename>
736 can use Perl style regular expressions for maximum flexibility.
740 After making any changes, there is no need to restart
741 <application>Privoxy</application> in order for the changes to take
742 effect. <application>Privoxy</application> detects such changes
743 automatically. Note, however, that it may take one or two additional
744 requests for the change to take effect. When changing the listening address
745 of <application>Privoxy</application>, these <quote>wake up</quote> requests
746 must obviously be sent to the <emphasis>old</emphasis> listening address.
751 While under development, the configuration content is subject to change.
752 The below documentation may not be accurate by the time you read this.
753 Also, what constitutes a <quote>default</quote> setting, may change, so
754 please check all your configuration files on important issues.
760 <!-- ~~~~~ New section ~~~~~ -->
763 <title>The Main Configuration File</title>
765 Again, the main configuration file is named <filename>config</filename> on
766 Linux/Unix/BSD and OS/2, and <filename>config.txt</filename> on Windows.
767 Configuration lines consist of an initial keyword followed by a list of
768 values, all separated by whitespace (any number of spaces or tabs). For
776 <emphasis>confdir /etc/privoxy</emphasis>
783 Assigns the value <literal>/etc/privoxy</literal> to the option
784 <literal>confdir</literal> and thus indicates that the configuration
785 directory is named <quote>/etc/privoxy/</quote>.
789 All options in the config file except for <literal>confdir</literal> and
790 <literal>logdir</literal> are optional. Watch out in the below description
791 for what happens if you leave them unset.
795 The main config file controls all aspects of <application>Privoxy</application>'s
796 operation that are not location dependent (i.e. they apply universally, no matter
797 where you may be surfing).
801 <!-- ~~~~~ New section ~~~~~ -->
804 <title>Configuration and Log File Locations</title>
807 <application>Privoxy</application> can (and normally does) use a number of
808 other files for additional configuration and logging.
809 This section of the configuration file tells <application>Privoxy</application>
810 where to find those other files.
814 <sect4><title>confdir</title>
818 <term>Specifies:</term>
820 <para>The directory where the other configuration files are located</para>
824 <term>Type of value:</term>
826 <para>Path name</para>
830 <term>Default value:</term>
832 <para>/etc/privoxy (Unix) <emphasis>or</emphasis> <application>Privoxy</application> installation dir (Windows) </para>
836 <term>Effect if unset:</term>
838 <para><emphasis>Mandatory</emphasis></para>
845 No trailing <quote><literal>/</literal></quote>, please
848 When development goes modular and multi-user, the blocker, filter, and
849 per-user config will be stored in subdirectories of <quote>confdir</quote>.
850 For now, the configuration directory structure is flat, except for
851 <filename>confdir/templates</filename>, where the HTML templates for CGI
852 output reside (e.g. <application>Privoxy's</application> 404 error page).
860 <sect4><title>logdir</title>
864 <term>Specifies:</term>
867 The directory where all logging takes place (i.e. where <filename>logfile</filename> and
868 <filename>jarfile</filename> are located)
873 <term>Type of value:</term>
875 <para>Path name</para>
879 <term>Default value:</term>
881 <para>/var/log/privoxy (Unix) <emphasis>or</emphasis> <application>Privoxy</application> installation dir (Windows) </para>
885 <term>Effect if unset:</term>
887 <para><emphasis>Mandatory</emphasis></para>
894 No trailing <quote><literal>/</literal></quote>, please
901 <sect4><title>actionsfile</title>
905 <term>Specifies:</term>
908 The actions file to use
913 <term>Type of value:</term>
915 <para>File name, relative to <literal>confdir</literal></para>
919 <term>Default value:</term>
921 <para>default.action (Unix) <emphasis>or</emphasis> default.action.txt (Windows)</para>
925 <term>Effect if unset:</term>
928 No action is taken at all. Simple neutral proxying.
936 There is no point in using <application>Privoxy</application> without
937 an actions file. There are three different actions files included in the
938 distribution, with varying degrees of aggressiveness:
939 <filename>default.action</filename>, <filename>intermediate.action</filename> and
940 <filename>advanced.action</filename>.
947 <sect4><title>filterfile</title>
951 <term>Specifies:</term>
954 The filter file to use
959 <term>Type of value:</term>
961 <para>File name, relative to <literal>confdir</literal></para>
965 <term>Default value:</term>
967 <para>default.filter (Unix) <emphasis>or</emphasis> default.filter.txt (Windows)</para>
971 <term>Effect if unset:</term>
974 No textual content filtering takes place, i.e. all
975 <literal>+filter{<replaceable class="parameter">name</replaceable>}</literal>
976 actions in the actions file are turned off
984 The <quote>default.filter</quote> file contains content modification rules
985 that use <quote>regular expressions</quote>. These rules permit powerful
986 changes on the content of Web pages, e.g., you could disable your favorite
987 JavaScript annoyances, re-write the actual displayed text, or just have some
988 fun replacing <quote>Microsoft</quote> with <quote>MicroSuck</quote> wherever
989 it appears on a Web page.
996 <sect4><title>logfile</title>
1000 <term>Specifies:</term>
1008 <term>Type of value:</term>
1010 <para>File name, relative to <literal>logdir</literal></para>
1014 <term>Default value:</term>
1016 <para>logfile (Unix) <emphasis>or</emphasis> privoxy.log (Windows)</para>
1020 <term>Effect if unset:</term>
1023 No log file is used, all log messages go to the console (<literal>stderr</literal>).
1031 The windows version will additionally log to the console.
1034 The logfile is where all logging and error messages are written. The level
1035 of detail and number of messages are set with the <literal>debug</literal>
1036 option (see below). The logfile can be useful for tracking down a problem with
1037 <application>Privoxy</application> (e.g., it's not blocking an ad you
1038 think it should block) but in most cases you probably will never look at it.
1041 Your logfile will grow indefinitely, and you will probably want to
1042 periodically remove it. On Unix systems, you can do this with a cron job
1043 (see <quote>man cron</quote>). For Redhat, a <command>logrotate</command>
1044 script has been included.
1047 On SuSE Linux systems, you can place a line like <quote>/var/log/privoxy.*
1048 +1024k 644 nobody.nogroup</quote> in <filename>/etc/logfiles</filename>, with
1049 the effect that cron.daily will automatically archive, gzip, and empty the
1050 log, when it exceeds 1M size.
1057 <sect4><title>jarfile</title>
1061 <term>Specifies:</term>
1064 The file to store intercepted cookies in
1069 <term>Type of value:</term>
1071 <para>File name, relative to <literal>logdir</literal></para>
1075 <term>Default value:</term>
1077 <para>jarfile (Unix) <emphasis>or</emphasis> privoxy.jar (Windows)</para>
1081 <term>Effect if unset:</term>
1084 Intercepted cookies are not stored at all.
1092 The jarfile may grow to ridiculous sizes over time.
1099 <sect4><title>trustfile</title>
1103 <term>Specifies:</term>
1106 The trust file to use
1111 <term>Type of value:</term>
1113 <para>File name, relative to <literal>confdir</literal></para>
1117 <term>Default value:</term>
1119 <para><emphasis>Unset (commented out)</emphasis>. When activated: trust (Unix) <emphasis>or</emphasis> trust.txt (Windows)</para>
1123 <term>Effect if unset:</term>
1126 The whole trust mechanism is turned off.
1134 The trust mechanism is an experimental feature for building white-lists and should
1135 be used with care. It is <emphasis>NOT</emphasis> recommended for the casual user.
1138 If you specify a trust file, <application>Privoxy</application> will only allow
1139 access to sites that are named in the trustfile.
1140 You can also mark sites as trusted referrers (with <literal>+</literal>), with
1141 the effect that access to untrusted sites will be granted, if a link from a
1142 trusted referrer was used.
1143 The link target will then be added to the <quote>trustfile</quote>.
1144 Possible applications include limiting Internet access for children.
1147 If you use <literal>+</literal> operator in the trust file, it may grow considerably over time.
1156 <!-- ~ End section ~ -->
1160 <!-- ~~~~~ New section ~~~~~ -->
1163 <title>Local Set-up Documentation</title>
1166 If you intend to operate <application>Privoxy</application> for more users
1167 that just yourself, it might be a good idea to let them know how to reach
1168 you, what you block and why you do that, your policies etc.
1171 <sect4><title>trust-info-url</title>
1175 <term>Specifies:</term>
1178 A URL to be displayed in the error page that users will see if access to an untrusted page is denied.
1183 <term>Type of value:</term>
1189 <term>Default value:</term>
1191 <para>Two example URL are provided</para>
1195 <term>Effect if unset:</term>
1198 No links are displayed on the "untrusted" error page.
1206 The value of this option only matters if the experimental trust mechanism has been
1207 activated. (See <literal>trustfile</literal> above.)
1210 If you use the trust mechanism, it is a good idea to write up some on-line
1211 documentation about your trust policy and to specify the URL(s) here.
1212 Use multiple times for multiple URLs.
1215 The URL(s) should be added to the trustfile as well, so users don't end up
1216 locked out from the information on why they were locked out in the first place!
1223 <sect4><title>admin-address</title>
1227 <term>Specifies:</term>
1230 An email address to reach the proxy administrator.
1235 <term>Type of value:</term>
1237 <para>Email address</para>
1241 <term>Default value:</term>
1243 <para><emphasis>Unset</emphasis></para>
1247 <term>Effect if unset:</term>
1250 No email address is displayed on error pages and the CGI user interface.
1258 If both <literal>admin-address</literal> and <literal>proxy-info-url</literal>
1259 are unset, the whole "Local Privoxy Support" box on all generated pages will
1267 <sect4><title>proxy-info-url</title>
1271 <term>Specifies:</term>
1274 A URL to documentation about the local <application>Privoxy</application> setup,
1275 configuration or policies.
1280 <term>Type of value:</term>
1286 <term>Default value:</term>
1288 <para><emphasis>Unset</emphasis></para>
1292 <term>Effect if unset:</term>
1295 No link to local documentation is displayed on error pages and the CGI user interface.
1303 If both <literal>admin-address</literal> and <literal>proxy-info-url</literal>
1304 are unset, the whole "Local Privoxy Support" box on all generated pages will
1308 This URL shouldn't be blocked ;-)
1316 <!-- ~ End section ~ -->
1318 <!-- ~~~~~ New section ~~~~~ -->
1321 <title>Debugging</title>
1324 These options are mainly useful when tracing a problem.
1325 Note that you might also want to invoke
1326 <application>Privoxy</application> with the <literal>--no-daemon</literal>
1327 command line option when debugging.
1330 <sect4><title>debug</title>
1334 <term>Specifies:</term>
1337 Key values that determine what information gets logged.
1342 <term>Type of value:</term>
1344 <para>Integer values</para>
1348 <term>Default value:</term>
1350 <para>12289 (i.e.: URLs plus informational and warning messages)</para>
1354 <term>Effect if unset:</term>
1357 Nothing gets logged.
1365 The available debug levels are:
1369 debug 1 # show each GET/POST/CONNECT request
1370 debug 2 # show each connection status
1371 debug 4 # show I/O status
1372 debug 8 # show header parsing
1373 debug 16 # log all data into the logfile
1374 debug 32 # debug force feature
1375 debug 64 # debug regular expression filter
1376 debug 128 # debug fast redirects
1377 debug 256 # debug GIF de-animation
1378 debug 512 # Common Log Format
1379 debug 1024 # debug kill pop-ups
1380 debug 4096 # Startup banner and warnings.
1381 debug 8192 # Non-fatal errors
1385 To select multiple debug levels, you can either add them or use
1386 multiple <literal>debug</literal> lines.
1389 A debug level of 1 is informative because it will show you each request
1390 as it happens. <emphasis>1, 4096 and 8192 are highly recommended</emphasis>
1391 so that you will notice when things go wrong. The other levels are probably
1392 only of interest if you are hunting down a specific problem. They can produce
1393 a hell of an output (especially 16).
1397 The reporting of <emphasis>fatal</emphasis> errors (i.e. ones which crash
1398 <application>Privoxy</application>) is always on and cannot be disabled.
1401 If you want to use CLF (Common Log Format), you should set <quote>debug
1402 512</quote> <emphasis>ONLY</emphasis> and not enable anything else.
1409 <sect4><title>single-threaded</title>
1413 <term>Specifies:</term>
1416 Whether to run only one server thread
1421 <term>Type of value:</term>
1423 <para><emphasis>None</emphasis></para>
1427 <term>Default value:</term>
1429 <para><emphasis>Unset</emphasis></para>
1433 <term>Effect if unset:</term>
1436 Multi-threaded (or, where unavailable: forked) operation, i.e. the ability to
1437 serve multiple requests simultaneously.
1445 This option is only there for debug purposes and you should never
1446 need to use it. <emphasis>It will drastically reduce performance.</emphasis>
1455 <!-- ~~~~~ New section ~~~~~ -->
1458 <title>Access Control and Security</title>
1461 This section of the config file controls the security-relevant aspects
1462 of <application>Privoxy</application>'s configuration.
1465 <sect4><title>listen-address</title>
1469 <term>Specifies:</term>
1472 The IP address and TCP port on which <application>Privoxy</application> will
1473 listen for client requests.
1478 <term>Type of value:</term>
1480 <para>[<replaceable class="parameter">IP-Address</replaceable>]:<replaceable class="parameter">Port</replaceable></para>
1484 <term>Default value:</term>
1486 <para>localhost:8118</para>
1490 <term>Effect if unset:</term>
1493 Bind to localhost (127.0.0.1), port 8118. This is suitable and recommended for
1494 home users who run <application>Privoxy</application> on the same machine as
1503 You will need to configure your browser(s) to this proxy address and port.
1506 If you already have another service running on port 8118, or if you want to
1507 serve requests from other machines (e.g. on your local network) as well, you
1508 will need to override the default.
1511 If you leave out the IP address, <application>Privoxy</application> will
1512 bind to all interfaces (addresses) on your machine and may become reachable
1513 from the Internet. In that case, consider using access control lists (acl's)
1514 (see <quote>ACLs</quote> below), or a firewall.
1519 <term>Example:</term>
1522 Suppose you are running <application>Privoxy</application> on
1523 a machine which has the address 192.168.0.1 on your local private network
1524 (192.168.0.0) and has another outside connection with a different address.
1525 You want it to serve requests from inside only:
1529 listen-address 192.168.0.1:8118
1537 <sect4><title>toggle</title>
1541 <term>Specifies:</term>
1544 Initial state of "toggle" status
1549 <term>Type of value:</term>
1555 <term>Default value:</term>
1561 <term>Effect if unset:</term>
1564 Act as if toggled on
1572 If set to 0, <application>Privoxy</application> will start in
1573 <quote>toggled off</quote> mode, i.e. behave like a normal, content-neutral
1574 proxy. See <literal>enable-remote-toggle</literal>
1575 below. This is not really useful anymore, since toggling is much easier
1576 via <ulink url="http://config.privoxy.org/toggle">the web
1577 interface</ulink> then via editing the <filename>conf</filename> file.
1580 The windows version will only display the toggle icon in the system tray
1581 if this option is present.
1589 <sect4><title>enable-remote-toggle</title>
1592 <term>Specifies:</term>
1595 Whether or not the <ulink url="http://config.privoxy.org/toggle">web-based toggle
1596 feature</ulink> may be used
1601 <term>Type of value:</term>
1607 <term>Default value:</term>
1613 <term>Effect if unset:</term>
1616 The web-based toggle feature is disabled.
1624 When toggled off, <application>Privoxy</application> acts like a normal,
1625 content-neutral proxy, i.e. it acts as if none of the actions applied to
1629 For the time being, access to the toggle feature can <emphasis>not</emphasis> be
1630 controlled separately by <quote>ACLs</quote> or HTTP authentication,
1631 so that everybody who can access <application>Privoxy</application> (see
1632 <quote>ACLs</quote> and <literal>listen-address</literal> above) can
1633 toggle it for all users. So this option is <emphasis>not recommended</emphasis>
1634 for multi-user environments with untrusted users.
1637 Note that you must have compiled <application>Privoxy</application> with
1638 support for this feature, otherwise this option has no effect.
1646 <sect4><title>enable-edit-actions</title>
1649 <term>Specifies:</term>
1652 Whether or not the <ulink url="http://config.privoxy.org/edit-actions">web-based actions
1653 file editor</ulink> may be used
1658 <term>Type of value:</term>
1664 <term>Default value:</term>
1670 <term>Effect if unset:</term>
1673 The web-based actions file editor is disabled.
1681 For the time being, access to the editor can <emphasis>not</emphasis> be
1682 controlled separately by <quote>ACLs</quote> or HTTP authentication,
1683 so that everybody who can access <application>Privoxy</application> (see
1684 <quote>ACLs</quote> and <literal>listen-address</literal> above) can
1685 modify its configuration for all users. So this option is <emphasis>not
1686 recommended</emphasis> for multi-user environments with untrusted users.
1689 Note that you must have compiled <application>Privoxy</application> with
1690 support for this feature, otherwise this option has no effect.
1697 <sect4><title>ACLs: permit-access and deny-access</title>
1700 <term>Specifies:</term>
1703 Who can access what.
1708 <term>Type of value:</term>
1711 <replaceable class="parameter">src_addr</replaceable>[/<replaceable class="parameter">src_masklen</replaceable>]
1712 [<replaceable class="parameter">dst_addr</replaceable>[/<replaceable class="parameter">dst_masklen</replaceable>]]
1715 Where <replaceable class="parameter">src_addr</replaceable> and
1716 <replaceable class="parameter">dst_addr</replaceable> are IP addresses in dotted decimal notation or valid
1717 DNS names, and <replaceable class="parameter">src_masklen</replaceable> and
1718 <replaceable class="parameter">dst_masklen</replaceable> are subnet masks in CIDR notation, i.e. integer
1719 values from 2 to 30 representing the length (in bits) of the network address. The masks and the whole
1720 destination part are optional.
1725 <term>Default value:</term>
1727 <para><emphasis>Unset</emphasis></para>
1731 <term>Effect if unset:</term>
1734 Don't restrict access further than implied by <literal>listen-address</literal>
1742 Access controls are included at the request of ISPs and systems
1743 administrators, and <emphasis>are not usually needed by individual users</emphasis>.
1744 For a typical home user, it will normally suffice to ensure that
1745 <application>Privoxy</application> only listens on the localhost or internal (home)
1746 network address by means of the <literal>listen-address</literal> option.
1749 Please see the warnings in the FAQ that this proxy is not intended to be a substitute
1750 for a firewall or to encourage anyone to defer addressing basic security
1754 Multiple ACL lines are OK.
1755 If any ACLs are specified, then the <application>Privoxy</application>
1756 talks only to IP addresses that match at least one <literal>permit-access</literal> line
1757 and don't match any subsequent <literal>deny-access</literal> line. In other words, the
1758 last match wins, with the default being <literal>deny-access</literal>.
1761 If <application>Privoxy</application> is using a forwarder (see <literal>forward</literal> below)
1762 for a particular destination URL, the <replaceable class="parameter">dst_addr</replaceable>
1763 that is examined is the address of the forwarder and <emphasis>NOT</emphasis> the address
1764 of the ultimate target. This is necessary because it may be impossible for the local
1765 <application>Privoxy</application> to determine the IP address of the
1766 ultimate target (that's often what gateways are used for).
1769 You should prefer using IP addresses over DNS names, because the address lookups take
1770 time. All DNS names must resolve! You can <emphasis>not</emphasis> use domain patterns
1771 like <quote>*.org</quote> or partial domain names. If a DNS name resolves to multiple
1772 IP addresses, only the first one is used.
1775 Denying access to particular sites by ACL may have undesired side effects
1776 if the site in question is hosted on a machine which also hosts other sites.
1781 <term>Examples:</term>
1784 Explicitly define the default behavior if no ACL and
1785 <literal>listen-address</literal> are set: <quote>localhost</quote>
1786 is OK. The absence of a <replaceable class="parameter">dst_addr</replaceable> implies that
1787 <emphasis>all</emphasis> destination addresses are OK:
1791 permit-access localhost
1795 Allow any host on the same class C subnet as www.privoxy.org access to
1796 nothing but www.example.com:
1800 permit-access www.privoxy.org/24 www.example.com/32
1804 Allow access from any host on the 26-bit subnet 192.168.45.64 to anywhere,
1805 with the exception that 192.168.45.73 may not access www.dirty-stuff.example.com:
1809 permit-access 192.168.45.64/26
1810 deny-access 192.168.45.73 www.dirty-stuff.example.com
1818 <sect4><title>buffer-limit</title>
1822 <term>Specifies:</term>
1825 Maximum size of the buffer for content filtering.
1830 <term>Type of value:</term>
1832 <para>Size in Kbytes</para>
1836 <term>Default value:</term>
1842 <term>Effect if unset:</term>
1845 Use a 4MB (4096 KB) limit.
1853 For content filtering, i.e. the <literal>+filter</literal> and
1854 <literal>+deanimate-gif</literal> actions, it is necessary that
1855 <application>Privoxy</application> buffers the entire document body.
1856 This can be potentially dangerous, since a server could just keep sending
1857 data indefinitely and wait for your RAM to exhaust -- with nasty consequences.
1861 When a document buffer size reaches the <literal>buffer-limit</literal>, it is
1862 flushed to the client unfiltered and no further attempt to
1863 filter the rest of the document is made. Remember that there may be multiple threads
1864 running, which might require up to <literal>buffer-limit</literal> Kbytes
1865 <emphasis>each</emphasis>, unless you have enabled <quote>single-threaded</quote>
1875 <!-- ~ End section ~ -->
1878 <!-- ~~~~~ New section ~~~~~ -->
1880 <sect3 id="forwarding">
1881 <title>Forwarding</title>
1884 This feature allows routing of HTTP requests through a chain of
1886 It can be used to better protect privacy and confidentiality when
1887 accessing specific domains by routing requests to those domains
1888 through an anonymous public proxy (see e.g. <ulink
1889 url="http://www.multiproxy.org/anon_list.htm">http://www.multiproxy.org/anon_list.htm</ulink>)
1890 Or to use a caching proxy to speed up browsing. Or chaining to a parent
1891 proxy may be necessary because the machine that <application>Privoxy</application>
1892 runs on has no direct Internet access.
1896 Also specified here are SOCKS proxies. <application>Privoxy</application>
1897 supports the SOCKS 4 and SOCKS 4A protocols.
1900 <sect4><title>forward</title>
1903 <term>Specifies:</term>
1906 To which parent HTTP proxy specific requests should be routed.
1911 <term>Type of value:</term>
1914 <replaceable class="parameter">target_domain</replaceable>[:<replaceable class="parameter">port</replaceable>]
1915 <replaceable class="parameter">http_parent</replaceable>[/<replaceable class="parameter">port</replaceable>]
1918 Where <replaceable class="parameter">target_domain</replaceable> is a domain name pattern (see the
1919 chapter on domain matching in the actions file),
1920 <replaceable class="parameter">http_parent</replaceable> is the address of the parent HTTP proxy
1921 as an IP addresses in dotted decimal notation or as a valid DNS name (or <quote>.</quote> to denote
1922 <quote>no forwarding</quote>, and the optional
1923 <replaceable class="parameter">port</replaceable> parameters are TCP ports, i.e. integer
1924 values from 1 to 64535
1929 <term>Default value:</term>
1931 <para><emphasis>Unset</emphasis></para>
1935 <term>Effect if unset:</term>
1938 Don't use parent HTTP proxies.
1946 If <replaceable class="parameter">http_parent</replaceable> is <quote>.</quote>, then requests are not
1947 forwarded to another HTTP proxy but are made directly to the web servers.
1950 Multiple lines are OK, they are checked in sequence, and the last match wins.
1955 <term>Examples:</term>
1958 Everything goes to an example anonymizing proxy, except SSL on port 443 (which it doesn't handle):
1962 forward .* anon-proxy.example.org:8080
1967 Everything goes to our example ISP's caching proxy, except for requests
1968 to that ISP's sites:
1972 forward .*. caching-proxy.example-isp.net:8000
1973 forward .example-isp.net .
1981 <sect4><title>forward-socks4 and forward-socks4a</title>
1984 <term>Specifies:</term>
1987 Through which SOCKS proxy (and to which parent HTTP proxy) specific requests should be routed.
1992 <term>Type of value:</term>
1995 <replaceable class="parameter">target_domain</replaceable>[:<replaceable class="parameter">port</replaceable>]
1996 <replaceable class="parameter">socks_proxy</replaceable>[/<replaceable class="parameter">port</replaceable>]
1997 <replaceable class="parameter">http_parent</replaceable>[/<replaceable class="parameter">port</replaceable>]
2000 Where <replaceable class="parameter">target_domain</replaceable> is a domain name pattern (see the
2001 chapter on domain matching in the actions file),
2002 <replaceable class="parameter">http_parent</replaceable> and <replaceable class="parameter">socks_proxy</replaceable>
2003 are IP addresses in dotted decimal notation or valid DNS names (<replaceable class="parameter">http_parent</replaceable>
2004 may be <quote>.</quote> to denote <quote>no HTTP forwarding</quote>), and the optional
2005 <replaceable class="parameter">port</replaceable> parameters are TCP ports, i.e. integer values from 1 to 64535
2010 <term>Default value:</term>
2012 <para><emphasis>Unset</emphasis></para>
2016 <term>Effect if unset:</term>
2019 Don't use SOCKS proxies.
2027 Multiple lines are OK, they are checked in sequence, and the last match wins.
2030 The difference between <literal>forward-socks4</literal> and <literal>forward-socks4a</literal>
2031 is that in the SOCKS 4A protocol, the DNS resolution of the target hostname happens on the SOCKS
2032 server, while in SOCKS 4 it happens locally.
2035 If <replaceable class="parameter">http_parent</replaceable> is <quote>.</quote>, then requests are not
2036 forwarded to another HTTP proxy but are made (HTTP-wise) directly to the web servers, albeit through
2042 <term>Examples:</term>
2045 From the company example.com, direct connections are made to all
2046 <quote>internal</quote> domains, but everything outbound goes through
2047 their ISP's proxy by way of example.com's corporate SOCKS 4A gateway to
2052 forward-socks4a .*. socks-gw.example.com:1080 www-cache.example-isp.net:8080
2053 forward .example.com .
2057 A rule that uses a SOCKS 4 gateway for all destinations but no HTTP parent looks like this:
2061 forward-socks4 .*. socks-gw.example.com:1080 .
2069 <sect4><title>Advanced Forwarding Examples</title>
2072 If you have links to multiple ISPs that provide various special content
2073 only to their subscribers, you can configure multiple <application>Privoxies</application>
2074 which have connections to the respective ISPs to act as forwarders to each other, so that
2075 <emphasis>your</emphasis> users can see the internal content of all ISPs.
2079 Assume that host-a has a PPP connection to isp-a.net. And host-b has a PPP connection to
2080 isp-b.net. Both run <application>Privoxy</application>. Their forwarding
2081 configuration can look like this:
2091 forward .isp-b.net host-b:8118
2102 forward .isp-a.net host-a:8118
2107 Now, your users can set their browser's proxy to use either
2108 host-a or host-b and be able to browse the internal content
2109 of both isp-a and isp-b.
2113 If you intend to chain <application>Privoxy</application> and
2114 <application>squid</application> locally, then chain as
2115 <literal>browser -> squid -> privoxy</literal> is the recommended way.
2119 Assuming that <application>Privoxy</application> and <application>squid</application>
2120 run on the same box, your squid configuration could then look like this:
2125 # Define Privoxy as parent proxy (without ICP)
2126 cache_peer 127.0.0.1 parent 8118 7 no-query
2128 # Define ACL for protocol FTP
2131 # Do not forward FTP requests to Privoxy
2132 always_direct allow ftp
2134 # Forward all the rest to Privoxy
2135 never_direct allow all
2140 You would then need to change your browser's proxy settings to <application>squid</application>'s address and port.
2141 Squid normally uses port 3128. If unsure consult <literal>http_port</literal> in <filename>squid.conf</filename>.
2148 <!-- ~ End section ~ -->
2151 <!-- ~~~~~ New section ~~~~~ -->
2154 <title>Windows GUI Options</title>
2156 Removed references to Win32. HB 09/23/01
2159 <application>Privoxy</application> has a number of options specific to the
2160 Windows GUI interface:
2164 If <quote>activity-animation</quote> is set to 1, the
2165 <application>Privoxy</application> icon will animate when
2166 <quote>Privoxy</quote> is active. To turn off, set to 0.
2173 <emphasis>activity-animation 1</emphasis>
2180 If <quote>log-messages</quote> is set to 1,
2181 <application>Privoxy</application> will log messages to the console
2189 <emphasis>log-messages 1</emphasis>
2196 If <quote>log-buffer-size</quote> is set to 1, the size of the log buffer,
2197 i.e. the amount of memory used for the log messages displayed in the
2198 console window, will be limited to <quote>log-max-lines</quote> (see below).
2202 Warning: Setting this to 0 will result in the buffer to grow infinitely and
2203 eat up all your memory!
2210 <emphasis>log-buffer-size 1</emphasis>
2217 <application>log-max-lines</application> is the maximum number of lines held
2218 in the log buffer. See above.
2225 <emphasis>log-max-lines 200</emphasis>
2232 If <quote>log-highlight-messages</quote> is set to 1,
2233 <application>Privoxy</application> will highlight portions of the log
2234 messages with a bold-faced font:
2241 <emphasis>log-highlight-messages 1</emphasis>
2248 The font used in the console window:
2255 <emphasis>log-font-name Comic Sans MS</emphasis>
2262 Font size used in the console window:
2269 <emphasis>log-font-size 8</emphasis>
2276 <quote>show-on-task-bar</quote> controls whether or not
2277 <application>Privoxy</application> will appear as a button on the Task bar
2285 <emphasis>show-on-task-bar 0</emphasis>
2292 If <quote>close-button-minimizes</quote> is set to 1, the Windows close
2293 button will minimize <application>Privoxy</application> instead of closing
2294 the program (close with the exit option on the File menu).
2301 <emphasis>close-button-minimizes 1</emphasis>
2308 The <quote>hide-console</quote> option is specific to the MS-Win console
2309 version of <application>Privoxy</application>. If this option is used,
2310 <application>Privoxy</application> will disconnect from and hide the
2327 <!-- ~ End section ~ -->
2330 <!-- ~~~~~ New section ~~~~~ -->
2331 <sect2 id="actionsfile">
2332 <title>The Actions File</title>
2335 The actions file (<filename>default.action</filename>, formerly:
2336 <filename>actionsfile</filename> or <filename>ijb.action</filename>) is used
2337 to define what actions <application>Privoxy</application> takes for which
2338 URLs, and thus determines how ad images, cookies and various other aspects
2339 of HTTP content and transactions are handled on which sites (or even parts
2344 Anything you want can blocked, including ads, banners, or just some obnoxious
2345 URL that you would rather not see. Cookies can be accepted or rejected, or
2346 accepted only during the current browser session (i.e. not written to disk),
2347 content can be modified, JavaScripts tamed, user-tracking fooled, and much more.
2348 See below for a complete list of available actions.
2351 <!-- ~~~~~ New section ~~~~~ -->
2353 <title>Finding the Right Mix</title>
2355 Note that some actions like cookie suppression or script disabling may
2356 render some sites unusable, which rely on these techniques to work properly.
2357 Finding the right mix of actions is not easy and certainly a matter of personal
2358 taste. In general, it can be said that the more <quote>aggressive</quote>
2359 your default settings (in the top section of the actions file) are,
2360 the more exceptions for <quote>trusted</quote> sites you will have to
2361 make later. If, for example, you want to kill popup windows per default, you'll
2362 have to make exceptions from that rule for sites that you regularly use
2363 and that require popups for actually useful content, like maybe your bank,
2364 favorite shop, or newspaper.
2368 We have tried to provide you with reasonable rules to start from in the
2369 distribution actions file. But there is no general rule of thumb on these
2370 things. There just are too many variables, and sites are constantly changing.
2371 Sooner or later you will want to change the rules (and read this chapter).
2375 <!-- ~~~~~ New section ~~~~~ -->
2377 <title>How to Edit</title>
2379 The easiest way to edit the <quote>actions</quote> file is with a browser by
2380 using our browser-based editor, which is available at <ulink
2381 url="http://config.privoxy.org/edit-actions">http://config.privoxy.org/edit-actions</ulink>.
2385 If you prefer plain text editing to GUIs, you can of course also directly edit the
2386 <filename>default.action</filename> file.
2392 <title>How Actions are Applied to URLs</title>
2394 The actions file is divided into sections. There are special sections,
2395 like the alias sections which will be discussed later. For now let's
2396 concentrate on regular sections: They have a heading line (often split
2397 up to multiple lines for readability) which consist of a list of actions,
2398 separated by whitespace and enclosed in curly braces. Below that, there
2399 is a list of URL patterns, each on a separate line.
2403 To determine which actions apply to a request, the URL of the request is
2404 compared to all patterns in this file. Every time it matches, the list of
2405 applicable actions for the URL is incrementally updated, using the heading
2406 of the section in which the pattern is located. If multiple matches for
2407 the same URL set the same action differently, the last match wins.
2411 You can trace this process by visiting <ulink
2412 url="http://config.privoxy.org/show-url-info">http://config.privoxy.org/show-url-info</ulink>.
2416 More detail on this is provided in the Appendix, <link linkend="ACTIONSANAT">
2417 Anatomy of an Action</link>.
2421 <!-- ~~~~~ New section ~~~~~ -->
2423 <title>Patterns</title>
2425 Generally, a pattern has the form <literal><domain>/<path></literal>,
2426 where both the <literal><domain></literal> and <literal><path></literal>
2427 are optional. (This is why the pattern <literal>/</literal> matches all URLs).
2432 <term><literal>www.example.com/</literal></term>
2435 is a domain-only pattern and will match any request to <literal>www.example.com</literal>,
2436 regardless of which document on that server is requested.
2441 <term><literal>www.example.com</literal></term>
2444 means exactly the same. For domain-only patterns, the trailing <literal>/</literal> may
2450 <term><literal>www.example.com/index.html</literal></term>
2453 matches only the single document <literal>/index.html</literal>
2454 on <literal>www.example.com</literal>.
2459 <term><literal>/index.html</literal></term>
2462 matches the document <literal>/index.html</literal>, regardless of the domain,
2463 i.e. on <emphasis>any</emphasis> web server.
2468 <term><literal>index.html</literal></term>
2471 matches nothing, since it would be interpreted as a domain name and
2472 there is no top-level domain called <literal>.html</literal>.
2478 <sect4><title>The Domain Pattern</title>
2481 The matching of the domain part offers some flexible options: if the
2482 domain starts or ends with a dot, it becomes unanchored at that end.
2488 <term><literal>.example.com</literal></term>
2491 matches any domain that <emphasis>ENDS</emphasis> in
2492 <literal>.example.com</literal>
2497 <term><literal>www.</literal></term>
2500 matches any domain that <emphasis>STARTS</emphasis> with
2501 <literal>www.</literal>
2506 <term><literal>.example.</literal></term>
2509 matches any domain that <emphasis>CONTAINS</emphasis> <literal>.example.</literal>
2510 (Correctly speaking: It matches any FQDN that contains <literal>example</literal> as a domain.)
2517 Additionally, there are wild-cards that you can use in the domain names
2518 themselves. They work pretty similar to shell wild-cards: <quote>*</quote>
2519 stands for zero or more arbitrary characters, <quote>?</quote> stands for
2520 any single character, you can define character classes in square
2521 brackets and all of that can be freely mixed:
2526 <term><literal>ad*.example.com</literal></term>
2529 matches <quote>adserver.example.com</quote>,
2530 <quote>ads.example.com</quote>, etc but not <quote>sfads.example.com</quote>
2535 <term><literal>*ad*.example.com</literal></term>
2538 matches all of the above, and then some.
2543 <term><literal>.?pix.com</literal></term>
2546 matches <literal>www.ipix.com</literal>,
2547 <literal>pictures.epix.com</literal>, <literal>a.b.c.d.e.upix.com</literal> etc.
2552 <term><literal>www[1-9a-ez].example.c*</literal></term>
2555 matches <literal>www1.example.com</literal>,
2556 <literal>www4.example.cc</literal>, <literal>wwwd.example.cy</literal>,
2557 <literal>wwwz.example.com</literal> etc., but <emphasis>not</emphasis>
2558 <literal>wwww.example.com</literal>.
2566 <sect4><title>The Path Pattern</title>
2569 <application>Privoxy</application> uses Perl compatible regular expressions
2570 (through the <ulink url="http://www.pcre.org/">PCRE</ulink> library) for
2575 There is an <link linkend="regex">Appendix</link> with a brief quick-start into regular
2576 expressions, and full (very technical) documentation on PCRE regex syntax is available on-line
2577 at <ulink url="http://www.pcre.org/man.txt">http://www.pcre.org/man.txt</ulink>.
2578 You might also find the Perl man page on regular expressions (<literal>man perlre</literal>)
2579 useful, which is available on-line at <ulink
2580 url="http://www.perldoc.com/perl5.6/pod/perlre.html">http://www.perldoc.com/perl5.6/pod/perlre.html</ulink>.
2584 Note that the path pattern is automatically left-anchored at the <quote>/</quote>,
2585 i.e. it matches as if it would start with a <quote>^</quote>.
2589 Please also note that matching in the path is case
2590 <emphasis>INSENSITIVE</emphasis> by default, but you can switch to case
2591 sensitive at any point in the pattern by using the
2592 <quote>(?-i)</quote> switch:
2593 <literal>www.example.com/(?-i)PaTtErN.*</literal> will match only
2594 documents whose path starts with <literal>PaTtErN</literal> in
2595 <emphasis>exactly</emphasis> this capitalization.
2601 <!-- ~ End section ~ -->
2605 <!-- ~~~~~ New section ~~~~~ -->
2608 <title>Actions</title>
2610 Actions are enabled if preceded with a <quote>+</quote>, and disabled if
2611 preceded with a <quote>-</quote>. Actions are invoked by enclosing the
2612 action name in curly braces (e.g. {+some_action}), followed by a list of
2613 URLs to which the action applies. There are three classes of actions:
2621 Boolean (e.g. <quote>+/-block</quote>):
2627 <emphasis>{+name}</emphasis> # enable this action
2628 <emphasis>{-name}</emphasis> # disable this action
2638 parameterized (e.g. <quote>+/-hide-user-agent</quote>):
2644 <emphasis>{+name{param}}</emphasis> # enable action and set parameter to <quote>param</quote>
2645 <emphasis>{-name}</emphasis> # disable action
2654 Multi-value (e.g. <quote>{+/-add-header{Name: value}}</quote>, <quote>{+/-wafer{name=value}}</quote>):
2660 <emphasis>{+name{param}}</emphasis> # enable action and add parameter <quote>param</quote>
2661 <emphasis>{-name{param}}</emphasis> # remove the parameter <quote>param</quote>
2662 <emphasis>{-name}</emphasis> # disable this action totally
2673 If nothing is specified in this file, no <quote>actions</quote> are taken.
2674 So in this case <application>Privoxy</application> would just be a
2675 normal, non-blocking, non-anonymizing proxy. You must specifically
2676 enable the privacy and blocking features you need (although the
2677 provided default <filename>default.action</filename> file will
2678 give a good starting point).
2682 Later defined actions always over-ride earlier ones. So exceptions
2683 to any rules you make, should come in the latter part of the file. For
2684 multi-valued actions, the actions are applied in the order they are
2689 The list of valid <application>Privoxy</application> <quote>actions</quote> are:
2697 Add the specified HTTP header, which is not checked for validity.
2698 You may specify this many times to specify many different headers:
2704 <emphasis>+add-header{Name: value}</emphasis>
2714 Block this URL totally. In a default installation, a <quote>blocked</quote>
2715 URL will result in bright red banner that says <quote>BLOCKED</quote>,
2716 with a reason why it is being blocked, and an option to see it anyway.
2717 The page displayed for this is the <quote>blocked</quote> template
2724 <emphasis>+block</emphasis>
2734 De-animate all animated GIF images, i.e. reduce them to their last frame.
2735 This will also shrink the images considerably (in bytes, not pixels!). If
2736 the option <quote>first</quote> is given, the first frame of the animation
2737 is used as the replacement. If <quote>last</quote> is given, the last frame
2738 of the animation is used instead, which probably makes more sense for most
2739 banner animations, but also has the risk of not showing the entire last
2740 frame (if it is only a delta to an earlier frame).
2746 <emphasis>+deanimate-gifs{last}</emphasis>
2747 <emphasis>+deanimate-gifs{first}</emphasis>
2756 <quote>+downgrade</quote> will downgrade HTTP/1.1 client requests to
2757 HTTP/1.0 and downgrade the responses as well. Use this action for servers
2758 that use HTTP/1.1 protocol features that
2759 <application>Privoxy</application> doesn't handle well yet. HTTP/1.1
2760 is only partially implemented. Default is not to downgrade requests.
2766 <emphasis>+downgrade</emphasis>
2775 Many sites, like yahoo.com, don't just link to other sites. Instead, they
2776 will link to some script on their own server, giving the destination as a
2777 parameter, which will then redirect you to the final target. URLs resulting
2778 from this scheme typically look like:
2779 <emphasis>http://some.place/some_script?http://some.where-else</emphasis>.
2782 Sometimes, there are even multiple consecutive redirects encoded in the
2783 URL. These redirections via scripts make your web browsing more traceable,
2784 since the server from which you follow such a link can see where you go to.
2785 Apart from that, valuable bandwidth and time is wasted, while your browser
2786 ask the server for one redirect after the other. Plus, it feeds the
2790 The <quote>+fast-redirects</quote> option enables interception of these
2791 types of requests by <application>Privoxy</application>, who will cut off
2792 all but the last valid URL in the request and send a local redirect back to
2793 your browser without contacting the intermediate site(s).
2799 <emphasis>+fast-redirects</emphasis>
2808 Apply the filters in the <literal>section_header</literal>
2809 section of the <filename>default.filter</filename> file to the site(s).
2810 <filename>default.filter</filename> sections are grouped according to like
2811 functionality. <application>Filters</application> can be used to
2812 re-write any of the raw page content. This is a potentially a
2813 very powerful feature!
2820 <emphasis>+filter{section_header}</emphasis>
2827 Filter sections that are pre-defined in the supplied
2828 <filename>default.filter</filename> include:
2834 <emphasis>html-annoyances</emphasis>: Get rid of particularly annoying HTML abuse.
2839 <emphasis>js-annoyances</emphasis>: Get rid of particularly annoying JavaScript abuse
2844 <emphasis>content-cookies</emphasis>: Kill cookies that come in the HTML or JS content
2849 <emphasis>popups</emphasis>: Kill all popups in JS and HTML
2854 <emphasis>frameset-borders</emphasis>: Give frames a border and make them resizable
2859 <emphasis>webbugs</emphasis>: Squish WebBugs (1x1 invisible GIFs used for user tracking)
2864 <emphasis>refresh-tags</emphasis>: Kill automatic refresh tags (for dial-on-demand setups)
2869 <emphasis>fun</emphasis>: Text replacements for subversive browsing fun!
2874 <emphasis>nimda</emphasis>: Remove Nimda (virus) code.
2879 <emphasis>banners-by-size</emphasis>: Kill banners by size (<emphasis>very</emphasis> efficient!)
2884 <emphasis>shockwave-flash</emphasis>: Kill embedded Shockwave Flash objects
2889 <emphasis>crude-parental</emphasis>: Kill all web pages that contain the words "sex" or "warez"
2896 Note: Filtering requires buffering the page content, which may appear to slow down
2897 page rendering since nothing is displayed until all content has passed
2898 the filters. (It does not really take longer, but seems that way since
2899 the page is not incrementally displayed.) This effect will be more noticeable
2900 on slower connections.
2907 Block any existing X-Forwarded-for header, and do not add a new one:
2913 <emphasis>+hide-forwarded</emphasis>
2922 If the browser sends a <quote>From:</quote> header containing your e-mail
2923 address, this either completely removes the header (<quote>block</quote>), or
2924 changes it to the specified e-mail address.
2930 <emphasis>+hide-from{block}</emphasis>
2931 <emphasis>+hide-from{spam@sittingduck.xqq}</emphasis>
2940 Don't send the <quote>Referer:</quote> (sic) header to the web site. You
2941 can block it, forge a URL to the same server as the request (which is
2942 preferred because some sites will not send images otherwise) or set it to a
2943 constant, user defined string of your choice.
2949 <emphasis>+hide-referer{block}</emphasis>
2950 <emphasis>+hide-referer{forge}</emphasis>
2951 <emphasis>+hide-referer{http://nowhere.com}</emphasis>
2960 Alternative spelling of <quote>+hide-referer</quote>. It has the same
2961 parameters, and can be freely mixed with, <quote>+hide-referer</quote>.
2962 (<quote>referrer</quote> is the correct English spelling, however the HTTP
2963 specification has a bug - it requires it to be spelled <quote>referer</quote>.)
2969 <emphasis>+hide-referrer{...}</emphasis>
2978 Change the <quote>User-Agent:</quote> header so web servers can't tell your
2979 browser type. Warning! This breaks many web sites. Specify the
2980 user-agent value you want. Example, pretend to be using Netscape on
2987 <emphasis>+hide-user-agent{Mozilla (X11; I; Linux 2.0.32 i586)}</emphasis>
2994 Or to identify yourself explicitly as a <application>Privoxy</application> user:
3000 <emphasis>+hide-user-agent{Privoxy/1.0}</emphasis>
3005 (Don't change the version number from 1.0 - after all, why tell them?)
3012 <emphasis>+hide-user-agent{browser-type}</emphasis>
3022 Treat this URL as an image. This only matters if it's also <quote>+block</quote>ed,
3023 in which case a <quote>blocked</quote> image can be sent rather than a HTML page.
3024 See <quote>+image-blocker{}</quote> below for the control over what is actually sent.
3025 If you want <emphasis>invisible</emphasis> ads, they should be defined as
3026 <emphasis>images</emphasis> and <emphasis>blocked</emphasis>. And also,
3027 <quote>image-blocker</quote> should be set to <quote>blank</quote>. Note you
3028 cannot treat HTML pages as images in most cases. For instance, frames
3029 require an HTML page to display. So a frame that is an ad, cannot be
3030 treated as an image. Forcing an <quote>image</quote> in this
3031 situation just will not work.
3037 <emphasis>+image</emphasis>
3045 <para> Decides what to do with URLs that end up tagged with <quote>{+block
3046 +image}</quote>, e.g an advertisement. There are four options.
3047 <quote>-image-blocker</quote> will send a HTML <quote>blocked</quote> page,
3048 usually resulting in a <quote>broken image</quote> icon.
3049 <!-- <quote>+image-blocker{logo}</quote> will send a -->
3050 <!-- <application>Privoxy</application> logo -->
3052 <quote>+image-blocker{blank}</quote> will send a 1x1 transparent GIF
3053 image. And finally, <quote>+image-blocker{http://xyz.com}</quote> will send a
3054 HTTP temporary redirect to the specified image. This has the advantage of the
3055 icon being being cached by the browser, which will speed up the display.
3056 <quote>+image-blocker{pattern}</quote> will send a checkerboard type pattern:
3058 <!-- which scales better than the logo (which can get blocky if the browser -->
3059 <!-- enlarges it too much). -->
3065 <!-- <emphasis>+image-blocker{logo}</emphasis> -->
3066 <emphasis>+image-blocker{blank}</emphasis>
3067 <emphasis>+image-blocker{pattern}</emphasis>
3068 <emphasis>+image-blocker{http://p.p/send-banner}</emphasis>
3077 By default (i.e. in the absence of a <quote>+limit-connect</quote>
3078 action), <application>Privoxy</application> will only allow CONNECT
3079 requests to port 443, which is the standard port for https as a
3084 The CONNECT methods exists in HTTP to allow access to secure websites
3085 (https:// URLs) through proxies. It works very simply: the proxy
3086 connects to the server on the specified port, and then short-circuits
3087 its connections to the client <emphasis>and</emphasis> to the remote proxy.
3088 This can be a big security hole, since CONNECT-enabled proxies can
3089 be abused as TCP relays very easily.
3093 If you want to allow CONNECT for more ports than this, or want to forbid
3094 CONNECT altogether, you can specify a comma separated list of ports and
3095 port ranges (the latter using dashes, with the minimum defaulting to 0 and
3103 <emphasis>+limit-connect{443} # This is the default and need no be specified.</emphasis>
3104 <emphasis>+limit-connect{80,443} # Ports 80 and 443 are OK.</emphasis>
3105 <emphasis>+limit-connect{-3, 7, 20-100, 500-} # Port less than 3, 7, 20 to 100</emphasis>
3106 <emphasis> #and above 500 are OK.</emphasis>
3116 <quote>+no-compression</quote> prevents the website from compressing the
3117 data. Some websites do this, which can be a problem for
3118 <application>Privoxy</application>, since <quote>+filter</quote>,
3119 <quote>+no-popup</quote> and <quote>+gif-deanimate</quote> will not work on
3120 compressed data. This will slow down connections to those websites,
3121 though. Default is <quote>no-compression</quote> is turned on.
3128 <emphasis>+nocompression</emphasis>
3137 If the website sets cookies, <quote>no-cookies-keep</quote> will make sure
3138 they are erased when you exit and restart your web browser. This makes
3139 profiling cookies useless, but won't break sites which require cookies so
3140 that you can log in for transactions. Default: on.
3146 <emphasis>+no-cookies-keep</emphasis>
3155 Prevent the website from reading cookies:
3161 <emphasis>+no-cookies-read</emphasis>
3170 Prevent the website from setting cookies:
3176 <emphasis>+no-cookies-set</emphasis>
3185 Filter the website through a built-in filter to disable those obnoxious
3186 JavaScript pop-up windows via window.open(), etc. The two alternative
3187 spellings are equivalent.
3193 <emphasis>+no-popup</emphasis>
3194 <emphasis>+no-popups</emphasis>
3203 This action only applies if you are using a <filename>jarfile</filename>
3204 for saving cookies. It sends a cookie to every site stating that you do not
3205 accept any copyright on cookies sent to you, and asking them not to track
3206 you. Of course, this is a (relatively) unique header they could use to
3213 <emphasis>+vanilla-wafer</emphasis>
3222 This allows you to add an arbitrary cookie. It can be specified multiple
3223 times in order to add as many cookies as you like.
3229 <emphasis>+wafer{name=value}</emphasis>
3240 The meaning of any of the above is reversed by preceding the action with a
3241 <quote>-</quote>, in place of the <quote>+</quote>.
3249 Turn off cookies by default, then allow a few through for specified sites:
3256 # Turn off all persistent cookies
3257 { +no-cookies-read }
3259 # Allow cookies for this browser session ONLY
3260 { +no-cookies-keep }
3262 # Exceptions to the above, sites that benefit from persistent cookies
3263 { -no-cookies-read }
3265 { -no-cookies-keep }
3272 # Alternative way of saying the same thing
3273 {-no-cookies-set -no-cookies-read -no-cookies-keep}
3282 Now turn off <quote>fast redirects</quote>, and then we allow two exceptions:
3292 # Reverse it for these two sites, which don't work right without it.
3294 www.ukc.ac.uk/cgi-bin/wac\.cgi\?
3302 Turn on page filtering according to rules in the defined sections
3303 of <filename>default.filter</filename>, and make one exception for
3311 # Run everything through the filter file, using only the
3312 # specified sections:
3313 +filter{html-annoyances} +filter{js-annoyances} +filter{no-popups}\
3314 +filter{webbugs} +filter{nimda} +filter{banners-by-size}
3316 # Then disable filtering of code from sourceforge!
3318 .cvs.sourceforge.net
3325 Now some URLs that we want <quote>blocked</quote> (normally generates
3326 the <quote>blocked</quote> banner). Many of these use regular expressions
3327 that will expand to match multiple URLs:
3336 /.*/(.*[-_.])?ads?[0-9]?(/|[-_.].*|\.(gif|jpe?g))
3337 /.*/(.*[-_.])?count(er)?(\.cgi|\.dll|\.exe|[?/])
3338 /.*/(ng)?adclient\.cgi
3339 /.*/(plain|live|rotate)[-_.]?ads?/
3340 /.*/(sponsor)s?[0-9]?/
3341 /.*/_?(plain|live)?ads?(-banners)?/
3343 /.*/ad(sdna_image|gifs?)/
3344 /.*/ad(server|stream|juggler)\.(cgi|pl|dll|exe)
3348 /.*/adv((er)?ts?|ertis(ing|ements?))?/
3352 /.*/cgi-bin/centralad/getimage
3353 /.*/images/addver\.gif
3354 /.*/images/marketing/.*\.(gif|jpe?g)
3358 /.*/sponsors?[0-9]?/
3359 /.*/advert[0-9]+\.jpg
3366 /graphics/defaultAd/
3368 /image\.ng/transactionID
3369 /images/.*/.*_anim\.gif # alvin brattli
3370 /ip_img/.*\.(gif|jpe?g)
3374 /cgi-bin/nph-adclick.exe/
3375 /.*/Image/BannerAdvertising/
3377 /.*/adlib/server\.cgi
3385 Note that many of these actions have the potential to cause a page to
3386 misbehave, possibly even not to display at all. There are many ways
3387 a site designer may choose to design his site, and what HTTP header
3388 content he may depend on. There is no way to have hard and fast rules
3389 for all sites. See the <link linkend="ACTIONSANAT">Appendix</link>
3390 for a brief example on troubleshooting actions.
3395 <!-- ~ End section ~ -->
3398 <!-- ~~~~~ New section ~~~~~ -->
3400 <title>Aliases</title>
3402 Custom <quote>actions</quote>, known to <application>Privoxy</application>
3403 as <quote>aliases</quote>, can be defined by combining other <quote>actions</quote>.
3404 These can in turn be invoked just like the built-in <quote>actions</quote>.
3405 Currently, an alias can contain any character except space, tab, <quote>=</quote>,
3406 <quote>{</quote> or <quote>}</quote>. But please use only <quote>a</quote>-
3407 <quote>z</quote>, <quote>0</quote>-<quote>9</quote>, <quote>+</quote>, and
3408 <quote>-</quote>. Alias names are not case sensitive, and
3409 <emphasis>must be defined before anything</emphasis> else in the
3410 <filename>default.action</filename>file! And there can only be one set of
3411 <quote>aliases</quote> defined.
3415 Now let's define a few aliases:
3422 # Useful custom aliases we can use later. These must come first!
3424 +no-cookies = +no-cookies-set +no-cookies-read
3425 -no-cookies = -no-cookies-set -no-cookies-read
3426 fragile = -block -no-cookies -filter -fast-redirects -hide-referer -no-popups
3427 shop = -no-cookies -filter -fast-redirects
3428 +imageblock = +block +image
3430 #For people who don't like to type too much: ;-)
3433 c2 = -no-cookies-set +no-cookies-read
3434 c3 = +no-cookies-set -no-cookies-read
3435 #... etc. Customize to your heart's content.
3442 Some examples using our <quote>shop</quote> and <quote>fragile</quote>
3450 # These sites are very complex and require
3451 # minimal interference.
3453 .office.microsoft.com
3454 .windowsupdate.microsoft.com
3457 # Shopping sites - still want to block ads.
3460 .worldpay.com # for quietpc.com
3464 # These shops require pop-ups
3474 The <quote>shop</quote> and <quote>fragile</quote> aliases are often used for
3475 <quote>problem</quote> sites that require most actions to be disabled
3476 in order to function properly.
3483 <!-- ~ End section ~ -->
3486 <!-- ~~~~~ New section ~~~~~ -->
3487 <sect2 id="filterfile">
3488 <title>The Filter File</title>
3490 Any web page can be dynamically modified with the filter file. This
3491 modification can be removal, or re-writing, of any web page content,
3492 including tags and non-visible content. The default filter file is
3493 <filename>default.filter</filename>, located in the config directory.
3497 This is potentially a very powerful feature, and requires knowledge of both
3498 <quote>regular expression</quote> and HTML in order create custom
3499 filters. But, there are a number of useful filters included with
3500 <application>Privoxy</application> for many common situations.
3504 The included example file is divided into sections. Each section begins
3505 with the <literal>FILTER</literal> keyword, followed by the identifier
3506 for that section, e.g. <quote>FILTER: webbugs</quote>. Each section performs
3507 a similar type of filtering, such as <quote>html-annoyances</quote>.
3511 This file uses regular expressions to alter or remove any string in the
3512 target page. The expressions can only operate on one line at a time. Some
3513 examples from the included default <filename>default.filter</filename>:
3517 Stop web pages from displaying annoying messages in the status bar by
3518 deleting such references:
3525 FILTER: html-annoyances
3527 # New browser windows should be resizeable and have a location and status
3530 s/resizable="?(no|0)"?/resizable=1/ig s/noresize/yesresize/ig
3531 s/location="?(no|0)"?/location=1/ig s/status="?(no|0)"?/status=1/ig
3532 s/scrolling="?(no|0|Auto)"?/scrolling=1/ig
3533 s/menubar="?(no|0)"?/menubar=1/ig
3535 # The <BLINK> tag was a crime!
3537 s*<blink>|</blink>**ig
3541 #s/framespacing="?(no|0)"?//ig
3542 #s/margin(height|width)=[0-9]*//gi
3549 Just for kicks, replace any occurrence of <quote>Microsoft</quote> with
3550 <quote>MicroSuck</quote>, and have a little fun with topical buzzwords:
3559 s/microsoft(?!.com)/MicroSuck/ig
3563 s/industry-leading|cutting-edge|award-winning/<font color=red><b>BINGO!</b></font>/ig
3570 Kill those pesky little web-bugs:
3577 # webbugs: Squish WebBugs (1x1 invisible GIFs used for user tracking)
3580 s/<img\s+[^>]*?(width|height)\s*=\s*['"]?1\D[^>]*?(width|height)\s*=\s*['"]?1(\D[^>]*?)?>/<!-- Squished WebBug -->/sig
3588 <!-- ~ End section ~ -->
3592 <!-- ~~~~~ New section ~~~~~ -->
3595 <title>Templates</title>
3597 When <application>Privoxy</application> displays one of its internal
3598 pages, such as a 404 Not Found error page, it uses the appropriate template.
3599 On Linux, BSD, and Unix, these are located in
3600 <filename>/etc/privoxy/templates</filename> by default. These may be
3601 customized, if desired. <filename>cgi-style.css</filename> is
3602 used to control the HTML attributes (fonts, etc).
3605 The default <quote>Blocked</quote> banner page with the bright red top
3606 banner, is called just <quote><filename>blocked</filename></quote>. This
3607 may be customized or replaced with something else if desired.
3614 <!-- ~ End section ~ -->
3618 <!-- ~~~~~ New section ~~~~~ -->
3620 <sect1 id="contact"><title>Contacting the Developers, Bug Reporting and Feature
3623 <!-- Include contacting.sgml boilerplate: -->
3625 <!-- end boilerplate -->
3628 <!-- ~~~~~ New section ~~~~~ -->
3629 <sect2 id="submitactions">
3630 <title>Submitting Ads and <quote>Action</quote> Problems</title>
3632 Ads and banners that are not stopped by <application>Privoxy</application>
3633 can be submitted to the developers by accessing a special page and filling
3634 out the brief, required form. Conversely, you can also report pages, images,
3635 etc. that <application>Privoxy</application> is blocking, but should not.
3636 The form itself does require Internet access.
3639 To do this, point your browser to <application>Privoxy</application>
3640 at <ulink url="http://config.privoxy.org/">http://config.privoxy.org/</ulink>
3641 (shortcut: <ulink url="http://p.p/">http://p.p/</ulink>), and then select
3642 <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>,
3643 near the bottom of the page. Paste in the URL that is the cause of the
3644 unwanted behavior, and follow the prompts. The developers will
3645 try to incorporate a fix for the problem you reported into future versions.
3649 New <filename>default.actions</filename> files will occasionally be made
3650 available based on your feedback. These
3651 will be announced on the
3653 url="http://lists.sourceforge.net/lists/listinfo/ijbswa-announce">ijbswa-announce</ulink>
3661 <!-- ~~~~~ New section ~~~~~ -->
3662 <sect1 id="copyright"><title>Copyright and History</title>
3664 <sect2><title>Copyright</title>
3665 <!-- Include copyright.sgml: -->
3667 <!-- end copyright -->
3670 <!-- ~ End section ~ -->
3673 <!-- ~~~~~ New section ~~~~~ -->
3675 <sect2 id="history"><title>History</title>
3676 <!-- Include history.sgml: -->
3678 <!-- end history -->
3682 <!-- ~~~~~ New section ~~~~~ -->
3683 <sect1 id="seealso"><title>See Also</title>
3684 <!-- Include seealso.sgml: -->
3686 <!-- end seealso -->
3691 <!-- ~~~~~ New section ~~~~~ -->
3692 <sect1 id="appendix"><title>Appendix</title>
3695 <!-- ~~~~~ New section ~~~~~ -->
3697 <title>Regular Expressions</title>
3699 <application>Privoxy</application> can use <quote>regular expressions</quote>
3700 in various config files. Assuming support for <quote>pcre</quote> (Perl
3701 Compatible Regular Expressions) is compiled in, which is the default. Such
3702 configuration directives do not require regular expressions, but they can be
3703 used to increase flexibility by matching a pattern with wild-cards against
3708 If you are reading this, you probably don't understand what <quote>regular
3709 expressions</quote> are, or what they can do. So this will be a very brief
3710 introduction only. A full explanation would require a book ;-)
3714 <quote>Regular expressions</quote> is a way of matching one character
3715 expression against another to see if it matches or not. One of the
3716 <quote>expressions</quote> is a literal string of readable characters
3717 (letter, numbers, etc), and the other is a complex string of literal
3718 characters combined with wild-cards, and other special characters, called
3719 meta-characters. The <quote>meta-characters</quote> have special meanings and
3720 are used to build the complex pattern to be matched against. Perl Compatible
3721 Regular Expressions is an enhanced form of the regular expression language
3722 with backward compatibility.
3726 To make a simple analogy, we do something similar when we use wild-card
3727 characters when listing files with the <command>dir</command> command in DOS.
3728 <literal>*.*</literal> matches all filenames. The <quote>special</quote>
3729 character here is the asterisk which matches any and all characters. We can be
3730 more specific and use <literal>?</literal> to match just individual
3731 characters. So <quote>dir file?.text</quote> would match
3732 <quote>file1.txt</quote>, <quote>file2.txt</quote>, etc. We are pattern
3733 matching, using a similar technique to <quote>regular expressions</quote>!
3737 Regular expressions do essentially the same thing, but are much, much more
3738 powerful. There are many more <quote>special characters</quote> and ways of
3739 building complex patterns however. Let's look at a few of the common ones,
3740 and then some examples:
3745 <emphasis>.</emphasis> - Matches any single character, e.g. <quote>a</quote>,
3746 <quote>A</quote>, <quote>4</quote>, <quote>:</quote>, or <quote>@</quote>.
3748 </simplelist></para>
3752 <emphasis>?</emphasis> - The preceding character or expression is matched ZERO or ONE
3755 </simplelist></para>
3759 <emphasis>+</emphasis> - The preceding character or expression is matched ONE or MORE
3762 </simplelist></para>
3766 <emphasis>*</emphasis> - The preceding character or expression is matched ZERO or MORE
3769 </simplelist></para>
3773 <emphasis>\</emphasis> - The <quote>escape</quote> character denotes that
3774 the following character should be taken literally. This is used where one of the
3775 special characters (e.g. <quote>.</quote>) needs to be taken literally and
3776 not as a special meta-character.
3778 </simplelist></para>
3782 <emphasis>[]</emphasis> - Characters enclosed in brackets will be matched if
3783 any of the enclosed characters are encountered.
3785 </simplelist></para>
3789 <emphasis>()</emphasis> - parentheses are used to group a sub-expression,
3790 or multiple sub-expressions.
3792 </simplelist></para>
3796 <emphasis>|</emphasis> - The <quote>bar</quote> character works like an
3797 <quote>or</quote> conditional statement. A match is successful if the
3798 sub-expression on either side of <quote>|</quote> matches.
3800 </simplelist></para>
3804 <emphasis>s/string1/string2/g</emphasis> - This is used to rewrite strings of text.
3805 <quote>string1</quote> is replaced by <quote>string2</quote> in this
3808 </simplelist></para>
3811 These are just some of the ones you are likely to use when matching URLs with
3812 <application>Privoxy</application>, and is a long way from a definitive
3813 list. This is enough to get us started with a few simple examples which may
3814 be more illuminating:
3818 <emphasis><literal>/.*/banners/.*</literal></emphasis> - A simple example
3819 that uses the common combination of <quote>.</quote> and <quote>*</quote> to
3820 denote any character, zero or more times. In other words, any string at all.
3821 So we start with a literal forward slash, then our regular expression pattern
3822 (<quote>.*</quote>) another literal forward slash, the string
3823 <quote>banners</quote>, another forward slash, and lastly another
3824 <quote>.*</quote>. We are building
3825 a directory path here. This will match any file with the path that has a
3826 directory named <quote>banners</quote> in it. The <quote>.*</quote> matches
3827 any characters, and this could conceivably be more forward slashes, so it
3828 might expand into a much longer looking path. For example, this could match:
3829 <quote>/eye/hate/spammers/banners/annoy_me_please.gif</quote>, or just
3830 <quote>/banners/annoying.html</quote>, or almost an infinite number of other
3831 possible combinations, just so it has <quote>banners</quote> in the path
3836 A now something a little more complex:
3840 <emphasis><literal>/.*/adv((er)?ts?|ertis(ing|ements?))?/</literal></emphasis> -
3841 We have several literal forward slashes again (<quote>/</quote>), so we are
3842 building another expression that is a file path statement. We have another
3843 <quote>.*</quote>, so we are matching against any conceivable sub-path, just so
3844 it matches our expression. The only true literal that <emphasis>must
3845 match</emphasis> our pattern is <application>adv</application>, together with
3846 the forward slashes. What comes after the <quote>adv</quote> string is the
3851 Remember the <quote>?</quote> means the preceding expression (either a
3852 literal character or anything grouped with <quote>(...)</quote> in this case)
3853 can exist or not, since this means either zero or one match. So
3854 <quote>((er)?ts?|ertis(ing|ements?))</quote> is optional, as are the
3855 individual sub-expressions: <quote>(er)</quote>,
3856 <quote>(ing|ements?)</quote>, and the <quote>s</quote>. The <quote>|</quote>
3857 means <quote>or</quote>. We have two of those. For instance,
3858 <quote>(ing|ements?)</quote>, can expand to match either <quote>ing</quote>
3859 <emphasis>OR</emphasis> <quote>ements?</quote>. What is being done here, is an
3860 attempt at matching as many variations of <quote>advertisement</quote>, and
3861 similar, as possible. So this would expand to match just <quote>adv</quote>,
3862 or <quote>advert</quote>, or <quote>adverts</quote>, or
3863 <quote>advertising</quote>, or <quote>advertisement</quote>, or
3864 <quote>advertisements</quote>. You get the idea. But it would not match
3865 <quote>advertizements</quote> (with a <quote>z</quote>). We could fix that by
3866 changing our regular expression to:
3867 <quote>/.*/adv((er)?ts?|erti(s|z)(ing|ements?))?/</quote>, which would then match
3872 <emphasis><literal>/.*/advert[0-9]+\.(gif|jpe?g)</literal></emphasis> - Again
3873 another path statement with forward slashes. Anything in the square brackets
3874 <quote>[]</quote> can be matched. This is using <quote>0-9</quote> as a
3875 shorthand expression to mean any digit one through nine. It is the same as
3876 saying <quote>0123456789</quote>. So any digit matches. The <quote>+</quote>
3877 means one or more of the preceding expression must be included. The preceding
3878 expression here is what is in the square brackets -- in this case, any digit
3879 one through nine. Then, at the end, we have a grouping: <quote>(gif|jpe?g)</quote>.
3880 This includes a <quote>|</quote>, so this needs to match the expression on
3881 either side of that bar character also. A simple <quote>gif</quote> on one side, and the other
3882 side will in turn match either <quote>jpeg</quote> or <quote>jpg</quote>,
3883 since the <quote>?</quote> means the letter <quote>e</quote> is optional and
3884 can be matched once or not at all. So we are building an expression here to
3885 match image GIF or JPEG type image file. It must include the literal
3886 string <quote>advert</quote>, then one or more digits, and a <quote>.</quote>
3887 (which is now a literal, and not a special character, since it is escaped
3888 with <quote>\</quote>), and lastly either <quote>gif</quote>, or
3889 <quote>jpeg</quote>, or <quote>jpg</quote>. Some possible matches would
3890 include: <quote>//advert1.jpg</quote>,
3891 <quote>/nasty/ads/advert1234.gif</quote>,
3892 <quote>/banners/from/hell/advert99.jpg</quote>. It would not match
3893 <quote>advert1.gif</quote> (no leading slash), or
3894 <quote>/adverts232.jpg</quote> (the expression does not include an
3895 <quote>s</quote>), or <quote>/advert1.jsp</quote> (<quote>jsp</quote> is not
3896 in the expression anywhere).
3900 <emphasis><literal>s/microsoft(?!.com)/MicroSuck/i</literal></emphasis> - This is
3901 a substitution. <quote>MicroSuck</quote> will replace any occurrence of
3902 <quote>microsoft</quote>. The <quote>i</quote> at the end of the expression
3903 means ignore case. The <quote>(?!.com)</quote> means
3904 the match should fail if <quote>microsoft</quote> is followed by
3905 <quote>.com</quote>. In other words, this acts like a <quote>NOT</quote>
3906 modifier. In case this is a hyperlink, we don't want to break it ;-).
3910 We are barely scratching the surface of regular expressions here so that you
3911 can understand the default <application>Privoxy</application>
3912 configuration files, and maybe use this knowledge to customize your own
3913 installation. There is much, much more that can be done with regular
3914 expressions. Now that you know enough to get started, you can learn more on
3919 More reading on Perl Compatible Regular expressions:
3920 <ulink url="http://www.perldoc.com/perl5.6/pod/perlre.html">http://www.perldoc.com/perl5.6/pod/perlre.html</ulink>
3925 <!-- ~ End section ~ -->
3928 <!-- ~~~~~ New section ~~~~~ -->
3930 <title><application>Privoxy</application>'s Internal Pages</title>
3933 Since <application>Privoxy</application> proxies each requested
3934 web page, it is easy for <application>Privoxy</application> to
3935 trap certain special URLs. In this way, we can talk directly to
3936 <application>Privoxy</application>, and see how it is
3937 configured, see how our rules are being applied, change these
3938 rules and other configuration options, and even turn
3939 <application>Privoxy's</application> filtering off, all with
3945 The URLs listed below are the special ones that allow direct access
3946 to <application>Privoxy</application>. Of course,
3947 <application>Privoxy</application> must be running to access these. If
3948 not, you will get a friendly error message. Internet access is not
3961 <ulink url="http://config.privoxy.org/">http://config.privoxy.org/</ulink>
3965 Alternately, this may be reached at <ulink
3966 url="http://p.p/">http://p.p/</ulink>, but this
3967 variation may not work as reliably as the above in some configurations.
3973 Show information about the current configuration:
3977 <ulink url="http://config.privoxy.org/show-status">http://config.privoxy.org/show-status</ulink>
3984 Show the source code version numbers:
3988 <ulink url="http://config.privoxy.org/show-version">http://config.privoxy.org/show-version</ulink>
3995 Show the client's request headers:
3999 <ulink url="http://config.privoxy.org/show-request">http://config.privoxy.org/show-request</ulink>
4006 Show which actions apply to a URL and why:
4010 <ulink url="http://config.privoxy.org/show-url-info">http://config.privoxy.org/show-url-info</ulink>
4017 Toggle Privoxy on or off. In this case, <quote>Privoxy</quote> continues
4018 to run, but only as a pass-through proxy, with no actions taking place:
4022 <ulink url="http://config.privoxy.org/toggle">http://config.privoxy.org/toggle</ulink>
4026 Short cuts. Turn off, then on:
4030 <ulink url="http://config.privoxy.org/toggle?set=disable">http://config.privoxy.org/toggle?set=disable</ulink>
4035 <ulink url="http://config.privoxy.org/toggle?set=enable">http://config.privoxy.org/toggle?set=enable</ulink>
4042 Edit the actions list file:
4046 <ulink url="http://config.privoxy.org/edit-actions">http://config.privoxy.org/edit-actions</ulink>
4055 These may be bookmarked for quick reference.
4059 <sect3 id="bookmarklets">
4060 <title>Bookmarklets</title>
4062 Below are some <quote>bookmarklets</quote> to allow you to easily access a
4063 <quote>mini</quote> version of some of <application>Privoxy's</application>
4064 special pages. They are designed for MS Internet Explorer, but should work
4065 equally well in Netscape, Mozilla, and other browsers which support
4066 JavaScript. They are designed to run directly from your bookmarks - not by
4067 clicking the links below (although that should work for testing).
4070 To save them, right-click the link and choose <quote>Add to Favorites</quote>
4071 (IE) or <quote>Add Bookmark</quote> (Netscape). You will get a warning that
4072 the bookmark <quote>may not be safe</quote> - just click OK. Then you can run the
4073 Bookmarklet directly from your favorites/bookmarks. For even faster access,
4074 you can put them on the <quote>Links</quote> bar (IE) or the <quote>Personal
4075 Toolbar</quote> (Netscape), and run them with a single click.
4083 <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>
4089 <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>
4095 <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)
4101 <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>
4107 <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>
4117 Credit: The site which gave me the general idea for these bookmarklets is
4118 <ulink url="http://www.bookmarklets.com">www.bookmarklets.com</ulink>. They
4119 have more information about bookmarklets.
4128 <!-- ~~~~~ New section ~~~~~ -->
4129 <sect2 id="actionsanat">
4130 <title>Anatomy of an Action</title>
4133 The way <application>Privoxy</application> applies <quote>actions</quote>
4134 and <quote>filters</quote> to any given URL can be complex, and not always so
4135 easy to understand what is happening. And sometimes we need to be able to
4136 <emphasis>see</emphasis> just what <application>Privoxy</application> is
4137 doing. Especially, if something <application>Privoxy</application> is doing
4138 is causing us a problem inadvertently. It can be a little daunting to look at
4139 the actions and filters files themselves, since they tend to be filled with
4140 <quote>regular expressions</quote> whose consequences are not always
4141 so obvious. <application>Privoxy</application> provides the
4142 <ulink url="http://config.privoxy.org/show-url-info">http://config.privoxy.org/show-url-info</ulink>
4143 page that can show us very specifically how <application>actions</application>
4144 are being applied to any given URL. This is a big help for troubleshooting.
4148 First, enter one URL (or partial URL) at the prompt, and then
4149 <application>Privoxy</application> will tell us
4150 how the current configuration will handle it. This will not
4151 help with filtering effects from the <filename>default.filter</filename> file! It
4152 also will not tell you about any other URLs that may be embedded within the
4153 URL you are testing (i.e. a web page). For instance, images such as ads are expressed as URLs
4154 within the raw page source of HTML pages. So you will only get info for the
4155 actual URL that is pasted into the prompt area -- not any sub-URLs. If you
4156 want to know about embedded URLs like ads, you will have to dig those out of
4157 the HTML source. Use your browser's <quote>View Page Source</quote> option
4158 for this. Or right click on the ad, and grab the URL.
4162 Let's look at an example, <ulink url="http://google.com">google.com</ulink>,
4163 one section at a time:
4168 System default actions:
4170 { -add-header -block -deanimate-gifs -downgrade -fast-redirects -filter
4171 -hide-forwarded -hide-from -hide-referer -hide-user-agent -image
4172 -image-blocker -limit-connect -no-compression -no-cookies-keep
4173 -no-cookies-read -no-cookies-set -no-popups -vanilla-wafer -wafer }
4179 This is the top section, and only tells us of the compiled in defaults. This
4180 is basically what <application>Privoxy</application> would do if there
4181 were not any <quote>actions</quote> defined, i.e. it does nothing. Every action
4182 is disabled. This is not particularly informative for our purposes here. OK,
4189 Matches for http://google.com:
4191 { -add-header -block +deanimate-gifs -downgrade +fast-redirects
4192 +filter{html-annoyances} +filter{js-annoyances} +filter{no-popups}
4193 +filter{webbugs} +filter{nimda} +filter{banners-by-size} +filter{hal}
4194 +filter{fun} +hide-forwarded +hide-from{block} +hide-referer{forge}
4195 -hide-user-agent -image +image-blocker{blank} +no-compression
4196 +no-cookies-keep -no-cookies-read -no-cookies-set +no-popups
4197 -vanilla-wafer -wafer }
4200 { -no-cookies-keep -no-cookies-read -no-cookies-set }
4210 This is much more informative, and tells us how we have defined our
4211 <quote>actions</quote>, and which ones match for our example,
4212 <quote>google.com</quote>. The first grouping shows our default
4213 settings, which would apply to all URLs. If you look at your <quote>actions</quote>
4214 file, this would be the section just below the <quote>aliases</quote> section
4215 near the top. This applies to all URLs as signified by the single forward
4216 slash -- <quote>/</quote>.
4221 These are the default actions we have enabled. But we can define additional
4222 actions that would be exceptions to these general rules, and then list
4223 specific URLs that these exceptions would apply to. Last match wins.
4224 Just below this then are two explicit matches for <quote>.google.com</quote>.
4225 The first is negating our various cookie blocking actions (i.e. we will allow
4226 cookies here). The second is allowing <quote>fast-redirects</quote>. Note
4227 that there is a leading dot here -- <quote>.google.com</quote>. This will
4228 match any hosts and sub-domains, in the google.com domain also, such as
4229 <quote>www.google.com</quote>. So, apparently, we have these actions defined
4230 somewhere in the lower part of our actions file, and
4231 <quote>google.com</quote> is referenced in these sections.
4236 And now we pull it altogether in the bottom section and summarize how
4237 <application>Privoxy</application> is applying all its <quote>actions</quote>
4238 to <quote>google.com</quote>:
4247 -add-header -block -deanimate-gifs -downgrade -fast-redirects
4248 +filter{html-annoyances} +filter{js-annoyances} +filter{no-popups}
4249 +filter{webbugs} +filter{nimda} +filter{banners-by-size} +filter{hal}
4250 +filter{fun} +hide-forwarded +hide-from{block} +hide-referer{forge}
4251 -hide-user-agent -image +image-blocker{blank} -limit-connect +no-compression
4252 -no-cookies-keep -no-cookies-read -no-cookies-set +no-popups -vanilla-wafer
4259 Now another example, <quote>ad.doubleclick.net</quote>:
4278 We'll just show the interesting part here, the explicit matches. It is
4279 matched three different times. Each as an <quote>+block +image</quote>,
4280 which is the expanded form of one of our aliases that had been defined as:
4281 <quote>+imageblock</quote>. (<quote>Aliases</quote> are defined in the
4282 first section of the actions file and typically used to combine more
4287 Any one of these would have done the trick and blocked this as an unwanted
4288 image. This is unnecessarily redundant since the last case effectively
4289 would also cover the first. No point in taking chances with these guys
4290 though ;-) Note that if you want an ad or obnoxious
4291 URL to be invisible, it should be defined as <quote>ad.doubleclick.net</quote>
4292 is done here -- as both a <quote>+block</quote> <emphasis>and</emphasis> an
4293 <quote>+image</quote>. The custom alias <quote>+imageblock</quote> does this
4298 One last example. Let's try <quote>http://www.rhapsodyk.net/adsl/HOWTO/</quote>.
4299 This one is giving us problems. We are getting a blank page. Hmmm...
4305 Matches for http://www.rhapsodyk.net/adsl/HOWTO/:
4307 { -add-header -block +deanimate-gifs -downgrade +fast-redirects
4308 +filter{html-annoyances} +filter{js-annoyances} +filter{no-popups}
4309 +filter{webbugs} +filter{nimda} +filter{banners-by-size} +filter{hal}
4310 +filter{fun} +hide-forwarded +hide-from{block} +hide-referer{forge}
4311 -hide-user-agent -image +image-blocker{blank} +no-compression
4312 +no-cookies-keep -no-cookies-read -no-cookies-set +no-popups
4313 -vanilla-wafer -wafer }
4323 Ooops, the <quote>/adsl/</quote> is matching <quote>/ads</quote>! But
4324 we did not want this at all! Now we see why we get the blank page. We could
4325 now add a new action below this that explicitly does <emphasis>not</emphasis>
4326 block (-block) pages with <quote>adsl</quote>. There are various ways to
4327 handle such exceptions. Example:
4340 Now the page displays ;-) Be sure to flush your browser's caches when
4341 making such changes. Or, try using <literal>Shift+Reload</literal>.
4345 But now what about a situation where we get no explicit matches like
4359 That actually was very telling and pointed us quickly to where the problem
4360 was. If you don't get this kind of match, then it means one of the default
4361 rules in the first section is causing the problem. This would require some
4362 guesswork, and maybe a little trial and error to isolate the offending rule.
4363 One likely cause would be one of the <quote>{+filter}</quote> actions. Try
4364 adding the URL for the site to one of aliases that turn off <quote>+filter</quote>:
4372 .worldpay.com # for quietpc.com
4381 <quote>{shop}</quote> is an <quote>alias</quote> that expands to
4382 <quote>{ -filter -no-cookies -no-cookies-keep }</quote>. Or you could do
4383 your own exception to negate filtering:
4397 <quote>{fragile}</quote> is an alias that disables most actions. This can be
4398 used as a last resort for problem sites. Remember to flush caches! If this
4399 still does not work, you will have to go through the remaining actions one by
4400 one to find which one(s) is causing the problem.
4409 This program is free software; you can redistribute it
4410 and/or modify it under the terms of the GNU General
4411 Public License as published by the Free Software
4412 Foundation; either version 2 of the License, or (at
4413 your option) any later version.
4415 This program is distributed in the hope that it will
4416 be useful, but WITHOUT ANY WARRANTY; without even the
4417 implied warranty of MERCHANTABILITY or FITNESS FOR A
4418 PARTICULAR PURPOSE. See the GNU General Public
4419 License for more details.
4421 The GNU General Public License should be included with
4422 this file. If not, you can view it at
4423 http://www.gnu.org/copyleft/gpl.html
4424 or write to the Free Software Foundation, Inc., 59
4425 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
4427 $Log: user-manual.sgml,v $
4428 Revision 1.81 2002/04/18 11:50:24 oes
4429 Extended Install section - needs fixing by packagers
4431 Revision 1.80 2002/04/18 10:45:19 oes
4432 Moved text to buildsource.sgml, renamed some filters, details
4434 Revision 1.79 2002/04/18 03:18:06 hal9
4435 Spellcheck, and minor touchups.
4437 Revision 1.78 2002/04/17 18:04:16 oes
4440 Revision 1.77 2002/04/17 13:51:23 oes
4441 Proofreading, part one
4443 Revision 1.76 2002/04/16 04:25:51 hal9
4444 -Added 'Note to Upgraders' and re-ordered the 'Quickstart' section.
4445 -Note about proxy may need requests to re-read config files.
4447 Revision 1.75 2002/04/12 02:08:48 david__schmidt
4448 Remove OS/2 building info... it is already in the developer-manual
4450 Revision 1.74 2002/04/11 00:54:38 hal9
4451 Add small section on submitting actions.
4453 Revision 1.73 2002/04/10 18:45:15 swa
4456 Revision 1.72 2002/04/10 04:06:19 hal9
4457 Added actions feedback to Bookmarklets section
4459 Revision 1.71 2002/04/08 22:59:26 hal9
4460 Version update. Spell chkconfig correctly :)
4462 Revision 1.70 2002/04/08 20:53:56 swa
4465 Revision 1.69 2002/04/06 05:07:29 hal9
4466 -Add privoxy-man-page.sgml, for man page.
4467 -Add authors.sgml for AUTHORS (and p-authors.sgml)
4468 -Reworked various aspects of various docs.
4469 -Added additional comments to sub-docs.
4471 Revision 1.68 2002/04/04 18:46:47 swa
4472 consistent look. reuse of copyright, history et. al.
4474 Revision 1.67 2002/04/04 17:27:57 swa
4475 more single file to be included at multiple points. make maintaining easier
4477 Revision 1.66 2002/04/04 06:48:37 hal9
4478 Structural changes to allow for conditional inclusion/exclusion of content
4479 based on entity toggles, e.g. 'entity % p-not-stable "INCLUDE"'. And
4480 definition of internal entities, e.g. 'entity p-version "2.9.13"' that will
4481 eventually be set by Makefile.
4482 More boilerplate text for use across multiple docs.
4484 Revision 1.65 2002/04/03 19:52:07 swa
4485 enhance squid section due to user suggestion
4487 Revision 1.64 2002/04/03 03:53:43 hal9
4488 A few minor bug fixes, and touch ups. Ready for review.
4490 Revision 1.63 2002/04/01 16:24:49 hal9
4491 Define entities to include boilerplate text. See doc/source/*.
4493 Revision 1.62 2002/03/30 04:15:53 hal9
4494 - Fix privoxy.org/config links.
4495 - Paste in Bookmarklets from Toggle page.
4496 - Move Quickstart nearer top, and minor rework.
4498 Revision 1.61 2002/03/29 01:31:08 hal9
4501 Revision 1.60 2002/03/27 01:57:34 hal9
4502 Added more to Anatomy section.
4504 Revision 1.59 2002/03/27 00:54:33 hal9
4505 Touch up intro for new name.
4507 Revision 1.58 2002/03/26 22:29:55 swa
4508 we have a new homepage!
4510 Revision 1.57 2002/03/24 20:33:30 hal9
4511 A few minor catch ups with name change.
4513 Revision 1.56 2002/03/24 16:17:06 swa
4514 configure needs to be generated.
4516 Revision 1.55 2002/03/24 16:08:08 swa
4517 we are too lazy to make a block-built
4518 privoxy logo. hence removed the option.
4520 Revision 1.54 2002/03/24 15:46:20 swa
4521 name change related issue.
4523 Revision 1.53 2002/03/24 11:51:00 swa
4524 name change. changed filenames.
4526 Revision 1.52 2002/03/24 11:01:06 swa
4529 Revision 1.51 2002/03/23 15:13:11 swa
4530 renamed every reference to the old name with foobar.
4531 fixed "application foobar application" tag, fixed
4532 "the foobar" with "foobar". left junkbustser in cvs
4533 comments and remarks to history untouched.
4535 Revision 1.50 2002/03/23 05:06:21 hal9
4538 Revision 1.49 2002/03/21 17:01:05 hal9
4539 New section in Appendix.
4541 Revision 1.48 2002/03/12 06:33:01 hal9
4542 Catching up to Andreas and re_filterfile changes.
4544 Revision 1.47 2002/03/11 13:13:27 swa
4545 correct feedback channels
4547 Revision 1.46 2002/03/10 00:51:08 hal9
4548 Added section on JB internal pages in Appendix.
4550 Revision 1.45 2002/03/09 17:43:53 swa
4553 Revision 1.44 2002/03/09 17:08:48 hal9
4554 New section on Jon's actions file editor, and move some stuff around.
4556 Revision 1.43 2002/03/08 00:47:32 hal9
4557 Added imageblock{pattern}.
4559 Revision 1.42 2002/03/07 18:16:55 swa
4562 Revision 1.41 2002/03/07 16:46:43 hal9
4563 Fix a few markup problems for jade.
4565 Revision 1.40 2002/03/07 16:28:39 swa
4566 provide correct feedback channels
4568 Revision 1.39 2002/03/06 16:19:28 hal9
4569 Note on perceived filtering slowdown per FR.
4571 Revision 1.38 2002/03/05 23:55:14 hal9
4572 Stupid I did it again. Double hyphen in comment breaks jade.
4574 Revision 1.37 2002/03/05 23:53:49 hal9
4575 jade barfs on '- -' embedded in comments. - -user option broke it.
4577 Revision 1.36 2002/03/05 22:53:28 hal9
4578 Add new - - user option.
4580 Revision 1.35 2002/03/05 00:17:27 hal9
4581 Added section on command line options.
4583 Revision 1.34 2002/03/04 19:32:07 oes
4584 Changed default port to 8118
4586 Revision 1.33 2002/03/03 19:46:13 hal9
4587 Emphasis on where/how to report bugs, etc
4589 Revision 1.32 2002/03/03 09:26:06 joergs
4590 AmigaOS changes, config is now loaded from PROGDIR: instead of
4591 AmiTCP:db/junkbuster/ if no configuration file is specified on the
4594 Revision 1.31 2002/03/02 22:45:52 david__schmidt
4597 Revision 1.30 2002/03/02 22:00:14 hal9
4598 Updated 'New Features' list. Ran through spell-checker.
4600 Revision 1.29 2002/03/02 20:34:07 david__schmidt
4601 Update OS/2 build section
4603 Revision 1.28 2002/02/24 14:34:24 jongfoster
4604 Formatting changes. Now changing the doctype to DocBook XML 4.1
4605 will work - no other changes are needed.
4607 Revision 1.27 2002/01/11 14:14:32 hal9
4608 Added a very short section on Templates
4610 Revision 1.26 2002/01/09 20:02:50 hal9
4611 Fix bug re: auto-detect config file changes.
4613 Revision 1.25 2002/01/09 18:20:30 hal9
4614 Touch ups for *.action files.
4616 Revision 1.24 2001/12/02 01:13:42 hal9
4619 Revision 1.23 2001/12/02 00:20:41 hal9
4620 Updates for recent changes.
4622 Revision 1.22 2001/11/05 23:57:51 hal9
4623 Minor update for startup now daemon mode.
4625 Revision 1.21 2001/10/31 21:11:03 hal9
4626 Correct 2 minor errors
4628 Revision 1.18 2001/10/24 18:45:26 hal9
4629 *** empty log message ***
4631 Revision 1.17 2001/10/24 17:10:55 hal9
4632 Catching up with Jon's recent work, and a few other things.
4634 Revision 1.16 2001/10/21 17:19:21 swa
4635 wrong url in documentation
4637 Revision 1.15 2001/10/14 23:46:24 hal9
4638 Various minor changes. Fleshed out SEE ALSO section.
4640 Revision 1.13 2001/10/10 17:28:33 hal9
4643 Revision 1.12 2001/09/28 02:57:04 hal9
4646 Revision 1.11 2001/09/28 02:25:20 hal9
4649 Revision 1.9 2001/09/27 23:50:29 hal9
4650 A few changes. A short section on regular expression in appendix.
4652 Revision 1.8 2001/09/25 00:34:59 hal9
4653 Some additions, and re-arranging.
4655 Revision 1.7 2001/09/24 14:31:36 hal9
4658 Revision 1.6 2001/09/24 14:10:32 hal9
4659 Including David's OS/2 installation instructions.
4661 Revision 1.2 2001/09/13 15:27:40 swa
4664 Revision 1.1 2001/09/12 15:36:41 swa
4665 source files for junkbuster documentation
4667 Revision 1.3 2001/09/10 17:43:59 swa
4668 first proposal of a structure.
4670 Revision 1.2 2001/06/13 14:28:31 swa
4671 docs should have an author.
4673 Revision 1.1 2001/06/13 14:20:37 swa
4674 first import of project's documentation for the webserver.