Use apt-get instead of dpkg to install Debian package, which is more
[privoxy.git] / doc / source / user-manual.sgml
index 7a9db75..582af7f 100644 (file)
@@ -32,7 +32,7 @@
                 This file belongs into
                 ijbswa.sourceforge.net:/home/groups/i/ij/ijbswa/htdocs/
 
- $Id: user-manual.sgml,v 1.126 2002/06/05 00:31:55 hal9 Exp $
+ $Id: user-manual.sgml,v 2.9 2003/04/11 03:14:53 hal9 Exp $
 
  Copyright (C) 2001, 2002 Privoxy Developers <developers@privoxy.org>
  See LICENSE.
 <article id="index">
 <artheader>
 
-<title>Privoxy User Manual</title>
+<title>Privoxy &p-version; User Manual</title>
 
 <pubdate>
  <subscript>
 <!-- Completely the wrong markup, but very little is allowed  -->
 <!-- in this part of an article. FIXME -->
  <link linkend="copyright">Copyright</link> &my-copy; 2001, 2002 by 
- <ulink url="http://www.privoxy.org">Privoxy Developers</ulink>
+ <ulink url="http://www.privoxy.org/">Privoxy Developers</ulink>
  </subscript>
 </pubdate>
 
-<pubdate>$Id: user-manual.sgml,v 1.126 2002/06/05 00:31:55 hal9 Exp $</pubdate>
+<pubdate>$Id: user-manual.sgml,v 2.9 2003/04/11 03:14:53 hal9 Exp $</pubdate>
 
 <!--
 
@@ -109,7 +109,7 @@ Hal.
  <para>
   You can find the latest version of the <citetitle>User Manual</citetitle> at  <ulink
   url="http://www.privoxy.org/user-manual/">http://www.privoxy.org/user-manual/</ulink>.
-  Please see the <ulink url="contact.html">Contact section</ulink> on how to
+  Please see the <link linkend="contact">Contact section</link> on how to
   contact the developers.
  </para>
 
@@ -125,12 +125,10 @@ Hal.
 <para>
  This documentation is included with the current &p-status; version of
  <application>Privoxy</application>, v.&p-version;<![%p-not-stable;[, 
- and is mostly complete at this point. The most up to date reference for the
- time being is still the comments in the source files and in the individual
- configuration files. Development of version 3.0 is currently nearing
- completion, and includes many significant changes and enhancements over
- earlier versions. The target release date for
- stable v3.0 is <quote>soon</quote> ;-)]]>.
+ and is mostly complete at this point. 
+ Development of version 3.2 is just beginning,
+ and will include many significant changes and enhancements over
+ earlier versions]]>.
 </para>
 
 <!-- include only in non-stable versions -->
@@ -139,7 +137,7 @@ Hal.
  Since this is a &p-status; version, not all new features are well tested. This
  documentation may be slightly out of sync as a result (especially with 
  CVS sources). And there <emphasis>may be</emphasis> bugs, though hopefully
- not many! 
+ not many! Please find them!
 </para>
 ]]>
 
@@ -222,10 +220,9 @@ automatically start Privoxy in the boot process.
 <!--   ~~~~~       New section      ~~~~~     -->
 <sect3 id="installation-deb"><title>Debian</title>
 <para>
- DEBs can be installed with <literal>dpkg -i
- privoxy_&p-version;-1.deb</literal>, and will use
- <filename>/etc/privoxy</filename> for the location of configuration
- files.
+ DEBs can be installed with <literal>apt-get install privoxy</literal>,
+ and will use <filename>/etc/privoxy</filename> for the location of 
+ configuration files.
 </para>
 </sect3>
 
@@ -277,17 +274,32 @@ automatically start Privoxy in the boot process.
 </sect3>
 
 <!--   ~~~~~       New section      ~~~~~     -->
-<sect3 id="installation-mac"><title>Max OSX</title>
-<para>
- Unzip the downloaded package (you can either double-click on the file
- in the finder, or on the desktop if you downloaded it there).  Then,
- double-click on the package installer icon and follow the installation
- process.
- <application>Privoxy</application> will be installed in the subdirectory
- <literal>/Applications/Privoxy.app</literal>.
- <application>Privoxy</application> will set itself up to start 
- automatically on system bring-up via
- <literal>/System/Library/StartupItems/Privoxy</literal>.
+<sect3 id="installation-mac"><title>Mac OSX</title>
+<para>
+ Unzip the downloaded file (you can either double-click on the file
+ from the finder, or from the desktop if you downloaded it there).
+ Then, double-click on the package installer icon named
+ <literal>Privoxy.pkg</literal>
+ and follow the installation process.
+ <application>Privoxy</application> will be installed in the folder
+ <literal>/Library/Privoxy</literal>.
+ It will start automatically whenever you start up.  To prevent it from
+ starting automatically, remove or rename the folder
+ <literal>/Library/StartupItems/Privoxy</literal>. 
+</para>
+<para>
+ To start Privoxy by hand, double-click on 
+ <literal>StartPrivoxy.command</literal> in the
+ <literal>/Library/Privoxy</literal> folder.
+ Or, type this command in the Terminal:
+</para>
+<para>
+  <screen>
+  /Library/Privoxy/StartPrivoxy.command
+  </screen>
+</para>
+<para>
+ You will be prompted for the administrator password.
 </para>
 </sect3>
 
