Mention new config option "allow-cgi-request-crunching".
[privoxy.git] / doc / source / p-config.sgml
index 69efcb6..5026529 100644 (file)
@@ -3,9 +3,9 @@
 
  Purpose     :  Used with other docs and files only.
 
- $Id: p-config.sgml,v 2.11 2006/09/08 02:36:37 hal9 Exp $
+ $Id: p-config.sgml,v 2.16 2007/06/01 14:14:29 fabiankeil Exp $
 
- Copyright (C) 2001-2006 Privoxy Developers http://privoxy.org
+ Copyright (C) 2001-2007 Privoxy Developers http://www.privoxy.org/
  See LICENSE.
 
  ========================================================================
  Sample Configuration File for Privoxy v&p-version;
 </title>
 <para>
- $Id: p-config.sgml,v 2.11 2006/09/08 02:36:37 hal9 Exp $
+ $Id: p-config.sgml,v 2.16 2007/06/01 14:14:29 fabiankeil Exp $
 </para>
 <para>
-Copyright (C) 2001-2006 Privoxy Developers http://privoxy.org
+Copyright (C) 2001-2007 Privoxy Developers http://www.privoxy.org/
 </para>
 
 <para>
@@ -125,15 +125,21 @@ Copyright (C) 2001-2006 Privoxy Developers http://privoxy.org
  ===============  <!-- fuck this madness --></literallayout>
 
 <para>
- This file holds the Privoxy configuration.  If you modify this
- file, you will need to send a couple of requests (of any kind) to the proxy
before any changes take effect.
+ This file holds Privoxy's main configuration.  Privoxy detects
+ configuration changes automatically, so you don't have to restart it
unless you want to load a different configuration file.
 </para>
 <para>
- When starting Privoxy on Unix systems, give the name of this
- file as an argument.  On Windows systems, Privoxy will look for
- this file with the name 'config.txt' in the same directory where
- Privoxy is installed.
+ The configuration will be reloaded with the first request after the
+ change was done, this request itself will still use the old configuration,
+ though. In other words: it takes two requests before you see the result of
+ your changes. Requests that are dropped due to ACL don't trigger reloads.
+</para>
+<para>
+ When starting Privoxy on Unix systems, give the location of this
+ file as last argument.  On Windows systems, Privoxy will look for
+ this file with the name 'config.txt' in the current working directory
+ of the Privoxy process.
 </para>
 
 <para>
@@ -160,10 +166,11 @@ II. FORMAT OF THE CONFIGURATION FILE
 <para>
  Thus, by placing a # at the start of an existing configuration line,
  you can make it a comment and it will be treated as if it weren't there. 
- This is called "commenting out" an option and can be useful.
+ This is called "commenting out" an option and can be useful. Removing
+ the # again is called "uncommenting".
 </para>
 <para>
- Note that commenting out and option and leaving it at its default
+ Note that commenting out an option and leaving it at its default
  are two completely different things! Most options behave very
  differently when unset. See the the "Effect if unset" explanation
  in each option's description for details.
@@ -540,6 +547,50 @@ II. FORMAT OF THE CONFIGURATION FILE
 <![%config-file;[<literallayout>@@confdir .</literallayout>]]>
 </sect3>
 
