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