@@ -300,6 +312,28 @@ automatically start Privoxy in the boot process.
  remove this directory.
 </para>
 </sect3>
+
+<!--   ~~~~~       New section      ~~~~~     -->
+<sect3 id="installattion-gentoo"><title>Gentoo</title>
+<para>
+ Gentoo source packages (Ebuilds) for <application>Privoxy</application> are 
+ contained in the Gentoo  Portage Tree (they are not on the download page, 
+ but there is a Gentoo section, where you can see when a new 
+ <application>Privoxy</application> Version is added to the  Portage Tree).
+</para>
+<para>
+ Before installing <application>Privoxy</application> under Gentoo just do 
+ first <literal>emerge rsync</literal> to get the latest changes from the 
+ Portage tree. With <literal>emerge privoxy</literal> you install the latest 
+ version.
+</para>
+<para>
+ Configuration files are in <filename>/etc/privoxy</filename>, the 
+ documentation is in <filename>/usr/share/doc/privoxy-&p-version;</filename>
+ and the Log directory is in <filename>/var/log/privoxy</filename>.
+</para>
+</sect3>
+
 </sect2>
 
 <!--   ~~~~~       New section      ~~~~~     -->
@@ -325,6 +359,33 @@ automatically start Privoxy in the boot process.
 <!-- end boilerplate -->
 
 </sect2>
+<!--   ~~~~~       New section      ~~~~~     --> 
+<sect2 id="installation-keepupdated"><title>Keeping your Installation Up-to-Date</title>
+<para>
+ As user feedback comes in and development continues, we will make updated versions
+ of both the main <link linkend="actions-file">actions file</link> (as a <ulink
+ url="http://sourceforge.net/project/showfiles.php?group_id=11118&amp;release_id=103670">separate
+ package</ulink>) and the software itself (including the actions file) available for
+ download.
+</para>
+
+<para>
+ If you wish to receive an email notification whenever we release updates of
+ <application>Privoxy</application> or the actions file, <ulink
+ url="http://lists.sourceforge.net/lists/listinfo/ijbswa-announce/">subscribe
+ to our announce  mailing list</ulink>, ijbswa-announce@lists.sourceforge.net.
+</para>
+
+<para>
+ In order not to loose your personal changes and adjustments when updating
+ to the latest <literal>default.action</literal> file we <emphasis>strongly
+ recommend</emphasis> that you use <literal>user.action</literal> for your
+ customization of <application>Privoxy</application>. See the <link
+ linkend="actions-file">Chapter on actions files</link> for details.
+</para>
+
+</sect2>
+
 
 </sect1>
 
@@ -455,7 +516,7 @@ automatically start Privoxy in the boot process.
  <listitem>
   <para>
    Set your browser to use <application>Privoxy</application> as HTTP and
-   HTTPS proxy by setting the proxy configuration for address of
+   HTTPS (SSL) proxy by setting the proxy configuration for address of
    <literal>127.0.0.1</literal> and port <literal>8118</literal>.
    (<application>Junkbuster</application> and earlier versions of
    <application>Privoxy</application> used port 8000.) See the section <link
@@ -467,6 +528,8 @@ automatically start Privoxy in the boot process.
  <listitem>
   <para>
     Flush your browser's disk and memory caches, to remove any cached ad images.
+    If using <application>Privoxy</application> to manage cookies, you should 
+    remove any currently stored cookies too.
   </para>
  </listitem> 
 
@@ -777,6 +840,10 @@ automatically start Privoxy in the boot process.
  127.0.0.1 (or localhost) for the proxy address, and port 8118 (earlier versions
  used port 8000). This is the one configuration step that must be done!
 </para>
+<para>
+ Please note that <application>Privoxy</application> can only proxy HTTP and 
+ HTTPS traffic. It will not work with FTP or other protocols.
+</para>
 
  <!-- image of Mozilla Proxy configuration -->
  <para>
@@ -924,16 +991,21 @@ Example Unix startup command:
 </sect2>
 
 <sect2 id="start-macosx">
-<title>MAX OSX</title>
+<title>Mac OSX</title>
 <para>
  During installation, <application>Privoxy</application> is configured to
- start automatically when the system restarts. You can start it manually
- through the Terminal with these commands:
+ start automatically when the system restarts.  To start Privoxy by hand,
+ double-click on the <literal>StartPrivoxy.command</literal> icon in the
+ <literal>/Library/Privoxy</literal> folder.  Or, type this command
+ in the Terminal:
 </para>
 <para>
   <screen>
