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