2 File : $Source: /cvsroot/ijbswa/current/doc/source/p-config.sgml,v $
4 Purpose : Used with other docs and files only.
6 $Id: p-config.sgml,v 2.9 2006/09/06 11:38:33 fabiankeil Exp $
8 Copyright (C) 2001-2006 Privoxy Developers <developers@privoxy.org>
11 ========================================================================
12 NOTE: Please read developer-manual/documentation.html before touching
13 anything in this, or other Privoxy documentation.
14 ========================================================================
17 This file contains all the config file comments and options. It used to
18 build both the user-manual config sections, and all of config (yes, the main
21 Rationale: This is broken up into two files since a file with a prolog
22 (DTD, etc) cannot be sourced as a secondary file. config.sgml is basically
23 a wrapper for this file.
27 OPTIONS: The actual options are included in this file and prefixed with
28 '@@', and processed by the Makefile to strip the '@@'. Default options
29 that should appear commented out should be listed as: '@@#OPTION'.
30 Otherwise, as '@@OPTION'. Example:
32 @@listen-address 127.0.0.1:8118
34 The Makefile does significant other processing too. The final results
35 should be checked to make sure that the perl processing does not
36 fubar something!!! Makefile processing requires w3m, fmt (shell line
40 This file is included into:
43 config (the actual Privoxy config file)
48 <!-- This part only goes into user-manual -->
50 <title>The Main Configuration File</title>
53 Again, the main configuration file is named <filename>config</filename> on
54 Linux/Unix/BSD and OS/2, and <filename>config.txt</filename> on Windows.
55 Configuration lines consist of an initial keyword followed by a list of
56 values, all separated by whitespace (any number of spaces or tabs). For
64 <emphasis>confdir /etc/privoxy</emphasis></literallayout>
70 Assigns the value <literal>/etc/privoxy</literal> to the option
71 <literal>confdir</literal> and thus indicates that the configuration
72 directory is named <quote>/etc/privoxy/</quote>.
76 All options in the config file except for <literal>confdir</literal> and
77 <literal>logdir</literal> are optional. Watch out in the below description
78 for what happens if you leave them unset.
82 The main config file controls all aspects of <application>Privoxy</application>'s
83 operation that are not location dependent (i.e. they apply universally, no matter
84 where you may be surfing).
91 <!-- This part only goes into the config file -->
94 @@TITLE<!-- between the @@ is stripped by Makefile -->@@
95 Sample Configuration File for Privoxy v&p-version;
98 $Id: p-config.sgml,v 2.9 2006/09/06 11:38:33 fabiankeil Exp $
101 Copyright (C) 2001-2006 Privoxy Developers http://privoxy.org
106 #################################################################
111 II. FORMAT OF THE CONFIGURATION FILE #
113 1. LOCAL SET-UP DOCUMENTATION #
114 2. CONFIGURATION AND LOG FILE LOCATIONS #
116 4. ACCESS CONTROL AND SECURITY #
118 6. WINDOWS GUI OPTIONS #
120 #################################################################
124 <literallayout>I. INTRODUCTION
125 =============== <!-- fuck this madness --></literallayout>
128 This file holds the Privoxy configuration. If you modify this
129 file, you will need to send a couple of requests (of any kind) to the proxy
130 before any changes take effect.
133 When starting Privoxy on Unix systems, give the name of this
134 file as an argument. On Windows systems, Privoxy will look for
135 this file with the name 'config.txt' in the same directory where
136 Privoxy is installed.
140 <literallayout><!-- funky spacing -->
142 II. FORMAT OF THE CONFIGURATION FILE
143 ====================================</literallayout>
146 Configuration lines consist of an initial keyword followed by a list
147 of values, all separated by whitespace (any number of spaces or
151 actionsfile default.action
154 Indicates that the actionsfile is named 'default.action'.
157 The '#' indicates a comment. Any part of a line following a '#' is
158 ignored, except if the '#' is preceded by a '\'.
161 Thus, by placing a # at the start of an existing configuration line,
162 you can make it a comment and it will be treated as if it weren't there.
163 This is called "commenting out" an option and can be useful.
166 Note that commenting out and option and leaving it at its default
167 are two completely different things! Most options behave very
168 differently when unset. See the the "Effect if unset" explanation
169 in each option's description for details.
172 Long lines can be continued on the next line by using a `\' as
178 <!-- ************************************************ -->
179 <!-- The following is common to both outputs (mostly) -->
180 <!-- ************************************************ -->
184 <!-- ~~~~~ New section ~~~~~ -->
185 <sect2 id="local-set-up">
186 <title>Local Set-up Documentation</title>
189 If you intend to operate <application>Privoxy</application> for more users
190 than just yourself, it might be a good idea to let them know how to reach
191 you, what you block and why you do that, your policies, etc.
195 <!-- ~~~~~ New section ~~~~~ -->
196 <sect3 renderas="sect4" id="user-manual"><title>user-manual</title>
199 <term>Specifies:</term>
202 Location of the <application>Privoxy</application> User Manual.
207 <term>Type of value:</term>
209 <para>A fully qualified URI</para>
213 <term>Default value:</term>
215 <para><emphasis>Unset</emphasis></para>
219 <term>Effect if unset:</term>
222 <ulink url="http://www.privoxy.org/user-manual/">http://www.privoxy.org/<replaceable class="parameter">version</replaceable>/user-manual/</ulink>
223 will be used, where <replaceable class="parameter">version</replaceable> is the <application>Privoxy</application> version.
231 The User Manual URI is the single best source of information on
232 <application>Privoxy</application>, and is used for help links from some
233 of the internal CGI pages. The manual itself is normally packaged with the
234 binary distributions, so you probably want to set this to a locally
235 installed copy. For multi-user setups, you could provide a copy on a local
236 webserver for all your users and use the corresponding URL here.
243 Unix, in local filesystem (may not work with all browsers):
246 <screen> user-manual file:///usr/share/doc/privoxy-&p-version;/user-manual/</screen>
249 Windows, in local filesystem, <emphasis>must</emphasis> use forward slash notation:
252 <screen> user-manual file:/c:/some-dir/privoxy-&p-version;/user-manual/</screen>
255 Windows, UNC notation (with forward slashes):
258 <screen> user-manual file://///some-server/some-path/privoxy-&p-version;/user-manual/</screen>
262 The best all purpose solution is simply to put the full local
263 <literal>PATH</literal> to where the <citetitle>User Manual</citetitle> is
267 <screen> user-manual /usr/share/doc/privoxy/user-manual</screen>
270 The User Manual is then available to anyone with access to the proxy, by
271 following the built-in URL: <literal>http://config.privoxy.org/user-manual/</literal>
272 (or the shortcut: <literal>http://p.p/user-manual/</literal>).
275 If the documentation is not on the local system, it can be accessed
276 from a remote server, as:
279 <screen> user-manual http://example.com/privoxy/user-manual/</screen>
282 <!-- this gets hammered in conversion to config. Text repeated below. -->
285 If set, this option should be <emphasis>the first option in the config
286 file</emphasis>, because it is used while the config file is being read
299 If set, this option should be the first option in the config
300 file, because it is used while the config file is being read.
309 <![%config-file;[<literallayout>@@#user-manual http://www.privoxy.org/user-manual/</literallayout>]]>
313 <!-- ~~~~~ New section ~~~~~ -->
314 <sect3 renderas="sect4" id="trust-info-url"><title>trust-info-url</title>
318 <term>Specifies:</term>
321 A URL to be displayed in the error page that users will see if access to an untrusted page is denied.
326 <term>Type of value:</term>
332 <term>Default value:</term>
334 <para>Two example URL are provided</para>
338 <term>Effect if unset:</term>
341 No links are displayed on the "untrusted" error page.
349 The value of this option only matters if the experimental trust mechanism has been
350 activated. (See <link linkend="trustfile"><emphasis>trustfile</emphasis></link> above.)
353 If you use the trust mechanism, it is a good idea to write up some on-line
354 documentation about your trust policy and to specify the URL(s) here.
355 Use multiple times for multiple URLs.
358 The URL(s) should be added to the trustfile as well, so users don't end up
359 locked out from the information on why they were locked out in the first place!
365 <![%config-file;[<literallayout>@@trust-info-url http://www.example.com/why_we_block.html</literallayout>]]>
366 <![%config-file;[<literallayout>@@trust-info-url http://www.example.com/what_we_allow.html</literallayout>]]>
370 <!-- ~~~~~ New section ~~~~~ -->
371 <sect3 renderas="sect4" id="admin-address"><title>admin-address</title>
375 <term>Specifies:</term>
378 An email address to reach the proxy administrator.
383 <term>Type of value:</term>
385 <para>Email address</para>
389 <term>Default value:</term>
391 <para><emphasis>Unset</emphasis></para>
395 <term>Effect if unset:</term>
398 No email address is displayed on error pages and the CGI user interface.
406 If both <literal>admin-address</literal> and <literal>proxy-info-url</literal>
407 are unset, the whole "Local Privoxy Support" box on all generated pages will
414 <![%config-file;[<literallayout>@@#admin-address privoxy-admin@example.com</literallayout>]]>
418 <!-- ~~~~~ New section ~~~~~ -->
419 <sect3 renderas="sect4" id="proxy-info-url"><title>proxy-info-url</title>
423 <term>Specifies:</term>
426 A URL to documentation about the local <application>Privoxy</application> setup,
427 configuration or policies.
432 <term>Type of value:</term>
438 <term>Default value:</term>
440 <para><emphasis>Unset</emphasis></para>
444 <term>Effect if unset:</term>
447 No link to local documentation is displayed on error pages and the CGI user interface.
455 If both <literal>admin-address</literal> and <literal>proxy-info-url</literal>
456 are unset, the whole "Local Privoxy Support" box on all generated pages will
460 This URL shouldn't be blocked ;-)
466 <![%config-file;[<literallayout>@@#proxy-info-url http://www.example.com/proxy-service.html</literallayout>]]>
470 <!-- ~ End section ~ -->
474 <!-- ~~~~~ New section ~~~~~ -->
476 <sect2 id="conf-log-loc">
477 <title>Configuration and Log File Locations</title>
480 <application>Privoxy</application> can (and normally does) use a number of
481 other files for additional configuration, help and logging.
482 This section of the configuration file tells <application>Privoxy</application>
483 where to find those other files.
487 The user running <application>Privoxy</application>, must have read
488 permission for all configuration files, and write permission to any files
489 that would be modified, such as log files and actions files.
493 <!-- ~~~~~ New section ~~~~~ -->
494 <sect3 renderas="sect4" id="confdir"><title>confdir</title>
498 <term>Specifies:</term>
500 <para>The directory where the other configuration files are located</para>
504 <term>Type of value:</term>
506 <para>Path name</para>
510 <term>Default value:</term>
512 <para>/etc/privoxy (Unix) <emphasis>or</emphasis> <application>Privoxy</application> installation dir (Windows) </para>
516 <term>Effect if unset:</term>
518 <para><emphasis>Mandatory</emphasis></para>
525 No trailing <quote><literal>/</literal></quote>, please
528 When development goes modular and multi-user, the blocker, filter, and
529 per-user config will be stored in subdirectories of <quote>confdir</quote>.
530 For now, the configuration directory structure is flat, except for
531 <filename>confdir/templates</filename>, where the HTML templates for CGI
532 output reside (e.g. <application>Privoxy's</application> 404 error page).
538 <![%config-file;[<literallayout>@@confdir .</literallayout>]]>
542 <!-- ~~~~~ New section ~~~~~ -->
543 <sect3 renderas="sect4" id="logdir"><title>logdir</title>
547 <term>Specifies:</term>
550 The directory where all logging takes place (i.e. where <filename>logfile</filename> and
551 <filename>jarfile</filename> are located)
556 <term>Type of value:</term>
558 <para>Path name</para>
562 <term>Default value:</term>
564 <para>/var/log/privoxy (Unix) <emphasis>or</emphasis> <application>Privoxy</application> installation dir (Windows) </para>
568 <term>Effect if unset:</term>
570 <para><emphasis>Mandatory</emphasis></para>
577 No trailing <quote><literal>/</literal></quote>, please
583 <![%config-file;[<literallayout>@@logdir .</literallayout>]]>
587 <!-- ~~~~~ New section ~~~~~ -->
588 <sect3 renderas="sect4" id="actionsfile"><title>
591 <anchor id="default.action">
592 <anchor id="standard.action">
593 <anchor id="user.action">
594 <!-- Note: slightly modified this section 04/28/02, hal. See NOTE. -->
597 <term>Specifies:</term>
600 The <link linkend="actions-file">actions file(s)</link> to use
605 <term>Type of value:</term>
607 <para>File name, relative to <literal>confdir</literal>, without the <literal>.action</literal> suffix</para>
611 <term>Default values:</term>
615 <msgtext><literallayout> standard # Internal purposes, no editing recommended</literallayout></msgtext>
618 <msgtext><literallayout> default # Main actions file</literallayout></msgtext>
621 <msgtext><literallayout> user # User customizations</literallayout></msgtext>
627 <term>Effect if unset:</term>
630 No actions are taken at all. Simple neutral proxying.
638 Multiple <literal>actionsfile</literal> lines are permitted, and are in fact recommended!
641 The default values include standard.action, which is used for internal
642 purposes and should be loaded, default.action, which is the
643 <quote>main</quote> actions file maintained by the developers, and
644 <filename>user.action</filename>, where you can make your personal additions.
647 Actions files are where all the per site and per URL configuration is done for
648 ad blocking, cookie management, privacy considerations, etc.
649 There is no point in using <application>Privoxy</application> without at
650 least one actions file.
656 <!-- NOTE: alternate markup to make a simpler list doesn't work due to -->
657 <!-- html -> text conversion, blah -->
658 <![%config-file;[<literallayout>@@actionsfile standard # Internal purpose, recommended</literallayout>]]>
659 <![%config-file;[<literallayout>@@actionsfile default # Main actions file</literallayout>]]>
660 <![%config-file;[<literallayout>@@actionsfile user # User customizations</literallayout>]]>
663 <!-- ~~~~~ New section ~~~~~ -->
664 <sect3 renderas="sect4" id="filterfile"><title>filterfile</title>
665 <anchor id="default.filter">
668 <term>Specifies:</term>
671 The <link linkend="filter-file">filter file(s)</link> to use
676 <term>Type of value:</term>
678 <para>File name, relative to <literal>confdir</literal></para>
682 <term>Default value:</term>
684 <para>default.filter (Unix) <emphasis>or</emphasis> default.filter.txt (Windows)</para>
688 <term>Effect if unset:</term>
691 No textual content filtering takes place, i.e. all
692 <literal>+<link linkend="filter">filter</link>{<replaceable class="parameter">name</replaceable>}</literal>
693 actions in the actions files are turned neutral.
701 Multiple <literal>filterfile</literal> lines are permitted.
704 The <link linkend="filter-file">filter files</link> contain content modification
705 rules that use <link linkend="regex">regular expressions</link>. These rules permit
706 powerful changes on the content of Web pages, and optionally the headers
707 as well, e.g., you could disable your favorite JavaScript annoyances,
708 re-write the actual displayed text, or just have some fun
709 playing buzzword bingo with web pages.
713 <literal>+<link linkend="filter">filter</link>{<replaceable class="parameter">name</replaceable>}</literal>
714 actions rely on the relevant filter (<replaceable class="parameter">name</replaceable>)
715 to be defined in a filter file!
718 A pre-defined filter file called <filename>default.filter</filename> that contains
719 a number of useful filters for common problems is included in the distribution.
720 See the section on the <literal><link linkend="filter">filter</link></literal>
724 It is recommended to place any locally adapted filters into a separate
725 file, such as <filename>user.filter</filename>.
731 <![%config-file;[<literallayout>@@filterfile default.filter</literallayout>]]>
732 <![%config-file;[<literallayout>@@#filterfile user.filter # User customizations</literallayout>]]>
736 <!-- ~~~~~ New section ~~~~~ -->
737 <sect3 renderas="sect4" id="logfile"><title>logfile</title>
741 <term>Specifies:</term>
749 <term>Type of value:</term>
751 <para>File name, relative to <literal>logdir</literal></para>
755 <term>Default value:</term>
757 <para>logfile (Unix) <emphasis>or</emphasis> privoxy.log (Windows)</para>
761 <term>Effect if unset:</term>
764 No log file is used, all log messages go to the console (<literal>STDERR</literal>).
772 removed per bug report 688728 02/20/03 HB
775 The windows version will additionally log to the console.
779 The logfile is where all logging and error messages are written. The level
780 of detail and number of messages are set with the <literal>debug</literal>
781 option (see below). The logfile can be useful for tracking down a problem with
782 <application>Privoxy</application> (e.g., it's not blocking an ad you
783 think it should block) but in most cases you probably will never look at it.
786 Your logfile will grow indefinitely, and you will probably want to
787 periodically remove it. On Unix systems, you can do this with a cron job
788 (see <quote>man cron</quote>). For Red Hat, a <command>logrotate</command>
789 script has been included.
792 On SuSE Linux systems, you can place a line like <quote>/var/log/privoxy.*
793 +1024k 644 nobody.nogroup</quote> in <filename>/etc/logfiles</filename>, with
794 the effect that cron.daily will automatically archive, gzip, and empty the
795 log, when it exceeds 1M size.
798 Any log files must be writable by whatever user <application>Privoxy</application>
799 is being run as (default on UNIX, user id is <quote>privoxy</quote>).
805 <![%config-file;[<literallayout>@@logfile logfile</literallayout>]]>
809 <!-- ~~~~~ New section ~~~~~ -->
810 <sect3 renderas="sect4" id="jarfile"><title>jarfile</title>
814 <term>Specifies:</term>
817 The file to store intercepted cookies in
822 <term>Type of value:</term>
824 <para>File name, relative to <literal>logdir</literal></para>
828 <term>Default value:</term>
830 <para>Unset (commented out). When activated: jarfile (Unix) <emphasis>or</emphasis> privoxy.jar (Windows)</para>
834 <term>Effect if unset:</term>
837 Intercepted cookies are not stored in a dedicated log file.
845 The jarfile may grow to ridiculous sizes over time.
848 If debug 8 (show header parsing) is enabled, cookies are
849 written to the logfile with the rest of the headers.
855 <![%config-file;[<literallayout>@@#jarfile jarfile</literallayout>]]>
859 <!-- ~~~~~ New section ~~~~~ -->
860 <sect3 renderas="sect4" id="trustfile"><title>trustfile</title>
863 <term>Specifies:</term>
866 The trust file to use
871 <term>Type of value:</term>
873 <para>File name, relative to <literal>confdir</literal></para>
877 <term>Default value:</term>
879 <para><emphasis>Unset (commented out)</emphasis>. When activated: trust (Unix) <emphasis>or</emphasis> trust.txt (Windows)</para>
883 <term>Effect if unset:</term>
886 The entire trust mechanism is turned off.
894 The trust mechanism is an experimental feature for building white-lists and should
895 be used with care. It is <emphasis>NOT</emphasis> recommended for the casual user.
898 If you specify a trust file, <application>Privoxy</application> will only allow
899 access to sites that are specified in the trustfile. Sites can be listed
903 Prepending a <literal>~</literal> character limits access to this site
904 only (and any sub-paths within this site), e.g.
905 <literal>~www.example.com</literal>.
908 Or, you can designate sites as <emphasis>trusted referrers</emphasis>, by
909 prepending the name with a <literal>+</literal> character. The effect is that
910 access to untrusted sites will be granted -- but only if a link from this
911 trusted referrer was used. The link target will then be added to the
912 <quote>trustfile</quote> so that future, direct accesses will be granted.
913 Sites added via this mechanism do not become trusted referrers themselves
914 (i.e. they are added with a <literal>~</literal> designation).
917 If you use the <literal>+</literal> operator in the trust file, it may grow
918 considerably over time.
921 It is recommended that <application>Privoxy</application> be compiled with
922 the <literal>--disable-force</literal>, <literal>--disable-toggle</literal> and
923 <literal> --disable-editor</literal> options, if this feature is to be
927 Possible applications include limiting Internet access for children.
934 <![%config-file;[<literallayout>@@#trustfile trust</literallayout>]]>
938 <!-- ~ End section ~ -->
940 <!-- ~~~~~ New section ~~~~~ -->
941 <sect2 id="debugging">
942 <title>Debugging</title>
945 These options are mainly useful when tracing a problem.
946 Note that you might also want to invoke
947 <application>Privoxy</application> with the <literal>--no-daemon</literal>
948 command line option when debugging.
951 <sect3 renderas="sect4" id="debug"><title>debug</title>
955 <term>Specifies:</term>
958 Key values that determine what information gets logged to the
959 <link linkend="logfile"><emphasis>logfile</emphasis></link>.
964 <term>Type of value:</term>
966 <para>Integer values</para>
970 <term>Default value:</term>
972 <para>12289 (i.e.: URLs plus informational and warning messages)</para>
976 <term>Effect if unset:</term>
987 The available debug levels are:
991 debug 1 # show each GET/POST/CONNECT request
992 debug 2 # show each connection status
993 debug 4 # show I/O status
994 debug 8 # show header parsing
995 debug 16 # log all data into the logfile
996 debug 32 # debug force feature
997 debug 64 # debug regular expression filter
998 debug 128 # debug fast redirects
999 debug 256 # debug GIF de-animation
1000 debug 512 # Common Log Format
1001 debug 1024 # debug kill pop-ups
1002 debug 2048 # CGI user interface
1003 debug 4096 # Startup banner and warnings.
1004 debug 8192 # Non-fatal errors
1008 To select multiple debug levels, you can either add them or use
1009 multiple <literal>debug</literal> lines.
1012 A debug level of 1 is informative because it will show you each request
1013 as it happens. <emphasis>1, 4096 and 8192 are highly recommended</emphasis>
1014 so that you will notice when things go wrong. The other levels are probably
1015 only of interest if you are hunting down a specific problem. They can produce
1016 a hell of an output (especially 16).
1020 The reporting of <emphasis>fatal</emphasis> errors (i.e. ones which crash
1021 <application>Privoxy</application>) is always on and cannot be disabled.
1024 If you want to use CLF (Common Log Format), you should set <quote>debug
1025 512</quote> <emphasis>ONLY</emphasis> and not enable anything else.
1031 <![%config-file;[<literallayout>@@debug 1 # show each GET/POST/CONNECT request</literallayout>]]>
1032 <![%config-file;[<literallayout>@@debug 4096 # Startup banner and warnings</literallayout>]]>
1033 <![%config-file;[<literallayout>@@debug 8192 # Errors - *we highly recommended enabling this*</literallayout>]]>
1037 <!-- ~~~~~ New section ~~~~~ -->
1038 <sect3 renderas="sect4" id="single-threaded"><title>single-threaded</title>
1042 <term>Specifies:</term>
1045 Whether to run only one server thread
1050 <term>Type of value:</term>
1052 <para><emphasis>None</emphasis></para>
1056 <term>Default value:</term>
1058 <para><emphasis>Unset</emphasis></para>
1062 <term>Effect if unset:</term>
1065 Multi-threaded (or, where unavailable: forked) operation, i.e. the ability to
1066 serve multiple requests simultaneously.
1074 This option is only there for debug purposes and you should never
1075 need to use it. <emphasis>It will drastically reduce performance.</emphasis>
1081 <![%config-file;[<literallayout>@@#single-threaded</literallayout>]]>
1086 <!-- ~ End section ~ -->
1089 <!-- ~~~~~ New section ~~~~~ -->
1090 <sect2 id="access-control">
1091 <title>Access Control and Security</title>
1094 This section of the config file controls the security-relevant aspects
1095 of <application>Privoxy</application>'s configuration.
1099 <!-- ~~~~~ New section ~~~~~ -->
1100 <sect3 renderas="sect4" id="listen-address"><title>listen-address</title>
1104 <term>Specifies:</term>
1107 The IP address and TCP port on which <application>Privoxy</application> will
1108 listen for client requests.
1113 <term>Type of value:</term>
1115 <para>[<replaceable class="parameter">IP-Address</replaceable>]:<replaceable class="parameter">Port</replaceable></para>
1120 <term>Default value:</term>
1122 <para>127.0.0.1:8118</para>
1126 <term>Effect if unset:</term>
1129 Bind to 127.0.0.1 (localhost), port 8118. This is suitable and recommended for
1130 home users who run <application>Privoxy</application> on the same machine as
1139 You will need to configure your browser(s) to this proxy address and port.
1142 If you already have another service running on port 8118, or if you want to
1143 serve requests from other machines (e.g. on your local network) as well, you
1144 will need to override the default.
1147 If you leave out the IP address, <application>Privoxy</application> will
1148 bind to all interfaces (addresses) on your machine and may become reachable
1149 from the Internet. In that case, consider using <link
1150 linkend="acls">access control lists</link> (ACL's, see below), and/or
1154 If you open <application>Privoxy</application> to untrusted users, you will
1155 also want to turn off the <literal><link
1156 linkend="enable-edit-actions">enable-edit-actions</link></literal> and
1157 <literal><link linkend="enable-remote-toggle">enable-remote-toggle</link></literal>
1163 <term>Example:</term>
1166 Suppose you are running <application>Privoxy</application> on
1167 a machine which has the address 192.168.0.1 on your local private network
1168 (192.168.0.0) and has another outside connection with a different address.
1169 You want it to serve requests from inside only:
1173 listen-address 192.168.0.1:8118
1180 <![%config-file;[<literallayout>@@listen-address 127.0.0.1:8118</literallayout>]]>
1184 <!-- ~~~~~ New section ~~~~~ -->
1185 <sect3 renderas="sect4" id="toggle"><title>toggle</title>
1189 <term>Specifies:</term>
1192 Initial state of "toggle" status
1197 <term>Type of value:</term>
1203 <term>Default value:</term>
1209 <term>Effect if unset:</term>
1212 Act as if toggled on
1220 If set to 0, <application>Privoxy</application> will start in
1221 <quote>toggled off</quote> mode, i.e. behave like a normal, content-neutral
1222 proxy where all ad blocking, filtering, etc are disabled. See
1223 <literal>enable-remote-toggle</literal> below. This is not really useful
1224 anymore, since toggling is much easier via <ulink
1225 url="http://config.privoxy.org/toggle">the web interface</ulink> than via
1226 editing the <filename>conf</filename> file.
1229 The windows version will only display the toggle icon in the system tray
1230 if this option is present.
1236 <![%config-file;[<literallayout>@@toggle 1</literallayout>]]>
1240 <!-- ~~~~~ New section ~~~~~ -->
1241 <sect3 renderas="sect4" id="enable-remote-toggle"><title>enable-remote-toggle</title>
1244 <term>Specifies:</term>
1247 Whether or not the <ulink url="http://config.privoxy.org/toggle">web-based toggle
1248 feature</ulink> may be used
1253 <term>Type of value:</term>
1259 <term>Default value:</term>
1265 <term>Effect if unset:</term>
1268 The web-based toggle feature is disabled.
1276 When toggled off, <application>Privoxy</application> acts like a normal,
1277 content-neutral proxy, i.e. it acts as if none of the actions applied to
1281 For the time being, access to the toggle feature can <emphasis>not</emphasis> be
1282 controlled separately by <quote>ACLs</quote> or HTTP authentication,
1283 so that everybody who can access <application>Privoxy</application> (see
1284 <quote>ACLs</quote> and <literal>listen-address</literal> above) can
1285 toggle it for all users. So this option is <emphasis>not recommended</emphasis>
1286 for multi-user environments with untrusted users.
1289 Note that you must have compiled <application>Privoxy</application> with
1290 support for this feature, otherwise this option has no effect.
1296 <![%config-file;[<literallayout>@@enable-remote-toggle 1</literallayout>]]>
1300 <!-- ~~~~~ New section ~~~~~ -->
1301 <sect3 renderas="sect4" id="enable-remote-http-toggle"><title>enable-remote-http-toggle</title>
1304 <term>Specifies:</term>
1307 Whether or not Privoxy recognizes special HTTP headers to change its behaviour.
1312 <term>Type of value:</term>
1318 <term>Default value:</term>
1324 <term>Effect if unset:</term>
1327 Privoxy ignores special HTTP headers.
1335 When toggled on, the client can change <application>Privoxy's</application>
1336 behaviour by setting special HTTP headers. Currently the only supported
1337 special header is <quote>X-Filter: No</quote>, to disable filtering for
1338 the ongoing request, even if it is enabled in one of the action files.
1341 If you are using <application>Privoxy</application> in a
1342 multi-user environment or with untrustworthy clients and want to
1343 enforce filtering, you will have to disable this option,
1344 otherwise you can ignore it.
1350 <![%config-file;[<literallayout>@@enable-remote-http-toggle 1</literallayout>]]>
1354 <!-- ~~~~~ New section ~~~~~ -->
1355 <sect3 renderas="sect4" id="enable-edit-actions"><title>enable-edit-actions</title>
1358 <term>Specifies:</term>
1361 Whether or not the <ulink url="http://config.privoxy.org/show-status">web-based actions
1362 file editor</ulink> may be used
1367 <term>Type of value:</term>
1373 <term>Default value:</term>
1379 <term>Effect if unset:</term>
1382 The web-based actions file editor is disabled.
1390 For the time being, access to the editor can <emphasis>not</emphasis> be
1391 controlled separately by <quote>ACLs</quote> or HTTP authentication,
1392 so that everybody who can access <application>Privoxy</application> (see
1393 <quote>ACLs</quote> and <literal>listen-address</literal> above) can
1394 modify its configuration for all users. So this option is <emphasis>not
1395 recommended</emphasis> for multi-user environments with untrusted users.
1398 Note that you must have compiled <application>Privoxy</application> with
1399 support for this feature, otherwise this option has no effect.
1405 <![%config-file;[<literallayout>@@enable-edit-actions 1</literallayout>]]>
1408 <!-- ~~~~~ New section ~~~~~ -->
1409 <sect3 renderas="sect4" id="acls"><title>
1410 ACLs: permit-access and deny-access</title>
1411 <anchor id="permit-access">
1412 <anchor id="deny-access">
1416 <term>Specifies:</term>
1419 Who can access what.
1424 <term>Type of value:</term>
1427 <replaceable class="parameter">src_addr</replaceable>[/<replaceable class="parameter">src_masklen</replaceable>]
1428 [<replaceable class="parameter">dst_addr</replaceable>[/<replaceable class="parameter">dst_masklen</replaceable>]]
1431 Where <replaceable class="parameter">src_addr</replaceable> and
1432 <replaceable class="parameter">dst_addr</replaceable> are IP addresses in dotted decimal notation or valid
1433 DNS names, and <replaceable class="parameter">src_masklen</replaceable> and
1434 <replaceable class="parameter">dst_masklen</replaceable> are subnet masks in CIDR notation, i.e. integer
1435 values from 2 to 30 representing the length (in bits) of the network address. The masks and the whole
1436 destination part are optional.
1441 <term>Default value:</term>
1443 <para><emphasis>Unset</emphasis></para>
1447 <term>Effect if unset:</term>
1450 Don't restrict access further than implied by <literal>listen-address</literal>
1458 Access controls are included at the request of ISPs and systems
1459 administrators, and <emphasis>are not usually needed by individual users</emphasis>.
1460 For a typical home user, it will normally suffice to ensure that
1461 <application>Privoxy</application> only listens on the localhost
1462 (127.0.0.1) or internal (home) network address by means of the
1463 <link linkend="listen-address"><emphasis>listen-address</emphasis></link>
1467 Please see the warnings in the FAQ that this proxy is not intended to be a substitute
1468 for a firewall or to encourage anyone to defer addressing basic security
1472 Multiple ACL lines are OK.
1473 If any ACLs are specified, then the <application>Privoxy</application>
1474 talks only to IP addresses that match at least one <literal>permit-access</literal> line
1475 and don't match any subsequent <literal>deny-access</literal> line. In other words, the
1476 last match wins, with the default being <literal>deny-access</literal>.
1479 If <application>Privoxy</application> is using a forwarder (see <literal>forward</literal> below)
1480 for a particular destination URL, the <replaceable class="parameter">dst_addr</replaceable>
1481 that is examined is the address of the forwarder and <emphasis>NOT</emphasis> the address
1482 of the ultimate target. This is necessary because it may be impossible for the local
1483 <application>Privoxy</application> to determine the IP address of the
1484 ultimate target (that's often what gateways are used for).
1487 You should prefer using IP addresses over DNS names, because the address lookups take
1488 time. All DNS names must resolve! You can <emphasis>not</emphasis> use domain patterns
1489 like <quote>*.org</quote> or partial domain names. If a DNS name resolves to multiple
1490 IP addresses, only the first one is used.
1493 Denying access to particular sites by ACL may have undesired side effects
1494 if the site in question is hosted on a machine which also hosts other sites.
1499 <term>Examples:</term>
1502 Explicitly define the default behavior if no ACL and
1503 <literal>listen-address</literal> are set: <quote>localhost</quote>
1504 is OK. The absence of a <replaceable class="parameter">dst_addr</replaceable> implies that
1505 <emphasis>all</emphasis> destination addresses are OK:
1509 permit-access localhost
1513 Allow any host on the same class C subnet as www.privoxy.org access to
1514 nothing but www.example.com:
1518 permit-access www.privoxy.org/24 www.example.com/32
1522 Allow access from any host on the 26-bit subnet 192.168.45.64 to anywhere,
1523 with the exception that 192.168.45.73 may not access www.dirty-stuff.example.com:
1527 permit-access 192.168.45.64/26
1528 deny-access 192.168.45.73 www.dirty-stuff.example.com
1537 <!-- ~~~~~ New section ~~~~~ -->
1538 <sect3 renderas="sect4" id="buffer-limit"><title>buffer-limit</title>
1542 <term>Specifies:</term>
1545 Maximum size of the buffer for content filtering.
1550 <term>Type of value:</term>
1552 <para>Size in Kbytes</para>
1556 <term>Default value:</term>
1562 <term>Effect if unset:</term>
1565 Use a 4MB (4096 KB) limit.
1573 For content filtering, i.e. the <literal>+filter</literal> and
1574 <literal>+deanimate-gif</literal> actions, it is necessary that
1575 <application>Privoxy</application> buffers the entire document body.
1576 This can be potentially dangerous, since a server could just keep sending
1577 data indefinitely and wait for your RAM to exhaust -- with nasty consequences.
1581 When a document buffer size reaches the <literal>buffer-limit</literal>, it is
1582 flushed to the client unfiltered and no further attempt to
1583 filter the rest of the document is made. Remember that there may be multiple threads
1584 running, which might require up to <literal>buffer-limit</literal> Kbytes
1585 <emphasis>each</emphasis>, unless you have enabled <quote>single-threaded</quote>
1592 <![%config-file;[<literallayout>@@buffer-limit 4096</literallayout>]]>
1597 <!-- ~ End section ~ -->
1600 <!-- ~~~~~ New section ~~~~~ -->
1602 <sect2 id="forwarding">
1603 <title>Forwarding</title>
1606 This feature allows routing of HTTP requests through a chain of
1608 It can be used to better protect privacy and confidentiality when
1609 accessing specific domains by routing requests to those domains
1610 through an anonymous public proxy (see e.g. <ulink
1611 url="http://www.multiproxy.org/anon_list.htm">http://www.multiproxy.org/anon_list.htm</ulink>)
1612 Or to use a caching proxy to speed up browsing. Or chaining to a parent
1613 proxy may be necessary because the machine that <application>Privoxy</application>
1614 runs on has no direct Internet access.
1618 Also specified here are SOCKS proxies. <application>Privoxy</application>
1619 supports the SOCKS 4 and SOCKS 4A protocols.
1622 <sect3 renderas="sect4" id="forward"><title>forward</title>
1625 <term>Specifies:</term>
1628 To which parent HTTP proxy specific requests should be routed.
1633 <term>Type of value:</term>
1636 <replaceable class="parameter">target_pattern</replaceable>
1637 <replaceable class="parameter">http_parent</replaceable>[:<replaceable class="parameter">port</replaceable>]
1640 where <replaceable class="parameter">target_pattern</replaceable> is a <link linkend="af-patterns">URL pattern</link>
1641 that specifies to which requests (i.e. URLs) this forward rule shall apply. Use <literal>/</literal> to
1642 denote <quote>all URLs</quote>.
1643 <replaceable class="parameter">http_parent</replaceable>[:<replaceable class="parameter">port</replaceable>]
1644 is the DNS name or IP address of the parent HTTP proxy through which the requests should be forwarded,
1645 optionally followed by its listening port (default: 8080).
1646 Use a single dot (<literal>.</literal>) to denote <quote>no forwarding</quote>.
1651 <term>Default value:</term>
1653 <para><emphasis>Unset</emphasis></para>
1657 <term>Effect if unset:</term>
1660 Don't use parent HTTP proxies.
1668 If <replaceable class="parameter">http_parent</replaceable> is <quote>.</quote>, then requests are not
1669 forwarded to another HTTP proxy but are made directly to the web servers.
1672 Multiple lines are OK, they are checked in sequence, and the last match wins.
1677 <term>Examples:</term>
1680 Everything goes to an example anonymizing proxy, except SSL on port 443 (which it doesn't handle):
1684 forward / anon-proxy.example.org:8080
1689 Everything goes to our example ISP's caching proxy, except for requests
1690 to that ISP's sites:
1694 forward / caching-proxy.example-isp.net:8000
1695 forward .example-isp.net .
1704 <!-- ~~~~~ New section ~~~~~ -->
1705 <sect3 renderas="sect4" id="socks"><title>
1706 forward-socks4 and forward-socks4a</title>
1707 <anchor id="forward-socks4">
1708 <anchor id="forward-socks4a">
1712 <term>Specifies:</term>
1715 Through which SOCKS proxy (and to which parent HTTP proxy) specific requests should be routed.
1720 <term>Type of value:</term>
1723 <replaceable class="parameter">target_pattern</replaceable>
1724 <replaceable class="parameter">socks_proxy</replaceable>[:<replaceable class="parameter">port</replaceable>]
1725 <replaceable class="parameter">http_parent</replaceable>[:<replaceable class="parameter">port</replaceable>]
1728 where <replaceable class="parameter">target_pattern</replaceable> is a <link linkend="af-patterns">URL pattern</link>
1729 that specifies to which requests (i.e. URLs) this forward rule shall apply. Use <literal>/</literal> to
1730 denote <quote>all URLs</quote>.
1731 <replaceable class="parameter">http_parent</replaceable> and <replaceable class="parameter">socks_proxy</replaceable>
1732 are IP addresses in dotted decimal notation or valid DNS names (<replaceable class="parameter">http_parent</replaceable>
1733 may be <quote>.</quote> to denote <quote>no HTTP forwarding</quote>), and the optional
1734 <replaceable class="parameter">port</replaceable> parameters are TCP ports, i.e. integer values from 1 to 64535
1739 <term>Default value:</term>
1741 <para><emphasis>Unset</emphasis></para>
1745 <term>Effect if unset:</term>
1748 Don't use SOCKS proxies.
1756 Multiple lines are OK, they are checked in sequence, and the last match wins.
1759 The difference between <literal>forward-socks4</literal> and <literal>forward-socks4a</literal>
1760 is that in the SOCKS 4A protocol, the DNS resolution of the target hostname happens on the SOCKS
1761 server, while in SOCKS 4 it happens locally.
1764 If <replaceable class="parameter">http_parent</replaceable> is <quote>.</quote>, then requests are not
1765 forwarded to another HTTP proxy but are made (HTTP-wise) directly to the web servers, albeit through
1771 <term>Examples:</term>
1774 From the company example.com, direct connections are made to all
1775 <quote>internal</quote> domains, but everything outbound goes through
1776 their ISP's proxy by way of example.com's corporate SOCKS 4A gateway to
1781 forward-socks4a / socks-gw.example.com:1080 www-cache.example-isp.net:8080
1782 forward .example.com .
1786 A rule that uses a SOCKS 4 gateway for all destinations but no HTTP parent looks like this:
1790 forward-socks4 / socks-gw.example.com:1080 .
1795 To chain Privoxy and Tor, both running on the same system, you should use
1800 forward-socks4 / 127.0.0.1:9050 .
1805 The public <application>Tor</application> network can't be used to reach your local network,
1806 therefore it's a good idea to make some exceptions:
1810 forward 192.168.*.*/ .
1812 forward 127.*.*.*/ .
1816 Unencrypted connections to systems in these address ranges will
1817 be as (un)secure as the local network is, but the alternative is that you
1818 can't reach the network at all.
1821 If you also want to be able to reach servers in your local network by
1822 using their names, you will need additional exceptions that look like
1827 forward localhost/ .
1836 <![%user-man;[ <!-- not included in config due to length -->
1837 <!-- ~~~~~ New section ~~~~~ -->
1838 <sect3 renderas="sect4" id="advanced-forwarding-examples"><title>Advanced Forwarding Examples</title>
1841 If you have links to multiple ISPs that provide various special content
1842 only to their subscribers, you can configure multiple <application>Privoxies</application>
1843 which have connections to the respective ISPs to act as forwarders to each other, so that
1844 <emphasis>your</emphasis> users can see the internal content of all ISPs.
1848 Assume that host-a has a PPP connection to isp-a.net. And host-b has a PPP connection to
1849 isp-b.net. Both run <application>Privoxy</application>. Their forwarding
1850 configuration can look like this:
1860 forward .isp-b.net host-b:8118
1871 forward .isp-a.net host-a:8118
1876 Now, your users can set their browser's proxy to use either
1877 host-a or host-b and be able to browse the internal content
1878 of both isp-a and isp-b.
1882 If you intend to chain <application>Privoxy</application> and
1883 <application>squid</application> locally, then chain as
1884 <literal>browser -> squid -> privoxy</literal> is the recommended way.
1888 Assuming that <application>Privoxy</application> and <application>squid</application>
1889 run on the same box, your <application>squid</application> configuration could then look like this:
1894 # Define Privoxy as parent proxy (without ICP)
1895 cache_peer 127.0.0.1 parent 8118 7 no-query
1897 # Define ACL for protocol FTP
1900 # Do not forward FTP requests to Privoxy
1901 always_direct allow ftp
1903 # Forward all the rest to Privoxy
1904 never_direct allow all</screen>
1908 You would then need to change your browser's proxy settings to <application>squid</application>'s address and port.
1909 Squid normally uses port 3128. If unsure consult <literal>http_port</literal> in <filename>squid.conf</filename>.
1913 You could just as well decide to only forward requests for Windows executables through
1914 a virus-scanning parent proxy, say, on <literal>antivir.example.com</literal>, port 8010:
1920 forward /.*\.(exe|com|dll|zip)$ antivir.example.com:8010</screen>
1926 <sect3 renderas="sect4" id="forwarded-connect-retries"><title>forwarded-connect-retries</title>
1929 <term>Specifies:</term>
1932 How often Privoxy retries if a forwarded connection request fails.
1937 <term>Type of value:</term>
1940 <replaceable class="parameter">Number of retries.</replaceable>
1945 <term>Default value:</term>
1947 <para><emphasis>0</emphasis></para>
1951 <term>Effect if unset:</term>
1954 Forwarded connections are treated like direct connections and no retry attempts are made.
1962 <replaceable class="parameter">forwarded-connect-retries</replaceable> is mainly interesting
1963 for socks4a connections, where Privoxy can't detect why the connections failed.
1964 The connection might have failed because of a DNS timeout in which case a retry makes sense,
1965 but it might also have failed because the server doesn't exist or isn't reachable. In this
1966 case the retry will just delay the appearance of Privoxy's error message.
1969 Only use this option, if you are getting many forwarding related error messages,
1970 that go away when you try again manually. Start with a small value and check Privoxy's
1971 logfile from time to time, to see how many retries are usually needed.
1976 <term>Examples:</term>
1979 forwarded-connect-retries 1
1984 <![%config-file;[<literallayout>@@forwarded-connect-retries 0</literallayout>]]>
1989 <!-- ~ End section ~ -->
1992 <!-- ~~~~~ New section ~~~~~ -->
1994 <sect2 id="windows-gui">
1995 <title>Windows GUI Options</title>
1997 <application>Privoxy</application> has a number of options specific to the
1998 Windows GUI interface:
2001 <anchor id="activity-animation">
2002 <![%config-file;[<para>@@</para>]]> <!-- for spacing -->
2004 If <quote>activity-animation</quote> is set to 1, the
2005 <application>Privoxy</application> icon will animate when
2006 <quote>Privoxy</quote> is active. To turn off, set to 0.
2009 <![%config-file;[<literallayout>@@#activity-animation 1</literallayout>]]>
2015 <emphasis>activity-animation 1</emphasis>
2022 <anchor id="log-messages">
2023 <![%config-file;[<para>@@</para>]]> <!-- for spacing -->
2025 If <quote>log-messages</quote> is set to 1,
2026 <application>Privoxy</application> will log messages to the console
2030 <![%config-file;[<literallayout>@@#log-messages 1</literallayout>]]>
2036 <emphasis>log-messages 1</emphasis>
2043 <anchor id="log-buffer-size">
2044 <![%config-file;[<para>@@</para>]]> <!-- for spacing -->
2046 If <quote>log-buffer-size</quote> is set to 1, the size of the log buffer,
2047 i.e. the amount of memory used for the log messages displayed in the
2048 console window, will be limited to <quote>log-max-lines</quote> (see below).
2052 Warning: Setting this to 0 will result in the buffer to grow infinitely and
2053 eat up all your memory!
2056 <![%config-file;[<literallayout>@@#log-buffer-size 1</literallayout>]]>
2062 <emphasis>log-buffer-size 1</emphasis>
2069 <anchor id="log-max-lines">
2070 <![%config-file;[<para>@@</para>]]> <!-- for spacing -->
2072 <application>log-max-lines</application> is the maximum number of lines held
2073 in the log buffer. See above.
2076 <![%config-file;[<literallayout>@@#log-max-lines 200</literallayout>]]>
2082 <emphasis>log-max-lines 200</emphasis>
2089 <anchor id="log-highlight-messages">
2090 <![%config-file;[<para>@@</para>]]> <!-- for spacing -->
2092 If <quote>log-highlight-messages</quote> is set to 1,
2093 <application>Privoxy</application> will highlight portions of the log
2094 messages with a bold-faced font:
2097 <![%config-file;[<literallayout>@@#log-highlight-messages 1</literallayout>]]>
2103 <emphasis>log-highlight-messages 1</emphasis>
2110 <anchor id="log-font-name">
2111 <![%config-file;[<para>@@</para>]]> <!-- for spacing -->
2113 The font used in the console window:
2116 <![%config-file;[<literallayout>@@#log-font-name Comic Sans MS</literallayout>]]>
2122 <emphasis>log-font-name Comic Sans MS</emphasis>
2129 <anchor id="log-font-size">
2130 <![%config-file;[<para>@@</para>]]> <!-- for spacing -->
2132 Font size used in the console window:
2135 <![%config-file;[<literallayout>@@#log-font-size 8</literallayout>]]>
2141 <emphasis>log-font-size 8</emphasis>
2148 <anchor id="show-on-task-bar">
2149 <![%config-file;[<para>@@</para>]]> <!-- for spacing -->
2151 <quote>show-on-task-bar</quote> controls whether or not
2152 <application>Privoxy</application> will appear as a button on the Task bar
2156 <![%config-file;[<literallayout>@@#show-on-task-bar 0</literallayout>]]>
2162 <emphasis>show-on-task-bar 0</emphasis>
2169 <anchor id="close-button-minimizes">
2170 <![%config-file;[<para>@@</para>]]> <!-- for spacing -->
2172 If <quote>close-button-minimizes</quote> is set to 1, the Windows close
2173 button will minimize <application>Privoxy</application> instead of closing
2174 the program (close with the exit option on the File menu).
2177 <![%config-file;[<literallayout>@@#close-button-minimizes 1</literallayout>]]>
2183 <emphasis>close-button-minimizes 1</emphasis>
2190 <anchor id="hide-console">
2191 <![%config-file;[<para>@@</para>]]> <!-- for spacing -->
2193 The <quote>hide-console</quote> option is specific to the MS-Win console
2194 version of <application>Privoxy</application>. If this option is used,
2195 <application>Privoxy</application> will disconnect from and hide the
2199 <![%config-file;[<literallayout>@@#hide-console</literallayout>]]>
2205 #<emphasis>hide-console</emphasis>
2215 <!-- end config content common to both outputs -->
2218 <!-- These are dummy anchors to keep the processor quiet -->
2219 <!-- when building config-file only (ie. they are used in u-m only) -->
2222 <anchor id="filter">
2223 <anchor id="filter-file">
2225 <anchor id="actions-file">
2226 <anchor id="af-patterns">
2230 <!-- eof p-config.sgml -->