-  cd /Applications/Privoxy.app
-  ./privoxy</screen>
+  /Library/Privoxy/StartPrivoxy.command
+  </screen>
+</para>
+<para>
+ You will be prompted for the administrator password.
 </para>
 </sect2>
 
@@ -951,6 +1023,29 @@ Example Unix startup command:
 </para>
 </sect2>
 
+<sect2 id="start-gentoo">
+<title>Gentoo</title>
+<para>
+ A script is again used. It will use the file <filename>/etc/privoxy/config 
+ </filename> as its main configuration file.
+</para>
+<para>
+ <screen>
+ /etc/init.d/privoxy start
+ </screen>
+</para>
+<para>
+ Note that <application>Privoxy</application> is not automatically started at 
+ boot time by default. You can change this with the <literal>rc-update</literal> 
+ command.
+</para>
+<para> 
+ <screen>
+ rc-update add privoxy default
+ </screen>
+</para>
+</sect2>
+
 <!--
 
 <para>
@@ -1036,17 +1131,17 @@ must find a better place for this paragraph
 </para>
 
 <para>
- If the above paragraph sounds gibberish to you, you might want to <ulink
url="actions-file.html#ACTIONSFILE">read more about the actions concept</ulink>
- or even dive deep into the <ulink url="appendix.html#ACTIONSANAT">Appendix
- on actions</ulink>.
+ If the above paragraph sounds gibberish to you, you might want to <link
linkend="actions-file">read more about the actions concept</link>
+ or even dive deep into the <link linkend="actionsanat">Appendix
+ on actions</link>.
 </para>
 
 <para>
  If you can't get rid of the problem at all, think you've found a bug in
  Privoxy, want to propose a new feature or smarter rules, please see the 
- section <ulink url="contact.html"><quote>Contacting the
- Developers</quote></ulink> below. 
+ section <link linkend="contact"><quote>Contacting the
+ Developers</quote></link> below. 
 </para>
 
 -->
@@ -1178,6 +1273,9 @@ must find a better place for this paragraph
  <member>
   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&squf;&nbsp;&nbsp;<ulink url="http://config.privoxy.org/toggle">Toggle Privoxy on or off</ulink>
  </member>
+ <member>
+  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&squf;&nbsp;&nbsp;<ulink url="http://www.privoxy.org/&p-version;/user-manual/">Documentation</ulink>
+ </member>
  </simplelist>
  </msgtext>
 </screen>
@@ -1276,7 +1374,8 @@ must find a better place for this paragraph
     file</link>) can be used to re-write the raw page content, including
     viewable text as well as embedded HTML and JavaScript, and whatever else
     lurks on any given web page. The filtering jobs are only pre-defined here;
-    whether to apply them or not is up to the actions files.
+    whether to apply them or not is up to the actions files. Only one filter 
+    file may be defined.
    </para>
   </listitem> 
 
@@ -1345,9 +1444,9 @@ must find a better place for this paragraph
  <application>Privoxy</application> takes for which URLs, and thus determine
  how ad images, cookies and various other aspects of HTTP content and
  transactions are handled, and on which sites (or even parts thereof). There 
- are three such files included with <application>Privoxy</application> (as of 
- version 2.9.15), with differing purposes:
- </para>
+ are three such files included with <application>Privoxy</application>, with
+ differing purposes: 
+</para>
  
  <para>
   <itemizedlist>
@@ -1358,8 +1457,8 @@ must find a better place for this paragraph
      provide a base level of functionality for
      <application>Privoxy's</application> array of features. So it is 
      a set of broad rules that should work reasonably well for users everywhere.
-     This is the file that the developers are keeping updated, and making 
-     available to users.
+     This is the file that the developers are keeping updated, and <link
+     linkend="installation-keepupdated">making available to users</link>.
     </para>
    </listitem> 
    <listitem>
@@ -1447,7 +1546,10 @@ must find a better place for this paragraph
  url="http://config.privoxy.org/show-status">http://config.privoxy.org/show-status</ulink>.
  The editor allows both fine-grained control over every single feature on a
  per-URL basis, and easy choosing from wholesale sets of defaults like
- <quote>Cautious</quote>, <quote>Medium</quote> or <quote>Advanced</quote>.
+ <quote>Cautious</quote>, <quote>Medium</quote> or <quote>Radical</quote>.
+ Warning: the <quote>Radical</quote> setting is not only more aggressive, 
+ but includes settings that are fun and subversive, and which some may find of 
+ dubious merit!
 </para>
 
 <para>
