c325f44d477168c2429410e914a85cd989f4d24d
[privoxy.git] / doc / source / user-manual.sgml
1 <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook V3.1//EN" [
2 <!entity % dummy "IGNORE"> 
3 <!entity supported SYSTEM "supported.sgml">
4 <!entity newfeatures SYSTEM "newfeatures.sgml">
5 <!entity p-intro SYSTEM "privoxy.sgml">
6 <!entity seealso SYSTEM "seealso.sgml">
7 <!entity buildsource SYSTEM "buildsource.sgml">
8 <!entity contacting SYSTEM "contacting.sgml">
9 <!entity history SYSTEM "history.sgml">
10 <!entity copyright SYSTEM "copyright.sgml">
11 <!entity license SYSTEM "license.sgml">
12 <!entity p-authors SYSTEM "p-authors.sgml">
13 <!entity p-version "2.9.15">
14 <!entity p-status "beta">
15 <!entity % p-authors-formal "INCLUDE"> <!-- include additional text, etc  -->
16 <!entity % p-not-stable "INCLUDE">
17 <!entity % p-stable "IGNORE">
18 <!entity % p-text "IGNORE">        <!-- define we are not a text only doc -->
19 <!entity % p-doc "INCLUDE">        <!-- and we are a formal doc           -->
20 <!entity % p-readme "IGNORE">
21 <!entity % p-config "IGNORE">
22 <!entity % p-supp-userman "IGNORE"> <!-- Omit some from supported.sgml    -->
23 <!entity  my-copy "&copy;">         <!-- kludge for docbook2man           -->
24 <!entity % draft "IGNORE">          <!-- WIP stuff    -->
25 ]>
26 <!--
27  File        :  $Source: /cvsroot/ijbswa/current/doc/source/user-manual.sgml,v $
28
29  Purpose     :  user manual
30                 This file belongs into
31                 ijbswa.sourceforge.net:/home/groups/i/ij/ijbswa/htdocs/
32
33  $Id: user-manual.sgml,v 1.119 2002/05/22 17:17:05 oes Exp $
34
35  Copyright (C) 2001, 2002 Privoxy Developers <developers@privoxy.org>
36  See LICENSE.
37
38  ========================================================================
39  NOTE: Please read developer-manual/documentation.html before touching 
40  anything in this, or other Privoxy documentation.
41  ========================================================================
42
43 -->
44
45 <article id="index">
46 <artheader>
47
48 <title>Privoxy User Manual</title>
49
50 <pubdate>
51  <subscript>
52 <!-- Completely the wrong markup, but very little is allowed  -->
53 <!-- in this part of an article. FIXME -->
54  <link linkend="copyright">Copyright</link> &my-copy; 2001, 2002 by 
55  <ulink url="http://www.privoxy.org">Privoxy Developers</ulink>
56  </subscript>
57 </pubdate>
58
59 <pubdate>$Id: user-manual.sgml,v 1.119 2002/05/22 17:17:05 oes Exp $</pubdate>
60
61 <!--
62
63 Note: the following should generate a separate page, and a live link to it,
64 all nicely done. But it doesn't for some mysterious reason. Please leave
65 commented unless it can be fixed proper. For the time being, the
66 copyright/license declarations will be in their own sgml.
67
68 Hal.
69
70 <copyright>
71   <year>2001</year>
72   <year>2002</year>
73   <holder>Privoxy Developers</holder>
74 </copyright>
75
76 <legalnotice id="legalnotice"> 
77  <para>
78   text goes here ........
79  </para>
80 </legalnotice>
81
82 -->
83
84
85 <abstract>
86
87 <![%dummy;[
88  <para>
89  <comment>
90   This is here to keep vim syntax file from breaking :/
91   If I knew enough to fix it, I would.
92   PLEASE DO NOT REMOVE! HB: hal@foobox.net
93  </comment>
94  </para>
95 ]]>
96
97  <para>
98   The user manual gives users information on how to install, configure and use
99   <ulink
100   url="http://www.privoxy.org/"><application>Privoxy</application></ulink>.
101  </para>
102
103 <!-- Include privoxy.sgml boilerplate: -->
104  &p-intro;
105 <!-- end privoxy.sgml -->
106
107  <para>
108   You can find the latest version of the user manual at  <ulink
109   url="http://www.privoxy.org/user-manual/">http://www.privoxy.org/user-manual/</ulink>.
110   Please see the <ulink url="contact.html">Contact section</ulink> on how to
111   contact the developers.
112  </para>
113
114 <!--   <para> -->
115 <!--    Feel free to send a note to the developers at <email>ijbswa-developers@lists.sourceforge.net</email>. -->
116 <!--   </para> -->
117 </abstract>
118
119 </artheader>
120
121 <!--   ~~~~~       New section      ~~~~~     -->
122 <sect1 label="1" id="introduction"><title>Introduction</title>
123 <para>
124  This documentation is included with the current &p-status; version of
125  <application>Privoxy</application>, v.&p-version;<![%p-not-stable;[, 
126  and is mostly complete at this point. The most up to date reference for the
127  time being is still the comments in the source files and in the individual
128  configuration files. Development of version 3.0 is currently nearing
129  completion, and includes many significant changes and enhancements over
130  earlier versions. The target release date for
131  stable v3.0 is <quote>soon</quote> ;-)]]>.
132 </para>
133
134 <!-- include only in non-stable versions -->
135 <![%p-not-stable;[
136 <para>
137  Since this is a &p-status; version, not all new features are well tested. This
138  documentation may be slightly out of sync as a result (especially with 
139  CVS sources). And there <emphasis>may be</emphasis> bugs, though hopefully
140  not many! 
141 </para>
142 ]]>
143
144 <!--   ~~~~~       New section      ~~~~~     -->
145 <sect2 id="features"><title>Features</title>
146 <para>
147  In addition to <application>Internet Junkbuster's</application> traditional
148  features of ad and banner blocking and cookie management,
149  <application>Privoxy</application> provides new features<![%p-not-stable;[,
150  some of them currently under development]]>:
151 </para>
152 <!-- Include newfeatures.sgml boilerplate here: -->
153  &newfeatures;
154 <!-- end boilerplate -->
155 </sect2>
156
157 </sect1>
158
159 <!--  ~  End section  ~  -->
160
161
162 <!--   ~~~~~       New section      ~~~~~     -->
163 <sect1 id="installation"><title>Installation</title>
164
165 <para>
166  <application>Privoxy</application> is available both in convenient pre-compiled
167  packages for a wide range of operating systems, and as raw source code.
168  For most users, we recommend using the packages, which can be downloaded from our
169  <ulink url="http://sourceforge.net/projects/ijbswa/">Privoxy Project
170  Page</ulink>.
171 </para>
172
173 <para>
174  Note: If you have a previous <application>Junkbuster</application> or
175  <application>Privoxy</application> installation on your system, you
176  will need to remove it.  On some platforms, this may be done for you as part
177  of their installation procedure. (See below for your platform). In any case
178  <emphasis>be sure to backup your old configuration if it is valuable to
179  you.</emphasis> See the <link linkend="upgradersnote">note to
180  upgraders</link> section below.
181 </para>
182
183 <!--   ~~~~~       New section      ~~~~~     --> 
184 <sect2 id="installation-packages"><title>Binary Packages</title>
185 <para>
186 How to install the binary packages depends on your operating system:
187 </para>
188
189 <!--   ~~~~~       New section      ~~~~~     -->
190 <sect3 id="installation-pack-rpm"><title>Red Hat, SuSE RPMs and Conectiva</title>
191
192 <para>
193  RPMs can be installed with <literal>rpm -Uvh privoxy-&p-version;-1.rpm</literal>,
194  and will use <filename>/etc/privoxy</filename> for the location 
195  of configuration files.
196 </para>
197
198 <para>
199  Note that on Red Hat, <application>Privoxy</application> will
200  <emphasis>not</emphasis> be automatically started on system boot. You will
201  need to enable that using <command>chkconfig</command>,
202  <command>ntsysv</command>, or similar methods. Note that SuSE will 
203 automatically start Privoxy in the boot process.
204 </para>
205
206 <para>
207  If you have problems with failed dependencies, try rebuilding the SRC RPM: 
208  <literal>rpm --rebuild privoxy-&p-version;-1.src.rpm;</literal>. This 
209  will use your locally installed libraries and RPM version. 
210 </para>
211
212 <para>
213  Also note that if you have a <application>Junkbuster</application> RPM installed
214  on your system, you need to remove it first, because the packages conflict.
215  Otherwise, RPM will try to remove <application>Junkbuster</application>
216  automatically, before installing <application>Privoxy</application>.
217 </para>
218 </sect3>
219
220 <!--   ~~~~~       New section      ~~~~~     -->
221 <sect3 id="installation-deb"><title>Debian</title>
222 <para>
223  DEBs can be installed with <literal>dpkg -i
224  privoxy_&p-version;-1.deb</literal>, and will use
225  <filename>/etc/privoxy</filename> for the location of configuration
226  files.
227 </para>
228 </sect3>
229
230 <!--   ~~~~~       New section      ~~~~~     -->
231 <sect3 id="installation-pack-win"><title>Windows</title>
232
233 <para>
234  Just double-click the installer, which will guide you through
235  the installation process. You will find the configuration files
236  in the same directory as you installed Privoxy in. We do not
237  use the registry of Windows. 
238 </para>
239 </sect3>
240
241 <!--   ~~~~~       New section      ~~~~~     -->
242 <sect3 id="installation-pack-bintgz"><title>Solaris, NetBSD, FreeBSD, HP-UX</title>
243
244 <para>
245  Create a new directory, <literal>cd</literal> to it, then unzip and
246  untar the archive. For the most part, you'll have to figure out where
247  things go. FIXME.
248 </para>
249 </sect3>
250
251 <!--   ~~~~~       New section      ~~~~~     -->
252 <sect3 id="installation-os2"><title>OS/2</title>
253
254 <para>
255  First, make sure that no previous installations of
256  <application>Junkbuster</application> and / or 
257  <application>Privoxy</application> are left on your
258  system. You can do this by 
259 </para>
260
261 <para>
262  Then, just double-click the WarpIN self-installing archive, which will
263  guide you through the installation process. A shadow of the
264  <application>Privoxy</application> executable will be placed in your
265  startup folder so it will start automatically whenever OS/2 starts.
266 </para>
267
268 <para>
269  The directory you choose to install <application>Privoxy</application>
270  into will contain all of the configuration files.
271 </para>
272 </sect3>
273
274 <!--   ~~~~~       New section      ~~~~~     -->
275 <sect3 id="installation-mac"><title>Max OSX</title>
276 <para>
277  Unzip the downloaded package (you can either double-click on the file
278  in the finder, or on the desktop if you downloaded it there).  Then,
279  double-click on the package installer icon and follow the installation
280  process.
281  <application>Privoxy</application> will be installed in the subdirectory
282  <literal>/Applications/Privoxy.app</literal>.
283  <application>Privoxy</application> will set itself up to start 
284  automatically on system bring-up via
285  <literal>/System/Library/StartupItems/Privoxy</literal>.
286 </para>
287 </sect3>
288
289 <!--   ~~~~~       New section      ~~~~~     -->
290 <sect3 id="installation-amiga"><title>AmigaOS</title>
291 <para>
292  Copy and then unpack the <filename>lha</filename> archive to a suitable location. 
293  All necessary files will be installed into <application>Privoxy</application>
294  directory, including all configuration and log files. To uninstall, just 
295  remove this directory.
296 </para>
297 <para>
298  Start <application>Privoxy</application> (with RUN &lt;&gt;NIL:) in your
299  <filename>startnet</filename> script (AmiTCP), in
300  <filename>s:user-startup</filename> (RoadShow), as startup program in your
301  startup script (Genesis), or as startup action (Miami and MiamiDx). 
302  <application>Privoxy</application> will automatically quit when you quit your
303  TCP/IP stack (just ignore the harmless warning your TCP/IP stack may display that
304  <application>Privoxy</application> is still running).
305 </para>
306 </sect3>
307 </sect2>
308
309 <!--   ~~~~~       New section      ~~~~~     -->
310 <sect2 id="installation-source"><title>Building from Source</title>
311
312 <para>
313  The most convenient way to obtain the <application>Privoxy</application> sources
314  is to download the source tarball from our <ulink url="http://sf.net/projects/ijbswa/">project
315  page</ulink>.
316 </para>
317
318 <para>
319  If you like to live on the bleeding edge and are not afraid of using
320  possibly unstable development versions, you can check out the up-to-the-minute
321  version directly from <ulink url="http://sourceforge.net/cvs/?group_id=11118">the
322  CVS repository</ulink> or simply download <ulink
323  url="http://cvs.sourceforge.net/cvstarballs/ijbswa-cvsroot.tar.gz">the nightly CVS
324  tarball.</ulink>
325 </para>
326
327 <!-- include buildsource.sgml boilerplate: -->
328 &buildsource;
329 <!-- end boilerplate -->
330
331 </sect2>
332
333 </sect1>
334
335 <!--  ~  End section  ~  -->
336
337 <!--   ~~~~~       New section      ~~~~~     -->
338 <sect1 id="upgradersnote">
339 <title>Note to Upgraders</title>
340 <para>
341  There are very significant changes from earlier 
342  <application>Junkbuster</application> versions to the current
343  <application>Privoxy</application>. The number, names, syntax, and
344  purposes of configuration files have substantially  changed.
345  <application>Junkbuster 2.0.x</application> configuration
346  files will not migrate, <application>Junkbuster 2.9.x</application>
347  and <application>Privoxy</application> configurations will need to be
348  ported. The functionalities of the old <filename>blockfile</filename>,
349  <filename>cookiefile</filename> and <filename>imagelist</filename> 
350  are now combined into the <link linkend="actions-file"><quote>actions
351  files</quote></link>.  
352  <filename>default.action</filename>, is the main actions file. Local
353  exceptions should best be put into <filename>user.action</filename>.
354 </para>
355 <para>
356  A <link linkend="filter-file"><quote>filter file</quote></link> (typically
357  <filename>default.filter</filename>) is new as of <application>Privoxy
358  2.9.x</application>, and provides some of the new sophistication (explained
359  below). <filename>config</filename> is much the same as before.
360 </para>
361 <para>
362  If upgrading from a 2.0.x version, you will have to use the new config 
363  files, and possibly adapt any personal rules from your older files.
364  When porting personal rules over from the old <filename>blockfile</filename>
365  to the new actions files, please note that even the pattern syntax has
366  changed. If upgrading from 2.9.x development versions, it is still
367  recommended to use the new configuration files.
368 </para>
369 <para>
370  A quick list of things to be aware of before upgrading: 
371 </para>
372
373 <para>
374  <itemizedlist>
375
376  <listitem>
377   <para>
378    The default listening port is now 8118 due to a conflict with another 
379    service (NAS).
380   </para>
381  </listitem>  
382  <listitem>
383   <para>  
384     Some installers may remove earlier versions completely. Save any 
385     important configuration files!
386   </para>
387  </listitem>
388  <listitem>
389   <para>
390    <application>Privoxy</application> is controllable with a web browser 
391    at the special URL: <ulink
392    url="http://config.privoxy.org/">http://config.privoxy.org/</ulink>
393    (Shortcut: <ulink url="http://p.p/">http://p.p/</ulink>). Many
394    aspects of configuration can be done here, including temporarily disabling
395    <application>Privoxy</application>.
396   </para>
397  </listitem> 
398  <listitem>
399   <para>
400    The primary configuration files for cookie management, ad and banner 
401    blocking, and many other aspects of <application>Privoxy</application>
402    configuration are the <link linkend="actions-file">actions
403    files</link>. It is strongly recommended to become familiar with the new
404    actions concept below, before modifying these files. Locally defined rules 
405    should go into <filename>user.action</filename>.
406   </para>
407  </listitem> 
408   <listitem>
409   <para>
410 <!-- I think it is best to keep this somewhat vague, in case  -->
411 <!-- the situation changes under our feet. -->   
412    Some installers may not automatically start
413    <application>Privoxy</application> after installation.
414   </para>
415  </listitem> 
416
417  </itemizedlist>
418 </para>
419 </sect1>
420
421 <!--   ~~~~~       New section      ~~~~~     -->
422 <sect1 id="quickstart"><title>Quickstart to Using <application>Privoxy</application></title>
423 <para>
424  <itemizedlist>
425
426  <listitem>
427   <para>
428    If upgrading, from versions before 2.9.16, please back up any configuration
429    files. See the <link linkend="upgradersnote">Note to Upgraders</link> Section.
430  </para>
431 </listitem> 
432
433  <listitem>
434   <para>
435   Install <application>Privoxy</application>. See the <link
436   linkend="installation">Installation Section</link> below for platform specific
437   information. 
438  </para>
439  </listitem>  
440
441  <listitem>
442   <para>
443    Advanced users and those who want to offer <application>Privoxy</application>
444    service to more than just their local machine should check the <link
445    linkend="config">main config file</link>, especially the <link
446    linkend="access-control">security-relevant</link> options. These are 
447    off by default.
448   </para>
449  </listitem>  
450
451  <listitem>
452   <para>
453   Start <application>Privoxy</application>, if the installation program has
454   not done this already (may vary according to platform). See the section
455   <link linkend="startup">Starting <application>Privoxy</application></link>.
456   </para>
457  </listitem>
458
459  <listitem>
460   <para>
461    Set your browser to use <application>Privoxy</application> as HTTP and
462    HTTPS proxy by setting the proxy configuration for address of
463    <literal>127.0.0.1</literal> and port <literal>8118</literal>.
464    (<application>Junkbuster</application> and earlier versions of
465    <application>Privoxy</application> used port 8000.) See the section <link
466    linkend="startup">Starting <application>Privoxy</application></link> below
467    for more details on this.
468   </para>
469  </listitem>  
470
471  <listitem>
472   <para>
473     Flush your browser's disk and memory caches, to remove any cached ad images.
474   </para>
475  </listitem> 
476
477  <listitem>
478   <para>
479    A default installation should provide a reasonable starting point for 
480    most. There will undoubtedly be occasions where you will want to adjust the
481    configuration, but that can be dealt with as the need arises. Little 
482    to no initial configuration is required in most cases.
483   </para>
484   <para>
485    See the <link linkend="configuration">Configuration section</link> for more
486    configuration options, and how to customize your installation.
487  <![%draft;[  You might also want to look at the <link
488    linkend="quickstart-ad-blocking">next section</link> for a quick
489    introduction to how <application>Privoxy</application> blocks ads and
490    banners.]]>
491   </para>
492  </listitem> 
493
494  <listitem>
495   <para>
496     If you experience ads that slipped through, innocent images that are
497     blocked, or otherwise feel the need to fine-tune
498     <application>Privoxy's</application> behaviour, take a look at the <link
499     linkend="actions-file">actions files</link>. As a quick start, you might
500     find the <link linkend="act-examples">richly commented examples</link>
501     helpful. You can also view and edit the actions files through the <ulink
502     url="http://config.privoxy.org">web-based user interface</ulink>. The
503     Appendix <quote><link linkend="actionsanat">Anatomy of an
504     Action</link></quote> has hints how to debug actions that
505     <quote>misbehave</quote>.
506   </para>
507  </listitem> 
508
509  <listitem>
510   <para>
511    Please see the section <link linkend="contact">Contacting the
512    Developers</link> on how to report bugs or problems with websites or to get
513    help. 
514   </para>
515  </listitem> 
516
517  <listitem>
518   <para>
519    Now enjoy surfing with enhanced comfort and privacy!
520   </para>
521  </listitem> 
522  
523  </itemizedlist>
524 </para>
525
526
527 <!--   ~~~~~       New section      ~~~~~     -->
528
529 <sect2 id="quickstart-ad-blocking">
530 <title>Quickstart to Ad Blocking</title>
531 <!--
532  NOTE:  This section is deliberately redundant for those that don't 
533  want to read the whole thing (which is getting lengthy).
534 -->
535 <para>
536  Ad blocking is but one of <application>Privoxy's</application>
537  array of features. Many of these features are for the technically minded advanced 
538  user. But, ad and banner blocking is surely common ground for everybody.
539 </para>
540 <para> 
541  This section will provide a quick summary of ad blocking so 
542  you can get up to speed quickly without having to read the more extensive
543  information provided below, though this is highly recommeneded.
544 </para>
545 <para>
546  First a bit of a warning ... blocking ads is much like blocking SPAM: the
547  more aggressive you are about it, the more likely you are to block 
548  things that were not intended. So there is a trade off here. If you want
549  extreme ad free browsing, be prepared to deal with more
550  <quote>problem</quote> sites, and to spend more time adjusting the
551  configuration to solve these unintended consequences. In short, there is 
552  not an easy way to eliminate <emphasis>all</emphasis> ads. Either take 
553  the easy way and settle for <emphasis>most</emphasis> ads blocked with the
554  default configuration, or jump in and tweak it for your personal surfing
555  habits and preferences.
556 </para>
557 <para>
558  Secondly, a brief explanation of <application>Privoxy's </application>
559  <quote>actions</quote>. <quote>Actions</quote> in this context, are 
560  the directives we use to tell <application>Privoxy</application> to perform
561  some task relating to HTTP transactions (i.e. web browsing). We tell
562  <application>Privoxy</application> to take some <quote>action</quote>. Each
563  action has a unique name and function. While there are many potential
564  <application>actions</application> in <application>Privoxy's</application>
565  arsenal, only a few are used for ad blocking. <link
566  linkend="actions">Actions</link>, and <link linkend="actions-file">action
567  configuration files</link>, are explained in depth below.
568 </para>
569 <para>
570  Actions are specified in <application>Privoxy's</application> configuration,
571  followed by one or more URLs to which the action should apply. URLs 
572  can actually be URL type <link linkend="af-patterns">patterns</link> that use
573  wildcards so they can apply potentially to a range of similar URLs.
574 </para>
575 <para>
576  When you connect to a website, the full path of the URL will either match one 
577  of the <quote>actions</quote> as defined in
578  <application>Privoxy's</application> configuration, or not. If so, then
579  <application>Privoxy</application> will perform the action accordingly. If
580  not, then nothing special happens. Futhermore, web pages may contain
581  embedded, secondary URLs that your web browser will display as it parses the
582  original page's HTML content. An ad image for instance, is just a URL
583  embedded in the page somewhere. The image itself may be on the same server,
584  or a server somewhere else on the Internet. Complex web pages will have many
585  such embedded URLs.
586 </para>
587
588 <para>
589  The actions we need to know about for ad blocking are:  <link
590  linkend="block">block</link>, <link
591  linkend="handle-as-image">handle-as-image</link>, and <link 
592  linkend="set-image-blocker">set-image-blocker</link>:
593 </para>
594
595 <para>
596  <itemizedlist>
597   
598  <listitem>
599   <para>
600    <link linkend="block"><emphasis>block</emphasis></link> - this action stops
601    any contact between your browser and any URL patterns that match this
602    action's configuration. It can be used for blocking ads, but also anything
603    that is determined to be unwanted. By itself, it simply stops any
604    communication with the remote server. If this is the only action that 
605    matches for this particular URL, then <application>Privoxy</application> will 
606    display its own BLOCKED page to let you now what has happened.
607   </para>
608  </listitem> 
609
610  <listitem>
611   <para>
612    <link linkend="handle-as-image"><emphasis>handle-as-image</emphasis></link> - 
613    forces <application>Privoxy</application> to treat this URL as if it were 
614    an image. <application>Privoxy</application> knows about common image 
615    types (e.g. GIF), but there are many situations where this does not apply.
616    So we'll force it. This is particularly important for ad blocking, since 
617    once we can treat it as an image, we can make more intelligent decisisions 
618    on how to handle it. There are some limitations to this though. For
619    instance, you can't just force an image substituion for an entire HTML page 
620    in most situations.
621   </para>
622  </listitem> 
623
624  <listitem>
625   <para>
626    <link
627    linkend="set-image-blocker"><emphasis>set-image-blocker</emphasis></link> -
628    tells <application>Privoxy</application> what to display in place of 
629    an ad image that has hit a block rule. For this to come into play, 
630    the URL must match a block action somewhere in the configuration.
631    <emphasis>And</emphasis>, it must also either be of a known image type, or
632    match an <link
633    linkend="handle-as-image"><emphasis>handle-as-image</emphasis></link>
634    action.
635   </para>
636   <para>
637    The configuration options on what to display instead of the ad are:
638   </para>
639   <simplelist>
640    <member>
641     &nbsp;&nbsp;&nbsp;<emphasis>pattern</emphasis> - a checkboard pattern, so that an ad 
642     replacement is obvious. This is the default.
643    </member>
644   </simplelist>
645   <simplelist>
646    <member>
647     &nbsp;&nbsp;&nbsp;<emphasis>blank</emphasis> - A very small empty GIF image is displayed.
648     This is the so-called <quote>invisible</quote> configuration option.
649    </member>
650   </simplelist>
651   <simplelist>
652    <member>
653     &nbsp;&nbsp;&nbsp;<emphasis>http://&lt;URL&gt;</emphasis> - A redirect to any URL of the
654     user's choosing (advanced usage).
655    </member>
656   </simplelist>
657   </listitem> 
658
659 </itemizedlist>
660 </para>
661
662 <para>
663  The quickest way to adjust any of these settings is with your browser through
664  the special <application>Privoxy</application> editor  at <ulink
665  url="http://config.privoxy.org/show-status">http://config.privoxy.org/show-status</ulink>
666  (shortcut: <ulink url="http://p.p/">http://p.p/show-status</ulink>). This 
667  is an internal page, and does not require Internet access. Select the
668  appropriate <quote>actions</quote> file, and click
669  <quote><guibutton>Edit</guibutton></quote>. It is best to put personal or
670  local preferences in <filename>user.action</filename> since this is not
671  meant to be overwritten during upgrades, and will over-ride the settings in
672  other files. Here you can insert new <quote>actions</quote>, and URLs for ad
673  blocking or other purposes, and make other adjustments to the configuration.
674  <application>Privoxy</application> will detect these changes automatically.
675 </para>
676
677 <para>
678  A quick and simple step by step example:
679 </para>
680
681 <para>
682  <itemizedlist>
683
684   <listitem>
685    <para>
686      Right click on the ad image to be blocked, then select 
687      <quote><guimenuitem>Copy Link Location</guimenuitem></quote> from the
688      pop-up menu. 
689    </para>
690   </listitem> 
691   <listitem>
692    <para>
693     Set your browser to 
694     <ulink
695  url="http://config.privoxy.org/show-status">http://config.privoxy.org/show-status</ulink>
696    </para>
697   </listitem> 
698   <listitem>
699    <para>
700     Find <filename>user.action</filename> in the top section, and click 
701     on <quote><guibutton>Edit</guibutton></quote>:
702    </para>
703
704  <!-- image of editor and actions files selections -->
705  <para>
706   <figure pgwide="0" float="0"><title>Actions Files in Use</title>
707    <mediaobject>
708      <imageobject>
709       <imagedata  fileref="../images/files-in-use.jpg" format="jpg">
710        </imageobject> 
711        <textobject>
712         <phrase>Screenshot of Files in Use</phrase>
713       </textobject>
714    </mediaobject>
715   </figure>
716  </para>
717  </listitem> 
718  
719  <listitem>
720   <para>
721    You should have an Actions section labeled <emphasis>+block</emphasis>. 
722    If not, click the <quote><guibutton>Edit</guibutton></quote> button just
723    under the word <quote>Actions</quote>. This will bring up a list of all
724    actions. Find <emphasis>block</emphasis> near the top, and click in the
725    <quote>Enabled</quote> column, then
726    <quote><guibutton>Submit</guibutton></quote> just below the list.
727   </para>
728  </listitem> 
729  <listitem>
730   <para>
731    Now, in the <emphasis>+block</emphasis> actions section, click the
732    <quote><guibutton>Add</guibutton></quote> button, and paste the URL the
733    browser got from <quote><guimenuitem>Copy Link
734    Location</guimenuitem></quote>. Remove the <literal>http://</literal> at
735    the beginning of the URL. Then, click
736    <quote><guibutton>Submit</guibutton></quote>.
737   </para>
738  </listitem> 
739  <listitem>
740   <para>
741    Now go back to the original page, and press <keycap>SHIFT-Reload</keycap>
742    (or flush all browser caches). The image should be gone now.
743   </para>
744  </listitem> 
745  
746  </itemizedlist>
747 </para>
748
749 <para>
750  This is a very crude and simple example. There might be good reasons to use a 
751  wildcard pattern match to include potentially similar images from the same
752  site. For a more extensive explanation of <quote>patterns</quote>, and 
753  the entire actions concept, see <link linkend="actions-file">the Actions
754  section</link>.
755 </para>
756
757 <para>
758  For advanced users who want to hand edit their config files, you might want
759  to now go to the <link linkend="act-examples">Actions Files Tutorial</link>.
760 </para>
761
762 </sect2>
763
764 </sect1>
765
766 <!--  ~  End section  ~  -->
767
768
769 <!--   ~~~~~       New section      ~~~~~     -->
770 <sect1 id="startup">
771 <title>Starting <application>Privoxy</application></title>
772 <para>
773  Before launching <application>Privoxy</application> for the first time, you
774  will want to configure your browser(s) to use
775  <application>Privoxy</application> as a HTTP and HTTPS proxy. The default is
776  127.0.0.1 (or localhost) for the proxy address, and port 8118 (earlier versions
777  used port 8000). This is the one configuration step that must be done!
778 </para>
779  
780 <para> 
781  With <application>Netscape</application> (and
782  <application>Mozilla</application>), this can be set under <literal>Edit
783  -&gt; Preferences -&gt; Advanced -&gt; Proxies -&gt; HTTP Proxy</literal>.
784  For <application>Internet Explorer</application>: <literal>Tools -&gt;
785  Internet Properties -&gt; Connections -&gt; LAN Setting</literal>. Then,
786  check <quote>Use Proxy</quote> and fill in the appropriate info (Address:
787  127.0.0.1, Port: 8118). Include if HTTPS proxy support too.
788 </para>
789
790 <para>
791  After doing this, flush your browser's disk and memory caches to force a
792  re-reading of all pages and to get rid of any ads that may be cached. You 
793  are now ready to start enjoying the benefits of using
794  <application>Privoxy</application>!
795 </para>
796
797 <para>
798  <application>Privoxy</application> is typically started by specifying the
799  main configuration file to be used on the command line. If no configuration
800  file is specified on the command line, <application>Privoxy</application>
801  will look for a file named <filename>config</filename> in the current
802  directory. Except on Win32 where it will try <filename>config.txt</filename>.
803 </para>
804
805 <sect2 id="start-redhat">
806 <title>RedHat and Conectiva</title>
807 <para>
808 We use a script. Note that RedHat does not start Privoxy upon booting per
809 default. It will use the file <filename>/etc/privoxy/config</filename> as its
810 main configuration file.
811 </para>
812 <para>
813  <screen>
814  # /etc/rc.d/init.d/privoxy start
815 </screen>
816 </para>
817 </sect2>
818
819 <sect2 id="start-debian">
820 <title>Debian</title>
821 <para>
822  We use a script. Note that Debian starts Privoxy upon booting per
823  default.  It will use the file
824  <filename>/etc/privoxy/config</filename> as its main configuration
825  file.
826 </para>
827 <para>
828  <screen>
829  # /etc/init.d/privoxy start
830 </screen>
831 </para>
832 </sect2>
833
834 <sect2 id="start-suse">
835 <title>SuSE</title>
836 <para>
837 We use a script. It will use the file <filename>/etc/privoxy/config</filename>
838 as its main configuration file. Note that SuSE starts Privoxy upon booting
839 your PC.
840 </para>
841 <para>
842  <screen>
843  # rcprivoxy start
844 </screen>
845 </para>
846 </sect2>
847
848 <sect2 id="start-windows">
849 <title>Windows</title>
850 <para>
851 Click on the Privoxy Icon to start Privoxy. If no configuration file is
852  specified on the command line, <application>Privoxy</application> will look
853  for a file named <filename>config.txt</filename>. Note that Windows will
854  automatically start Privoxy upon booting you PC.
855 </para>
856 </sect2>
857
858 <sect2 id="start-unices">
859 <title>Solaris, NetBSD, FreeBSD, HP-UX and others</title>
860 <para>
861 Example Unix startup command:
862 </para>
863 <para>
864  <screen>
865  # /usr/sbin/privoxy /etc/privoxy/config
866 </screen>
867 </para>
868 </sect2>
869
870 <sect2 id="start-os2">
871 <title>OS/2</title>
872 <para>
873 FIXME.
874 </para>
875 </sect2>
876
877 <sect2 id="start-macosx">
878 <title>MAX OSX</title>
879 <para>
880 FIXME.
881 </para>
882 </sect2>
883
884
885 <sect2 id="start-amigaos">
886 <title>AmigaOS</title>
887 <para>
888 FIXME.
889 </para>
890 </sect2>
891
892 <!--
893
894 <para>
895  See the section <link linkend="cmdoptions">Command line options</link> for
896  furher info.
897 </para>
898
899 must find a better place for this paragraph
900
901 <para>
902  The included default configuration files should give a reasonable starting
903  point. Most of the per site configuration is done in the
904  <ulink url="actions-file.html"><quote>actions</quote></ulink> files. These are
905  where various cookie actions are defined, ad and banner blocking, and other
906  aspects of <application>Privoxy</application> configuration. There are several
907  such files included, with varying levels of aggressiveness. 
908 </para>
909
910 <para>
911  You will probably want to keep an eye out for sites for which you may prefer
912  persistent cookies, and add these to your actions configuration as needed. By
913  default, most of these will be accepted only during the current browser
914  session (aka <quote>session cookies</quote>), unless you add them to the
915  configuration. If you want the browser to handle this instead, you will need
916  to edit <filename>user.action</filename> (or through the web based interface)
917  and disable this feature. If you use more than one browser, it would make
918  more sense to let <application>Privoxy</application> handle this. In which
919  case, the browser(s) should be set to accept all cookies.
920 </para>
921
922 <para>
923  Another feature where you will probably want to define exceptions for trusted
924  sites is the popup-killing (through the <ulink
925  url="actions-file.html#KILL-POPUPS"><quote>+kill-popups</quote></ulink> and
926  <ulink
927  url="actions-file.html#FILTER-POPUPS"><quote>+filter{popups}</quote></ulink>
928  actions), because your favorite shopping, banking, or leisure site may need
929  popups (explained below). 
930 </para>
931
932 <para>
933  <application>Privoxy</application> is HTTP/1.1 compliant,  but not all of
934  the optional 1.1 features are as yet supported. In the unlikely event that
935  you experience inexplicable problems with browsers that use HTTP/1.1 per default
936  (like <application>Mozilla</application> or recent versions of I.E.), you might
937  try to force HTTP/1.0 compatibility. For Mozilla, look under <literal>Edit -&gt;
938  Preferences -&gt; Debug -&gt; Networking</literal>.
939  Alternatively, set the <quote>+downgrade-http-version</quote> config option in
940  <filename>default.action</filename> which will downgrade your browser's HTTP
941  requests from HTTP/1.1 to HTTP/1.0 before processing them.
942 </para>
943
944 <para>
945  After running <application>Privoxy</application> for a while, you can 
946  start to fine tune the configuration to suit your personal, or site, 
947  preferences and requirements. There are many, many aspects that can 
948  be customized. <quote>Actions</quote> 
949  can be adjusted by pointing your browser to 
950  <ulink url="http://config.privoxy.org/">http://config.privoxy.org/</ulink>
951  (shortcut: <ulink url="http://p.p/">http://p.p/</ulink>), 
952  and then follow the link to <quote>View &#38; Change the Current Configuration</quote>. 
953  (This is an internal page and does not require Internet access.)
954 </para>
955
956 <para>
957  In fact, various aspects of <application>Privoxy</application>
958  configuration can be viewed from this page, including 
959  current configuration parameters, source code version numbers, 
960  the browser's request headers, and <quote>actions</quote> that apply 
961  to a given URL. In addition to the actions file 
962  editor mentioned above, <application>Privoxy</application> can also 
963  be turned <quote>on</quote> and <quote>off</quote> (toggled) from this page.
964 </para>
965
966 <para>
967  If you encounter problems, try loading the page without
968  <application>Privoxy</application>. If that helps, enter the URL where
969  you have the problems into <ulink url="http://p.p/show-url-info">the browser
970  based rule tracing utility</ulink>. See which rules apply and why, and
971  then try turning them off for that site one after the other, until the problem
972  is gone. When you have found the culprit, you might want to turn the rest on
973  again.
974 </para>
975
976 <para>
977  If the above paragraph sounds gibberish to you, you might want to <ulink
978  url="actions-file.html#ACTIONSFILE">read more about the actions concept</ulink>
979  or even dive deep into the <ulink url="appendix.html#ACTIONSANAT">Appendix
980  on actions</ulink>.
981 </para>
982
983 <para>
984  If you can't get rid of the problem at all, think you've found a bug in
985  Privoxy, want to propose a new feature or smarter rules, please see the 
986  section <ulink url="contact.html"><quote>Contacting the
987  Developers</quote></ulink> below. 
988 </para>
989
990 -->
991
992 <!--   ~~~~~       New section      ~~~~~     -->
993 <sect2 id="cmdoptions">
994 <title>Command Line Options</title>
995 <para>
996  <application>Privoxy</application> may be invoked with the following
997  command-line options:
998 </para>
999
1000 <para>
1001  <itemizedlist>
1002
1003  <listitem>
1004   <para>
1005     <emphasis>--version</emphasis>
1006   </para>
1007   <para>
1008      Print version info and exit. Unix only.
1009   </para>
1010  </listitem> 
1011  <listitem>
1012   <para>
1013     <emphasis>--help</emphasis>
1014   </para>
1015   <para>
1016    Print short usage info and exit. Unix only.
1017   </para>
1018  </listitem> 
1019  <listitem>
1020   <para>
1021    <emphasis>--no-daemon</emphasis>
1022   </para>
1023   <para>
1024    Don't become a daemon, i.e. don't fork and become process group
1025    leader, and don't detach from controlling tty. Unix only.
1026   </para>
1027  </listitem> 
1028  <listitem>
1029   <para>
1030    <emphasis>--pidfile FILE</emphasis>
1031   
1032   </para>
1033   <para>
1034    On startup, write the process ID to <emphasis>FILE</emphasis>. Delete the
1035    <emphasis>FILE</emphasis> on exit. Failure to create or delete the
1036    <emphasis>FILE</emphasis> is non-fatal. If no <emphasis>FILE</emphasis>
1037    option is given, no PID file will be used. Unix only.
1038   </para>
1039  </listitem> 
1040  <listitem>
1041   <para>
1042    <emphasis>--user USER[.GROUP]</emphasis>
1043   
1044   </para>
1045   <para>
1046    After (optionally) writing the PID file, assume the user  ID  of
1047    <emphasis>USER</emphasis>, and if included the GID of GROUP.  Exit if the
1048    privileges are not sufficient to do so. Unix only.
1049   </para>
1050  </listitem> 
1051  <listitem>
1052   <para>
1053     <emphasis>configfile</emphasis>
1054   </para>
1055   <para>
1056     If no <emphasis>configfile</emphasis> is included on the command line, 
1057     <application>Privoxy</application> will look for a file named 
1058     <quote>config</quote> in the current directory (except on Win32 
1059     where it will look for <quote>config.txt</quote> instead). Specify 
1060     full path to avoid confusion. If no config file is found, 
1061     <application>Privoxy</application> will fail to start.
1062   </para>
1063  </listitem> 
1064
1065  </itemizedlist>
1066 </para>
1067
1068 </sect2>
1069
1070 </sect1>
1071
1072 <!--  ~  End section  ~  -->
1073
1074
1075 <!--   ~~~~~       New section      ~~~~~     -->
1076 <sect1 id="configuration"><title><application>Privoxy</application> Configuration</title>
1077  <para>
1078   All <application>Privoxy</application> configuration is stored  
1079   in text files. These files can be edited with a text editor.
1080   Many important aspects of <application>Privoxy</application> can 
1081   also be controlled easily with a web browser.
1082  </para>
1083
1084
1085 <!--   ~~~~~       New section      ~~~~~     -->
1086
1087 <sect2>
1088 <title>Controlling <application>Privoxy</application> with Your Web Browser</title>
1089 <para>
1090  <application>Privoxy</application>'s user interface can be reached through the special 
1091  URL <ulink url="http://config.privoxy.org/">http://config.privoxy.org/</ulink>
1092  (shortcut: <ulink url="http://p.p/">http://p.p/</ulink>), 
1093  which is a built-in page and works without Internet access.
1094  You will see the following section:
1095
1096 </para>
1097
1098 <!-- Needs to be put in a table and colorized  -->
1099 <screen>
1100  <msgtext>
1101  <bridgehead renderas="sect2">Privoxy Menu</bridgehead>
1102
1103  <simplelist>
1104  <member>
1105   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&squf;&nbsp;&nbsp;<ulink url="http://config.privoxy.org/show-status">View & change the current configuration</ulink>
1106  </member>
1107  <member>
1108   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&squf;&nbsp;&nbsp;<ulink url="http://config.privoxy.org/show-version">View the source code version numbers</ulink>
1109  </member>
1110  <member>
1111   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&squf;&nbsp;&nbsp;<ulink url="http://config.privoxy.org/show-request">View the request headers.</ulink>
1112  </member>
1113  <member>
1114   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&squf;&nbsp;&nbsp;<ulink url="http://config.privoxy.org/show-url-info">Look up which actions apply to a URL and why</ulink>
1115  </member>
1116  <member>
1117   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&squf;&nbsp;&nbsp;<ulink url="http://config.privoxy.org/toggle">Toggle Privoxy on or off</ulink>
1118  </member>
1119  </simplelist>
1120  </msgtext>
1121 </screen>
1122
1123
1124 <para>
1125  This should be self-explanatory. Note the first item leads to an editor for the
1126  <link linkend="actions-file">actions files</link>, which is where the ad, banner,
1127  cookie, and URL blocking magic is configured as well as other advanced features of
1128  <application>Privoxy</application>. This is an easy way to adjust various
1129  aspects of <application>Privoxy</application> configuration. The actions
1130  file, and other configuration files, are explained in detail below. 
1131 </para>
1132
1133 <para>
1134  <quote>Toggle Privoxy On or Off</quote> is handy for sites that might 
1135  have problems with your current actions and filters. You can in fact use
1136  it as a test to see whether it is <application>Privoxy</application> 
1137  causing the problem or not. <application>Privoxy</application> continues 
1138  to run as a proxy in this case, but all manipulation is disabled, i.e.
1139  <application>Privoxy</application> acts like a normal forwarding proxy. There
1140  is even a toggle <link linkend="bookmarklets">Bookmarklet</link> offered, so
1141  that you can toggle <application>Privoxy</application> with one click from
1142  your browser.
1143 </para>
1144
1145 </sect2>
1146
1147 <!--  ~  End section  ~  -->
1148
1149
1150
1151
1152 <!--   ~~~~~       New section      ~~~~~     -->
1153
1154 <sect2 id="confoverview">
1155 <title>Configuration Files Overview</title>
1156 <para>
1157  For Unix, *BSD and Linux, all configuration files are located in
1158  <filename>/etc/privoxy/</filename> by default. For MS Windows, OS/2, and
1159  AmigaOS these are all in the same directory as the 
1160  <application>Privoxy</application> executable. <![%p-not-stable;[ The name
1161  and number of configuration files has changed from previous versions, and is
1162  subject to change as development progresses.]]>
1163 </para>
1164
1165 <para>
1166  The installed defaults provide a reasonable starting point, though 
1167  some settings may be aggressive by some standards. For the time being, the
1168  principle configuration files are:
1169 </para>
1170
1171 <para>
1172  <itemizedlist>
1173
1174   <listitem>
1175    <para>
1176      The <link linkend="config">main configuration file</link> is named <filename>config</filename>
1177      on Linux, Unix, BSD, OS/2, and AmigaOS and <filename>config.txt</filename>
1178      on Windows. This is a required file.
1179    </para>
1180   </listitem> 
1181
1182   <listitem>
1183    <para>
1184     <filename>default.action</filename> (the main <link linkend="actions-file">actions file</link>)
1185     is used to define which <quote>actions</quote> relating to banner-blocking, images, pop-ups,
1186     content modification, cookie handling etc should be applied by default. It also defines many
1187     exceptions (both positive and negative) from this default set of actions that enable 
1188     <application>Privoxy</application> to selectively eliminate the junk, and only the junk, on
1189     as many websites as possible.
1190    </para>
1191    <para>
1192     Multiple actions files may be defined in <filename>config</filename>. These 
1193     are processed in the order they are defined. Local customizations and locally 
1194     preferred exceptions to the default policies  as defined in
1195     <filename>default.action</filename> (which you will most probably want
1196     to define sooner or later) are probably best applied in
1197     <filename>user.action</filename>, where you can preserve them across
1198     upgrades. <filename>standard.action</filename> is for
1199     <application>Privoxy's</application> internal use.
1200    </para>
1201    <para>    
1202     There is also a web based editor that can be accessed from
1203     <ulink
1204     url="http://config.privoxy.org/show-status">http://config.privoxy.org/show-status</ulink>
1205     (Shortcut: <ulink
1206     url="http://p.p/show-status">http://p.p/show-status</ulink>) for the
1207     various actions files. 
1208    </para>
1209   </listitem> 
1210
1211   <listitem>
1212    <para>
1213     <filename>default.filter</filename> (the <link linkend="filter-file">filter
1214     file</link>) can be used to re-write the raw page content, including
1215     viewable text as well as embedded HTML and JavaScript, and whatever else
1216     lurks on any given web page. The filtering jobs are only pre-defined here;
1217     whether to apply them or not is up to the actions files.
1218    </para>
1219   </listitem> 
1220
1221  </itemizedlist>
1222 </para>
1223
1224 <para>
1225  All files use the <quote><literal>#</literal></quote> character to denote a
1226  comment (the rest of the line will be ignored) and understand line continuation
1227  through placing a backslash ("<literal>\</literal>") as the very last character
1228  in a line. If the <literal>#</literal> is preceded by a backslash, it looses
1229  its special function. Placing a <literal>#</literal> in front of an otherwise
1230  valid configuration line to prevent it from being interpreted is called "commenting
1231  out" that line.
1232 </para>
1233
1234 <para>
1235  The actions files and <filename>default.filter</filename> 
1236  can use Perl style <link linkend="regex">regular expressions</link> for
1237  maximum flexibility. 
1238 </para>
1239
1240 <para>
1241  After making any changes, there is no need to restart
1242  <application>Privoxy</application> in order for the changes to take
1243  effect. <application>Privoxy</application> detects such changes 
1244  automatically. Note, however, that it may take one or two additional
1245  requests for the change to take effect. When changing the listening address
1246  of <application>Privoxy</application>, these <quote>wake up</quote> requests
1247  must obviously be sent to the <emphasis>old</emphasis> listening address.
1248 </para>
1249
1250 <![%p-not-stable;[
1251 <para>
1252  While under development, the configuration content is subject to change. 
1253  The below documentation may not be accurate by the time you read this. 
1254  Also, what constitutes a <quote>default</quote> setting, may change, so 
1255  please check all your configuration files on important issues.
1256 </para>
1257 ]]>
1258
1259 </sect2>
1260 </sect1>
1261 <!--  ~  End section  ~  -->
1262
1263
1264 <!--   ~~~~~~~~       New section Header    ~~~~~~~~~     -->
1265
1266 <sect1 id="config">
1267 <title>The Main Configuration File</title>
1268
1269 <para>
1270  Again, the main configuration file is named <filename>config</filename> on
1271  Linux/Unix/BSD and OS/2, and <filename>config.txt</filename> on Windows.
1272  Configuration lines consist of an initial keyword followed by a list of
1273  values, all separated by whitespace (any number of spaces or tabs). For
1274  example:
1275 </para>
1276
1277 <para>
1278  <literal>
1279   <msgtext> 
1280    <literallayout>
1281   <emphasis>confdir /etc/privoxy</emphasis></literallayout>
1282   </msgtext>
1283  </literal> 
1284 </para>
1285
1286 <para>
1287  Assigns the value <literal>/etc/privoxy</literal> to the option
1288  <literal>confdir</literal> and thus indicates that the configuration
1289  directory is named <quote>/etc/privoxy/</quote>.
1290 </para>
1291
1292 <para>
1293  All options in the config file except for <literal>confdir</literal> and
1294  <literal>logdir</literal> are optional. Watch out in the below description
1295  for what happens if you leave them unset.
1296 </para>
1297
1298 <para>
1299  The main config file controls all aspects of <application>Privoxy</application>'s
1300  operation that are not location dependent (i.e. they apply universally, no matter
1301  where you may be surfing).
1302 </para>
1303
1304
1305 <!--   ~~~~~       New section      ~~~~~     -->
1306
1307 <sect2 id="conf-log-loc">
1308 <title>Configuration and Log File Locations</title>
1309
1310 <para>
1311  <application>Privoxy</application> can (and normally does) use a number of
1312  other files for additional configuration, help and logging.
1313  This section of the configuration file tells <application>Privoxy</application>
1314  where to find those other files. 
1315 </para>
1316
1317 <para>
1318  The user running Privoxy, must have read permission for all 
1319  configuration files, and write permission to any files that would 
1320  be modified, such as log files.
1321 </para>
1322
1323 <sect3 renderas="sect4" id="confdir"><title>confdir</title>
1324
1325 <variablelist>
1326  <varlistentry>
1327   <term>Specifies:</term>
1328   <listitem>
1329    <para>The directory where the other configuration files are located</para>
1330   </listitem>
1331  </varlistentry>
1332  <varlistentry>
1333   <term>Type of value:</term>
1334   <listitem>
1335    <para>Path name</para>
1336   </listitem>
1337  </varlistentry>
1338  <varlistentry>
1339   <term>Default value:</term>
1340   <listitem>
1341    <para>/etc/privoxy (Unix) <emphasis>or</emphasis> <application>Privoxy</application> installation dir (Windows) </para>
1342   </listitem>
1343  </varlistentry>
1344  <varlistentry>
1345   <term>Effect if unset:</term>
1346   <listitem>
1347    <para><emphasis>Mandatory</emphasis></para>
1348   </listitem>
1349  </varlistentry>
1350  <varlistentry>
1351   <term>Notes:</term>
1352   <listitem>
1353    <para>
1354     No trailing <quote><literal>/</literal></quote>, please
1355    </para>
1356    <para>
1357     When development goes modular and multi-user, the blocker, filter, and
1358     per-user config will be stored in subdirectories of <quote>confdir</quote>.
1359     For now, the configuration directory structure is flat, except for 
1360     <filename>confdir/templates</filename>, where the HTML templates for CGI 
1361     output reside (e.g. <application>Privoxy's</application> 404 error page). 
1362    </para>
1363   </listitem>
1364  </varlistentry>
1365 </variablelist>
1366 </sect3>
1367
1368
1369 <sect3 renderas="sect4" id="logdir"><title>logdir</title>
1370
1371 <variablelist>
1372  <varlistentry>
1373   <term>Specifies:</term>
1374   <listitem>
1375    <para>
1376     The directory where all logging takes place (i.e. where <filename>logfile</filename> and 
1377     <filename>jarfile</filename> are located) 
1378    </para>
1379   </listitem>
1380  </varlistentry>
1381  <varlistentry>
1382   <term>Type of value:</term>
1383   <listitem>
1384    <para>Path name</para>
1385   </listitem>
1386  </varlistentry>
1387  <varlistentry>
1388   <term>Default value:</term>
1389   <listitem>
1390    <para>/var/log/privoxy (Unix) <emphasis>or</emphasis> <application>Privoxy</application> installation dir (Windows) </para>
1391   </listitem>
1392  </varlistentry>
1393  <varlistentry>
1394   <term>Effect if unset:</term>
1395   <listitem>
1396    <para><emphasis>Mandatory</emphasis></para>
1397   </listitem>
1398  </varlistentry>
1399  <varlistentry>
1400   <term>Notes:</term>
1401   <listitem>
1402    <para>
1403     No trailing <quote><literal>/</literal></quote>, please
1404    </para>
1405   </listitem>
1406  </varlistentry>
1407 </variablelist>
1408 </sect3>
1409
1410 <sect3 renderas="sect4" id="actionsfile"><title>
1411 actionsfile
1412 </title>
1413 <anchor id="default.action">
1414 <anchor id="standard.action">
1415 <anchor id="user.action">
1416 <!-- Note: slightly modified this section 04/28/02, hal. See NOTE. -->
1417 <variablelist>
1418  <varlistentry>
1419   <term>Specifies:</term>
1420   <listitem>
1421    <para>
1422     The <link linkend="actions-file">actions file(s)</link> to use
1423    </para>
1424   </listitem>
1425  </varlistentry>
1426  <varlistentry>
1427   <term>Type of value:</term>
1428   <listitem>
1429    <para>File name, relative to <literal>confdir</literal>, without the <literal>.action</literal> suffix</para>
1430   </listitem>
1431  </varlistentry>
1432  <varlistentry>
1433   <term>Default values:</term>
1434   <listitem>
1435    <simplelist>
1436     <member>
1437      <msgtext><literallayout>  standard     # Internal purposes, no editing recommended</literallayout></msgtext>
1438     </member>
1439     <member>
1440      <msgtext><literallayout>  default      # Main actions file</literallayout></msgtext>
1441     </member>
1442     <member>
1443      <msgtext><literallayout>  user         # User customizations</literallayout></msgtext>
1444     </member>
1445    </simplelist>
1446   </listitem>
1447  </varlistentry>
1448  <varlistentry>
1449   <term>Effect if unset:</term>
1450   <listitem>
1451    <para>
1452     No actions are taken at all. Simple neutral proxying. 
1453    </para>
1454   </listitem>
1455  </varlistentry>
1456  <varlistentry>
1457   <term>Notes:</term>
1458   <listitem>
1459    <para>
1460     Multiple <literal>actionsfile</literal> lines are permitted, and are in fact recommended!
1461    </para>
1462    <para> 
1463     The default values include standard.action, which is used for internal
1464     purposes and should be loaded, default.action, which is the
1465     <quote>main</quote> actions file maintained by the developers, and
1466     <filename>user.action</filename>, where you can make your personal additions.
1467    </para>
1468    <para> 
1469     Actions files are where all the per site and per URL configuration is done for 
1470     ad blocking, cookie management, privacy considerations, etc.
1471     There is no point in using <application>Privoxy</application> without at 
1472     least one actions file.
1473    </para>
1474   </listitem>
1475  </varlistentry>
1476 </variablelist>
1477 </sect3>
1478
1479 <sect3 renderas="sect4" id="filterfile"><title>filterfile</title>
1480 <anchor id="default.filter">
1481 <variablelist>
1482  <varlistentry>
1483   <term>Specifies:</term>
1484   <listitem>
1485    <para>
1486     The <link linkend="filter-file">filter file</link> to use
1487    </para>
1488   </listitem>
1489  </varlistentry>
1490  <varlistentry>
1491   <term>Type of value:</term>
1492   <listitem>
1493    <para>File name, relative to <literal>confdir</literal></para>
1494   </listitem>
1495  </varlistentry>
1496  <varlistentry>
1497   <term>Default value:</term>
1498   <listitem>
1499    <para>default.filter (Unix) <emphasis>or</emphasis> default.filter.txt (Windows)</para>
1500   </listitem>
1501  </varlistentry>
1502  <varlistentry>
1503   <term>Effect if unset:</term>
1504   <listitem>
1505    <para>
1506     No textual content filtering takes place, i.e. all
1507     <literal>+<link linkend="filter">filter</link>{<replaceable class="parameter">name</replaceable>}</literal>
1508     actions in the actions files are turned neutral.
1509    </para>
1510   </listitem>
1511  </varlistentry>
1512  <varlistentry>
1513   <term>Notes:</term>
1514   <listitem>
1515    <para>
1516     The <link linkend="filter-file">filter file</link> contains content modification
1517     rules that use <link linkend="regex">regular expressions</link>. These rules permit
1518     powerful changes on the content of Web pages, e.g., you could disable your favorite
1519     JavaScript annoyances, re-write the actual displayed text, or just have some
1520     fun replacing <quote>Microsoft</quote> with <quote>MicroSuck</quote> wherever
1521     it appears on a Web page.
1522    </para>
1523    <para>
1524     The
1525     <literal>+<link linkend="filter">filter</link>{<replaceable class="parameter">name</replaceable>}</literal>
1526     actions rely on the relevant filter (<replaceable class="parameter">name</replaceable>)
1527     to be defined in the filter file!
1528    </para>
1529    <para>
1530     A pre-defined filter file called <filename>default.filter</filename> that contains
1531     a bunch of handy filters for common problems is included in the distribution.
1532     See the section on the <literal><link linkend="filter">filter</link></literal>
1533     action for a list.
1534    </para>
1535   </listitem>
1536  </varlistentry>
1537 </variablelist>
1538 </sect3>
1539
1540 <sect3 renderas="sect4" id="logfile"><title>logfile</title>
1541
1542 <variablelist>
1543  <varlistentry>
1544   <term>Specifies:</term>
1545   <listitem>
1546    <para>
1547     The log file to use
1548    </para>
1549   </listitem>
1550  </varlistentry>
1551  <varlistentry>
1552   <term>Type of value:</term>
1553   <listitem>
1554    <para>File name, relative to <literal>logdir</literal></para>
1555   </listitem>
1556  </varlistentry>
1557  <varlistentry>
1558   <term>Default value:</term>
1559   <listitem>
1560    <para>logfile (Unix) <emphasis>or</emphasis> privoxy.log (Windows)</para>
1561   </listitem>
1562  </varlistentry>
1563  <varlistentry>
1564   <term>Effect if unset:</term>
1565   <listitem>
1566    <para>
1567     No log file is used, all log messages go to the console (<literal>stderr</literal>).
1568    </para>
1569   </listitem>
1570  </varlistentry>
1571  <varlistentry>
1572   <term>Notes:</term>
1573   <listitem>
1574    <para>
1575     The windows version will additionally log to the console.
1576    </para>
1577    <para>
1578     The logfile is where all logging and error messages are written. The level
1579     of detail and number of messages are set with the <literal>debug</literal>
1580     option (see below). The logfile can be useful for tracking down a problem with
1581     <application>Privoxy</application> (e.g., it's not blocking an ad you
1582     think it should block) but in most cases you probably will never look at it.
1583    </para>
1584    <para>
1585     Your logfile will grow indefinitely, and you will probably want to
1586     periodically remove it.  On Unix systems, you can do this with a cron job
1587     (see <quote>man cron</quote>). For Red Hat, a <command>logrotate</command> 
1588     script has been included.
1589    </para> 
1590    <para>
1591     On SuSE Linux systems, you can place a line like <quote>/var/log/privoxy.*
1592     +1024k 644 nobody.nogroup</quote> in <filename>/etc/logfiles</filename>, with
1593     the effect that cron.daily will automatically archive, gzip, and empty the
1594     log, when it exceeds 1M size.
1595    </para>
1596    <para>
1597     Any log files must be writable by whatever user <application>Privoxy</application>
1598     is being run as (default on UNIX, user id is <quote>privoxy</quote>).
1599    </para>
1600   </listitem>
1601  </varlistentry>
1602 </variablelist>
1603 </sect3>
1604
1605 <sect3 renderas="sect4" id="jarfile"><title>jarfile</title>
1606
1607 <variablelist>
1608  <varlistentry>
1609   <term>Specifies:</term>
1610   <listitem>
1611    <para>
1612     The file to store intercepted cookies in
1613    </para>
1614   </listitem>
1615  </varlistentry>
1616  <varlistentry>
1617   <term>Type of value:</term>
1618   <listitem>
1619    <para>File name, relative to <literal>logdir</literal></para>
1620   </listitem>
1621  </varlistentry>
1622  <varlistentry>
1623   <term>Default value:</term>
1624   <listitem>
1625    <para>jarfile (Unix) <emphasis>or</emphasis> privoxy.jar (Windows)</para>
1626   </listitem>
1627  </varlistentry>
1628  <varlistentry>
1629   <term>Effect if unset:</term>
1630   <listitem>
1631    <para>
1632     Intercepted cookies are not stored at all.
1633    </para>
1634   </listitem>
1635  </varlistentry>
1636  <varlistentry>
1637   <term>Notes:</term>
1638   <listitem>
1639    <para>
1640     The jarfile may grow to ridiculous sizes over time.
1641    </para>
1642   </listitem>
1643  </varlistentry>
1644 </variablelist>
1645 </sect3>
1646
1647 <sect3 renderas="sect4" id="trustfile"><title>trustfile</title>
1648 <variablelist>
1649  <varlistentry>
1650   <term>Specifies:</term>
1651   <listitem>
1652    <para>
1653     The trust file to use
1654    </para>
1655   </listitem>
1656  </varlistentry>
1657  <varlistentry>
1658   <term>Type of value:</term>
1659   <listitem>
1660    <para>File name, relative to <literal>confdir</literal></para>
1661   </listitem>
1662  </varlistentry>
1663  <varlistentry>
1664   <term>Default value:</term>
1665   <listitem>
1666    <para><emphasis>Unset (commented out)</emphasis>. When activated: trust (Unix) <emphasis>or</emphasis> trust.txt (Windows)</para>
1667   </listitem>
1668  </varlistentry>
1669  <varlistentry>
1670   <term>Effect if unset:</term>
1671   <listitem>
1672    <para>
1673     The whole trust mechanism is turned off.
1674    </para>
1675   </listitem>
1676  </varlistentry>
1677  <varlistentry>
1678   <term>Notes:</term>
1679   <listitem>
1680    <para>
1681     The trust mechanism is an experimental feature for building white-lists and should
1682     be used with care. It is <emphasis>NOT</emphasis> recommended for the casual user.
1683    </para>
1684    <para>
1685     If you specify a trust file, <application>Privoxy</application> will only allow
1686     access to sites that are named in the trustfile. 
1687     You can also mark sites as trusted referrers (with <literal>+</literal>), with
1688     the effect that access to untrusted sites will be granted, if a link from a
1689     trusted referrer was used.
1690     The link target will then be added to the <quote>trustfile</quote>.
1691     Possible applications include limiting Internet access for children.
1692    </para>
1693    <para>
1694     If you use <literal>+</literal> operator in the trust file, it may grow considerably over time.
1695    </para>
1696   </listitem>
1697  </varlistentry>
1698 </variablelist>
1699 </sect3>
1700 </sect2>
1701
1702 <!--  ~  End section  ~  -->
1703
1704
1705
1706 <!--   ~~~~~       New section      ~~~~~     -->
1707
1708 <sect2 id="local-set-up">
1709 <title>Local Set-up Documentation</title>
1710
1711   <para>
1712     If you intend to operate <application>Privoxy</application> for more users
1713     than just yourself, it might be a good idea to let them know how to reach
1714     you, what you block and why you do that, your policies, etc.
1715    </para>
1716
1717 <sect3 renderas="sect4" id="user-manual"><title>user-manual</title>
1718 <variablelist>
1719  <varlistentry>
1720   <term>Specifies:</term>
1721   <listitem>
1722    <para>
1723     Location of the <application>Privoxy</application> User Manual.
1724    </para>
1725   </listitem>
1726  </varlistentry>
1727  <varlistentry>
1728   <term>Type of value:</term>
1729   <listitem>
1730    <para>A fully qualified URI</para>
1731   </listitem>
1732  </varlistentry>
1733  <varlistentry>
1734   <term>Default value:</term>
1735   <listitem>
1736    <para><emphasis>Unset</emphasis></para>
1737   </listitem>
1738  </varlistentry>
1739  <varlistentry>
1740   <term>Effect if unset:</term>
1741   <listitem>
1742    <para>
1743     <ulink url="http://www.privoxy.org/user-manual/">http://www.privoxy.org/<replaceable class="parameter">version</replaceable>/user-manual/</ulink>
1744     will be used, where <replaceable class="parameter">version</replaceable> is the <application>Privoxy</application> version.
1745    </para>
1746   </listitem>
1747  </varlistentry>
1748  <varlistentry>
1749   <term>Notes:</term>
1750   <listitem>
1751     <para>
1752     The User Manual URI is used for help links from some of the internal CGI pages. 
1753     The manual itself is normally packaged with the binary distributions, so you probably want
1754     to set this to a locally installed copy. For multi-user setups, you could provide a copy on
1755     a local webserver for all your users and use the corresponding URL here.
1756    </para>
1757    <para>
1758     Examples:
1759    </para>
1760   <para>
1761    Unix, in local filesystem:
1762   </para>
1763   <para>
1764    <screen>user-manual&nbsp;&nbsp;file:///usr/share/doc/privoxy-&p-version;/user-manual/</screen>
1765   </para>
1766   <para>
1767    Any platform, on local webserver (called <quote>local-webserver</quote>):
1768   </para>
1769   <para>
1770    <screen>user-manual&nbsp;&nbsp;http://local-webserver/privoxy-user-manual/</screen>
1771   </para>
1772   <warning>
1773    <para>
1774      If set, this option should be <emphasis>the first option in the config file</emphasis>, because
1775      it is used while the config file is being read.
1776    </para>
1777   </warning>     
1778  </listitem>
1779  </varlistentry>
1780 </variablelist>
1781 </sect3>
1782
1783 <sect3 renderas="sect4" id="trust-info-url"><title>trust-info-url</title>
1784
1785 <variablelist>
1786  <varlistentry>
1787   <term>Specifies:</term>
1788   <listitem>
1789    <para>
1790     A URL to be displayed in the error page that users will see if access to an untrusted page is denied.    
1791    </para>
1792   </listitem>
1793  </varlistentry>
1794  <varlistentry>
1795   <term>Type of value:</term>
1796   <listitem>
1797    <para>URL</para>
1798   </listitem>
1799  </varlistentry>
1800  <varlistentry>
1801   <term>Default value:</term>
1802   <listitem>
1803    <para>Two example URL are provided</para>
1804   </listitem>
1805  </varlistentry>
1806  <varlistentry>
1807   <term>Effect if unset:</term>
1808   <listitem>
1809    <para>
1810     No links are displayed on the "untrusted" error page.
1811    </para>
1812   </listitem>
1813  </varlistentry>
1814  <varlistentry>
1815   <term>Notes:</term>
1816   <listitem>
1817    <para>
1818     The value of this option only matters if the experimental trust mechanism has been
1819     activated. (See <link linkend="trustfile"><emphasis>trustfile</emphasis></link> above.)
1820    </para>
1821    <para>
1822     If you use the trust mechanism, it is a good idea to write up some on-line
1823     documentation about your trust policy and to specify the URL(s) here.
1824     Use multiple times for multiple URLs.
1825    </para>
1826    <para>
1827     The URL(s) should be added to the trustfile as well, so users don't end up
1828     locked out from the information on why they were locked out in the first place!
1829    </para>
1830   </listitem>
1831  </varlistentry>
1832 </variablelist>
1833 </sect3>
1834
1835 <sect3 renderas="sect4" id="admin-address"><title>admin-address</title>
1836
1837 <variablelist>
1838  <varlistentry>
1839   <term>Specifies:</term>
1840   <listitem>
1841    <para>
1842     An email address to reach the proxy administrator.
1843    </para>
1844   </listitem>
1845  </varlistentry>
1846  <varlistentry>
1847   <term>Type of value:</term>
1848   <listitem>
1849    <para>Email address</para>
1850   </listitem>
1851  </varlistentry>
1852  <varlistentry>
1853   <term>Default value:</term>
1854   <listitem>
1855    <para><emphasis>Unset</emphasis></para>
1856   </listitem>
1857  </varlistentry>
1858  <varlistentry>
1859   <term>Effect if unset:</term>
1860   <listitem>
1861    <para>
1862     No email address is displayed on error pages and the CGI user interface.
1863    </para>
1864   </listitem>
1865  </varlistentry>
1866  <varlistentry>
1867   <term>Notes:</term>
1868   <listitem>
1869     <para>
1870     If both <literal>admin-address</literal> and <literal>proxy-info-url</literal>
1871     are unset, the whole "Local Privoxy Support" box on all generated pages will
1872     not be shown.
1873    </para>  
1874   </listitem>
1875  </varlistentry>
1876 </variablelist>
1877 </sect3>
1878
1879 <sect3 renderas="sect4" id="proxy-info-url"><title>proxy-info-url</title>
1880
1881 <variablelist>
1882  <varlistentry>
1883   <term>Specifies:</term>
1884   <listitem>
1885    <para>
1886     A URL to documentation about the local <application>Privoxy</application> setup,
1887     configuration or policies.
1888    </para>
1889   </listitem>
1890  </varlistentry>
1891  <varlistentry>
1892   <term>Type of value:</term>
1893   <listitem>
1894    <para>URL</para>
1895   </listitem>
1896  </varlistentry>
1897  <varlistentry>
1898   <term>Default value:</term>
1899   <listitem>
1900    <para><emphasis>Unset</emphasis></para>
1901   </listitem>
1902  </varlistentry>
1903  <varlistentry>
1904   <term>Effect if unset:</term>
1905   <listitem>
1906    <para>
1907     No link to local documentation is displayed on error pages and the CGI user interface.
1908    </para>
1909   </listitem>
1910  </varlistentry>
1911  <varlistentry>
1912   <term>Notes:</term>
1913   <listitem>
1914    <para>
1915     If both <literal>admin-address</literal> and <literal>proxy-info-url</literal>
1916     are unset, the whole "Local Privoxy Support" box on all generated pages will
1917     not be shown.
1918    </para>  
1919    <para>
1920     This URL shouldn't be blocked ;-)
1921    </para> 
1922   </listitem>
1923  </varlistentry>
1924 </variablelist>
1925 </sect3>
1926
1927 </sect2>
1928 <!--  ~  End section  ~  -->
1929
1930 <!--   ~~~~~       New section      ~~~~~     -->
1931
1932 <sect2 id="debugging">
1933 <title>Debugging</title>
1934
1935  <para>
1936   These options are mainly useful when tracing a problem.
1937   Note that you might also want to invoke
1938   <application>Privoxy</application> with the <literal>--no-daemon</literal>
1939   command line option when debugging.
1940  </para>
1941
1942 <sect3 renderas="sect4" id="debug"><title>debug</title>
1943
1944 <variablelist>
1945  <varlistentry>
1946   <term>Specifies:</term>
1947   <listitem>
1948    <para>
1949     Key values that determine what information gets logged to the 
1950     <link linkend="logfile"><emphasis>logfile</emphasis></link>.
1951    </para>
1952   </listitem>
1953  </varlistentry>
1954  <varlistentry>
1955   <term>Type of value:</term>
1956   <listitem>
1957    <para>Integer values</para>
1958   </listitem>
1959  </varlistentry>
1960  <varlistentry>
1961   <term>Default value:</term>
1962   <listitem>
1963    <para>12289 (i.e.: URLs plus informational and warning messages)</para>
1964   </listitem>
1965  </varlistentry>
1966  <varlistentry>
1967   <term>Effect if unset:</term>
1968   <listitem>
1969    <para>
1970     Nothing gets logged.
1971    </para>
1972   </listitem>
1973  </varlistentry>
1974  <varlistentry>
1975   <term>Notes:</term>
1976   <listitem>
1977    <para>
1978     The available debug levels are:
1979    </para>
1980    <para>
1981     <programlisting>
1982   debug         1 # show each GET/POST/CONNECT request
1983   debug         2 # show each connection status
1984   debug         4 # show I/O status
1985   debug         8 # show header parsing
1986   debug        16 # log all data into the logfile
1987   debug        32 # debug force feature
1988   debug        64 # debug regular expression filter 
1989   debug       128 # debug fast redirects
1990   debug       256 # debug GIF de-animation
1991   debug       512 # Common Log Format
1992   debug      1024 # debug kill pop-ups
1993   debug      4096 # Startup banner and warnings.
1994   debug      8192 # Non-fatal errors
1995 </programlisting>
1996    </para>
1997    <para>
1998     To select multiple debug levels, you can either add them or use
1999     multiple <literal>debug</literal> lines.
2000    </para>
2001    <para>
2002     A debug level of 1 is informative because it will show you each request
2003     as it happens. <emphasis>1, 4096 and 8192 are highly recommended</emphasis>
2004     so that you will notice when things go wrong. The other levels are probably
2005     only of interest if you are hunting down a specific problem. They can produce
2006     a hell of an output (especially 16).
2007     <!-- LOL -->
2008    </para>
2009    <para>
2010     The reporting of <emphasis>fatal</emphasis> errors (i.e. ones which crash 
2011     <application>Privoxy</application>) is always on and cannot be disabled.
2012    </para>
2013    <para>
2014     If you want to use CLF (Common Log Format), you should set <quote>debug
2015     512</quote> <emphasis>ONLY</emphasis> and not enable anything else.
2016    </para>
2017   </listitem>
2018  </varlistentry>
2019 </variablelist>
2020 </sect3>
2021
2022 <sect3 renderas="sect4" id="single-threaded"><title>single-threaded</title>
2023
2024 <variablelist>
2025  <varlistentry>
2026   <term>Specifies:</term>
2027   <listitem>
2028    <para>
2029     Whether to run only one server thread
2030    </para>
2031   </listitem>
2032  </varlistentry>
2033  <varlistentry>
2034   <term>Type of value:</term>
2035   <listitem>
2036    <para><emphasis>None</emphasis></para>
2037   </listitem>
2038  </varlistentry>
2039  <varlistentry>
2040   <term>Default value:</term>
2041   <listitem>
2042    <para><emphasis>Unset</emphasis></para>
2043   </listitem>
2044  </varlistentry>
2045  <varlistentry>
2046   <term>Effect if unset:</term>
2047   <listitem>
2048    <para>
2049     Multi-threaded (or, where unavailable: forked) operation, i.e. the ability to
2050     serve multiple requests simultaneously.
2051    </para>
2052   </listitem>
2053  </varlistentry>
2054  <varlistentry>
2055   <term>Notes:</term>
2056   <listitem>
2057    <para>
2058     This option is only there for debug purposes and you should never
2059     need to use it. <emphasis>It will drastically reduce performance.</emphasis>
2060    </para>
2061   </listitem>
2062  </varlistentry>
2063 </variablelist>
2064 </sect3>
2065
2066 </sect2>
2067
2068 <!--   ~~~~~       New section      ~~~~~     -->
2069
2070 <sect2 id="access-control">
2071 <title>Access Control and Security</title>
2072
2073  <para>
2074   This section of the config file controls the security-relevant aspects
2075   of <application>Privoxy</application>'s configuration.
2076  </para>
2077
2078 <sect3 renderas="sect4" id="listen-address"><title>listen-address</title>
2079
2080 <variablelist>
2081  <varlistentry>
2082   <term>Specifies:</term>
2083   <listitem>
2084    <para>
2085     The IP address and TCP port on which <application>Privoxy</application> will
2086     listen for client requests.
2087    </para>
2088   </listitem>
2089  </varlistentry>
2090  <varlistentry>
2091   <term>Type of value:</term>
2092   <listitem>
2093    <para>[<replaceable class="parameter">IP-Address</replaceable>]:<replaceable class="parameter">Port</replaceable></para>
2094   </listitem>
2095  </varlistentry>
2096
2097  <varlistentry>
2098   <term>Default value:</term>
2099   <listitem>
2100    <para>127.0.0.1:8118</para>
2101   </listitem>
2102  </varlistentry>
2103  <varlistentry>
2104   <term>Effect if unset:</term>
2105   <listitem>
2106    <para>
2107     Bind to 127.0.0.1 (localhost), port 8118. This is suitable and recommended for
2108     home users who run <application>Privoxy</application> on the same machine as
2109     their browser.
2110    </para>
2111   </listitem>
2112  </varlistentry>
2113  <varlistentry>
2114   <term>Notes:</term>
2115   <listitem>
2116    <para>
2117     You will need to configure your browser(s) to this proxy address and port.
2118    </para>
2119    <para>
2120     If you already have another service running on port 8118, or if you want to
2121     serve requests from other machines (e.g. on your local network) as well, you
2122     will need to override the default.
2123    </para>
2124    <para>
2125     If you leave out the IP address, <application>Privoxy</application> will
2126     bind to all interfaces (addresses) on your machine and may become reachable
2127     from the Internet. In that case, consider using <link
2128     linkend="acls">access control lists</link> (ACL's, see below), and/or
2129     a firewall.
2130    </para>
2131    <para>
2132     If you open <application>Privoxy</application> to untrusted users, you will
2133     also want to turn off the <literal><link
2134     linkend="enable-edit-actions">enable-edit-actions</link></literal> and
2135     <literal><link linkend="enable-remote-toggle">enable-remote-toggle</link></literal>
2136     options!
2137    </para>
2138   </listitem>
2139  </varlistentry>
2140  <varlistentry>
2141   <term>Example:</term>
2142   <listitem>
2143    <para>
2144      Suppose you are running <application>Privoxy</application> on
2145      a machine which has the address 192.168.0.1 on your local private network
2146      (192.168.0.0) and has another outside connection with a different address.
2147      You want it to serve requests from inside only:
2148    </para>
2149    <para>
2150     <programlisting>
2151   listen-address  192.168.0.1:8118
2152 </programlisting>
2153    </para>
2154   </listitem>
2155  </varlistentry>
2156 </variablelist>
2157 </sect3>
2158
2159 <sect3 renderas="sect4" id="toggle"><title>toggle</title>
2160
2161 <variablelist>
2162  <varlistentry>
2163   <term>Specifies:</term>
2164   <listitem>
2165    <para>
2166     Initial state of "toggle" status
2167    </para>
2168   </listitem>
2169  </varlistentry>
2170  <varlistentry>
2171   <term>Type of value:</term>
2172   <listitem>
2173    <para>1 or 0</para>
2174   </listitem>
2175  </varlistentry>
2176  <varlistentry>
2177   <term>Default value:</term>
2178   <listitem>
2179    <para>1</para>
2180   </listitem>
2181  </varlistentry>
2182  <varlistentry>
2183   <term>Effect if unset:</term>
2184   <listitem>
2185    <para>
2186     Act as if toggled on
2187    </para>
2188   </listitem>
2189  </varlistentry>
2190  <varlistentry>
2191   <term>Notes:</term>
2192   <listitem>
2193    <para>
2194     If set to 0, <application>Privoxy</application> will start in
2195     <quote>toggled off</quote> mode, i.e. behave like a normal, content-neutral
2196     proxy where all ad blocking, filtering, etc are disabled. See
2197     <literal>enable-remote-toggle</literal> below. This is not really useful
2198     anymore, since toggling is much easier via <ulink
2199     url="http://config.privoxy.org/toggle">the web interface</ulink> than via
2200     editing the <filename>conf</filename> file.
2201    </para>
2202    <para>
2203     The windows version will only display the toggle icon in the system tray
2204     if this option is present.
2205    </para>
2206   </listitem>
2207  </varlistentry>
2208 </variablelist>
2209 </sect3>
2210
2211
2212 <sect3 renderas="sect4" id="enable-remote-toggle"><title>enable-remote-toggle</title>
2213 <variablelist>
2214  <varlistentry>
2215   <term>Specifies:</term>
2216   <listitem>
2217    <para>
2218     Whether or not the <ulink url="http://config.privoxy.org/toggle">web-based toggle
2219     feature</ulink> may be used
2220    </para>
2221   </listitem>
2222  </varlistentry>
2223  <varlistentry>
2224   <term>Type of value:</term>
2225   <listitem>
2226    <para>0 or 1</para>
2227   </listitem>
2228  </varlistentry>
2229  <varlistentry>
2230   <term>Default value:</term>
2231   <listitem>
2232    <para>1</para>
2233   </listitem>
2234  </varlistentry>
2235  <varlistentry>
2236   <term>Effect if unset:</term>
2237   <listitem>
2238    <para>
2239     The web-based toggle feature is disabled.
2240    </para>
2241   </listitem>
2242  </varlistentry>
2243  <varlistentry>
2244   <term>Notes:</term>
2245   <listitem>
2246    <para>
2247     When toggled off, <application>Privoxy</application> acts like a normal,
2248     content-neutral proxy, i.e. it acts as if none of the actions applied to
2249     any URL.
2250    </para>
2251    <para>
2252     For the time being, access to the toggle feature can <emphasis>not</emphasis> be
2253     controlled separately by <quote>ACLs</quote> or HTTP authentication,
2254     so that everybody who can access <application>Privoxy</application> (see
2255     <quote>ACLs</quote> and <literal>listen-address</literal> above) can
2256     toggle it for all users. So this option is <emphasis>not recommended</emphasis>
2257     for multi-user environments with untrusted users.
2258    </para>
2259    <para>
2260     Note that you must have compiled <application>Privoxy</application> with
2261     support for this feature, otherwise this option has no effect. 
2262    </para>
2263   </listitem>
2264  </varlistentry>
2265 </variablelist>
2266 </sect3>
2267
2268
2269 <sect3 renderas="sect4" id="enable-edit-actions"><title>enable-edit-actions</title>
2270 <variablelist>
2271  <varlistentry>
2272   <term>Specifies:</term>
2273   <listitem>
2274    <para>
2275     Whether or not the <ulink url="http://config.privoxy.org/show-status">web-based actions
2276     file editor</ulink> may be used
2277    </para>
2278   </listitem>
2279  </varlistentry>
2280  <varlistentry>
2281   <term>Type of value:</term>
2282   <listitem>
2283    <para>0 or 1</para>
2284   </listitem>
2285  </varlistentry>
2286  <varlistentry>
2287   <term>Default value:</term>
2288   <listitem>
2289    <para>1</para>
2290   </listitem>
2291  </varlistentry>
2292  <varlistentry>
2293   <term>Effect if unset:</term>
2294   <listitem>
2295    <para>
2296     The web-based actions file editor is disabled.
2297    </para>
2298   </listitem>
2299  </varlistentry>
2300  <varlistentry>
2301   <term>Notes:</term>
2302   <listitem>
2303    <para>
2304     For the time being, access to the editor can <emphasis>not</emphasis> be
2305     controlled separately by <quote>ACLs</quote> or HTTP authentication,
2306     so that everybody who can access <application>Privoxy</application> (see
2307     <quote>ACLs</quote> and <literal>listen-address</literal> above) can
2308     modify its configuration for all users. So this option is <emphasis>not
2309     recommended</emphasis> for multi-user environments with untrusted users.
2310    </para>
2311    <para>
2312     Note that you must have compiled <application>Privoxy</application> with
2313     support for this feature, otherwise this option has no effect. 
2314    </para>
2315   </listitem>
2316  </varlistentry>
2317 </variablelist>
2318 </sect3>
2319
2320 <sect3 renderas="sect4" id="acls"><title>
2321 ACLs: permit-access and deny-access</title>
2322 <anchor id="permit-access">
2323 <anchor id="deny-access">
2324
2325 <variablelist>
2326  <varlistentry>
2327   <term>Specifies:</term>
2328   <listitem>
2329    <para>
2330     Who can access what.
2331    </para>
2332   </listitem>
2333  </varlistentry>
2334  <varlistentry>
2335   <term>Type of value:</term>
2336   <listitem>
2337    <para>
2338     <replaceable class="parameter">src_addr</replaceable>[/<replaceable class="parameter">src_masklen</replaceable>]
2339     [<replaceable class="parameter">dst_addr</replaceable>[/<replaceable class="parameter">dst_masklen</replaceable>]]
2340    </para>
2341    <para>
2342     Where <replaceable class="parameter">src_addr</replaceable> and 
2343    <replaceable class="parameter">dst_addr</replaceable> are IP addresses in dotted decimal notation or valid
2344     DNS names, and <replaceable class="parameter">src_masklen</replaceable> and
2345     <replaceable class="parameter">dst_masklen</replaceable> are subnet masks in CIDR notation, i.e. integer
2346     values from 2 to 30 representing the length (in bits) of the network address. The masks and the whole
2347     destination part are optional.
2348    </para>
2349   </listitem>
2350  </varlistentry>
2351  <varlistentry>
2352   <term>Default value:</term>
2353   <listitem>
2354    <para><emphasis>Unset</emphasis></para>
2355   </listitem>
2356  </varlistentry>
2357  <varlistentry>
2358   <term>Effect if unset:</term>
2359   <listitem>
2360    <para>
2361     Don't restrict access further than implied by <literal>listen-address</literal>
2362    </para>
2363   </listitem>
2364  </varlistentry>
2365  <varlistentry>
2366   <term>Notes:</term>
2367   <listitem>
2368    <para>
2369     Access controls are included at the request of ISPs and systems
2370     administrators, and <emphasis>are not usually needed by individual users</emphasis>.
2371     For a typical home user, it will normally suffice to ensure that 
2372     <application>Privoxy</application> only listens on the localhost
2373     (127.0.0.1) or internal (home) network address by means of the
2374     <link linkend="listen-address"><emphasis>listen-address</emphasis></link>
2375     option. 
2376    </para>
2377    <para>
2378     Please see the warnings in the FAQ that this proxy is not intended to be a substitute
2379     for a firewall or to encourage anyone to defer addressing basic security
2380     weaknesses.
2381    </para>
2382    <para>
2383     Multiple ACL lines are OK.
2384     If any ACLs are specified, then the <application>Privoxy</application>
2385     talks only to IP addresses that match at least one <literal>permit-access</literal> line
2386     and don't match any subsequent <literal>deny-access</literal> line. In other words, the
2387     last match wins, with the default being <literal>deny-access</literal>.
2388    </para>
2389    <para>
2390     If <application>Privoxy</application> is using a forwarder (see <literal>forward</literal> below)
2391     for a particular destination URL, the <replaceable class="parameter">dst_addr</replaceable>
2392     that is examined is the address of the forwarder and <emphasis>NOT</emphasis> the address
2393     of the ultimate target. This is necessary because it may be impossible for the local
2394     <application>Privoxy</application> to determine the IP address of the
2395     ultimate target (that's often what gateways are used for).
2396    </para>
2397    <para>
2398     You should prefer using IP addresses over DNS names, because the address lookups take
2399     time. All DNS names must resolve! You can <emphasis>not</emphasis> use domain patterns
2400     like <quote>*.org</quote> or partial domain names. If a DNS name resolves to multiple
2401     IP addresses, only the first one is used.
2402    </para>
2403    <para>
2404     Denying access to particular sites by ACL may have undesired side effects
2405     if the site in question is hosted on a machine which also hosts other sites.
2406    </para>
2407   </listitem>
2408  </varlistentry>
2409  <varlistentry>
2410   <term>Examples:</term>
2411   <listitem>
2412    <para>
2413     Explicitly define the default behavior if no ACL and
2414     <literal>listen-address</literal> are set: <quote>localhost</quote>
2415     is OK. The absence of a <replaceable class="parameter">dst_addr</replaceable> implies that
2416     <emphasis>all</emphasis> destination addresses are OK:
2417    </para>
2418    <para>
2419     <screen>
2420   permit-access  localhost
2421 </screen>
2422    </para>
2423    <para>
2424     Allow any host on the same class C subnet as www.privoxy.org access to
2425     nothing but www.example.com:
2426    </para>
2427    <para>
2428     <screen>
2429   permit-access  www.privoxy.org/24 www.example.com/32
2430 </screen>
2431    </para>
2432    <para>
2433     Allow access from any host on the 26-bit subnet 192.168.45.64 to anywhere,
2434     with the exception that 192.168.45.73 may not access www.dirty-stuff.example.com:
2435    </para>
2436    <para>
2437     <screen>
2438   permit-access  192.168.45.64/26
2439   deny-access    192.168.45.73    www.dirty-stuff.example.com
2440 </screen>
2441    </para>
2442   </listitem>
2443  </varlistentry>
2444 </variablelist>
2445 </sect3>
2446
2447 <sect3 renderas="sect4" id="buffer-limit"><title>buffer-limit</title>
2448
2449 <variablelist>
2450  <varlistentry>
2451   <term>Specifies:</term>
2452   <listitem>
2453    <para>
2454     Maximum size of the buffer for content filtering.
2455    </para>
2456   </listitem>
2457  </varlistentry>
2458  <varlistentry>
2459   <term>Type of value:</term>
2460   <listitem>
2461    <para>Size in Kbytes</para>
2462   </listitem>
2463  </varlistentry>
2464  <varlistentry>
2465   <term>Default value:</term>
2466   <listitem>
2467    <para>4096</para>
2468   </listitem>
2469  </varlistentry>
2470  <varlistentry>
2471   <term>Effect if unset:</term>
2472   <listitem>
2473    <para>
2474     Use a 4MB (4096 KB) limit.
2475    </para>
2476   </listitem>
2477  </varlistentry>
2478  <varlistentry>
2479   <term>Notes:</term>
2480   <listitem>
2481    <para>
2482     For content filtering, i.e. the <literal>+filter</literal> and
2483     <literal>+deanimate-gif</literal> actions, it is necessary that 
2484     <application>Privoxy</application> buffers the entire document body.
2485     This can be potentially dangerous, since a server could just keep sending
2486     data indefinitely and wait for your RAM to exhaust -- with nasty consequences.
2487     Hence this option.
2488    </para>
2489    <para>
2490     When a document buffer size reaches the <literal>buffer-limit</literal>, it is
2491     flushed to the client unfiltered and no further attempt to
2492     filter the rest of the document is made. Remember that there may be multiple threads
2493     running, which might require up to <literal>buffer-limit</literal> Kbytes
2494     <emphasis>each</emphasis>, unless you have enabled <quote>single-threaded</quote>
2495     above.
2496    </para>
2497   </listitem>
2498  </varlistentry>
2499 </variablelist>
2500 </sect3>
2501
2502 </sect2>
2503
2504 <!--  ~  End section  ~  -->
2505
2506
2507 <!--   ~~~~~       New section      ~~~~~     -->
2508
2509 <sect2 id="forwarding">
2510 <title>Forwarding</title>
2511
2512 <para>
2513  This feature allows routing of HTTP requests through a chain of
2514  multiple proxies.
2515  It can be used to better protect privacy and confidentiality when
2516  accessing specific domains by routing requests to those domains
2517  through an anonymous public proxy (see e.g. <ulink
2518  url="http://www.multiproxy.org/anon_list.htm">http://www.multiproxy.org/anon_list.htm</ulink>)
2519  Or to use a caching proxy to speed up browsing. Or chaining to a parent
2520  proxy may be necessary because the machine that <application>Privoxy</application>
2521  runs on has no direct Internet access.
2522 </para>
2523
2524 <para>
2525  Also specified here are SOCKS proxies. <application>Privoxy</application>
2526  supports the SOCKS 4 and SOCKS 4A protocols.
2527 </para>
2528
2529 <sect3 renderas="sect4" id="forward"><title>forward</title>
2530 <variablelist>
2531  <varlistentry>
2532   <term>Specifies:</term>
2533   <listitem>
2534    <para>
2535     To which parent HTTP proxy specific requests should be routed.
2536    </para>
2537   </listitem>
2538  </varlistentry>
2539  <varlistentry>
2540   <term>Type of value:</term>
2541   <listitem>
2542    <para>
2543     <replaceable class="parameter">target_domain</replaceable>[:<replaceable class="parameter">port</replaceable>]
2544     <replaceable class="parameter">http_parent</replaceable>[/<replaceable class="parameter">port</replaceable>]
2545    </para>
2546    <para>
2547     Where <replaceable class="parameter">target_domain</replaceable> is a domain name pattern (see the
2548     chapter on domain matching in the <filename>default.action</filename> file),
2549     <replaceable class="parameter">http_parent</replaceable> is the address of the parent HTTP proxy
2550     as an IP addresses in dotted decimal notation or as a valid DNS name (or <quote>.</quote> to denote
2551     <quote>no forwarding</quote>, and the optional 
2552     <replaceable class="parameter">port</replaceable> parameters are TCP ports, i.e. integer
2553     values from 1 to 64535
2554    </para>
2555   </listitem>
2556  </varlistentry>
2557  <varlistentry>
2558   <term>Default value:</term>
2559   <listitem>
2560    <para><emphasis>Unset</emphasis></para>
2561   </listitem>
2562  </varlistentry>
2563  <varlistentry>
2564   <term>Effect if unset:</term>
2565   <listitem>
2566    <para>
2567     Don't use parent HTTP proxies.
2568    </para>
2569   </listitem>
2570  </varlistentry>
2571  <varlistentry>
2572   <term>Notes:</term>
2573   <listitem>
2574    <para>
2575     If <replaceable class="parameter">http_parent</replaceable> is <quote>.</quote>, then requests are not
2576     forwarded to another HTTP proxy but are made directly to the web servers.
2577    </para>
2578    <para>
2579     Multiple lines are OK, they are checked in sequence, and the last match wins.
2580    </para>
2581   </listitem>
2582  </varlistentry>
2583  <varlistentry>
2584   <term>Examples:</term>
2585   <listitem>
2586    <para>
2587     Everything goes to an example anonymizing proxy, except SSL on port 443 (which it doesn't handle):
2588    </para>
2589    <para>
2590     <screen>
2591   forward   .*     anon-proxy.example.org:8080
2592   forward   :443   .
2593 </screen>
2594    </para>
2595    <para>
2596     Everything goes to our example ISP's caching proxy, except for requests
2597     to that ISP's sites:
2598    </para>
2599    <para>
2600     <screen>
2601   forward   .*.                caching-proxy.example-isp.net:8000
2602   forward   .example-isp.net   .
2603 </screen>
2604    </para>
2605   </listitem>
2606  </varlistentry>
2607 </variablelist>
2608 </sect3>
2609
2610 <sect3 renderas="sect4" id="socks"><title>
2611 forward-socks4 and forward-socks4a</title>
2612 <anchor id="forward-socks4">
2613 <anchor id="forward-socks4a">
2614
2615 <variablelist>
2616  <varlistentry>
2617   <term>Specifies:</term>
2618   <listitem>
2619    <para>
2620     Through which SOCKS proxy (and to which parent HTTP proxy) specific requests should be routed.
2621    </para>
2622   </listitem>
2623  </varlistentry>
2624  <varlistentry>
2625   <term>Type of value:</term>
2626   <listitem>
2627    <para>
2628     <replaceable class="parameter">target_domain</replaceable>[:<replaceable class="parameter">port</replaceable>]
2629     <replaceable class="parameter">socks_proxy</replaceable>[/<replaceable class="parameter">port</replaceable>]
2630     <replaceable class="parameter">http_parent</replaceable>[/<replaceable class="parameter">port</replaceable>]
2631    </para>
2632    <para>
2633     Where <replaceable class="parameter">target_domain</replaceable> is a domain name pattern (see the
2634     chapter on domain matching in the <filename>default.action</filename> file),
2635     <replaceable class="parameter">http_parent</replaceable> and <replaceable class="parameter">socks_proxy</replaceable>
2636     are IP addresses in dotted decimal notation or valid DNS names (<replaceable class="parameter">http_parent</replaceable>
2637     may be <quote>.</quote> to denote <quote>no HTTP forwarding</quote>), and the optional 
2638     <replaceable class="parameter">port</replaceable> parameters are TCP ports, i.e. integer values from 1 to 64535
2639    </para>
2640   </listitem>
2641  </varlistentry>
2642  <varlistentry>
2643   <term>Default value:</term>
2644   <listitem>
2645    <para><emphasis>Unset</emphasis></para>
2646   </listitem>
2647  </varlistentry>
2648  <varlistentry>
2649   <term>Effect if unset:</term>
2650   <listitem>
2651    <para>
2652     Don't use SOCKS proxies.
2653    </para>
2654   </listitem>
2655  </varlistentry>
2656  <varlistentry>
2657   <term>Notes:</term>
2658   <listitem>
2659    <para>
2660     Multiple lines are OK, they are checked in sequence, and the last match wins.
2661    </para>
2662    <para>
2663     The difference between <literal>forward-socks4</literal> and <literal>forward-socks4a</literal>
2664     is that in the SOCKS 4A protocol, the DNS resolution of the target hostname happens on the SOCKS
2665     server, while in SOCKS 4 it happens locally.
2666    </para>
2667    <para>
2668     If <replaceable class="parameter">http_parent</replaceable> is <quote>.</quote>, then requests are not
2669     forwarded to another HTTP proxy but are made (HTTP-wise) directly to the web servers, albeit through
2670     a SOCKS proxy.
2671    </para>
2672   </listitem>
2673  </varlistentry>
2674  <varlistentry>
2675   <term>Examples:</term>
2676   <listitem>
2677    <para>
2678      From the company example.com, direct connections are made to all
2679      <quote>internal</quote> domains, but everything outbound goes through
2680      their ISP's proxy by way of example.com's corporate SOCKS 4A gateway to
2681      the Internet.
2682    </para>
2683    <para>
2684     <screen>
2685   forward-socks4a   .*.            socks-gw.example.com:1080  www-cache.example-isp.net:8080
2686   forward           .example.com   .
2687 </screen>
2688    </para>
2689    <para>
2690     A rule that uses a SOCKS 4 gateway for all destinations but no HTTP parent looks like this:
2691    </para>
2692    <para>
2693     <screen>
2694   forward-socks4   .*.            socks-gw.example.com:1080  .
2695 </screen>
2696    </para>
2697   </listitem>
2698  </varlistentry>
2699 </variablelist>
2700 </sect3>
2701
2702 <sect3 renderas="sect4" id="advanced-forwarding-examples"><title>Advanced Forwarding Examples</title>
2703
2704 <para>
2705  If you have links to multiple ISPs that provide various special content 
2706  only to their subscribers, you can configure multiple <application>Privoxies</application>
2707  which have connections to the respective ISPs to act as forwarders to each other, so that
2708  <emphasis>your</emphasis> users can see the internal content of all ISPs.
2709 </para>
2710
2711 <para>
2712  Assume that host-a has a PPP connection to isp-a.net. And host-b has a PPP connection to
2713  isp-b.net. Both run <application>Privoxy</application>. Their forwarding
2714  configuration can look like this:
2715 </para>
2716
2717 <para>
2718  host-a:
2719 </para>
2720
2721 <para>
2722  <screen>
2723   forward    .*.         .
2724   forward    .isp-b.net  host-b:8118
2725 </screen>
2726 </para>
2727
2728 <para>
2729  host-b:
2730 </para>
2731
2732 <para>
2733  <screen>
2734   forward    .*.         .
2735   forward    .isp-a.net  host-a:8118
2736 </screen>
2737 </para>
2738
2739 <para>
2740  Now, your users can set their browser's proxy to use either
2741  host-a or host-b and be able to browse the internal content
2742  of both isp-a and isp-b.
2743 </para>
2744
2745 <para>
2746  If you intend to chain <application>Privoxy</application> and 
2747  <application>squid</application> locally, then chain as 
2748  <literal>browser -> squid -> privoxy</literal> is the recommended way. 
2749 </para>
2750
2751 <para>
2752  Assuming that <application>Privoxy</application> and <application>squid</application>
2753  run on the same box, your squid configuration could then look like this:
2754 </para>
2755
2756 <para>
2757  <screen>
2758   # Define Privoxy as parent proxy (without ICP) 
2759   cache_peer 127.0.0.1 parent 8118 7 no-query 
2760
2761   # Define ACL for protocol FTP 
2762   acl ftp proto FTP 
2763
2764   # Do not forward FTP requests to Privoxy
2765   always_direct allow ftp 
2766
2767   # Forward all the rest to Privoxy
2768   never_direct allow all</screen>
2769 </para>
2770
2771 <para>
2772  You would then need to change your browser's proxy settings to <application>squid</application>'s address and port.
2773  Squid normally uses port 3128. If unsure consult <literal>http_port</literal> in <filename>squid.conf</filename>.
2774 </para>
2775
2776 </sect3>
2777
2778 </sect2>
2779
2780 <!--  ~  End section  ~  -->
2781
2782
2783 <!--   ~~~~~       New section      ~~~~~     -->
2784
2785 <sect2 id="windows-gui">
2786 <title>Windows GUI Options</title>
2787 <para>
2788  <application>Privoxy</application> has a number of options specific to the
2789  Windows GUI interface:
2790 </para>
2791
2792 <anchor id="activity-animation">
2793 <para>
2794  If <quote>activity-animation</quote> is set to 1, the
2795  <application>Privoxy</application> icon will animate when
2796  <quote>Privoxy</quote> is active. To turn off, set to 0.
2797 </para>
2798
2799 <para>
2800  <literal>
2801   <msgtext> 
2802    <literallayout>
2803   <emphasis>activity-animation   1</emphasis>
2804    </literallayout>
2805   </msgtext> 
2806  </literal>
2807 </para>
2808
2809 <anchor id="log-messages">
2810 <para>
2811  If <quote>log-messages</quote> is set to 1,
2812  <application>Privoxy</application> will log messages to the console
2813  window:
2814 </para>
2815
2816 <para>
2817  <literal>
2818   <msgtext> 
2819    <literallayout>
2820   <emphasis>log-messages       1</emphasis>
2821    </literallayout>
2822   </msgtext> 
2823  </literal>
2824 </para>
2825
2826 <anchor id="log-buffer-size">
2827 <para> 
2828  If <quote>log-buffer-size</quote> is set to 1, the size of the log buffer,
2829  i.e. the amount of memory used for the log messages displayed in the
2830  console window, will be limited to <quote>log-max-lines</quote> (see below).
2831 </para>
2832
2833 <para>
2834  Warning: Setting this to 0 will result in the buffer to grow infinitely and
2835  eat up all your memory!
2836 </para>
2837
2838 <para>
2839  <literal>
2840   <msgtext> 
2841    <literallayout>
2842   <emphasis>log-buffer-size      1</emphasis>
2843    </literallayout>
2844   </msgtext> 
2845  </literal>
2846 </para>
2847
2848 <anchor id="log-max-lines">
2849 <para>
2850  <application>log-max-lines</application> is the maximum number of lines held
2851  in the log buffer. See above.
2852 </para>
2853
2854 <para>
2855  <literal>
2856   <msgtext> 
2857    <literallayout>
2858   <emphasis>log-max-lines      200</emphasis>
2859    </literallayout>
2860   </msgtext> 
2861  </literal>
2862 </para>
2863
2864 <anchor id="log-highlight-messages">
2865 <para>
2866  If <quote>log-highlight-messages</quote> is set to 1,
2867  <application>Privoxy</application> will highlight portions of the log
2868  messages with a bold-faced font:
2869 </para>
2870
2871 <para>
2872  <literal>
2873   <msgtext> 
2874    <literallayout>
2875   <emphasis>log-highlight-messages   1</emphasis>
2876    </literallayout>
2877   </msgtext> 
2878  </literal>
2879 </para>
2880
2881 <anchor id="log-font-name">
2882 <para>
2883  The font used in the console window:
2884 </para>
2885
2886 <para>
2887  <literal>
2888   <msgtext> 
2889    <literallayout>
2890   <emphasis>log-font-name        Comic Sans MS</emphasis>
2891    </literallayout>
2892   </msgtext> 
2893  </literal>
2894 </para>
2895
2896 <anchor id="log-font-size">
2897 <para>
2898  Font size used in the console window:
2899 </para>
2900
2901 <para>
2902  <literal>
2903   <msgtext> 
2904    <literallayout>
2905   <emphasis>log-font-size        8</emphasis>
2906    </literallayout>
2907   </msgtext> 
2908  </literal>
2909 </para>
2910
2911 <anchor id="show-on-task-bar">
2912 <para>  
2913  <quote>show-on-task-bar</quote> controls whether or not
2914  <application>Privoxy</application> will appear as a button on the Task bar
2915  when minimized:
2916 </para>
2917
2918 <para>
2919  <literal>
2920   <msgtext> 
2921    <literallayout>
2922   <emphasis>show-on-task-bar     0</emphasis>
2923    </literallayout>
2924   </msgtext> 
2925  </literal>
2926 </para>
2927
2928 <anchor id="close-button-minimizes">
2929 <para>
2930  If <quote>close-button-minimizes</quote> is set to 1, the Windows close
2931  button will minimize <application>Privoxy</application> instead of closing
2932  the program (close with the exit option on the File menu).
2933 </para>
2934
2935 <para>
2936  <literal>
2937   <msgtext> 
2938    <literallayout>
2939   <emphasis>close-button-minimizes  1</emphasis>
2940    </literallayout>
2941   </msgtext> 
2942  </literal>
2943 </para>
2944
2945 <anchor id="hide-console">
2946 <para>
2947  The <quote>hide-console</quote> option is specific to the MS-Win console
2948  version of <application>Privoxy</application>. If this option is used,
2949  <application>Privoxy</application> will disconnect from and hide  the
2950  command console.
2951 </para>
2952
2953 <para>
2954  <literal>
2955   <msgtext> 
2956    <literallayout>
2957   #<emphasis>hide-console</emphasis>
2958    </literallayout>
2959   </msgtext> 
2960  </literal>
2961 </para>
2962
2963 </sect2>
2964 </sect1>
2965
2966 <!--  ~  End section  ~  -->
2967
2968
2969
2970 <!--   ~~~~~~~~       New section Header    ~~~~~~~~~     -->
2971
2972 <sect1 id="actions-file"><title>Actions Files</title>
2973
2974 <para>
2975  The actions files are used to define what actions
2976  <application>Privoxy</application> takes for which URLs, and thus determine
2977  how ad images, cookies and various other aspects of HTTP content and
2978  transactions are handled, and on which sites (or even parts thereof). There 
2979  are three such files included with <application>Privoxy</application> (as of 
2980  version 2.9.15), with differing purposes:
2981  </para>
2982  
2983  <para>
2984   <itemizedlist>
2985    <listitem>
2986     <para>
2987      <filename>default.action</filename> - is the primary action file 
2988      that sets the initial values for all actions. It is intended to 
2989      provide a base level of functionality for
2990      <application>Privoxy's</application> array of features. So it is 
2991      a set of broad rules that should work reasonably well for users everywhere.
2992      This is the file that the developers are keeping updated, and making 
2993      available to users.
2994     </para>
2995    </listitem> 
2996    <listitem>
2997     <para>
2998      <filename>user.action</filename> - is intended to be for local site 
2999      preferences and exceptions. As an example, if your ISP or your bank
3000      has specific requirements, and need special handling, this kind of 
3001      thing should go here. This file will not be upgraded.
3002     </para>
3003   </listitem> 
3004    <listitem>
3005     <para>
3006      <filename>standard.action</filename> - is used by the web based editor, 
3007      to set various pre-defined sets of rules for the default actions section
3008      in <filename>default.action</filename>. These have increasing levels of
3009      aggressiveness <emphasis>and have no influence on your browsing unless
3010      you select them explicitly in the editor</emphasis>. It is not recommend
3011      to edit this file.
3012     </para>
3013    </listitem> 
3014   </itemizedlist>
3015  </para> 
3016
3017 <para>
3018  The list of actions files to be used are defined in the main configuration 
3019  file, and are processed in the order they are defined. The content of these
3020  can all be viewed and edited from <ulink
3021  url="http://config.privoxy.org/show-status">http://config.privoxy.org/show-status</ulink>.
3022 </para>
3023
3024 <para>
3025  An actions file typically has multiple sections. If you want to use
3026  <quote>aliases</quote> in an actions file, you have to place the (optional)
3027  <link linkend="aliases">alias section</link> at the top of that file.
3028  Then comes the default set of rules which will apply universally to all
3029  sites and pages (be <emphasis>very careful</emphasis> with using such a
3030  universal set in <filename>user.action</filename> or any other actions file after 
3031  <filename>default.action</filename>, because it will override the result
3032  from consulting any previous file). And then below that,
3033  exceptions to the defined universal policies. You can regard
3034  <filename>user.action</filename> as an appendix to <filename>default.action</filename>,
3035  with the advantage that is a separate file, which makes preserving your
3036  personal settings across <application>Privoxy</application> upgrades easier.
3037 </para>
3038
3039 <para> 
3040  Actions can be used to block anything you want, including ads, banners, or
3041  just some obnoxious URL that you would rather not see. Cookies can be accepted
3042  or rejected, or accepted only during the current browser session (i.e. not
3043  written to disk), content can be modified, JavaScripts tamed, user-tracking
3044  fooled, and much more. See below for a <link linkend="actions">complete list
3045  of actions</link>.
3046 </para>
3047
3048 <!--   ~~~~~       New section      ~~~~~     -->
3049 <sect2>
3050 <title>Finding the Right Mix</title>
3051 <para>
3052  Note that some <link linkend="actions">actions</link>, like cookie suppression
3053  or script disabling, may render some sites unusable that rely on these
3054  techniques to work properly. Finding the right mix of actions is not always easy and
3055  certainly a matter of personal taste. In general, it can be said that the more
3056  <quote>aggressive</quote> your default settings (in the top section of the
3057  actions file) are, the more exceptions for <quote>trusted</quote> sites you
3058  will have to make later. If, for example, you want to kill popup windows per
3059  default, you'll have to make exceptions from that rule for sites that you
3060  regularly use and that require popups for actually useful content, like maybe
3061  your bank, favorite shop, or newspaper.
3062 </para>
3063
3064 <para>
3065  We have tried to provide you with reasonable rules to start from in the
3066  distribution actions files. But there is no general rule of thumb on these
3067  things. There just are too many variables, and sites are constantly changing.
3068  Sooner or later you will want to change the rules (and read this chapter again :).
3069 </para>
3070 </sect2>
3071
3072 <!--   ~~~~~       New section      ~~~~~     -->
3073 <sect2>
3074 <title>How to Edit</title>
3075 <para>
3076  The easiest way to edit the actions files is with a browser by
3077  using our browser-based editor, which can be reached from <ulink
3078  url="http://config.privoxy.org/show-status">http://config.privoxy.org/show-status</ulink>.
3079  The editor allows both fine-grained control over every single feature on a
3080  per-URL basis, and easy choosing from wholesale sets of defaults like
3081  <quote>Cautious</quote>, <quote>Medium</quote> or <quote>Advanced</quote>.
3082 </para>
3083
3084 <para>
3085  If you prefer plain text editing to GUIs, you can of course also directly edit the
3086  the actions files. Look at <filename>default.action</filename> which is richly
3087  commented.
3088 </para>
3089 </sect2>
3090
3091
3092 <sect2 id="actions-apply">
3093 <title>How Actions are Applied to URLs</title>
3094 <para>
3095  Actions files are divided into sections. There are special sections,
3096  like the <quote><link linkend="aliases">alias</link></quote> sections which will be discussed later. For now
3097  let's concentrate on regular sections: They have a heading line (often split
3098  up to multiple lines for readability) which consist of a list of actions,
3099  separated by whitespace and enclosed in curly braces. Below that, there
3100  is a list of URL patterns, each on a separate line.
3101 </para>
3102
3103 <para>
3104  To determine which actions apply to a request, the URL of the request is
3105  compared to all patterns in each action file file. Every time it matches, the list of
3106  applicable actions for the URL is incrementally updated, using the heading
3107  of the section in which the pattern is located. If multiple matches for
3108  the same URL set the same action differently, the last match wins. If not, 
3109  the effects are aggregated (e.g. a URL might match both the 
3110  <ulink url="actions-file.html#HANDLE-AS-IMAGE"><quote>+handle-as-image</quote></ulink>
3111  and <ulink url="actions-file.html#BLOCK"><quote>+block</quote></ulink> actions).
3112  
3113 </para>
3114
3115 <para>
3116  You can trace this process for any given URL by visiting <ulink
3117  url="http://config.privoxy.org/show-url-info">http://config.privoxy.org/show-url-info</ulink>.
3118 </para>
3119
3120 <para>
3121  More detail on this is provided in the Appendix, <link linkend="ACTIONSANAT">
3122  Anatomy of an Action</link>.
3123 </para>
3124 </sect2>
3125
3126 <!--   ~~~~~       New section      ~~~~~     -->
3127 <sect2 id="af-patterns">
3128 <title>Patterns</title>
3129 <para>
3130  Generally, a pattern has the form <literal>&lt;domain&gt;/&lt;path&gt;</literal>,
3131  where both the <literal>&lt;domain&gt;</literal> and <literal>&lt;path&gt;</literal>
3132  are optional. (This is why the pattern <literal>/</literal> matches all URLs).
3133 </para>
3134
3135 <variablelist>
3136  <varlistentry>
3137   <term><literal>www.example.com/</literal></term>
3138   <listitem>
3139    <para>
3140     is a domain-only pattern and will match any request to <literal>www.example.com</literal>,
3141     regardless of which document on that server is requested.
3142    </para>
3143   </listitem>
3144  </varlistentry>
3145  <varlistentry>
3146   <term><literal>www.example.com</literal></term>
3147   <listitem>
3148    <para>
3149     means exactly the same. For domain-only patterns, the trailing <literal>/</literal> may
3150     be omitted.
3151    </para>
3152   </listitem>
3153  </varlistentry>
3154  <varlistentry>
3155   <term><literal>www.example.com/index.html</literal></term>
3156   <listitem>
3157    <para>
3158     matches only the single document <literal>/index.html</literal>
3159     on <literal>www.example.com</literal>.
3160    </para>
3161   </listitem>
3162  </varlistentry>
3163  <varlistentry>
3164   <term><literal>/index.html</literal></term>
3165   <listitem>
3166    <para>
3167     matches the document <literal>/index.html</literal>, regardless of the domain,
3168     i.e. on <emphasis>any</emphasis> web server.
3169    </para>
3170   </listitem>
3171  </varlistentry>
3172  <varlistentry>
3173   <term><literal>index.html</literal></term>
3174   <listitem>
3175    <para>
3176     matches nothing, since it would be  interpreted as a domain name and
3177     there is no top-level domain called <literal>.html</literal>.
3178    </para>
3179   </listitem>
3180  </varlistentry>
3181 </variablelist>
3182
3183
3184 <!--   ~~~~~       New section      ~~~~~     -->
3185 <sect3><title>The Domain Pattern</title>
3186
3187 <para>
3188  The matching of the domain part offers some flexible options: if the
3189  domain starts or ends with a dot, it becomes unanchored at that end. 
3190  For example:
3191 </para>
3192
3193 <variablelist>
3194  <varlistentry>
3195   <term><literal>.example.com</literal></term>
3196   <listitem>
3197    <para>
3198     matches any domain that <emphasis>ENDS</emphasis> in
3199     <literal>.example.com</literal>
3200    </para>
3201   </listitem>
3202  </varlistentry>
3203  <varlistentry>
3204   <term><literal>www.</literal></term>
3205   <listitem>
3206    <para>
3207     matches any domain that <emphasis>STARTS</emphasis> with
3208     <literal>www.</literal>
3209    </para>
3210   </listitem>
3211  </varlistentry>
3212  <varlistentry>
3213   <term><literal>.example.</literal></term>
3214   <listitem>
3215    <para>
3216     matches any domain that <emphasis>CONTAINS</emphasis> <literal>.example.</literal>
3217     (Correctly speaking: It matches any FQDN that contains <literal>example</literal> as a domain.)
3218    </para>
3219   </listitem>
3220  </varlistentry>
3221 </variablelist>
3222
3223 <para>
3224  Additionally, there are wild-cards that you can use in the domain names
3225  themselves. They work pretty similar to shell wild-cards: <quote>*</quote>
3226  stands for zero or more arbitrary characters, <quote>?</quote> stands for
3227  any single character, you can define character classes in square
3228  brackets and all of that can be freely mixed:
3229 </para>
3230
3231 <variablelist>
3232  <varlistentry>
3233   <term><literal>ad*.example.com</literal></term>
3234   <listitem>
3235    <para>
3236     matches <quote>adserver.example.com</quote>, 
3237     <quote>ads.example.com</quote>, etc but not <quote>sfads.example.com</quote>
3238    </para>
3239   </listitem>
3240  </varlistentry>
3241  <varlistentry>
3242   <term><literal>*ad*.example.com</literal></term>
3243   <listitem>
3244    <para>
3245     matches all of the above, and then some.
3246    </para>
3247   </listitem>
3248  </varlistentry>
3249  <varlistentry>
3250   <term><literal>.?pix.com</literal></term>
3251   <listitem>
3252    <para>
3253     matches <literal>www.ipix.com</literal>,
3254     <literal>pictures.epix.com</literal>, <literal>a.b.c.d.e.upix.com</literal> etc. 
3255    </para>
3256   </listitem>
3257  </varlistentry>
3258  <varlistentry>
3259   <term><literal>www[1-9a-ez].example.c*</literal></term>
3260   <listitem>
3261    <para>
3262      matches <literal>www1.example.com</literal>, 
3263      <literal>www4.example.cc</literal>, <literal>wwwd.example.cy</literal>, 
3264      <literal>wwwz.example.com</literal> etc., but <emphasis>not</emphasis> 
3265      <literal>wwww.example.com</literal>.
3266    </para>
3267   </listitem>
3268  </varlistentry>
3269 </variablelist>
3270
3271 </sect3>
3272
3273 <!--  ~  End section  ~  -->
3274
3275
3276 <!--   ~~~~~       New section      ~~~~~     -->
3277 <sect3><title>The Path Pattern</title>
3278
3279 <para>
3280  <application>Privoxy</application> uses Perl compatible regular expressions
3281  (through the <ulink url="http://www.pcre.org/">PCRE</ulink> library) for
3282  matching the path.
3283 </para>
3284
3285 <para>
3286  There is an <link linkend="regex">Appendix</link> with a brief quick-start into regular
3287  expressions, and full (very technical) documentation on PCRE regex syntax is available on-line
3288  at <ulink url="http://www.pcre.org/man.txt">http://www.pcre.org/man.txt</ulink>.
3289  You might also find the Perl man page on regular expressions (<literal>man perlre</literal>)
3290  useful, which is available on-line at <ulink
3291  url="http://www.perldoc.com/perl5.6/pod/perlre.html">http://www.perldoc.com/perl5.6/pod/perlre.html</ulink>.
3292 </para>
3293
3294 <para>
3295  Note that the path pattern is automatically left-anchored at the <quote>/</quote>,
3296  i.e. it matches as if it would start with a <quote>^</quote> (regular expression speak 
3297  for the beginning of a line).
3298 </para>
3299
3300 <para>
3301  Please also note that matching in the path is case
3302  <emphasis>INSENSITIVE</emphasis> by default, but you can switch to case
3303  sensitive at any point in the pattern by using the 
3304  <quote>(?-i)</quote> switch:
3305  <literal>www.example.com/(?-i)PaTtErN.*</literal> will match only
3306  documents whose path starts with <literal>PaTtErN</literal> in
3307  <emphasis>exactly</emphasis> this capitalization.
3308 </para>
3309 </sect3>
3310
3311 </sect2>
3312
3313 <!--  ~  End section  ~  -->
3314
3315
3316 <!--   ~~~~~       New section      ~~~~~     -->
3317
3318 <sect2 id="actions">
3319 <title>Actions</title>
3320 <para>
3321  All actions are disabled by default, until they are explicitly enabled
3322  somewhere in an actions file. Actions are turned on if preceded with a
3323  <quote>+</quote>, and turned off if preceded with a <quote>-</quote>. So a
3324  <literal>+action</literal> means <quote>do that action</quote>, e.g.
3325  <literal>+block</literal> means <quote>please block URLs that match the
3326  following patterns</quote>, and <literal>-block</literal> means <quote>don't
3327  block URLs that match the following patterns, even if <literal>+block</literal>
3328  previously applied.</quote>
3329
3330 </para>
3331
3332 <para> 
3333  Again, actions are invoked by placing them on a line, enclosed in curly braces and
3334  separated by whitespace, like in 
3335  <literal>{+some-action -some-other-action{some-parameter}}</literal>,
3336  followed by a list of URL patterns, one per line, to which they apply.
3337  Together, the actions line and the following pattern lines make up a section
3338  of the actions file. 
3339 </para>
3340
3341 <para> 
3342  There are three classes of actions:
3343 </para>
3344
3345 <para>
3346  <itemizedlist>
3347  <listitem>
3348   <para>  
3349    Boolean, i.e the action can only be <quote>enabled</quote> or
3350    <quote>disabled</quote>. Syntax:
3351   </para>
3352   <para>
3353    <screen>
3354   +<replaceable class="function">name</replaceable>        # enable action <replaceable class="parameter">name</replaceable>
3355   -<replaceable class="function">name</replaceable>        # disable action <replaceable class="parameter">name</replaceable></screen>
3356   </para>
3357   <para>  
3358    Example: <literal>+block</literal>
3359   </para>
3360  </listitem>
3361
3362
3363  <listitem>
3364   <para>  
3365    Parameterized, where some value is required in order to enable this type of action.
3366    Syntax:
3367   </para>
3368   <para>
3369    <screen>
3370   +<replaceable class="function">name</replaceable>{<replaceable class="parameter">param</replaceable>}  # enable action and set parameter to <replaceable class="parameter">param</replaceable>,
3371                # overwriting parameter from previous match if necessary
3372   -<replaceable class="function">name</replaceable>         # disable action. The parameter can be omitted</screen>
3373   </para>
3374   <para>
3375    Note that if the URL matches multiple positive forms of a parameterized action,
3376    the last match wins, i.e. the params from earlier matches are simply ignored.
3377   </para>
3378   <para>  
3379    Example: <literal>+hide-user-agent{ Mozilla 1.0 }</literal>
3380   </para>
3381  </listitem>
3382  
3383  <listitem>
3384   <para>  
3385    Multi-value. These look exactly like parameterized actions,
3386    but they behave differently: If the action applies multiple times to the
3387    same URL, but with different parameters, <emphasis>all</emphasis> the parameters
3388    from <emphasis>all</emphasis> matches are remembered. This is used for actions
3389    that can be executed for the same request repeatedly, like adding multiple
3390    headers, or filtering through multiple filters. Syntax:
3391   </para>
3392   <para>
3393    <screen>
3394   +<replaceable class="function">name</replaceable>{<replaceable class="parameter">param</replaceable>}   # enable action and add <replaceable class="parameter">param</replaceable> to the list of parameters
3395   -<replaceable class="function">name</replaceable>{<replaceable class="parameter">param</replaceable>}   # remove the parameter <replaceable class="parameter">param</replaceable> from the list of parameters
3396                 # If it was the last one left, disable the action.
3397   <replaceable class="parameter">-name</replaceable>          # disable this action completely and remove all parameters from the list</screen>
3398   </para>
3399   <para>  
3400    Examples: <literal>+add-header{X-Fun-Header: Some text}</literal> and
3401    <literal>+filter{html-annoyances}</literal>
3402   </para>
3403  </listitem>
3404
3405  </itemizedlist>
3406 </para>
3407
3408 <para>
3409  If nothing is specified in any actions file, no <quote>actions</quote> are
3410  taken. So in this case <application>Privoxy</application> would just be a
3411  normal, non-blocking, non-anonymizing proxy. You must specifically enable the
3412  privacy and blocking features you need (although the provided default actions
3413  files will give a good starting point).
3414 </para>
3415
3416 <para>
3417  Later defined actions always over-ride earlier ones.  So exceptions 
3418  to any rules you make, should come in the latter part of the file (or 
3419  in a file that is processed later when using multiple actions files). For
3420  multi-valued actions, the actions are applied in the order they are specified.
3421  Actions files are processed in the order they are defined in
3422  <filename>config</filename> (the default installation has three actions
3423  files). It also quite possible for any given URL pattern to match more than
3424  one pattern and thus more than one set of actions!
3425 </para>
3426
3427 <!-- start actions listing -->
3428 <para>
3429  The list of valid <application>Privoxy</application> actions are:
3430 </para>
3431
3432
3433 <!-- ********************************************************** -->
3434 <!-- Please note the below defined actions use id's that are    -->
3435 <!-- probably linked from other places, so please don't change. -->
3436 <!--                                                            -->
3437 <!-- ********************************************************** -->
3438
3439
3440 <!--   ~~~~~       New section      ~~~~~     -->
3441
3442 <sect3 renderas="sect4" id="add-header">
3443 <title><emphasis>add-header</emphasis></title>
3444
3445 <variablelist>
3446  <varlistentry>
3447   <term>Typical use:</term>
3448   <listitem>
3449    <para>Confuse log analysis, custom applications</para>
3450   </listitem>
3451  </varlistentry>
3452
3453  <varlistentry>
3454   <term>Effect:</term>
3455   <listitem>
3456    <para>
3457     Sends a user defined HTTP header to the web server.
3458    </para>
3459   </listitem>
3460  </varlistentry>
3461
3462  <varlistentry>
3463   <term>Type:</term>
3464   <!-- boolean, parameterized, Multi-value -->
3465   <listitem>
3466    <para>Multi-value.</para>
3467   </listitem>
3468  </varlistentry>
3469  
3470  <varlistentry>
3471   <term>Parameter:</term>
3472   <listitem>
3473    <para>
3474     Any string value is possible. Validity of the defined HTTP headers is not checked.
3475     It is recommended that you use the <quote><literal>X-</literal></quote> prefix
3476     for custom headers.
3477    </para>
3478   </listitem>
3479  </varlistentry>
3480  
3481 <varlistentry>
3482   <term>Notes:</term>
3483   <listitem>
3484    <para>
3485     This action may be specified multiple times, in order to define multiple 
3486     headers. This is rarely needed for the typical user. If you don't know what 
3487     <quote>HTTP headers</quote> are, you definitely don't need to worry about this 
3488     one.
3489    </para>
3490   </listitem>
3491  </varlistentry>
3492
3493  <varlistentry>
3494   <term>Example usage:</term>
3495   <listitem>
3496     <para>
3497      <screen>+add-header{X-User-Tracking: sucks}</screen>
3498    </para>
3499   </listitem>
3500  </varlistentry>
3501 </variablelist>
3502 </sect3>
3503
3504
3505 <!--   ~~~~~       New section      ~~~~~     -->
3506 <sect3 renderas="sect4" id="block">
3507 <title><emphasis>block</emphasis></title>
3508
3509 <variablelist>
3510  <varlistentry>
3511   <term>Typical use:</term>
3512   <listitem>
3513    <para>Block ads or other obnoxious content</para>
3514   </listitem>
3515  </varlistentry>
3516
3517  <varlistentry>
3518   <term>Effect:</term>
3519   <listitem>
3520    <para>
3521     Requests for URLs to which this action applies are blocked, i.e. the requests are not
3522     forwarded to the remote server, but answered locally with a substitute page or image,
3523     as determined by the <literal><link linkend="handle-as-image">handle-as-image</link></literal>
3524     and <literal><link linkend="set-image-blocker">set-image-blocker</link></literal> actions.
3525    </para>
3526   </listitem>
3527  </varlistentry>
3528
3529  <varlistentry>
3530   <term>Type:</term>
3531   <!-- boolean, parameterized, Multi-value -->
3532   <listitem>
3533    <para>Boolean.</para>
3534   </listitem>
3535  </varlistentry>
3536
3537  <varlistentry>
3538   <term>Parameter:</term>
3539   <listitem>
3540    <para>N/A</para>
3541   </listitem>
3542  </varlistentry>
3543  
3544 <varlistentry>
3545   <term>Notes:</term>
3546   <listitem>
3547    <para>
3548     <application>Privoxy</application> sends a special <quote>BLOCKED</quote> page
3549     for requests to blocked pages. This page contains links to find out why the request
3550     was blocked, and a click-through to the blocked content (the latter only if compiled with the
3551     force feature enabled). The <quote>BLOCKED</quote> page adapts to the available
3552     screen space -- it displays full-blown if space allows, or miniaturized and text-only
3553     if loaded into a small frame or window. If you are using <application>Privoxy</application>
3554     right now, you can take a look at the 
3555     <ulink url="http://ads.bannerserver.example.com/nasty-ads/sponsor.html"><quote>BLOCKED</quote>
3556     page</ulink>.
3557    </para>
3558    <para> 
3559     A very important exception occurs if <emphasis>both</emphasis> 
3560     <literal>block</literal> and <literal><link linkend="handle-as-image">handle-as-image</link></literal>,
3561     apply to the same request: it will then be replaced by an image. If 
3562     <literal><link linkend="set-image-blocker">set-image-blocker</link></literal>
3563     (see below) also applies, the type of image will be determined by its parameter,
3564     if not, the standard checkerboard pattern is sent.
3565    </para>
3566    <para>
3567     It is important to understand this process, in order 
3568     to understand how <application>Privoxy</application> deals with 
3569     ads and other unwanted content.
3570    </para>
3571    <para>
3572     The <literal><link linkend="filter">filter</link></literal>
3573     action can perform a very similar task, by <quote>blocking</quote>
3574     banner images and other content through rewriting the relevant URLs in the
3575     document's HTML source, so they don't get requested in the first place.
3576     Note that this is a totally different technique, and it's easy to confuse the two.
3577    </para>
3578   </listitem>
3579  </varlistentry>
3580
3581  <varlistentry>
3582   <term>Example usage (section):</term>
3583   <listitem>
3584     <para>
3585      <screen>{+block}      # Block and replace with "blocked" page
3586 .nasty-stuff.example.com
3587
3588 {+block +handle-as-image} # Block and replace with image
3589 .ad.doubleclick.net
3590 .ads.r.us</screen>
3591     </para>
3592   </listitem>
3593  </varlistentry>
3594
3595
3596 </variablelist>
3597 </sect3>
3598
3599 <!--   ~~~~~       New section      ~~~~~     -->
3600 <sect3 renderas="sect4" id="crunch-incoming-cookies">
3601 <title><emphasis>crunch-incoming-cookies</emphasis></title>
3602
3603 <variablelist>
3604  <varlistentry>
3605   <term>Typical use:</term>
3606   <listitem>
3607    <para>
3608     Prevent the web server from setting any cookies on your system
3609    </para>
3610   </listitem>
3611  </varlistentry>
3612
3613  <varlistentry>
3614   <term>Effect:</term>
3615   <listitem>
3616    <para>
3617     Deletes any <quote>Set-Cookie:</quote> HTTP headers from server replies.
3618    </para>
3619   </listitem>
3620  </varlistentry>
3621
3622  <varlistentry>
3623   <term>Type:</term>
3624   <!-- Boolean, Parameterized, Multi-value -->
3625   <listitem>
3626    <para>Boolean.</para>
3627   </listitem>
3628  </varlistentry>
3629
3630  <varlistentry>
3631   <term>Parameter:</term>
3632   <listitem>
3633    <para>
3634     N/A
3635    </para>
3636   </listitem>
3637  </varlistentry>
3638  
3639  <varlistentry>
3640   <term>Notes:</term>
3641   <listitem>
3642    <para>
3643     This action is only concerned with <emphasis>incoming</emphasis> cookies. For
3644     <emphasis>outgoing</emphasis> cookies, use
3645     <literal><link linkend="crunch-outgoing-cookies">crunch-outgoing-cookies</link></literal>.
3646     Use <emphasis>both</emphasis> to disable cookies completely.
3647    </para>
3648    <para>
3649     It makes <emphasis>no sense at all</emphasis> to use this action in conjunction
3650     with the <literal><link linkend="session-cookies-only">session-cookies-only</link></literal> action,
3651     since it would prevent the session cookies from being set.
3652    </para>
3653   </listitem>
3654  </varlistentry>
3655
3656  <varlistentry>
3657   <term>Example usage:</term>
3658   <listitem>
3659    <para>
3660     <screen>+crunch-incoming-cookies</screen>
3661    </para>
3662   </listitem>
3663  </varlistentry>
3664 </variablelist>
3665 </sect3>
3666
3667
3668 <!--   ~~~~~       New section      ~~~~~     -->
3669 <sect3 renderas="sect4" id="crunch-outgoing-cookies">
3670 <title><emphasis>crunch-outgoing-cookies</emphasis></title>
3671
3672 <variablelist>
3673  <varlistentry>
3674   <term>Typical use:</term>
3675   <listitem>
3676    <para>
3677     Prevent the web server from reading any cookies from your system
3678    </para>
3679   </listitem>
3680  </varlistentry>
3681
3682  <varlistentry>
3683   <term>Effect:</term>
3684   <listitem>
3685    <para>
3686     Deletes any <quote>Cookie:</quote> HTTP headers from client requests.
3687    </para>
3688   </listitem>
3689  </varlistentry>
3690
3691  <varlistentry>
3692   <term>Type:</term>
3693   <!-- Boolean, Parameterized, Multi-value -->
3694   <listitem>
3695    <para>Boolean.</para>
3696   </listitem>
3697  </varlistentry>
3698
3699  <varlistentry>
3700   <term>Parameter:</term>
3701   <listitem>
3702    <para>
3703     N/A
3704    </para>
3705   </listitem>
3706  </varlistentry>
3707  
3708  <varlistentry>
3709   <term>Notes:</term>
3710   <listitem>
3711    <para>
3712     This action is only concerned with <emphasis>outgoing</emphasis> cookies. For
3713     <emphasis>incoming</emphasis> cookies, use
3714     <literal><link linkend="crunch-incoming-cookies">crunch-incoming-cookies</link></literal>.
3715     Use <emphasis>both</emphasis> to disable cookies completely.
3716    </para>
3717    <para>
3718     It makes <emphasis>no sense at all</emphasis> to use this action in conjunction
3719     with the <literal><link linkend="session-cookies-only">session-cookies-only</link></literal> action,
3720     since it would prevent the session cookies from being read.
3721    </para>
3722   </listitem>
3723  </varlistentry>
3724
3725  <varlistentry>
3726   <term>Example usage:</term>
3727   <listitem>
3728    <para>
3729     <screen>+crunch-outgoing-cookies</screen>
3730    </para>
3731   </listitem>
3732  </varlistentry>
3733
3734 </variablelist>
3735 </sect3>
3736
3737
3738 <!--   ~~~~~       New section      ~~~~~     -->
3739 <sect3 renderas="sect4" id="deanimate-gifs">
3740 <title><emphasis>deanimate-gifs</emphasis></title>
3741
3742 <variablelist>
3743  <varlistentry>
3744   <term>Typical use:</term>
3745   <listitem>
3746    <para>Stop those annoying, distracting animated GIF images.</para>
3747   </listitem>
3748  </varlistentry>
3749
3750  <varlistentry>
3751   <term>Effect:</term>
3752   <listitem>
3753    <para>
3754     De-animate GIF animations, i.e. reduce them to their first or last image.
3755    </para>
3756   </listitem>
3757  </varlistentry>
3758
3759  <varlistentry>
3760   <term>Type:</term>
3761   <!-- boolean, parameterized, Multi-value -->
3762   <listitem>
3763    <para>Parameterized.</para>
3764   </listitem>
3765  </varlistentry>
3766
3767  <varlistentry>
3768   <term>Parameter:</term>
3769   <listitem>
3770    <para>
3771     <quote>last</quote> or <quote>first</quote>
3772    </para>
3773   </listitem>
3774  </varlistentry>
3775  
3776  <varlistentry>
3777   <term>Notes:</term>
3778   <listitem>
3779    <para>
3780     This will also shrink the images considerably (in bytes, not pixels!). If
3781     the option <quote>first</quote> is given, the first frame of the animation
3782     is used as the replacement. If <quote>last</quote> is given, the last
3783     frame of the animation is used instead, which probably makes more sense for
3784     most banner animations, but also has the risk of not showing the entire
3785     last frame (if it is only a delta to an earlier frame).
3786    </para>
3787    <para>
3788     You can safely use this action with patterns that will also match non-GIF
3789     objects, because no attempt will be made at anything that doesn't look like
3790     a GIF.
3791    </para>
3792   </listitem>
3793  </varlistentry>
3794
3795  <varlistentry>
3796   <term>Example usage:</term>
3797   <listitem>
3798     <para>
3799       <screen>+deanimate-gifs{last}</screen>
3800     </para>
3801   </listitem>
3802  </varlistentry>
3803 </variablelist>
3804 </sect3>
3805
3806 <!--   ~~~~~       New section      ~~~~~     -->
3807 <sect3 renderas="sect4" id="downgrade-http-version">
3808 <title><emphasis>downgrade-http-version</emphasis></title>
3809
3810 <variablelist>
3811  <varlistentry>
3812   <term>Typical use:</term>
3813   <listitem>
3814    <para>Work around (very rare) problems with HTTP/1.1</para>
3815   </listitem>
3816  </varlistentry>
3817
3818  <varlistentry>
3819   <term>Effect:</term>
3820   <listitem>
3821    <para>
3822     Downgrades HTTP/1.1 client requests and server replies to HTTP/1.0.
3823    </para>
3824   </listitem>
3825  </varlistentry>
3826
3827  <varlistentry>
3828   <term>Type:</term>
3829   <!-- boolean, parameterized, Multi-value -->
3830   <listitem>
3831    <para>Boolean.</para>
3832   </listitem>
3833  </varlistentry>
3834
3835  <varlistentry>
3836   <term>Parameter:</term>
3837   <listitem>
3838    <para>
3839     N/A
3840    </para>
3841   </listitem>
3842  </varlistentry>
3843  
3844 <varlistentry>
3845   <term>Notes:</term>
3846   <listitem>
3847    <para>
3848     This is a left-over from the time when <application>Privoxy</application>
3849     didn't support important HTTP/1.1 features well. It is left here for the
3850     unlikely case that you experience HTTP/1.1 related problems with some server
3851     out there. Not all (optional) HTTP/1.1 features are supported yet, so there
3852     is a chance you might need this action.
3853    </para>
3854   </listitem>
3855  </varlistentry>
3856
3857  <varlistentry>
3858   <term>Example usage (section):</term>
3859   <listitem>
3860     <para>
3861      <screen>{+downgrade-http-version}
3862 problem-host.example.com</screen>
3863     </para>
3864   </listitem>
3865  </varlistentry>
3866
3867 </variablelist>
3868 </sect3>
3869
3870 <!--   ~~~~~       New section      ~~~~~     -->
3871 <sect3 renderas="sect4" id="fast-redirects">
3872 <title><emphasis>fast-redirects</emphasis></title>
3873
3874 <variablelist>
3875  <varlistentry>
3876   <term>Typical use:</term>
3877   <listitem>
3878    <para>Fool some click-tracking scripts and speed up indirect links</para>
3879   </listitem>
3880  </varlistentry>
3881
3882  <varlistentry>
3883   <term>Effect:</term>
3884   <listitem>
3885    <para>
3886     Cut off all but the last valid URL from requests.
3887    </para>
3888   </listitem>
3889  </varlistentry>
3890
3891  <varlistentry>
3892   <term>Type:</term>
3893   <!-- boolean, parameterized, Multi-value -->
3894   <listitem>
3895    <para>Boolean.</para>
3896   </listitem>
3897  </varlistentry>
3898
3899  <varlistentry>
3900   <term>Parameter:</term>
3901   <listitem>
3902    <para>
3903     N/A
3904    </para>
3905   </listitem>
3906  </varlistentry>
3907
3908  <varlistentry>
3909   <term>Notes:</term>
3910   <listitem>
3911    <para>  
3912     Many sites, like yahoo.com, don't just link to other sites. Instead, they
3913     will link to some script on their own servers, giving the destination as a
3914     parameter, which will then redirect you to the final target. URLs
3915     resulting from this scheme typically look like:
3916     <emphasis>http://some.place/click-tracker.cgi?target=http://some.where.else</emphasis>.
3917   </para>
3918    <para>
3919     Sometimes, there are even multiple consecutive redirects encoded in the
3920     URL. These redirections via scripts make your web browsing more traceable,
3921     since the server from which you follow such a link can see where you go
3922     to. Apart from that, valuable bandwidth and time is wasted, while your
3923     browser ask the server for one redirect after the other. Plus, it feeds
3924     the advertisers.
3925    </para>
3926    <para>
3927     This feature is currently not very smart and is scheduled for improvement.
3928     It is likely to break some sites. You should expect to need possibly 
3929     many exceptions to this action, if it is enabled by default in
3930     <filename>default.action</filename>. Some sites just don't work without 
3931     it.
3932    </para>
3933   </listitem>
3934  </varlistentry>
3935
3936  <varlistentry>
3937   <term>Example usage:</term>
3938   <listitem>
3939     <para>
3940      <screen>{+fast-redirects}</screen>
3941     </para>
3942   </listitem>
3943  </varlistentry>
3944
3945 </variablelist>
3946 </sect3>
3947
3948
3949 <!--   ~~~~~       New section      ~~~~~     -->
3950 <sect3 renderas="sect4" id="filter">
3951 <title><emphasis>filter</emphasis></title>
3952
3953 <variablelist>
3954  <varlistentry>
3955   <term>Typical use:</term>
3956   <listitem>
3957    <para>Get rid of HTML and JavaScript annoyances, banner advertisements (by size), do fun text replacements, etc.</para>
3958   </listitem>
3959  </varlistentry>
3960
3961  <varlistentry>
3962   <term>Effect:</term>
3963   <listitem>
3964    <para>
3965     Text documents, including HTML and JavaScript, to which this action applies, are filtered on-the-fly
3966     through the specified regular expression based substitutions.    
3967    </para>
3968   </listitem>
3969  </varlistentry>
3970
3971  <varlistentry>
3972   <term>Type:</term>
3973   <!-- boolean, parameterized, Multi-value -->
3974   <listitem>
3975    <para>Parameterized.</para>
3976   </listitem>
3977  </varlistentry>
3978
3979  <varlistentry>
3980   <term>Parameter:</term>
3981   <listitem>
3982    <para>
3983     The name of a filter, as defined in the <link linkend="filter-file">filter file</link>
3984     (typically <filename>default.filter</filename>, set by the
3985     <literal><link linkend="filterfile">filterfile</link></literal>
3986     option in the <link linkend="config">config file</link>)
3987    </para>
3988   </listitem>
3989  </varlistentry>
3990  
3991  <varlistentry>
3992   <term>Notes:</term>
3993   <listitem>
3994    <para>
3995     For your convenience, there are a bunch of pre-defined filters available 
3996     in the distribution filter file that you can use. See the example below for
3997     a list.
3998    </para>
3999    <para>
4000     This is potentially a very powerful feature!  But <quote>rolling your own</quote>
4001     filters requires a knowledge of regular expressions and HTML.
4002    </para>
4003    <para>
4004     Filtering requires buffering the page content, which may appear to
4005     slow down page rendering since nothing is displayed until all content has
4006     passed the filters. (It does not really take longer, but seems that way
4007     since the page is not incrementally displayed.) This effect will be more
4008     noticeable on slower connections.
4009    </para>
4010    <para>
4011     At this time, <application>Privoxy</application> cannot (yet!) uncompress compressed
4012     documents. If you want filtering to work on all documents, even those that
4013     would normally be sent compressed, use the
4014     <literal><link linkend="prevent-compression">prevent-compression</link></literal>
4015     action in conjunction with <literal>filter</literal>.
4016    </para>
4017    <para>
4018     Filtering can achieve some of the effects as the 
4019     <literal><link linkend="block">block</link></literal>
4020     action, i.e. it can be used to block ads and banners. 
4021    </para>
4022    <para>
4023     <link linkend="contact">Feedback</link> with suggestions for new or improved filters is particularly
4024     welcome!
4025    </para>
4026   </listitem>
4027  </varlistentry>
4028
4029  <varlistentry>
4030   <term>Example usage (with filters from the distribution <filename>default.filter</filename> file):</term>
4031   <listitem>
4032    <para>
4033     <anchor id="filter-html-annoyances">
4034     <screen>+filter{html-annoyances}     # Get rid of particularly annoying HTML abuse.</screen>
4035    </para>
4036    <para>
4037     <anchor id="filter-js-annoyances">
4038     <screen>+filter{js-annoyances}       # Get rid of particularly annoying JavaScript abuse</screen>
4039    </para>
4040    <para>
4041     <anchor id="filter-banners-by-size">
4042     <screen>+filter{banners-by-size}     # Kill banners by size (<emphasis>very</emphasis> efficient!)</screen>
4043    </para>
4044    <para>
4045     <anchor id="filter-content-cookies">
4046     <screen>+filter{content-cookies}     # Kill cookies that come sneaking in the HTML or JS content</screen>
4047    </para>
4048    <para>
4049     <anchor id="filter-popups">
4050     <screen>+filter{popups}              # Kill all popups in JS and HTML</screen>
4051    </para>
4052    <para>
4053     <anchor id="filter-webbugs">
4054     <screen>+filter{webbugs}             # Squish WebBugs (1x1 invisible GIFs used for user tracking)</screen>
4055    </para>
4056    <para>
4057     <anchor id="filter-fun">
4058     <screen>+filter{fun}                 # Text replacements for subversive browsing fun!</screen>
4059    </para>
4060    <para>
4061     <anchor id="filter-frameset-borders">
4062     <screen>+filter{frameset-borders}    # Give frames a border and make them resizeable</screen> 
4063    </para>
4064    <para>
4065     <anchor id="filter-refresh-tags">
4066     <screen>+filter{refresh-tags}        # Kill automatic refresh tags (for dial-on-demand setups)</screen>
4067    </para>
4068    <para>
4069     <anchor id="filter-nimda">
4070     <screen>+filter{nimda}               # Remove Nimda (virus) code.</screen>
4071    </para>
4072    <para>
4073     <anchor id="filter-shockwave-flash">
4074     <screen>+filter{shockwave-flash}     # Kill embedded Shockwave Flash objects</screen>
4075    </para>
4076    <para>
4077     <anchor id="filter-crude-parental">
4078     <screen>+filter{crude-parental}      # Kill all web pages that contain the words "sex" or "warez"</screen>
4079    </para>
4080   </listitem>
4081  </varlistentry>
4082 </variablelist>
4083 </sect3>
4084
4085
4086 <!--   ~~~~~       New section      ~~~~~     -->
4087 <sect3 renderas="sect4" id="handle-as-image">
4088 <title><emphasis>handle-as-image</emphasis></title>
4089
4090 <variablelist>
4091  <varlistentry>
4092   <term>Typical use:</term>
4093   <listitem>
4094    <para>Mark URLs as belonging to images (so they'll be replaced by images <emphasis>if they get blocked</emphasis>)</para>
4095   </listitem>
4096  </varlistentry>
4097
4098  <varlistentry>
4099   <term>Effect:</term>
4100   <listitem>
4101    <para>
4102     This action alone doesn't do anything noticeable. It just marks URLs as images.
4103     If the <literal><link linkend="block">block</link></literal> action <emphasis>also applies</emphasis>,
4104     the presence or absence of this mark decides whether an HTML <quote>blocked</quote>
4105     page, or a replacement image (as determined by the <literal><link
4106     linkend="set-image-blocker">set-image-blocker</link></literal> action) will be sent to the
4107     client as a substitute for the blocked content.
4108    </para>
4109   </listitem>
4110  </varlistentry>
4111
4112  <varlistentry>
4113   <term>Type:</term>
4114   <!-- Boolean, Parameterized, Multi-value -->
4115   <listitem>
4116    <para>Boolean.</para>
4117   </listitem>
4118  </varlistentry>
4119
4120  <varlistentry>
4121   <term>Parameter:</term>
4122   <listitem>
4123    <para>
4124     N/A
4125    </para>
4126   </listitem>
4127  </varlistentry>
4128  
4129  <varlistentry>
4130   <term>Notes:</term>
4131   <listitem>
4132    <para>
4133     The below generic example section is actually part of <filename>default.action</filename>.
4134     It marks all URLs with well-known image file name extensions as images and should
4135     be left intact. 
4136    </para>
4137    <para>
4138     Users will probably only want to use the handle-as-image action in conjunction with
4139     <literal><link linkend="block">block</link></literal>, to block sources of banners, whose URLs don't
4140     reflect the file type, like in the second example section.
4141    </para>
4142    <para>
4143     Note that you cannot treat HTML pages as images in most cases. For instance, (inline) ad
4144     frames require an HTML page to be sent, or they won't display properly.
4145     Forcing <literal>handle-as-image</literal> in this situation will not replace the
4146     ad frame with an image, but lead to error messages.
4147    </para>
4148   </listitem>
4149  </varlistentry>
4150
4151  <varlistentry>
4152   <term>Example usage (sections):</term>
4153   <listitem>
4154    <para>
4155      <screen># Generic image extensions:
4156 #
4157 {+handle-as-image}
4158 /.*\.(gif|jpg|jpeg|png|bmp|ico)$
4159
4160 # These don't look like images, but they're banners and should be
4161 # blocked as images:
4162 #
4163 {+block +handle-as-image}
4164 some.nasty-banner-server.com/junk.cgi?output=trash
4165
4166 # Banner source! Who cares if they also have non-image content?
4167 ad.doubleclick.net 
4168 </screen>
4169    </para>
4170   </listitem>
4171  </varlistentry>
4172 </variablelist>
4173 </sect3>
4174
4175
4176 <!--   ~~~~~       New section      ~~~~~     -->
4177 <sect3 renderas="sect4" id="hide-forwarded-for-headers">
4178 <title><emphasis>hide-forwarded-for-headers</emphasis></title>
4179
4180 <variablelist>
4181  <varlistentry>
4182   <term>Typical use:</term>
4183   <listitem>
4184    <para>Improve privacy by hiding the true source of the request</para>
4185   </listitem>
4186  </varlistentry>
4187
4188  <varlistentry>
4189   <term>Effect:</term>
4190   <listitem>
4191    <para>
4192     Deletes any existing <quote>X-Forwarded-for:</quote> HTTP header from client requests,
4193     and prevents adding a new one.
4194    </para>
4195   </listitem>
4196  </varlistentry>
4197
4198  <varlistentry>
4199   <term>Type:</term>
4200   <!-- Boolean, Parameterized, Multi-value -->
4201   <listitem>
4202    <para>Boolean.</para>
4203   </listitem>
4204  </varlistentry>
4205
4206  <varlistentry>
4207   <term>Parameter:</term>
4208   <listitem>
4209    <para>
4210     N/A
4211    </para>
4212   </listitem>
4213  </varlistentry>
4214  
4215  <varlistentry>
4216   <term>Notes:</term>
4217   <listitem>
4218    <para>
4219     It is fairly safe to leave this on.
4220    </para>
4221    <para>
4222     This action is scheduled for improvement: It should be able to generate forged 
4223     <quote>X-Forwarded-for:</quote> headers using random IP addresses from a specified network,
4224     to make successive requests from the same client look like requests from a pool of different
4225     users sharing the same proxy.
4226    </para>
4227   </listitem>
4228  </varlistentry>
4229
4230  <varlistentry>
4231   <term>Example usage:</term>
4232   <listitem>
4233     <para>
4234      <screen>+hide-forwarded-for-headers</screen>
4235    </para>
4236   </listitem>
4237  </varlistentry>
4238 </variablelist>
4239 </sect3>
4240
4241
4242 <!--   ~~~~~       New section      ~~~~~     -->
4243 <sect3 renderas="sect4" id="hide-from-header">
4244 <title><emphasis>hide-from-header</emphasis></title>
4245
4246 <variablelist>
4247  <varlistentry>
4248   <term>Typical use:</term>
4249   <listitem>
4250    <para>Keep your (old and ill) browser from telling web servers your email address</para>
4251   </listitem>
4252  </varlistentry>
4253
4254  <varlistentry>
4255   <term>Effect:</term>
4256   <listitem>
4257    <para>
4258     Deletes any existing <quote>From:</quote> HTTP header, or replaces it with the
4259     specified string.
4260    </para>
4261   </listitem>
4262  </varlistentry>
4263
4264  <varlistentry>
4265   <term>Type:</term>
4266   <!-- Boolean, Parameterized, Multi-value -->
4267   <listitem>
4268    <para>Parameterized.</para>
4269   </listitem>
4270  </varlistentry>
4271
4272  <varlistentry>
4273   <term>Parameter:</term>
4274   <listitem>
4275    <para>
4276     Keyword: <quote>block</quote>, or any user defined value.
4277    </para>
4278   </listitem>
4279  </varlistentry>
4280  
4281  <varlistentry>
4282   <term>Notes:</term>
4283   <listitem>
4284    <para>
4285     The keyword <quote>block</quote> will completely remove the header 
4286     (not to be confused with the <literal><link linkend="block">block</link></literal>
4287     action).
4288    </para>
4289    <para>
4290     Alternately, you can specify any value you prefer to be sent to the web
4291     server. If you do, it is a matter of fairness not to use any address that
4292     is actually used by a real person.
4293    </para>
4294    <para>
4295     This action is rarely needed, as modern web browsers don't send
4296     <quote>From:</quote> headers anymore.
4297    </para>
4298   </listitem>
4299  </varlistentry>
4300
4301  <varlistentry>
4302   <term>Example usage:</term>
4303   <listitem>
4304    <para>
4305     <screen>+hide-from-header{block}</screen> or
4306     <screen>+hide-from-header{spam-me-senseless@sittingduck.example.com}</screen>
4307    </para>
4308   </listitem>
4309  </varlistentry>
4310 </variablelist>
4311 </sect3>
4312
4313
4314 <!--   ~~~~~       New section      ~~~~~     -->
4315 <sect3 renderas="sect4" id="hide-referrer">
4316 <title><emphasis>hide-referrer</emphasis></title>
4317 <anchor id="hide-referer">
4318 <variablelist>
4319  <varlistentry>
4320   <term>Typical use:</term>
4321   <listitem>
4322    <para>Conceal which link you followed to get to a particular site</para>
4323   </listitem>
4324  </varlistentry>
4325
4326  <varlistentry>
4327   <term>Effect:</term>
4328   <listitem>
4329    <para>
4330     Deletes the <quote>Referer:</quote> (sic) HTTP header from the client request,
4331     or replaces it with a forged one.
4332    </para>
4333   </listitem>
4334  </varlistentry>
4335
4336  <varlistentry>
4337   <term>Type:</term>
4338   <!-- Boolean, Parameterized, Multi-value -->
4339   <listitem>
4340    <para>Parameterized.</para>
4341   </listitem>
4342  </varlistentry>
4343
4344  <varlistentry>
4345   <term>Parameter:</term>
4346   <listitem>
4347    <itemizedlist>
4348     <listitem>
4349      <para><quote>block</quote> to delete the header completely.</para>
4350     </listitem>
4351     <listitem>
4352      <para><quote>forge</quote> to pretend to be coming from the homepage of the server we are talking to.</para>
4353     </listitem>
4354     <listitem>
4355      <para>Any other string to set a user defined referrer.</para>
4356     </listitem>
4357    </itemizedlist>
4358   </listitem>
4359  </varlistentry>
4360  
4361  <varlistentry>
4362   <term>Notes:</term>
4363   <listitem>
4364    <para>
4365     <quote>forge</quote> is the preferred option here, since some servers will
4366     not send images back otherwise, in an attempt to prevent their valuable
4367     content from being embedded elsewhere (and hence, without being surrounded
4368     by <emphasis>their</emphasis> banners).
4369    </para>
4370   <para>  
4371    <literal>hide-referer</literal> is an alternate spelling of
4372    <literal>hide-referrer</literal> and the two can be can be freely
4373    substituted with each other. (<quote>referrer</quote> is the
4374    correct English spelling, however the HTTP specification has a bug - it
4375    requires it to be spelled as <quote>referer</quote>.) 
4376   </para>
4377   </listitem>
4378  </varlistentry>
4379
4380  <varlistentry>
4381   <term>Example usage:</term>
4382   <listitem>
4383    <para>
4384      <screen>+hide-referrer{forge}</screen> or
4385      <screen>+hide-referrer{http://www.yahoo.com/}</screen>
4386    </para>
4387   </listitem>
4388  </varlistentry>
4389 </variablelist>
4390 </sect3>
4391
4392
4393 <!--   ~~~~~       New section      ~~~~~     -->
4394 <sect3 renderas="sect4" id="hide-user-agent">
4395 <title><emphasis>hide-user-agent</emphasis></title>
4396
4397 <variablelist>
4398  <varlistentry>
4399   <term>Typical use:</term>
4400   <listitem>
4401    <para>Conceal your type of browser and client operating system</para>
4402   </listitem>
4403  </varlistentry>
4404
4405  <varlistentry>
4406   <term>Effect:</term>
4407   <listitem>
4408    <para>
4409     Replaces the value of the <quote>User-Agent:</quote> HTTP header
4410     in client requests with the specified value.
4411    </para>
4412   </listitem>
4413  </varlistentry>
4414
4415  <varlistentry>
4416   <term>Type:</term>
4417   <!-- Boolean, Parameterized, Multi-value -->
4418   <listitem>
4419    <para>Parameterized.</para>
4420   </listitem>
4421  </varlistentry>
4422
4423  <varlistentry>
4424   <term>Parameter:</term>
4425   <listitem>
4426    <para>
4427     Any user-defined string.
4428    </para>
4429   </listitem>
4430  </varlistentry>
4431  
4432  <varlistentry>
4433   <term>Notes:</term>
4434   <listitem>
4435    <warning> 
4436     <para>
4437      This breaks many web sites that depend on looking at this header in order
4438      to customize their content for different browsers (which, by the
4439      way, is <emphasis>NOT</emphasis> a <ulink
4440      url="http://www.javascriptkit.com/javaindex.shtml">smart way to do
4441      that</ulink>!).
4442     </para>
4443    </warning>
4444    <para>
4445     Using this action in multi-user setups or wherever different types of
4446     browsers will access the same <application>Privoxy</application> is
4447     <emphasis>not recommended</emphasis>. In single-user, single-browser
4448     setups, you might use it to delete your OS version information from
4449     the headers, because it is an invitation to exploit known bugs for your
4450     OS. It is also occasionally useful to forge this in order to access 
4451     sites that won't let you in otherwise (though there may be a good 
4452     reason in some cases). Example of this: some MSN sites will not 
4453     let <application>Mozilla</application> enter, yet forging to a 
4454     <application>Netscape 6.1</application> user-agent works just fine.
4455     (Must be just a silly MS goof, I'm sure :-).
4456    </para>
4457    <para>
4458     This action is scheduled for improvement.
4459    </para>
4460    </listitem>
4461  </varlistentry>
4462
4463  <varlistentry>
4464   <term>Example usage:</term>
4465   <listitem>
4466    <para>
4467      <screen>+hide-user-agent{Netscape 6.1 (X11; I; Linux 2.4.18 i686)}</screen>
4468    </para>
4469   </listitem>
4470  </varlistentry>
4471 </variablelist>
4472 </sect3>
4473
4474
4475 <!--   ~~~~~       New section      ~~~~~     -->
4476 <sect3 renderas="sect4" id="kill-popups">
4477 <title><emphasis>kill-popups<anchor id="kill-popup"></emphasis></title>
4478
4479 <variablelist>
4480  <varlistentry>
4481   <term>Typical use:</term>
4482   <listitem>
4483    <para>Eliminate those annoying pop-up windows</para>
4484   </listitem>
4485  </varlistentry>
4486
4487  <varlistentry>
4488   <term>Effect:</term>
4489   <listitem>
4490    <para>
4491     While loading the document, replace JavaScript code that opens
4492     pop-up windows with (syntactically neutral) dummy code on the fly.
4493    </para>
4494   </listitem>
4495  </varlistentry>
4496
4497  <varlistentry>
4498   <term>Type:</term>
4499   <!-- Boolean, Parameterized, Multi-value -->
4500   <listitem>
4501    <para>Boolean.</para>
4502   </listitem>
4503  </varlistentry>
4504
4505  <varlistentry>
4506   <term>Parameter:</term>
4507   <listitem>
4508    <para>
4509     N/A
4510    </para>
4511   </listitem>
4512  </varlistentry>
4513  
4514  <varlistentry>
4515   <term>Notes:</term>
4516   <listitem>
4517    <para>
4518     This action is easily confused with the built-in, hardwired <literal><link linkend="filter">filter</link></literal>
4519     action, but there are important differences: For <literal>kill-popups</literal>,
4520     the document need not be buffered, so it can be incrementally rendered while
4521     downloading. But <literal>kill-popups</literal> doesn't catch as many pop-ups as
4522     <literal><link
4523     linkend="filter">filter</link>{<replaceable>popups</replaceable>}</literal>
4524     does. 
4525    </para>
4526    <para>
4527     Think of it as a fast and efficient replacement for a filter that you
4528     can use if you don't want any filtering at all. Note that it doesn't make
4529     sense to combine it with any <literal><link linkend="filter">filter</link></literal> action,
4530     since as soon as one <literal><link linkend="filter">filter</link></literal> applies,
4531     the whole document needs to be buffered anyway, which destroys the advantage of
4532     the <literal>kill-popups</literal> action over its filter equivalent.
4533    </para>
4534    <para>
4535     Killing all pop-ups is a dangerous business. Many shops and banks rely on
4536     pop-ups to display forms, shopping carts etc, and killing only the unwanted pop-ups 
4537     would require artificial intelligence in <application>Privoxy</application>.
4538     If the only kind of pop-ups that you want to kill are exit consoles (those
4539     <emphasis>really nasty</emphasis> windows that appear when you close an other
4540     one), you might want to use
4541     <literal><link
4542     linkend="filter">filter</link>{<replaceable>js-annoyances</replaceable>}</literal>
4543     instead. 
4544    </para>
4545
4546   <!-- 
4547    <para>
4548     An alternate spelling is <literal>+kill-popup</literal>, which is 
4549     interchangeable.
4550    </para>
4551  --> 
4552   </listitem>
4553  </varlistentry>
4554
4555  <varlistentry>
4556   <term>Example usage:</term>
4557   <listitem>
4558    <para><screen>+kill-popups</screen></para>
4559   </listitem>
4560  </varlistentry>
4561 </variablelist>
4562 </sect3>
4563
4564
4565 <!--   ~~~~~       New section      ~~~~~     -->
4566 <sect3 renderas="sect4" id="limit-connect">
4567 <title><emphasis>limit-connect</emphasis></title>
4568
4569 <variablelist>
4570  <varlistentry>
4571   <term>Typical use:</term>
4572   <listitem>
4573    <para>Prevent abuse of <application>Privoxy</application> as a TCP proxy relay</para>
4574   </listitem>
4575  </varlistentry>
4576
4577  <varlistentry>
4578   <term>Effect:</term>
4579   <listitem>
4580    <para>
4581     Specifies to which ports HTTP CONNECT requests are allowable.
4582    </para>
4583   </listitem>
4584  </varlistentry>
4585
4586  <varlistentry>
4587   <term>Type:</term>
4588   <!-- Boolean, Parameterized, Multi-value -->
4589   <listitem>
4590    <para>Parameterized.</para>
4591   </listitem>
4592  </varlistentry>
4593
4594  <varlistentry>
4595   <term>Parameter:</term>
4596   <listitem>
4597    <para>
4598     A comma-separated list of ports or port ranges (the latter using dashes, with the minimum
4599     defaulting to 0 and the maximum to 65K).
4600    </para>
4601   </listitem>
4602  </varlistentry>
4603  
4604  <varlistentry>
4605   <term>Notes:</term>
4606   <listitem>
4607    <para>
4608     By default, i.e. if no <literal>limit-connect</literal> action applies,
4609     <application>Privoxy</application> only allows HTTP CONNECT
4610     requests to port 443 (the standard, secure HTTPS port). Use 
4611     <literal>limit-connect</literal> if more fine-grained control is desired
4612     for some or all destinations.
4613    </para>
4614    <para>
4615     The CONNECT methods exists in HTTP to allow access to secure websites
4616     (<quote>https://</quote> URLs) through proxies. It works very simply:
4617     the proxy connects to the server on the specified port, and then
4618     short-circuits its connections to the client and to the remote server.
4619     This can be a big security hole, since CONNECT-enabled proxies can be
4620     abused as TCP relays very easily.
4621   </para>
4622   <para>
4623    If you don't know what any of this means, there probably is no reason to 
4624    change this one, since the default is already very restrictive.
4625   </para>
4626   </listitem>
4627  </varlistentry>
4628
4629  <varlistentry>
4630   <term>Example usages:</term>
4631   <listitem>
4632    <!-- I had trouble getting the spacing to look right in my browser -->
4633    <!-- I probably have the wrong font setup, bollocks. -->
4634    <!-- Apparently the emphasis tag uses a proportional font no matter what -->
4635     <para>
4636      <screen>+limit-connect{443}                   # This is the default and need not be specified.
4637 +limit-connect{80,443}                # Ports 80 and 443 are OK.
4638 +limit-connect{-3, 7, 20-100, 500-}   # Ports less than 3, 7, 20 to 100 and above 500 are OK.
4639 +limit-connect{-}                     # All ports are OK (gaping security hole!)</screen>
4640    </para>
4641   </listitem>
4642  </varlistentry>
4643 </variablelist>
4644 </sect3>
4645
4646 <!--   ~~~~~       New section      ~~~~~     -->
4647 <sect3 renderas="sect4" id="prevent-compression">
4648 <title><emphasis>prevent-compression</emphasis></title>
4649
4650 <variablelist>
4651  <varlistentry>
4652   <term>Typical use:</term>
4653   <listitem>
4654    <para>
4655     Ensure that servers send the content uncompressed, so it can be
4656     passed through <literal><link linkend="filter">filter</link></literal>s
4657    </para>
4658   </listitem>
4659  </varlistentry>
4660
4661  <varlistentry>
4662   <term>Effect:</term>
4663   <listitem>
4664    <para>
4665     Adds a header to the request that asks for uncompressed transfer.
4666    </para>
4667   </listitem>
4668  </varlistentry>
4669
4670  <varlistentry>
4671   <term>Type:</term>
4672   <!-- Boolean, Parameterized, Multi-value -->
4673   <listitem>
4674    <para>Boolean.</para>
4675   </listitem>
4676  </varlistentry>
4677
4678  <varlistentry>
4679   <term>Parameter:</term>
4680   <listitem>
4681    <para>
4682     N/A
4683    </para>
4684   </listitem>
4685  </varlistentry>
4686  
4687  <varlistentry>
4688   <term>Notes:</term>
4689   <listitem>
4690    <para>
4691     More and more websites send their content compressed by default, which
4692     is generally a good idea and saves bandwidth. But for the <literal><link
4693     linkend="filter">filter</link></literal>, <literal><link linkend="deanimate-gifs">deanimate-gifs</link></literal>
4694     and <literal><link linkend="kill-popups">kill-popups</link></literal> actions to work,
4695     <application>Privoxy</application> needs access to the  uncompressed data.
4696     Unfortunately, <application>Privoxy</application> can't yet(!)  uncompress, filter, and
4697     re-compress the content on the fly. So if you want to ensure that all websites, including
4698     those that normally compress, can be filtered, you need to use this action.
4699    </para>
4700    <para>
4701     This will slow down transfers from those websites, though. If you use any of the above-mentioned
4702     actions, you will typically want to use <literal>prevent-compression</literal> in conjunction
4703     with them.
4704    </para>
4705    <para>
4706     Note that some (rare) ill-configured sites don't handle requests for uncompressed
4707     documents correctly (they send an empty document body). If you use <literal>prevent-compression</literal>
4708     per default, you'll have to add exceptions for those sites. See the example for how to do that.
4709    </para>
4710   </listitem>
4711  </varlistentry>
4712
4713  <varlistentry>
4714   <term>Example usage (sections):</term>
4715   <listitem>
4716    <para>
4717     <screen># Set default:
4718 #
4719 {+prevent-compression}
4720 / # Match all sites
4721
4722 # Make exceptions for ill sites:
4723 #
4724 {-prevent-compression}
4725 www.debianhelp.org
4726 www.pclinuxonline.com</screen>
4727    </para>
4728   </listitem>
4729  </varlistentry>
4730
4731 </variablelist>
4732 </sect3>
4733
4734
4735 <!--   ~~~~~       New section      ~~~~~     -->
4736 <sect3 renderas="sect4" id="send-vanilla-wafer">
4737 <title><emphasis>send-vanilla-wafer</emphasis></title>
4738
4739 <variablelist>
4740  <varlistentry>
4741   <term>Typical use:</term>
4742   <listitem>
4743    <para>
4744     Feed log analysis scripts with useless data.
4745    </para>
4746   </listitem>
4747  </varlistentry>
4748
4749  <varlistentry>
4750   <term>Effect:</term>
4751   <listitem>
4752    <para>
4753     Sends a cookie with each request stating that you do not accept any copyright
4754     on cookies sent to you, and asking the site operator not to track you.
4755    </para>
4756   </listitem>
4757  </varlistentry>
4758
4759  <varlistentry>
4760   <term>Type:</term>
4761   <!-- Boolean, Parameterized, Multi-value -->
4762   <listitem>
4763    <para>Boolean.</para>
4764   </listitem>
4765  </varlistentry>
4766
4767  <varlistentry>
4768   <term>Parameter:</term>
4769   <listitem>
4770    <para>
4771     N/A
4772    </para>
4773   </listitem>
4774  </varlistentry>
4775  
4776  <varlistentry>
4777   <term>Notes:</term>
4778   <listitem>
4779    <para>
4780     The vanilla wafer is a (relatively) unique header and could conceivably be used to track you.
4781    </para>
4782    <para>
4783     This action is rarely used and not enabled in the default configuration.
4784    </para>
4785   </listitem>
4786  </varlistentry>
4787
4788  <varlistentry>
4789   <term>Example usage:</term>
4790   <listitem>
4791    <para>
4792      <screen>+send-vanilla-wafer</screen>
4793    </para>
4794   </listitem>
4795  </varlistentry>
4796
4797 </variablelist>
4798 </sect3>
4799
4800
4801 <!--   ~~~~~       New section      ~~~~~     -->
4802 <sect3 renderas="sect4" id="send-wafer">
4803 <title><emphasis>send-wafer</emphasis></title>
4804
4805 <variablelist>
4806  <varlistentry>
4807   <term>Typical use:</term>
4808   <listitem>
4809    <para>
4810     Send custom cookies or feed log analysis scripts with even more useless data.
4811    </para>
4812   </listitem>
4813  </varlistentry>
4814
4815  <varlistentry>
4816   <term>Effect:</term>
4817   <listitem>
4818    <para>
4819     Sends a custom, user-defined cookie with each request.
4820    </para>
4821   </listitem>
4822  </varlistentry>
4823
4824  <varlistentry>
4825   <term>Type:</term>
4826   <!-- Boolean, Parameterized, Multi-value -->
4827   <listitem>
4828    <para>Multi-value.</para>
4829   </listitem>
4830  </varlistentry>
4831
4832  <varlistentry>
4833   <term>Parameter:</term>
4834   <listitem>
4835    <para>
4836     A string of the form <quote><replaceable class="option">name</replaceable>=<replaceable
4837     class="parameter">value</replaceable></quote>.
4838    </para>
4839   </listitem>
4840  </varlistentry>
4841  
4842  <varlistentry>
4843   <term>Notes:</term>
4844   <listitem>
4845    <para>
4846     Being multi-valued, multiple instances of this action can apply to the same request,
4847     resulting in multiple cookies being sent.
4848    </para>
4849    <para>
4850     This action is rarely used and not enabled in the default configuration.
4851    </para>
4852   </listitem>
4853  </varlistentry>
4854  <varlistentry>
4855   <term>Example usage (section):</term>
4856   <listitem>
4857    <para>
4858     <screen>{+send-wafer{UsingPrivoxy=true}}
4859 my-internal-testing-server.void</screen>
4860    </para>
4861   </listitem>
4862  </varlistentry>
4863 </variablelist>
4864 </sect3>
4865
4866
4867 <!--   ~~~~~       New section      ~~~~~     -->
4868 <sect3 renderas="sect4" id="session-cookies-only">
4869 <title><emphasis>session-cookies-only</emphasis></title>
4870
4871 <variablelist>
4872  <varlistentry>
4873   <term>Typical use:</term>
4874   <listitem>
4875    <para>
4876     Allow only temporary <quote>session</quote> cookies (for the current browser session <emphasis>only</emphasis>).
4877    </para>
4878   </listitem>
4879  </varlistentry>
4880
4881  <varlistentry>
4882   <term>Effect:</term>
4883   <listitem>
4884    <para>
4885     Deletes the <quote>expires</quote> field from <quote>Set-Cookie:</quote> server headers.
4886     Most browsers will not store such cookies permanently and forget them in between sessions.
4887    </para>
4888   </listitem>
4889  </varlistentry>
4890
4891 <varlistentry>
4892   <term>Type:</term>
4893   <!-- Boolean, Parameterized, Multi-value -->
4894   <listitem>
4895    <para>Boolean.</para>
4896   </listitem>
4897  </varlistentry>
4898
4899  <varlistentry>
4900   <term>Parameter:</term>
4901   <listitem>
4902    <para>
4903     N/A
4904    </para>
4905   </listitem>
4906  </varlistentry>
4907  
4908  <varlistentry>
4909   <term>Notes:</term>
4910   <listitem>
4911    <para>
4912     This is less strict than <literal><link linkend="crunch-incoming-cookies">crunch-incoming-cookies</link></literal> / 
4913     <literal><link linkend="crunch-outgoing-cookies">crunch-outgoing-cookies</link></literal> and allows you to browse
4914     websites that insist or rely on setting cookies, without compromising your privacy too badly.
4915    </para>
4916    <para>
4917     Most browsers will not permanently store cookies that have been processed by
4918     <literal>session-cookies-only</literal> and will forget about them between sessions.
4919     This makes profiling cookies useless, but won't break sites which require cookies so
4920     that you can log in for transactions. This is generally turned on for all 
4921     sites, and is the recommended setting.
4922    </para>
4923    <para>
4924     It makes <emphasis>no sense at all</emphasis> to use <literal>session-cookies-only</literal>
4925     together with <literal><link linkend="crunch-incoming-cookies">crunch-incoming-cookies</link></literal> or
4926     <literal><link linkend="crunch-outgoing-cookies">crunch-outgoing-cookies</link></literal>. If you do, cookies
4927     will be plainly killed.
4928    </para>
4929    <para>
4930     Note that it is up to the browser how it handles such cookies without an <quote>expires</quote>
4931     field. If you use an exotic browser, you might want to try it out to be sure.
4932    </para>
4933   </listitem>
4934  </varlistentry>
4935
4936  <varlistentry>
4937   <term>Example usage:</term>
4938   <listitem>
4939    <para>
4940      <screen>+session-cookies-only</screen>
4941    </para>
4942   </listitem>
4943  </varlistentry>
4944 </variablelist>
4945 </sect3>
4946
4947
4948 <!--   ~~~~~       New section      ~~~~~     -->
4949 <sect3 renderas="sect4" id="set-image-blocker">
4950 <title><emphasis>set-image-blocker</emphasis></title>
4951
4952 <variablelist>
4953  <varlistentry>
4954   <term>Typical use:</term>
4955   <listitem>
4956    <para>Choose the replacement for blocked images</para>
4957   </listitem>
4958  </varlistentry>
4959
4960  <varlistentry>
4961   <term>Effect:</term>
4962   <listitem>
4963    <para>
4964      This action alone doesn't do anything noticeable. If <emphasis>both</emphasis>
4965      <literal><link linkend="block">block</link></literal> <emphasis>and</emphasis> <literal><link
4966      linkend="handle-as-image">handle-as-image</link></literal> <emphasis>also</emphasis>
4967      apply, i.e. if the request is to be blocked as an image,
4968      <emphasis>then</emphasis> the parameter of this action decides what will be
4969      sent as a replacement.
4970    </para>
4971   </listitem>
4972  </varlistentry>
4973
4974  <varlistentry>
4975   <term>Type:</term>
4976   <!-- Boolean, Parameterized, Multi-value -->
4977   <listitem>
4978    <para>Parameterized.</para>
4979   </listitem>
4980  </varlistentry>
4981
4982  <varlistentry>
4983   <term>Parameter:</term>
4984   <listitem>
4985    <itemizedlist>
4986     <listitem>
4987      <para>
4988       <quote>pattern</quote> to send a built-in checkerboard pattern image. The image is visually
4989       decent, scales very well, and makes it obvious where banners were busted.
4990      </para>
4991     </listitem>
4992     <listitem>
4993      <para>
4994       <quote>blank</quote> to send a built-in transparent image. This makes banners disappear
4995       completely, but makes it hard to detect where <application>Privoxy</application> has blocked
4996       images on a given page and complicates troubleshooting if <application>Privoxy</application>
4997       has blocked innocent images, like navigation icons.
4998      </para>
4999     </listitem>
5000     <listitem>
5001      <para>
5002       <quote><replaceable class="parameter">target-url</replaceable></quote> to
5003       send a redirect to <replaceable class="parameter">target-url</replaceable>. You can redirect
5004       to any image anywhere, even in your local filesystem (via <quote>file:///</quote> URL).
5005      </para>
5006      <para>
5007       A good application of redirects is to use special <application>Privoxy</application>-built-in
5008       URLs, which send the built-in images, as <replaceable class="parameter">target-url</replaceable>.
5009       This has the same visual effect as specifying <quote>blank</quote> or <quote>pattern</quote> in
5010       the first place, but enables your browser to cache the replacement image, instead of requesting
5011       it over and over again.
5012      </para>
5013     </listitem>
5014    </itemizedlist>
5015   </listitem>
5016  </varlistentry>
5017
5018  <varlistentry>
5019   <term>Notes:</term>
5020   <listitem>
5021    <para>
5022     The URLs for the built-in images are <quote>http://config.privoxy.org/send-banner?type=<replaceable
5023     class="parameter">type</replaceable></quote>, where <replaceable class="parameter">type</replaceable> is
5024     either <quote>blank</quote> or <quote>pattern</quote>.
5025    </para>
5026    <para>
5027     There is a third (advanced) type, called <quote>auto</quote>. It is <emphasis>NOT</emphasis> to be
5028     used in <literal>set-image-blocker</literal>, but meant for use from <link linkend="filter-file">filters</link>.
5029     Auto will select the type of image that would have applied to the referring page, had it been an image.
5030    </para>
5031   </listitem>
5032  </varlistentry>
5033
5034  <varlistentry>
5035   <term>Example usage:</term>
5036   <listitem>
5037    <para>
5038     Built-in pattern:
5039    </para>
5040    <para>
5041     <screen>+set-image-blocker{pattern}</screen>
5042    </para>
5043    <para>
5044     Redirect to the BSD devil:
5045    </para>
5046    <para>
5047     <screen>+set-image-blocker{http://www.freebsd.org/gifs/dae_up3.gif}</screen>
5048    </para>
5049    <para>
5050     Redirect to the built-in pattern for better caching:
5051    </para>
5052    <para>
5053     <screen>+set-image-blocker{http://config.privoxy.org/send-banner?type=pattern}</screen>
5054    </para>
5055   </listitem>
5056  </varlistentry>
5057 </variablelist>
5058 </sect3>
5059
5060
5061 <!--   ~~~~~       New section      ~~~~~     -->
5062 <sect3>
5063 <title>Summary</title>
5064 <para>
5065  Note that many of these actions have the potential to cause a page to
5066  misbehave, possibly even not to display at all. There are many ways 
5067  a site designer may choose to design his site, and what HTTP header 
5068  content, and other criteria, he may depend on. There is no way to have hard
5069  and fast rules for all sites. See the <link
5070  linkend="ACTIONSANAT">Appendix</link> for a brief example on troubleshooting
5071  actions.
5072 </para>
5073 </sect3>
5074 </sect2>
5075
5076 <!--   ~~~~~       New section      ~~~~~     -->
5077 <sect2 id="aliases">
5078 <title>Aliases</title>
5079 <para>
5080  Custom <quote>actions</quote>, known to <application>Privoxy</application>
5081  as <quote>aliases</quote>, can be defined by combining other actions.
5082  These can in turn be invoked just like the built-in actions.
5083  Currently, an alias name can contain any character except space, tab,
5084  <quote>=</quote>,
5085  <quote>{</quote> and <quote>}</quote>, but we <emphasis>strongly 
5086  recommend</emphasis> that you only use <quote>a</quote> to <quote>z</quote>,
5087  <quote>0</quote> to <quote>9</quote>, <quote>+</quote>, and <quote>-</quote>.
5088  Alias names are not case sensitive, and are not required to start with a
5089  <quote>+</quote> or <quote>-</quote> sign, since they are merely textually
5090  expanded.
5091 </para>
5092 <para>
5093  Aliases can be used throughout the actions file, but they <emphasis>must be
5094  defined in a special section at the top of the file!</emphasis>
5095  And there can only be one such section per actions file. Each actions file may
5096  have its own alias section, and the aliases defined in it are only visible
5097  within that file.
5098 </para>
5099 <para>
5100  There are two main reasons to use aliases: One is to save typing for frequently
5101  used combinations of actions, the other one is a gain in flexibility: If you
5102  decide once how you want to handle shops by defining an alias called
5103  <quote>shop</quote>, you can later change your policy on shops in
5104  <emphasis>one</emphasis> place, and your changes will take effect everywhere
5105  in the actions file where the <quote>shop</quote> alias is used. Calling aliases
5106  by their purpose also makes your actions files more readable.
5107 </para>
5108 <para>
5109  Currently, there is one big drawback to using aliases, though:
5110  <application>Privoxy</application>'s built-in web-based action file
5111  editor honors aliases when reading the actions files, but it expands
5112  them before writing. So the effects of your aliases are of course preserved,
5113  but the aliases themselves are lost when you edit sections that use aliases
5114  with it.
5115  This is likely to change in future versions of <application>Privoxy</application>.
5116 </para>
5117
5118 <para>
5119  Now let's define some aliases...
5120 </para>
5121
5122 <para>
5123  <screen>
5124  # Useful custom aliases we can use later.
5125  #
5126  # Note the (required!) section header line and that this section
5127  # must be at the top of the actions file!
5128  #
5129  {{alias}}
5130
5131  # These aliases just save typing later:
5132  # (Note that some already use other aliases!)
5133  #
5134  +crunch-all-cookies = +crunch-incoming-cookies +crunch-outgoing-cookies
5135  -crunch-all-cookies = -crunch-incoming-cookies -crunch-outgoing-cookies
5136  block-as-image      = +block +handle-as-image
5137  mercy-for-cookies   = -crunch-all-cookies -session-cookies-only
5138
5139  # These aliases define combinations of actions
5140  # that are useful for certain types of sites:
5141  #
5142  fragile     = -block -crunch-all-cookies -filter -fast-redirects -hide-referer -kill-popups
5143  shop        = -crunch-all-cookies -filter{popups} -kill-popups
5144
5145  # Short names for other aliases, for really lazy people ;-)
5146  #
5147  c0 = +crunch-all-cookies
5148  c1 = -crunch-all-cookies</screen>
5149 </para>
5150
5151 <para>
5152  ...and put them to use. These sections would appear in the lower part of an 
5153  actions file and define exceptions to the default actions (as specified further
5154  up for the <quote>/</quote> pattern):
5155 </para>
5156
5157 <para>
5158  <screen>
5159  # These sites are either very complex or very keen on
5160  # user data and require minimal interference to work:
5161  #
5162  {fragile}
5163  .office.microsoft.com
5164  .windowsupdate.microsoft.com
5165  .nytimes.com
5166
5167  # Shopping sites:
5168  # Allow cookies (for setting and retrieving your customer data)
5169  #           
5170  {shop}
5171  .quietpc.com
5172  .worldpay.com   # for quietpc.com
5173  .scan.co.uk
5174
5175  # These shops require pop-ups:
5176  #
5177  {shop -kill-popups -filter{popups}}
5178   .dabs.com
5179   .overclockers.co.uk</screen>
5180 </para>
5181
5182 <para>
5183  Aliases like <quote>shop</quote> and <quote>fragile</quote> are often used for 
5184  <quote>problem</quote> sites that require some actions to be disabled 
5185  in order to function properly.
5186 </para>
5187 </sect2>
5188
5189 <!--   ~~~~~       New section      ~~~~~     -->
5190 <sect2 id="act-examples">
5191 <title>Actions Files Tutorial</title>
5192 <para>
5193  The above chapters have shown <link linkend="actions-file">which actions files
5194  there are and how they are organized</link>, how actions are <link
5195  linkend="actions">specified</link> and <link linkend="actions-apply">applied
5196  to URLs</link>, how <link linkend="af-patterns">patterns</link> work, and how to
5197  define and use <link linkend="aliases">aliases</link>. Now, let's look at an
5198  example <filename>default.action</filename> and <filename>user.action</filename>
5199  file and see how all these pieces come together:
5200 </para>
5201
5202 <sect3><title>default.action</title>
5203
5204 <para>
5205 Every config file should start with a short comment stating its purpose:
5206 </para>
5207
5208 <para>
5209  <screen># Sample default.action file &lt;developers@privoxy.org&gt;</screen>
5210 </para>
5211
5212 <para>
5213 Then, since this is the <filename>default.action</filename> file, the
5214 first section is a special section for internal use that you needn't
5215 change or worry about:
5216 </para>
5217
5218 <para>
5219  <screen>
5220 ##########################################################################
5221 # Settings -- Don't change! For internal Privoxy use ONLY.
5222 ##########################################################################
5223
5224 {{settings}}
5225 for-privoxy-version=3.0</screen>
5226 </para>
5227
5228 <para>
5229 After that comes the (optional) alias section. We'll use the example
5230 section from the above <link linkend="aliases">chapter on aliases</link>,
5231 that also explains why and how aliases are used:
5232 </para>
5233
5234 <para>
5235  <screen>
5236 ##########################################################################
5237 # Aliases
5238 ##########################################################################
5239 {{alias}}
5240
5241 # These aliases just save typing later:
5242 # (Note that some already use other aliases!)
5243 #
5244 +crunch-all-cookies = +crunch-incoming-cookies +crunch-outgoing-cookies
5245 -crunch-all-cookies = -crunch-incoming-cookies -crunch-outgoing-cookies
5246 block-as-image      = +block +handle-as-image
5247 mercy-for-cookies   = -crunch-all-cookies -session-cookies-only
5248
5249 # These aliases define combinations of actions
5250 # that are useful for certain types of sites:
5251 #
5252 fragile     = -block -crunch-all-cookies -filter -fast-redirects -hide-referer -kill-popups
5253 shop        = mercy-for-cookies -filter{popups} -kill-popups</screen>
5254 </para>
5255
5256 <para>
5257  Now come the regular sections, i.e. sets of actions, accompanied
5258  by URL patterns to which they apply. Remember <emphasis>all actions
5259  are disabled when matching starts</emphasis>, so we have to explicitly
5260  enable the ones we want.
5261 </para>
5262
5263 <para>
5264  The first regular section is probably the most important. It has only
5265  one pattern, <quote><literal>/</literal></quote>, but this pattern
5266  <link linkend="af-patterns">matches all URLs.</link>. Therefore, the
5267  set of actions used in this <quote>default</quote> section <emphasis>will
5268  be applied to all requests as a start</emphasis>. It can  be partly or
5269  wholly overridden by later matches further down this file, or in user.action,
5270  but it will still be largely responsible for your overall browsing
5271  experience.
5272 </para>
5273
5274 <para>
5275  Again, at the start of matching, all actions are disabled, so there is
5276  no real need to disable any actions here, but we will do that nonetheless,
5277  to have a complete listing for your reference. (Remember: A <quote>+</quote>
5278  preceding the action name enables the action, a <quote>-</quote> disables!).
5279  Also note how this long line has been made more readable by splitting it into
5280  multiple lines with line continuation.
5281 </para> 
5282
5283 <para>
5284  <screen>
5285 ##########################################################################
5286 # "Defaults" section:
5287 ##########################################################################
5288  { \
5289  -<link linkend="ADD-HEADER">add-header</link> \
5290  -<link linkend="BLOCK">block</link> \
5291  -<link linkend="CRUNCH-INCOMING-COOKIES">crunch-incoming-cookies</link> \
5292  -<link linkend="CRUNCH-OUTGOING-COOKIES">crunch-outgoing-cookies</link> \
5293  +<link linkend="DEANIMATE-GIFS">deanimate-gifs</link> \
5294  -<link linkend="DOWNGRADE-HTTP-VERSION">downgrade-http-version</link> \
5295  +<link linkend="FAST-REDIRECTS">fast-redirects</link> \
5296  +<link linkend="FILTER-HTML-ANNOYANCES">filter{html-annoyances}</link> \
5297  +<link linkend="FILTER-JS-ANNOYANCES">filter{js-annoyances}</link> \
5298  -<link linkend="FILTER-CONTENT-COOKIES">filter{content-cookies}</link> \
5299  +<link linkend="FILTER-POPUPS">filter{popups}</link> \
5300  +<link linkend="FILTER-WEBBUGS">filter{webbugs}</link> \
5301  -<link linkend="FILTER-REFRESH-TAGS">filter{refresh-tags}</link> \
5302  -<link linkend="FILTER-FUN">filter{fun}</link> \
5303  +<link linkend="FILTER-NIMDA">filter{nimda}</link> \
5304  +<link linkend="FILTER-BANNERS-BY-SIZE">filter{banners-by-size}</link> \
5305  -<link linkend="FILTER-SHOCKWAVE-FLASH">filter{shockwave-flash}</link> \
5306  -<link linkend="FILTER-CRUDE-PARENTAL">filter{crude-parental}</link> \
5307  -<link linkend="HANDLE-AS-IMAGE">handle-as-image</link> \
5308  +<link linkend="HIDE-FORWARDED-FOR-HEADERS">hide-forwarded-for-headers</link> \
5309  +<link linkend="HIDE-FROM-HEADER">hide-from-header{block}</link> \
5310  +<link linkend="HIDE-REFERER">hide-referrer{forge}</link> \
5311  -<link linkend="HIDE-USER-AGENT">hide-user-agent</link> \
5312  -<link linkend="KILL-POPUPS">kill-popups</link> \
5313  -<link linkend="LIMIT-CONNECT">limit-connect</link> \
5314  +<link linkend="PREVENT-COMPRESSION">prevent-compression</link> \
5315  -<link linkend="SEND-VANILLA-WAFER">send-vanilla-wafer</link> \
5316  -<link linkend="SEND-WAFER">send-wafer</link> \
5317  +<link linkend="SESSION-COOKIES-ONLY">session-cookies-only</link> \
5318  +<link linkend="SET-IMAGE-BLOCKER">set-image-blocker{pattern}</link> \
5319  }
5320  / # forward slash will match *all* potential URL patterns.</screen>
5321 </para>
5322
5323 <para>
5324  The default behavior is now set. Note that some actions, like not hiding
5325  the user agent, are part of a <quote>general policy</quote> that applies
5326  universally and won't get any exceptions defined later. Other choices,
5327  like not blocking (which is <emphasis>understandably</emphasis> the
5328  default!) need exceptions, i.e. we need to specify explicitly what we
5329  want to block in later sections.
5330  We will also want to make exceptions from our general pop-up-killing,
5331  and use our defined aliases for that.
5332 </para>
5333
5334 <para>
5335  The first of our specialized sections is concerned with <quote>fragile</quote>
5336  sites, i.e. sites that require minimum interference, because they are either
5337  very complex or very keen on tracking you (and have mechanisms in place that
5338  make them unusable for people who avoid being tracked). We will simply use
5339  our pre-defined <literal>fragile</literal> alias instead of stating the list
5340  of actions explicitly:
5341 </para>
5342
5343 <para>
5344  <screen>
5345 ##########################################################################
5346 # Exceptions for sites that'll break under the default action set:
5347 ##########################################################################
5348
5349 # "Fragile" Use a minimum set of actions for these sites (see alias above):
5350 #
5351 { fragile }
5352 .office.microsoft.com           # surprise, surprise!
5353 .windowsupdate.microsoft.com</screen>
5354 </para>
5355
5356 <para>
5357  Shopping sites are not as fragile, but they typically
5358  require cookies to log in, and pop-up windows for shopping
5359  carts or item details. Again, we'll use a pre-defined alias:
5360 </para>
5361  
5362 <para>
5363  <screen>
5364 # Shopping sites:
5365 #
5366 { shop }
5367 .quietpc.com 
5368 .worldpay.com   # for quietpc.com
5369 .jungle.com
5370 .scan.co.uk</screen>
5371 </para>
5372
5373 <para>
5374  Then, there are sites which rely on pop-up windows (yuck!) to work.
5375  Since we made pop-up-killing our default above, we need to make exceptions
5376  now. <ulink url="http://www.mozilla.org/">Mozilla</ulink> users, who
5377  can turn on smart handling of unwanted pop-ups in their browsers, can
5378  safely choose
5379  -<literal><link linkend="FILTER-POPUPS">filter{popups}</link></literal> (and
5380  -<literal><link linkend="KILL-POPUPS">kill-popups</link></literal>) above
5381  and hence don't need this section. Anyway, disabling an already disabled
5382  action doesn't hurt, so we'll define our exceptions regardless of what was
5383  chosen in the defaults section:
5384 </para>
5385
5386 <para>
5387  <screen>
5388 # These sites require pop-ups too :( 
5389 #
5390 { -<link linkend="KILL-POPUPS">kill-popups</link> -<link linkend="FILTER-POPUPS">filter{popups}</link> }
5391 .dabs.com
5392 .overclockers.co.uk
5393 .deutsche-bank-24.de</screen>
5394 </para>
5395
5396 <para>
5397  The <literal><link linkend="FAST-REDIRECTS">fast-redirects</link></literal>
5398  action, which we enabled per default above,  breaks some sites. So disable
5399  it for popular sites where we know it misbehaves:
5400 </para>
5401
5402 <para>
5403  <screen>
5404 { -<link linkend="FAST-REDIRECTS">fast-redirects</link> }
5405 login.yahoo.com
5406 edit.*.yahoo.com
5407 .google.com
5408 .altavista.com/.*(like|url|link):http
5409 .altavista.com/trans.*urltext=http
5410 .nytimes.com</screen>
5411 </para>
5412
5413 <para>
5414  It is important that <application>Privoxy</application> knows which
5415  URLs belong to images, so that <emphasis>if</emphasis> they are to
5416  be blocked, a substitute image can be sent, rather than an HTML page.
5417  Contacting the remote site to find out is not an option, since it
5418  would destroy the loading time advantage of banner blocking, and it
5419  would feed the advertisers (in terms of money <emphasis>and</emphasis>
5420  information). We can mark any URL as an image with the <literal><link
5421  linkend="handle-as-image">handle-as-image</link></literal> action,
5422  and marking all URLs that end in a known image file extension is a
5423  good start:
5424 </para>
5425
5426 <para>
5427  <screen>
5428 ##########################################################################
5429 # Images:
5430 ##########################################################################
5431
5432 # Define which file types will be treated as images, in case they get
5433 # blocked further down this file:
5434 #
5435 { +<link linkend="HANDLE-AS-IMAGE">handle-as-image</link> }
5436 /.*\.(gif|jpe?g|png|bmp|ico)$</screen>
5437 </para>
5438
5439 <para>
5440  And then there are known banner sources. They often use scripts to
5441  generate the banners, so it won't be visible from the URL that the
5442  request is for an image. Hence we block them <emphasis>and</emphasis>
5443  mark them as images in one go, with the help of our
5444  <literal>block-as-image</literal> alias defined above. (We could of
5445  course just as well use <literal>+<link linkend="block">block</link>
5446  +<link linkend="handle-as-image">handle-as-image</link></literal> here.)
5447  Remember that the type of the replacement image is chosen by the
5448  <literal><link linkend="set-image-blocker">set-image-blocker</link></literal>
5449  action. Since all URLs have matched the default section with its
5450  <literal>+<link linkend="set-image-blocker">set-image-blocker</link>{pattern}</literal>
5451  action before, it still applies and needn't be repeated:
5452 </para>
5453
5454 <para>
5455  <screen>
5456 # Known ad generators:
5457 #
5458 { block-as-image }
5459 ar.atwola.com 
5460 .ad.doubleclick.net
5461 .ad.*.doubleclick.net
5462 .a.yimg.com/(?:(?!/i/).)*$
5463 .a[0-9].yimg.com/(?:(?!/i/).)*$
5464 bs*.gsanet.com
5465 bs*.einets.com
5466 .qkimg.net</screen>
5467 </para>
5468
5469 <para>
5470  One of the most important jobs of <application>Privoxy</application>
5471  is to block banners. A huge bunch of them are already <quote>blocked</quote>
5472  by the <literal><link linkend="filter">filter</link>{banners-by-size}</literal>
5473  action, which we enabled above, and which deletes the references to banner
5474  images from the pages while they are loaded, so the browser doesn't request
5475  them anymore, and hence they don't need to be blocked here. But this naturally
5476  doesn't catch all banners, and some people choose not to use filters, so we
5477  need a comprehensive list of patterns for banner URLs here, and apply the
5478  <literal><link linkend="block">block</link></literal> action to them.
5479 </para>
5480 <para>
5481  First comes a bunch of generic patterns, which do most of the work, by
5482  matching typical domain and path name components of banners. Then comes
5483  a list of individual patterns for specific sites, which is omitted here
5484  to keep the example short:
5485 </para>
5486
5487 <para>
5488  <screen>
5489 ##########################################################################
5490 # Block these fine banners:
5491 ##########################################################################
5492 { <link linkend="BLOCK">+block</link> }
5493
5494 # Generic patterns:
5495
5496 ad*.
5497 .*ads.
5498 banner?.
5499 count*.
5500 /.*count(er)?\.(pl|cgi|exe|dll|asp|php[34]?)
5501 /(?:.*/)?(publicite|werbung|rekla(ma|me|am)|annonse|maino(kset|nta|s)?)/
5502
5503 # Site-specific patterns (abbreviated):
5504 #
5505 .hitbox.com</screen>
5506 </para>
5507
5508 <para>
5509  You wouldn't believe how many advertisers actually call their banner
5510  servers ads.<replaceable>company</replaceable>.com, or call the directory
5511  in which the banners are stored simply <quote>banners</quote>. So the above
5512  generic patterns are surprisingly effective.
5513 </para>
5514 <para>
5515  But being very generic, they necessarily also catch URLs that we don't want
5516  to block. The pattern <literal>.*ads.</literal> e.g. catches 
5517  <quote>nasty-<emphasis>ads</emphasis>.nasty-corp.com</quote> as intended,
5518  but also <quote>downlo<emphasis>ads</emphasis>.sourcefroge.net</quote> or
5519  <quote><emphasis>ads</emphasis>l.some-provider.net.</quote> So here come some
5520  well-known exceptions to the <literal>+<link linkend="BLOCK">block</link></literal>
5521  section above.
5522 </para>
5523 <para>
5524  Note that these are exceptions to exceptions from the default! Consider the URL
5525  <quote>downloads.sourcefroge.net</quote>: Initially, all actions are deactivated,
5526  so it wouldn't get blocked. Then comes the defaults section, which matches the
5527  URL, but just deactivates the <literal><link linkend="BLOCK">block</link></literal>
5528  action once again. Then it matches <literal>.*ads.</literal>, an exception to the
5529  general non-blocking policy, and suddenly
5530  <literal><link linkend="BLOCK">+block</link></literal> applies. And now, it'll match
5531  <literal>.*loads.</literal>, where <literal><link linkend="BLOCK">-block</link></literal>
5532  applies, so (unless it matches <emphasis>again</emphasis> further down) it ends up
5533  with no <literal><link linkend="BLOCK">block</link></literal> action applying.
5534 </para>
5535
5536 <para>
5537  <screen>
5538 ##########################################################################
5539 # Save some innocent victims of the above generic block patterns:
5540 ##########################################################################
5541
5542 # By domain:
5543
5544 { -<link linkend="BLOCK">block</link> }
5545 adv[io]*.  # (for advogato.org and advice.*)
5546 adsl.      # (has nothing to do with ads)
5547 ad[ud]*.   # (adult.* and add.*)
5548 .edu       # (universities don't host banners (yet!))
5549 .*loads.   # (downloads, uploads etc)
5550
5551 # By path:
5552 #
5553 /.*loads/
5554
5555 # Site-specific:
5556 #
5557 www.globalintersec.com/adv # (adv = advanced)
5558 www.ugu.com/sui/ugu/adv</screen>
5559 </para>
5560
5561 <para>
5562  Filtering source code can have nasty side effects,
5563  so make an exception for our friends at sourceforge.net,
5564  and all paths with <quote>cvs</quote> in them. Note that
5565  <literal>-<link linkend="FILTER">filter</link></literal>
5566  disables <emphasis>all</emphasis> filters in one fell swoop!
5567 </para>
5568
5569 <para>
5570  <screen>
5571 # Don't filter code!
5572 #
5573 { -<link linkend="FILTER">filter</link> }
5574 /.*cvs
5575 .sourceforge.net</screen>
5576 </para>
5577
5578 <para>
5579  The actual <filename>default.action</filename> is of course more
5580  comprehensive, but we hope this example made clear how it works.
5581 </para>
5582
5583 </sect3>
5584
5585 <sect3><title>user.action</title>
5586
5587 <para>
5588  So far we are painting with a broad brush by setting general policies,
5589  which would be a reasonable starting point for many people. Now, 
5590  you'd maybe want to be more specific and have customized rules that
5591  are more suitable to your personal habits and preferences. These would
5592  be for narrowly defined situations like your ISP or your bank, and should
5593  be placed in <filename>user.action</filename>, which is parsed after all other 
5594  actions files and hence has the last word, over-riding any previously
5595  defined actions. <filename>user.action</filename> is also a 
5596  <emphasis>safe</emphasis> place for your personal settings, since
5597  <filename>default.action</filename> is actively maintained by the
5598  <application>Privoxy</application> developers and you'll probably want
5599  to install updated versions from time to time.
5600 </para>
5601
5602 <para>
5603  So let's look at a few examples of things that one might typically do in
5604  <filename>user.action</filename>: 
5605 </para>
5606
5607
5608 <!-- brief sample user.action here -->
5609
5610 <para>
5611  <screen>
5612 # My user.action file. &lt;fred@foobar.com&gt;</screen>
5613 </para>
5614
5615 <para>
5616  As <link linkend="aliases">aliases</link> are local to the actions
5617  file that they are defined in, you can't use the ones from
5618  <filename>default.action</filename>, unless you repeat them here:
5619 </para>
5620
5621 <para>
5622  <screen>
5623 # (Re-)define aliases for this file:
5624 #
5625 {{alias}}
5626 -crunch-all-cookies = -crunch-incoming-cookies -crunch-outgoing-cookies
5627 mercy-for-cookies   = -crunch-all-cookies -session-cookies-only
5628 fragile     = -block -crunch-all-cookies -filter -fast-redirects -hide-referer -kill-popups
5629 shop        = mercy-for-cookies -filter{popups} -kill-popups
5630 allow-ads   = -block -filter{banners-by-size} # (see below)</screen>
5631  
5632 </para>
5633
5634 <para>
5635  Say you have accounts on some sites that you visit regularly, and
5636  you don't want to have to log in manually each time. So you'd like
5637  to allow persistent cookies for these sites. The
5638  <literal>mercy-for-cookies</literal> alias defined above does exactly
5639  that, i.e. it disables crunching of cookies in any direction, and
5640  processing of cookies to make them temporary.
5641 </para>
5642
5643 <para>
5644  <screen>
5645 { mercy-for-cookies }
5646 sunsolve.sun.com
5647 slashdot.org
5648 .yahoo.com
5649 .msdn.microsoft.com
5650 .redhat.com</screen>
5651 </para>
5652
5653 <para>
5654  Your bank needs popups and is allergic to some filter, but you don't
5655  know which, so you disable them all:
5656 </para>
5657
5658 <para>
5659  <screen>
5660 { -<link linkend="FILTER">filter</link> -<link linkend="KILL-POPUPS">kill-popups</link> }
5661 .your-home-banking-site.com</screen>
5662 </para>
5663
5664 <para>
5665  While browsing the web with <application>Privoxy</application> you
5666  noticed some ads that sneaked through, but you were too lazy to
5667  report them through our fine and easy <link linkend="contact">feedback</link>
5668  system, so you have added them here:
5669 </para>
5670
5671 <para>
5672  <screen>
5673 { +<link linkend="BLOCK">block</link> }
5674 www.a-popular-site.com/some/unobvious/path
5675 another.popular.site.net/more/junk/here/</screen>
5676 </para>
5677
5678 <para>
5679  Note that, assuming the banners in the above example have regular image
5680  extensions (most do),
5681  <literal>+<link linkend="HANDLE-AS-IMAGE">handle-as-image</link></literal>
5682  need not be specified, since all URLs ending in these extensions will
5683  already have been tagged as images in the relevant section of 
5684  <filename>default.action</filename> by now.
5685 </para>
5686
5687 <para>
5688  Then you noticed that the default configuration breaks Forbes Magazine,
5689  but you were too lazy to find out which action is the culprit, and you
5690  were again too lazy to give <link linkend="contact">feedback</link>, so
5691  you just used the <literal>fragile</literal> alias on the site, and
5692  -- whoa! -- it worked:
5693 </para>
5694
5695 <para>
5696 <screen>
5697 { fragile }
5698 .forbes.com</screen>
5699 </para>
5700
5701 <para>
5702  You like the <quote>fun</quote> text replacements in <filename>default.filter</filename>,
5703  but it is disabled in the distributed actions file. (My colleagues on the team just
5704  don't have a sense of humour, that's why! ;-). So you'd like to turn it on in your private,
5705  update-safe config, once and for all:
5706 </para>
5707
5708 <para>
5709 <screen>
5710 { +<link linkend="filter-fun">filter{fun}</link> }
5711 / # For ALL sites!</screen>
5712 </para>
5713
5714 <para>
5715  Note that the above is not really a good idea: There are exceptions
5716  to the filters in <filename>default.action</filename> for things that
5717  really shouldn't be filtered, like code on CVS->Web interfaces. Since
5718  <filename>user.action</filename> has the last word, these exceptions
5719  won't be valid for the <quote>fun</quote> filtering specified here.
5720 </para>
5721
5722 <para>
5723  Finally, you might think about how your favourite free websites are
5724  funded, and find that they rely on displaying banner advertisements
5725  to survive. So you might want to specifically allow banners for those
5726  sites that you feel provide value to you:
5727 </para>
5728
5729 <para>
5730 <screen>
5731 { allow-ads }
5732 .sourceforge.net
5733 .slashdot.org
5734 .osdn.net</screen>   
5735 </para>
5736
5737 <para>
5738  Note that <literal>allow-ads</literal> has been aliased to 
5739  <literal>-<link linkend="block">block</link></literal>
5740  <literal>-<link linkend="filter-banners-by-size">filter{banners-by-size}</link></literal>
5741  above.
5742 </para>
5743 </sect3>
5744 </sect2>
5745
5746 <!--  ~  End section  ~  -->
5747
5748 </sect1>
5749
5750 <!--  ~  End section  ~  -->
5751
5752 <!--   ~~~~~~~~       New section Header    ~~~~~~~~~     -->
5753
5754 <sect1 id="filter-file">
5755 <title>The Filter File</title>
5756
5757 <para>
5758  All text substitutions that can be invoked through the
5759  <literal><link linkend="filter">filter</link></literal> action
5760  must first be defined in the filter file, which is typically
5761  called <filename>default.filter</filename> and which can be
5762  selected through the <literal>
5763  <link linkend="filterfile">filterfile</link></literal> config
5764  option.
5765 </para>
5766
5767 <para>
5768  Typical reasons for doing such substitutions are to eliminate
5769  common annoyances in HTML and JavaScript, such as pop-up windows,
5770  exit consoles, crippled windows without navigation tools, the
5771  infamous &lt;BLINK&gt; tag etc, to suppress images with certain
5772  width and height attributes (standard banner sizes or web-bugs),
5773  or just to have fun. The possibilities are endless.
5774 </para>
5775
5776 <para>
5777  Filtering works on any text-based document type, including plain
5778  text, HTML, JavaScript, CSS etc. (all <literal>text/*</literal>
5779  MIME types). Substitutions are made at the source level, so if
5780  you want to <quote>roll your own</quote> filters, you should be
5781  familiar with HTML syntax.
5782 </para>
5783
5784 <para>
5785  Just like the <link linkend="actions-file">actions files</link>, the
5786  filter file is organized in sections, which are called <emphasis>filters</emphasis>
5787  here. Each filter consists of a heading line, that starts with the
5788  <emphasis>keyword</emphasis> <literal>FILTER:</literal>, followed by
5789  the filter's <emphasis>name</emphasis>, and a short (one line) 
5790  <emphasis>description</emphasis> of what it does. Below that line
5791  come the <emphasis>jobs</emphasis>, i.e. lines that define the actual
5792  text substitutions. By convention, the name of a filter
5793  should describe what the filter <emphasis>eliminates</emphasis>. The
5794  comment is used in the <ulink url="http://config.privoxy.org/">web-based
5795  user interface</ulink>.
5796 </para>
5797
5798 <para>
5799  Once a filter called <replaceable>name</replaceable> has been defined
5800  in the filter file, it can be invoked by using an action of the form
5801  +<literal><link linkend="filter">filter</link>{<replaceable>name</replaceable>}</literal>
5802  in any <link linkend="actions-file">actions file</link>.
5803 </para>
5804  
5805 <para>
5806  A filter header line for a filter called <quote>foo</quote> could look
5807  like this:
5808 </para>
5809
5810 <para>
5811  <screen>FILTER: foo Replace all "foo" with "bar"</screen>
5812 </para>
5813
5814 <para>
5815  Below that line, and up to the next header line, come the jobs that
5816  define what text replacements the filter executes. They are specified
5817  in a syntax that imitates <ulink url="http://www.perl.org/">Perl</ulink>'s
5818  <literal>s///</literal> operator. If you are familiar with Perl, you
5819  will find this to be quite intuitive, and may want to look at the
5820  <ulink url="http://www.oesterhelt.org/pcrs/pcrs.1.html">PCRS man page</ulink>
5821  for the subtle differences to Perl behaviour. Most notably, the non-standard
5822  option letter <literal>U</literal> is supported, which turns the default
5823  to ungreedy matching.
5824 </para>
5825
5826 <para>
5827  If you are new to regular expressions, you might want to take a look at
5828  the <link linkend="regex">Appendix on regular expressions</link>, and
5829  see the <ulink url="http://perldoc.com/perl5.6.1/pod/perl.html">Perl
5830  manual</ulink> for
5831  <ulink url="http://perldoc.com/perl5.6.1/pod/perlop.html#s-PATTERN-REPLACEMENT-egimosx">the 
5832  <literal>s///</literal> operator's syntax</ulink> and <ulink
5833  url="http://perldoc.com/perl5.6.1/pod/perlre.html">Perl-style regular
5834  expressions</ulink> in general.
5835  The below examples might also help to get you started.
5836 </para>
5837
5838 <!--   ~~~~~~~~       New section Header    ~~~~~~~~~     -->
5839
5840 <sect2><title>Filter File Tutorial</title>
5841 <para>
5842  Now, let's complete our <quote>foo</quote> filter. We have already defined
5843  the heading, but the jobs are still missing. Since all it does is to replace
5844  <quote>foo</quote> with <quote>bar</quote>, there is only one (trivial) job
5845  needed:
5846 </para>
5847
5848 <para>
5849  <screen>s/foo/bar/</screen>
5850 </para>
5851
5852 <para>
5853  But wait! Didn't the comment say that <emphasis>all</emphasis> occurrences
5854  of <quote>foo</quote> should be replaced? Our current job will only take
5855  care of the first <quote>foo</quote> on each page. For global substitution,
5856  we'll need to add the <literal>g</literal> option:
5857 </para>
5858
5859 <para>
5860  <screen>s/foo/bar/g</screen>
5861 </para>
5862
5863 <para>
5864  Our complete filter now looks like this:
5865 </para>
5866 <para>
5867  <screen>FILTER: foo Replace all "foo" with "bar"
5868 s/foo/bar/g</screen>
5869 </para>
5870
5871 <para>
5872  Let's look at some real filters for more interesting examples. Here you see
5873  a filter that protects against some common annoyances that arise from JavaScript
5874  abuse. Let's look at its jobs one after the other:
5875 </para>
5876
5877
5878 <para>
5879  <screen>
5880 FILTER: js-annoyances Get rid of particularly annoying JavaScript abuse
5881
5882 # Get rid of JavaScript referrer tracking. Test page: http://www.randomoddness.com/untitled.htm
5883 #
5884 s|(&lt;script.*)document\.referrer(.*&lt;/script&gt;)|$1"Not Your Business!"$2|Usg</screen>
5885 </para>
5886
5887 <para>
5888  Following the header line and a comment, you see the job. Note that it uses
5889  <literal>|</literal> as the delimiter instead of <literal>/</literal>, because
5890  the pattern contains a forward slash, which would otherwise have to be escaped
5891  by a backslash (<literal>\</literal>).
5892 </para>
5893
5894 <para>
5895  Now, let's examine the pattern: it starts with the text <literal>&lt;script.*</literal>
5896  enclosed in parentheses. Since the dot matches any character, and <literal>*</literal>
5897  means: <quote>Match an arbitrary number of the element left of myself</quote>, this
5898  matches <quote>&lt;script</quote>, followed by <emphasis>any</emphasis> text, i.e.
5899  it matches the whole page, from the start of the first &lt;script&gt; tag.
5900 </para>
5901
5902 <para>
5903  That's more than we want, but the pattern continues: <literal>document\.referrer</literal>
5904  matches only the exact string <quote>document.referrer</quote>. The dot needed to
5905  be <emphasis>escaped</emphasis>, i.e. preceded by a backslash, to take away its
5906  special meaning as a joker, and make it just a regular dot. So far, the meaning is:
5907  Match from the start of the first &lt;script&gt; tag in a the page, up to, and including,
5908  the text <quote>document.referrer</quote>, if <emphasis>both</emphasis> are present
5909  in the page (and appear in that order).
5910 </para>
5911
5912 <para>
5913  But there's still more pattern to go. The next element, again enclosed in parentheses,
5914  is <literal>.*&lt;/script&gt;</literal>. You already know what <literal>.*</literal>
5915  means, so the whole pattern translates to: Match from the start of the first  &lt;script&gt;
5916  tag in a page to the end of the last &lt;script&gt; tag, provided that the text
5917  <quote>document.referrer</quote> appears somewhere in between.
5918 </para>
5919
5920 <para>
5921  This is still not the whole story, since we have ignored the options and the parentheses:
5922  The portions of the page matched by sub-patterns that are enclosed in parentheses, will be
5923  remembered and be available through the variables <literal>$1, $2, ...</literal> in
5924  the substitute. The <literal>U</literal> option switches to ungreedy matching, which means
5925  that the first <literal>.*</literal> in the pattern will only <quote>eat up</quote> all
5926  text in between <quote>&lt;script</quote> and the <emphasis>first</emphasis> occurrence
5927  of <quote>document.referrer</quote>, and that the second <literal>.*</literal> will
5928  only span the text up to the <emphasis>first</emphasis> <quote>&lt;/script&gt;</quote>
5929  tag. Furthermore, the <literal>s</literal> option says that the match may span
5930  multiple lines in the page, and the <literal>g</literal> option again means that the
5931  substitution is global.
5932 </para>
5933
5934 <para>
5935  So, to summarize, the pattern means: Match all scripts that contain the text
5936  <quote>document.referrer</quote>. Remember the parts of the script from
5937  (and including) the start tag up to (and excluding) the string
5938  <quote>document.referrer</quote> as <literal>$1</literal>, and the part following
5939  that string, up to and including the closing tag, as <literal>$2</literal>.
5940 </para>
5941
5942 <para>
5943  Now the pattern is deciphered, but wasn't this about substituting things? So
5944  lets look at the substitute: <literal>$1"Not Your Business!"$2</literal> is
5945  easy to read: The text remembered as <literal>$1</literal>, followed by 
5946  <literal>"Not Your Business!"</literal> (<emphasis>including</emphasis>
5947  the quotation marks!), followed by the text remembered as <literal>$2</literal>.
5948  This produces an exact copy of the original string, with the middle part
5949  (the <quote>document.referrer</quote>) replaced by <literal>"Not Your
5950  Business!"</literal>.
5951 </para>
5952
5953 <para>
5954  The whole job now reads: Replace <quote>document.referrer</quote> by
5955  <literal>"Not Your Business!"</literal> wherever it appears inside a
5956  &lt;script&gt tag. Note that this job won't break JavaScript syntax,
5957  since both the original and the replacement are syntactically valid
5958  string objects. The script just won't have access to the referrer
5959  information anymore.
5960 </para>
5961
5962 <para>
5963  We'll show you two other jobs from the JavaScript taming department, but
5964  this time only point out the constructs of special interest:
5965 </para>
5966
5967 <para>
5968  <screen>
5969 # The status bar is for displaying link targets, not pointless blahblah
5970 #
5971 s/window\.status\s*=\s*['"].*?['"]/dUmMy=1/ig</screen>
5972 </para>
5973
5974 <para>
5975  <literal>\s</literal> stands for whitespace characters (space, tab, newline,
5976  carriage return, form feed), so that <literal>\s*</literal> means: <quote>zero
5977  or more whitespace</quote>. The <literal>?</literal> in <literal>.*?</literal>
5978  makes this matching of arbitrary text ungreedy. (Note that the <literal>U</literal>
5979  option is not set). The <literal>['"]</literal> construct means: <quote>a single
5980  <emphasis>or</emphasis> a double quote</quote>.
5981 </para>
5982
5983 <para>
5984  So what does this job do? It replaces assignments of single- or double-quoted
5985  strings to the <quote>window.status</quote> object with a dummy assignment
5986  (using a variable name that is hopefully odd enough not to conflict with
5987  real variables in scripts). Thus, it catches many cases where e.g. pointless
5988  descriptions are displayed in the status bar instead of the link target when
5989  you move your mouse over links.
5990 </para>
5991
5992 <para>
5993  <screen>
5994 # Kill OnUnload popups. Yummy. Test: http://www.zdnet.com/zdsubs/yahoo/tree/yfs.html
5995 #
5996 s/(&lt;body .*)onunload(.*&gt;)/$1never$2/iU</screen>
5997 </para>
5998
5999 <para>
6000  Including the
6001  <ulink url="http://www.w3.org/TR/2000/REC-DOM-Level-2-Events-20001113/events.html#Events-eventgroupings-htmlevents">OnUnload
6002  event binding</ulink> in the HTML DOM was a <emphasis>CRIME</emphasis>.
6003  When I close a browser window, I want it to close and die. Basta.
6004  This job replaces the <quote>onunload</quote> attribute in
6005  <quote>&lt;body&gt</quote> tags with the dummy word <literal>never</literal>.
6006  Note that the <literal>i</literal> option makes the pattern matching
6007  case-insensitive.
6008 </para>
6009
6010 <para>
6011  The last example is from the fun department:
6012 </para>
6013
6014 <para>
6015  <screen>
6016 FILTER: fun Fun text replacements
6017
6018 # Spice the daily news:
6019 #
6020 s/microsoft(?!\.com)/MicroSuck/ig</screen>
6021 </para>
6022
6023 <para>
6024  Note the <literal>(?!\.com)</literal> part (a so-called negative lookahead)
6025  in the job's pattern, which means: Don't match, if the string 
6026  <quote>.com</quote> appears directly following <quote>microsoft</quote>
6027  in the page. This prevents links to microsoft.com from being messed, while
6028  still replacing the word everywhere else.
6029 </para>
6030
6031 <para>
6032  <screen>
6033 # Buzzword Bingo (example for extended regex syntax)
6034 #
6035 s* industry[ -]leading \
6036 |  cutting[ -]edge \
6037 |  award[ -]winning # Comments are OK, too! \
6038 |  high[ -]performance \
6039 |  solutions[ -]based \
6040 |  unmatched \
6041 |  unparalleled \
6042 |  unrivalled \
6043 *&lt;font color="red"&gt;&lt;b&gt;BINGO!&lt;/b&gt;&lt;/font&gt; \
6044 *igx</screen>
6045 </para>
6046
6047 <para>
6048  The <literal>x</literal> option in this job turns on extended syntax, and allows for
6049  e.g. the liberal use of (non-interpreted!) whitespace for nicer formatting.
6050 </para>
6051
6052 <para>
6053  You get the idea?
6054 </para>
6055 </sect2>
6056 </sect1>
6057
6058 <!--  ~  End section  ~  -->
6059
6060
6061
6062 <!--   ~~~~~       New section      ~~~~~     -->
6063
6064 <sect1 id="templates">
6065 <title>Templates</title>
6066 <para>
6067  All <application>Privoxy</application> built-in pages, i.e. error pages such as the 
6068  <ulink url="http://show-the-404-error.page"><quote>404 - No Such Domain</quote>
6069  error page</ulink>, the <ulink
6070  url="http://ads.bannerserver.example.com/nasty-ads/sponsor.html"><quote>BLOCKED</quote>
6071  page</ulink>
6072  and all pages of its <ulink url="http://config.privoxy.org/">web-based
6073  user interface</ulink>, are generated from <emphasis>templates</emphasis>. 
6074  (<application>Privoxy</application> must be running for the above links to work as
6075  intended)
6076 </para>
6077
6078 <para>
6079  These templates are stored in a subdirectory of the <link linkend="confdir">configuration
6080  directory</link> called <filename>templates</filename>. On unixish platforms,
6081  this is typically
6082  <ulink url="file:///etc/privoxy/templates/"><filename>/etc/privoxy/templates/</filename></ulink>.
6083 </para>
6084
6085 <para>
6086  The templates are basically normal HTML files, but with place-holders (called symbols
6087  or exports), which <application>Privoxy</application> fills at run time. You can
6088  edit the templates with a normal text editor, should you want to customize them.
6089  (<emphasis>Not recommended for the casual user</emphasis>). Note that
6090  just like in configuration files, lines starting with <literal>#</literal> are
6091  ignored when the templates are filled in.
6092 </para>
6093
6094 <para>
6095  The place-holders are of the form <literal>@name@</literal>, and you will
6096  find a list of available symbols, which vary from template to template,
6097  in the comments at the start of each file. Note that these comments are not
6098  always accurate, and that it's probably best to look at the existing HTML
6099  code to find out which symbols are supported and what they are filled in with.
6100 </para>
6101
6102 <para>
6103  A special application of this substitution mechanism is to make whole
6104  blocks of HTML code disappear when a specific symbol is set. We use this
6105  for many purposes, one of them being to include the beta warning in all
6106  our user interface (CGI) pages when <application>Privoxy</application>
6107  in in an alpha or beta development stage:
6108 </para>
6109
6110 <para>
6111  <screen>
6112 &lt;!-- @if-unstable-start --&gt;
6113
6114   ... beta warning HTML code goes here ...
6115
6116 &lt;!-- if-unstable-end@ --&gt;</screen>
6117 </para>
6118
6119 <para>
6120  If the "unstable" symbol is set, everything in between and including
6121  <literal>@if-unstable-start</literal> and <literal>if-unstable-end@</literal>
6122  will disappear, leaving nothing but an empty comment:
6123 </para>
6124
6125 <para>
6126  <screen>&lt;!--  --&gt;</screen>
6127 </para>
6128
6129 <para>
6130  There's also an if-then-else construct and an <literal>#include</literal>
6131  mechanism, but you'll sure find out if you are inclined to edit the
6132  templates ;-)
6133 </para>
6134
6135 <para>
6136  All templates refer to a style located at
6137  <ulink url="http://config.privoxy.org/send-stylesheet"><literal>http://config.privoxy.org/send-stylesheet</literal></ulink>.
6138  This is, of course, locally served by <application>Privoxy</application>
6139  and the source for it can be found and edited in the
6140  <filename>cgi-style.css</filename> template.
6141 </para>
6142
6143 </sect1>
6144
6145 <!--  ~  End section  ~  -->
6146
6147
6148
6149 <!--   ~~~~~       New section      ~~~~~     -->
6150
6151 <sect1 id="contact"><title>Contacting the Developers, Bug Reporting and Feature
6152 Requests</title>
6153
6154 <!-- Include contacting.sgml boilerplate: -->
6155  &contacting;
6156 <!-- end boilerplate -->
6157
6158 </sect1>
6159
6160 <!--  ~  End section  ~  -->
6161
6162
6163 <!--   ~~~~~       New section      ~~~~~     -->
6164 <sect1 id="copyright"><title><application>Privoxy</application> Copyright, License and History</title>
6165
6166 <!-- Include copyright.sgml: -->
6167  &copyright;
6168 <!-- end copyright -->
6169
6170 <!--   ~~~~~       New section      ~~~~~     -->
6171 <sect2><title>License</title>
6172 <!-- Include copyright.sgml: -->
6173  &license;
6174 <!-- end copyright -->
6175 </sect2>
6176 <!--  ~  End section  ~  -->
6177
6178
6179 <!--   ~~~~~       New section      ~~~~~     -->
6180
6181 <sect2 id="history"><title>History</title>
6182 <!-- Include history.sgml: -->
6183  &history;
6184 <!-- end history -->
6185 </sect2>
6186
6187 <sect2 id="authors"><title>Authors</title>
6188 <!-- Include p-authors.sgml: -->
6189  &p-authors;
6190 <!-- end authors -->
6191 </sect2>
6192
6193 </sect1>
6194
6195 <!--  ~  End section  ~  -->
6196
6197
6198 <!--   ~~~~~       New section      ~~~~~     -->
6199 <sect1 id="seealso"><title>See Also</title>
6200 <!-- Include seealso.sgml: -->
6201  &seealso;
6202 <!-- end seealso -->
6203 </sect1>
6204
6205
6206
6207 <!--   ~~~~~       New section      ~~~~~     -->
6208 <sect1 id="appendix"><title>Appendix</title>
6209
6210
6211 <!--   ~~~~~       New section      ~~~~~     -->
6212 <sect2 id="regex">
6213 <title>Regular Expressions</title>
6214 <para>
6215  <application>Privoxy</application> uses Perl-style <quote>regular
6216  expressions</quote> in its <link linkend="actions-file">actions
6217  files</link> and <link linkend="filter-file">filter file</link>,
6218  through the <ulink url="http://www.pcre.org/">PCRE</ulink> and
6219  <ulink url="http://www.oesterhelt.org/pcrs/">PCRS</ulink> libraries.
6220 </para>
6221
6222 <para>
6223  If you are reading this, you probably don't understand what <quote>regular
6224  expressions</quote> are, or what they can do. So this will be a very brief
6225  introduction only. A full explanation would require a <ulink
6226  url="http://www.oreilly.com/catalog/regex/">book</ulink> ;-)
6227 </para>
6228
6229 <para>
6230  Regular expressions provide a language to describe patterns that can be
6231  run against strings of characters (letter, numbers, etc), to see if they
6232  match the string or not. The  patterns are themselves (sometimes complex)
6233  strings of literal characters, combined with  wild-cards, and other special
6234  characters, called meta-characters. The <quote>meta-characters</quote> have
6235  special meanings and are used to build complex patterns to be matched against.
6236  Perl Compatible Regular Expressions are an especially convenient
6237  <quote>dialect</quote> of the regular expression language.
6238 </para>
6239
6240 <para>
6241  To make a simple analogy, we do something similar when we use wild-card
6242  characters when listing files with the <command>dir</command> command in DOS. 
6243  <literal>*.*</literal> matches all filenames. The <quote>special</quote>
6244  character here is the asterisk which matches any and all characters. We can be
6245  more specific and use <literal>?</literal> to match just individual
6246  characters. So <quote>dir file?.text</quote> would match
6247  <quote>file1.txt</quote>, <quote>file2.txt</quote>, etc. We are pattern
6248  matching, using a similar technique to <quote>regular expressions</quote>!
6249 </para>
6250
6251 <para>
6252  Regular expressions do essentially the same thing, but are much, much more
6253  powerful. There are many more <quote>special characters</quote> and ways of 
6254  building complex patterns however. Let's look at a few of the common ones,
6255  and then some examples:
6256 </para>
6257
6258 <para><simplelist>
6259  <member>
6260   <emphasis>.</emphasis> - Matches any single character, e.g. <quote>a</quote>,
6261   <quote>A</quote>, <quote>4</quote>, <quote>:</quote>, or <quote>@</quote>.
6262  </member>
6263 </simplelist></para>
6264
6265 <para><simplelist>
6266  <member>
6267   <emphasis>?</emphasis> - The preceding character or expression is matched ZERO or ONE
6268   times. Either/or.
6269  </member>
6270 </simplelist></para>
6271
6272 <para><simplelist>
6273  <member>
6274   <emphasis>+</emphasis> - The preceding character or expression is matched ONE or MORE
6275   times.
6276  </member>
6277 </simplelist></para>
6278
6279 <para><simplelist>
6280  <member>
6281   <emphasis>*</emphasis> - The preceding character or expression is matched ZERO or MORE
6282   times.
6283  </member>
6284 </simplelist></para>
6285
6286 <para><simplelist>
6287  <member>
6288   <emphasis>\</emphasis> - The <quote>escape</quote> character denotes that
6289   the following character should be taken literally. This is used where one of the 
6290   special characters (e.g. <quote>.</quote>) needs to be taken literally and
6291   not as a special meta-character. Example: <quote>example\.com</quote>, makes 
6292   sure the period is recognized only as a period (and not expanded to its 
6293   meta-character meaning of any single character).
6294  </member>
6295 </simplelist></para>
6296
6297 <para><simplelist>
6298  <member>
6299   <emphasis>[]</emphasis> - Characters enclosed in brackets will be matched if
6300   any of the enclosed characters are encountered. For instance, <quote>[0-9]</quote>
6301   matches any numeric digit (zero through nine). As an example, we can combine 
6302   this with <quote>+</quote> to match any digit one of more times: <quote>[0-9]+</quote>.
6303  </member>
6304 </simplelist></para>
6305
6306 <para><simplelist>
6307  <member>
6308   <emphasis>()</emphasis> - parentheses are used to group a sub-expression,
6309   or multiple sub-expressions.
6310  </member>
6311 </simplelist></para>
6312
6313 <para><simplelist>
6314  <member>
6315   <emphasis>|</emphasis> - The <quote>bar</quote> character works like an
6316   <quote>or</quote> conditional statement. A match is successful if the
6317   sub-expression on either side of <quote>|</quote> matches. As an example:
6318   <quote>/(this|that) example/</quote> uses grouping and the bar character 
6319   and would match either <quote>this example</quote> or <quote>that
6320   example</quote>, and nothing else.
6321  </member>
6322 </simplelist></para>
6323
6324 <para>
6325  These are just some of the ones you are likely to use when matching URLs with 
6326  <application>Privoxy</application>, and is a long way from a definitive
6327  list. This is enough to get us started with a few simple examples which may
6328  be more illuminating:
6329 </para>
6330
6331 <para>
6332  <emphasis><literal>/.*/banners/.*</literal></emphasis> - A  simple example
6333  that uses the common combination of <quote>.</quote> and <quote>*</quote> to 
6334  denote any character, zero or more times. In other words, any string at all.
6335  So we start with a literal forward slash, then our regular expression pattern 
6336  (<quote>.*</quote>) another literal forward slash, the string
6337  <quote>banners</quote>, another forward slash, and lastly another
6338  <quote>.*</quote>. We are building 
6339  a directory path here. This will match any file with the path that has a
6340  directory named <quote>banners</quote> in it. The <quote>.*</quote> matches
6341  any characters, and this could conceivably be more forward slashes, so it
6342  might expand into a much longer looking path. For example, this could match:
6343  <quote>/eye/hate/spammers/banners/annoy_me_please.gif</quote>, or just
6344  <quote>/banners/annoying.html</quote>, or almost an infinite number of other
6345  possible combinations, just so it has <quote>banners</quote> in the path
6346  somewhere.
6347 </para>
6348
6349 <para>
6350  A now something a little more complex:
6351 </para>
6352
6353 <para>
6354  <emphasis><literal>/.*/adv((er)?ts?|ertis(ing|ements?))?/</literal></emphasis> - 
6355  We have several literal forward slashes again (<quote>/</quote>), so we are
6356  building another expression that is a file path statement. We have another 
6357  <quote>.*</quote>, so we are matching against any conceivable sub-path, just so
6358  it matches our expression. The only true literal that <emphasis>must
6359  match</emphasis> our pattern is <application>adv</application>, together with
6360  the forward slashes. What comes after the <quote>adv</quote> string is the
6361  interesting part. 
6362 </para>
6363
6364 <para>
6365  Remember the <quote>?</quote> means the preceding expression (either a
6366  literal character or anything grouped with <quote>(...)</quote> in this case)
6367  can exist or not, since this means either zero or one match. So
6368  <quote>((er)?ts?|ertis(ing|ements?))</quote> is optional, as are the
6369  individual sub-expressions: <quote>(er)</quote>,
6370  <quote>(ing|ements?)</quote>, and the <quote>s</quote>. The <quote>|</quote>
6371  means <quote>or</quote>. We have two of those. For instance, 
6372  <quote>(ing|ements?)</quote>, can expand to match either <quote>ing</quote> 
6373  <emphasis>OR</emphasis> <quote>ements?</quote>. What is being done here, is an
6374  attempt at matching as many variations of <quote>advertisement</quote>, and 
6375  similar, as possible. So this would expand to match just <quote>adv</quote>,
6376  or <quote>advert</quote>, or <quote>adverts</quote>, or
6377  <quote>advertising</quote>, or <quote>advertisement</quote>, or
6378  <quote>advertisements</quote>. You get the idea. But it would not match 
6379  <quote>advertizements</quote> (with a <quote>z</quote>). We could fix that by
6380  changing our regular expression to: 
6381  <quote>/.*/adv((er)?ts?|erti(s|z)(ing|ements?))?/</quote>, which would then match
6382  either spelling.
6383 </para>
6384
6385 <para>
6386  <emphasis><literal>/.*/advert[0-9]+\.(gif|jpe?g)</literal></emphasis> - Again 
6387  another path statement with forward slashes. Anything in the square brackets 
6388  <quote>[]</quote> can be matched. This is using <quote>0-9</quote> as a
6389  shorthand expression to mean any digit one through nine. It is the same as
6390  saying <quote>0123456789</quote>. So any digit matches. The <quote>+</quote>
6391  means one or more of the preceding expression must be included. The preceding 
6392  expression here is what is in the square brackets -- in this case, any digit 
6393  one through nine. Then, at the end, we have a grouping: <quote>(gif|jpe?g)</quote>. 
6394  This includes a <quote>|</quote>, so this needs to match the expression on
6395  either side of that bar character also. A simple <quote>gif</quote> on one side, and the other
6396  side will in turn match either <quote>jpeg</quote> or <quote>jpg</quote>,
6397  since the <quote>?</quote> means the letter <quote>e</quote> is optional and
6398  can be matched once or not at all. So we are building an expression here to
6399  match image GIF or JPEG type image file. It must include the literal
6400  string <quote>advert</quote>, then one or more digits, and a <quote>.</quote>
6401  (which is now a literal, and not a special character, since it is escaped
6402  with <quote>\</quote>), and lastly either <quote>gif</quote>, or
6403  <quote>jpeg</quote>, or <quote>jpg</quote>. Some possible matches would
6404  include: <quote>//advert1.jpg</quote>,
6405  <quote>/nasty/ads/advert1234.gif</quote>,
6406  <quote>/banners/from/hell/advert99.jpg</quote>. It would not match
6407  <quote>advert1.gif</quote> (no leading slash), or
6408  <quote>/adverts232.jpg</quote> (the expression does not include an
6409  <quote>s</quote>), or <quote>/advert1.jsp</quote> (<quote>jsp</quote> is not
6410  in the expression anywhere).
6411 </para>
6412
6413 <para>
6414  We are barely scratching the surface of regular expressions here so that you
6415  can understand the default <application>Privoxy</application>
6416  configuration files, and maybe use this knowledge to customize your own
6417  installation. There is much, much more that can be done with regular
6418  expressions. Now that you know enough to get started, you can learn more on
6419  your own :/
6420 </para>
6421
6422 <para>
6423  More reading on Perl Compatible Regular expressions: 
6424  <ulink url="http://www.perldoc.com/perl5.6/pod/perlre.html">http://www.perldoc.com/perl5.6/pod/perlre.html</ulink>
6425 </para>
6426
6427 <para>
6428  For information on regular expression based substititions and their applications
6429  in filters, please see the <link linkend="filter-file">filter file tutorial</link>
6430  in this manual.
6431 </para>
6432 </sect2>
6433
6434 <!--  ~  End section  ~  -->
6435
6436
6437 <!--   ~~~~~       New section      ~~~~~     -->
6438 <sect2>
6439 <title><application>Privoxy</application>'s Internal Pages</title>
6440
6441 <para>
6442  Since <application>Privoxy</application> proxies each requested 
6443  web page, it is easy for <application>Privoxy</application> to 
6444  trap certain special URLs. In this way, we can talk directly to
6445  <application>Privoxy</application>, and see how it is 
6446  configured, see how our rules are being applied, change these 
6447  rules and other configuration options, and even turn
6448  <application>Privoxy's</application> filtering off, all with 
6449  a web browser.
6450
6451 </para>
6452
6453 <para>
6454  The URLs listed below are the special ones that allow direct access 
6455  to <application>Privoxy</application>. Of course,
6456  <application>Privoxy</application> must be running to access these. If 
6457  not, you will get a friendly error message. Internet access is not 
6458  necessary either.
6459 </para>
6460
6461 <para>
6462  <itemizedlist>
6463
6464  <listitem>
6465   <para>  
6466    Privoxy main page: 
6467   </para>
6468   <blockquote>
6469    <para> 
6470      <ulink url="http://config.privoxy.org/">http://config.privoxy.org/</ulink>
6471    </para>
6472   </blockquote>
6473   <para>
6474    There is a shortcut: <ulink url="http://p.p/">http://p.p/</ulink> (But it
6475    doesn't provide a fallback to a real page, in case the request is not
6476    sent through <application>Privoxy</application>)
6477   </para>
6478  </listitem>
6479
6480  <listitem>
6481   <para>  
6482     Show information about the current configuration, including viewing and 
6483     editing of actions files:
6484   </para>
6485    <blockquote>
6486    <para> 
6487     <ulink url="http://config.privoxy.org/show-status">http://config.privoxy.org/show-status</ulink>
6488    </para>
6489   </blockquote>
6490  </listitem>
6491  
6492  <listitem>
6493   <para>  
6494     Show the source code version numbers:
6495   </para>
6496   <blockquote>
6497    <para> 
6498     <ulink url="http://config.privoxy.org/show-version">http://config.privoxy.org/show-version</ulink>
6499    </para>
6500   </blockquote>
6501  </listitem>
6502  
6503  <listitem>
6504   <para>  
6505    Show the browser's request headers:
6506   </para>
6507   <blockquote>
6508    <para> 
6509     <ulink url="http://config.privoxy.org/show-request">http://config.privoxy.org/show-request</ulink>
6510    </para>
6511   </blockquote>
6512  </listitem>
6513  
6514  <listitem>
6515   <para>  
6516    Show which actions apply to a URL and why:
6517   </para>
6518    <blockquote>
6519    <para> 
6520     <ulink url="http://config.privoxy.org/show-url-info">http://config.privoxy.org/show-url-info</ulink>
6521    </para>
6522   </blockquote>
6523  </listitem>
6524  
6525  <listitem>
6526   <para>  
6527    Toggle Privoxy on or off. In this case, <quote>Privoxy</quote> continues 
6528    to run, but only as a pass-through proxy, with no actions taking place:
6529   </para>
6530    <blockquote>
6531    <para> 
6532     <ulink url="http://config.privoxy.org/toggle">http://config.privoxy.org/toggle</ulink>
6533    </para>
6534   </blockquote>
6535   <para>
6536    Short cuts. Turn off, then on: 
6537   </para>
6538    <blockquote>
6539    <para> 
6540      <ulink url="http://config.privoxy.org/toggle?set=disable">http://config.privoxy.org/toggle?set=disable</ulink>
6541    </para>
6542   </blockquote>
6543    <blockquote>
6544    <para> 
6545      <ulink url="http://config.privoxy.org/toggle?set=enable">http://config.privoxy.org/toggle?set=enable</ulink>
6546    </para>
6547   </blockquote>
6548  </listitem>
6549  
6550  </itemizedlist>
6551 </para>
6552
6553 <para>
6554  These may be bookmarked for quick reference. See next.
6555
6556 </para>
6557
6558 <sect3 id="bookmarklets">
6559 <title>Bookmarklets</title>
6560 <para>
6561  Below are some <quote>bookmarklets</quote> to allow you to easily access a
6562  <quote>mini</quote> version of some of <application>Privoxy's</application>
6563  special pages. They are designed for MS Internet Explorer, but should work
6564  equally well in Netscape, Mozilla, and other browsers which support
6565  JavaScript. They are designed to run directly from your bookmarks - not by
6566  clicking the links below (although that should work for testing).
6567 </para>
6568 <para>
6569  To save them, right-click the link and choose <quote>Add to Favorites</quote>
6570  (IE) or <quote>Add Bookmark</quote> (Netscape). You will get a warning that
6571  the bookmark <quote>may not be safe</quote> - just click OK. Then you can run the
6572  Bookmarklet directly from your favorites/bookmarks. For even faster access,
6573  you can put them on the <quote>Links</quote> bar (IE) or the <quote>Personal
6574  Toolbar</quote> (Netscape), and run them with a single click. 
6575 </para>
6576
6577 <para>
6578  <itemizedlist>
6579
6580   <listitem>
6581    <para>
6582     <ulink
6583     url="javascript:void(window.open('http://config.privoxy.org/toggle?mini=y&#38;set=enabled','ijbstatus','width=250,height=100,resizable=yes,scrollbars=no,toolbar=no,location=no,directories=no,status=no,menubar=no,copyhistory=no').focus());">Privoxy - Enable</ulink>
6584    </para>
6585   </listitem> 
6586
6587   <listitem>
6588    <para>
6589     <ulink
6590     url="javascript:void(window.open('http://config.privoxy.org/toggle?mini=y&#38;set=disabled','ijbstatus','width=250,height=100,resizable=yes,scrollbars=no,toolbar=no,location=no,directories=no,status=no,menubar=no,copyhistory=no').focus());">Privoxy - Disable</ulink>
6591    </para>
6592   </listitem> 
6593
6594   <listitem>
6595    <para>
6596     <ulink
6597     url="javascript:void(window.open('http://config.privoxy.org/toggle?mini=y&#38;set=toggle','ijbstatus','width=250,height=100,resizable=yes,scrollbars=no,toolbar=no,location=no,directories=no,status=no,menubar=no,copyhistory=no').focus());">Privoxy - Toggle Privoxy</ulink> (Toggles between enabled and disabled)
6598    </para>
6599   </listitem> 
6600
6601   <listitem>
6602    <para>
6603     <ulink
6604     url="javascript:void(window.open('http://config.privoxy.org/toggle?mini=y','ijbstatus','width=250,height=2,resizable=yes,scrollbars=no,toolbar=no,location=no,directories=no,status=no,menubar=no,copyhistory=no').focus());">Privoxy- View Status</ulink>
6605    </para>
6606   </listitem> 
6607
6608   <listitem>
6609    <para>
6610     <ulink url="javascript:w=Math.floor(screen.width/2);h=Math.floor(screen.height*0.9);void(window.open('http://www.privoxy.org/actions/index.php?url='+escape(location.href),'Feedback','screenx='+w+',width='+w+',height='+h+',scrollbars=yes,toolbar=no,location=no,directories=no,status=no,menubar=no,copyhistory=no').focus());">Privoxy - Submit Actions File Feedback</ulink>
6611    </para>
6612   </listitem> 
6613
6614  </itemizedlist>
6615 </para>
6616
6617 <para>
6618  Credit: The site which gave us the general idea for these bookmarklets is
6619  <ulink url="http://www.bookmarklets.com">www.bookmarklets.com</ulink>. They
6620  have more information about bookmarklets. 
6621 </para>
6622
6623
6624 </sect3>
6625
6626 </sect2>
6627
6628
6629 <!--   ~~~~~       New section      ~~~~~     -->
6630 <sect2 id="chain">
6631 <title>Chain of Events</title>
6632 <para>
6633  Let's take a quick look at the basic sequence of events when a web page is 
6634  requested by your browser and <application>Privoxy</application> is on duty:
6635 </para>
6636
6637 <para>
6638  <itemizedlist>
6639  <listitem>
6640   <para>
6641    First, your web browser requests a web page. The browser knows to send 
6642    the request to <application>Privoxy</application>, which will in turn, 
6643    relay the request to the remote web server after passing the following 
6644    tests: 
6645   </para>
6646  </listitem> 
6647  <listitem>
6648   <para>
6649    <application>Privoxy</application> traps any request for its own internal CGI 
6650    pages (e.g http://p.p/) and sends the CGI page back to the browser.
6651   </para>
6652  </listitem> 
6653  <listitem>
6654   <para>
6655    Next, <application>Privoxy</application> checks to see if the URL 
6656    matches any <link
6657    linkend="BLOCK"><quote>+block</quote></link> patterns. If
6658    so, the URL is then blocked, and the remote web server will not be contacted.
6659    <link linkend="HANDLE-AS-IMAGE"><quote>+handle-as-image</quote></link> 
6660    is then checked and if it does not match, an 
6661    HTML <quote>BLOCKED</quote> page is sent back. Otherwise, if it does match,
6662    an image is returned. The type of image depends on the setting of <link
6663    linkend="SET-IMAGE-BLOCKER"><quote>+set-image-blocker</quote></link>
6664    (blank, checkerboard pattern, or an HTTP redirect to an image elsewhere).
6665   </para>
6666  </listitem> 
6667  <listitem>
6668   <para>
6669    Untrusted URLs are blocked. If URLs are being added to the
6670    <filename>trust</filename> file, then that is done.
6671   </para>
6672  </listitem> 
6673  <listitem>
6674   <para>
6675    If the URL pattern matches the <link
6676    linkend="FAST-REDIRECTS"><quote>+fast-redirects</quote></link> action,
6677    it is then processed. Unwanted parts of the requested URL are stripped.
6678   </para>
6679  </listitem> 
6680  <listitem>
6681   <para>
6682    Now the rest of the client browser's request headers are processed. If any
6683    of these match any of the relevant actions (e.g. <link
6684    linkend="HIDE-USER-AGENT"><quote>+hide-user-agent</quote></link>,
6685    etc.), headers are suppressed or forged as determined by these actions and
6686    their parameters.
6687   </para>
6688  </listitem> 
6689  <listitem>
6690   <para>
6691    Now the web server starts sending its response back (i.e. typically a web page and related 
6692    data).
6693   </para>
6694  </listitem> 
6695  <listitem>
6696   <para>
6697    First, the server headers are read and processed to determine, among other
6698    things, the MIME type (document type) and encoding. The headers are then
6699    filtered as deterimed by the 
6700    <link linkend="CRUNCH-INCOMING-COOKIES"><quote>+crunch-incoming-cookies</quote></link>,
6701    <link linkend="SESSION-COOKIES-ONLY"><quote>+session-cookies-only</quote></link>,
6702    and <link linkend="DOWNGRADE-HTTP-VERSION"><quote>+downgrade-http-version</quote></link>
6703    actions.
6704   </para>
6705  </listitem> 
6706  <listitem>
6707   <para>
6708    If the <link linkend="KILL-POPUPS"><quote>+kill-popups</quote></link>
6709    action applies, and it is an HTML or JavaScript document, the popup-code in the
6710    response is filtered on-the-fly as it is received.
6711   </para>
6712  </listitem> 
6713  <listitem>
6714   <para>
6715    If a <link linkend="FILTER"><quote>+filter</quote></link>
6716    or <link
6717    linkend="DEANIMATE-GIFS"><quote>+deanimate-gifs</quote></link>
6718    action applies (and the document type fits the action), the rest of the page is
6719    read into memory (up to a configurable limit). Then the filter rules (from
6720    <filename>default.filter</filename>) are processed against the buffered
6721    content. Filters are applied in the order they are specified in the
6722    <filename>default.filter</filename> file. Animated GIFs, if present, are
6723    reduced to either the first or last frame, depending on the action
6724    setting.The entire page, which is now filtered, is then sent by
6725    <application>Privoxy</application> back to your browser. 
6726   </para>
6727   <para>
6728    If neither <link linkend="FILTER"><quote>+filter</quote></link>
6729    or <link
6730    linkend="DEANIMATE-GIFS"><quote>+deanimate-gifs</quote></link>
6731    matches, then <application>Privoxy</application> passes the raw data through 
6732    to the client browser as it becomes available.
6733   </para>
6734  </listitem> 
6735  <listitem>
6736   <para>
6737    As the browser receives the now (probably filtered) page content, it 
6738    reads and then requests any URLs that may be embedded within the page
6739    source, e.g. ad images, stylesheets, JavaScript, other HTML documents (e.g.
6740    frames), sounds, etc. For each of these objects, the browser issues a new
6741    request. And each such request is in turn processed as above. Note that a
6742    complex web page may have many such embedded URLs.
6743   </para>
6744  </listitem> 
6745  
6746  </itemizedlist>
6747 </para>
6748
6749 </sect2>
6750
6751
6752 <!--   ~~~~~       New section      ~~~~~     -->
6753 <sect2 id="actionsanat">
6754 <title>Anatomy of an Action</title>
6755
6756 <para>
6757  The way <application>Privoxy</application> applies 
6758  <link linkend="ACTIONS">actions</link> and <link linkend="FILTER">filters</link>
6759  to any given URL can be complex, and not always so
6760  easy to understand what is happening. And sometimes we need to be able to
6761  <emphasis>see</emphasis> just what <application>Privoxy</application> is
6762  doing. Especially, if something <application>Privoxy</application> is doing
6763  is causing us a problem inadvertently. It can be a little daunting to look at
6764  the actions and filters files themselves, since they tend to be filled with
6765  <link linkend="regex">regular expressions</link> whose consequences are not
6766  always so obvious. 
6767 </para>
6768
6769 <para>
6770  One quick test to see if <application>Privoxy</application> is causing a problem 
6771  or not, is to disable it temporarily. This should be the first troubleshooting 
6772  step. See <link linkend="bookmarklets">the Bookmarklets</link> section on a quick 
6773  and easy way to do this (be sure to flush caches afterward!).
6774 </para>
6775
6776 <para>
6777  <application>Privoxy</application> also provides the 
6778  <ulink url="http://config.privoxy.org/show-url-info">http://config.privoxy.org/show-url-info</ulink>
6779  page that can show us very specifically how <application>actions</application>
6780  are being applied to any given URL. This is a big help for troubleshooting.
6781 </para>
6782
6783 <para>
6784  First, enter one URL (or partial URL) at the prompt, and then
6785  <application>Privoxy</application> will tell us 
6786  how the current configuration will handle it. This will not
6787  help with filtering effects (i.e. the <link
6788  linkend="FILTER"><quote>+filter</quote></link> action) from
6789  the <filename>default.filter</filename> file since this is handled very
6790  differently and not so easy to trap! It also will not tell you about any other
6791  URLs that may be embedded within the URL you are testing. For instance, images
6792  such as ads are expressed as URLs within the raw page source of HTML pages. So
6793  you will only get info for the actual URL that is pasted into the prompt area
6794  -- not any sub-URLs. If you want to know about embedded URLs like ads, you
6795  will have to dig those out of the HTML source. Use your browser's <quote>View
6796  Page Source</quote> option for this. Or right click on the ad, and grab the
6797  URL.
6798 </para>
6799
6800 <para>
6801  Let's try an example, <ulink url="http://google.com">google.com</ulink>, 
6802  and look at it one section at a time:
6803 </para>
6804
6805 <para>
6806  <screen>
6807  Matches for http://google.com:
6808
6809  In file: default.action <guibutton>[ View ]</guibutton> <guibutton>[ Edit ]</guibutton>
6810
6811 {-add-header 
6812  -block 
6813  -crunch-outgoing-cookies 
6814  -crunch-incoming-cookies 
6815  +deanimate-gifs{last} 
6816  -downgrade-http-version 
6817  +fast-redirects 
6818  -filter{popups} 
6819  -filter{fun} 
6820  -filter{shockwave-flash} 
6821  -filter{crude-parental} 
6822  +filter{html-annoyances} 
6823  +filter{js-annoyances} 
6824  +filter{content-cookies} 
6825  +filter{webbugs} 
6826  +filter{refresh-tags} 
6827  +filter{nimda} 
6828  +filter{banners-by-size} 
6829  +hide-forwarded-for-headers 
6830  +hide-from-header{block} 
6831  +hide-referer{forge} 
6832  -hide-user-agent 
6833  -handle-as-image 
6834  -kill-popups 
6835  -limit-connect 
6836  +prevent-compression 
6837  -send-vanilla-wafer 
6838  -send-wafer 
6839  +session-cookies-only 
6840  +set-image-blocker{pattern} }
6841 /
6842
6843  { -session-cookies-only }
6844  .google.com
6845
6846  { -fast-redirects }
6847  .google.com
6848
6849 In file: user.action <guibutton>[ View ]</guibutton> <guibutton>[ Edit ]</guibutton>
6850 (no matches in this file)  
6851 </screen>
6852 </para>
6853
6854 <para>
6855  This tells us how we have defined our 
6856  <link linkend="ACTIONS"><quote>actions</quote></link>, and
6857  which ones match for our example, <quote>google.com</quote>. The first listing
6858  is any matches for the <filename>standard.action</filename> file. No hits at
6859  all here on <quote>standard</quote>. Then next is <quote>default</quote>, or
6860  our <filename>default.action</filename> file. The large, multi-line listing,
6861  is how the actions are set to match for all URLs, i.e. our default settings.
6862  If you look at your <quote>actions</quote> file, this would be the section
6863  just below the <quote>aliases</quote> section near the top. This will apply to
6864  all URLs as signified by the single forward slash at the end of the listing
6865  -- <quote>/</quote>.
6866 </para>
6867
6868 <para>
6869  But we can define additional actions that would be exceptions to these general
6870  rules, and then list specific URLs (or patterns) that these exceptions would
6871  apply to. Last match wins. Just below this then are two explicit matches for
6872  <quote>.google.com</quote>. The first is negating our previous cookie setting, 
6873  which was for <link
6874  linkend="SESSION-COOKIES-ONLY"><quote>+session-cookies-only</quote></link>
6875  (i.e. not persistent). So we will allow persistent cookies for google. The
6876  second turns <emphasis>off</emphasis> any 
6877  <link
6878  linkend="FAST-REDIRECTS"><quote>+fast-redirects</quote></link>
6879  action, allowing this to take place unmolested. Note that there is a leading
6880  dot here -- <quote>.google.com</quote>. This will match any hosts and
6881  sub-domains, in the google.com domain also, such as
6882  <quote>www.google.com</quote>. So, apparently, we have these two actions
6883  defined somewhere in the lower part of our <filename>default.action</filename>
6884  file, and <quote>google.com</quote> is referenced somewhere in these latter
6885  sections.
6886 </para>
6887
6888 <para>
6889  Then, for our <filename>user.action</filename> file, we again have no hits.
6890 </para>
6891
6892 <para>
6893  And finally we pull it all together in the bottom section and summarize how
6894  <application>Privoxy</application> is applying all its <quote>actions</quote> 
6895  to <quote>google.com</quote>:
6896
6897 </para>
6898
6899 <para>
6900  <screen>
6901
6902  Final results:
6903  
6904  -add-header 
6905  -block 
6906  -crunch-outgoing-cookies 
6907  -crunch-incoming-cookies 
6908  +deanimate-gifs{last} 
6909  -downgrade-http-version 
6910  -fast-redirects 
6911  -filter{popups} 
6912  -filter{fun} 
6913  -filter{shockwave-flash} 
6914  -filter{crude-parental} 
6915  +filter{html-annoyances} 
6916  +filter{js-annoyances} 
6917  +filter{content-cookies} 
6918  +filter{webbugs} 
6919  +filter{refresh-tags} 
6920  +filter{nimda} 
6921  +filter{banners-by-size} 
6922  +hide-forwarded-for-headers 
6923  +hide-from-header{block} 
6924  +hide-referer{forge} 
6925  -hide-user-agent 
6926  -handle-as-image 
6927  -kill-popups 
6928  -limit-connect 
6929  +prevent-compression 
6930  -send-vanilla-wafer 
6931  -send-wafer
6932  -session-cookies-only 
6933  +set-image-blocker{pattern} 
6934 </screen>
6935 </para>
6936
6937 <para>
6938  Notice the only difference here to the previous listing, is to 
6939  <quote>fast-redirects</quote> and <quote>session-cookies-only</quote>.
6940 </para>
6941
6942 <para>
6943  Now another example, <quote>ad.doubleclick.net</quote>:
6944 </para>
6945
6946 <para>
6947  <screen>
6948
6949  { +block +handle-as-image }
6950   .ad.doubleclick.net
6951
6952  { +block +handle-as-image }
6953   ad*.
6954
6955  { +block +handle-as-image }
6956   .doubleclick.net
6957 </screen>
6958 </para>
6959
6960 <para>
6961  We'll just show the interesting part here, the explicit matches. It is 
6962  matched three different times. Each as an <quote>+block +handle-as-image</quote>,
6963  which is the expanded form of one of our aliases that had been defined as: 
6964  <quote>+imageblock</quote>. (<link
6965  linkend="ALIASES"><quote>Aliases</quote></link> are defined in
6966  the first section of the actions file and typically used to combine more 
6967  than one action.)
6968 </para>
6969
6970 <para>
6971  Any one of these would have done the trick and blocked this as an unwanted 
6972  image. This is unnecessarily redundant since the last case effectively 
6973  would also cover the first. No point in taking chances with these guys 
6974  though ;-) Note that if you want an ad or obnoxious 
6975  URL to be invisible, it should be defined as <quote>ad.doubleclick.net</quote>
6976  is done here -- as both a <link
6977  linkend="BLOCK"><quote>+block</quote></link>
6978  <emphasis>and</emphasis> an 
6979  <link
6980  linkend="HANDLE-AS-IMAGE"><quote>+handle-as-image</quote></link>.
6981  The custom alias <quote>+imageblock</quote> just simplifies the process and make 
6982  it more readable.
6983 </para>
6984
6985 <para>
6986  One last example. Let's try <quote>http://www.rhapsodyk.net/adsl/HOWTO/</quote>.
6987  This one is giving us problems. We are getting a blank page. Hmmm...
6988 </para>
6989
6990 <para>
6991  <screen>
6992
6993  Matches for http://www.rhapsodyk.net/adsl/HOWTO/:
6994
6995  In file: default.action <guibutton>[ View ]</guibutton> <guibutton>[ Edit ]</guibutton>
6996
6997  {-add-header 
6998   -block 
6999   -crunch-incoming-cookies 
7000   -crunch-outgoing-cookies 
7001   +deanimate-gifs 
7002   -downgrade-http-version 
7003   +fast-redirects 
7004   +filter{html-annoyances} 
7005   +filter{js-annoyances} 
7006   +filter{kill-popups} 
7007   +filter{webbugs} 
7008   +filter{nimda} 
7009   +filter{banners-by-size} 
7010   +filter{hal} 
7011   +filter{fun} 
7012   +hide-forwarded-for-headers 
7013   +hide-from-header{block} 
7014   +hide-referer{forge} 
7015   -hide-user-agent 
7016   -handle-as-image 
7017   +kill-popups 
7018   +prevent-compression 
7019   -send-vanilla-wafer 
7020   -send-wafer 
7021   +session-cookies-only 
7022   +set-image-blocker{blank} }
7023    /
7024
7025  { +block +handle-as-image }
7026   /ads
7027 </screen>
7028 </para>
7029
7030 <para>
7031  Ooops, the <quote>/adsl/</quote> is matching <quote>/ads</quote>! But 
7032  we did not want this at all! Now we see why we get the blank page. We could
7033  now add a new action below this that explicitly does <emphasis>not</emphasis>
7034  block (<quote>{-block}</quote>) paths with <quote>adsl</quote>. There are
7035  various ways to handle such exceptions. Example:
7036 </para>
7037
7038 <para>
7039  <screen>
7040
7041  { -block }
7042   /adsl
7043 </screen>
7044 </para>
7045
7046 <para>
7047  Now the page displays ;-) Be sure to flush your browser's caches when 
7048  making such changes. Or, try using <literal>Shift+Reload</literal>.
7049 </para>
7050
7051 <para>
7052  But now what about a situation where we get no explicit matches like 
7053  we did with:
7054 </para>
7055
7056 <para>
7057  <screen>
7058
7059  { +block +handle-as-image }
7060  /ads
7061 </screen>
7062 </para>
7063
7064 <para>
7065  That actually was very telling and pointed us quickly to where the problem
7066  was. If you don't get this kind of match, then it means one of the default 
7067  rules in the first section is causing the problem. This would require some 
7068  guesswork, and maybe a little trial and error to isolate the offending rule.
7069  One likely cause would be one of the <quote>{+filter}</quote> actions. Try 
7070  adding the URL for the site to one of aliases that turn off <quote>+filter</quote>:
7071 </para>
7072
7073 <para>
7074  <screen>
7075
7076  {shop}
7077  .quietpc.com
7078  .worldpay.com   # for quietpc.com
7079  .jungle.com
7080  .scan.co.uk
7081  .forbes.com
7082 </screen>
7083 </para>
7084
7085 <para>
7086  <quote>{shop}</quote> is an <quote>alias</quote> that expands to 
7087  <quote>{ -filter -session-cookies-only }</quote>.
7088  Or you could do your own exception to negate filtering:
7089
7090 </para>
7091
7092 <para>
7093  <screen>
7094
7095  {-filter}
7096  .forbes.com
7097 </screen>
7098 </para>
7099
7100 <para>
7101  This would probably be most appropriately put in <filename>user.action</filename>, 
7102  for local site exceptions.
7103 </para>
7104
7105 <para>
7106  <quote>{fragile}</quote> is an alias that disables most actions. This can be 
7107  used as a last resort for problem sites. Remember to flush caches! If this 
7108  still does not work, you will have to go through the remaining actions one by
7109  one to find which one(s) is causing the problem.
7110 </para>
7111
7112 </sect2>
7113
7114 </sect1>
7115
7116  <!--
7117
7118  This program is free software; you can redistribute it 
7119  and/or modify it under the terms of the GNU General
7120  Public License as published by the Free Software
7121  Foundation; either version 2 of the License, or (at
7122  your option) any later version.
7123
7124  This program is distributed in the hope that it will
7125  be useful, but WITHOUT ANY WARRANTY; without even the
7126  implied warranty of MERCHANTABILITY or FITNESS FOR A
7127  PARTICULAR PURPOSE.  See the GNU General Public
7128  License for more details.
7129
7130  The GNU General Public License should be included with
7131  this file.  If not, you can view it at
7132  http://www.gnu.org/copyleft/gpl.html
7133  or write to the Free Software Foundation, Inc., 59
7134  Temple Place - Suite 330, Boston, MA  02111-1307, USA.
7135
7136  $Log: user-manual.sgml,v $
7137  Revision 1.119  2002/05/22 17:17:05  oes
7138  Added Security hint
7139
7140  Revision 1.118  2002/05/21 04:54:55  hal9
7141  -New Section: Quickstart to Ad Blocking
7142  -Reformat Actions Anatomy to match new CGI layout
7143
7144  Revision 1.117  2002/05/17 13:56:16  oes
7145   - Reworked & extended Templates chapter
7146   - Small changes to Regex appendix
7147   - #included authors.sgml into (C) and hist chapter
7148
7149  Revision 1.116  2002/05/17 03:23:46  hal9
7150  Fixing merge conflict in Quickstart section.
7151
7152  Revision 1.115  2002/05/16 16:25:00  oes
7153  Extended the Filter File chapter & minor fixes
7154
7155  Revision 1.114  2002/05/16 09:42:50  oes
7156  More ulink->link, added some hints to Quickstart section
7157
7158  Revision 1.113  2002/05/15 21:07:25  oes
7159  Extended and further commented the example actions files
7160
7161  Revision 1.112  2002/05/15 03:57:14  hal9
7162  Spell check. A few minor edits here and there for better syntax and
7163  clarification.
7164
7165  Revision 1.111  2002/05/14 23:01:36  oes
7166  Fixing the fixes   
7167
7168  Revision 1.110  2002/05/14 19:10:45  oes
7169  Restored alphabetical order of actions
7170
7171  Revision 1.109  2002/05/14 17:23:11  oes
7172  Renamed the prevent-*-cookies actions, extended aliases section and moved it before the example AFs
7173
7174  Revision 1.108  2002/05/14 15:29:12  oes
7175  Completed proofreading the actions chapter
7176
7177  Revision 1.107  2002/05/12 03:20:41  hal9
7178  Small clarifications for 127.0.0.1 vs localhost for listen-address since this
7179  apparently an important distinction for some OS's.
7180
7181  Revision 1.106  2002/05/10 01:48:20  hal9
7182  This is mostly proposed copyright/licensing additions and changes. Docs
7183  are still GPL, but licensing and copyright are more visible. Also, copyright
7184  changed in doc header comments (eliminate references to JB except FAQ).
7185
7186  Revision 1.105  2002/05/05 20:26:02  hal9
7187  Sorting out license vs copyright in these docs.
7188
7189  Revision 1.104  2002/05/04 08:44:45  swa
7190  bumped version
7191
7192  Revision 1.103  2002/05/04 00:40:53  hal9
7193  -Remove the TOC first page kludge. It's fixed proper now in ldp.dsl.in.
7194  -Some minor additions to Quickstart.
7195
7196  Revision 1.102  2002/05/03 17:46:00  oes
7197  Further proofread & reactivated short build instructions
7198
7199  Revision 1.101  2002/05/03 03:58:30  hal9
7200  Move the user-manual config directive to top of section. Add note about
7201  Privoxy needing read permissions for configs, and write for logs.
7202
7203  Revision 1.100  2002/04/29 03:05:55  hal9
7204  Add clarification on differences of new actions files.
7205
7206  Revision 1.99  2002/04/28 16:59:05  swa
7207  more structure in starting section
7208
7209  Revision 1.98  2002/04/28 05:43:59  hal9
7210  This is the break up of configuration.html into multiple files. This
7211  will probably break links elsewhere :(
7212
7213  Revision 1.97  2002/04/27 21:04:42  hal9
7214  -Rewrite of Actions File example.
7215  -Add section for user-manual directive in config.
7216
7217  Revision 1.96  2002/04/27 05:32:00  hal9
7218  -Add short section to Filter Files to tie in with +filter action.
7219  -Start rewrite of examples in Actions Examples (not finished).
7220
7221  Revision 1.95  2002/04/26 17:23:29  swa
7222  bookmarks cleaned, changed structure of user manual, screen and programlisting cleanups, and numerous other changes that I forgot
7223
7224  Revision 1.94  2002/04/26 05:24:36  hal9
7225  -Add most of Andreas suggestions to Chain of Events section.
7226  -A few other minor corrections and touch up.
7227
7228  Revision 1.92  2002/04/25 18:55:13  hal9
7229  More catchups on new actions files, and new actions names.
7230  Other assorted cleanups, and minor modifications.
7231
7232  Revision 1.91  2002/04/24 02:39:31  hal9
7233  Add 'Chain of Events' section.
7234
7235  Revision 1.90  2002/04/23 21:41:25  hal9
7236  Linuxconf is deprecated on RH, substitute chkconfig.
7237
7238  Revision 1.89  2002/04/23 21:05:28  oes
7239  Added hint for startup on Red Hat
7240
7241  Revision 1.88  2002/04/23 05:37:54  hal9
7242  Add AmigaOS install stuff.
7243
7244  Revision 1.87  2002/04/23 02:53:15  david__schmidt
7245  Updated OSX installation section
7246  Added a few English tweaks here an there
7247
7248  Revision 1.86  2002/04/21 01:46:32  hal9
7249  Re-write actions section.
7250
7251  Revision 1.85  2002/04/18 21:23:23  hal9
7252  Fix ugly typo (mine).
7253
7254  Revision 1.84  2002/04/18 21:17:13  hal9
7255  Spell Redhat correctly (ie Red Hat). A few minor grammar corrections.
7256
7257  Revision 1.83  2002/04/18 18:21:12  oes
7258  Added RPM install detail
7259
7260  Revision 1.82  2002/04/18 12:04:50  oes
7261  Cosmetics
7262
7263  Revision 1.81  2002/04/18 11:50:24  oes
7264  Extended Install section - needs fixing by packagers
7265
7266  Revision 1.80  2002/04/18 10:45:19  oes
7267  Moved text to buildsource.sgml, renamed some filters, details
7268
7269  Revision 1.79  2002/04/18 03:18:06  hal9
7270  Spellcheck, and minor touchups.
7271
7272  Revision 1.78  2002/04/17 18:04:16  oes
7273  Proofreading part 2
7274
7275  Revision 1.77  2002/04/17 13:51:23  oes
7276  Proofreading, part one
7277
7278  Revision 1.76  2002/04/16 04:25:51  hal9
7279  -Added 'Note to Upgraders' and re-ordered the 'Quickstart' section.
7280  -Note about proxy may need requests to re-read config files.
7281
7282  Revision 1.75  2002/04/12 02:08:48  david__schmidt
7283  Remove OS/2 building info... it is already in the developer-manual
7284
7285  Revision 1.74  2002/04/11 00:54:38  hal9
7286  Add small section on submitting actions.
7287
7288  Revision 1.73  2002/04/10 18:45:15  swa
7289  generated
7290
7291  Revision 1.72  2002/04/10 04:06:19  hal9
7292  Added actions feedback  to Bookmarklets section
7293
7294  Revision 1.71  2002/04/08 22:59:26  hal9
7295  Version update. Spell chkconfig correctly :)
7296
7297  Revision 1.70  2002/04/08 20:53:56  swa
7298  ?
7299
7300  Revision 1.69  2002/04/06 05:07:29  hal9
7301  -Add privoxy-man-page.sgml, for man page.
7302  -Add authors.sgml for AUTHORS (and p-authors.sgml)
7303  -Reworked various aspects of various docs.
7304  -Added additional comments to sub-docs.
7305
7306  Revision 1.68  2002/04/04 18:46:47  swa
7307  consistent look. reuse of copyright, history et. al.
7308
7309  Revision 1.67  2002/04/04 17:27:57  swa
7310  more single file to be included at multiple points. make maintaining easier
7311
7312  Revision 1.66  2002/04/04 06:48:37  hal9
7313  Structural changes to allow for conditional inclusion/exclusion of content
7314  based on entity toggles, e.g. 'entity % p-not-stable  "INCLUDE"'. And
7315  definition of internal entities, e.g. 'entity p-version "2.9.13"' that will
7316  eventually be set by Makefile.
7317  More boilerplate text for use across multiple docs.
7318
7319  Revision 1.65  2002/04/03 19:52:07  swa
7320  enhance squid section due to user suggestion
7321
7322  Revision 1.64  2002/04/03 03:53:43  hal9
7323  A few minor bug fixes, and touch ups. Ready for review.
7324
7325  Revision 1.63  2002/04/01 16:24:49  hal9
7326  Define entities to include boilerplate text. See doc/source/*.
7327
7328  Revision 1.62  2002/03/30 04:15:53  hal9
7329  - Fix privoxy.org/config links.
7330  - Paste in Bookmarklets from Toggle page.
7331  - Move Quickstart nearer top, and minor rework.
7332
7333  Revision 1.61  2002/03/29 01:31:08  hal9
7334  Minor update.
7335
7336  Revision 1.60  2002/03/27 01:57:34  hal9
7337  Added more to Anatomy section.
7338
7339  Revision 1.59  2002/03/27 00:54:33  hal9
7340  Touch up intro for new name.
7341
7342  Revision 1.58  2002/03/26 22:29:55  swa
7343  we have a new homepage!
7344
7345  Revision 1.57  2002/03/24 20:33:30  hal9
7346  A few minor catch ups with name change.
7347
7348  Revision 1.56  2002/03/24 16:17:06  swa
7349  configure needs to be generated.
7350
7351  Revision 1.55  2002/03/24 16:08:08  swa
7352  we are too lazy to make a block-built
7353  privoxy logo. hence removed the option.
7354
7355  Revision 1.54  2002/03/24 15:46:20  swa
7356  name change related issue.
7357
7358  Revision 1.53  2002/03/24 11:51:00  swa
7359  name change. changed filenames.
7360
7361  Revision 1.52  2002/03/24 11:01:06  swa
7362  name change
7363
7364  Revision 1.51  2002/03/23 15:13:11  swa
7365  renamed every reference to the old name with foobar.
7366  fixed "application foobar application" tag, fixed
7367  "the foobar" with "foobar". left junkbustser in cvs
7368  comments and remarks to history untouched.
7369
7370  Revision 1.50  2002/03/23 05:06:21  hal9
7371  Touch up.
7372
7373  Revision 1.49  2002/03/21 17:01:05  hal9
7374  New section in Appendix.
7375
7376  Revision 1.48  2002/03/12 06:33:01  hal9
7377  Catching up to Andreas and re_filterfile changes.
7378
7379  Revision 1.47  2002/03/11 13:13:27  swa
7380  correct feedback channels
7381
7382  Revision 1.46  2002/03/10 00:51:08  hal9
7383  Added section on JB internal pages in Appendix.
7384
7385  Revision 1.45  2002/03/09 17:43:53  swa
7386  more distros
7387
7388  Revision 1.44  2002/03/09 17:08:48  hal9
7389  New section on Jon's actions file editor, and move some stuff around.
7390
7391  Revision 1.43  2002/03/08 00:47:32  hal9
7392  Added imageblock{pattern}.
7393
7394  Revision 1.42  2002/03/07 18:16:55  swa
7395  looks better
7396
7397  Revision 1.41  2002/03/07 16:46:43  hal9
7398  Fix a few markup problems for jade.
7399
7400  Revision 1.40  2002/03/07 16:28:39  swa
7401  provide correct feedback channels
7402
7403  Revision 1.39  2002/03/06 16:19:28  hal9
7404  Note on perceived filtering slowdown per FR.
7405
7406  Revision 1.38  2002/03/05 23:55:14  hal9
7407  Stupid I did it again. Double hyphen in comment breaks jade.
7408
7409  Revision 1.37  2002/03/05 23:53:49  hal9
7410  jade barfs on '- -' embedded in comments. - -user option broke it.
7411
7412  Revision 1.36  2002/03/05 22:53:28  hal9
7413  Add new - - user option.
7414
7415  Revision 1.35  2002/03/05 00:17:27  hal9
7416  Added section on command line options.
7417
7418  Revision 1.34  2002/03/04 19:32:07  oes
7419  Changed default port to 8118
7420
7421  Revision 1.33  2002/03/03 19:46:13  hal9
7422  Emphasis on where/how to report bugs, etc
7423
7424  Revision 1.32  2002/03/03 09:26:06  joergs
7425  AmigaOS changes, config is now loaded from PROGDIR: instead of
7426  AmiTCP:db/junkbuster/ if no configuration file is specified on the
7427  command line.
7428
7429  Revision 1.31  2002/03/02 22:45:52  david__schmidt
7430  Just tweaking
7431
7432  Revision 1.30  2002/03/02 22:00:14  hal9
7433  Updated 'New Features' list. Ran through spell-checker.
7434
7435  Revision 1.29  2002/03/02 20:34:07  david__schmidt
7436  Update OS/2 build section
7437
7438  Revision 1.28  2002/02/24 14:34:24  jongfoster
7439  Formatting changes.  Now changing the doctype to DocBook XML 4.1
7440  will work - no other changes are needed.
7441
7442  Revision 1.27  2002/01/11 14:14:32  hal9
7443  Added a very short section on Templates
7444
7445  Revision 1.26  2002/01/09 20:02:50  hal9
7446  Fix bug re: auto-detect config file changes.
7447
7448  Revision 1.25  2002/01/09 18:20:30  hal9
7449  Touch ups for *.action files.
7450
7451  Revision 1.24  2001/12/02 01:13:42  hal9
7452  Fix typo.
7453
7454  Revision 1.23  2001/12/02 00:20:41  hal9
7455  Updates for recent changes.
7456
7457  Revision 1.22  2001/11/05 23:57:51  hal9
7458  Minor update for startup now daemon mode.
7459
7460  Revision 1.21  2001/10/31 21:11:03  hal9
7461  Correct 2 minor errors
7462
7463  Revision 1.18  2001/10/24 18:45:26  hal9
7464  *** empty log message ***
7465
7466  Revision 1.17  2001/10/24 17:10:55  hal9
7467  Catching up with Jon's recent work, and a few other things.
7468
7469  Revision 1.16  2001/10/21 17:19:21  swa
7470  wrong url in documentation
7471
7472  Revision 1.15  2001/10/14 23:46:24  hal9
7473  Various minor changes. Fleshed out SEE ALSO section.
7474
7475  Revision 1.13  2001/10/10 17:28:33  hal9
7476  Very minor changes.
7477
7478  Revision 1.12  2001/09/28 02:57:04  hal9
7479  Ditto :/
7480
7481  Revision 1.11  2001/09/28 02:25:20  hal9
7482  Ditto.
7483
7484  Revision 1.9  2001/09/27 23:50:29  hal9
7485  A few changes. A short section on regular expression in appendix.
7486
7487  Revision 1.8  2001/09/25 00:34:59  hal9
7488  Some additions, and re-arranging.
7489
7490  Revision 1.7  2001/09/24 14:31:36  hal9
7491  Diddling.
7492
7493  Revision 1.6  2001/09/24 14:10:32  hal9
7494  Including David's OS/2 installation instructions.
7495
7496  Revision 1.2  2001/09/13 15:27:40  swa
7497  cosmetics
7498
7499  Revision 1.1  2001/09/12 15:36:41  swa
7500  source files for junkbuster documentation
7501
7502  Revision 1.3  2001/09/10 17:43:59  swa
7503  first proposal of a structure.
7504
7505  Revision 1.2  2001/06/13 14:28:31  swa
7506  docs should have an author.
7507
7508  Revision 1.1  2001/06/13 14:20:37  swa
7509  first import of project's documentation for the webserver.
7510
7511  -->
7512
7513 </article>