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