@@ -1477,9 +1579,9 @@ must find a better place for this paragraph
  the same URL set the same action differently, the last match wins. If not, 
  the effects are aggregated. E.g. a URL might match a regular section with 
  a heading line of <literal>{ 
- +<ulink url="actions-file.html#HANDLE-AS-IMAGE">handle-as-image</ulink> }</literal>,
+ +<link linkend="handle-as-image">handle-as-image</link> }</literal>,
  then later another one with just <literal>{
- +<ulink url="actions-file.html#BLOCK">block</ulink> }</literal>, resulting
+ +<link linkend="block">block</link> }</literal>, resulting
  in <emphasis>both</emphasis> actions to apply.
 </para>
 
@@ -1497,10 +1599,23 @@ must find a better place for this paragraph
 <!--   ~~~~~       New section      ~~~~~     -->
 <sect2 id="af-patterns">
 <title>Patterns</title>
+<para> 
+ As mentioned, <application>Privoxy</application> uses <quote>patterns</quote>
+ to determine what actions might apply to which sites and pages your browser 
+ attempts to access. These <quote>patterns</quote> use wild card type 
+ <emphasis>pattern</emphasis> matching to achieve a high degree of 
+ flexibility. This allows one expression to be expanded and potentially match
+ against many similar patterns.
+</para>
 <para>