+<!--   ~~~~~       New section      ~~~~~     -->
+<sect3 renderas="sect4" id="templdir"><title>templdir</title>
+
+<variablelist>
+ <varlistentry>
+  <term>Specifies:</term>
+  <listitem>
+   <para>An alternative directory where the templates are loaded from</para>
+  </listitem>
+ </varlistentry>
+ <varlistentry>
+  <term>Type of value:</term>
+  <listitem>
+   <para>Path name</para>
+  </listitem>
+ </varlistentry>
+ <varlistentry>
+  <term>Default value:</term>
+  <listitem>
+   <para>unset</para>
+  </listitem>
+ </varlistentry>
+ <varlistentry>
+  <term>Effect if unset:</term>
+  <listitem>
+   <para>The templates are assumed to be located in confdir/template.</para>
+  </listitem>
+ </varlistentry>
+ <varlistentry>
+  <term>Notes:</term>
+  <listitem>
+   <para>
+    Privoxy's original templates are usually overwritten
+    with each update. Use this option to relocate customized templates
+    that should be kept. Note that you might be missing new features
+    if you use outdated templates.
+   </para>
+  </listitem>
+ </varlistentry>
+</variablelist>
+
+<![%config-file;[<literallayout>@@#templdir .</literallayout>]]>
+</sect3>
+
 
 <!--   ~~~~~       New section      ~~~~~     -->
 <sect3 renderas="sect4" id="logdir"><title>logdir</title>
@@ -606,7 +657,7 @@ actionsfile
  <varlistentry>
   <term>Type of value:</term>
   <listitem>
-   <para>File name, relative to <literal>confdir</literal>, without the <literal>.action</literal> suffix</para>
+   <para>Complete file name, relative to <literal>confdir</literal></para>
   </listitem>
  </varlistentry>
  <varlistentry>
@@ -614,13 +665,13 @@ actionsfile
   <listitem>
    <simplelist>
     <member>
-     <msgtext><literallayout>  standard     # Internal purposes, no editing recommended</literallayout></msgtext>
+     <msgtext><literallayout>  standard.action     # Internal purposes, no editing recommended</literallayout></msgtext>
     </member>
     <member>
-     <msgtext><literallayout>  default      # Main actions file</literallayout></msgtext>
+     <msgtext><literallayout>  default.action      # Main actions file</literallayout></msgtext>
     </member>
     <member>
-     <msgtext><literallayout>  user         # User customizations</literallayout></msgtext>
+     <msgtext><literallayout>  user.action         # User customizations</literallayout></msgtext>
     </member>
    </simplelist>
   </listitem>
@@ -629,7 +680,7 @@ actionsfile
   <term>Effect if unset:</term>
   <listitem>
    <para>
-    No actions are taken at all. Simple neutral proxying. 
+    No actions are taken at all. More or less neutral proxying. 
    </para>
   </listitem>
  </varlistentry>
@@ -651,15 +702,20 @@ actionsfile
     There is no point in using <application>Privoxy</application> without at 
     least one actions file.
    </para>
+   <para>
+    Note that since Privoxy 3.0.7, the complete filename, including the <quote>.action</quote>
+    extension has to be specified.  The syntax change was necessary to be consistent
+    with the other file options and to allow previously forbidden characters.
+   </para>
   </listitem>
  </varlistentry>
 </variablelist>
 
 <!-- NOTE: alternate markup to make a simpler list doesn't work due to -->
 <!-- html -> text conversion, blah -->
-<![%config-file;[<literallayout>@@actionsfile standard  # Internal purpose, recommended</literallayout>]]>
-<![%config-file;[<literallayout>@@actionsfile default   # Main actions file</literallayout>]]>
-<![%config-file;[<literallayout>@@actionsfile user      # User customizations</literallayout>]]>
+<![%config-file;[<literallayout>@@actionsfile standard.action  # Internal purpose, recommended</literallayout>]]>
+<![%config-file;[<literallayout>@@actionsfile default.action   # Main actions file</literallayout>]]>
+<![%config-file;[<literallayout>@@actionsfile user.action      # User customizations</literallayout>]]>
 </sect3>
 
 <!--   ~~~~~       New section      ~~~~~     -->
@@ -997,10 +1053,10 @@ actionsfile
   debug         2 # show each connection status
   debug         4 # show I/O status
   debug         8 # show header parsing
-  debug        16 # log all data into the logfile
+  debug        16 # log all data written to the network into the logfile
   debug        32 # debug force feature
-  debug        64 # debug regular expression filter
-  debug       128 # debug fast redirects
+  debug        64 # debug regular expression filters
+  debug       128 # debug redirects
   debug       256 # debug GIF de-animation
   debug       512 # Common Log Format
   debug      1024 # debug kill pop-ups
@@ -1022,13 +1078,18 @@ actionsfile
     <!-- LOL -->
    </para>
    <para>
-    The reporting of <emphasis>fatal</emphasis> errors (i.e. ones which crash 
-    <application>Privoxy</application>) is always on and cannot be disabled.
+    The reporting of <emphasis>fatal</emphasis> errors (i.e. ones which causes 
+    <application>Privoxy</application> to exit) is always on and cannot be disabled.
    </para>
    <para>
     If you want to use CLF (Common Log Format), you should set <quote>debug
     512</quote> <emphasis>ONLY</emphasis> and not enable anything else.
    </para>
+   <para>
+    <application>Privoxy</application> has a hard-coded limit for the
+    length of log messages. If it's reached, messages are logged truncated
+    and marked with <quote>... [too long, truncated]</quote>.
+   </para>
   </listitem>
  </varlistentry>
 </variablelist>
@@ -1223,8 +1284,8 @@ actionsfile
   <listitem>
    <para>
     If set to 0, <application>Privoxy</application> will start in
-    <quote>toggled off</quote> mode, i.e. behave like a normal, content-neutral
-    proxy where all ad blocking, filtering, etc are disabled. See
+    <quote>toggled off</quote> mode, i.e. mostly behave like a normal,
+    content-neutral proxy where all ad blocking, filtering, etc are disabled. See
     <literal>enable-remote-toggle</literal> below. This is not really useful
     anymore, since toggling is much easier via <ulink
     url="http://config.privoxy.org/toggle">the web interface</ulink> than via
@@ -1278,7 +1339,7 @@ actionsfile
   <term>Notes:</term>
   <listitem>
    <para>
-    When toggled off, <application>Privoxy</application> acts like a normal,
+    When toggled off, <application>Privoxy</application> mostly acts like a normal,
     content-neutral proxy, i.e. it acts as if none of the actions applied to
     any URL.
    </para>
@@ -1410,6 +1471,81 @@ actionsfile
 <![%config-file;[<literallayout>@@enable-edit-actions 1</literallayout>]]>
 </sect3>
 
+
+<sect3 renderas="sect4" id="enforce-blocks"><title>enforce-blocks</title>
+<variablelist>
+ <varlistentry>
+  <term>Specifies:</term>
+  <listitem>
+   <para>
+    Whether the user is allowed to ignore blocks and can <quote>go there anyway</quote>.
+   </para>
+  </listitem>
+ </varlistentry>
+ <varlistentry>
+  <term>Type of value:</term>
+  <listitem>
+   <para>
+    <replaceable>0 or 1</replaceable>
+   </para>
+  </listitem>
+ </varlistentry>
+ <varlistentry>
+  <term>Default value:</term>
+  <listitem>
+   <para><emphasis>0</emphasis></para>
+  </listitem>
+ </varlistentry>
+ <varlistentry>
+  <term>Effect if unset:</term>
+  <listitem>
+   <para>
+    Blocks are not enforced.
+   </para>
+  </listitem>
+ </varlistentry>
+ <varlistentry>
+  <term>Notes:</term>
+  <listitem>
+   <para>
+    <application>Privoxy</application> is mainly used to block and filter
+    requests as a service to the user, for example to block ads and other
+    junk that clogs the pipes. <application>Privoxy's</application> configuration
+    isn't perfect and sometimes innocent pages are blocked. In this situation it
+    makes sense to allow the user to enforce the request and have
+    <application>Privoxy</application> ignore the block.
+   </para>
+   <para>
+    In the default configuration <application>Privoxy's</application>
+    <quote>Blocked</quote> page contains a <quote>go there anyway</quote>
+    link to adds a special string (the force prefix) to the request URL.
+    If that link is used, <application>Privoxy</application> will
+    detect the force prefix, remove it again and let the request pass.
+   </para>
+   <para>
+    Of course <application>Privoxy</application> can also be used to enforce
+    a network policy. In that case the user obviously should not be able to
+    bypass any blocks, and that's what the <quote>enforce-blocks</quote>
+    option is for. If it's enabled, <application>Privoxy</application> hides
+    the <quote>go there anyway</quote> link. If the user adds the force
+    prefix by hand, it will not be accepted and the circumvention attempt
+    is logged.
+   </para>
+  </listitem>
+ </varlistentry>
+ <varlistentry>
+  <term>Examples:</term>
+  <listitem>
+   <para>
+    enforce-blocks 1
+   </para>
+  </listitem>
+ </varlistentry>
+</variablelist>
+<![%config-file;[<literallayout>@@enforce-blocks 0</literallayout>]]>
+</sect3>
+
+
 <!--   ~~~~~       New section      ~~~~~     -->
 <sect3 renderas="sect4" id="acls"><title>
 ACLs: permit-access and deny-access</title>
@@ -1475,8 +1611,8 @@ ACLs: permit-access and deny-access</title>
    </para>
    <para>
     Multiple ACL lines are OK.
-    If any ACLs are specified, then the <application>Privoxy</application>
-    talks only to IP addresses that match at least one <literal>permit-access</literal> line
+    If any ACLs are specified, <application>Privoxy</application> only talks
+    to IP addresses that match at least one <literal>permit-access</literal> line
     and don't match any subsequent <literal>deny-access</literal> line. In other words, the
     last match wins, with the default being <literal>deny-access</literal>.
    </para>
@@ -1496,7 +1632,8 @@ ACLs: permit-access and deny-access</title>
    </para>
    <para>
     Denying access to particular sites by ACL may have undesired side effects
-    if the site in question is hosted on a machine which also hosts other sites.
+    if the site in question is hosted on a machine which also hosts other sites
+    (most sites are).
    </para>
   </listitem>
  </varlistentry>
@@ -1516,7 +1653,7 @@ ACLs: permit-access and deny-access</title>
    </para>
    <para>
     Allow any host on the same class C subnet as www.privoxy.org access to
-    nothing but www.example.com:
+    nothing but www.example.com (or other domains hosted on the same system):
    </para>
    <para>
     <screen>
@@ -1525,7 +1662,8 @@ ACLs: permit-access and deny-access</title>
    </para>
    <para>
     Allow access from any host on the 26-bit subnet 192.168.45.64 to anywhere,
-    with the exception that 192.168.45.73 may not access www.dirty-stuff.example.com:
+    with the exception that 192.168.45.73 may not access the IP address behind
+    www.dirty-stuff.example.com:
    </para>
    <para>
     <screen>
@@ -1610,11 +1748,20 @@ ACLs: permit-access and deny-access</title>
 <para>
  This feature allows routing of HTTP requests through a chain of
  multiple proxies.
- It can be used to better protect privacy and confidentiality when
- accessing specific domains by routing requests to those domains
- through an anonymous public proxy. Or to use a caching proxy to speed up browsing. Or chaining to a parent
- proxy may be necessary because the machine that <application>Privoxy</application>
- runs on has no direct Internet access.
+</para>
+<para>
+ Forwarding can be used to chain Privoxy with a caching proxy to speed
+ up browsing. Using a parent proxy may also be necessary if the machine
+ that <application>Privoxy</application> runs on has no direct Internet access.
+</para>
+<para>
+ Note that parent proxies can severely decrease your privacy level.
+ For example a parent proxy could add your IP address to the request
+ headers and if it's a caching proxy it may add the <quote>Etag</quote>
+ header to revalidation requests again, even though you configured Privoxy
+ to remove it. It may also ignore Privoxy's header time randomization and use the
+ original values which could be used by the server as cookie replacement
+ to track your steps between visits.
 </para>
 
 <para>
@@ -1680,11 +1827,11 @@ ACLs: permit-access and deny-access</title>
   <term>Examples:</term>
   <listitem>
    <para>
-    Everything goes to an example anonymizing proxy, except SSL on port 443 (which it doesn't handle):
+    Everything goes to an example parent proxy, except SSL on port 443 (which it doesn't handle):
    </para>
    <para>
     <screen>
-  forward   /      anon-proxy.example.org:8080
+  forward   /      parent-proxy.example.org:8080
   forward   :443   .
 </screen>
    </para>
@@ -1715,7 +1862,7 @@ forward-socks4 and forward-socks4a</title>
   <term>Specifies:</term>
   <listitem>
    <para>
-    Through which SOCKS proxy (and to which parent HTTP proxy) specific requests should be routed.
+    Through which SOCKS proxy (and optionally to which parent HTTP proxy) specific requests should be routed.
    </para>
   </listitem>
  </varlistentry>
@@ -1954,7 +2101,7 @@ forward-socks4 and forward-socks4a</title>
   <term>Effect if unset:</term>
   <listitem>
    <para>
-    Forwarded connections are treated like direct connections and no retry attempts are made.
+    Connections forwarded through other proxies are treated like direct connections and no retry attempts are made.
    </para>
   </listitem>
  </varlistentry>
@@ -1963,11 +2110,15 @@ forward-socks4 and forward-socks4a</title>
   <listitem>
    <para>
     <replaceable class="parameter">forwarded-connect-retries</replaceable> is mainly interesting
-    for socks4a connections, where Privoxy can't detect why the connections failed.
+    for socks4a connections, where <application>Privoxy</application> can't detect why the connections failed.
     The connection might have failed because of a DNS timeout in which case a retry makes sense,
     but it might also have failed because the server doesn't exist or isn't reachable. In this
     case the retry will just delay the appearance of Privoxy's error message.
    </para>
+   <para>
+    Note that in the context of this option, <quote>forwarded connections</quote> includes all connections
+    that Privoxy forwards through other proxies. This option is not limited to the HTTP CONNECT method.
+   </para>
    <para>
     Only use this option, if you are getting many forwarding related error messages,
     that go away when you try again manually. Start with a small value and check Privoxy's
@@ -1987,6 +2138,194 @@ forward-socks4 and forward-socks4a</title>
 <![%config-file;[<literallayout>@@forwarded-connect-retries  0</literallayout>]]>
 </sect3>
 
+<sect3 renderas="sect4" id="accept-intercepted-requests"><title>accept-intercepted-requests</title>
+<variablelist>
+ <varlistentry>
+  <term>Specifies:</term>
+  <listitem>
+   <para>
+    Whether intercepted requests should be treated as valid.
+   </para>
+  </listitem>
+ </varlistentry>
+ <varlistentry>
+  <term>Type of value:</term>
+  <listitem>
+   <para>
+    <replaceable>0 or 1</replaceable>
+   </para>
+  </listitem>
+ </varlistentry>
+ <varlistentry>
+  <term>Default value:</term>
+  <listitem>
+   <para><emphasis>0</emphasis></para>
+  </listitem>
+ </varlistentry>
+ <varlistentry>
+  <term>Effect if unset:</term>
+  <listitem>
+   <para>
+    Only proxy requests are accepted, intercepted requests are treated as invalid.
+   </para>
+  </listitem>
+ </varlistentry>
+ <varlistentry>
+  <term>Notes:</term>
+  <listitem>
+   <para>
+    If you don't trust your clients and want to force them
+    to use <application>Privoxy</application>, enable this
+    option and configure your packet filter to redirect outgoing
+    HTTP connections into <application>Privoxy</application>. 
+   </para>
+   <para>
+    Make sure that <application>Privoxy's</application> own requests
+    aren't redirected as well. Additionally take care that
+    <application>Privoxy</application> can't intentionally connect
+    to itself, otherwise you could run into redirection loops if
+    <application>Privoxy's</application> listening port is reachable
+    by the outside or an attacker has access to the pages you visit.
+   </para>
+  </listitem>
+ </varlistentry>
+ <varlistentry>
+  <term>Examples:</term>
+  <listitem>
+   <para>
+    accept-intercepted-requests 1
+   </para>
+  </listitem>
+ </varlistentry>
+</variablelist>
+<![%config-file;[<literallayout>@@accept-intercepted-requests 0</literallayout>]]>
+</sect3>
+
+<sect3 renderas="sect4" id="allow-cgi-request-crunching"><title>allow-cgi-request-crunching</title>
+<variablelist>
+ <varlistentry>
+  <term>Specifies:</term>
+  <listitem>
+   <para>
+    Whether requests to <application>Privoxy's</application> CGI pages can be blocked or redirected.
+   </para>
+  </listitem>
+ </varlistentry>
+ <varlistentry>
+  <term>Type of value:</term>
+  <listitem>
+   <para>
+    <replaceable>0 or 1</replaceable>
+   </para>
+  </listitem>
+ </varlistentry>
+ <varlistentry>
+  <term>Default value:</term>
+  <listitem>
+   <para><emphasis>0</emphasis></para>
+  </listitem>
+ </varlistentry>
+ <varlistentry>
+  <term>Effect if unset:</term>
+  <listitem>
+   <para>
+    <application>Privoxy</application> ignores block and redirect actions for its CGI pages.
+   </para>
+  </listitem>
+ </varlistentry>
+ <varlistentry>
+  <term>Notes:</term>
+  <listitem>
+   <para>
+    By default <application>Privoxy</application> ignores block or redirect actions
+    for its CGI pages. Intercepting these requests can be useful in multi-user
+    setups to implement fine-grained access control, but it can also render the complete
+    web interface useless and make debugging problems painful if done without care.
+   </para>
+   <para>
+    Don't enable this option unless you're sure that you really need it.
+   </para>
+  </listitem>
+ </varlistentry>
+ <varlistentry>
+  <term>Examples:</term>
+  <listitem>
+   <para>
+    allow-cgi-request-crunching 1
+   </para>
+  </listitem>
+ </varlistentry>
+</variablelist>
+<![%config-file;[<literallayout>@@allow-cgi-request-crunching 0</literallayout>]]>
+</sect3>
+
+<sect3 renderas="sect4" id="split-large-forms"><title>split-large-forms</title>
+<variablelist>
+ <varlistentry>
+  <term>Specifies:</term>
+  <listitem>
+   <para>
+    Whether the CGI interface should stay compatible with broken HTTP clients.
+   </para>
+  </listitem>
+ </varlistentry>
+ <varlistentry>
+  <term>Type of value:</term>
+  <listitem>
+   <para>
+    <replaceable>0 or 1</replaceable>
+   </para>
+  </listitem>
+ </varlistentry>
+ <varlistentry>
+  <term>Default value:</term>
+  <listitem>
+   <para><emphasis>0</emphasis></para>
+  </listitem>
+ </varlistentry>
+ <varlistentry>
+  <term>Effect if unset:</term>
+  <listitem>
+   <para>
+    The CGI form generate long GET URLs.
+   </para>
+  </listitem>
+ </varlistentry>
+ <varlistentry>
+  <term>Notes:</term>
+  <listitem>
+   <para>
+    <application>Privoxy's</application> CGI forms can lead to
+    rather long URLs. This isn't a problem as far as the HTTP
+    standard is concerned, but it can confuse clients with arbitrary
+    URL lenght limitations.
+   </para>
+   <para>
+    Enabling split-large-forms causes <application>Privoxy</application>
+    to devide big forms into smaller ones to keep the URL length down.
+    It makes editing a lot less convenient and you can no longer
+    submit all changes at once, but at least it works around this
+    browser bug.
+   </para>
+   <para>
+    If you don't notice any editing problems, there is no reason
+    to enable this option, but if one of the submit buttons appears
+    to be broken, you should give it a try.
+   </para>
+  </listitem>
+ </varlistentry>
+ <varlistentry>
+  <term>Examples:</term>
+  <listitem>
+   <para>
+    split-large-forms 1
+   </para>
+  </listitem>
+ </varlistentry>
+</variablelist>
+<![%config-file;[<literallayout>@@split-large-forms 0</literallayout>]]>
+</sect3>
+
 </sect2>
 
 <!--  ~  End section  ~  -->