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