- Generally, a pattern has the form <literal>&lt;domain&gt;/&lt;path&gt;</literal>,
- where both the <literal>&lt;domain&gt;</literal> and <literal>&lt;path&gt;</literal>
- are optional. (This is why the pattern <literal>/</literal> matches all URLs).
+ Generally, a <application>Privoxy</application> pattern has the form
+ <literal>&lt;domain&gt;/&lt;path&gt;</literal>, where both the
+ <literal>&lt;domain&gt;</literal> and <literal>&lt;path&gt;</literal> are
+ optional. (This is why the special <literal>/</literal> pattern matches all
+ URLs). Note that the protocol portion of the URL pattern (e.g.
+ <literal>http://</literal>) should <emphasis>not</emphasis> be included in
+ the pattern. This is assumed already!
 </para>
 
 <variablelist>
@@ -1567,7 +1682,7 @@ must find a better place for this paragraph
   <listitem>
    <para>
     matches any domain that <emphasis>ENDS</emphasis> in
-    <literal>.example.com</literal>
+    <literal>.example.com</literal> (e.g. <literal>www.example.com</literal>)
    </para>
   </listitem>
  </varlistentry>
@@ -2017,7 +2132,8 @@ must find a better place for this paragraph
    <para>
     It makes <emphasis>no sense at all</emphasis> to use this action in conjunction
     with the <literal><link linkend="session-cookies-only">session-cookies-only</link></literal> action,
-    since it would prevent the session cookies from being set.
+    since it would prevent the session cookies from being set. See also 
+    <literal><link linkend="filter-content-cookies">filter-content-cookies</link></literal>.
    </para>
   </listitem>
  </varlistentry>
@@ -2331,8 +2447,9 @@ problem-host.example.com</screen>
   <term>Effect:</term>
   <listitem>
    <para>
-    Text documents, including HTML and JavaScript, to which this action applies, are filtered on-the-fly
-    through the specified regular expression based substitutions.    
+    Text documents, including HTML and JavaScript, to which this action
+    applies, are filtered on-the-fly through the specified regular expression
+    based substitutions.
    </para>
   </listitem>
  </varlistentry>
@@ -2382,8 +2499,12 @@ problem-host.example.com</screen>
     <literal><link linkend="buffer-limit">buffer-limit</link></literal>
     option in the main <link linkend="config">config file</link>. The 
     default is 4096 KB (4 Megs). Once this limit is exceeded, the buffered
-    data, and all pending data, is passed through unfiltered. Inappropriate 
-    MIME types are not filtered.
+    data, and all pending data, is passed through unfiltered. 
+   </para>
+   <para>
+    Inappropriate MIME types, such as zipped files, are not filtered at all.
+    Encrypted SSL data (from HTTPS servers) cannot be filtered either since
+    this would violate the integrity of the secure transaction.
    </para>
    <para>
     At this time, <application>Privoxy</application> cannot (yet!) uncompress compressed
@@ -2422,6 +2543,14 @@ problem-host.example.com</screen>
     <anchor id="filter-banners-by-size">
     <screen>+filter{banners-by-size}     # Kill banners based on their size for this page (<emphasis>very</emphasis> efficient!)</screen>
    </para>
+   <para>
+    <anchor id="filter-banners-by-link">
+    <screen>+filter{banners-by-link}     # Kill banners based on the link they are contained in (experimental)</screen>
+   </para>
+   <para>
+    <anchor id="filter-img-reorder">
+    <screen>+filter{img-reorder}         # Reorder attributes in &lt;img&gt; tags to make the banners-by-* filters more effective</screen>
+   </para>
    <para>
     <anchor id="filter-content-cookies">
     <screen>+filter{content-cookies}     # Kill cookies that come sneaking in the HTML or JS content</screen>
@@ -2458,6 +2587,14 @@ problem-host.example.com</screen>
     <anchor id="filter-crude-parental">
     <screen>+filter{crude-parental}      # Kill all web pages that contain the words "sex" or "warez"</screen>
    </para>
+   <para>
+    <anchor id="filter-js-events">
+    <screen>+filter{js-events}           # Kill all JS event bindings (<emphasis>Radically destructive!</emphasis> Only for extra nasty sites) </screen>
+   </para>
+   <para>
+    <anchor id="filter-demoronizer">
+    <screen>+filter{demoronizer}         # Fix non-standard MS font extensions for non-MS browsers</screen>
+   </para>
   </listitem>
  </varlistentry>
 </variablelist>
@@ -3311,6 +3448,17 @@ my-internal-testing-server.void</screen>
     Note that it is up to the browser how it handles such cookies without an <quote>expires</quote>
     field. If you use an exotic browser, you might want to try it out to be sure.
    </para>
+   <para>
+    This setting also has no effect on cookies that may have been stored
+    previously by the browser before starting <application>Privoxy</application>.
+    These would have to be removed manually.
+   </para>
+   <para>
+     <application>Privoxy</application> also uses  
+     the <link linkend="filter-content-cookies">content-cookies filter</link> 
+     to block some types of cookies. Content cookies are not effected by 
+     <literal>session-cookies-only</literal>.
+   </para>
   </listitem>
  </varlistentry>
 
@@ -3683,8 +3831,11 @@ shop        = mercy-for-cookies -filter{popups} -kill-popups</screen>
  -<link linkend="FILTER-FUN">filter{fun}</link> \
  +<link linkend="FILTER-NIMDA">filter{nimda}</link> \
  +<link linkend="FILTER-BANNERS-BY-SIZE">filter{banners-by-size}</link> \
+ -<link linkend="FILTER-BANNERS-BY-LINK">filter{banners-by-link}</link> \
+ -<link linkend="FILTER-IMG-REORDER">filter{img-reorder}</link> \
  -<link linkend="FILTER-SHOCKWAVE-FLASH">filter{shockwave-flash}</link> \
  -<link linkend="FILTER-CRUDE-PARENTAL">filter{crude-parental}</link> \
+ -<link linkend="FILTER-JS-EVENTS">filter{js-events}</link> \
  -<link linkend="HANDLE-AS-IMAGE">handle-as-image</link> \
  +<link linkend="HIDE-FORWARDED-FOR-HEADERS">hide-forwarded-for-headers</link> \
  +<link linkend="HIDE-FROM-HEADER">hide-from-header{block}</link> \
@@ -3964,7 +4115,6 @@ www.ugu.com/sui/ugu/adv</screen>
 </sect3>
 
 <sect3><title>user.action</title>
-
 <para>
  So far we are painting with a broad brush by setting general policies,
  which would be a reasonable starting point for many people. Now, 
@@ -4001,14 +4151,31 @@ www.ugu.com/sui/ugu/adv</screen>
 
 <para>
  <screen>
+# Aliases are local to the file they are defined in.
 # (Re-)define aliases for this file:
 #
 {{alias}}
+# 
+# These aliases just save typing later, and the alias names should 
+# be self explanatory.
+#
++crunch-all-cookies = +crunch-incoming-cookies +crunch-outgoing-cookies
 -crunch-all-cookies = -crunch-incoming-cookies -crunch-outgoing-cookies
-mercy-for-cookies   = -crunch-all-cookies -session-cookies-only
+ allow-all-cookies  = -crunch-all-cookies -session-cookies-only
+ allow-popups       = -filter{popups} -kill-popups
++block-as-image     = +block +handle-as-image
+-block-as-image     = -block
+
+# These aliases define combinations of actions that are useful for
+# certain types of sites:
+#
 fragile     = -block -crunch-all-cookies -filter -fast-redirects -hide-referer -kill-popups
-shop        = mercy-for-cookies -filter{popups} -kill-popups
-allow-ads   = -block -filter{banners-by-size} # (see below)</screen>
+shop        = -crunch-all-cookies allow-popups
+
+# Allow ads for selected useful free sites:
+#
+allow-ads   = -block -filter{banners-by-size} -filter{banners-by-link}</screen>
+
  
 </para>
 
@@ -4016,14 +4183,14 @@ allow-ads   = -block -filter{banners-by-size} # (see below)</screen>
  Say you have accounts on some sites that you visit regularly, and
  you don't want to have to log in manually each time. So you'd like
  to allow persistent cookies for these sites. The
- <literal>mercy-for-cookies</literal> alias defined above does exactly
- that, i.e. it disables crunching of cookies in any direction, and
- processing of cookies to make them temporary.
+ <literal>allow-all-cookies</literal> alias defined above does exactly
+ that, i.e. it disables crunching of cookies in any direction, and the 
+ processing of cookies to make them only temporary.
 </para>
 
 <para>
  <screen>
-{ mercy-for-cookies }
+{ allow-all-cookies }
 sunsolve.sun.com
 slashdot.org
 .yahoo.com
@@ -4043,34 +4210,76 @@ slashdot.org
 </para>
 
 <para>
- While browsing the web with <application>Privoxy</application> you
- noticed some ads that sneaked through, but you were too lazy to
- report them through our fine and easy <link linkend="contact">feedback</link>
- system, so you have added them here:
+ Some hosts and some file types you may not want to filter.
+ <application>Privoxy</application> makes no distinctions between regular web
+ pages and downloads done via your web browser if it is an html or text type
+ document.
+</para>
+
+<para>
+ <screen>
+{ -<link linkend="FILTER">filter</link> }
+localhost
+apache_server.mylan
+
+# A list of common file extensions that are likely to indicate raw text, and best
+# if unfiltered.
+/(.*/)?.*\.(pl|(s|p)?h|c(c|xx|pp)?|tcl|am|init?|cfg?|conf(ig)?|txt|rc|bat)$
+
+# Documentation should not need filtering (at least on some sites).
+.tldp.org</screen>
+</para>
+
+<para>
+ Example of a simple <link linkend="BLOCK">block</link> action. Say you've
+ seen an ad on your favourite page on example.com that you want to get rid of.
+ You have right-clicked the image, selected <quote>copy image location</quote>
+ and pasted the URL below while removing the leading http://, into a 
+ <literal>{ +block }</literal> section. Note that <literal>{ +handle-as-image
+ }</literal> need not be specified, since all URLs ending in
+ <literal>.gif</literal> will be tagged as images by the general rules as set
+ in default.action anyway:
 </para>
 
 <para>
  <screen>
 { +<link linkend="BLOCK">block</link> }
-www.a-popular-site.com/some/unobvious/path
-another.popular.site.net/more/junk/here/</screen>
+www.example.com/nasty-ads/sponsor.gif
+another.popular.site.net/more/junk/here/
+
+#  Here we found one that is not in <application>Privoxy's</application> default blocked list:
+.adfactory.net</screen>
+</para>
+
+<para>
+ To force URLs that tend to have ad images, but it is difficult for
+ <application>Privoxy</application> to know this since the ultimate returned
+ object is obscured for one reason or another, we can try to force these to be
+ treated as images (and thus avoid <application>Privoxy's</application>
+ <quote>BLOCKED</quote> banner page). Note that if what is returned by the
+ server turns out NOT to be an image, then your browser typically will display
+ a broken icon image. Use cautiously.
 </para>
 
 <para>
- Note that, assuming the banners in the above example have regular image
- extensions (most do),
- <literal>+<link linkend="HANDLE-AS-IMAGE">handle-as-image</link></literal>
- need not be specified, since all URLs ending in these extensions will
- already have been tagged as images in the relevant section of 
- <filename>default.action</filename> by now.
+ <screen>
+{ +block-as-image }
+# A shockwave ad, very annoying.
+.trip.com/.*\.swf
+.doubleclick.net
+/Realmedia/ads/
+adremote.</screen>
 </para>
 
 <para>
Then you noticed that the default configuration breaks Forbes Magazine,
Now you noticed that the default configuration breaks Forbes Magazine,
  but you were too lazy to find out which action is the culprit, and you
  were again too lazy to give <link linkend="contact">feedback</link>, so
  you just used the <literal>fragile</literal> alias on the site, and
- -- whoa! -- it worked:
+ -- <emphasis>whoa!</emphasis> -- it worked. The <literal>fragile</literal>
+ aliases disables those actions that are most likely to break a site. Also,
+ good for testing purposes to see if it is <application>Privoxy</application>
+ that is causing the problem or not.
 </para>
 
 <para>
@@ -4101,7 +4310,7 @@ another.popular.site.net/more/junk/here/</screen>
 </para>
 
 <para>
Finally, you might think about how your favourite free websites are
You might also worry about how your favourite free websites are
  funded, and find that they rely on displaying banner advertisements
  to survive. So you might want to specifically allow banners for those
  sites that you feel provide value to you:
@@ -4117,10 +4326,27 @@ another.popular.site.net/more/junk/here/</screen>
 
 <para>
  Note that <literal>allow-ads</literal> has been aliased to 
- <literal>-<link linkend="block">block</link></literal>
- <literal>-<link linkend="filter-banners-by-size">filter{banners-by-size}</link></literal>
- above.
+ <literal>-<link linkend="block">block</link></literal>, 
+ <literal>-<link linkend="filter-banners-by-size">filter{banners-by-size}</link></literal>, and 
+ <literal>-<link linkend="filter-banners-by-link">filter{banners-by-link}</link></literal> above.
+</para>
+
+<para>
+ <filename>user.action</filename> is generally the best place to define
+ exceptions and additions to the default policies of
+ <filename>default.action</filename>. Some actions are safe to have their
+ default policies set here though. So let's set a default policy to have a
+ <quote>blank</quote> image as opposed to the checkerboard pattern for
+ <emphasis>ALL</emphasis> sites. <quote>/</quote> of course matches all URL
+ paths and patterns:
 </para>
+
+<para>
+<screen>
+{ +<link linkend="set-image-blocker">set-image-blocker{blank}</link> }
+/ # ALL sites</screen>
+</para>
+
 </sect3>
 </sect2>
 
@@ -4349,7 +4575,7 @@ s|(&lt;script.*)document\.referrer(.*&lt;/script&gt;)|$1"Not Your Business!"$2|U
  <screen>
 # The status bar is for displaying link targets, not pointless blahblah
 #
-s/window\.status\s*=\s*['"].*?['"]/dUmMy=1/ig</screen>
+s/window\.status\s*=\s*(['"]).*?\1/dUmMy=1/ig</screen>
 </para>
 
 <para>
@@ -4358,7 +4584,10 @@ s/window\.status\s*=\s*['"].*?['"]/dUmMy=1/ig</screen>
  or more whitespace</quote>. The <literal>?</literal> in <literal>.*?</literal>
  makes this matching of arbitrary text ungreedy. (Note that the <literal>U</literal>
  option is not set). The <literal>['"]</literal> construct means: <quote>a single
- <emphasis>or</emphasis> a double quote</quote>.
+ <emphasis>or</emphasis> a double quote</quote>. Finally, <literal>\1</literal> is
+ a backreference to the first parenthesis just like <literal>$1</literal> above,
+ with the difference that in the <emphasis>pattern</emphasis>, a backslash indicates
+ a backreference, whereas in the <emphasis>substitute</emphasis>, it's the dollar.
 </para>
 
 <para>
@@ -4374,7 +4603,7 @@ s/window\.status\s*=\s*['"].*?['"]/dUmMy=1/ig</screen>
  <screen>
 # Kill OnUnload popups. Yummy. Test: http://www.zdnet.com/zdsubs/yahoo/tree/yfs.html
 #
-s/(&lt;body .*)onunload(.*&gt;)/$1never$2/iU</screen>
+s/(&lt;body [^&gt;]*)onunload(.*&gt;)/$1never$2/iU</screen>
 </para>
 
 <para>
@@ -4385,7 +4614,11 @@ s/(&lt;body .*)onunload(.*&gt;)/$1never$2/iU</screen>
  This job replaces the <quote>onunload</quote> attribute in
  <quote>&lt;body&gt</quote> tags with the dummy word <literal>never</literal>.
  Note that the <literal>i</literal> option makes the pattern matching
- case-insensitive.
+ case-insensitive. Also note that ungreedy matching alone doesn't always guarantee
+ a minimal match: In the first parenthesis, we had to use <literal>[^&gt;]*</literal>
+ instead of <literal>.*</literal> to prevent the match from exceeding the 
+ &lt;body&gt tag if it doesn't contain <quote>OnUnload</quote>, but the page's
+ content does.
 </para>
 
 <para>
@@ -4415,6 +4648,8 @@ s/microsoft(?!\.com)/MicroSuck/ig</screen>
 #
 s* industry[ -]leading \
 |  cutting[ -]edge \
+|  customer[ -]focused \
+|  market[ -]driven \
 |  award[ -]winning # Comments are OK, too! \
 |  high[ -]performance \
 |  solutions[ -]based \
@@ -4427,7 +4662,7 @@ s* industry[ -]leading \
 
 <para>
  The <literal>x</literal> option in this job turns on extended syntax, and allows for
- e.g. the liberal use of (non-interpreted!) whitespace for nicer formatting.
+ e.g. the liberal use of (non-interpreted!) whitespace for nicer formatting. 
 </para>
 
 <para>
@@ -5001,7 +5236,7 @@ Requests</title>
 
 <para>
  Credit: The site which gave us the general idea for these bookmarklets is
- <ulink url="http://www.bookmarklets.com">www.bookmarklets.com</ulink>. They
+ <ulink url="http://www.bookmarklets.com/">www.bookmarklets.com</ulink>. They
  have more information about bookmarklets. 
 </para>
 
@@ -5081,7 +5316,7 @@ Requests</title>
   <para>
    First, the server headers are read and processed to determine, among other
    things, the MIME type (document type) and encoding. The headers are then
-   filtered as deterimined by the 
+   filtered as determined by the 
    <link linkend="CRUNCH-INCOMING-COOKIES"><quote>+crunch-incoming-cookies</quote></link>,
    <link linkend="SESSION-COOKIES-ONLY"><quote>+session-cookies-only</quote></link>,
    and <link linkend="DOWNGRADE-HTTP-VERSION"><quote>+downgrade-http-version</quote></link>
@@ -5155,7 +5390,7 @@ Requests</title>
  One quick test to see if <application>Privoxy</application> is causing a problem 
  or not, is to disable it temporarily. This should be the first troubleshooting 
  step. See <link linkend="bookmarklets">the Bookmarklets</link> section on a quick 
- and easy way to do this (be sure to flush caches afterward!). Looking at the
+ and easy way to do this (be sure to flush caches afterward!). Looking at the 
  logs is a good idea too.
 </para>
 
@@ -5452,7 +5687,7 @@ In file: user.action <guibutton>[ View ]</guibutton> <guibutton>[ Edit ]</guibut
  was. If you don't get this kind of match, then it means one of the default 
  rules in the first section is causing the problem. This would require some 
  guesswork, and maybe a little trial and error to isolate the offending rule.
- One likely cause would be one of the <quote>{+filter}</quote> actions. These
+ One likely cause would be one of the <quote>{+filter}</quote> actions. These 
  tend to be harder to troubleshoot. Try adding the URL for the site to one of
  aliases that turn off <quote>+filter</quote>:
 </para>
@@ -5529,13 +5764,76 @@ In file: user.action <guibutton>[ View ]</guibutton> <guibutton>[ Edit ]</guibut
  Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
  $Log: user-manual.sgml,v $
- Revision 1.126  2002/06/05 00:31:55  hal9
- Mass commit for new entities, most significantly so docs can read version
- and code status info from tmp files, so perl is no longer used. Also, docs can
- differentiate on alpha -> beta -> stable now.
+ Revision 2.9  2003/04/11 03:14:53  hal9
+ Add small note about one filter file may be defined.
+
+ Revision 2.8  2002/10/21 02:46:09  hal9
+ Port changes to user.action examples section from 3.0.
+
+ Revision 2.7  2002/10/12 01:14:42  hal9
+ Updates for demoronizer filter, Radical profile, and the srvany.exe/icon
+ win32 fix.
+
+ Revision 2.6  2002/10/10 04:10:38  hal9
+ s/Advanced/Radical/ for standard.action change.
+
+ Revision 2.5  2002/10/10 03:50:38  hal9
+ Update cookie sections for pre-existing condition, and content cookies not
+ effected by session-cookies setting.
+
+ Revision 2.4  2002/09/26 05:58:07  hal9
+ Change development status from working on 3.0 to 3.2.
+
+ Revision 2.3  2002/09/26 00:12:17  hal9
+ Additional notes on Privoxy patterns, and filtering vs SSL.
+
+ Revision 2.2  2002/09/05 05:45:30  hal9
+ Syncing with 3.0. This should be it for doc sources. Not all builds tested
+ yet. No new content, just catching up.
+
+ Revision 1.123.2.18  2002/08/22 23:47:58  hal9
+ Add 'Documentation' to Privoxy Menu shot in Configuration section to match
+ CGIs.
+
+ Revision 1.123.2.17  2002/08/18 01:13:05  hal9
+ Spell checked (only one typo this time!).
+
+ Revision 1.123.2.16  2002/08/09 19:20:54  david__schmidt
+ Update to Mac OSX startup script name
+
+ Revision 1.123.2.15  2002/08/07 17:32:11  oes
+ Converted some internal links from ulink to link for PDF creation; no content changed
+
+ Revision 1.123.2.14  2002/08/06 09:16:13  oes
+ Nits re: actions file download
+
+ Revision 1.123.2.13  2002/08/02 18:23:19  g_sauthoff
+ Just 2 small corrections to the Gentoo sections
+
+ Revision 1.123.2.12  2002/08/02 18:17:21  g_sauthoff
+ Added 2 Gentoo sections
+
+ Revision 1.123.2.11  2002/07/26 15:20:31  oes
+ - Added version info to title
+ - Added info on new filters
+ - Revised parts of the filter file tutorial
+ - Added info on where to get updated actions files
+
+ Revision 1.123.2.10  2002/07/25 21:42:29  hal9
+ Add brief notes on not proxying non-HTTP protocols.
+
+ Revision 1.123.2.9  2002/07/11 03:40:28  david__schmidt
+
+ Updated Mac OSX sections due to installation location change
+
+ Revision 1.123.2.8  2002/06/09 16:36:32  hal9
+ Clarifications on filtering and MIME. Hardcode 'latest release' in index.html.
+
+ Revision 1.123.2.7  2002/06/09 00:29:34  hal9
+ Touch ups on filtering, in actions section and Anatomy.
 
- Revision 1.125  2002/06/03 00:28:17  hal9
Sync with various changes from 3.0 branch. Add two new files for config stuff.
+ Revision 1.123.2.6  2002/06/06 23:11:03  hal9
Fix broken link. Linkchecked all docs.
 
  Revision 1.123.2.5  2002/05/29 02:01:02  hal9
  This is break out of the entire config section from u-m, so it can