Added RPM install detail
[privoxy.git] / doc / source / user-manual.sgml
1 <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook V3.1//EN" [
2 <!entity % dummy "INCLUDE"> 
3 <!entity supported SYSTEM "supported.sgml">
4 <!entity newfeatures SYSTEM "newfeatures.sgml">
5 <!entity p-intro SYSTEM "privoxy.sgml">
6 <!entity seealso SYSTEM "seealso.sgml">
7 <!entity buildsource SYSTEM "buildsource.sgml">
8 <!entity contacting SYSTEM "contacting.sgml">
9 <!entity history SYSTEM "history.sgml">
10 <!entity copyright SYSTEM "copyright.sgml">
11 <!entity p-version "2.9.14">
12 <!entity p-status "beta">
13 <!entity % p-not-stable "INCLUDE">
14 <!entity % p-stable "IGNORE">
15 <!entity % p-text "IGNORE">        <!-- define we are not a text only doc -->
16 <!entity % p-doc "INCLUDE">        <!-- and we are a formal doc           -->
17 <!entity % p-readme "IGNORE">
18 <!entity % p-supp-userman "IGNORE"> <!-- Omit some from supported.sgml    -->
19 ]>
20 <!--
21  File        :  $Source: /cvsroot/ijbswa/current/doc/source/user-manual.sgml,v $
22
23  Purpose     :  user manual
24                 This file belongs into
25                 ijbswa.sourceforge.net:/home/groups/i/ij/ijbswa/htdocs/
26                 
27  $Id: user-manual.sgml,v 1.82 2002/04/18 12:04:50 oes Exp $
28
29  Written by and Copyright (C) 2001 the SourceForge
30  Privoxy team. http://www.privoxy.org/
31
32  Based on the Internet Junkbuster originally written
33  by and Copyright (C) 1997 Anonymous Coders and 
34  Junkbusters Corporation.  http://www.junkbusters.com
35
36
37  ========================================================================
38  NOTE: Please read developer-manual/documentation.html before touching 
39  anything in this, or other Privoxy documentation.
40  ========================================================================
41
42 -->
43
44 <article id="index">
45 <artheader>
46 <title>Privoxy User Manual</title>
47
48 <pubdate>$Id: user-manual.sgml,v 1.82 2002/04/18 12:04:50 oes Exp $</pubdate>
49
50 <authorgroup>
51  <author>
52   <affiliation>
53    <orgname>By: Privoxy Developers</orgname>
54    </affiliation>
55  </author>
56 </authorgroup>
57
58 <abstract>
59 <![%dummy;[
60  <para>
61  <comment>
62   This is here to keep vim syntax file from breaking :/
63   If I knew enough to fix it, I would.
64   PLEASE DO NOT REMOVE! HB: hal@foobox.net
65  </comment>
66  </para>
67 ]]>
68
69  <para>
70   The user manual gives users information on how to install, configure and use
71   <ulink
72   url="http://www.privoxy.org/"><application>Privoxy</application></ulink>.
73   </para>
74
75 <!-- Include privoxy.sgml boilerplate: -->
76  &p-intro;
77 <!-- end privoxy.sgml -->
78
79  <para>
80   You can find the latest version of the user manual at  <ulink
81   url="http://www.privoxy.org/user-manual/">http://www.privoxy.org/user-manual/</ulink>.
82   Please see the <ulink url="contact.html">Contact section</ulink> on how to
83   contact the developers.
84   </para>
85
86 <!--   <para> -->
87 <!--    Feel free to send a note to the developers at <email>ijbswa-developers@lists.sourceforge.net</email>. -->
88 <!--   </para> -->
89 </abstract>
90
91 </artheader>
92
93 <!--   ~~~~~       New section      ~~~~~     -->
94 <sect1 id="intro" label=""><title></title>
95 <!-- dummy section to force TOC on page by itself -->
96 <!-- DO NOT REMOVE! please ;) -->
97 <para> </para>
98 </sect1>
99
100 <!--   ~~~~~       New section      ~~~~~     -->
101
102 <sect1 label="1" id="introduction"><title>Introduction</title>
103
104 <para>
105  This documentation is included with the current &p-status; version of
106  <application>Privoxy</application>, v.&p-version;<![%p-not-stable;[, 
107  and is mostly complete at this point. The most up to date reference for the
108  time being is still the comments in the source files and in the individual
109  configuration files. Development of version 3.0 is currently nearing
110  completion, and includes many significant changes and enhancements over
111  earlier versions. The target release date for
112  stable v3.0 is <quote>soon</quote> ;-)]]>.
113 </para>
114
115 <![%p-not-stable;[
116 <!-- include only in non-stable versions -->
117 <para>
118  Since this is a &p-status; version, not all new features are well tested. This
119  documentation may be slightly out of sync as a result (especially with 
120  CVS sources). And there <emphasis>may be</emphasis> bugs, though hopefully
121  not many! 
122 </para>
123 ]]>
124
125 <!--   ~~~~~       New section      ~~~~~     -->
126 <sect2 id="newfeatures">
127 <title>New Features</title>
128 <para>
129  In addition to <application>Internet Junkbuster's</application> traditional
130  features of ad and banner blocking and cookie management,
131  <application>Privoxy</application> provides new features<![%p-not-stable;[,
132  some of them currently under development]]>:
133 <anchor id="testing"/>
134 </para>
135
136 <!-- Include newfeatures.sgml boilerplate here: -->
137  &newfeatures;
138 <!-- end boilerplate -->
139 </sect2>
140
141 </sect1>
142
143 <!--  ~  End section  ~  -->
144
145
146 <!--   ~~~~~       New section      ~~~~~     -->
147 <sect1 id="installation"><title>Installation</title>
148
149 <para>
150  <application>Privoxy</application> is available both in convenient pre-compiled
151  packages for a wide range of operating systems, and as raw source code.
152  For most users, we recommend using the packages, which can be downloaded from our
153  <ulink url="http://sourceforge.net/projects/ijbswa/">Privoxy Project Page</ulink>.
154 </para>
155
156 <para>
157  If you like to live on the bleeding edge and are not afraid of using
158  possibly unstable development versions, you can check out the up-to-the-minute
159  version directly from <ulink url="http://sourceforge.net/cvs/?group_id=11118">the
160  CVS repository</ulink> or simply download <ulink
161  url="http://cvs.sourceforge.net/cvstarballs/ijbswa-cvsroot.tar.gz">the nightly CVS
162  tarball.</ulink>
163 </para>
164
165 <!-- Include supported.sgml boilerplate -->
166  &supported; 
167 <!-- end boilerplate -->
168
169 <!--   ~~~~~       New section      ~~~~~     -->
170 <sect2 id="installation-packages"><title>Binary Packages</title>
171
172 <para>
173  Note: If you have a previous <application>Junkbuster</application> or
174  <application>Privoxy</application> installation on your system, you
175  will either need to remove it, or that might be done by the setup 
176  procedure. (See below for your platform).
177 </para>
178
179 <para>
180  In any case <emphasis>be sure to backup your old configuration
181  if it is valuable to you.</emphasis> In that case, also see the
182  <link linkend="upgradersnote">note to upgraders</link>.
183 </para>
184
185 <para>
186  How to install the binary packages depends on your operating system:
187 </para>
188
189 <!--   ~~~~~       New section      ~~~~~     -->
190 <sect3 id="installation-pack-rpm"><title>Redhat and SuSE RPMs</title>
191
192 <para>
193  RPMs can be installed with <literal>rpm -Uvh &lt;name-of-rpm.rpm&gt;</literal>,
194  and will use <filename>/etc/privoxy</filename> for configuration files.
195 </para>
196
197 <para>
198  Note that if you have a <application>Junkbuster</application> RPM installed
199  on your system, you need to remove it first, because the packages conflict.
200  Otherwise, RPM will try removing Junkbuster automaticaly, before installing
201  privoxy. 
202 </para>
203 </sect3>
204
205 <!--   ~~~~~       New section      ~~~~~     -->
206 <sect3 id="installation-deb"><title>Debian</title>
207 <para>
208  FIXME.
209 </para>
210 </sect3>
211
212 <!--   ~~~~~       New section      ~~~~~     -->
213 <sect3 id="installation-pack-win"><title>Windows</title>
214
215 <para>
216  Just double-click the installer, which will guide you through
217  the installation process.
218 </para>
219 </sect3>
220
221 <!--   ~~~~~       New section      ~~~~~     -->
222 <sect3 id="installation-pack-bintgz"><title>Solaris, NetBSD, FreeBSD, HP-UX</title>
223
224 <para>
225  Create a new directory, <literal>cd</literal> to it, then unzip and
226  untar the archive. For the most part, you'll have to figure out where
227  things go. FIXME.
228 </para>
229 </sect3>
230
231 <!--   ~~~~~       New section      ~~~~~     -->
232 <sect3 id="installation-os2"><title>OS/2</title>
233
234 <para>
235  First, make sure that no previous installations of
236  <application>Junkbuster</application> and / or 
237  <application>Privoxy</application> are left on your
238  system.
239 </para>
240
241 <para>
242  Then, just double-click the WarpIN self-installing archive, which will
243  guide you through the installation process. A shadow of the
244  <application>Privoxy</application> executable will be placed in your
245  startup folder so it will start automatically whenever OS/2 starts.
246 </para>
247
248 <para>
249  The directory you choose to install <application>Privoxy</application>
250  into will contain all of the configuration files.
251 </para>
252 </sect3>
253
254 <!--   ~~~~~       New section      ~~~~~     -->
255 <sect3 id="installation-mac"><title>Max OSX</title>
256 <para>
257  FIXME.
258 </para>
259 </sect3>
260
261 <!--   ~~~~~       New section      ~~~~~     -->
262 <sect3 id="installation-amiga"><title>AmigaOS</title>
263 <para>
264  Unpack the <literal>.lha</literal> archive, then FIXME.
265 </para>
266 </sect3>
267 </sect2>
268
269 <!--   ~~~~~       New section      ~~~~~     -->
270 <sect2 id="installation-source"><title>Building from Source</title>
271
272 <!-- include buildsource.sgml boilerplate: -->
273 &buildsource;
274 <!-- end boilerplate -->
275 </sect2>
276
277 </sect1>
278
279 <!--  ~  End section  ~  -->
280
281
282 <!--   ~~~~~       New section      ~~~~~     -->
283
284 <sect1 id="quickstart"><title>Quickstart to Using <application>Privoxy</application></title>
285
286
287 <!--   ~~~~~       New section      ~~~~~     -->
288 <sect2 id="upgradersnote">
289 <title>Note to Upgraders</title>
290 <para>
291  There are very significant changes from older versions of 
292  <application>Junkbuster</application> to the current
293  <application>Privoxy</application>. Configuration is substantially 
294  changed. <application>Junkbuster 2.0.x</application> and earlier 
295  configuration files will not migrate. The functionality of the old
296  <filename>blockfile</filename>, <filename>cookiefile</filename> and
297  <filename>imagelist</filename>, are now combined into the
298  <quote>actions file</quote>  (<filename>default.action</filename>
299  for most installations).
300 </para>
301 <para>
302  A <quote>filter file</quote> (typically <filename>default.filter</filename>)
303  is new with <application>Privoxy 2.9.x</application>, and provides some
304  of the new  sophistication (explained below). <filename>config</filename> is 
305  much the same as before.
306 </para>
307 <para>
308  If upgrading from a 2.0.x version, you will have to use the new config 
309  files, and possibly adapt any personal rules from your older files.
310  When porting personal rules over from the old <filename>blockfile</filename>
311  to the new actions file, please note that even the pattern syntax has
312  changed.
313  If upgrading from 2.9.x development versions, it is still recommended 
314  to use the new configuration files.
315 </para>
316 <para>
317  A quick list of things to be aware of before upgrading: 
318 </para>
319
320 <para>
321  <itemizedlist>
322
323  <listitem>
324   <para>
325    The default listening port is now 8118 due to a conflict with another 
326    service (NAS).
327   </para>
328  </listitem>  
329  <listitem>
330   <para>  
331     Some installers may remove earlier versions completely. Save any 
332     important configuration files!
333   </para>
334  </listitem>
335  <listitem>
336   <para>
337    <application>Privoxy</application> is controllable with a web browser 
338    at the special URL: <ulink
339    url="http://config.privoxy.org/">http://config.privoxy.org/</ulink>
340    (Shortcut: <ulink url="http://p.p/">http://p.p/</ulink>). Many
341    aspects of configuration can be done here, including temporarily disabling
342    <application>Privoxy</application>.
343   </para>
344  </listitem> 
345  <listitem>
346   <para>
347    The primary configuration file for cookie management, ad and banner 
348    blocking, and many other aspects of <application>Privoxy</application>
349    configuration is <filename>default.action</filename>. It is strongly
350    recommended to become familiar with the new actions concept below, 
351    before modifying this file.
352   </para>
353  </listitem> 
354   <listitem>
355   <para>
356 <!-- I think it is best to keep this somewhat vague, in case  -->
357 <!-- the situation changes under our feet. -->   
358    Some installers may not automatically start
359    <application>Privoxy</application> after installation.
360   </para>
361  </listitem> 
362
363  </itemizedlist>
364 </para>
365
366 </sect2>
367
368 <!--   ~~~~~       New section      ~~~~~     -->
369 <sect2 id="startup">
370 <title>Starting <application>Privoxy</application></title>
371 <para>
372  Before launching <application>Privoxy</application> for the first time, you 
373  will want to configure your browser(s) to use <application>Privoxy</application>
374  as a HTTP and HTTPS proxy. The default is localhost for the proxy address,
375  and port 8118 (earlier versions used port 8000). This is the one required 
376  configuration that must be done! 
377 </para>
378  
379 <para> 
380  With <application>Netscape</application> (and
381  <application>Mozilla</application>), this can be set under <literal>Edit
382  -&gt; Preferences -&gt; Advanced -&gt; Proxies -&gt; HTTP Proxy</literal>.
383  For <application>Internet Explorer</application>: <literal>Tools -&gt;
384  Internet Properties -&gt; Connections -&gt; LAN Setting</literal>. Then,
385  check <quote>Use Proxy</quote> and fill in the appropriate info (Address:
386  localhost, Port: 8118). Include if HTTPS proxy support too.
387 </para>
388
389 <para>
390  After doing this, flush your browser's disk and memory caches to force a
391  re-reading of all pages and to get rid of any ads that may be cached. You 
392  are now ready to start enjoying the benefits of using
393  <application>Privoxy</application>.
394 </para>
395
396
397 <para>
398  <application>Privoxy</application> is typically started by specifying the
399  main configuration file to be used on the command line. Example Unix startup
400  command:
401 </para>
402
403 <para>
404  <screen>
405  
406  # /usr/sbin/privoxy /etc/privoxy/config
407  
408  </screen>
409 </para>
410
411 <para>
412  An init script is provided for SuSE and Redhat.
413 </para>
414
415 <para>
416  For for SuSE: <command>rcprivoxy start</command>
417 </para>
418
419 <para>
420  For RedHat: <command>/etc/rc.d/init.d/privoxy start</command>
421 </para>
422
423
424 <para>
425  If no configuration file is specified on the command line,
426  <application>Privoxy</application> will look for a file named
427  <filename>config</filename> in the current directory. Except on Win32 where
428  it will try <filename>config.txt</filename>. If no file is specified on the
429  command line and no default configuration file can be found, 
430  <application>Privoxy</application> will fail to start.
431 </para>
432
433
434 <para>
435  The included default configuration files should give a reasonable starting
436  point. Most of the per site configuration is done in the
437  <quote>actions</quote> files. These are where various cookie actions are
438  defined, ad and banner blocking, and other aspects of
439  <application>Privoxy</application> configuration. There are several such
440  files included, with varying levels of aggressiveness. 
441 </para>
442
443 <para>
444  You will probably want to keep an eye out for sites that require persistent
445  cookies, and add these to <filename>default.action</filename> as needed. By
446  default, most of these will be accepted only during the current browser
447  session (aka <quote>session cookies</quote>), until you add them to the
448  configuration. If you want the browser to handle this instead, you will need
449  to edit <filename>default.action</filename> and disable this feature. If you
450  use more than one browser, it would make more sense to let
451  <application>Privoxy</application> handle this. In which case, the
452  browser(s) should be set to accept all cookies.
453 </para>
454
455 <para>
456  Another feature where you will probably want to define exceptions for trusted
457  sites is the popup-killing (through the <literal>+popup</literal> and
458  <literal>+filter{popups}</literal> actions), because your favorite shopping,
459  banking, or leisure site may need popups. 
460 </para>
461
462 <para>
463  <application>Privoxy</application> is HTTP/1.1 compliant,  but not all of
464  the optional 1.1 features are as yet supported. In the unlikely event that
465  you experience inexplicable problems with browsers that use HTTP/1.1 per default
466  (like <application>Mozilla</application> or recent versions of I.E.), you might
467  try to force HTTP/1.0 compatibility. For Mozilla, look under <literal>Edit -&gt;
468  Preferences -&gt; Debug -&gt; Networking</literal>.
469  Alternatively, set the <quote>+downgrade</quote> config option in
470  <filename>default.action</filename> which will downgrade your browser's HTTP
471  requests from HTTP/1.1 to HTTP/1.0 before processing them.
472 </para>
473
474 <para>
475  After running <application>Privoxy</application> for a while, you can 
476  start to fine tune the configuration to suit your personal, or site, 
477  preferences and requirements. There are many, many aspects that can 
478  be customized. <quote>Actions</quote> (as specified in <filename>default.action</filename>) 
479  can be adjusted by pointing your browser to 
480  <ulink url="http://config.privoxy.org/">http://config.privoxy.org/</ulink>
481  (shortcut: <ulink url="http://p.p/">http://p.p/</ulink>), 
482  and then follow the link to <quote>edit the actions list</quote>. 
483  (This is an internal page and does not require Internet access.)
484 </para>
485
486 <para>
487  In fact, various aspects of <application>Privoxy</application>
488  configuration can be viewed from this page, including 
489  current configuration parameters, source code version numbers, 
490  the browser's request headers, and <quote>actions</quote> that apply 
491  to a given URL. In addition to the <filename>default.action</filename> file 
492  editor mentioned above, <application>Privoxy</application> can also 
493  be turned <quote>on</quote> and <quote>off</quote> (toggled) from this page.
494 </para>
495
496 <para>
497  If you encounter problems, try loading the page without
498  <application>Privoxy</application>. If that helps, enter the URL where
499  you have the problems into <ulink url="http://p.p/show-url-info">the browser
500  based rule tracing utility</ulink>. See which rules apply and why, and
501  then try turning them off for that site one after the other, until the problem
502  is gone. When you have found the culprit, you might want to turn the rest on
503  again.
504 </para>
505
506 <para>
507  If the above paragraph sounds gibberish to you, you might want to <ulink
508  url="configuration.html#ACTIONSFILE">read more about the actions concept</ulink>
509  or even dive deep into the <ulink url="appendix.html#ACTIONSANAT">Appendix
510  on actions</ulink>.
511 </para>
512
513 <para>
514  If you can't get rid of the problem at all, think you've found a bug in
515  Privoxy, want to propose a new feature or smarter rules, please see the 
516  chapter "Contacting the Developers, .." below.
517 </para>
518
519 </sect2>
520
521
522 <!--   ~~~~~       New section      ~~~~~     -->
523 <sect2>
524 <title>Command Line Options</title>
525 <para>
526  <application>Privoxy</application> may be invoked with the following
527  command-line options:
528 </para>
529
530 <para>
531  <itemizedlist>
532
533  <listitem>
534   <para>
535     <emphasis>--version</emphasis>
536   </para>
537   <para>
538      Print version info and exit, Unix only.
539   </para>
540  </listitem> 
541  <listitem>
542   <para>
543     <emphasis>--help</emphasis>
544   </para>
545   <para>
546    Print a short usage info and exit, Unix only.
547   </para>
548  </listitem> 
549  <listitem>
550   <para>
551    <emphasis>--no-daemon</emphasis>
552   </para>
553   <para>
554    Don't become a daemon, i.e. don't fork and become process group
555    leader, don't detach from controlling tty. Unix only.
556   </para>
557  </listitem> 
558  <listitem>
559   <para>
560    <emphasis>--pidfile FILE</emphasis>
561   
562   </para>
563   <para>
564    On startup, write the process ID to <emphasis>FILE</emphasis>. Delete the
565    <emphasis>FILE</emphasis> on exit. Failure to create or delete the
566    <emphasis>FILE</emphasis> is non-fatal. If no <emphasis>FILE</emphasis>
567    option is given, no PID file will be used. Unix only.
568   </para>
569  </listitem> 
570  <listitem>
571   <para>
572    <emphasis>--user USER[.GROUP]</emphasis>
573   
574   </para>
575   <para>
576    After (optionally) writing the PID file, assume the user  ID  of
577    <emphasis>USER</emphasis>, and if included the GID of GROUP.  Exit if the
578    privileges are not sufficient to do so. Unix only.
579   </para>
580  </listitem> 
581  <listitem>
582   <para>
583     <emphasis>configfile</emphasis>
584   </para>
585   <para>
586     If no <emphasis>configfile</emphasis> is included on the command line, 
587     <application>Privoxy</application> will look for a file named 
588     <quote>config</quote> in the current directory (except on Win32 
589     where it will look for <quote>config.txt</quote> instead). Specify 
590     full path to avoid confusion.
591   </para>
592  </listitem> 
593
594  </itemizedlist>
595 </para>
596
597 </sect2>
598
599 </sect1>
600
601 <!--  ~  End section  ~  -->
602
603
604 <!--   ~~~~~       New section      ~~~~~     -->
605 <sect1 id="configuration"><title><application>Privoxy</application> Configuration</title>
606  <para>
607   All <application>Privoxy</application> configuration is stored  
608   in text files. These files can be edited with a text editor.
609   Many important aspects of <application>Privoxy</application> can 
610   also be controlled easily with a web browser.
611
612  </para>
613
614
615 <!--   ~~~~~       New section      ~~~~~     -->
616
617 <sect2>
618 <title>Controlling <application>Privoxy</application> with Your Web Browser</title>
619 <para>
620  <application>Privoxy</application>'s user interface can be reached through the special 
621  URL <ulink url="http://config.privoxy.org/">http://config.privoxy.org/</ulink>
622  (shortcut: <ulink url="http://p.p/">http://p.p/</ulink>), 
623  which is a built-in page and works without Internet access.
624  You will see the following section:
625
626 </para>
627
628 <para>
629  <screen>
630
631 Please choose from the following options:
632
633     * Privoxy main page
634     * Show information about the current configuration
635     * Show the source code version numbers
636     * Show the request headers.
637     * Show which actions apply to a URL and why
638     * Toggle Privoxy on or off
639     * Edit the actions list
640
641  </screen>
642 </para>
643
644 <para>
645  This should be self-explanatory. Note the last item is an editor for the
646  <quote>actions list</quote>, which is where much of the ad, banner, cookie,
647  and URL blocking magic is configured as well as other advanced features of
648  <application>Privoxy</application>. This is an easy way to adjust various
649  aspects of <application>Privoxy</application> configuration. The actions
650  file, and other configuration files, are explained in detail below. 
651 </para>
652
653 <para>
654  <quote>Toggle Privoxy On or Off</quote> is handy for sites that might 
655  have problems with your current actions and filters. You can in fact use
656  it as a test to see whether it is <application>Privoxy</application> 
657  causing the problem or not. <application>Privoxy</application> continues 
658  to run as a proxy in this case, but all filtering is disabled. There
659  is even a toggle Bookmarklet offered, so that you can toggle
660  <application>Privoxy</application> with one click from your browser.
661
662 </para>
663
664 </sect2>
665
666 <!--  ~  End section  ~  -->
667
668
669
670
671 <!--   ~~~~~       New section      ~~~~~     -->
672
673 <sect2>
674 <title>Configuration Files Overview</title>
675 <para>
676  For Unix, *BSD and Linux, all configuration files are located in
677  <filename>/etc/privoxy/</filename> by default. For MS Windows, OS/2, and
678  AmigaOS these are all in the same directory as the 
679  <application>Privoxy</application> executable. <![%p-not-stable;[ The name
680  and number of configuration files has changed from previous versions, and is
681  subject to change as development progresses.]]>
682 </para>
683
684 <para>
685  The installed defaults provide a reasonable starting point, though possibly
686  aggressive by some standards. For the time being, there are only three
687  default configuration files (this may change in time):
688 </para>
689
690 <para>
691  <itemizedlist>
692
693   <listitem>
694    <para>
695      The main configuration file is named <filename>config</filename>
696      on Linux, Unix, BSD, OS/2, and AmigaOS and <filename>config.txt</filename>
697      on Windows.
698    </para>
699   </listitem> 
700
701   <listitem>
702    <para>
703     <filename>default.action</filename> (the actions file) is used to define
704     which of a set of various <quote>actions</quote> relating to images, banners, 
705     pop-ups, access restrictions, banners and cookies are to be applied where.
706     There is a web based editor for this file that can be accessed at <ulink
707     url="http://config.privoxy.org/edit-actions/">http://config.privoxy.org/edit-actions/</ulink>
708     (Shortcut: <ulink url="http://p.p/edit-actions/">http://p.p/edit-actions/</ulink>).
709     (Other actions files are included as well with differing levels of filtering 
710     and blocking, e.g. <filename>basic.action</filename>.)
711    </para>
712   </listitem> 
713
714   <listitem>
715    <para>
716     <filename>default.filter</filename> (the filter file) can be used to re-write the raw
717     page content, including viewable text as well as embedded HTML and JavaScript,
718     and whatever else lurks on any given web page. The filtering jobs are only
719     pre-defined here; whether to apply them or not is up to the actions file.
720    </para>
721   </listitem> 
722
723  </itemizedlist>
724 </para>
725
726 <para>
727  All files use the <quote><literal>#</literal></quote> character to denote a
728  comment (the rest of the line will be ignored) and understand line continuation
729  through placing a backslash ("<literal>\</literal>") as the very last character
730  in a line. If the <literal>#</literal> is preceded by a backslash, it looses
731  its special function. Placing a <literal>#</literal> in front of an otherwise
732  valid configuration line to prevent it from being interpreted is called "commenting
733  out" that line.
734 </para>
735
736 <para>
737  <filename>default.action</filename> and <filename>default.filter</filename> 
738  can use Perl style regular expressions for maximum flexibility.
739 </para>
740
741 <para>
742  After making any changes, there is no need to restart
743  <application>Privoxy</application> in order for the changes to take
744  effect. <application>Privoxy</application> detects such changes 
745  automatically. Note, however, that it may take one or two additional
746  requests for the change to take effect. When changing the listening address
747  of <application>Privoxy</application>, these <quote>wake up</quote> requests
748  must obviously be sent to the <emphasis>old</emphasis> listening address.
749 </para>
750
751 <![%p-not-stable;[
752 <para>
753  While under development, the configuration content is subject to change. 
754  The below documentation may not be accurate by the time you read this. 
755  Also, what constitutes a <quote>default</quote> setting, may change, so 
756  please check all your configuration files on important issues.
757 </para>
758 ]]>
759 </sect2>
760
761
762 <!--   ~~~~~       New section      ~~~~~     -->
763
764 <sect2>
765 <title>The Main Configuration File</title>
766 <para>
767  Again, the main configuration file is named <filename>config</filename> on
768  Linux/Unix/BSD and OS/2, and <filename>config.txt</filename> on Windows.
769  Configuration lines consist of an initial keyword followed by a list of
770  values, all separated by whitespace (any number of spaces or tabs). For
771  example:
772 </para>
773
774 <para>
775  <literal>
776   <msgtext> 
777    <literallayout>
778   <emphasis>confdir /etc/privoxy</emphasis>
779    </literallayout>
780   </msgtext>
781  </literal> 
782 </para>
783
784 <para>
785  Assigns the value <literal>/etc/privoxy</literal> to the option
786  <literal>confdir</literal> and thus indicates that the configuration
787  directory is named <quote>/etc/privoxy/</quote>.
788 </para>
789
790 <para>
791  All options in the config file except for <literal>confdir</literal> and
792  <literal>logdir</literal> are optional. Watch out in the below description
793  for what happens if you leave them unset.
794 </para>
795
796 <para>
797  The main config file controls all aspects of <application>Privoxy</application>'s
798  operation that are not location dependent (i.e. they apply universally, no matter
799  where you may be surfing).
800 </para>
801
802
803 <!--   ~~~~~       New section      ~~~~~     -->
804
805 <sect3>
806 <title>Configuration and Log File Locations</title>
807
808 <para>
809  <application>Privoxy</application> can (and normally does) use a number of
810  other files for additional configuration and logging.
811  This section of the configuration file tells <application>Privoxy</application>
812  where to find those other files. 
813 </para>
814
815
816 <sect4><title>confdir</title>
817
818 <variablelist>
819  <varlistentry>
820   <term>Specifies:</term>
821   <listitem>
822    <para>The directory where the other configuration files are located</para>
823   </listitem>
824  </varlistentry>
825  <varlistentry>
826   <term>Type of value:</term>
827   <listitem>
828    <para>Path name</para>
829   </listitem>
830  </varlistentry>
831  <varlistentry>
832   <term>Default value:</term>
833   <listitem>
834    <para>/etc/privoxy (Unix) <emphasis>or</emphasis> <application>Privoxy</application> installation dir (Windows) </para>
835   </listitem>
836  </varlistentry>
837  <varlistentry>
838   <term>Effect if unset:</term>
839   <listitem>
840    <para><emphasis>Mandatory</emphasis></para>
841   </listitem>
842  </varlistentry>
843  <varlistentry>
844   <term>Notes:</term>
845   <listitem>
846    <para>
847     No trailing <quote><literal>/</literal></quote>, please
848    </para>
849    <para>
850     When development goes modular and multi-user, the blocker, filter, and
851     per-user config will be stored in subdirectories of <quote>confdir</quote>.
852     For now, the configuration directory structure is flat, except for 
853     <filename>confdir/templates</filename>, where the HTML templates for CGI 
854     output reside (e.g. <application>Privoxy's</application> 404 error page). 
855    </para>
856   </listitem>
857  </varlistentry>
858 </variablelist>
859 </sect4>
860
861
862 <sect4><title>logdir</title>
863
864 <variablelist>
865  <varlistentry>
866   <term>Specifies:</term>
867   <listitem>
868    <para>
869     The directory where all logging takes place (i.e. where <filename>logfile</filename> and 
870     <filename>jarfile</filename> are located) 
871    </para>
872   </listitem>
873  </varlistentry>
874  <varlistentry>
875   <term>Type of value:</term>
876   <listitem>
877    <para>Path name</para>
878   </listitem>
879  </varlistentry>
880  <varlistentry>
881   <term>Default value:</term>
882   <listitem>
883    <para>/var/log/privoxy (Unix) <emphasis>or</emphasis> <application>Privoxy</application> installation dir (Windows) </para>
884   </listitem>
885  </varlistentry>
886  <varlistentry>
887   <term>Effect if unset:</term>
888   <listitem>
889    <para><emphasis>Mandatory</emphasis></para>
890   </listitem>
891  </varlistentry>
892  <varlistentry>
893   <term>Notes:</term>
894   <listitem>
895    <para>
896     No trailing <quote><literal>/</literal></quote>, please
897    </para>
898   </listitem>
899  </varlistentry>
900 </variablelist>
901 </sect4>
902
903 <sect4><title>actionsfile</title>
904
905 <variablelist>
906  <varlistentry>
907   <term>Specifies:</term>
908   <listitem>
909    <para>
910     The actions file to use
911    </para>
912   </listitem>
913  </varlistentry>
914  <varlistentry>
915   <term>Type of value:</term>
916   <listitem>
917    <para>File name, relative to <literal>confdir</literal></para>
918   </listitem>
919  </varlistentry>
920  <varlistentry>
921   <term>Default value:</term>
922   <listitem>
923    <para>default.action (Unix) <emphasis>or</emphasis> default.action.txt (Windows)</para>
924   </listitem>
925  </varlistentry>
926  <varlistentry>
927   <term>Effect if unset:</term>
928   <listitem>
929    <para>
930     No action is taken at all. Simple neutral proxying. 
931    </para>
932   </listitem>
933  </varlistentry>
934  <varlistentry>
935   <term>Notes:</term>
936   <listitem>
937    <para>
938     There is no point in using <application>Privoxy</application> without
939     an actions file. There are three different actions files included in the
940     distribution, with varying degrees of aggressiveness: 
941     <filename>default.action</filename>, <filename>intermediate.action</filename> and
942     <filename>advanced.action</filename>.
943    </para>
944   </listitem>
945  </varlistentry>
946 </variablelist>
947 </sect4>
948
949 <sect4><title>filterfile</title>
950
951 <variablelist>
952  <varlistentry>
953   <term>Specifies:</term>
954   <listitem>
955    <para>
956     The filter file to use
957    </para>
958   </listitem>
959  </varlistentry>
960  <varlistentry>
961   <term>Type of value:</term>
962   <listitem>
963    <para>File name, relative to <literal>confdir</literal></para>
964   </listitem>
965  </varlistentry>
966  <varlistentry>
967   <term>Default value:</term>
968   <listitem>
969    <para>default.filter (Unix) <emphasis>or</emphasis> default.filter.txt (Windows)</para>
970   </listitem>
971  </varlistentry>
972  <varlistentry>
973   <term>Effect if unset:</term>
974   <listitem>
975    <para>
976     No textual content filtering takes place, i.e. all
977     <literal>+filter{<replaceable class="parameter">name</replaceable>}</literal>
978     actions in the actions file are turned off
979    </para>
980   </listitem>
981  </varlistentry>
982  <varlistentry>
983   <term>Notes:</term>
984   <listitem>
985    <para>
986     The <quote>default.filter</quote> file contains content modification rules 
987     that use <quote>regular expressions</quote>. These rules permit powerful
988     changes on the content of Web pages, e.g., you could disable your favorite
989     JavaScript annoyances, re-write the actual displayed text, or just have some
990     fun replacing <quote>Microsoft</quote> with <quote>MicroSuck</quote> wherever
991     it appears on a Web page.
992    </para>
993   </listitem>
994  </varlistentry>
995 </variablelist>
996 </sect4>
997
998 <sect4><title>logfile</title>
999
1000 <variablelist>
1001  <varlistentry>
1002   <term>Specifies:</term>
1003   <listitem>
1004    <para>
1005     The log file to use
1006    </para>
1007   </listitem>
1008  </varlistentry>
1009  <varlistentry>
1010   <term>Type of value:</term>
1011   <listitem>
1012    <para>File name, relative to <literal>logdir</literal></para>
1013   </listitem>
1014  </varlistentry>
1015  <varlistentry>
1016   <term>Default value:</term>
1017   <listitem>
1018    <para>logfile (Unix) <emphasis>or</emphasis> privoxy.log (Windows)</para>
1019   </listitem>
1020  </varlistentry>
1021  <varlistentry>
1022   <term>Effect if unset:</term>
1023   <listitem>
1024    <para>
1025     No log file is used, all log messages go to the console (<literal>stderr</literal>).
1026    </para>
1027   </listitem>
1028  </varlistentry>
1029  <varlistentry>
1030   <term>Notes:</term>
1031   <listitem>
1032    <para>
1033     The windows version will additionally log to the console.
1034    </para>
1035    <para>
1036     The logfile is where all logging and error messages are written. The level
1037     of detail and number of messages are set with the <literal>debug</literal>
1038     option (see below). The logfile can be useful for tracking down a problem with
1039     <application>Privoxy</application> (e.g., it's not blocking an ad you
1040     think it should block) but in most cases you probably will never look at it.
1041    </para>
1042    <para>
1043     Your logfile will grow indefinitely, and you will probably want to
1044     periodically remove it.  On Unix systems, you can do this with a cron job
1045     (see <quote>man cron</quote>). For Redhat, a <command>logrotate</command> 
1046     script has been included.
1047    </para> 
1048    <para>
1049     On SuSE Linux systems, you can place a line like <quote>/var/log/privoxy.*
1050     +1024k 644 nobody.nogroup</quote> in <filename>/etc/logfiles</filename>, with
1051     the effect that cron.daily will automatically archive, gzip, and empty the
1052     log, when it exceeds 1M size.
1053    </para>
1054   </listitem>
1055  </varlistentry>
1056 </variablelist>
1057 </sect4>
1058
1059 <sect4><title>jarfile</title>
1060
1061 <variablelist>
1062  <varlistentry>
1063   <term>Specifies:</term>
1064   <listitem>
1065    <para>
1066     The file to store intercepted cookies in
1067    </para>
1068   </listitem>
1069  </varlistentry>
1070  <varlistentry>
1071   <term>Type of value:</term>
1072   <listitem>
1073    <para>File name, relative to <literal>logdir</literal></para>
1074   </listitem>
1075  </varlistentry>
1076  <varlistentry>
1077   <term>Default value:</term>
1078   <listitem>
1079    <para>jarfile (Unix) <emphasis>or</emphasis> privoxy.jar (Windows)</para>
1080   </listitem>
1081  </varlistentry>
1082  <varlistentry>
1083   <term>Effect if unset:</term>
1084   <listitem>
1085    <para>
1086     Intercepted cookies are not stored at all.
1087    </para>
1088   </listitem>
1089  </varlistentry>
1090  <varlistentry>
1091   <term>Notes:</term>
1092   <listitem>
1093    <para>
1094     The jarfile may grow to ridiculous sizes over time.
1095    </para>
1096   </listitem>
1097  </varlistentry>
1098 </variablelist>
1099 </sect4>
1100
1101 <sect4><title>trustfile</title>
1102
1103 <variablelist>
1104  <varlistentry>
1105   <term>Specifies:</term>
1106   <listitem>
1107    <para>
1108     The trust file to use
1109    </para>
1110   </listitem>
1111  </varlistentry>
1112  <varlistentry>
1113   <term>Type of value:</term>
1114   <listitem>
1115    <para>File name, relative to <literal>confdir</literal></para>
1116   </listitem>
1117  </varlistentry>
1118  <varlistentry>
1119   <term>Default value:</term>
1120   <listitem>
1121    <para><emphasis>Unset (commented out)</emphasis>. When activated: trust (Unix) <emphasis>or</emphasis> trust.txt (Windows)</para>
1122   </listitem>
1123  </varlistentry>
1124  <varlistentry>
1125   <term>Effect if unset:</term>
1126   <listitem>
1127    <para>
1128     The whole trust mechanism is turned off.
1129    </para>
1130   </listitem>
1131  </varlistentry>
1132  <varlistentry>
1133   <term>Notes:</term>
1134   <listitem>
1135    <para>
1136     The trust mechanism is an experimental feature for building white-lists and should
1137     be used with care. It is <emphasis>NOT</emphasis> recommended for the casual user.
1138    </para>
1139    <para>
1140     If you specify a trust file, <application>Privoxy</application> will only allow
1141     access to sites that are named in the trustfile. 
1142     You can also mark sites as trusted referrers (with <literal>+</literal>), with
1143     the effect that access to untrusted sites will be granted, if a link from a
1144     trusted referrer was used.
1145     The link target will then be added to the <quote>trustfile</quote>.
1146     Possible applications include limiting Internet access for children.
1147    </para>
1148    <para>
1149     If you use <literal>+</literal> operator in the trust file, it may grow considerably over time.
1150    </para>
1151   </listitem>
1152  </varlistentry>
1153 </variablelist>
1154 </sect4>
1155
1156 </sect3>
1157
1158 <!--  ~  End section  ~  -->
1159
1160
1161
1162 <!--   ~~~~~       New section      ~~~~~     -->
1163
1164 <sect3>
1165 <title>Local Set-up Documentation</title>
1166
1167   <para>
1168     If you intend to operate <application>Privoxy</application> for more users
1169     that just yourself, it might be a good idea to let them know how to reach
1170     you, what you block and why you do that, your policies etc.
1171    </para>
1172
1173 <sect4><title>trust-info-url</title>
1174
1175 <variablelist>
1176  <varlistentry>
1177   <term>Specifies:</term>
1178   <listitem>
1179    <para>
1180     A URL to be displayed in the error page that users will see if access to an untrusted page is denied.    
1181    </para>
1182   </listitem>
1183  </varlistentry>
1184  <varlistentry>
1185   <term>Type of value:</term>
1186   <listitem>
1187    <para>URL</para>
1188   </listitem>
1189  </varlistentry>
1190  <varlistentry>
1191   <term>Default value:</term>
1192   <listitem>
1193    <para>Two example URL are provided</para>
1194   </listitem>
1195  </varlistentry>
1196  <varlistentry>
1197   <term>Effect if unset:</term>
1198   <listitem>
1199    <para>
1200     No links are displayed on the "untrusted" error page.
1201    </para>
1202   </listitem>
1203  </varlistentry>
1204  <varlistentry>
1205   <term>Notes:</term>
1206   <listitem>
1207    <para>
1208     The value of this option only matters if the experimental trust mechanism has been
1209     activated. (See <literal>trustfile</literal> above.)
1210    </para>
1211    <para>
1212     If you use the trust mechanism, it is a good idea to write up some on-line
1213     documentation about your trust policy and to specify the URL(s) here.
1214     Use multiple times for multiple URLs.
1215    </para>
1216    <para>
1217     The URL(s) should be added to the trustfile as well, so users don't end up
1218     locked out from the information on why they were locked out in the first place!
1219    </para>
1220   </listitem>
1221  </varlistentry>
1222 </variablelist>
1223 </sect4>
1224
1225 <sect4><title>admin-address</title>
1226
1227 <variablelist>
1228  <varlistentry>
1229   <term>Specifies:</term>
1230   <listitem>
1231    <para>
1232     An email address to reach the proxy administrator.
1233    </para>
1234   </listitem>
1235  </varlistentry>
1236  <varlistentry>
1237   <term>Type of value:</term>
1238   <listitem>
1239    <para>Email address</para>
1240   </listitem>
1241  </varlistentry>
1242  <varlistentry>
1243   <term>Default value:</term>
1244   <listitem>
1245    <para><emphasis>Unset</emphasis></para>
1246   </listitem>
1247  </varlistentry>
1248  <varlistentry>
1249   <term>Effect if unset:</term>
1250   <listitem>
1251    <para>
1252     No email address is displayed on error pages and the CGI user interface.
1253    </para>
1254   </listitem>
1255  </varlistentry>
1256  <varlistentry>
1257   <term>Notes:</term>
1258   <listitem>
1259     <para>
1260     If both <literal>admin-address</literal> and <literal>proxy-info-url</literal>
1261     are unset, the whole "Local Privoxy Support" box on all generated pages will
1262     not be shown.
1263    </para>  
1264   </listitem>
1265  </varlistentry>
1266 </variablelist>
1267 </sect4>
1268
1269 <sect4><title>proxy-info-url</title>
1270
1271 <variablelist>
1272  <varlistentry>
1273   <term>Specifies:</term>
1274   <listitem>
1275    <para>
1276     A URL to documentation about the local <application>Privoxy</application> setup,
1277     configuration or policies.
1278    </para>
1279   </listitem>
1280  </varlistentry>
1281  <varlistentry>
1282   <term>Type of value:</term>
1283   <listitem>
1284    <para>URL</para>
1285   </listitem>
1286  </varlistentry>
1287  <varlistentry>
1288   <term>Default value:</term>
1289   <listitem>
1290    <para><emphasis>Unset</emphasis></para>
1291   </listitem>
1292  </varlistentry>
1293  <varlistentry>
1294   <term>Effect if unset:</term>
1295   <listitem>
1296    <para>
1297     No link to local documentation is displayed on error pages and the CGI user interface.
1298    </para>
1299   </listitem>
1300  </varlistentry>
1301  <varlistentry>
1302   <term>Notes:</term>
1303   <listitem>
1304    <para>
1305     If both <literal>admin-address</literal> and <literal>proxy-info-url</literal>
1306     are unset, the whole "Local Privoxy Support" box on all generated pages will
1307     not be shown.
1308    </para>  
1309    <para>
1310     This URL shouldn't be blocked ;-)
1311    </para> 
1312   </listitem>
1313  </varlistentry>
1314 </variablelist>
1315 </sect4>
1316
1317 </sect3>
1318 <!--  ~  End section  ~  -->
1319
1320 <!--   ~~~~~       New section      ~~~~~     -->
1321
1322 <sect3>
1323 <title>Debugging</title>
1324
1325  <para>
1326   These options are mainly useful when tracing a problem.
1327   Note that you might also want to invoke
1328   <application>Privoxy</application> with the <literal>--no-daemon</literal>
1329   command line option when debugging.
1330  </para>
1331
1332 <sect4><title>debug</title>
1333
1334 <variablelist>
1335  <varlistentry>
1336   <term>Specifies:</term>
1337   <listitem>
1338    <para>
1339     Key values that determine what information gets logged.
1340    </para>
1341   </listitem>
1342  </varlistentry>
1343  <varlistentry>
1344   <term>Type of value:</term>
1345   <listitem>
1346    <para>Integer values</para>
1347   </listitem>
1348  </varlistentry>
1349  <varlistentry>
1350   <term>Default value:</term>
1351   <listitem>
1352    <para>12289 (i.e.: URLs plus informational and warning messages)</para>
1353   </listitem>
1354  </varlistentry>
1355  <varlistentry>
1356   <term>Effect if unset:</term>
1357   <listitem>
1358    <para>
1359     Nothing gets logged.
1360    </para>
1361   </listitem>
1362  </varlistentry>
1363  <varlistentry>
1364   <term>Notes:</term>
1365   <listitem>
1366    <para>
1367     The available debug levels are:
1368    </para>
1369    <para>
1370     <programlisting>
1371   debug         1 # show each GET/POST/CONNECT request
1372   debug         2 # show each connection status
1373   debug         4 # show I/O status
1374   debug         8 # show header parsing
1375   debug        16 # log all data into the logfile
1376   debug        32 # debug force feature
1377   debug        64 # debug regular expression filter 
1378   debug       128 # debug fast redirects
1379   debug       256 # debug GIF de-animation
1380   debug       512 # Common Log Format
1381   debug      1024 # debug kill pop-ups
1382   debug      4096 # Startup banner and warnings.
1383   debug      8192 # Non-fatal errors
1384     </programlisting>
1385    </para>
1386    <para>
1387     To select multiple debug levels, you can either add them or use
1388     multiple <literal>debug</literal> lines.
1389    </para>
1390    <para>
1391     A debug level of 1 is informative because it will show you each request
1392     as it happens. <emphasis>1, 4096 and 8192 are highly recommended</emphasis>
1393     so that you will notice when things go wrong. The other levels are probably
1394     only of interest if you are hunting down a specific problem. They can produce
1395     a hell of an output (especially 16).
1396     <!-- LOL -->
1397    </para>
1398    <para>
1399     The reporting of <emphasis>fatal</emphasis> errors (i.e. ones which crash 
1400     <application>Privoxy</application>) is always on and cannot be disabled.
1401    </para>
1402    <para>
1403     If you want to use CLF (Common Log Format), you should set <quote>debug
1404     512</quote> <emphasis>ONLY</emphasis> and not enable anything else.
1405    </para>
1406   </listitem>
1407  </varlistentry>
1408 </variablelist>
1409 </sect4>
1410
1411 <sect4><title>single-threaded</title>
1412
1413 <variablelist>
1414  <varlistentry>
1415   <term>Specifies:</term>
1416   <listitem>
1417    <para>
1418     Whether to run only one server thread
1419    </para>
1420   </listitem>
1421  </varlistentry>
1422  <varlistentry>
1423   <term>Type of value:</term>
1424   <listitem>
1425    <para><emphasis>None</emphasis></para>
1426   </listitem>
1427  </varlistentry>
1428  <varlistentry>
1429   <term>Default value:</term>
1430   <listitem>
1431    <para><emphasis>Unset</emphasis></para>
1432   </listitem>
1433  </varlistentry>
1434  <varlistentry>
1435   <term>Effect if unset:</term>
1436   <listitem>
1437    <para>
1438     Multi-threaded (or, where unavailable: forked) operation, i.e. the ability to
1439     serve multiple requests simultaneously.
1440    </para>
1441   </listitem>
1442  </varlistentry>
1443  <varlistentry>
1444   <term>Notes:</term>
1445   <listitem>
1446    <para>
1447     This option is only there for debug purposes and you should never
1448     need to use it. <emphasis>It will drastically reduce performance.</emphasis>
1449    </para>
1450   </listitem>
1451  </varlistentry>
1452 </variablelist>
1453 </sect4>
1454
1455 </sect3>
1456
1457 <!--   ~~~~~       New section      ~~~~~     -->
1458
1459 <sect3>
1460 <title>Access Control and Security</title>
1461
1462  <para>
1463   This section of the config file controls the security-relevant aspects
1464   of <application>Privoxy</application>'s configuration.
1465  </para>
1466
1467 <sect4><title>listen-address</title>
1468
1469 <variablelist>
1470  <varlistentry>
1471   <term>Specifies:</term>
1472   <listitem>
1473    <para>
1474     The IP address and TCP port on which <application>Privoxy</application> will
1475     listen for client requests.
1476    </para>
1477   </listitem>
1478  </varlistentry>
1479  <varlistentry>
1480   <term>Type of value:</term>
1481   <listitem>
1482    <para>[<replaceable class="parameter">IP-Address</replaceable>]:<replaceable class="parameter">Port</replaceable></para>
1483   </listitem>
1484  </varlistentry>
1485  <varlistentry>
1486   <term>Default value:</term>
1487   <listitem>
1488    <para>localhost:8118</para>
1489   </listitem>
1490  </varlistentry>
1491  <varlistentry>
1492   <term>Effect if unset:</term>
1493   <listitem>
1494    <para>
1495     Bind to localhost (127.0.0.1), port 8118. This is suitable and recommended for
1496     home users who run <application>Privoxy</application> on the same machine as
1497     their browser.
1498    </para>
1499   </listitem>
1500  </varlistentry>
1501  <varlistentry>
1502   <term>Notes:</term>
1503   <listitem>
1504    <para>
1505     You will need to configure your browser(s) to this proxy address and port.
1506    </para>
1507    <para>
1508     If you already have another service running on port 8118, or if you want to
1509     serve requests from other machines (e.g. on your local network) as well, you
1510     will need to override the default.
1511    </para>
1512    <para>
1513     If you leave out the IP address, <application>Privoxy</application> will
1514     bind to all interfaces (addresses) on your machine and may become reachable
1515     from the Internet. In that case, consider using access control lists (acl's)
1516     (see <quote>ACLs</quote> below), or a firewall.
1517    </para>
1518   </listitem>
1519  </varlistentry>
1520  <varlistentry>
1521   <term>Example:</term>
1522   <listitem>
1523    <para>
1524      Suppose you are running <application>Privoxy</application> on
1525      a machine which has the address 192.168.0.1 on your local private network
1526      (192.168.0.0) and has another outside connection with a different address.
1527      You want it to serve requests from inside only:
1528    </para>
1529    <para>
1530     <programlisting>
1531   listen-address  192.168.0.1:8118
1532     </programlisting>
1533    </para>
1534   </listitem>
1535  </varlistentry>
1536 </variablelist>
1537 </sect4>
1538
1539 <sect4><title>toggle</title>
1540
1541 <variablelist>
1542  <varlistentry>
1543   <term>Specifies:</term>
1544   <listitem>
1545    <para>
1546     Initial state of "toggle" status
1547    </para>
1548   </listitem>
1549  </varlistentry>
1550  <varlistentry>
1551   <term>Type of value:</term>
1552   <listitem>
1553    <para>1 or 0</para>
1554   </listitem>
1555  </varlistentry>
1556  <varlistentry>
1557   <term>Default value:</term>
1558   <listitem>
1559    <para>1</para>
1560   </listitem>
1561  </varlistentry>
1562  <varlistentry>
1563   <term>Effect if unset:</term>
1564   <listitem>
1565    <para>
1566     Act as if toggled on
1567    </para>
1568   </listitem>
1569  </varlistentry>
1570  <varlistentry>
1571   <term>Notes:</term>
1572   <listitem>
1573    <para>
1574     If set to 0, <application>Privoxy</application> will start in
1575     <quote>toggled off</quote> mode, i.e. behave like a normal, content-neutral
1576     proxy. See <literal>enable-remote-toggle</literal>
1577     below. This is not really useful anymore, since toggling is much easier
1578     via <ulink url="http://config.privoxy.org/toggle">the web
1579     interface</ulink> then via editing the <filename>conf</filename> file.
1580    </para>
1581    <para>
1582     The windows version will only display the toggle icon in the system tray
1583     if this option is present.
1584    </para>
1585   </listitem>
1586  </varlistentry>
1587 </variablelist>
1588 </sect4>
1589
1590
1591 <sect4><title>enable-remote-toggle</title>
1592 <variablelist>
1593  <varlistentry>
1594   <term>Specifies:</term>
1595   <listitem>
1596    <para>
1597     Whether or not the <ulink url="http://config.privoxy.org/toggle">web-based toggle
1598     feature</ulink> may be used
1599    </para>
1600   </listitem>
1601  </varlistentry>
1602  <varlistentry>
1603   <term>Type of value:</term>
1604   <listitem>
1605    <para>0 or 1</para>
1606   </listitem>
1607  </varlistentry>
1608  <varlistentry>
1609   <term>Default value:</term>
1610   <listitem>
1611    <para>1</para>
1612   </listitem>
1613  </varlistentry>
1614  <varlistentry>
1615   <term>Effect if unset:</term>
1616   <listitem>
1617    <para>
1618     The web-based toggle feature is disabled.
1619    </para>
1620   </listitem>
1621  </varlistentry>
1622  <varlistentry>
1623   <term>Notes:</term>
1624   <listitem>
1625    <para>
1626     When toggled off, <application>Privoxy</application> acts like a normal,
1627     content-neutral proxy, i.e. it acts as if none of the actions applied to
1628     any URL.
1629    </para>
1630    <para>
1631     For the time being, access to the toggle feature can <emphasis>not</emphasis> be
1632     controlled separately by <quote>ACLs</quote> or HTTP authentication,
1633     so that everybody who can access <application>Privoxy</application> (see
1634     <quote>ACLs</quote> and <literal>listen-address</literal> above) can
1635     toggle it for all users. So this option is <emphasis>not recommended</emphasis>
1636     for multi-user environments with untrusted users.
1637    </para>
1638    <para>
1639     Note that you must have compiled <application>Privoxy</application> with
1640     support for this feature, otherwise this option has no effect. 
1641    </para>
1642   </listitem>
1643  </varlistentry>
1644 </variablelist>
1645 </sect4>
1646
1647
1648 <sect4><title>enable-edit-actions</title>
1649 <variablelist>
1650  <varlistentry>
1651   <term>Specifies:</term>
1652   <listitem>
1653    <para>
1654     Whether or not the <ulink url="http://config.privoxy.org/edit-actions">web-based actions
1655     file editor</ulink> may be used
1656    </para>
1657   </listitem>
1658  </varlistentry>
1659  <varlistentry>
1660   <term>Type of value:</term>
1661   <listitem>
1662    <para>0 or 1</para>
1663   </listitem>
1664  </varlistentry>
1665  <varlistentry>
1666   <term>Default value:</term>
1667   <listitem>
1668    <para>1</para>
1669   </listitem>
1670  </varlistentry>
1671  <varlistentry>
1672   <term>Effect if unset:</term>
1673   <listitem>
1674    <para>
1675     The web-based actions file editor is disabled.
1676    </para>
1677   </listitem>
1678  </varlistentry>
1679  <varlistentry>
1680   <term>Notes:</term>
1681   <listitem>
1682    <para>
1683     For the time being, access to the editor can <emphasis>not</emphasis> be
1684     controlled separately by <quote>ACLs</quote> or HTTP authentication,
1685     so that everybody who can access <application>Privoxy</application> (see
1686     <quote>ACLs</quote> and <literal>listen-address</literal> above) can
1687     modify its configuration for all users. So this option is <emphasis>not
1688     recommended</emphasis> for multi-user environments with untrusted users.
1689    </para>
1690    <para>
1691     Note that you must have compiled <application>Privoxy</application> with
1692     support for this feature, otherwise this option has no effect. 
1693    </para>
1694   </listitem>
1695  </varlistentry>
1696 </variablelist>
1697 </sect4>
1698
1699 <sect4><title>ACLs: permit-access and deny-access</title>
1700 <variablelist>
1701  <varlistentry>
1702   <term>Specifies:</term>
1703   <listitem>
1704    <para>
1705     Who can access what.
1706    </para>
1707   </listitem>
1708  </varlistentry>
1709  <varlistentry>
1710   <term>Type of value:</term>
1711   <listitem>
1712    <para>
1713     <replaceable class="parameter">src_addr</replaceable>[/<replaceable class="parameter">src_masklen</replaceable>]
1714     [<replaceable class="parameter">dst_addr</replaceable>[/<replaceable class="parameter">dst_masklen</replaceable>]]
1715    </para>
1716    <para>
1717     Where <replaceable class="parameter">src_addr</replaceable> and 
1718    <replaceable class="parameter">dst_addr</replaceable> are IP addresses in dotted decimal notation or valid
1719     DNS names, and <replaceable class="parameter">src_masklen</replaceable> and
1720     <replaceable class="parameter">dst_masklen</replaceable> are subnet masks in CIDR notation, i.e. integer
1721     values from 2 to 30 representing the length (in bits) of the network address. The masks and the whole
1722     destination part are optional.
1723    </para>
1724   </listitem>
1725  </varlistentry>
1726  <varlistentry>
1727   <term>Default value:</term>
1728   <listitem>
1729    <para><emphasis>Unset</emphasis></para>
1730   </listitem>
1731  </varlistentry>
1732  <varlistentry>
1733   <term>Effect if unset:</term>
1734   <listitem>
1735    <para>
1736     Don't restrict access further than implied by <literal>listen-address</literal>
1737    </para>
1738   </listitem>
1739  </varlistentry>
1740  <varlistentry>
1741   <term>Notes:</term>
1742   <listitem>
1743    <para>
1744     Access controls are included at the request of ISPs and systems
1745     administrators, and <emphasis>are not usually needed by individual users</emphasis>.
1746     For a typical home user, it will normally suffice to ensure that 
1747     <application>Privoxy</application> only listens on the localhost or internal (home)
1748     network address by means of the <literal>listen-address</literal> option.
1749    </para>
1750    <para>
1751     Please see the warnings in the FAQ that this proxy is not intended to be a substitute
1752     for a firewall or to encourage anyone to defer addressing basic security
1753     weaknesses.
1754    </para>
1755    <para>
1756     Multiple ACL lines are OK.
1757     If any ACLs are specified, then the <application>Privoxy</application>
1758     talks only to IP addresses that match at least one <literal>permit-access</literal> line
1759     and don't match any subsequent <literal>deny-access</literal> line. In other words, the
1760     last match wins, with the default being <literal>deny-access</literal>.
1761    </para>
1762    <para>
1763     If <application>Privoxy</application> is using a forwarder (see <literal>forward</literal> below)
1764     for a particular destination URL, the <replaceable class="parameter">dst_addr</replaceable>
1765     that is examined is the address of the forwarder and <emphasis>NOT</emphasis> the address
1766     of the ultimate target. This is necessary because it may be impossible for the local
1767     <application>Privoxy</application> to determine the IP address of the
1768     ultimate target (that's often what gateways are used for).
1769    </para>
1770    <para>
1771     You should prefer using IP addresses over DNS names, because the address lookups take
1772     time. All DNS names must resolve! You can <emphasis>not</emphasis> use domain patterns
1773     like <quote>*.org</quote> or partial domain names. If a DNS name resolves to multiple
1774     IP addresses, only the first one is used.
1775    </para>
1776    <para>
1777     Denying access to particular sites by ACL may have undesired side effects
1778     if the site in question is hosted on a machine which also hosts other sites.
1779    </para>
1780   </listitem>
1781  </varlistentry>
1782  <varlistentry>
1783   <term>Examples:</term>
1784   <listitem>
1785    <para>
1786     Explicitly define the default behavior if no ACL and
1787     <literal>listen-address</literal> are set: <quote>localhost</quote>
1788     is OK. The absence of a <replaceable class="parameter">dst_addr</replaceable> implies that
1789     <emphasis>all</emphasis> destination addresses are OK:
1790    </para>
1791    <para>
1792     <screen>
1793   permit-access  localhost
1794     </screen>
1795    </para>
1796    <para>
1797     Allow any host on the same class C subnet as www.privoxy.org access to
1798     nothing but www.example.com:
1799    </para>
1800    <para>
1801     <screen>
1802   permit-access  www.privoxy.org/24 www.example.com/32
1803     </screen>
1804    </para>
1805    <para>
1806     Allow access from any host on the 26-bit subnet 192.168.45.64 to anywhere,
1807     with the exception that 192.168.45.73 may not access www.dirty-stuff.example.com:
1808    </para>
1809    <para>
1810     <screen>
1811   permit-access  192.168.45.64/26
1812   deny-access    192.168.45.73    www.dirty-stuff.example.com
1813     </screen>
1814    </para>
1815   </listitem>
1816  </varlistentry>
1817 </variablelist>
1818 </sect4>
1819
1820 <sect4><title>buffer-limit</title>
1821
1822 <variablelist>
1823  <varlistentry>
1824   <term>Specifies:</term>
1825   <listitem>
1826    <para>
1827     Maximum size of the buffer for content filtering.
1828    </para>
1829   </listitem>
1830  </varlistentry>
1831  <varlistentry>
1832   <term>Type of value:</term>
1833   <listitem>
1834    <para>Size in Kbytes</para>
1835   </listitem>
1836  </varlistentry>
1837  <varlistentry>
1838   <term>Default value:</term>
1839   <listitem>
1840    <para>4096</para>
1841   </listitem>
1842  </varlistentry>
1843  <varlistentry>
1844   <term>Effect if unset:</term>
1845   <listitem>
1846    <para>
1847     Use a 4MB (4096 KB) limit.
1848    </para>
1849   </listitem>
1850  </varlistentry>
1851  <varlistentry>
1852   <term>Notes:</term>
1853   <listitem>
1854    <para>
1855     For content filtering, i.e. the <literal>+filter</literal> and
1856     <literal>+deanimate-gif</literal> actions, it is necessary that 
1857     <application>Privoxy</application> buffers the entire document body.
1858     This can be potentially dangerous, since a server could just keep sending
1859     data indefinitely and wait for your RAM to exhaust -- with nasty consequences.
1860     Hence this option.
1861    </para>
1862    <para>
1863     When a document buffer size reaches the <literal>buffer-limit</literal>, it is
1864     flushed to the client unfiltered and no further attempt to
1865     filter the rest of the document is made. Remember that there may be multiple threads
1866     running, which might require up to <literal>buffer-limit</literal> Kbytes
1867     <emphasis>each</emphasis>, unless you have enabled <quote>single-threaded</quote>
1868     above.
1869    </para>
1870   </listitem>
1871  </varlistentry>
1872 </variablelist>
1873 </sect4>
1874
1875 </sect3>
1876
1877 <!--  ~  End section  ~  -->
1878
1879
1880 <!--   ~~~~~       New section      ~~~~~     -->
1881
1882 <sect3 id="forwarding">
1883 <title>Forwarding</title>
1884
1885 <para>
1886  This feature allows routing of HTTP requests through a chain of
1887  multiple proxies.
1888  It can be used to better protect privacy and confidentiality when
1889  accessing specific domains by routing requests to those domains
1890  through an anonymous public proxy (see e.g. <ulink
1891  url="http://www.multiproxy.org/anon_list.htm">http://www.multiproxy.org/anon_list.htm</ulink>)
1892  Or to use a caching proxy to speed up browsing. Or chaining to a parent
1893  proxy may be necessary because the machine that <application>Privoxy</application>
1894  runs on has no direct Internet access.
1895 </para>
1896
1897 <para>
1898  Also specified here are SOCKS proxies. <application>Privoxy</application>
1899  supports the SOCKS 4 and SOCKS 4A protocols.
1900 </para>
1901
1902 <sect4><title>forward</title>
1903 <variablelist>
1904  <varlistentry>
1905   <term>Specifies:</term>
1906   <listitem>
1907    <para>
1908     To which parent HTTP proxy specific requests should be routed.
1909    </para>
1910   </listitem>
1911  </varlistentry>
1912  <varlistentry>
1913   <term>Type of value:</term>
1914   <listitem>
1915    <para>
1916     <replaceable class="parameter">target_domain</replaceable>[:<replaceable class="parameter">port</replaceable>]
1917     <replaceable class="parameter">http_parent</replaceable>[/<replaceable class="parameter">port</replaceable>]
1918    </para>
1919    <para>
1920     Where <replaceable class="parameter">target_domain</replaceable> is a domain name pattern (see the
1921     chapter on domain matching in the actions file),
1922     <replaceable class="parameter">http_parent</replaceable> is the address of the parent HTTP proxy
1923     as an IP addresses in dotted decimal notation or as a valid DNS name (or <quote>.</quote> to denote
1924     <quote>no forwarding</quote>, and the optional 
1925     <replaceable class="parameter">port</replaceable> parameters are TCP ports, i.e. integer
1926     values from 1 to 64535
1927    </para>
1928   </listitem>
1929  </varlistentry>
1930  <varlistentry>
1931   <term>Default value:</term>
1932   <listitem>
1933    <para><emphasis>Unset</emphasis></para>
1934   </listitem>
1935  </varlistentry>
1936  <varlistentry>
1937   <term>Effect if unset:</term>
1938   <listitem>
1939    <para>
1940     Don't use parent HTTP proxies.
1941    </para>
1942   </listitem>
1943  </varlistentry>
1944  <varlistentry>
1945   <term>Notes:</term>
1946   <listitem>
1947    <para>
1948     If <replaceable class="parameter">http_parent</replaceable> is <quote>.</quote>, then requests are not
1949     forwarded to another HTTP proxy but are made directly to the web servers.
1950    </para>
1951    <para>
1952     Multiple lines are OK, they are checked in sequence, and the last match wins.
1953    </para>
1954   </listitem>
1955  </varlistentry>
1956  <varlistentry>
1957   <term>Examples:</term>
1958   <listitem>
1959    <para>
1960     Everything goes to an example anonymizing proxy, except SSL on port 443 (which it doesn't handle):
1961    </para>
1962    <para>
1963     <screen>
1964   forward   .*     anon-proxy.example.org:8080
1965   forward   :443   .
1966     </screen>
1967    </para>
1968    <para>
1969     Everything goes to our example ISP's caching proxy, except for requests
1970     to that ISP's sites:
1971    </para>
1972    <para>
1973     <screen>
1974   forward   .*.                caching-proxy.example-isp.net:8000
1975   forward   .example-isp.net   .
1976     </screen>
1977    </para>
1978   </listitem>
1979  </varlistentry>
1980 </variablelist>
1981 </sect4>
1982
1983 <sect4><title>forward-socks4 and forward-socks4a</title>
1984 <variablelist>
1985  <varlistentry>
1986   <term>Specifies:</term>
1987   <listitem>
1988    <para>
1989     Through which SOCKS proxy (and to which parent HTTP proxy) specific requests should be routed.
1990    </para>
1991   </listitem>
1992  </varlistentry>
1993  <varlistentry>
1994   <term>Type of value:</term>
1995   <listitem>
1996    <para>
1997     <replaceable class="parameter">target_domain</replaceable>[:<replaceable class="parameter">port</replaceable>]
1998     <replaceable class="parameter">socks_proxy</replaceable>[/<replaceable class="parameter">port</replaceable>]
1999     <replaceable class="parameter">http_parent</replaceable>[/<replaceable class="parameter">port</replaceable>]
2000    </para>
2001    <para>
2002     Where <replaceable class="parameter">target_domain</replaceable> is a domain name pattern (see the
2003     chapter on domain matching in the actions file),
2004     <replaceable class="parameter">http_parent</replaceable> and <replaceable class="parameter">socks_proxy</replaceable>
2005     are IP addresses in dotted decimal notation or valid DNS names (<replaceable class="parameter">http_parent</replaceable>
2006     may be <quote>.</quote> to denote <quote>no HTTP forwarding</quote>), and the optional 
2007     <replaceable class="parameter">port</replaceable> parameters are TCP ports, i.e. integer values from 1 to 64535
2008    </para>
2009   </listitem>
2010  </varlistentry>
2011  <varlistentry>
2012   <term>Default value:</term>
2013   <listitem>
2014    <para><emphasis>Unset</emphasis></para>
2015   </listitem>
2016  </varlistentry>
2017  <varlistentry>
2018   <term>Effect if unset:</term>
2019   <listitem>
2020    <para>
2021     Don't use SOCKS proxies.
2022    </para>
2023   </listitem>
2024  </varlistentry>
2025  <varlistentry>
2026   <term>Notes:</term>
2027   <listitem>
2028    <para>
2029     Multiple lines are OK, they are checked in sequence, and the last match wins.
2030    </para>
2031    <para>
2032     The difference between <literal>forward-socks4</literal> and <literal>forward-socks4a</literal>
2033     is that in the SOCKS 4A protocol, the DNS resolution of the target hostname happens on the SOCKS
2034     server, while in SOCKS 4 it happens locally.
2035    </para>
2036    <para>
2037     If <replaceable class="parameter">http_parent</replaceable> is <quote>.</quote>, then requests are not
2038     forwarded to another HTTP proxy but are made (HTTP-wise) directly to the web servers, albeit through
2039     a SOCKS proxy.
2040    </para>
2041   </listitem>
2042  </varlistentry>
2043  <varlistentry>
2044   <term>Examples:</term>
2045   <listitem>
2046    <para>
2047      From the company example.com, direct connections are made to all
2048      <quote>internal</quote> domains, but everything outbound goes through
2049      their ISP's proxy by way of example.com's corporate SOCKS 4A gateway to
2050      the Internet.
2051    </para>
2052    <para>
2053     <screen>
2054   forward-socks4a   .*.            socks-gw.example.com:1080  www-cache.example-isp.net:8080
2055   forward           .example.com   .
2056     </screen>
2057    </para>
2058    <para>
2059     A rule that uses a SOCKS 4 gateway for all destinations but no HTTP parent looks like this:
2060    </para>
2061    <para>
2062     <screen>
2063   forward-socks4   .*.            socks-gw.example.com:1080  .
2064     </screen>
2065    </para>
2066   </listitem>
2067  </varlistentry>
2068 </variablelist>
2069 </sect4>
2070
2071 <sect4><title>Advanced Forwarding Examples</title>
2072
2073 <para>
2074  If you have links to multiple ISPs that provide various special content 
2075  only to their subscribers, you can configure multiple <application>Privoxies</application>
2076  which have connections to the respective ISPs to act as forwarders to each other, so that
2077  <emphasis>your</emphasis> users can see the internal content of all ISPs.
2078 </para>
2079
2080 <para>
2081  Assume that host-a has a PPP connection to isp-a.net. And host-b has a PPP connection to
2082  isp-b.net. Both run <application>Privoxy</application>. Their forwarding
2083  configuration can look like this:
2084 </para>
2085
2086 <para>
2087  host-a:
2088 </para>
2089
2090 <para>
2091  <screen>
2092   forward    .*.         .
2093   forward    .isp-b.net  host-b:8118
2094  </screen>
2095 </para>
2096
2097 <para>
2098  host-b:
2099 </para>
2100
2101 <para>
2102  <screen>
2103   forward    .*.         .
2104   forward    .isp-a.net  host-a:8118
2105  </screen>
2106 </para>
2107
2108 <para>
2109  Now, your users can set their browser's proxy to use either
2110  host-a or host-b and be able to browse the internal content
2111  of both isp-a and isp-b.
2112 </para>
2113
2114 <para>
2115  If you intend to chain <application>Privoxy</application> and 
2116  <application>squid</application> locally, then chain as 
2117  <literal>browser -> squid -> privoxy</literal> is the recommended way. 
2118 </para>
2119
2120 <para>
2121  Assuming that <application>Privoxy</application> and <application>squid</application>
2122  run on the same box, your squid configuration could then look like this:
2123 </para>
2124
2125 <para>
2126  <screen>
2127   # Define Privoxy as parent proxy (without ICP) 
2128   cache_peer 127.0.0.1 parent 8118 7 no-query 
2129
2130   # Define ACL for protocol FTP 
2131   acl ftp proto FTP 
2132
2133   # Do not forward FTP requests to Privoxy
2134   always_direct allow ftp 
2135
2136   # Forward all the rest to Privoxy
2137   never_direct allow all 
2138  </screen>
2139 </para>
2140
2141 <para>
2142  You would then need to change your browser's proxy settings to <application>squid</application>'s address and port.
2143  Squid normally uses port 3128. If unsure consult <literal>http_port</literal> in <filename>squid.conf</filename>.
2144 </para>
2145
2146 </sect4>
2147
2148 </sect3>
2149
2150 <!--  ~  End section  ~  -->
2151
2152
2153 <!--   ~~~~~       New section      ~~~~~     -->
2154
2155 <sect3>
2156 <title>Windows GUI Options</title>
2157 <!--
2158 Removed references to Win32. HB 09/23/01
2159 -->
2160 <para>
2161  <application>Privoxy</application> has a number of options specific to the
2162  Windows GUI interface:
2163 </para>
2164
2165 <para>
2166  If <quote>activity-animation</quote> is set to 1, the
2167  <application>Privoxy</application> icon will animate when
2168  <quote>Privoxy</quote> is active. To turn off, set to 0.
2169 </para>
2170
2171 <para>
2172  <literal>
2173   <msgtext> 
2174    <literallayout>
2175   <emphasis>activity-animation   1</emphasis>
2176    </literallayout>
2177   </msgtext> 
2178  </literal>
2179 </para>
2180
2181 <para>
2182  If <quote>log-messages</quote> is set to 1,
2183  <application>Privoxy</application> will log messages to the console
2184  window:
2185 </para>
2186
2187 <para>
2188  <literal>
2189   <msgtext> 
2190    <literallayout>
2191   <emphasis>log-messages       1</emphasis>
2192    </literallayout>
2193   </msgtext> 
2194  </literal>
2195 </para>
2196
2197 <para> 
2198  If <quote>log-buffer-size</quote> is set to 1, the size of the log buffer,
2199  i.e. the amount of memory used for the log messages displayed in the
2200  console window, will be limited to <quote>log-max-lines</quote> (see below).
2201 </para>
2202
2203 <para>
2204  Warning: Setting this to 0 will result in the buffer to grow infinitely and
2205  eat up all your memory!
2206 </para>
2207
2208 <para>
2209  <literal>
2210   <msgtext> 
2211    <literallayout>
2212   <emphasis>log-buffer-size      1</emphasis>
2213    </literallayout>
2214   </msgtext> 
2215  </literal>
2216 </para>
2217
2218 <para>
2219  <application>log-max-lines</application> is the maximum number of lines held
2220  in the log buffer. See above.
2221 </para>
2222
2223 <para>
2224  <literal>
2225   <msgtext> 
2226    <literallayout>
2227   <emphasis>log-max-lines      200</emphasis>
2228    </literallayout>
2229   </msgtext> 
2230  </literal>
2231 </para>
2232
2233 <para>
2234  If <quote>log-highlight-messages</quote> is set to 1,
2235  <application>Privoxy</application> will highlight portions of the log
2236  messages with a bold-faced font:
2237 </para>
2238
2239 <para>
2240  <literal>
2241   <msgtext> 
2242    <literallayout>
2243   <emphasis>log-highlight-messages   1</emphasis>
2244    </literallayout>
2245   </msgtext> 
2246  </literal>
2247 </para>
2248
2249 <para>
2250  The font used in the console window:
2251 </para>
2252
2253 <para>
2254  <literal>
2255   <msgtext> 
2256    <literallayout>
2257   <emphasis>log-font-name        Comic Sans MS</emphasis>
2258    </literallayout>
2259   </msgtext> 
2260  </literal>
2261 </para>
2262
2263 <para>
2264  Font size used in the console window:
2265 </para>
2266
2267 <para>
2268  <literal>
2269   <msgtext> 
2270    <literallayout>
2271   <emphasis>log-font-size        8</emphasis>
2272    </literallayout>
2273   </msgtext> 
2274  </literal>
2275 </para>
2276
2277 <para>  
2278  <quote>show-on-task-bar</quote> controls whether or not
2279  <application>Privoxy</application> will appear as a button on the Task bar
2280  when minimized:
2281 </para>
2282
2283 <para>
2284  <literal>
2285   <msgtext> 
2286    <literallayout>
2287   <emphasis>show-on-task-bar     0</emphasis>
2288    </literallayout>
2289   </msgtext> 
2290  </literal>
2291 </para>
2292
2293 <para>
2294  If <quote>close-button-minimizes</quote> is set to 1, the Windows close
2295  button will minimize <application>Privoxy</application> instead of closing
2296  the program (close with the exit option on the File menu).
2297 </para>
2298
2299 <para>
2300  <literal>
2301   <msgtext> 
2302    <literallayout>
2303   <emphasis>close-button-minimizes  1</emphasis>
2304    </literallayout>
2305   </msgtext> 
2306  </literal>
2307 </para>
2308
2309 <para>
2310  The <quote>hide-console</quote> option is specific to the MS-Win console
2311  version of <application>Privoxy</application>. If this option is used,
2312  <application>Privoxy</application> will disconnect from and hide  the
2313  command console.
2314 </para>
2315
2316 <para>
2317  <literal>
2318   <msgtext> 
2319    <literallayout>
2320   #hide-console
2321    </literallayout>
2322   </msgtext> 
2323  </literal>
2324 </para>
2325
2326 </sect3>
2327 </sect2>
2328
2329 <!--  ~  End section  ~  -->
2330
2331
2332 <!--   ~~~~~       New section      ~~~~~     -->
2333 <sect2 id="actionsfile">
2334 <title>The Actions File</title>
2335
2336 <para>
2337  The actions file (<filename>default.action</filename>, formerly:
2338  <filename>actionsfile</filename> or <filename>ijb.action</filename>) is used
2339  to define what actions <application>Privoxy</application> takes for which
2340  URLs, and thus determines how ad images, cookies and various other aspects
2341  of HTTP content and transactions are handled on which sites (or even parts
2342  thereof).
2343 </para>
2344
2345 <para> 
2346  Anything you want can blocked, including ads, banners, or just some obnoxious
2347  URL that you would rather not see. Cookies can be accepted or rejected, or
2348  accepted only during the current browser session (i.e. not written to disk),
2349  content can be modified, JavaScripts tamed, user-tracking fooled, and much more.
2350  See below for a complete list of available actions.
2351 </para>
2352
2353 <!--   ~~~~~       New section      ~~~~~     -->
2354 <sect3>
2355 <title>Finding the Right Mix</title>
2356 <para>
2357  Note that some actions like cookie suppression or script disabling may
2358  render some sites unusable, which rely on these techniques to work properly.
2359  Finding the right mix of actions is not easy and certainly a matter of personal
2360  taste. In general, it can be said that the more <quote>aggressive</quote>
2361  your default settings (in the top section of the actions file) are,
2362  the more exceptions for <quote>trusted</quote> sites you will have to
2363  make later. If, for example, you want to kill popup windows per default, you'll
2364  have to make exceptions from that rule for sites that you regularly use
2365  and that require popups for actually useful content, like maybe your bank,
2366  favorite shop, or newspaper.
2367 </para>
2368
2369 <para>
2370  We have tried to provide you with reasonable rules to start from in the
2371  distribution actions file. But there is no general rule of thumb on these
2372  things. There just are too many variables, and sites are constantly changing.
2373  Sooner or later you will want to change the rules (and read this chapter).
2374 </para>
2375 </sect3>
2376
2377 <!--   ~~~~~       New section      ~~~~~     -->
2378 <sect3>
2379 <title>How to Edit</title>
2380 <para>
2381  The easiest way to edit the <quote>actions</quote> file is with a browser by
2382  using our browser-based editor, which is available at <ulink
2383  url="http://config.privoxy.org/edit-actions">http://config.privoxy.org/edit-actions</ulink>.
2384 </para>
2385
2386 <para>
2387  If you prefer plain text editing to GUIs, you can of course also directly edit the
2388  <filename>default.action</filename> file.
2389 </para>
2390 </sect3>
2391
2392
2393 <sect3>
2394 <title>How Actions are Applied to URLs</title>
2395 <para>
2396  The actions file is divided into sections. There are special sections,
2397  like the alias sections which will be discussed later. For now let's
2398  concentrate on regular sections: They have a heading line (often split
2399  up to multiple lines for readability) which consist of a list of actions,
2400  separated by whitespace and enclosed in curly braces. Below that, there
2401  is a list of URL patterns, each on a separate line.
2402 </para>
2403
2404 <para>
2405  To determine which actions apply to a request, the URL of the request is
2406  compared to all patterns in this file. Every time it matches, the list of
2407  applicable actions for the URL is incrementally updated, using the heading
2408  of the section in which the pattern is located. If multiple matches for
2409  the same URL set the same action differently, the last match wins.
2410 </para>
2411
2412 <para>
2413  You can trace this process by visiting <ulink
2414  url="http://config.privoxy.org/show-url-info">http://config.privoxy.org/show-url-info</ulink>.
2415 </para>
2416
2417 <para>
2418  More detail on this is provided in the Appendix, <link linkend="ACTIONSANAT">
2419  Anatomy of an Action</link>.
2420 </para>
2421 </sect3>
2422
2423 <!--   ~~~~~       New section      ~~~~~     -->
2424 <sect3>
2425 <title>Patterns</title>
2426 <para>
2427  Generally, a pattern has the form <literal>&lt;domain&gt;/&lt;path&gt;</literal>,
2428  where both the <literal>&lt;domain&gt;</literal> and <literal>&lt;path&gt;</literal>
2429  are optional. (This is why the pattern <literal>/</literal> matches all URLs).
2430 </para>
2431
2432 <variablelist>
2433  <varlistentry>
2434   <term><literal>www.example.com/</literal></term>
2435   <listitem>
2436    <para>
2437     is a domain-only pattern and will match any request to <literal>www.example.com</literal>,
2438     regardless of which document on that server is requested.
2439    </para>
2440   </listitem>
2441  </varlistentry>
2442  <varlistentry>
2443   <term><literal>www.example.com</literal></term>
2444   <listitem>
2445    <para>
2446     means exactly the same. For domain-only patterns, the trailing <literal>/</literal> may
2447     be omitted.
2448    </para>
2449   </listitem>
2450  </varlistentry>
2451  <varlistentry>
2452   <term><literal>www.example.com/index.html</literal></term>
2453   <listitem>
2454    <para>
2455     matches only the single document <literal>/index.html</literal>
2456     on <literal>www.example.com</literal>.
2457    </para>
2458   </listitem>
2459  </varlistentry>
2460  <varlistentry>
2461   <term><literal>/index.html</literal></term>
2462   <listitem>
2463    <para>
2464     matches the document <literal>/index.html</literal>, regardless of the domain,
2465     i.e. on <emphasis>any</emphasis> web server.
2466    </para>
2467   </listitem>
2468  </varlistentry>
2469  <varlistentry>
2470   <term><literal>index.html</literal></term>
2471   <listitem>
2472    <para>
2473     matches nothing, since it would be  interpreted as a domain name and
2474     there is no top-level domain called <literal>.html</literal>.
2475    </para>
2476   </listitem>
2477  </varlistentry>
2478 </variablelist>
2479
2480 <sect4><title>The Domain Pattern</title>
2481
2482 <para>
2483  The matching of the domain part offers some flexible options: if the
2484  domain starts or ends with a dot, it becomes unanchored at that end. 
2485  For example:
2486 </para>
2487
2488 <variablelist>
2489  <varlistentry>
2490   <term><literal>.example.com</literal></term>
2491   <listitem>
2492    <para>
2493     matches any domain that <emphasis>ENDS</emphasis> in
2494     <literal>.example.com</literal>
2495    </para>
2496   </listitem>
2497  </varlistentry>
2498  <varlistentry>
2499   <term><literal>www.</literal></term>
2500   <listitem>
2501    <para>
2502     matches any domain that <emphasis>STARTS</emphasis> with
2503     <literal>www.</literal>
2504    </para>
2505   </listitem>
2506  </varlistentry>
2507  <varlistentry>
2508   <term><literal>.example.</literal></term>
2509   <listitem>
2510    <para>
2511     matches any domain that <emphasis>CONTAINS</emphasis> <literal>.example.</literal>
2512     (Correctly speaking: It matches any FQDN that contains <literal>example</literal> as a domain.)
2513    </para>
2514   </listitem>
2515  </varlistentry>
2516 </variablelist>
2517
2518 <para>
2519  Additionally, there are wild-cards that you can use in the domain names
2520  themselves. They work pretty similar to shell wild-cards: <quote>*</quote>
2521  stands for zero or more arbitrary characters, <quote>?</quote> stands for
2522  any single character, you can define character classes in square
2523  brackets and all of that can be freely mixed:
2524 </para>
2525
2526 <variablelist>
2527  <varlistentry>
2528   <term><literal>ad*.example.com</literal></term>
2529   <listitem>
2530    <para>
2531     matches <quote>adserver.example.com</quote>, 
2532     <quote>ads.example.com</quote>, etc but not <quote>sfads.example.com</quote>
2533    </para>
2534   </listitem>
2535  </varlistentry>
2536  <varlistentry>
2537   <term><literal>*ad*.example.com</literal></term>
2538   <listitem>
2539    <para>
2540     matches all of the above, and then some.
2541    </para>
2542   </listitem>
2543  </varlistentry>
2544  <varlistentry>
2545   <term><literal>.?pix.com</literal></term>
2546   <listitem>
2547    <para>
2548     matches <literal>www.ipix.com</literal>,
2549     <literal>pictures.epix.com</literal>, <literal>a.b.c.d.e.upix.com</literal> etc. 
2550    </para>
2551   </listitem>
2552  </varlistentry>
2553  <varlistentry>
2554   <term><literal>www[1-9a-ez].example.c*</literal></term>
2555   <listitem>
2556    <para>
2557      matches <literal>www1.example.com</literal>, 
2558      <literal>www4.example.cc</literal>, <literal>wwwd.example.cy</literal>, 
2559      <literal>wwwz.example.com</literal> etc., but <emphasis>not</emphasis> 
2560      <literal>wwww.example.com</literal>.
2561    </para>
2562   </listitem>
2563  </varlistentry>
2564 </variablelist>
2565
2566 </sect4>
2567
2568 <sect4><title>The Path Pattern</title>
2569
2570 <para>
2571  <application>Privoxy</application> uses Perl compatible regular expressions
2572  (through the <ulink url="http://www.pcre.org/">PCRE</ulink> library) for
2573  matching the path.
2574 </para>
2575
2576 <para>
2577  There is an <link linkend="regex">Appendix</link> with a brief quick-start into regular
2578  expressions, and full (very technical) documentation on PCRE regex syntax is available on-line
2579  at <ulink url="http://www.pcre.org/man.txt">http://www.pcre.org/man.txt</ulink>.
2580  You might also find the Perl man page on regular expressions (<literal>man perlre</literal>)
2581  useful, which is available on-line at <ulink
2582  url="http://www.perldoc.com/perl5.6/pod/perlre.html">http://www.perldoc.com/perl5.6/pod/perlre.html</ulink>.
2583 </para>
2584
2585 <para>
2586  Note that the path pattern is automatically left-anchored at the <quote>/</quote>,
2587  i.e. it matches as if it would start with a <quote>^</quote>.
2588 </para>
2589
2590 <para>
2591  Please also note that matching in the path is case
2592  <emphasis>INSENSITIVE</emphasis> by default, but you can switch to case
2593  sensitive at any point in the pattern by using the 
2594  <quote>(?-i)</quote> switch:
2595  <literal>www.example.com/(?-i)PaTtErN.*</literal> will match only
2596  documents whose path starts with <literal>PaTtErN</literal> in
2597  <emphasis>exactly</emphasis> this capitalization.
2598 </para>
2599 </sect4>
2600
2601 </sect3>
2602
2603 <!--  ~  End section  ~  -->
2604
2605
2606
2607 <!--   ~~~~~       New section      ~~~~~     -->
2608
2609 <sect3>
2610 <title>Actions</title>
2611 <para>
2612  Actions are enabled if preceded with a <quote>+</quote>, and disabled if 
2613  preceded with a <quote>-</quote>. Actions are invoked by enclosing the 
2614  action name in curly braces (e.g. {+some_action}), followed by a list of 
2615  URLs to which the action applies. There are three classes of actions:
2616 </para>
2617
2618 <para>
2619  <itemizedlist>
2620
2621  <listitem>
2622   <para>  
2623    Boolean (e.g. <quote>+/-block</quote>):
2624   </para>
2625   <para>
2626    <literal>
2627     <msgtext> 
2628      <literallayout>
2629   <emphasis>{+name}</emphasis>        # enable this action
2630   <emphasis>{-name}</emphasis>        # disable this action
2631      </literallayout>
2632     </msgtext> 
2633    </literal>
2634   </para>
2635  </listitem>
2636
2637
2638  <listitem>
2639   <para>  
2640    parameterized (e.g. <quote>+/-hide-user-agent</quote>):
2641   </para>
2642   <para>
2643    <literal>
2644     <msgtext> 
2645      <literallayout>
2646   <emphasis>{+name{param}}</emphasis>  # enable action and set parameter to <quote>param</quote>
2647   <emphasis>{-name}</emphasis>         # disable action
2648      </literallayout>
2649     </msgtext> 
2650    </literal>
2651   </para>
2652  </listitem>
2653  
2654  <listitem>
2655   <para>  
2656    Multi-value (e.g. <quote>{+/-add-header{Name: value}}</quote>, <quote>{+/-wafer{name=value}}</quote>):
2657   </para>
2658   <para>
2659    <literal>
2660     <msgtext> 
2661      <literallayout>
2662   <emphasis>{+name{param}}</emphasis>   # enable action and add parameter <quote>param</quote>
2663   <emphasis>{-name{param}}</emphasis>   # remove the parameter <quote>param</quote>
2664   <emphasis>{-name}</emphasis>          # disable this action totally
2665      </literallayout>
2666     </msgtext> 
2667    </literal>
2668   </para>
2669  </listitem>
2670
2671  </itemizedlist>
2672 </para>
2673
2674 <para>
2675  If nothing is specified in this file, no <quote>actions</quote> are taken.
2676  So in this case <application>Privoxy</application> would just be a
2677  normal, non-blocking, non-anonymizing proxy. You must specifically
2678  enable the privacy and blocking features you need (although the 
2679  provided default <filename>default.action</filename> file will 
2680  give a good starting point).
2681 </para>
2682
2683 <para>
2684  Later defined actions always over-ride earlier ones.  So exceptions 
2685  to any rules you make, should come in the latter part of the file. For
2686  multi-valued actions, the actions are applied in the order they are
2687  specified.
2688 </para>
2689
2690 <para>
2691  The list of valid <application>Privoxy</application> <quote>actions</quote> are:
2692 </para>
2693
2694 <para>
2695  <itemizedlist>
2696  
2697  <listitem>
2698   <para>  
2699    Add the specified HTTP header, which is not checked for validity.
2700    You may specify this many times to specify many different headers:
2701   </para>
2702   <para>
2703    <literal>
2704     <msgtext> 
2705      <literallayout>
2706   <emphasis>+add-header{Name: value}</emphasis>
2707      </literallayout>
2708     </msgtext> 
2709    </literal>
2710   </para>
2711  </listitem>
2712  
2713  
2714  <listitem>
2715   <para>  
2716    Block this URL totally. In a default installation, a <quote>blocked</quote>
2717    URL will result in bright red banner that says <quote>BLOCKED</quote>, 
2718    with a reason why it is being blocked, and an option to see it anyway.
2719    The page displayed for this is the <quote>blocked</quote> template 
2720    file.
2721   </para>
2722   <para>
2723    <literal>
2724     <msgtext> 
2725      <literallayout>
2726   <emphasis>+block</emphasis>
2727      </literallayout>
2728     </msgtext> 
2729    </literal>
2730   </para>
2731  </listitem>
2732  
2733  
2734  <listitem>
2735   <para>  
2736    De-animate all animated GIF images, i.e. reduce them to their last frame.
2737    This will also shrink the images considerably (in bytes, not pixels!). If
2738    the option <quote>first</quote> is given, the first frame of the animation
2739    is used as the replacement. If <quote>last</quote> is given, the last frame
2740    of the animation is used instead, which probably makes more sense for most
2741    banner animations, but also has the risk of not showing the entire last
2742    frame (if it is only a delta to an earlier frame).
2743   </para>
2744   <para>
2745    <literal>
2746     <msgtext> 
2747      <literallayout>
2748   <emphasis>+deanimate-gifs{last}</emphasis>
2749   <emphasis>+deanimate-gifs{first}</emphasis>
2750      </literallayout>
2751     </msgtext> 
2752    </literal>
2753   </para>
2754  </listitem>
2755  
2756  <listitem>
2757   <para>
2758    <quote>+downgrade</quote> will downgrade HTTP/1.1 client requests to
2759    HTTP/1.0 and downgrade the responses as well. Use this action for servers
2760    that use HTTP/1.1 protocol features that
2761    <application>Privoxy</application> doesn't handle well yet. HTTP/1.1 
2762    is only partially implemented. Default is not to downgrade requests.
2763   </para>
2764   <para>
2765    <literal>
2766     <msgtext> 
2767      <literallayout>
2768   <emphasis>+downgrade</emphasis>
2769      </literallayout>
2770     </msgtext> 
2771    </literal>
2772   </para>
2773  </listitem> 
2774  
2775  <listitem>
2776   <para>  
2777    Many sites, like yahoo.com, don't just link to other sites. Instead, they
2778    will link to some script on their own server, giving the destination as a
2779    parameter, which will then redirect you to the final target. URLs resulting
2780    from this scheme typically look like:
2781    <emphasis>http://some.place/some_script?http://some.where-else</emphasis>.
2782   </para>
2783   <para>
2784    Sometimes, there are even multiple consecutive redirects encoded in the
2785    URL. These redirections via scripts make your web browsing more traceable,
2786    since the server from which you follow such a link can see where you go to.
2787    Apart from that, valuable bandwidth and time is wasted, while your browser
2788    ask the server for one redirect after the other. Plus, it feeds the
2789    advertisers.
2790   </para>
2791   <para>
2792    The <quote>+fast-redirects</quote> option enables interception of these
2793    types of requests by <application>Privoxy</application>, who will cut off
2794    all but the last valid URL in the request and send a local redirect back to
2795    your browser without contacting the intermediate site(s).
2796   </para>
2797   <para>
2798    <literal>
2799     <msgtext> 
2800      <literallayout>
2801   <emphasis>+fast-redirects</emphasis>
2802      </literallayout>
2803     </msgtext> 
2804    </literal>
2805   </para>
2806  </listitem>
2807
2808  <listitem>
2809   <para>  
2810    Apply the filters in the <literal>section_header</literal> 
2811    section of the <filename>default.filter</filename> file to the site(s).
2812    <filename>default.filter</filename> sections are grouped according to like
2813    functionality. <application>Filters</application> can be used to 
2814    re-write any of the raw page content. This is a potentially a 
2815    very powerful feature!
2816   </para> 
2817    
2818   <para>
2819    <literal>
2820     <msgtext> 
2821      <literallayout>
2822  <emphasis>+filter{section_header}</emphasis>
2823      </literallayout>
2824     </msgtext> 
2825    </literal>
2826   </para>
2827
2828   <para>   
2829    Filter sections that are pre-defined in the supplied
2830    <filename>default.filter</filename> include:
2831   </para>
2832
2833  <blockquote>
2834   <simplelist>
2835    <member>
2836      <emphasis>html-annoyances</emphasis>:  Get rid of particularly annoying HTML abuse.
2837    </member>
2838   </simplelist>
2839   <simplelist>
2840    <member>
2841     <emphasis>js-annoyances</emphasis>:    Get rid of particularly annoying JavaScript abuse
2842    </member>
2843   </simplelist>
2844   <simplelist>
2845    <member>
2846     <emphasis>content-cookies</emphasis>:   Kill cookies that come in the HTML or JS content 
2847    </member>
2848   </simplelist>
2849   <simplelist>
2850    <member>
2851     <emphasis>popups</emphasis>:         Kill all popups in JS and HTML
2852    </member>
2853   </simplelist>
2854   <simplelist>
2855    <member>
2856     <emphasis>frameset-borders</emphasis>: Give frames a border and make them resizable 
2857    </member>
2858   </simplelist>
2859   <simplelist>
2860    <member>
2861     <emphasis>webbugs</emphasis>:          Squish WebBugs (1x1 invisible GIFs used for user tracking)
2862    </member>
2863   </simplelist>
2864   <simplelist>
2865    <member>
2866     <emphasis>refresh-tags</emphasis>:     Kill automatic refresh tags (for dial-on-demand setups) 
2867    </member>
2868   </simplelist>
2869   <simplelist>
2870    <member>
2871     <emphasis>fun</emphasis>:              Text replacements  for subversive browsing fun!
2872    </member>
2873   </simplelist>
2874   <simplelist>
2875    <member>
2876     <emphasis>nimda</emphasis>:            Remove Nimda (virus) code.
2877    </member>
2878   </simplelist>
2879   <simplelist>
2880    <member>
2881      <emphasis>banners-by-size</emphasis>:  Kill banners by size (<emphasis>very</emphasis> efficient!)
2882    </member>
2883   </simplelist>
2884   <simplelist>
2885    <member>
2886     <emphasis>shockwave-flash</emphasis>:   Kill embedded Shockwave Flash objects
2887    </member>
2888   </simplelist>
2889   <simplelist>
2890    <member>
2891     <emphasis>crude-parental</emphasis>:   Kill all web pages that contain the words "sex" or "warez"
2892    </member>
2893   </simplelist>
2894  </blockquote>
2895
2896
2897  <para>
2898   Note: Filtering requires buffering the page content, which may appear to slow down
2899   page rendering since nothing is displayed until all content has passed 
2900   the filters. (It does not really take longer, but seems that way since 
2901   the page is not incrementally displayed.) This effect will be more noticeable
2902   on slower connections.
2903 </para>
2904
2905  </listitem>
2906
2907  <listitem>
2908   <para>  
2909    Block any existing X-Forwarded-for header, and do not add a new one:
2910   </para>
2911   <para>
2912    <literal>
2913     <msgtext> 
2914      <literallayout>
2915   <emphasis>+hide-forwarded</emphasis>
2916      </literallayout>
2917     </msgtext> 
2918    </literal>
2919   </para>
2920  </listitem>
2921
2922  <listitem>
2923   <para>  
2924    If the browser sends a <quote>From:</quote> header containing your e-mail
2925    address, this either completely removes the header (<quote>block</quote>), or
2926    changes it to the specified e-mail address.
2927   </para>
2928   <para>
2929    <literal>
2930     <msgtext> 
2931      <literallayout>
2932   <emphasis>+hide-from{block}</emphasis>
2933   <emphasis>+hide-from{spam@sittingduck.xqq}</emphasis>
2934      </literallayout>
2935     </msgtext> 
2936    </literal>
2937   </para>
2938  </listitem>
2939  
2940  <listitem>
2941   <para>  
2942    Don't send the <quote>Referer:</quote> (sic) header to the web site.  You
2943    can block it, forge a URL to the same server as the request (which is
2944    preferred because some sites will not send images otherwise) or set it to a
2945    constant, user defined string of your choice.
2946   </para>
2947   <para>
2948    <literal>
2949     <msgtext> 
2950      <literallayout>
2951   <emphasis>+hide-referer{block}</emphasis>
2952   <emphasis>+hide-referer{forge}</emphasis>
2953   <emphasis>+hide-referer{http://nowhere.com}</emphasis>
2954      </literallayout>
2955     </msgtext> 
2956    </literal>
2957   </para>
2958  </listitem>
2959  
2960  <listitem>
2961   <para>  
2962    Alternative spelling of <quote>+hide-referer</quote>.  It has the same
2963    parameters, and can be freely mixed with, <quote>+hide-referer</quote>.
2964    (<quote>referrer</quote> is the correct English spelling, however the HTTP
2965    specification has a bug - it requires it to be spelled <quote>referer</quote>.) 
2966   </para>
2967   <para>
2968    <literal>
2969     <msgtext> 
2970      <literallayout>
2971   <emphasis>+hide-referrer{...}</emphasis>
2972      </literallayout>
2973     </msgtext> 
2974    </literal>
2975   </para>
2976  </listitem>
2977
2978  <listitem>
2979   <para>  
2980    Change the <quote>User-Agent:</quote> header so web servers can't tell your
2981    browser type.  Warning! This breaks many web sites.  Specify the
2982    user-agent value you want. Example, pretend to be using Netscape on
2983    Linux:
2984   </para>
2985   <para>
2986    <literal>
2987     <msgtext> 
2988      <literallayout>
2989   <emphasis>+hide-user-agent{Mozilla (X11; I; Linux 2.0.32 i586)}</emphasis>
2990      </literallayout>
2991     </msgtext> 
2992    </literal>
2993   </para>
2994  <!-- 
2995   <para>
2996    Or to identify yourself explicitly as a  <application>Privoxy</application> user:
2997   </para>
2998   <para>
2999    <literal>
3000     <msgtext> 
3001      <literallayout>
3002   <emphasis>+hide-user-agent{Privoxy/1.0}</emphasis>
3003      </literallayout>
3004     </msgtext> 
3005    </literal>
3006   </para>
3007    (Don't change the version number from 1.0 - after all, why tell them?)
3008   <para>
3009   </para>
3010   <para>
3011    <literal>
3012     <msgtext> 
3013      <literallayout>
3014   <emphasis>+hide-user-agent{browser-type}</emphasis>
3015      </literallayout>
3016     </msgtext> 
3017    </literal>
3018   </para>
3019 -->
3020  </listitem>
3021
3022  <listitem>
3023   <para>  
3024    Treat this URL as an image.  This only matters if it's also <quote>+block</quote>ed,
3025    in which case a <quote>blocked</quote> image can be sent rather than a HTML page.
3026    See <quote>+image-blocker{}</quote> below for the control over what is actually sent.
3027    If you want <emphasis>invisible</emphasis> ads, they should be defined as 
3028    <emphasis>images</emphasis> and <emphasis>blocked</emphasis>. And also, 
3029    <quote>image-blocker</quote>  should be set to <quote>blank</quote>. Note you 
3030    cannot treat HTML pages as images in most cases. For instance, frames 
3031    require an HTML page to display. So a frame that is an ad, cannot be 
3032    treated as an image. Forcing an <quote>image</quote> in this 
3033    situation just will not work.
3034   </para>
3035   <para>
3036    <literal>
3037     <msgtext> 
3038      <literallayout>
3039   <emphasis>+image</emphasis>
3040      </literallayout>
3041     </msgtext> 
3042    </literal>
3043   </para>
3044  </listitem>
3045  
3046  <listitem>
3047   <para> Decides what to do with URLs that end up tagged with <quote>{+block
3048   +image}</quote>, e.g an advertisement. There are four options.
3049   <quote>-image-blocker</quote> will send a HTML <quote>blocked</quote> page,
3050   usually resulting in a <quote>broken image</quote> icon.
3051 <!--   <quote>+image-blocker{logo}</quote> will send a -->
3052 <!--   <application>Privoxy</application> logo -->
3053 <!--   image. -->
3054 <quote>+image-blocker{blank}</quote> will send a 1x1 transparent GIF
3055 image. And finally, <quote>+image-blocker{http://xyz.com}</quote> will send a
3056 HTTP temporary redirect to the specified image. This has the advantage of the
3057 icon being being cached by the browser, which will speed up the display.
3058 <quote>+image-blocker{pattern}</quote> will send a checkerboard type pattern:
3059 <!-- , -->
3060 <!-- which scales better than the logo (which can get blocky if the browser -->
3061 <!-- enlarges it too much). -->
3062   </para>
3063   <para>
3064    <literal>
3065     <msgtext> 
3066      <literallayout>
3067 <!--   <emphasis>+image-blocker{logo}</emphasis> -->
3068   <emphasis>+image-blocker{blank}</emphasis>
3069   <emphasis>+image-blocker{pattern}</emphasis>
3070   <emphasis>+image-blocker{http://p.p/send-banner}</emphasis>
3071      </literallayout>
3072     </msgtext> 
3073    </literal>
3074   </para>
3075  </listitem>
3076  
3077  <listitem>
3078    <para> 
3079    By default (i.e. in the absence of a <quote>+limit-connect</quote>
3080    action), <application>Privoxy</application> will only allow CONNECT
3081    requests to port 443, which is the standard port for https as a 
3082    precaution.
3083   </para>
3084  
3085   <para>
3086    The CONNECT methods exists in HTTP to allow access to secure websites
3087    (https:// URLs) through proxies. It works very simply: the proxy
3088    connects to the server on the specified port, and then short-circuits
3089    its connections to the client <emphasis>and</emphasis> to the remote proxy.
3090    This can be a big security hole, since CONNECT-enabled proxies can
3091    be abused as TCP relays very easily.
3092   </para>
3093   
3094   <para> 
3095    If you want to allow CONNECT for more ports than this, or want to forbid
3096    CONNECT altogether, you can specify a comma separated list of ports and
3097    port ranges (the latter using dashes, with the minimum defaulting to 0 and
3098    max to 65K):
3099   </para>
3100
3101   <para>
3102    <literal>
3103     <msgtext> 
3104      <literallayout>
3105   <emphasis>+limit-connect{443}                 # This is the default and need no be specified.</emphasis>
3106   <emphasis>+limit-connect{80,443}              # Ports 80 and 443 are OK.</emphasis>
3107   <emphasis>+limit-connect{-3, 7, 20-100, 500-} # Port less than 3, 7, 20 to 100</emphasis>
3108   <emphasis>                                    #and above 500 are OK.</emphasis>
3109      </literallayout>
3110     </msgtext> 
3111    </literal>
3112   </para>
3113
3114  </listitem> 
3115  
3116  <listitem>
3117   <para>
3118    <quote>+no-compression</quote> prevents the website from compressing the
3119    data. Some websites do this, which can be a problem for
3120    <application>Privoxy</application>, since <quote>+filter</quote>,
3121    <quote>+no-popup</quote> and <quote>+gif-deanimate</quote> will not work on
3122    compressed data. This will slow down connections to those websites,
3123    though. Default is <quote>no-compression</quote> is turned on.
3124   </para>
3125
3126   <para>
3127    <literal>
3128     <msgtext> 
3129      <literallayout>
3130   <emphasis>+nocompression</emphasis>
3131      </literallayout>
3132     </msgtext> 
3133    </literal>
3134   </para>
3135  </listitem> 
3136  
3137  <listitem>
3138   <para>  
3139    If the website sets cookies, <quote>no-cookies-keep</quote> will make sure
3140    they are erased when you exit and restart your web browser. This makes
3141    profiling cookies useless, but won't break sites which require cookies so
3142    that you can log in for transactions. Default: on.
3143   </para>
3144   <para>
3145    <literal>
3146     <msgtext> 
3147      <literallayout>
3148   <emphasis>+no-cookies-keep</emphasis>
3149      </literallayout>
3150     </msgtext> 
3151    </literal>
3152   </para>
3153  </listitem>
3154  
3155  <listitem>
3156   <para>  
3157    Prevent the website from reading cookies:
3158   </para>
3159   <para>
3160    <literal>
3161     <msgtext> 
3162      <literallayout>
3163   <emphasis>+no-cookies-read</emphasis>
3164      </literallayout>
3165     </msgtext> 
3166    </literal>
3167   </para>
3168  </listitem>
3169  
3170  <listitem>
3171   <para>  
3172    Prevent the website from setting cookies:
3173   </para>
3174   <para>
3175    <literal>
3176     <msgtext> 
3177      <literallayout>
3178   <emphasis>+no-cookies-set</emphasis>
3179      </literallayout>
3180     </msgtext> 
3181    </literal>
3182   </para>
3183  </listitem>
3184  
3185  <listitem>
3186   <para>  
3187    Filter the website through a built-in filter to disable those obnoxious 
3188    JavaScript pop-up windows via window.open(), etc. The two alternative
3189    spellings are equivalent.
3190   </para>
3191   <para>
3192    <literal>
3193     <msgtext> 
3194      <literallayout>
3195   <emphasis>+no-popup</emphasis>
3196   <emphasis>+no-popups</emphasis>
3197      </literallayout>
3198     </msgtext> 
3199    </literal>
3200   </para>
3201  </listitem>
3202  
3203  <listitem>
3204   <para>  
3205    This action only applies if you are using a <filename>jarfile</filename>
3206    for saving cookies. It sends a cookie to every site stating that you do not
3207    accept any copyright on cookies sent to you, and asking them not to track
3208    you.  Of course, this is a (relatively) unique header they could use to
3209    track you.
3210   </para>
3211   <para>
3212    <literal>
3213     <msgtext> 
3214      <literallayout>
3215   <emphasis>+vanilla-wafer</emphasis>
3216      </literallayout>
3217     </msgtext> 
3218    </literal>
3219   </para>
3220  </listitem>
3221  
3222  <listitem>
3223   <para>  
3224    This allows you to add an arbitrary cookie. It can be specified multiple
3225    times in order to add as many cookies as you like.
3226   </para>
3227   <para>
3228    <literal>
3229     <msgtext> 
3230      <literallayout>
3231   <emphasis>+wafer{name=value}</emphasis>
3232      </literallayout>
3233     </msgtext> 
3234    </literal>
3235   </para>
3236  </listitem>
3237
3238  </itemizedlist>
3239 </para>
3240
3241 <para>
3242  The meaning of any of the above is reversed by preceding the action with a 
3243  <quote>-</quote>, in place of the <quote>+</quote>.
3244 </para>
3245
3246 <para>
3247  Some examples:
3248 </para>
3249
3250 <para>
3251  Turn off cookies by default, then allow a few through for specified sites:
3252 </para>
3253   
3254 <para>
3255  <literal>
3256   <msgtext> 
3257    <literallayout>
3258  # Turn off all persistent cookies
3259  { +no-cookies-read }
3260  { +no-cookies-set }
3261  # Allow cookies for this browser session ONLY
3262  { +no-cookies-keep }
3263
3264  # Exceptions to the above, sites that benefit from persistent cookies
3265  { -no-cookies-read }
3266  { -no-cookies-set }
3267  { -no-cookies-keep }
3268  .javasoft.com
3269  .sun.com
3270  .yahoo.com
3271  .msdn.microsoft.com
3272  .redhat.com
3273
3274  # Alternative way of saying the same thing
3275  {-no-cookies-set -no-cookies-read -no-cookies-keep}
3276  .sourceforge.net
3277  .sf.net
3278    </literallayout>
3279   </msgtext> 
3280  </literal>
3281 </para>
3282
3283 <para>
3284  Now turn off <quote>fast redirects</quote>, and then we allow two exceptions:
3285 </para>
3286
3287 <para>
3288  <literal>
3289   <msgtext> 
3290    <literallayout>
3291  # Turn them off!
3292  {+fast-redirects}
3293  
3294  # Reverse it for these two sites, which don't work right without it.
3295  {-fast-redirects}
3296  www.ukc.ac.uk/cgi-bin/wac\.cgi\?
3297  login.yahoo.com
3298    </literallayout>
3299   </msgtext> 
3300  </literal>
3301 </para>
3302
3303 <para>
3304  Turn on page filtering according to rules in the defined sections 
3305  of <filename>default.filter</filename>, and make one exception for 
3306  Sourceforge:
3307  </para>
3308
3309 <para>
3310  <literal>
3311   <msgtext> 
3312    <literallayout>
3313  # Run everything through the filter file, using only the
3314  # specified sections:
3315  +filter{html-annoyances} +filter{js-annoyances} +filter{no-popups}\
3316  +filter{webbugs} +filter{nimda} +filter{banners-by-size}
3317               
3318  # Then disable filtering of code from sourceforge!
3319  {-filter}
3320  .cvs.sourceforge.net
3321    </literallayout>
3322   </msgtext> 
3323  </literal>
3324 </para>
3325
3326 <para>
3327  Now some URLs that we want <quote>blocked</quote> (normally generates 
3328  the <quote>blocked</quote> banner). Many of these use regular expressions
3329  that will expand to match multiple URLs:
3330 </para>
3331
3332 <para>
3333  <literal>
3334   <msgtext> 
3335    <literallayout>
3336   # Blocklist:
3337   {+block}
3338   /.*/(.*[-_.])?ads?[0-9]?(/|[-_.].*|\.(gif|jpe?g))
3339   /.*/(.*[-_.])?count(er)?(\.cgi|\.dll|\.exe|[?/])
3340   /.*/(ng)?adclient\.cgi
3341   /.*/(plain|live|rotate)[-_.]?ads?/
3342   /.*/(sponsor)s?[0-9]?/
3343   /.*/_?(plain|live)?ads?(-banners)?/
3344   /.*/abanners/
3345   /.*/ad(sdna_image|gifs?)/
3346   /.*/ad(server|stream|juggler)\.(cgi|pl|dll|exe)
3347   /.*/adbanners/
3348   /.*/adserver
3349   /.*/adstream\.cgi
3350   /.*/adv((er)?ts?|ertis(ing|ements?))?/
3351   /.*/banner_?ads/
3352   /.*/banners?/
3353   /.*/banners?\.cgi/
3354   /.*/cgi-bin/centralad/getimage
3355   /.*/images/addver\.gif
3356   /.*/images/marketing/.*\.(gif|jpe?g)
3357   /.*/popupads/
3358   /.*/siteads/
3359   /.*/sponsor.*\.gif
3360   /.*/sponsors?[0-9]?/
3361   /.*/advert[0-9]+\.jpg
3362   /Media/Images/Adds/
3363   /ad_images/
3364   /adimages/
3365   /.*/ads/
3366   /bannerfarm/
3367   /grafikk/annonse/
3368   /graphics/defaultAd/
3369   /image\.ng/AdType
3370   /image\.ng/transactionID
3371   /images/.*/.*_anim\.gif # alvin brattli
3372   /ip_img/.*\.(gif|jpe?g)
3373   /rotateads/
3374   /rotations/ 
3375   /worldnet/ad\.cgi
3376   /cgi-bin/nph-adclick.exe/
3377   /.*/Image/BannerAdvertising/
3378   /.*/ad-bin/
3379   /.*/adlib/server\.cgi
3380   /autoads/
3381    </literallayout>
3382   </msgtext> 
3383  </literal>
3384 </para>
3385
3386 <para>
3387  Note that many of these actions have the potential to cause a page to
3388  misbehave, possibly even not to display at all. There are many ways 
3389  a site designer may choose to design his site, and what HTTP header 
3390  content he may depend on. There is no way to have hard and fast rules 
3391  for all sites. See the <link linkend="ACTIONSANAT">Appendix</link>
3392  for a brief example on troubleshooting actions.
3393 </para>
3394
3395 </sect3>
3396
3397 <!--  ~  End section  ~  -->
3398
3399
3400 <!--   ~~~~~       New section      ~~~~~     -->
3401 <sect3>
3402 <title>Aliases</title>
3403 <para>
3404  Custom <quote>actions</quote>, known to <application>Privoxy</application>
3405  as <quote>aliases</quote>, can be defined by combining other <quote>actions</quote>.
3406  These can in turn be invoked just like the built-in <quote>actions</quote>.
3407  Currently, an alias can contain any character except space, tab, <quote>=</quote>,
3408  <quote>{</quote> or <quote>}</quote>. But please use only <quote>a</quote>-
3409  <quote>z</quote>, <quote>0</quote>-<quote>9</quote>, <quote>+</quote>, and
3410  <quote>-</quote>. Alias names are not case sensitive, and 
3411  <emphasis>must be defined  before anything</emphasis> else in the
3412  <filename>default.action</filename>file! And there can only be one set of
3413  <quote>aliases</quote> defined.
3414 </para>
3415
3416 <para>
3417  Now let's define a few aliases:
3418 </para>
3419
3420 <para>
3421  <literal>
3422   <msgtext> 
3423    <literallayout>
3424  # Useful custom aliases we can use later. These must come first!
3425  {{alias}}
3426  +no-cookies = +no-cookies-set +no-cookies-read
3427  -no-cookies = -no-cookies-set -no-cookies-read
3428  fragile     = -block -no-cookies -filter -fast-redirects -hide-referer -no-popups
3429  shop        = -no-cookies -filter -fast-redirects
3430  +imageblock = +block +image
3431
3432  #For people who don't like to type too much:  ;-)
3433  c0 = +no-cookies
3434  c1 = -no-cookies
3435  c2 = -no-cookies-set +no-cookies-read
3436  c3 = +no-cookies-set -no-cookies-read
3437  #... etc.  Customize to your heart's content.
3438    </literallayout>
3439   </msgtext> 
3440  </literal>
3441 </para>
3442
3443 <para>
3444  Some examples using our <quote>shop</quote> and <quote>fragile</quote>
3445  aliases from above:
3446 </para>
3447
3448 <para>
3449  <literal>
3450   <msgtext> 
3451    <literallayout>
3452  # These sites are very complex and require
3453  # minimal interference.
3454  {fragile}
3455  .office.microsoft.com
3456  .windowsupdate.microsoft.com
3457  .nytimes.com
3458
3459  # Shopping sites - still want to block ads.
3460  {shop}
3461  .quietpc.com
3462  .worldpay.com   # for quietpc.com
3463  .jungle.com
3464  .scan.co.uk
3465
3466  # These shops require pop-ups
3467  {shop -no-popups}
3468  .dabs.com
3469  .overclockers.co.uk
3470    </literallayout>
3471   </msgtext> 
3472  </literal>
3473 </para>
3474
3475 <para>
3476  The <quote>shop</quote> and <quote>fragile</quote> aliases are often used for 
3477  <quote>problem</quote> sites that require most actions to be disabled 
3478  in order to function properly.
3479
3480 </para>
3481
3482 </sect3>
3483 </sect2>
3484
3485 <!--  ~  End section  ~  -->
3486
3487
3488 <!--   ~~~~~       New section      ~~~~~     -->
3489 <sect2 id="filterfile">
3490 <title>The Filter File</title>
3491 <para>
3492  Any web page can be dynamically modified with the filter file. This
3493  modification can be removal, or re-writing, of any web page content,
3494  including tags and non-visible content. The default filter file is
3495  <filename>default.filter</filename>, located in the config directory. 
3496 </para>
3497
3498 <para>
3499  This is potentially a very powerful feature, and requires knowledge of both 
3500  <quote>regular expression</quote> and HTML in order create custom 
3501  filters. But, there are a number of useful filters included with 
3502  <application>Privoxy</application> for many common situations.
3503 </para>
3504
3505 <para>
3506  The included example file is divided into sections. Each section begins 
3507  with the <literal>FILTER</literal> keyword, followed by the identifier 
3508  for that section, e.g. <quote>FILTER: webbugs</quote>. Each section performs
3509  a similar type of filtering, such as <quote>html-annoyances</quote>.
3510 </para>
3511
3512 <para>
3513  This file uses regular expressions to alter or remove any string in the
3514  target page. The expressions can only operate on one line at a time. Some
3515  examples from the included default <filename>default.filter</filename>:
3516 </para>
3517
3518 <para>
3519  Stop web pages from displaying annoying messages in the status bar by
3520  deleting such references:
3521 </para>
3522
3523 <para>
3524  <literal>
3525   <msgtext> 
3526    <literallayout>
3527  FILTER: html-annoyances
3528
3529  # New browser windows should be resizeable and have a location and status
3530  # bar. Make it so.
3531  #
3532  s/resizable="?(no|0)"?/resizable=1/ig s/noresize/yesresize/ig
3533  s/location="?(no|0)"?/location=1/ig s/status="?(no|0)"?/status=1/ig
3534  s/scrolling="?(no|0|Auto)"?/scrolling=1/ig
3535  s/menubar="?(no|0)"?/menubar=1/ig 
3536
3537  # The &lt;BLINK&gt; tag was a crime!
3538  #
3539  s*&lt;blink&gt;|&lt;/blink&gt;**ig
3540
3541  # Is this evil? 
3542  #
3543  #s/framespacing="?(no|0)"?//ig
3544  #s/margin(height|width)=[0-9]*//gi
3545    </literallayout>
3546   </msgtext> 
3547  </literal>
3548 </para>
3549
3550 <para>
3551  Just for kicks, replace any occurrence of <quote>Microsoft</quote> with
3552  <quote>MicroSuck</quote>, and have a little fun with topical buzzwords: 
3553 </para>
3554
3555 <para>
3556  <literal>
3557   <msgtext> 
3558    <literallayout>
3559  FILTER: fun
3560
3561  s/microsoft(?!.com)/MicroSuck/ig
3562
3563  # Buzzword Bingo:
3564  #
3565  s/industry-leading|cutting-edge|award-winning/&lt;font color=red&gt;&lt;b&gt;BINGO!&lt;/b&gt;&lt;/font&gt;/ig
3566    </literallayout>
3567   </msgtext> 
3568  </literal>
3569 </para>
3570
3571 <para>
3572  Kill those pesky little web-bugs:
3573 </para>
3574
3575 <para>
3576  <literal>
3577   <msgtext> 
3578    <literallayout>
3579  # webbugs: Squish WebBugs (1x1 invisible GIFs used for user tracking)
3580  FILTER: webbugs
3581
3582  s/&lt;img\s+[^&gt;]*?(width|height)\s*=\s*['"]?1\D[^&gt;]*?(width|height)\s*=\s*['"]?1(\D[^&gt;]*?)?>/&lt;!-- Squished WebBug --&gt;/sig
3583    </literallayout>
3584   </msgtext> 
3585  </literal>
3586 </para>
3587
3588 </sect2>
3589
3590 <!--  ~  End section  ~  -->
3591
3592
3593
3594 <!--   ~~~~~       New section      ~~~~~     -->
3595
3596 <sect2>
3597 <title>Templates</title>
3598 <para>
3599  When <application>Privoxy</application> displays one of its internal 
3600  pages, such as a 404 Not Found error page, it uses the appropriate template.
3601  On Linux, BSD, and Unix, these are located in
3602  <filename>/etc/privoxy/templates</filename> by default. These may be
3603  customized, if desired. <filename>cgi-style.css</filename> is 
3604  used to control the HTML attributes (fonts, etc).
3605 </para>
3606 <para>
3607  The default <quote>Blocked</quote> banner page with the bright red top 
3608  banner, is called just <quote><filename>blocked</filename></quote>. This 
3609  may be customized or replaced with something else if desired.
3610
3611 </para>
3612 </sect2>
3613
3614 </sect1>
3615
3616 <!--  ~  End section  ~  -->
3617
3618
3619
3620 <!--   ~~~~~       New section      ~~~~~     -->
3621
3622 <sect1 id="contact"><title>Contacting the Developers, Bug Reporting and Feature
3623 Requests</title>
3624
3625 <!-- Include contacting.sgml boilerplate: -->
3626  &contacting;
3627 <!-- end boilerplate -->
3628
3629
3630 <!--   ~~~~~       New section      ~~~~~     -->
3631 <sect2 id="submitactions">
3632 <title>Submitting Ads and <quote>Action</quote> Problems</title>
3633 <para>
3634  Ads and banners that are not stopped by <application>Privoxy</application> 
3635  can be submitted to the developers by accessing a special page and filling 
3636  out the brief, required form. Conversely, you can also report pages, images,
3637  etc. that <application>Privoxy</application> is blocking, but should not.
3638  The form itself does require Internet access.
3639 </para>
3640 <para>
3641  To do this, point your browser to <application>Privoxy</application> 
3642  at <ulink url="http://config.privoxy.org/">http://config.privoxy.org/</ulink>
3643  (shortcut: <ulink url="http://p.p/">http://p.p/</ulink>), and then select 
3644  <ulink url="javascript:w=Math.floor(screen.width/2);h=Math.floor(screen.height*0.9);void(window.open('http://www.privoxy.org/actions','Feedback','screenx='+w+',width='+w+',height='+h+',scrollbars=yes,toolbar=no,location=no,directories=no,status=no,menubar=no,copyhistory=no').focus());">Actions file feedback system</ulink>, 
3645  near the bottom of the page. Paste in the URL that is the cause of the 
3646  unwanted behavior, and follow the prompts. The developers will 
3647  try to incorporate a fix for the problem you reported into future versions.
3648 </para>
3649
3650 <para>
3651  New <filename>default.actions</filename> files will occasionally be made
3652  available based on your feedback. These 
3653  will be announced on the 
3654  <ulink
3655  url="http://lists.sourceforge.net/lists/listinfo/ijbswa-announce">ijbswa-announce</ulink>
3656  list.
3657 </para>
3658 </sect2>
3659
3660 </sect1>
3661
3662
3663 <!--   ~~~~~       New section      ~~~~~     -->
3664 <sect1 id="copyright"><title>Copyright and History</title>
3665
3666 <sect2><title>Copyright</title>
3667 <!-- Include copyright.sgml: -->
3668  &copyright;
3669 <!-- end copyright -->
3670 </sect2>
3671
3672 <!--  ~  End section  ~  -->
3673
3674
3675 <!--   ~~~~~       New section      ~~~~~     -->
3676
3677 <sect2 id="history"><title>History</title>
3678 <!-- Include history.sgml: -->
3679  &history;
3680 <!-- end history -->
3681 </sect2>
3682 </sect1>
3683
3684 <!--   ~~~~~       New section      ~~~~~     -->
3685 <sect1 id="seealso"><title>See Also</title>
3686 <!-- Include seealso.sgml: -->
3687  &seealso;
3688 <!-- end seealso -->
3689 </sect1>
3690
3691
3692
3693 <!--   ~~~~~       New section      ~~~~~     -->
3694 <sect1 id="appendix"><title>Appendix</title>
3695
3696
3697 <!--   ~~~~~       New section      ~~~~~     -->
3698 <sect2 id="regex">
3699 <title>Regular Expressions</title>
3700 <para>
3701  <application>Privoxy</application> can use <quote>regular expressions</quote> 
3702  in various config files. Assuming support for <quote>pcre</quote> (Perl
3703  Compatible Regular Expressions) is compiled in, which is the default. Such
3704  configuration directives do not require regular expressions, but they can be
3705  used to increase flexibility by matching a pattern with wild-cards against
3706  URLs.
3707 </para>
3708
3709 <para>
3710  If you are reading this, you probably don't understand what <quote>regular
3711  expressions</quote> are, or what they can do. So this will be a very brief
3712  introduction only. A full explanation would require a book ;-)
3713 </para>
3714
3715 <para>
3716  <quote>Regular expressions</quote> is a way of matching one character
3717  expression against another to see if it matches or not. One of the
3718  <quote>expressions</quote> is a literal string of readable characters
3719  (letter, numbers, etc), and the other is a complex string of literal
3720  characters combined with wild-cards, and other special characters, called
3721  meta-characters. The <quote>meta-characters</quote> have special meanings and
3722  are used to build the complex pattern to be matched against. Perl Compatible
3723  Regular Expressions is an enhanced form of the regular expression language
3724  with backward compatibility.
3725 </para>
3726
3727 <para>
3728  To make a simple analogy, we do something similar when we use wild-card
3729  characters when listing files with the <command>dir</command> command in DOS. 
3730  <literal>*.*</literal> matches all filenames. The <quote>special</quote>
3731  character here is the asterisk which matches any and all characters. We can be
3732  more specific and use <literal>?</literal> to match just individual
3733  characters. So <quote>dir file?.text</quote> would match
3734  <quote>file1.txt</quote>, <quote>file2.txt</quote>, etc. We are pattern
3735  matching, using a similar technique to <quote>regular expressions</quote>!
3736 </para>
3737
3738 <para>
3739  Regular expressions do essentially the same thing, but are much, much more
3740  powerful. There are many more <quote>special characters</quote> and ways of 
3741  building complex patterns however. Let's look at a few of the common ones,
3742  and then some examples:
3743 </para>
3744
3745 <para><simplelist>
3746  <member>
3747   <emphasis>.</emphasis> - Matches any single character, e.g. <quote>a</quote>,
3748   <quote>A</quote>, <quote>4</quote>, <quote>:</quote>, or <quote>@</quote>.
3749  </member>
3750 </simplelist></para>
3751
3752 <para><simplelist>
3753  <member>
3754   <emphasis>?</emphasis> - The preceding character or expression is matched ZERO or ONE
3755   times. Either/or.
3756  </member>
3757 </simplelist></para>
3758
3759 <para><simplelist>
3760  <member>
3761   <emphasis>+</emphasis> - The preceding character or expression is matched ONE or MORE
3762   times.
3763  </member>
3764 </simplelist></para>
3765
3766 <para><simplelist>
3767  <member>
3768   <emphasis>*</emphasis> - The preceding character or expression is matched ZERO or MORE
3769   times.
3770  </member>
3771 </simplelist></para>
3772
3773 <para><simplelist>
3774  <member>
3775   <emphasis>\</emphasis> - The <quote>escape</quote> character denotes that
3776   the following character should be taken literally. This is used where one of the 
3777   special characters (e.g. <quote>.</quote>) needs to be taken literally and
3778   not as a special meta-character.
3779  </member>
3780 </simplelist></para>
3781
3782 <para><simplelist>
3783  <member>
3784   <emphasis>[]</emphasis> - Characters enclosed in brackets will be matched if
3785   any of the enclosed characters are encountered.
3786  </member>
3787 </simplelist></para>
3788
3789 <para><simplelist>
3790  <member>
3791   <emphasis>()</emphasis> - parentheses are used to group a sub-expression,
3792   or multiple sub-expressions.
3793  </member>
3794 </simplelist></para>
3795
3796 <para><simplelist>
3797  <member>
3798   <emphasis>|</emphasis> - The <quote>bar</quote> character works like an
3799   <quote>or</quote> conditional statement. A match is successful if the
3800   sub-expression on either side of <quote>|</quote> matches.
3801  </member>
3802 </simplelist></para>
3803
3804 <para><simplelist>
3805  <member>
3806   <emphasis>s/string1/string2/g</emphasis> - This is used to rewrite strings of text. 
3807   <quote>string1</quote> is replaced by <quote>string2</quote> in this
3808   example.
3809  </member>
3810 </simplelist></para>
3811
3812 <para>
3813  These are just some of the ones you are likely to use when matching URLs with 
3814  <application>Privoxy</application>, and is a long way from a definitive
3815  list. This is enough to get us started with a few simple examples which may
3816  be more illuminating:
3817 </para>
3818
3819 <para>
3820  <emphasis><literal>/.*/banners/.*</literal></emphasis> - A  simple example
3821  that uses the common combination of <quote>.</quote> and <quote>*</quote> to 
3822  denote any character, zero or more times. In other words, any string at all.
3823  So we start with a literal forward slash, then our regular expression pattern 
3824  (<quote>.*</quote>) another literal forward slash, the string
3825  <quote>banners</quote>, another forward slash, and lastly another
3826  <quote>.*</quote>. We are building 
3827  a directory path here. This will match any file with the path that has a
3828  directory named <quote>banners</quote> in it. The <quote>.*</quote> matches
3829  any characters, and this could conceivably be more forward slashes, so it
3830  might expand into a much longer looking path. For example, this could match:
3831  <quote>/eye/hate/spammers/banners/annoy_me_please.gif</quote>, or just
3832  <quote>/banners/annoying.html</quote>, or almost an infinite number of other
3833  possible combinations, just so it has <quote>banners</quote> in the path
3834  somewhere.
3835 </para>
3836
3837 <para>
3838  A now something a little more complex:
3839 </para>
3840
3841 <para>
3842  <emphasis><literal>/.*/adv((er)?ts?|ertis(ing|ements?))?/</literal></emphasis> - 
3843  We have several literal forward slashes again (<quote>/</quote>), so we are
3844  building another expression that is a file path statement. We have another 
3845  <quote>.*</quote>, so we are matching against any conceivable sub-path, just so
3846  it matches our expression. The only true literal that <emphasis>must
3847  match</emphasis> our pattern is <application>adv</application>, together with
3848  the forward slashes. What comes after the <quote>adv</quote> string is the
3849  interesting part. 
3850 </para>
3851
3852 <para>
3853  Remember the <quote>?</quote> means the preceding expression (either a
3854  literal character or anything grouped with <quote>(...)</quote> in this case)
3855  can exist or not, since this means either zero or one match. So
3856  <quote>((er)?ts?|ertis(ing|ements?))</quote> is optional, as are the
3857  individual sub-expressions: <quote>(er)</quote>,
3858  <quote>(ing|ements?)</quote>, and the <quote>s</quote>. The <quote>|</quote>
3859  means <quote>or</quote>. We have two of those. For instance, 
3860  <quote>(ing|ements?)</quote>, can expand to match either <quote>ing</quote> 
3861  <emphasis>OR</emphasis> <quote>ements?</quote>. What is being done here, is an
3862  attempt at matching as many variations of <quote>advertisement</quote>, and 
3863  similar, as possible. So this would expand to match just <quote>adv</quote>,
3864  or <quote>advert</quote>, or <quote>adverts</quote>, or
3865  <quote>advertising</quote>, or <quote>advertisement</quote>, or
3866  <quote>advertisements</quote>. You get the idea. But it would not match 
3867  <quote>advertizements</quote> (with a <quote>z</quote>). We could fix that by
3868  changing our regular expression to: 
3869  <quote>/.*/adv((er)?ts?|erti(s|z)(ing|ements?))?/</quote>, which would then match
3870  either spelling.
3871 </para>
3872
3873 <para>
3874  <emphasis><literal>/.*/advert[0-9]+\.(gif|jpe?g)</literal></emphasis> - Again 
3875  another path statement with forward slashes. Anything in the square brackets 
3876  <quote>[]</quote> can be matched. This is using <quote>0-9</quote> as a
3877  shorthand expression to mean any digit one through nine. It is the same as
3878  saying <quote>0123456789</quote>. So any digit matches. The <quote>+</quote>
3879  means one or more of the preceding expression must be included. The preceding 
3880  expression here is what is in the square brackets -- in this case, any digit 
3881  one through nine. Then, at the end, we have a grouping: <quote>(gif|jpe?g)</quote>. 
3882  This includes a <quote>|</quote>, so this needs to match the expression on
3883  either side of that bar character also. A simple <quote>gif</quote> on one side, and the other
3884  side will in turn match either <quote>jpeg</quote> or <quote>jpg</quote>,
3885  since the <quote>?</quote> means the letter <quote>e</quote> is optional and
3886  can be matched once or not at all. So we are building an expression here to
3887  match image GIF or JPEG type image file. It must include the literal
3888  string <quote>advert</quote>, then one or more digits, and a <quote>.</quote>
3889  (which is now a literal, and not a special character, since it is escaped
3890  with <quote>\</quote>), and lastly either <quote>gif</quote>, or
3891  <quote>jpeg</quote>, or <quote>jpg</quote>. Some possible matches would
3892  include: <quote>//advert1.jpg</quote>,
3893  <quote>/nasty/ads/advert1234.gif</quote>,
3894  <quote>/banners/from/hell/advert99.jpg</quote>. It would not match
3895  <quote>advert1.gif</quote> (no leading slash), or
3896  <quote>/adverts232.jpg</quote> (the expression does not include an
3897  <quote>s</quote>), or <quote>/advert1.jsp</quote> (<quote>jsp</quote> is not
3898  in the expression anywhere).
3899 </para>
3900
3901 <para>
3902  <emphasis><literal>s/microsoft(?!.com)/MicroSuck/i</literal></emphasis> - This is 
3903  a substitution. <quote>MicroSuck</quote> will replace any occurrence of 
3904  <quote>microsoft</quote>.  The <quote>i</quote> at the end of the expression
3905  means ignore case. The <quote>(?!.com)</quote> means 
3906  the match should fail if <quote>microsoft</quote> is followed by
3907  <quote>.com</quote>. In other words, this acts like a <quote>NOT</quote>
3908  modifier. In case this is a hyperlink, we don't want to break it ;-).
3909 </para>
3910
3911 <para>
3912  We are barely scratching the surface of regular expressions here so that you
3913  can understand the default <application>Privoxy</application>
3914  configuration files, and maybe use this knowledge to customize your own
3915  installation. There is much, much more that can be done with regular
3916  expressions. Now that you know enough to get started, you can learn more on
3917  your own :/
3918 </para>
3919
3920 <para>
3921  More reading on Perl Compatible Regular expressions: 
3922  <ulink url="http://www.perldoc.com/perl5.6/pod/perlre.html">http://www.perldoc.com/perl5.6/pod/perlre.html</ulink>
3923 </para>
3924
3925 </sect2>
3926
3927 <!--  ~  End section  ~  -->
3928
3929
3930 <!--   ~~~~~       New section      ~~~~~     -->
3931 <sect2>
3932 <title><application>Privoxy</application>'s Internal Pages</title>
3933
3934 <para>
3935  Since <application>Privoxy</application> proxies each requested 
3936  web page, it is easy for <application>Privoxy</application> to 
3937  trap certain special URLs. In this way, we can talk directly to
3938  <application>Privoxy</application>, and see how it is 
3939  configured, see how our rules are being applied, change these 
3940  rules and other configuration options, and even turn
3941  <application>Privoxy's</application> filtering off, all with 
3942  a web browser.
3943
3944 </para>
3945
3946 <para>
3947  The URLs listed below are the special ones that allow direct access 
3948  to <application>Privoxy</application>. Of course,
3949  <application>Privoxy</application> must be running to access these. If 
3950  not, you will get a friendly error message. Internet access is not 
3951  necessary either.
3952 </para>
3953
3954 <para>
3955  <itemizedlist>
3956
3957  <listitem>
3958   <para>  
3959    Privoxy main page: 
3960   </para>
3961   <blockquote>
3962    <para> 
3963      <ulink url="http://config.privoxy.org/">http://config.privoxy.org/</ulink>
3964    </para>
3965   </blockquote>
3966   <para>
3967    Alternately, this may be reached at <ulink
3968    url="http://p.p/">http://p.p/</ulink>, but this
3969    variation may not work as reliably as the above in some configurations.
3970   </para>
3971  </listitem>
3972
3973  <listitem>
3974   <para>  
3975     Show information about the current configuration: 
3976   </para>
3977    <blockquote>
3978    <para> 
3979     <ulink url="http://config.privoxy.org/show-status">http://config.privoxy.org/show-status</ulink>
3980    </para>
3981   </blockquote>
3982  </listitem>
3983  
3984  <listitem>
3985   <para>  
3986     Show the source code version numbers:
3987   </para>
3988   <blockquote>
3989    <para> 
3990     <ulink url="http://config.privoxy.org/show-version">http://config.privoxy.org/show-version</ulink>
3991    </para>
3992   </blockquote>
3993  </listitem>
3994  
3995  <listitem>
3996   <para>  
3997    Show the client's request headers:
3998   </para>
3999   <blockquote>
4000    <para> 
4001     <ulink url="http://config.privoxy.org/show-request">http://config.privoxy.org/show-request</ulink>
4002    </para>
4003   </blockquote>
4004  </listitem>
4005  
4006  <listitem>
4007   <para>  
4008    Show which actions apply to a URL and why:
4009   </para>
4010    <blockquote>
4011    <para> 
4012     <ulink url="http://config.privoxy.org/show-url-info">http://config.privoxy.org/show-url-info</ulink>
4013    </para>
4014   </blockquote>
4015  </listitem>
4016  
4017  <listitem>
4018   <para>  
4019    Toggle Privoxy on or off. In this case, <quote>Privoxy</quote> continues 
4020    to run, but only as a pass-through proxy, with no actions taking place:
4021   </para>
4022    <blockquote>
4023    <para> 
4024     <ulink url="http://config.privoxy.org/toggle">http://config.privoxy.org/toggle</ulink>
4025    </para>
4026   </blockquote>
4027   <para>
4028    Short cuts. Turn off, then on: 
4029   </para>
4030    <blockquote>
4031    <para> 
4032      <ulink url="http://config.privoxy.org/toggle?set=disable">http://config.privoxy.org/toggle?set=disable</ulink>
4033    </para>
4034   </blockquote>
4035    <blockquote>
4036    <para> 
4037      <ulink url="http://config.privoxy.org/toggle?set=enable">http://config.privoxy.org/toggle?set=enable</ulink>
4038    </para>
4039   </blockquote>
4040  </listitem>
4041
4042  <listitem>
4043   <para>  
4044    Edit the actions list file:
4045   </para>
4046    <blockquote>
4047    <para> 
4048     <ulink url="http://config.privoxy.org/edit-actions">http://config.privoxy.org/edit-actions</ulink>
4049    </para>
4050   </blockquote>
4051  </listitem>
4052  
4053  </itemizedlist>
4054 </para>
4055
4056 <para>
4057  These may be bookmarked for quick reference.
4058
4059 </para>
4060
4061 <sect3 id="bookmarklets">
4062 <title>Bookmarklets</title>
4063 <para>
4064  Below are some <quote>bookmarklets</quote> to allow you to easily access a
4065  <quote>mini</quote> version of some of <application>Privoxy's</application>
4066  special pages. They are designed for MS Internet Explorer, but should work
4067  equally well in Netscape, Mozilla, and other browsers which support
4068  JavaScript. They are designed to run directly from your bookmarks - not by
4069  clicking the links below (although that should work for testing).
4070 </para>
4071 <para>
4072  To save them, right-click the link and choose <quote>Add to Favorites</quote>
4073  (IE) or <quote>Add Bookmark</quote> (Netscape). You will get a warning that
4074  the bookmark <quote>may not be safe</quote> - just click OK. Then you can run the
4075  Bookmarklet directly from your favorites/bookmarks. For even faster access,
4076  you can put them on the <quote>Links</quote> bar (IE) or the <quote>Personal
4077  Toolbar</quote> (Netscape), and run them with a single click. 
4078 </para>
4079
4080 <para>
4081  <itemizedlist>
4082
4083   <listitem>
4084    <para>
4085     <ulink 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());">Enable Privoxy</ulink>
4086    </para>
4087   </listitem> 
4088
4089   <listitem>
4090    <para>
4091     <ulink 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());">Disable Privoxy</ulink>
4092    </para>
4093   </listitem> 
4094
4095   <listitem>
4096    <para>
4097     <ulink 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());">Toggle Privoxy</ulink> (Toggles between enabled and disabled)
4098    </para>
4099   </listitem> 
4100
4101   <listitem>
4102    <para>
4103     <ulink url="javascript:void(window.open('http://config.privoxy.org/toggle?mini=y','ijbstatus','width=250,height=2,resizable=yes,scrollbars=no,toolbar=no,location=no,directories=no,status=no,menubar=no,copyhistory=no').focus());">View Privoxy Status</ulink>
4104    </para>
4105   </listitem> 
4106
4107   <listitem>
4108    <para>
4109     <ulink url="javascript:w=Math.floor(screen.width/2);h=Math.floor(screen.height*0.9);void(window.open('http://www.privoxy.org/actions','Feedback','screenx='+w+',width='+w+',height='+h+',scrollbars=yes,toolbar=no,location=no,directories=no,status=no,menubar=no,copyhistory=no').focus());">Actions file feedback system</ulink>
4110    </para>
4111   </listitem> 
4112
4113  </itemizedlist>
4114 </para>
4115
4116
4117
4118 <para>
4119  Credit: The site which gave me the general idea for these bookmarklets is
4120  <ulink url="http://www.bookmarklets.com">www.bookmarklets.com</ulink>. They
4121  have more information about bookmarklets. 
4122 </para>
4123
4124
4125 </sect3>
4126
4127 </sect2>
4128
4129
4130 <!--   ~~~~~       New section      ~~~~~     -->
4131 <sect2 id="actionsanat">
4132 <title>Anatomy of an Action</title>
4133
4134 <para>
4135  The way <application>Privoxy</application> applies <quote>actions</quote>
4136  and <quote>filters</quote> to any given URL can be complex, and not always so
4137  easy to understand what is happening. And sometimes we need to be able to
4138  <emphasis>see</emphasis> just what <application>Privoxy</application> is
4139  doing. Especially, if something <application>Privoxy</application> is doing
4140  is causing us a problem inadvertently. It can be a little daunting to look at
4141  the actions and filters files themselves, since they tend to be filled with
4142  <quote>regular expressions</quote> whose consequences are not always 
4143  so obvious. <application>Privoxy</application> provides the 
4144  <ulink url="http://config.privoxy.org/show-url-info">http://config.privoxy.org/show-url-info</ulink>
4145  page that can show us very specifically how <application>actions</application>
4146  are being applied to any given URL. This is a big help for troubleshooting.
4147  </para>
4148
4149 <para>
4150  First, enter one URL (or partial URL) at the prompt, and then
4151  <application>Privoxy</application> will tell us 
4152  how the current configuration will handle it. This will not
4153  help with filtering effects from the <filename>default.filter</filename> file! It
4154  also will not tell you about any other URLs that may be embedded within the
4155  URL you are testing (i.e. a web page). For instance, images such as ads are expressed as URLs
4156  within the raw page source of HTML pages. So you will only get info for the
4157  actual URL that is pasted into the prompt area -- not any sub-URLs. If you
4158  want to know about embedded URLs like ads, you will have to dig those out of
4159  the HTML source. Use your browser's <quote>View Page Source</quote> option
4160  for this. Or right click on the ad, and grab the URL.
4161 </para>
4162
4163 <para>
4164  Let's look at an example, <ulink url="http://google.com">google.com</ulink>, 
4165  one section at a time:
4166 </para>
4167
4168 <para>
4169  <screen>
4170  System default actions:
4171
4172  { -add-header -block -deanimate-gifs -downgrade -fast-redirects -filter 
4173    -hide-forwarded -hide-from -hide-referer -hide-user-agent -image 
4174    -image-blocker -limit-connect -no-compression -no-cookies-keep 
4175    -no-cookies-read -no-cookies-set -no-popups -vanilla-wafer -wafer }
4176  
4177  </screen>
4178 </para>
4179
4180 <para>
4181  This is the top section, and only tells us of the compiled in defaults. This 
4182  is basically what <application>Privoxy</application> would do if there 
4183  were not any <quote>actions</quote> defined, i.e. it does nothing. Every action 
4184  is disabled. This is not particularly informative for our purposes here. OK,
4185  next section:
4186 </para>
4187
4188 <para>
4189  <screen>
4190
4191  Matches for http://google.com:
4192
4193  { -add-header -block +deanimate-gifs -downgrade +fast-redirects 
4194    +filter{html-annoyances} +filter{js-annoyances} +filter{no-popups} 
4195    +filter{webbugs} +filter{nimda} +filter{banners-by-size} +filter{hal} 
4196    +filter{fun} +hide-forwarded +hide-from{block} +hide-referer{forge} 
4197    -hide-user-agent -image +image-blocker{blank} +no-compression 
4198    +no-cookies-keep -no-cookies-read -no-cookies-set +no-popups 
4199    -vanilla-wafer -wafer }
4200    /
4201
4202  { -no-cookies-keep -no-cookies-read -no-cookies-set }
4203   .google.com
4204
4205  { -fast-redirects }
4206   .google.com
4207
4208  </screen>
4209 </para>
4210
4211 <para>
4212  This is much more informative, and tells us how we have defined our 
4213  <quote>actions</quote>, and which ones match for our example, 
4214  <quote>google.com</quote>. The first grouping shows our default 
4215  settings, which would apply to all URLs. If you look at your <quote>actions</quote>
4216  file, this would be the section just below the <quote>aliases</quote> section 
4217  near the top. This applies to all URLs as signified by the single forward
4218  slash -- <quote>/</quote>.
4219  
4220 </para>
4221
4222 <para>
4223  These are the default actions we have enabled. But we can define additional
4224  actions that would be exceptions to these general rules, and then list 
4225  specific URLs that these exceptions would apply to. Last match wins.
4226  Just below this then are two explicit matches for <quote>.google.com</quote>.
4227  The first is negating our various cookie blocking actions (i.e. we will allow
4228  cookies here). The second is allowing <quote>fast-redirects</quote>. Note
4229  that there is a leading dot here -- <quote>.google.com</quote>. This will
4230  match any hosts and sub-domains, in the google.com domain also, such as
4231  <quote>www.google.com</quote>. So, apparently, we have these actions defined
4232  somewhere in the lower part of our actions file, and
4233  <quote>google.com</quote> is referenced in these sections.
4234
4235 </para>
4236
4237 <para>
4238  And now we pull it altogether in the bottom section and summarize how
4239  <application>Privoxy</application> is applying all its <quote>actions</quote> 
4240  to <quote>google.com</quote>:
4241
4242 </para>
4243
4244 <para>
4245  <screen>
4246
4247  Final results:
4248
4249  -add-header -block -deanimate-gifs -downgrade -fast-redirects 
4250  +filter{html-annoyances} +filter{js-annoyances} +filter{no-popups} 
4251  +filter{webbugs} +filter{nimda} +filter{banners-by-size} +filter{hal} 
4252  +filter{fun} +hide-forwarded +hide-from{block} +hide-referer{forge} 
4253  -hide-user-agent -image +image-blocker{blank} -limit-connect +no-compression 
4254  -no-cookies-keep -no-cookies-read -no-cookies-set +no-popups -vanilla-wafer 
4255  -wafer
4256
4257  </screen>
4258 </para>
4259
4260 <para>
4261  Now another example, <quote>ad.doubleclick.net</quote>:
4262 </para>
4263
4264 <para>
4265  <screen>
4266
4267  { +block +image }
4268   .ad.doubleclick.net
4269
4270  { +block +image }
4271   ad*.
4272
4273  { +block +image }
4274   .doubleclick.net
4275
4276  </screen>
4277 </para>
4278
4279 <para>
4280  We'll just show the interesting part here, the explicit matches. It is 
4281  matched three different times. Each as an <quote>+block +image</quote>,
4282  which is the expanded form of one of our aliases that had been defined as: 
4283  <quote>+imageblock</quote>. (<quote>Aliases</quote> are defined in the 
4284  first section of the actions file and typically used to combine more 
4285  than one action.)
4286 </para>
4287
4288 <para>
4289  Any one of these would have done the trick and blocked this as an unwanted 
4290  image. This is unnecessarily redundant since the last case effectively 
4291  would also cover the first. No point in taking chances with these guys 
4292  though ;-) Note that if you want an ad or obnoxious 
4293  URL to be invisible, it should be defined as <quote>ad.doubleclick.net</quote>
4294  is done here -- as both a <quote>+block</quote> <emphasis>and</emphasis> an
4295  <quote>+image</quote>. The custom alias <quote>+imageblock</quote> does this
4296  for us.
4297 </para>
4298
4299 <para>
4300  One last example. Let's try <quote>http://www.rhapsodyk.net/adsl/HOWTO/</quote>.
4301  This one is giving us problems. We are getting a blank page. Hmmm...
4302 </para>
4303
4304 <para>
4305  <screen>
4306
4307  Matches for http://www.rhapsodyk.net/adsl/HOWTO/:
4308
4309  { -add-header -block +deanimate-gifs -downgrade +fast-redirects 
4310    +filter{html-annoyances} +filter{js-annoyances} +filter{no-popups} 
4311    +filter{webbugs} +filter{nimda} +filter{banners-by-size} +filter{hal} 
4312    +filter{fun} +hide-forwarded +hide-from{block} +hide-referer{forge} 
4313    -hide-user-agent -image +image-blocker{blank} +no-compression 
4314    +no-cookies-keep -no-cookies-read -no-cookies-set +no-popups 
4315    -vanilla-wafer -wafer }
4316    /
4317
4318  { +block +image }
4319   /ads
4320
4321  </screen>
4322 </para>
4323
4324 <para>
4325  Ooops, the <quote>/adsl/</quote> is matching <quote>/ads</quote>! But 
4326  we did not want this at all! Now we see why we get the blank page. We could
4327  now add a new action below this that explicitly does <emphasis>not</emphasis>
4328  block (-block) pages with <quote>adsl</quote>. There are various ways to
4329  handle such exceptions. Example:
4330 </para>
4331
4332 <para>
4333  <screen>
4334
4335  { -block }
4336   /adsl
4337  
4338  </screen>
4339 </para>
4340
4341 <para>
4342  Now the page displays ;-) Be sure to flush your browser's caches when 
4343  making such changes. Or, try using <literal>Shift+Reload</literal>.
4344 </para>
4345
4346 <para>
4347  But now what about a situation where we get no explicit matches like 
4348  we did with:
4349 </para>
4350
4351 <para>
4352  <screen>
4353
4354  { -block }
4355   /adsl
4356  
4357  </screen>
4358 </para>
4359
4360 <para>
4361  That actually was very telling and pointed us quickly to where the problem
4362  was. If you don't get this kind of match, then it means one of the default 
4363  rules in the first section is causing the problem. This would require some 
4364  guesswork, and maybe a little trial and error to isolate the offending rule.
4365  One likely cause would be one of the <quote>{+filter}</quote> actions. Try 
4366  adding the URL for the site to one of aliases that turn off <quote>+filter</quote>:
4367 </para>
4368
4369 <para>
4370  <screen>
4371
4372  {shop}
4373  .quietpc.com
4374  .worldpay.com   # for quietpc.com
4375  .jungle.com
4376  .scan.co.uk
4377  .forbes.com
4378  
4379  </screen>
4380 </para>
4381
4382 <para>
4383  <quote>{shop}</quote> is an <quote>alias</quote> that expands to 
4384  <quote>{ -filter -no-cookies -no-cookies-keep }</quote>. Or you could do 
4385  your own exception to negate filtering:
4386
4387 </para>
4388
4389 <para>
4390  <screen>
4391
4392  {-filter}
4393  .forbes.com
4394  
4395  </screen>
4396 </para>
4397
4398 <para>
4399  <quote>{fragile}</quote> is an alias that disables most actions. This can be 
4400  used as a last resort for problem sites. Remember to flush caches! If this 
4401  still does not work, you will have to go through the remaining actions one by
4402  one to find which one(s) is causing the problem.
4403 </para>
4404
4405 </sect2>
4406
4407 </sect1>
4408
4409  <!--
4410
4411  This program is free software; you can redistribute it 
4412  and/or modify it under the terms of the GNU General
4413  Public License as published by the Free Software
4414  Foundation; either version 2 of the License, or (at
4415  your option) any later version.
4416
4417  This program is distributed in the hope that it will
4418  be useful, but WITHOUT ANY WARRANTY; without even the
4419  implied warranty of MERCHANTABILITY or FITNESS FOR A
4420  PARTICULAR PURPOSE.  See the GNU General Public
4421  License for more details.
4422
4423  The GNU General Public License should be included with
4424  this file.  If not, you can view it at
4425  http://www.gnu.org/copyleft/gpl.html
4426  or write to the Free Software Foundation, Inc., 59
4427  Temple Place - Suite 330, Boston, MA  02111-1307, USA.
4428
4429  $Log: user-manual.sgml,v $
4430  Revision 1.82  2002/04/18 12:04:50  oes
4431  Cosmetics
4432
4433  Revision 1.81  2002/04/18 11:50:24  oes
4434  Extended Install section - needs fixing by packagers
4435
4436  Revision 1.80  2002/04/18 10:45:19  oes
4437  Moved text to buildsource.sgml, renamed some filters, details
4438
4439  Revision 1.79  2002/04/18 03:18:06  hal9
4440  Spellcheck, and minor touchups.
4441
4442  Revision 1.78  2002/04/17 18:04:16  oes
4443  Proofreading part 2
4444
4445  Revision 1.77  2002/04/17 13:51:23  oes
4446  Proofreading, part one
4447
4448  Revision 1.76  2002/04/16 04:25:51  hal9
4449  -Added 'Note to Upgraders' and re-ordered the 'Quickstart' section.
4450  -Note about proxy may need requests to re-read config files.
4451
4452  Revision 1.75  2002/04/12 02:08:48  david__schmidt
4453  Remove OS/2 building info... it is already in the developer-manual
4454
4455  Revision 1.74  2002/04/11 00:54:38  hal9
4456  Add small section on submitting actions.
4457
4458  Revision 1.73  2002/04/10 18:45:15  swa
4459  generated
4460
4461  Revision 1.72  2002/04/10 04:06:19  hal9
4462  Added actions feedback  to Bookmarklets section
4463
4464  Revision 1.71  2002/04/08 22:59:26  hal9
4465  Version update. Spell chkconfig correctly :)
4466
4467  Revision 1.70  2002/04/08 20:53:56  swa
4468  ?
4469
4470  Revision 1.69  2002/04/06 05:07:29  hal9
4471  -Add privoxy-man-page.sgml, for man page.
4472  -Add authors.sgml for AUTHORS (and p-authors.sgml)
4473  -Reworked various aspects of various docs.
4474  -Added additional comments to sub-docs.
4475
4476  Revision 1.68  2002/04/04 18:46:47  swa
4477  consistent look. reuse of copyright, history et. al.
4478
4479  Revision 1.67  2002/04/04 17:27:57  swa
4480  more single file to be included at multiple points. make maintaining easier
4481
4482  Revision 1.66  2002/04/04 06:48:37  hal9
4483  Structural changes to allow for conditional inclusion/exclusion of content
4484  based on entity toggles, e.g. 'entity % p-not-stable  "INCLUDE"'. And
4485  definition of internal entities, e.g. 'entity p-version "2.9.13"' that will
4486  eventually be set by Makefile.
4487  More boilerplate text for use across multiple docs.
4488
4489  Revision 1.65  2002/04/03 19:52:07  swa
4490  enhance squid section due to user suggestion
4491
4492  Revision 1.64  2002/04/03 03:53:43  hal9
4493  A few minor bug fixes, and touch ups. Ready for review.
4494
4495  Revision 1.63  2002/04/01 16:24:49  hal9
4496  Define entities to include boilerplate text. See doc/source/*.
4497
4498  Revision 1.62  2002/03/30 04:15:53  hal9
4499  - Fix privoxy.org/config links.
4500  - Paste in Bookmarklets from Toggle page.
4501  - Move Quickstart nearer top, and minor rework.
4502
4503  Revision 1.61  2002/03/29 01:31:08  hal9
4504  Minor update.
4505
4506  Revision 1.60  2002/03/27 01:57:34  hal9
4507  Added more to Anatomy section.
4508
4509  Revision 1.59  2002/03/27 00:54:33  hal9
4510  Touch up intro for new name.
4511
4512  Revision 1.58  2002/03/26 22:29:55  swa
4513  we have a new homepage!
4514
4515  Revision 1.57  2002/03/24 20:33:30  hal9
4516  A few minor catch ups with name change.
4517
4518  Revision 1.56  2002/03/24 16:17:06  swa
4519  configure needs to be generated.
4520
4521  Revision 1.55  2002/03/24 16:08:08  swa
4522  we are too lazy to make a block-built
4523  privoxy logo. hence removed the option.
4524
4525  Revision 1.54  2002/03/24 15:46:20  swa
4526  name change related issue.
4527
4528  Revision 1.53  2002/03/24 11:51:00  swa
4529  name change. changed filenames.
4530
4531  Revision 1.52  2002/03/24 11:01:06  swa
4532  name change
4533
4534  Revision 1.51  2002/03/23 15:13:11  swa
4535  renamed every reference to the old name with foobar.
4536  fixed "application foobar application" tag, fixed
4537  "the foobar" with "foobar". left junkbustser in cvs
4538  comments and remarks to history untouched.
4539
4540  Revision 1.50  2002/03/23 05:06:21  hal9
4541  Touch up.
4542
4543  Revision 1.49  2002/03/21 17:01:05  hal9
4544  New section in Appendix.
4545
4546  Revision 1.48  2002/03/12 06:33:01  hal9
4547  Catching up to Andreas and re_filterfile changes.
4548
4549  Revision 1.47  2002/03/11 13:13:27  swa
4550  correct feedback channels
4551
4552  Revision 1.46  2002/03/10 00:51:08  hal9
4553  Added section on JB internal pages in Appendix.
4554
4555  Revision 1.45  2002/03/09 17:43:53  swa
4556  more distros
4557
4558  Revision 1.44  2002/03/09 17:08:48  hal9
4559  New section on Jon's actions file editor, and move some stuff around.
4560
4561  Revision 1.43  2002/03/08 00:47:32  hal9
4562  Added imageblock{pattern}.
4563
4564  Revision 1.42  2002/03/07 18:16:55  swa
4565  looks better
4566
4567  Revision 1.41  2002/03/07 16:46:43  hal9
4568  Fix a few markup problems for jade.
4569
4570  Revision 1.40  2002/03/07 16:28:39  swa
4571  provide correct feedback channels
4572
4573  Revision 1.39  2002/03/06 16:19:28  hal9
4574  Note on perceived filtering slowdown per FR.
4575
4576  Revision 1.38  2002/03/05 23:55:14  hal9
4577  Stupid I did it again. Double hyphen in comment breaks jade.
4578
4579  Revision 1.37  2002/03/05 23:53:49  hal9
4580  jade barfs on '- -' embedded in comments. - -user option broke it.
4581
4582  Revision 1.36  2002/03/05 22:53:28  hal9
4583  Add new - - user option.
4584
4585  Revision 1.35  2002/03/05 00:17:27  hal9
4586  Added section on command line options.
4587
4588  Revision 1.34  2002/03/04 19:32:07  oes
4589  Changed default port to 8118
4590
4591  Revision 1.33  2002/03/03 19:46:13  hal9
4592  Emphasis on where/how to report bugs, etc
4593
4594  Revision 1.32  2002/03/03 09:26:06  joergs
4595  AmigaOS changes, config is now loaded from PROGDIR: instead of
4596  AmiTCP:db/junkbuster/ if no configuration file is specified on the
4597  command line.
4598
4599  Revision 1.31  2002/03/02 22:45:52  david__schmidt
4600  Just tweaking
4601
4602  Revision 1.30  2002/03/02 22:00:14  hal9
4603  Updated 'New Features' list. Ran through spell-checker.
4604
4605  Revision 1.29  2002/03/02 20:34:07  david__schmidt
4606  Update OS/2 build section
4607
4608  Revision 1.28  2002/02/24 14:34:24  jongfoster
4609  Formatting changes.  Now changing the doctype to DocBook XML 4.1
4610  will work - no other changes are needed.
4611
4612  Revision 1.27  2002/01/11 14:14:32  hal9
4613  Added a very short section on Templates
4614
4615  Revision 1.26  2002/01/09 20:02:50  hal9
4616  Fix bug re: auto-detect config file changes.
4617
4618  Revision 1.25  2002/01/09 18:20:30  hal9
4619  Touch ups for *.action files.
4620
4621  Revision 1.24  2001/12/02 01:13:42  hal9
4622  Fix typo.
4623
4624  Revision 1.23  2001/12/02 00:20:41  hal9
4625  Updates for recent changes.
4626
4627  Revision 1.22  2001/11/05 23:57:51  hal9
4628  Minor update for startup now daemon mode.
4629
4630  Revision 1.21  2001/10/31 21:11:03  hal9
4631  Correct 2 minor errors
4632
4633  Revision 1.18  2001/10/24 18:45:26  hal9
4634  *** empty log message ***
4635
4636  Revision 1.17  2001/10/24 17:10:55  hal9
4637  Catching up with Jon's recent work, and a few other things.
4638
4639  Revision 1.16  2001/10/21 17:19:21  swa
4640  wrong url in documentation
4641
4642  Revision 1.15  2001/10/14 23:46:24  hal9
4643  Various minor changes. Fleshed out SEE ALSO section.
4644
4645  Revision 1.13  2001/10/10 17:28:33  hal9
4646  Very minor changes.
4647
4648  Revision 1.12  2001/09/28 02:57:04  hal9
4649  Ditto :/
4650
4651  Revision 1.11  2001/09/28 02:25:20  hal9
4652  Ditto.
4653
4654  Revision 1.9  2001/09/27 23:50:29  hal9
4655  A few changes. A short section on regular expression in appendix.
4656
4657  Revision 1.8  2001/09/25 00:34:59  hal9
4658  Some additions, and re-arranging.
4659
4660  Revision 1.7  2001/09/24 14:31:36  hal9
4661  Diddling.
4662
4663  Revision 1.6  2001/09/24 14:10:32  hal9
4664  Including David's OS/2 installation instructions.
4665
4666  Revision 1.2  2001/09/13 15:27:40  swa
4667  cosmetics
4668
4669  Revision 1.1  2001/09/12 15:36:41  swa
4670  source files for junkbuster documentation
4671
4672  Revision 1.3  2001/09/10 17:43:59  swa
4673  first proposal of a structure.
4674
4675  Revision 1.2  2001/06/13 14:28:31  swa
4676  docs should have an author.
4677
4678  Revision 1.1  2001/06/13 14:20:37  swa
4679  first import of project's documentation for the webserver.
4680
4681  -->
4682
4683 </article>