1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2 "http://www.w3.org/TR/html4/loose.dtd">
6 <title>The Main Configuration File</title>
7 <meta name="GENERATOR" content=
8 "Modular DocBook HTML Stylesheet Version 1.79">
9 <link rel="HOME" title="Privoxy 3.0.21 User Manual" href="index.html">
10 <link rel="PREVIOUS" title="Privoxy Configuration" href=
12 <link rel="NEXT" title="Actions Files" href="actions-file.html">
13 <link rel="STYLESHEET" type="text/css" href="../p_doc.css">
14 <meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
15 <link rel="STYLESHEET" type="text/css" href="p_doc.css">
18 <body class="SECT1" bgcolor="#EEEEEE" text="#000000" link="#0000FF" vlink=
19 "#840084" alink="#0000FF">
20 <div class="NAVHEADER">
21 <table summary="Header navigation table" width="100%" border="0"
22 cellpadding="0" cellspacing="0">
24 <th colspan="3" align="center">Privoxy 3.0.21 User Manual</th>
28 <td width="10%" align="left" valign="bottom"><a href=
29 "configuration.html" accesskey="P">Prev</a></td>
31 <td width="80%" align="center" valign="bottom"></td>
33 <td width="10%" align="right" valign="bottom"><a href=
34 "actions-file.html" accesskey="N">Next</a></td>
37 <hr align="left" width="100%">
41 <h1 class="SECT1"><a name="CONFIG" id="CONFIG">7. The Main Configuration
44 <p>By default, the main configuration file is named <tt class=
45 "FILENAME">config</tt>, with the exception of Windows, where it is named
46 <tt class="FILENAME">config.txt</tt>. Configuration lines consist of an
47 initial keyword followed by a list of values, all separated by whitespace
48 (any number of spaces or tabs). For example:</p>
50 <p class="LITERALLAYOUT"><tt class="LITERAL"> <span class=
51 "emphasis"><i class="EMPHASIS">confdir /etc/privoxy</i></span></tt></p>
53 <p>Assigns the value <tt class="LITERAL">/etc/privoxy</tt> to the option
54 <tt class="LITERAL">confdir</tt> and thus indicates that the
55 configuration directory is named <span class=
56 "QUOTE">"/etc/privoxy/"</span>.</p>
58 <p>All options in the config file except for <tt class=
59 "LITERAL">confdir</tt> and <tt class="LITERAL">logdir</tt> are optional.
60 Watch out in the below description for what happens if you leave them
63 <p>The main config file controls all aspects of <span class=
64 "APPLICATION">Privoxy</span>'s operation that are not location dependent
65 (i.e. they apply universally, no matter where you may be surfing). Like
66 the filter and action files, the config file is a plain text file and can
67 be modified with a text editor like emacs, vim or notepad.exe.</p>
70 <h2 class="SECT2"><a name="LOCAL-SET-UP" id="LOCAL-SET-UP">7.1. Local
71 Set-up Documentation</a></h2>
73 <p>If you intend to operate <span class="APPLICATION">Privoxy</span>
74 for more users than just yourself, it might be a good idea to let them
75 know how to reach you, what you block and why you do that, your
79 <h4 class="SECT3"><a name="USER-MANUAL" id="USER-MANUAL">7.1.1.
82 <div class="VARIABLELIST">
87 <p>Location of the <span class="APPLICATION">Privoxy</span>
91 <dt>Type of value:</dt>
94 <p>A fully qualified URI</p>
97 <dt>Default value:</dt>
100 <p><span class="emphasis"><i class=
101 "EMPHASIS">Unset</i></span></p>
104 <dt>Effect if unset:</dt>
107 <p><a href="http://www.privoxy.org/user-manual/" target=
108 "_top">http://www.privoxy.org/<tt class=
109 "REPLACEABLE"><i>version</i></tt>/user-manual/</a> will be
110 used, where <tt class="REPLACEABLE"><i>version</i></tt> is the
111 <span class="APPLICATION">Privoxy</span> version.</p>
117 <p>The User Manual URI is the single best source of information
118 on <span class="APPLICATION">Privoxy</span>, and is used for
119 help links from some of the internal CGI pages. The manual
120 itself is normally packaged with the binary distributions, so
121 you probably want to set this to a locally installed copy.</p>
125 <p>The best all purpose solution is simply to put the full
126 local <tt class="LITERAL">PATH</tt> to where the <i class=
127 "CITETITLE">User Manual</i> is located:</p>
129 <table border="0" bgcolor="#E0E0E0" width="90%">
133 user-manual /usr/share/doc/privoxy/user-manual
139 <p>The User Manual is then available to anyone with access to
140 <span class="APPLICATION">Privoxy</span>, by following the
141 built-in URL: <tt class=
142 "LITERAL">http://config.privoxy.org/user-manual/</tt> (or the
144 "LITERAL">http://p.p/user-manual/</tt>).</p>
146 <p>If the documentation is not on the local system, it can be
147 accessed from a remote server, as:</p>
149 <table border="0" bgcolor="#E0E0E0" width="90%">
153 user-manual http://example.com/privoxy/user-manual/
159 <div class="WARNING">
160 <table class="WARNING" border="1" width="90%">
162 <td align="center"><b>Warning</b></td>
167 <p>If set, this option should be <span class=
168 "emphasis"><i class="EMPHASIS">the first option in the
169 config file</i></span>, because it is used while the
170 config file is being read on start-up.</p>
181 <h4 class="SECT3"><a name="TRUST-INFO-URL" id="TRUST-INFO-URL">7.1.2.
182 trust-info-url</a></h4>
184 <div class="VARIABLELIST">
189 <p>A URL to be displayed in the error page that users will see
190 if access to an untrusted page is denied.</p>
193 <dt>Type of value:</dt>
199 <dt>Default value:</dt>
202 <p><span class="emphasis"><i class=
203 "EMPHASIS">Unset</i></span></p>
206 <dt>Effect if unset:</dt>
209 <p>No links are displayed on the "untrusted" error page.</p>
215 <p>The value of this option only matters if the experimental
216 trust mechanism has been activated. (See <a href=
217 "config.html#TRUSTFILE"><span class="emphasis"><i class=
218 "EMPHASIS">trustfile</i></span></a> below.)</p>
220 <p>If you use the trust mechanism, it is a good idea to write
221 up some on-line documentation about your trust policy and to
222 specify the URL(s) here. Use multiple times for multiple
225 <p>The URL(s) should be added to the trustfile as well, so
226 users don't end up locked out from the information on why they
227 were locked out in the first place!</p>
234 <h4 class="SECT3"><a name="ADMIN-ADDRESS" id="ADMIN-ADDRESS">7.1.3.
235 admin-address</a></h4>
237 <div class="VARIABLELIST">
242 <p>An email address to reach the <span class=
243 "APPLICATION">Privoxy</span> administrator.</p>
246 <dt>Type of value:</dt>
252 <dt>Default value:</dt>
255 <p><span class="emphasis"><i class=
256 "EMPHASIS">Unset</i></span></p>
259 <dt>Effect if unset:</dt>
262 <p>No email address is displayed on error pages and the CGI
269 <p>If both <tt class="LITERAL">admin-address</tt> and
270 <tt class="LITERAL">proxy-info-url</tt> are unset, the whole
271 "Local Privoxy Support" box on all generated pages will not be
279 <h4 class="SECT3"><a name="PROXY-INFO-URL" id="PROXY-INFO-URL">7.1.4.
280 proxy-info-url</a></h4>
282 <div class="VARIABLELIST">
287 <p>A URL to documentation about the local <span class=
288 "APPLICATION">Privoxy</span> setup, configuration or
292 <dt>Type of value:</dt>
298 <dt>Default value:</dt>
301 <p><span class="emphasis"><i class=
302 "EMPHASIS">Unset</i></span></p>
305 <dt>Effect if unset:</dt>
308 <p>No link to local documentation is displayed on error pages
309 and the CGI user interface.</p>
315 <p>If both <tt class="LITERAL">admin-address</tt> and
316 <tt class="LITERAL">proxy-info-url</tt> are unset, the whole
317 "Local Privoxy Support" box on all generated pages will not be
320 <p>This URL shouldn't be blocked ;-)</p>
328 <h2 class="SECT2"><a name="CONF-LOG-LOC" id="CONF-LOG-LOC">7.2.
329 Configuration and Log File Locations</a></h2>
331 <p><span class="APPLICATION">Privoxy</span> can (and normally does) use
332 a number of other files for additional configuration, help and logging.
333 This section of the configuration file tells <span class=
334 "APPLICATION">Privoxy</span> where to find those other files.</p>
336 <p>The user running <span class="APPLICATION">Privoxy</span>, must have
337 read permission for all configuration files, and write permission to
338 any files that would be modified, such as log files and actions
342 <h4 class="SECT3"><a name="CONFDIR" id="CONFDIR">7.2.1.
345 <div class="VARIABLELIST">
350 <p>The directory where the other configuration files are
354 <dt>Type of value:</dt>
360 <dt>Default value:</dt>
363 <p>/etc/privoxy (Unix) <span class="emphasis"><i class=
364 "EMPHASIS">or</i></span> <span class=
365 "APPLICATION">Privoxy</span> installation dir (Windows)</p>
368 <dt>Effect if unset:</dt>
371 <p><span class="emphasis"><i class=
372 "EMPHASIS">Mandatory</i></span></p>
378 <p>No trailing <span class="QUOTE">"<tt class=
379 "LITERAL">/</tt>"</span>, please.</p>
386 <h4 class="SECT3"><a name="TEMPLDIR" id="TEMPLDIR">7.2.2.
389 <div class="VARIABLELIST">
394 <p>An alternative directory where the templates are loaded
398 <dt>Type of value:</dt>
404 <dt>Default value:</dt>
410 <dt>Effect if unset:</dt>
413 <p>The templates are assumed to be located in
414 confdir/template.</p>
420 <p><span class="APPLICATION">Privoxy's</span> original
421 templates are usually overwritten with each update. Use this
422 option to relocate customized templates that should be kept. As
423 template variables might change between updates, you shouldn't
424 expect templates to work with <span class=
425 "APPLICATION">Privoxy</span> releases other than the one they
426 were part of, though.</p>
433 <h4 class="SECT3"><a name="LOGDIR" id="LOGDIR">7.2.3. logdir</a></h4>
435 <div class="VARIABLELIST">
440 <p>The directory where all logging takes place (i.e. where the
441 <tt class="FILENAME">logfile</tt> is located).</p>
444 <dt>Type of value:</dt>
450 <dt>Default value:</dt>
453 <p>/var/log/privoxy (Unix) <span class="emphasis"><i class=
454 "EMPHASIS">or</i></span> <span class=
455 "APPLICATION">Privoxy</span> installation dir (Windows)</p>
458 <dt>Effect if unset:</dt>
461 <p><span class="emphasis"><i class=
462 "EMPHASIS">Mandatory</i></span></p>
468 <p>No trailing <span class="QUOTE">"<tt class=
469 "LITERAL">/</tt>"</span>, please.</p>
476 <h4 class="SECT3"><a name="ACTIONSFILE" id="ACTIONSFILE">7.2.4.
477 actionsfile</a></h4><a name="DEFAULT.ACTION" id=
478 "DEFAULT.ACTION"></a><a name="STANDARD.ACTION" id=
479 "STANDARD.ACTION"></a><a name="USER.ACTION" id="USER.ACTION"></a>
481 <div class="VARIABLELIST">
486 <p>The <a href="actions-file.html">actions file(s)</a> to
490 <dt>Type of value:</dt>
493 <p>Complete file name, relative to <tt class=
494 "LITERAL">confdir</tt></p>
497 <dt>Default values:</dt>
504 <p class="LITERALLAYOUT">
505 match-all.action # Actions that are applied to all sites and maybe overruled later on.</p>
511 <p class="LITERALLAYOUT">
512 default.action # Main actions file</p>
518 <p class="LITERALLAYOUT">
519 user.action # User customizations</p>
526 <dt>Effect if unset:</dt>
529 <p>No actions are taken at all. More or less neutral
536 <p>Multiple <tt class="LITERAL">actionsfile</tt> lines are
537 permitted, and are in fact recommended!</p>
539 <p>The default values are <tt class=
540 "FILENAME">default.action</tt>, which is the <span class=
541 "QUOTE">"main"</span> actions file maintained by the
542 developers, and <tt class="FILENAME">user.action</tt>, where
543 you can make your personal additions.</p>
545 <p>Actions files contain all the per site and per URL
546 configuration for ad blocking, cookie management, privacy
547 considerations, etc. There is no point in using <span class=
548 "APPLICATION">Privoxy</span> without at least one actions
551 <p>Note that since Privoxy 3.0.7, the complete filename,
552 including the <span class="QUOTE">".action"</span> extension
553 has to be specified. The syntax change was necessary to be
554 consistent with the other file options and to allow previously
555 forbidden characters.</p>
562 <h4 class="SECT3"><a name="FILTERFILE" id="FILTERFILE">7.2.5.
563 filterfile</a></h4><a name="DEFAULT.FILTER" id="DEFAULT.FILTER"></a>
565 <div class="VARIABLELIST">
570 <p>The <a href="filter-file.html">filter file(s)</a> to use</p>
573 <dt>Type of value:</dt>
576 <p>File name, relative to <tt class="LITERAL">confdir</tt></p>
579 <dt>Default value:</dt>
582 <p>default.filter (Unix) <span class="emphasis"><i class=
583 "EMPHASIS">or</i></span> default.filter.txt (Windows)</p>
586 <dt>Effect if unset:</dt>
589 <p>No textual content filtering takes place, i.e. all
590 <tt class="LITERAL">+<a href=
591 "actions-file.html#FILTER">filter</a>{<tt class=
592 "REPLACEABLE"><i>name</i></tt>}</tt> actions in the actions
593 files are turned neutral.</p>
599 <p>Multiple <tt class="LITERAL">filterfile</tt> lines are
602 <p>The <a href="filter-file.html">filter files</a> contain
603 content modification rules that use <a href=
604 "appendix.html#REGEX">regular expressions</a>. These rules
605 permit powerful changes on the content of Web pages, and
606 optionally the headers as well, e.g., you could try to disable
607 your favorite JavaScript annoyances, re-write the actual
608 displayed text, or just have some fun playing buzzword bingo
611 <p>The <tt class="LITERAL">+<a href=
612 "actions-file.html#FILTER">filter</a>{<tt class=
613 "REPLACEABLE"><i>name</i></tt>}</tt> actions rely on the
614 relevant filter (<tt class="REPLACEABLE"><i>name</i></tt>) to
615 be defined in a filter file!</p>
617 <p>A pre-defined filter file called <tt class=
618 "FILENAME">default.filter</tt> that contains a number of useful
619 filters for common problems is included in the distribution.
620 See the section on the <tt class="LITERAL"><a href=
621 "actions-file.html#FILTER">filter</a></tt> action for a
624 <p>It is recommended to place any locally adapted filters into
625 a separate file, such as <tt class=
626 "FILENAME">user.filter</tt>.</p>
633 <h4 class="SECT3"><a name="LOGFILE" id="LOGFILE">7.2.6.
636 <div class="VARIABLELIST">
641 <p>The log file to use</p>
644 <dt>Type of value:</dt>
647 <p>File name, relative to <tt class="LITERAL">logdir</tt></p>
650 <dt>Default value:</dt>
653 <p><span class="emphasis"><i class="EMPHASIS">Unset (commented
654 out)</i></span>. When activated: logfile (Unix) <span class=
655 "emphasis"><i class="EMPHASIS">or</i></span> privoxy.log
659 <dt>Effect if unset:</dt>
662 <p>No logfile is written.</p>
668 <p>The logfile is where all logging and error messages are
669 written. The level of detail and number of messages are set
670 with the <tt class="LITERAL">debug</tt> option (see below). The
671 logfile can be useful for tracking down a problem with
672 <span class="APPLICATION">Privoxy</span> (e.g., it's not
673 blocking an ad you think it should block) and it can help you
674 to monitor what your browser is doing.</p>
676 <p>Depending on the debug options below, the logfile may be a
677 privacy risk if third parties can get access to it. As most
678 users will never look at it, <span class=
679 "APPLICATION">Privoxy</span> 3.0.7 and later only log fatal
680 errors by default.</p>
682 <p>For most troubleshooting purposes, you will have to change
683 that, please refer to the debugging section for details.</p>
685 <p>Your logfile will grow indefinitely, and you will probably
686 want to periodically remove it. On Unix systems, you can do
687 this with a cron job (see <span class="QUOTE">"man
690 <p>Any log files must be writable by whatever user <span class=
691 "APPLICATION">Privoxy</span> is being run as (on Unix, default
692 user id is <span class="QUOTE">"privoxy"</span>).</p>
699 <h4 class="SECT3"><a name="TRUSTFILE" id="TRUSTFILE">7.2.7.
702 <div class="VARIABLELIST">
707 <p>The name of the trust file to use</p>
710 <dt>Type of value:</dt>
713 <p>File name, relative to <tt class="LITERAL">confdir</tt></p>
716 <dt>Default value:</dt>
719 <p><span class="emphasis"><i class="EMPHASIS">Unset (commented
720 out)</i></span>. When activated: trust (Unix) <span class=
721 "emphasis"><i class="EMPHASIS">or</i></span> trust.txt
725 <dt>Effect if unset:</dt>
728 <p>The entire trust mechanism is disabled.</p>
734 <p>The trust mechanism is an experimental feature for building
735 white-lists and should be used with care. It is <span class=
736 "emphasis"><i class="EMPHASIS">NOT</i></span> recommended for
739 <p>If you specify a trust file, <span class=
740 "APPLICATION">Privoxy</span> will only allow access to sites
741 that are specified in the trustfile. Sites can be listed in one
744 <p>Prepending a <tt class="LITERAL">~</tt> character limits
745 access to this site only (and any sub-paths within this site),
746 e.g. <tt class="LITERAL">~www.example.com</tt> allows access to
747 <tt class="LITERAL">~www.example.com/features/news.html</tt>,
750 <p>Or, you can designate sites as <span class=
751 "emphasis"><i class="EMPHASIS">trusted referrers</i></span>, by
752 prepending the name with a <tt class="LITERAL">+</tt>
753 character. The effect is that access to untrusted sites will be
754 granted -- but only if a link from this trusted referrer was
755 used to get there. The link target will then be added to the
756 <span class="QUOTE">"trustfile"</span> so that future, direct
757 accesses will be granted. Sites added via this mechanism do not
758 become trusted referrers themselves (i.e. they are added with a
759 <tt class="LITERAL">~</tt> designation). There is a limit of
760 512 such entries, after which new entries will not be made.</p>
762 <p>If you use the <tt class="LITERAL">+</tt> operator in the
763 trust file, it may grow considerably over time.</p>
765 <p>It is recommended that <span class=
766 "APPLICATION">Privoxy</span> be compiled with the <tt class=
767 "LITERAL">--disable-force</tt>, <tt class=
768 "LITERAL">--disable-toggle</tt> and <tt class=
769 "LITERAL">--disable-editor</tt> options, if this feature is to
772 <p>Possible applications include limiting Internet access for
781 <h2 class="SECT2"><a name="DEBUGGING" id="DEBUGGING">7.3.
784 <p>These options are mainly useful when tracing a problem. Note that
785 you might also want to invoke <span class="APPLICATION">Privoxy</span>
786 with the <tt class="LITERAL">--no-daemon</tt> command line option when
790 <h4 class="SECT3"><a name="DEBUG" id="DEBUG">7.3.1. debug</a></h4>
792 <div class="VARIABLELIST">
797 <p>Key values that determine what information gets logged.</p>
800 <dt>Type of value:</dt>
803 <p>Integer values</p>
806 <dt>Default value:</dt>
809 <p>0 (i.e.: only fatal errors (that cause Privoxy to exit) are
813 <dt>Effect if unset:</dt>
816 <p>Default value is used (see above).</p>
822 <p>The available debug levels are:</p>
824 <table border="0" bgcolor="#E0E0E0" width="90%">
827 <pre class="PROGRAMLISTING">
828 debug 1 # Log the destination for each request <span class=
829 "APPLICATION">Privoxy</span> let through. See also debug 1024.
830 debug 2 # show each connection status
831 debug 4 # show I/O status
832 debug 8 # show header parsing
833 debug 16 # log all data written to the network
834 debug 32 # debug force feature
835 debug 64 # debug regular expression filters
836 debug 128 # debug redirects
837 debug 256 # debug GIF de-animation
838 debug 512 # Common Log Format
839 debug 1024 # Log the destination for requests <span class=
840 "APPLICATION">Privoxy</span> didn't let through, and the reason why.
841 debug 2048 # CGI user interface
842 debug 4096 # Startup banner and warnings.
843 debug 8192 # Non-fatal errors
844 debug 32768 # log all data read from the network
845 debug 65536 # Log the applying actions
851 <p>To select multiple debug levels, you can either add them or
852 use multiple <tt class="LITERAL">debug</tt> lines.</p>
854 <p>A debug level of 1 is informative because it will show you
855 each request as it happens. <span class="emphasis"><i class=
856 "EMPHASIS">1, 1024, 4096 and 8192 are recommended</i></span> so
857 that you will notice when things go wrong. The other levels are
858 probably only of interest if you are hunting down a specific
859 problem. They can produce a hell of an output (especially
862 <p><span class="APPLICATION">Privoxy</span> used to ship with
863 the debug levels recommended above enabled by default, but due
864 to privacy concerns 3.0.7 and later are configured to only log
867 <p>If you are used to the more verbose settings, simply enable
868 the debug lines below again.</p>
870 <p>If you want to use pure CLF (Common Log Format), you should
871 set <span class="QUOTE">"debug 512"</span> <span class=
872 "emphasis"><i class="EMPHASIS">ONLY</i></span> and not enable
875 <p><span class="APPLICATION">Privoxy</span> has a hard-coded
876 limit for the length of log messages. If it's reached, messages
877 are logged truncated and marked with <span class="QUOTE">"...
878 [too long, truncated]"</span>.</p>
880 <p>Please don't file any support requests without trying to
881 reproduce the problem with increased debug level first. Once
882 you read the log messages, you may even be able to solve the
883 problem on your own.</p>
890 <h4 class="SECT3"><a name="SINGLE-THREADED" id=
891 "SINGLE-THREADED">7.3.2. single-threaded</a></h4>
893 <div class="VARIABLELIST">
898 <p>Whether to run only one server thread.</p>
901 <dt>Type of value:</dt>
904 <p><span class="emphasis"><i class=
905 "EMPHASIS">None</i></span></p>
908 <dt>Default value:</dt>
911 <p><span class="emphasis"><i class=
912 "EMPHASIS">Unset</i></span></p>
915 <dt>Effect if unset:</dt>
918 <p>Multi-threaded (or, where unavailable: forked) operation,
919 i.e. the ability to serve multiple requests simultaneously.</p>
925 <p>This option is only there for debugging purposes.
926 <span class="emphasis"><i class="EMPHASIS">It will drastically
927 reduce performance.</i></span></p>
934 <h4 class="SECT3"><a name="HOSTNAME" id="HOSTNAME">7.3.3.
937 <div class="VARIABLELIST">
942 <p>The hostname shown on the CGI pages.</p>
945 <dt>Type of value:</dt>
951 <dt>Default value:</dt>
954 <p><span class="emphasis"><i class=
955 "EMPHASIS">Unset</i></span></p>
958 <dt>Effect if unset:</dt>
961 <p>The hostname provided by the operating system is used.</p>
967 <p>On some misconfigured systems resolving the hostname fails
968 or takes too much time and slows Privoxy down. Setting a fixed
969 hostname works around the problem.</p>
971 <p>In other circumstances it might be desirable to show a
972 hostname other than the one returned by the operating system.
973 For example if the system has several different hostnames and
974 you don't want to use the first one.</p>
976 <p>Note that Privoxy does not validate the specified hostname
985 <h2 class="SECT2"><a name="ACCESS-CONTROL" id="ACCESS-CONTROL">7.4.
986 Access Control and Security</a></h2>
988 <p>This section of the config file controls the security-relevant
989 aspects of <span class="APPLICATION">Privoxy</span>'s
993 <h4 class="SECT3"><a name="LISTEN-ADDRESS" id="LISTEN-ADDRESS">7.4.1.
994 listen-address</a></h4>
996 <div class="VARIABLELIST">
1001 <p>The address and TCP port on which <span class=
1002 "APPLICATION">Privoxy</span> will listen for client
1006 <dt>Type of value:</dt>
1009 <p>[<tt class="REPLACEABLE"><i>IP-Address</i></tt>]:<tt class=
1010 "REPLACEABLE"><i>Port</i></tt></p>
1012 <p>[<tt class="REPLACEABLE"><i>Hostname</i></tt>]:<tt class=
1013 "REPLACEABLE"><i>Port</i></tt></p>
1016 <dt>Default value:</dt>
1019 <p>127.0.0.1:8118</p>
1022 <dt>Effect if unset:</dt>
1025 <p>Bind to 127.0.0.1 (IPv4 localhost), port 8118. This is
1026 suitable and recommended for home users who run <span class=
1027 "APPLICATION">Privoxy</span> on the same machine as their
1034 <p>You will need to configure your browser(s) to this proxy
1035 address and port.</p>
1037 <p>If you already have another service running on port 8118, or
1038 if you want to serve requests from other machines (e.g. on your
1039 local network) as well, you will need to override the
1042 <p>You can use this statement multiple times to make
1043 <span class="APPLICATION">Privoxy</span> listen on more ports
1044 or more <abbr class="ABBREV">IP</abbr> addresses. Suitable if
1045 your operating system does not support sharing <abbr class=
1046 "ABBREV">IPv6</abbr> and <abbr class="ABBREV">IPv4</abbr>
1047 protocols on the same socket.</p>
1049 <p>If a hostname is used instead of an IP address, <span class=
1050 "APPLICATION">Privoxy</span> will try to resolve it to an IP
1051 address and if there are multiple, use the first one
1054 <p>If the address for the hostname isn't already known on the
1055 system (for example because it's in /etc/hostname), this may
1056 result in DNS traffic.</p>
1058 <p>If the specified address isn't available on the system, or
1059 if the hostname can't be resolved, <span class=
1060 "APPLICATION">Privoxy</span> will fail to start.</p>
1062 <p>IPv6 addresses containing colons have to be quoted by
1063 brackets. They can only be used if <span class=
1064 "APPLICATION">Privoxy</span> has been compiled with IPv6
1065 support. If you aren't sure if your version supports it, have a
1067 "LITERAL">http://config.privoxy.org/show-status</tt>.</p>
1069 <p>Some operating systems will prefer IPv6 to IPv4 addresses
1070 even if the system has no IPv6 connectivity which is usually
1071 not expected by the user. Some even rely on DNS to resolve
1072 localhost which mean the "localhost" address used may not
1073 actually be local.</p>
1075 <p>It is therefore recommended to explicitly configure the
1076 intended IP address instead of relying on the operating system,
1077 unless there's a strong reason not to.</p>
1079 <p>If you leave out the address, <span class=
1080 "APPLICATION">Privoxy</span> will bind to all IPv4 interfaces
1081 (addresses) on your machine and may become reachable from the
1082 Internet and/or the local network. Be aware that some GNU/Linux
1083 distributions modify that behaviour without updating the
1084 documentation. Check for non-standard patches if your
1085 <span class="APPLICATION">Privoxy</span> version behaves
1088 <p>If you configure <span class="APPLICATION">Privoxy</span> to
1089 be reachable from the network, consider using <a href=
1090 "config.html#ACLS">access control lists</a> (ACL's, see below),
1091 and/or a firewall.</p>
1093 <p>If you open <span class="APPLICATION">Privoxy</span> to
1094 untrusted users, you will also want to make sure that the
1095 following actions are disabled: <tt class="LITERAL"><a href=
1096 "config.html#ENABLE-EDIT-ACTIONS">enable-edit-actions</a></tt>
1097 and <tt class="LITERAL"><a href=
1098 "config.html#ENABLE-REMOTE-TOGGLE">enable-remote-toggle</a></tt></p>
1104 <p>Suppose you are running <span class=
1105 "APPLICATION">Privoxy</span> on a machine which has the address
1106 192.168.0.1 on your local private network (192.168.0.0) and has
1107 another outside connection with a different address. You want
1108 it to serve requests from inside only:</p>
1110 <table border="0" bgcolor="#E0E0E0" width="90%">
1113 <pre class="PROGRAMLISTING">
1114 listen-address 192.168.0.1:8118
1120 <p>Suppose you are running <span class=
1121 "APPLICATION">Privoxy</span> on an IPv6-capable machine and you
1122 want it to listen on the IPv6 address of the loopback
1125 <table border="0" bgcolor="#E0E0E0" width="90%">
1128 <pre class="PROGRAMLISTING">
1129 listen-address [::1]:8118
1140 <h4 class="SECT3"><a name="TOGGLE" id="TOGGLE">7.4.2. toggle</a></h4>
1142 <div class="VARIABLELIST">
1147 <p>Initial state of "toggle" status</p>
1150 <dt>Type of value:</dt>
1156 <dt>Default value:</dt>
1162 <dt>Effect if unset:</dt>
1165 <p>Act as if toggled on</p>
1171 <p>If set to 0, <span class="APPLICATION">Privoxy</span> will
1172 start in <span class="QUOTE">"toggled off"</span> mode, i.e.
1173 mostly behave like a normal, content-neutral proxy with both ad
1174 blocking and content filtering disabled. See <tt class=
1175 "LITERAL">enable-remote-toggle</tt> below.</p>
1182 <h4 class="SECT3"><a name="ENABLE-REMOTE-TOGGLE" id=
1183 "ENABLE-REMOTE-TOGGLE">7.4.3. enable-remote-toggle</a></h4>
1185 <div class="VARIABLELIST">
1190 <p>Whether or not the <a href=
1191 "http://config.privoxy.org/toggle" target="_top">web-based
1192 toggle feature</a> may be used</p>
1195 <dt>Type of value:</dt>
1201 <dt>Default value:</dt>
1207 <dt>Effect if unset:</dt>
1210 <p>The web-based toggle feature is disabled.</p>
1216 <p>When toggled off, <span class="APPLICATION">Privoxy</span>
1217 mostly acts like a normal, content-neutral proxy, i.e. doesn't
1218 block ads or filter content.</p>
1220 <p>Access to the toggle feature can <span class=
1221 "emphasis"><i class="EMPHASIS">not</i></span> be controlled
1222 separately by <span class="QUOTE">"ACLs"</span> or HTTP
1223 authentication, so that everybody who can access <span class=
1224 "APPLICATION">Privoxy</span> (see <span class=
1225 "QUOTE">"ACLs"</span> and <tt class=
1226 "LITERAL">listen-address</tt> above) can toggle it for all
1227 users. So this option is <span class="emphasis"><i class=
1228 "EMPHASIS">not recommended</i></span> for multi-user
1229 environments with untrusted users.</p>
1231 <p>Note that malicious client side code (e.g Java) is also
1232 capable of using this option.</p>
1234 <p>As a lot of <span class="APPLICATION">Privoxy</span> users
1235 don't read documentation, this feature is disabled by
1238 <p>Note that you must have compiled <span class=
1239 "APPLICATION">Privoxy</span> with support for this feature,
1240 otherwise this option has no effect.</p>
1247 <h4 class="SECT3"><a name="ENABLE-REMOTE-HTTP-TOGGLE" id=
1248 "ENABLE-REMOTE-HTTP-TOGGLE">7.4.4. enable-remote-http-toggle</a></h4>
1250 <div class="VARIABLELIST">
1255 <p>Whether or not Privoxy recognizes special HTTP headers to
1256 change its behaviour.</p>
1259 <dt>Type of value:</dt>
1265 <dt>Default value:</dt>
1271 <dt>Effect if unset:</dt>
1274 <p>Privoxy ignores special HTTP headers.</p>
1280 <p>When toggled on, the client can change <span class=
1281 "APPLICATION">Privoxy's</span> behaviour by setting special
1282 HTTP headers. Currently the only supported special header is
1283 <span class="QUOTE">"X-Filter: No"</span>, to disable filtering
1284 for the ongoing request, even if it is enabled in one of the
1287 <p>This feature is disabled by default. If you are using
1288 <span class="APPLICATION">Privoxy</span> in a environment with
1289 trusted clients, you may enable this feature at your
1290 discretion. Note that malicious client side code (e.g Java) is
1291 also capable of using this feature.</p>
1293 <p>This option will be removed in future releases as it has
1294 been obsoleted by the more general header taggers.</p>
1301 <h4 class="SECT3"><a name="ENABLE-EDIT-ACTIONS" id=
1302 "ENABLE-EDIT-ACTIONS">7.4.5. enable-edit-actions</a></h4>
1304 <div class="VARIABLELIST">
1309 <p>Whether or not the <a href=
1310 "http://config.privoxy.org/show-status" target="_top">web-based
1311 actions file editor</a> may be used</p>
1314 <dt>Type of value:</dt>
1320 <dt>Default value:</dt>
1326 <dt>Effect if unset:</dt>
1329 <p>The web-based actions file editor is disabled.</p>
1335 <p>Access to the editor can <span class="emphasis"><i class=
1336 "EMPHASIS">not</i></span> be controlled separately by
1337 <span class="QUOTE">"ACLs"</span> or HTTP authentication, so
1338 that everybody who can access <span class=
1339 "APPLICATION">Privoxy</span> (see <span class=
1340 "QUOTE">"ACLs"</span> and <tt class=
1341 "LITERAL">listen-address</tt> above) can modify its
1342 configuration for all users.</p>
1344 <p>This option is <span class="emphasis"><i class=
1345 "EMPHASIS">not recommended</i></span> for environments with
1346 untrusted users and as a lot of <span class=
1347 "APPLICATION">Privoxy</span> users don't read documentation,
1348 this feature is disabled by default.</p>
1350 <p>Note that malicious client side code (e.g Java) is also
1351 capable of using the actions editor and you shouldn't enable
1352 this options unless you understand the consequences and are
1353 sure your browser is configured correctly.</p>
1355 <p>Note that you must have compiled <span class=
1356 "APPLICATION">Privoxy</span> with support for this feature,
1357 otherwise this option has no effect.</p>
1364 <h4 class="SECT3"><a name="ENFORCE-BLOCKS" id="ENFORCE-BLOCKS">7.4.6.
1365 enforce-blocks</a></h4>
1367 <div class="VARIABLELIST">
1372 <p>Whether the user is allowed to ignore blocks and can
1373 <span class="QUOTE">"go there anyway"</span>.</p>
1376 <dt>Type of value:</dt>
1379 <p><tt class="REPLACEABLE"><i>0 or 1</i></tt></p>
1382 <dt>Default value:</dt>
1385 <p><span class="emphasis"><i class="EMPHASIS">0</i></span></p>
1388 <dt>Effect if unset:</dt>
1391 <p>Blocks are not enforced.</p>
1397 <p><span class="APPLICATION">Privoxy</span> is mainly used to
1398 block and filter requests as a service to the user, for example
1399 to block ads and other junk that clogs the pipes. <span class=
1400 "APPLICATION">Privoxy's</span> configuration isn't perfect and
1401 sometimes innocent pages are blocked. In this situation it
1402 makes sense to allow the user to enforce the request and have
1403 <span class="APPLICATION">Privoxy</span> ignore the block.</p>
1405 <p>In the default configuration <span class=
1406 "APPLICATION">Privoxy's</span> <span class=
1407 "QUOTE">"Blocked"</span> page contains a <span class=
1408 "QUOTE">"go there anyway"</span> link to adds a special string
1409 (the force prefix) to the request URL. If that link is used,
1410 <span class="APPLICATION">Privoxy</span> will detect the force
1411 prefix, remove it again and let the request pass.</p>
1413 <p>Of course <span class="APPLICATION">Privoxy</span> can also
1414 be used to enforce a network policy. In that case the user
1415 obviously should not be able to bypass any blocks, and that's
1416 what the <span class="QUOTE">"enforce-blocks"</span> option is
1417 for. If it's enabled, <span class="APPLICATION">Privoxy</span>
1418 hides the <span class="QUOTE">"go there anyway"</span> link. If
1419 the user adds the force prefix by hand, it will not be accepted
1420 and the circumvention attempt is logged.</p>
1426 <p>enforce-blocks 1</p>
1433 <h4 class="SECT3"><a name="ACLS" id="ACLS">7.4.7. ACLs: permit-access
1434 and deny-access</a></h4><a name="PERMIT-ACCESS" id=
1435 "PERMIT-ACCESS"></a><a name="DENY-ACCESS" id="DENY-ACCESS"></a>
1437 <div class="VARIABLELIST">
1442 <p>Who can access what.</p>
1445 <dt>Type of value:</dt>
1448 <p><tt class="REPLACEABLE"><i>src_addr</i></tt>[:<tt class=
1449 "REPLACEABLE"><i>port</i></tt>][/<tt class=
1450 "REPLACEABLE"><i>src_masklen</i></tt>] [<tt class=
1451 "REPLACEABLE"><i>dst_addr</i></tt>[:<tt class=
1452 "REPLACEABLE"><i>port</i></tt>][/<tt class=
1453 "REPLACEABLE"><i>dst_masklen</i></tt>]]</p>
1455 <p>Where <tt class="REPLACEABLE"><i>src_addr</i></tt> and
1456 <tt class="REPLACEABLE"><i>dst_addr</i></tt> are IPv4 addresses
1457 in dotted decimal notation or valid DNS names, <tt class=
1458 "REPLACEABLE"><i>port</i></tt> is a port number, and <tt class=
1459 "REPLACEABLE"><i>src_masklen</i></tt> and <tt class=
1460 "REPLACEABLE"><i>dst_masklen</i></tt> are subnet masks in CIDR
1461 notation, i.e. integer values from 2 to 30 representing the
1462 length (in bits) of the network address. The masks and the
1463 whole destination part are optional.</p>
1465 <p>If your system implements <a href=
1466 "http://tools.ietf.org/html/rfc3493" target="_top">RFC
1467 3493</a>, then <tt class="REPLACEABLE"><i>src_addr</i></tt> and
1468 <tt class="REPLACEABLE"><i>dst_addr</i></tt> can be IPv6
1469 addresses delimeted by brackets, <tt class=
1470 "REPLACEABLE"><i>port</i></tt> can be a number or a service
1471 name, and <tt class="REPLACEABLE"><i>src_masklen</i></tt> and
1472 <tt class="REPLACEABLE"><i>dst_masklen</i></tt> can be a number
1476 <dt>Default value:</dt>
1479 <p><span class="emphasis"><i class=
1480 "EMPHASIS">Unset</i></span></p>
1482 <p>If no <tt class="REPLACEABLE"><i>port</i></tt> is specified,
1483 any port will match. If no <tt class=
1484 "REPLACEABLE"><i>src_masklen</i></tt> or <tt class=
1485 "REPLACEABLE"><i>src_masklen</i></tt> is given, the complete IP
1486 address has to match (i.e. 32 bits for IPv4 and 128 bits for
1490 <dt>Effect if unset:</dt>
1493 <p>Don't restrict access further than implied by <tt class=
1494 "LITERAL">listen-address</tt></p>
1500 <p>Access controls are included at the request of ISPs and
1501 systems administrators, and <span class="emphasis"><i class=
1502 "EMPHASIS">are not usually needed by individual
1503 users</i></span>. For a typical home user, it will normally
1504 suffice to ensure that <span class="APPLICATION">Privoxy</span>
1505 only listens on the localhost (127.0.0.1) or internal (home)
1506 network address by means of the <a href=
1507 "config.html#LISTEN-ADDRESS"><span class="emphasis"><i class=
1508 "EMPHASIS">listen-address</i></span></a> option.</p>
1510 <p>Please see the warnings in the FAQ that <span class=
1511 "APPLICATION">Privoxy</span> is not intended to be a substitute
1512 for a firewall or to encourage anyone to defer addressing basic
1513 security weaknesses.</p>
1515 <p>Multiple ACL lines are OK. If any ACLs are specified,
1516 <span class="APPLICATION">Privoxy</span> only talks to IP
1517 addresses that match at least one <tt class=
1518 "LITERAL">permit-access</tt> line and don't match any
1519 subsequent <tt class="LITERAL">deny-access</tt> line. In other
1520 words, the last match wins, with the default being <tt class=
1521 "LITERAL">deny-access</tt>.</p>
1523 <p>If <span class="APPLICATION">Privoxy</span> is using a
1524 forwarder (see <tt class="LITERAL">forward</tt> below) for a
1525 particular destination URL, the <tt class=
1526 "REPLACEABLE"><i>dst_addr</i></tt> that is examined is the
1527 address of the forwarder and <span class="emphasis"><i class=
1528 "EMPHASIS">NOT</i></span> the address of the ultimate target.
1529 This is necessary because it may be impossible for the local
1530 <span class="APPLICATION">Privoxy</span> to determine the IP
1531 address of the ultimate target (that's often what gateways are
1534 <p>You should prefer using IP addresses over DNS names, because
1535 the address lookups take time. All DNS names must resolve! You
1536 can <span class="emphasis"><i class="EMPHASIS">not</i></span>
1537 use domain patterns like <span class="QUOTE">"*.org"</span> or
1538 partial domain names. If a DNS name resolves to multiple IP
1539 addresses, only the first one is used.</p>
1541 <p>Some systems allow IPv4 clients to connect to IPv6 server
1542 sockets. Then the client's IPv4 address will be translated by
1543 the system into IPv6 address space with special prefix
1544 ::ffff:0:0/96 (so called IPv4 mapped IPv6 address).
1545 <span class="APPLICATION">Privoxy</span> can handle it and maps
1546 such ACL addresses automatically.</p>
1548 <p>Denying access to particular sites by ACL may have undesired
1549 side effects if the site in question is hosted on a machine
1550 which also hosts other sites (most sites are).</p>
1556 <p>Explicitly define the default behavior if no ACL and
1557 <tt class="LITERAL">listen-address</tt> are set: <span class=
1558 "QUOTE">"localhost"</span> is OK. The absence of a <tt class=
1559 "REPLACEABLE"><i>dst_addr</i></tt> implies that <span class=
1560 "emphasis"><i class="EMPHASIS">all</i></span> destination
1561 addresses are OK:</p>
1563 <table border="0" bgcolor="#E0E0E0" width="90%">
1566 <pre class="SCREEN">
1567 permit-access localhost
1573 <p>Allow any host on the same class C subnet as www.privoxy.org
1574 access to nothing but www.example.com (or other domains hosted
1575 on the same system):</p>
1577 <table border="0" bgcolor="#E0E0E0" width="90%">
1580 <pre class="SCREEN">
1581 permit-access www.privoxy.org/24 www.example.com/32
1587 <p>Allow access from any host on the 26-bit subnet
1588 192.168.45.64 to anywhere, with the exception that
1589 192.168.45.73 may not access the IP address behind
1590 www.dirty-stuff.example.com:</p>
1592 <table border="0" bgcolor="#E0E0E0" width="90%">
1595 <pre class="SCREEN">
1596 permit-access 192.168.45.64/26
1597 deny-access 192.168.45.73 www.dirty-stuff.example.com
1603 <p>Allow access from the IPv4 network 192.0.2.0/24 even if
1604 listening on an IPv6 wild card address (not supported on all
1607 <table border="0" bgcolor="#E0E0E0" width="90%">
1610 <pre class="PROGRAMLISTING">
1611 permit-access 192.0.2.0/24
1617 <p>This is equivalent to the following line even if listening
1618 on an IPv4 address (not supported on all platforms):</p>
1620 <table border="0" bgcolor="#E0E0E0" width="90%">
1623 <pre class="PROGRAMLISTING">
1624 permit-access [::ffff:192.0.2.0]/120
1635 <h4 class="SECT3"><a name="BUFFER-LIMIT" id="BUFFER-LIMIT">7.4.8.
1636 buffer-limit</a></h4>
1638 <div class="VARIABLELIST">
1643 <p>Maximum size of the buffer for content filtering.</p>
1646 <dt>Type of value:</dt>
1649 <p>Size in Kbytes</p>
1652 <dt>Default value:</dt>
1658 <dt>Effect if unset:</dt>
1661 <p>Use a 4MB (4096 KB) limit.</p>
1667 <p>For content filtering, i.e. the <tt class=
1668 "LITERAL">+filter</tt> and <tt class=
1669 "LITERAL">+deanimate-gif</tt> actions, it is necessary that
1670 <span class="APPLICATION">Privoxy</span> buffers the entire
1671 document body. This can be potentially dangerous, since a
1672 server could just keep sending data indefinitely and wait for
1673 your RAM to exhaust -- with nasty consequences. Hence this
1676 <p>When a document buffer size reaches the <tt class=
1677 "LITERAL">buffer-limit</tt>, it is flushed to the client
1678 unfiltered and no further attempt to filter the rest of the
1679 document is made. Remember that there may be multiple threads
1680 running, which might require up to <tt class=
1681 "LITERAL">buffer-limit</tt> Kbytes <span class=
1682 "emphasis"><i class="EMPHASIS">each</i></span>, unless you have
1683 enabled <span class="QUOTE">"single-threaded"</span> above.</p>
1690 <h4 class="SECT3"><a name="ENABLE-PROXY-AUTHENTICATION-FORWARDING"
1691 id="ENABLE-PROXY-AUTHENTICATION-FORWARDING">7.4.9.
1692 enable-proxy-authentication-forwarding</a></h4>
1694 <div class="VARIABLELIST">
1699 <p>Whether or not proxy authentication through <span class=
1700 "APPLICATION">Privoxy</span> should work.</p>
1703 <dt>Type of value:</dt>
1709 <dt>Default value:</dt>
1715 <dt>Effect if unset:</dt>
1718 <p>Proxy authentication headers are removed.</p>
1724 <p>Privoxy itself does not support proxy authentication, but
1725 can allow clients to authenticate against Privoxy's parent
1728 <p>By default Privoxy (3.0.21 and later) don't do that and
1729 remove Proxy-Authorization headers in requests and
1730 Proxy-Authenticate headers in responses to make it harder for
1731 malicious sites to trick inexperienced users into providing
1732 login information.</p>
1734 <p>If this option is enabled the headers are forwarded.</p>
1736 <p>Enabling this option is <span class="emphasis"><i class=
1737 "EMPHASIS">not recommended</i></span> if there is no parent
1738 proxy that requires authentication or if the local network
1739 between Privoxy and the parent proxy isn't trustworthy. If
1740 proxy authentication is only required for some requests, it is
1741 recommended to use a client header filter to remove the
1742 authentication headers for requests where they aren't
1751 <h2 class="SECT2"><a name="FORWARDING" id="FORWARDING">7.5.
1754 <p>This feature allows routing of HTTP requests through a chain of
1755 multiple proxies.</p>
1757 <p>Forwarding can be used to chain Privoxy with a caching proxy to
1758 speed up browsing. Using a parent proxy may also be necessary if the
1759 machine that <span class="APPLICATION">Privoxy</span> runs on has no
1760 direct Internet access.</p>
1762 <p>Note that parent proxies can severely decrease your privacy level.
1763 For example a parent proxy could add your IP address to the request
1764 headers and if it's a caching proxy it may add the <span class=
1765 "QUOTE">"Etag"</span> header to revalidation requests again, even
1766 though you configured Privoxy to remove it. It may also ignore
1767 Privoxy's header time randomization and use the original values which
1768 could be used by the server as cookie replacement to track your steps
1771 <p>Also specified here are SOCKS proxies. <span class=
1772 "APPLICATION">Privoxy</span> supports the SOCKS 4 and SOCKS 4A
1776 <h4 class="SECT3"><a name="FORWARD" id="FORWARD">7.5.1.
1779 <div class="VARIABLELIST">
1784 <p>To which parent HTTP proxy specific requests should be
1788 <dt>Type of value:</dt>
1791 <p><tt class="REPLACEABLE"><i>target_pattern</i></tt>
1792 <tt class="REPLACEABLE"><i>http_parent</i></tt>[:<tt class=
1793 "REPLACEABLE"><i>port</i></tt>]</p>
1795 <p>where <tt class="REPLACEABLE"><i>target_pattern</i></tt> is
1796 a <a href="actions-file.html#AF-PATTERNS">URL pattern</a> that
1797 specifies to which requests (i.e. URLs) this forward rule shall
1798 apply. Use <tt class="LITERAL">/</tt> to denote <span class=
1799 "QUOTE">"all URLs"</span>. <tt class=
1800 "REPLACEABLE"><i>http_parent</i></tt>[:<tt class=
1801 "REPLACEABLE"><i>port</i></tt>] is the DNS name or IP address
1802 of the parent HTTP proxy through which the requests should be
1803 forwarded, optionally followed by its listening port (default:
1804 8000). Use a single dot (<tt class="LITERAL">.</tt>) to denote
1805 <span class="QUOTE">"no forwarding"</span>.</p>
1808 <dt>Default value:</dt>
1811 <p><span class="emphasis"><i class=
1812 "EMPHASIS">Unset</i></span></p>
1815 <dt>Effect if unset:</dt>
1818 <p>Don't use parent HTTP proxies.</p>
1824 <p>If <tt class="REPLACEABLE"><i>http_parent</i></tt> is
1825 <span class="QUOTE">"."</span>, then requests are not forwarded
1826 to another HTTP proxy but are made directly to the web
1829 <p><tt class="REPLACEABLE"><i>http_parent</i></tt> can be a
1830 numerical IPv6 address (if <a href=
1831 "http://tools.ietf.org/html/rfc3493" target="_top">RFC 3493</a>
1832 is implemented). To prevent clashes with the port delimiter,
1833 the whole IP address has to be put into brackets. On the other
1834 hand a <tt class="REPLACEABLE"><i>target_pattern</i></tt>
1835 containing an IPv6 address has to be put into angle brackets
1836 (normal brackets are reserved for regular expressions
1839 <p>Multiple lines are OK, they are checked in sequence, and the
1840 last match wins.</p>
1846 <p>Everything goes to an example parent proxy, except SSL on
1847 port 443 (which it doesn't handle):</p>
1849 <table border="0" bgcolor="#E0E0E0" width="90%">
1852 <pre class="SCREEN">
1853 forward / parent-proxy.example.org:8080
1860 <p>Everything goes to our example ISP's caching proxy, except
1861 for requests to that ISP's sites:</p>
1863 <table border="0" bgcolor="#E0E0E0" width="90%">
1866 <pre class="SCREEN">
1867 forward / caching-proxy.isp.example.net:8000
1868 forward .isp.example.net .
1874 <p>Parent proxy specified by an IPv6 address:</p>
1876 <table border="0" bgcolor="#E0E0E0" width="90%">
1879 <pre class="PROGRAMLISTING">
1880 forward / [2001:DB8::1]:8000
1886 <p>Suppose your parent proxy doesn't support IPv6:</p>
1888 <table border="0" bgcolor="#E0E0E0" width="90%">
1891 <pre class="PROGRAMLISTING">
1892 forward / parent-proxy.example.org:8000
1893 forward ipv6-server.example.org .
1894 forward <[2-3][0-9a-f][0-9a-f][0-9a-f]:*> .
1905 <h4 class="SECT3"><a name="SOCKS" id="SOCKS">7.5.2. forward-socks4,
1906 forward-socks4a, forward-socks5 and forward-socks5t</a></h4><a name=
1907 "FORWARD-SOCKS4" id="FORWARD-SOCKS4"></a><a name="FORWARD-SOCKS4A"
1908 id="FORWARD-SOCKS4A"></a>
1910 <div class="VARIABLELIST">
1915 <p>Through which SOCKS proxy (and optionally to which parent
1916 HTTP proxy) specific requests should be routed.</p>
1919 <dt>Type of value:</dt>
1922 <p><tt class="REPLACEABLE"><i>target_pattern</i></tt>
1923 <tt class="REPLACEABLE"><i>socks_proxy</i></tt>[:<tt class=
1924 "REPLACEABLE"><i>port</i></tt>] <tt class=
1925 "REPLACEABLE"><i>http_parent</i></tt>[:<tt class=
1926 "REPLACEABLE"><i>port</i></tt>]</p>
1928 <p>where <tt class="REPLACEABLE"><i>target_pattern</i></tt> is
1929 a <a href="actions-file.html#AF-PATTERNS">URL pattern</a> that
1930 specifies to which requests (i.e. URLs) this forward rule shall
1931 apply. Use <tt class="LITERAL">/</tt> to denote <span class=
1932 "QUOTE">"all URLs"</span>. <tt class=
1933 "REPLACEABLE"><i>http_parent</i></tt> and <tt class=
1934 "REPLACEABLE"><i>socks_proxy</i></tt> are IP addresses in
1935 dotted decimal notation or valid DNS names (<tt class=
1936 "REPLACEABLE"><i>http_parent</i></tt> may be <span class=
1937 "QUOTE">"."</span> to denote <span class="QUOTE">"no HTTP
1938 forwarding"</span>), and the optional <tt class=
1939 "REPLACEABLE"><i>port</i></tt> parameters are TCP ports, i.e.
1940 integer values from 1 to 65535</p>
1943 <dt>Default value:</dt>
1946 <p><span class="emphasis"><i class=
1947 "EMPHASIS">Unset</i></span></p>
1950 <dt>Effect if unset:</dt>
1953 <p>Don't use SOCKS proxies.</p>
1959 <p>Multiple lines are OK, they are checked in sequence, and the
1960 last match wins.</p>
1962 <p>The difference between <tt class=
1963 "LITERAL">forward-socks4</tt> and <tt class=
1964 "LITERAL">forward-socks4a</tt> is that in the SOCKS 4A
1965 protocol, the DNS resolution of the target hostname happens on
1966 the SOCKS server, while in SOCKS 4 it happens locally.</p>
1968 <p>With <tt class="LITERAL">forward-socks5</tt> the DNS
1969 resolution will happen on the remote server as well.</p>
1971 <p><tt class="LITERAL">forward-socks5t</tt> works like vanilla
1972 <tt class="LITERAL">forward-socks5</tt> but lets <span class=
1973 "APPLICATION">Privoxy</span> additionally use Tor-specific
1974 SOCKS extensions. Currently the only supported SOCKS extension
1975 is optimistic data which can reduce the latency for the first
1976 request made on a newly created connection.</p>
1978 <p><tt class="REPLACEABLE"><i>socks_proxy</i></tt> and
1979 <tt class="REPLACEABLE"><i>http_parent</i></tt> can be a
1980 numerical IPv6 address (if <a href=
1981 "http://tools.ietf.org/html/rfc3493" target="_top">RFC 3493</a>
1982 is implemented). To prevent clashes with the port delimiter,
1983 the whole IP address has to be put into brackets. On the other
1984 hand a <tt class="REPLACEABLE"><i>target_pattern</i></tt>
1985 containing an IPv6 address has to be put into angle brackets
1986 (normal brackets are reserved for regular expressions
1989 <p>If <tt class="REPLACEABLE"><i>http_parent</i></tt> is
1990 <span class="QUOTE">"."</span>, then requests are not forwarded
1991 to another HTTP proxy but are made (HTTP-wise) directly to the
1992 web servers, albeit through a SOCKS proxy.</p>
1998 <p>From the company example.com, direct connections are made to
1999 all <span class="QUOTE">"internal"</span> domains, but
2000 everything outbound goes through their ISP's proxy by way of
2001 example.com's corporate SOCKS 4A gateway to the Internet.</p>
2003 <table border="0" bgcolor="#E0E0E0" width="90%">
2006 <pre class="SCREEN">
2007 forward-socks4a / socks-gw.example.com:1080 www-cache.isp.example.net:8080
2008 forward .example.com .
2014 <p>A rule that uses a SOCKS 4 gateway for all destinations but
2015 no HTTP parent looks like this:</p>
2017 <table border="0" bgcolor="#E0E0E0" width="90%">
2020 <pre class="SCREEN">
2021 forward-socks4 / socks-gw.example.com:1080 .
2027 <p>To chain Privoxy and Tor, both running on the same system,
2028 you would use something like:</p>
2030 <table border="0" bgcolor="#E0E0E0" width="90%">
2033 <pre class="SCREEN">
2034 forward-socks5 / 127.0.0.1:9050 .
2040 <p>The public <span class="APPLICATION">Tor</span> network
2041 can't be used to reach your local network, if you need to
2042 access local servers you therefore might want to make some
2045 <table border="0" bgcolor="#E0E0E0" width="90%">
2048 <pre class="SCREEN">
2049 forward 192.168.*.*/ .
2051 forward 127.*.*.*/ .
2057 <p>Unencrypted connections to systems in these address ranges
2058 will be as (un)secure as the local network is, but the
2059 alternative is that you can't reach the local network through
2060 <span class="APPLICATION">Privoxy</span> at all. Of course this
2061 may actually be desired and there is no reason to make these
2062 exceptions if you aren't sure you need them.</p>
2064 <p>If you also want to be able to reach servers in your local
2065 network by using their names, you will need additional
2066 exceptions that look like this:</p>
2068 <table border="0" bgcolor="#E0E0E0" width="90%">
2071 <pre class="SCREEN">
2072 forward localhost/ .
2083 <h4 class="SECT3"><a name="ADVANCED-FORWARDING-EXAMPLES" id=
2084 "ADVANCED-FORWARDING-EXAMPLES">7.5.3. Advanced Forwarding
2087 <p>If you have links to multiple ISPs that provide various special
2088 content only to their subscribers, you can configure multiple
2089 <span class="APPLICATION">Privoxies</span> which have connections to
2090 the respective ISPs to act as forwarders to each other, so that
2091 <span class="emphasis"><i class="EMPHASIS">your</i></span> users can
2092 see the internal content of all ISPs.</p>
2094 <p>Assume that host-a has a PPP connection to isp-a.example.net. And
2095 host-b has a PPP connection to isp-b.example.org. Both run
2096 <span class="APPLICATION">Privoxy</span>. Their forwarding
2097 configuration can look like this:</p>
2101 <table border="0" bgcolor="#E0E0E0" width="100%">
2104 <pre class="SCREEN">
2106 forward .isp-b.example.net host-b:8118
2114 <table border="0" bgcolor="#E0E0E0" width="100%">
2117 <pre class="SCREEN">
2119 forward .isp-a.example.org host-a:8118
2125 <p>Now, your users can set their browser's proxy to use either host-a
2126 or host-b and be able to browse the internal content of both isp-a
2129 <p>If you intend to chain <span class="APPLICATION">Privoxy</span>
2130 and <span class="APPLICATION">squid</span> locally, then chaining as
2131 <tt class="LITERAL">browser -> squid -> privoxy</tt> is the
2132 recommended way.</p>
2134 <p>Assuming that <span class="APPLICATION">Privoxy</span> and
2135 <span class="APPLICATION">squid</span> run on the same box, your
2136 <span class="APPLICATION">squid</span> configuration could then look
2139 <table border="0" bgcolor="#E0E0E0" width="100%">
2142 <pre class="SCREEN">
2143 # Define Privoxy as parent proxy (without ICP)
2144 cache_peer 127.0.0.1 parent 8118 7 no-query
2146 # Define ACL for protocol FTP
2149 # Do not forward FTP requests to Privoxy
2150 always_direct allow ftp
2152 # Forward all the rest to Privoxy
2153 never_direct allow all
2159 <p>You would then need to change your browser's proxy settings to
2160 <span class="APPLICATION">squid</span>'s address and port. Squid
2161 normally uses port 3128. If unsure consult <tt class=
2162 "LITERAL">http_port</tt> in <tt class="FILENAME">squid.conf</tt>.</p>
2164 <p>You could just as well decide to only forward requests you suspect
2165 of leading to Windows executables through a virus-scanning parent
2166 proxy, say, on <tt class="LITERAL">antivir.example.com</tt>, port
2169 <table border="0" bgcolor="#E0E0E0" width="100%">
2172 <pre class="SCREEN">
2174 forward /.*\.(exe|com|dll|zip)$ antivir.example.com:8010
2182 <h4 class="SECT3"><a name="FORWARDED-CONNECT-RETRIES" id=
2183 "FORWARDED-CONNECT-RETRIES">7.5.4. forwarded-connect-retries</a></h4>
2185 <div class="VARIABLELIST">
2190 <p>How often Privoxy retries if a forwarded connection request
2194 <dt>Type of value:</dt>
2197 <p><tt class="REPLACEABLE"><i>Number of retries.</i></tt></p>
2200 <dt>Default value:</dt>
2203 <p><span class="emphasis"><i class="EMPHASIS">0</i></span></p>
2206 <dt>Effect if unset:</dt>
2209 <p>Connections forwarded through other proxies are treated like
2210 direct connections and no retry attempts are made.</p>
2217 "REPLACEABLE"><i>forwarded-connect-retries</i></tt> is mainly
2218 interesting for socks4a connections, where <span class=
2219 "APPLICATION">Privoxy</span> can't detect why the connections
2220 failed. The connection might have failed because of a DNS
2221 timeout in which case a retry makes sense, but it might also
2222 have failed because the server doesn't exist or isn't
2223 reachable. In this case the retry will just delay the
2224 appearance of Privoxy's error message.</p>
2226 <p>Note that in the context of this option, <span class=
2227 "QUOTE">"forwarded connections"</span> includes all connections
2228 that Privoxy forwards through other proxies. This option is not
2229 limited to the HTTP CONNECT method.</p>
2231 <p>Only use this option, if you are getting lots of
2232 forwarding-related error messages that go away when you try
2233 again manually. Start with a small value and check Privoxy's
2234 logfile from time to time, to see how many retries are usually
2241 <p>forwarded-connect-retries 1</p>
2249 <h2 class="SECT2"><a name="MISC" id="MISC">7.6. Miscellaneous</a></h2>
2252 <h4 class="SECT3"><a name="ACCEPT-INTERCEPTED-REQUESTS" id=
2253 "ACCEPT-INTERCEPTED-REQUESTS">7.6.1.
2254 accept-intercepted-requests</a></h4>
2256 <div class="VARIABLELIST">
2261 <p>Whether intercepted requests should be treated as valid.</p>
2264 <dt>Type of value:</dt>
2267 <p><tt class="REPLACEABLE"><i>0 or 1</i></tt></p>
2270 <dt>Default value:</dt>
2273 <p><span class="emphasis"><i class="EMPHASIS">0</i></span></p>
2276 <dt>Effect if unset:</dt>
2279 <p>Only proxy requests are accepted, intercepted requests are
2280 treated as invalid.</p>
2286 <p>If you don't trust your clients and want to force them to
2287 use <span class="APPLICATION">Privoxy</span>, enable this
2288 option and configure your packet filter to redirect outgoing
2289 HTTP connections into <span class=
2290 "APPLICATION">Privoxy</span>.</p>
2292 <p>Make sure that <span class="APPLICATION">Privoxy's</span>
2293 own requests aren't redirected as well. Additionally take care
2294 that <span class="APPLICATION">Privoxy</span> can't
2295 intentionally connect to itself, otherwise you could run into
2296 redirection loops if <span class="APPLICATION">Privoxy's</span>
2297 listening port is reachable by the outside or an attacker has
2298 access to the pages you visit.</p>
2304 <p>accept-intercepted-requests 1</p>
2311 <h4 class="SECT3"><a name="ALLOW-CGI-REQUEST-CRUNCHING" id=
2312 "ALLOW-CGI-REQUEST-CRUNCHING">7.6.2.
2313 allow-cgi-request-crunching</a></h4>
2315 <div class="VARIABLELIST">
2320 <p>Whether requests to <span class=
2321 "APPLICATION">Privoxy's</span> CGI pages can be blocked or
2325 <dt>Type of value:</dt>
2328 <p><tt class="REPLACEABLE"><i>0 or 1</i></tt></p>
2331 <dt>Default value:</dt>
2334 <p><span class="emphasis"><i class="EMPHASIS">0</i></span></p>
2337 <dt>Effect if unset:</dt>
2340 <p><span class="APPLICATION">Privoxy</span> ignores block and
2341 redirect actions for its CGI pages.</p>
2347 <p>By default <span class="APPLICATION">Privoxy</span> ignores
2348 block or redirect actions for its CGI pages. Intercepting these
2349 requests can be useful in multi-user setups to implement
2350 fine-grained access control, but it can also render the
2351 complete web interface useless and make debugging problems
2352 painful if done without care.</p>
2354 <p>Don't enable this option unless you're sure that you really
2361 <p>allow-cgi-request-crunching 1</p>
2368 <h4 class="SECT3"><a name="SPLIT-LARGE-FORMS" id=
2369 "SPLIT-LARGE-FORMS">7.6.3. split-large-forms</a></h4>
2371 <div class="VARIABLELIST">
2376 <p>Whether the CGI interface should stay compatible with broken
2380 <dt>Type of value:</dt>
2383 <p><tt class="REPLACEABLE"><i>0 or 1</i></tt></p>
2386 <dt>Default value:</dt>
2389 <p><span class="emphasis"><i class="EMPHASIS">0</i></span></p>
2392 <dt>Effect if unset:</dt>
2395 <p>The CGI form generate long GET URLs.</p>
2401 <p><span class="APPLICATION">Privoxy's</span> CGI forms can
2402 lead to rather long URLs. This isn't a problem as far as the
2403 HTTP standard is concerned, but it can confuse clients with
2404 arbitrary URL length limitations.</p>
2406 <p>Enabling split-large-forms causes <span class=
2407 "APPLICATION">Privoxy</span> to divide big forms into smaller
2408 ones to keep the URL length down. It makes editing a lot less
2409 convenient and you can no longer submit all changes at once,
2410 but at least it works around this browser bug.</p>
2412 <p>If you don't notice any editing problems, there is no reason
2413 to enable this option, but if one of the submit buttons appears
2414 to be broken, you should give it a try.</p>
2420 <p>split-large-forms 1</p>
2427 <h4 class="SECT3"><a name="KEEP-ALIVE-TIMEOUT" id=
2428 "KEEP-ALIVE-TIMEOUT">7.6.4. keep-alive-timeout</a></h4>
2430 <div class="VARIABLELIST">
2435 <p>Number of seconds after which an open connection will no
2436 longer be reused.</p>
2439 <dt>Type of value:</dt>
2442 <p><tt class="REPLACEABLE"><i>Time in seconds.</i></tt></p>
2445 <dt>Default value:</dt>
2451 <dt>Effect if unset:</dt>
2454 <p>Connections are not kept alive.</p>
2460 <p>This option allows clients to keep the connection to
2461 <span class="APPLICATION">Privoxy</span> alive. If the server
2462 supports it, <span class="APPLICATION">Privoxy</span> will keep
2463 the connection to the server alive as well. Under certain
2464 circumstances this may result in speed-ups.</p>
2466 <p>By default, <span class="APPLICATION">Privoxy</span> will
2467 close the connection to the server if the client connection
2468 gets closed, or if the specified timeout has been reached
2469 without a new request coming in. This behaviour can be changed
2470 with the <a href="#CONNECTION-SHARING" target=
2471 "_top">connection-sharing</a> option.</p>
2473 <p>This option has no effect if <span class=
2474 "APPLICATION">Privoxy</span> has been compiled without
2475 keep-alive support.</p>
2477 <p>Note that a timeout of five seconds as used in the default
2478 configuration file significantly decreases the number of
2479 connections that will be reused. The value is used because some
2480 browsers limit the number of connections they open to a single
2481 host and apply the same limit to proxies. This can result in a
2482 single website <span class="QUOTE">"grabbing"</span> all the
2483 connections the browser allows, which means connections to
2484 other websites can't be opened until the connections currently
2485 in use time out.</p>
2487 <p>Several users have reported this as a Privoxy bug, so the
2488 default value has been reduced. Consider increasing it to 300
2489 seconds or even more if you think your browser can handle it.
2490 If your browser appears to be hanging, it probably can't.</p>
2496 <p>keep-alive-timeout 300</p>
2503 <h4 class="SECT3"><a name="TOLERATE-PIPELINING" id=
2504 "TOLERATE-PIPELINING">7.6.5. tolerate-pipelining</a></h4>
2506 <div class="VARIABLELIST">
2511 <p>Whether or not pipelined requests should be served.</p>
2514 <dt>Type of value:</dt>
2517 <p><tt class="REPLACEABLE"><i>0 or 1.</i></tt></p>
2520 <dt>Default value:</dt>
2526 <dt>Effect if unset:</dt>
2529 <p>If Privoxy receives more than one request at once, it
2530 terminates the client connection after serving the first
2537 <p><span class="APPLICATION">Privoxy</span> currently doesn't
2538 pipeline outgoing requests, thus allowing pipelining on the
2539 client connection is not guaranteed to improve the
2542 <p>By default <span class="APPLICATION">Privoxy</span> tries to
2543 discourage clients from pipelining by discarding aggressively
2544 pipelined requests, which forces the client to resend them
2545 through a new connection.</p>
2547 <p>This option lets <span class="APPLICATION">Privoxy</span>
2548 tolerate pipelining. Whether or not that improves performance
2549 mainly depends on the client configuration.</p>
2551 <p>If you are seeing problems with pages not properly loading,
2552 disabling this option could work around the problem.</p>
2558 <p>tolerate-pipelining 1</p>
2565 <h4 class="SECT3"><a name="DEFAULT-SERVER-TIMEOUT" id=
2566 "DEFAULT-SERVER-TIMEOUT">7.6.6. default-server-timeout</a></h4>
2568 <div class="VARIABLELIST">
2573 <p>Assumed server-side keep-alive timeout if not specified by
2577 <dt>Type of value:</dt>
2580 <p><tt class="REPLACEABLE"><i>Time in seconds.</i></tt></p>
2583 <dt>Default value:</dt>
2589 <dt>Effect if unset:</dt>
2592 <p>Connections for which the server didn't specify the
2593 keep-alive timeout are not reused.</p>
2599 <p>Enabling this option significantly increases the number of
2600 connections that are reused, provided the <a href=
2601 "#KEEP-ALIVE-TIMEOUT" target="_top">keep-alive-timeout</a>
2602 option is also enabled.</p>
2604 <p>While it also increases the number of connections problems
2605 when <span class="APPLICATION">Privoxy</span> tries to reuse a
2606 connection that already has been closed on the server side, or
2607 is closed while <span class="APPLICATION">Privoxy</span> is
2608 trying to reuse it, this should only be a problem if it happens
2609 for the first request sent by the client. If it happens for
2610 requests on reused client connections, <span class=
2611 "APPLICATION">Privoxy</span> will simply close the connection
2612 and the client is supposed to retry the request without
2613 bothering the user.</p>
2615 <p>Enabling this option is therefore only recommended if the
2616 <a href="#CONNECTION-SHARING" target=
2617 "_top">connection-sharing</a> option is disabled.</p>
2619 <p>It is an error to specify a value larger than the <a href=
2620 "#KEEP-ALIVE-TIMEOUT" target="_top">keep-alive-timeout</a>
2623 <p>This option has no effect if <span class=
2624 "APPLICATION">Privoxy</span> has been compiled without
2625 keep-alive support.</p>
2631 <p>default-server-timeout 60</p>
2638 <h4 class="SECT3"><a name="CONNECTION-SHARING" id=
2639 "CONNECTION-SHARING">7.6.7. connection-sharing</a></h4>
2641 <div class="VARIABLELIST">
2646 <p>Whether or not outgoing connections that have been kept
2647 alive should be shared between different incoming
2651 <dt>Type of value:</dt>
2654 <p><tt class="REPLACEABLE"><i>0 or 1</i></tt></p>
2657 <dt>Default value:</dt>
2663 <dt>Effect if unset:</dt>
2666 <p>Connections are not shared.</p>
2672 <p>This option has no effect if <span class=
2673 "APPLICATION">Privoxy</span> has been compiled without
2674 keep-alive support, or if it's disabled.</p>
2680 <p>Note that reusing connections doesn't necessary cause
2681 speedups. There are also a few privacy implications you should
2684 <p>If this option is effective, outgoing connections are shared
2685 between clients (if there are more than one) and closing the
2686 browser that initiated the outgoing connection does no longer
2687 affect the connection between <span class=
2688 "APPLICATION">Privoxy</span> and the server unless the client's
2689 request hasn't been completed yet.</p>
2691 <p>If the outgoing connection is idle, it will not be closed
2692 until either <span class="APPLICATION">Privoxy's</span> or the
2693 server's timeout is reached. While it's open, the server knows
2694 that the system running <span class=
2695 "APPLICATION">Privoxy</span> is still there.</p>
2697 <p>If there are more than one client (maybe even belonging to
2698 multiple users), they will be able to reuse each others
2699 connections. This is potentially dangerous in case of
2700 authentication schemes like NTLM where only the connection is
2701 authenticated, instead of requiring authentication for each
2704 <p>If there is only a single client, and if said client can
2705 keep connections alive on its own, enabling this option has
2706 next to no effect. If the client doesn't support connection
2707 keep-alive, enabling this option may make sense as it allows
2708 <span class="APPLICATION">Privoxy</span> to keep outgoing
2709 connections alive even if the client itself doesn't support
2712 <p>You should also be aware that enabling this option increases
2713 the likelihood of getting the "No server or forwarder data"
2714 error message, especially if you are using a slow connection to
2717 <p>This option should only be used by experienced users who
2718 understand the risks and can weight them against the
2725 <p>connection-sharing 1</p>
2732 <h4 class="SECT3"><a name="SOCKET-TIMEOUT" id="SOCKET-TIMEOUT">7.6.8.
2733 socket-timeout</a></h4>
2735 <div class="VARIABLELIST">
2740 <p>Number of seconds after which a socket times out if no data
2744 <dt>Type of value:</dt>
2747 <p><tt class="REPLACEABLE"><i>Time in seconds.</i></tt></p>
2750 <dt>Default value:</dt>
2756 <dt>Effect if unset:</dt>
2759 <p>A default value of 300 seconds is used.</p>
2765 <p>The default is quite high and you probably want to reduce
2766 it. If you aren't using an occasionally slow proxy like Tor,
2767 reducing it to a few seconds should be fine.</p>
2773 <p>socket-timeout 300</p>
2780 <h4 class="SECT3"><a name="MAX-CLIENT-CONNECTIONS" id=
2781 "MAX-CLIENT-CONNECTIONS">7.6.9. max-client-connections</a></h4>
2783 <div class="VARIABLELIST">
2788 <p>Maximum number of client connections that will be
2792 <dt>Type of value:</dt>
2795 <p><tt class="REPLACEABLE"><i>Positive number.</i></tt></p>
2798 <dt>Default value:</dt>
2804 <dt>Effect if unset:</dt>
2807 <p>Connections are served until a resource limit is
2814 <p><span class="APPLICATION">Privoxy</span> creates one thread
2815 (or process) for every incoming client connection that isn't
2816 rejected based on the access control settings.</p>
2818 <p>If the system is powerful enough, <span class=
2819 "APPLICATION">Privoxy</span> can theoretically deal with
2820 several hundred (or thousand) connections at the same time, but
2821 some operating systems enforce resource limits by shutting down
2822 offending processes and their default limits may be below the
2823 ones <span class="APPLICATION">Privoxy</span> would require
2824 under heavy load.</p>
2826 <p>Configuring <span class="APPLICATION">Privoxy</span> to
2827 enforce a connection limit below the thread or process limit
2828 used by the operating system makes sure this doesn't happen.
2829 Simply increasing the operating system's limit would work too,
2830 but if <span class="APPLICATION">Privoxy</span> isn't the only
2831 application running on the system, you may actually want to
2832 limit the resources used by <span class=
2833 "APPLICATION">Privoxy</span>.</p>
2835 <p>If <span class="APPLICATION">Privoxy</span> is only used by
2836 a single trusted user, limiting the number of client
2837 connections is probably unnecessary. If there are multiple
2838 possibly untrusted users you probably still want to
2839 additionally use a packet filter to limit the maximal number of
2840 incoming connections per client. Otherwise a malicious user
2841 could intentionally create a high number of connections to
2842 prevent other users from using <span class=
2843 "APPLICATION">Privoxy</span>.</p>
2845 <p>Obviously using this option only makes sense if you choose a
2846 limit below the one enforced by the operating system.</p>
2848 <p>One most POSIX-compliant systems <span class=
2849 "APPLICATION">Privoxy</span> can't properly deal with more than
2850 FD_SETSIZE file descriptors at the same time and has to reject
2851 connections if the limit is reached. This will likely change in
2852 a future version, but currently this limit can't be increased
2853 without recompiling <span class="APPLICATION">Privoxy</span>
2854 with a different FD_SETSIZE limit.</p>
2860 <p>max-client-connections 256</p>
2867 <h4 class="SECT3"><a name="HANDLE-AS-EMPTY-DOC-RETURNS-OK" id=
2868 "HANDLE-AS-EMPTY-DOC-RETURNS-OK">7.6.10.
2869 handle-as-empty-doc-returns-ok</a></h4>
2871 <div class="VARIABLELIST">
2876 <p>The status code Privoxy returns for pages blocked with
2877 <tt class="LITERAL"><a href=
2878 "actions-file.html#HANDLE-AS-EMPTY-DOCUMENT" target=
2879 "_top">+handle-as-empty-document</a></tt>.</p>
2882 <dt>Type of value:</dt>
2885 <p><tt class="REPLACEABLE"><i>0 or 1</i></tt></p>
2888 <dt>Default value:</dt>
2894 <dt>Effect if unset:</dt>
2897 <p>Privoxy returns a status 403(forbidden) for all blocked
2901 <dt>Effect if set:</dt>
2904 <p>Privoxy returns a status 200(OK) for pages blocked with
2905 +handle-as-empty-document and a status 403(Forbidden) for all
2906 other blocked pages.</p>
2912 <p>This is a work-around for Firefox bug 492459: <span class=
2913 "QUOTE">" Websites are no longer rendered if SSL requests for
2914 JavaScripts are blocked by a proxy. "</span> (<a href=
2915 "https://bugzilla.mozilla.org/show_bug.cgi?id=492459" target=
2916 "_top">https://bugzilla.mozilla.org/show_bug.cgi?id=492459</a>)
2917 As the bug has been fixed for quite some time this option
2918 should no longer be needed and will be removed in a future
2919 release. Please speak up if you have a reason why the option
2920 should be kept around.</p>
2927 <h4 class="SECT3"><a name="ENABLE-COMPRESSION" id=
2928 "ENABLE-COMPRESSION">7.6.11. enable-compression</a></h4>
2930 <div class="VARIABLELIST">
2935 <p>Whether or not buffered content is compressed before
2939 <dt>Type of value:</dt>
2942 <p><tt class="REPLACEABLE"><i>0 or 1</i></tt></p>
2945 <dt>Default value:</dt>
2951 <dt>Effect if unset:</dt>
2954 <p>Privoxy does not compress buffered content.</p>
2957 <dt>Effect if set:</dt>
2960 <p>Privoxy compresses buffered content before delivering it to
2961 the client, provided the client supports it.</p>
2967 <p>This directive is only supported if Privoxy has been
2968 compiled with FEATURE_COMPRESSION, which should not to be
2969 confused with FEATURE_ZLIB.</p>
2971 <p>Compressing buffered content is mainly useful if Privoxy and
2972 the client are running on different systems. If they are
2973 running on the same system, enabling compression is likely to
2974 slow things down. If you didn't measure otherwise, you should
2975 assume that it does and keep this option disabled.</p>
2977 <p>Privoxy will not compress buffered content below a certain
2985 <h4 class="SECT3"><a name="COMPRESSION-LEVEL" id=
2986 "COMPRESSION-LEVEL">7.6.12. compression-level</a></h4>
2988 <div class="VARIABLELIST">
2993 <p>The compression level that is passed to the zlib library
2994 when compressing buffered content.</p>
2997 <dt>Type of value:</dt>
3000 <p><tt class="REPLACEABLE"><i>Positive number ranging from 0 to
3004 <dt>Default value:</dt>
3013 <p>Compressing the data more takes usually longer than
3014 compressing it less or not compressing it at all. Which level
3015 is best depends on the connection between Privoxy and the
3016 client. If you can't be bothered to benchmark it for yourself,
3017 you should stick with the default and keep compression
3020 <p>If compression is disabled, the compression level is
3027 <table border="0" bgcolor="#E0E0E0" width="90%">
3030 <pre class="SCREEN">
3031 # Best speed (compared to the other levels)
3035 # No compression. Only useful for testing as the added header
3036 # slightly increases the amount of data that has to be sent.
3037 # If your benchmark shows that using this compression level
3038 # is superior to using no compression at all, the benchmark
3039 # is likely to be flawed.
3052 <h4 class="SECT3"><a name="CLIENT-HEADER-ORDER" id=
3053 "CLIENT-HEADER-ORDER">7.6.13. client-header-order</a></h4>
3055 <div class="VARIABLELIST">
3060 <p>The order in which client headers are sorted before
3061 forwarding them.</p>
3064 <dt>Type of value:</dt>
3067 <p><tt class="REPLACEABLE"><i>Client header names delimited by
3068 spaces or tabs</i></tt></p>
3071 <dt>Default value:</dt>
3080 <p>By default <span class="APPLICATION">Privoxy</span> leaves
3081 the client headers in the order they were sent by the client.
3082 Headers are modified in-place, new headers are added at the end
3083 of the already existing headers.</p>
3085 <p>The header order can be used to fingerprint client requests
3086 independently of other headers like the User-Agent.</p>
3088 <p>This directive allows to sort the headers differently to
3089 better mimic a different User-Agent. Client headers will be
3090 emitted in the order given, headers whose name isn't explicitly
3091 specified are added at the end.</p>
3093 <p>Note that sorting headers in an uncommon way will make
3094 fingerprinting actually easier. Encrypted headers are not
3095 affected by this directive.</p>
3103 <h2 class="SECT2"><a name="WINDOWS-GUI" id="WINDOWS-GUI">7.7. Windows
3104 GUI Options</a></h2>
3106 <p><span class="APPLICATION">Privoxy</span> has a number of options
3107 specific to the Windows GUI interface:</p><a name="ACTIVITY-ANIMATION"
3108 id="ACTIVITY-ANIMATION"></a>
3110 <p>If <span class="QUOTE">"activity-animation"</span> is set to 1, the
3111 <span class="APPLICATION">Privoxy</span> icon will animate when
3112 <span class="QUOTE">"Privoxy"</span> is active. To turn off, set to
3115 <p class="LITERALLAYOUT"><tt class="LITERAL"> <span class=
3116 "emphasis"><i class="EMPHASIS">activity-animation 1</i></span><br>
3117 </tt></p><a name="LOG-MESSAGES" id=
3120 <p>If <span class="QUOTE">"log-messages"</span> is set to 1,
3121 <span class="APPLICATION">Privoxy</span> copies log messages to the
3122 console window. The log detail depends on the <a href=
3123 "config.html#DEBUG">debug</a> directive.</p>
3125 <p class="LITERALLAYOUT"><tt class="LITERAL"> <span class=
3126 "emphasis"><i class="EMPHASIS">log-messages 1</i></span><br>
3127 </tt></p><a name="LOG-BUFFER-SIZE" id=
3128 "LOG-BUFFER-SIZE"></a>
3130 <p>If <span class="QUOTE">"log-buffer-size"</span> is set to 1, the
3131 size of the log buffer, i.e. the amount of memory used for the log
3132 messages displayed in the console window, will be limited to
3133 <span class="QUOTE">"log-max-lines"</span> (see below).</p>
3135 <p>Warning: Setting this to 0 will result in the buffer to grow
3136 infinitely and eat up all your memory!</p>
3138 <p class="LITERALLAYOUT"><tt class="LITERAL"> <span class=
3139 "emphasis"><i class="EMPHASIS">log-buffer-size 1</i></span><br>
3140 </tt></p><a name="LOG-MAX-LINES" id=
3141 "LOG-MAX-LINES"></a>
3143 <p><span class="APPLICATION">log-max-lines</span> is the maximum number
3144 of lines held in the log buffer. See above.</p>
3146 <p class="LITERALLAYOUT"><tt class="LITERAL"> <span class=
3147 "emphasis"><i class="EMPHASIS">log-max-lines 200</i></span><br>
3148 </tt></p><a name="LOG-HIGHLIGHT-MESSAGES" id=
3149 "LOG-HIGHLIGHT-MESSAGES"></a>
3151 <p>If <span class="QUOTE">"log-highlight-messages"</span> is set to 1,
3152 <span class="APPLICATION">Privoxy</span> will highlight portions of the
3153 log messages with a bold-faced font:</p>
3155 <p class="LITERALLAYOUT"><tt class="LITERAL"> <span class=
3156 "emphasis"><i class="EMPHASIS">log-highlight-messages 1</i></span><br>
3157 </tt></p><a name="LOG-FONT-NAME" id=
3158 "LOG-FONT-NAME"></a>
3160 <p>The font used in the console window:</p>
3162 <p class="LITERALLAYOUT"><tt class="LITERAL"> <span class=
3163 "emphasis"><i class="EMPHASIS">log-font-name Comic Sans
3165 </tt></p><a name="LOG-FONT-SIZE" id=
3166 "LOG-FONT-SIZE"></a>
3168 <p>Font size used in the console window:</p>
3170 <p class="LITERALLAYOUT"><tt class="LITERAL"> <span class=
3171 "emphasis"><i class="EMPHASIS">log-font-size 8</i></span><br>
3172 </tt></p><a name="SHOW-ON-TASK-BAR" id=
3173 "SHOW-ON-TASK-BAR"></a>
3175 <p><span class="QUOTE">"show-on-task-bar"</span> controls whether or
3176 not <span class="APPLICATION">Privoxy</span> will appear as a button on
3177 the Task bar when minimized:</p>
3179 <p class="LITERALLAYOUT"><tt class="LITERAL"> <span class=
3180 "emphasis"><i class="EMPHASIS">show-on-task-bar 0</i></span><br>
3181 </tt></p><a name="CLOSE-BUTTON-MINIMIZES" id=
3182 "CLOSE-BUTTON-MINIMIZES"></a>
3184 <p>If <span class="QUOTE">"close-button-minimizes"</span> is set to 1,
3185 the Windows close button will minimize <span class=
3186 "APPLICATION">Privoxy</span> instead of closing the program (close with
3187 the exit option on the File menu).</p>
3189 <p class="LITERALLAYOUT"><tt class="LITERAL"> <span class=
3190 "emphasis"><i class="EMPHASIS">close-button-minimizes 1</i></span><br>
3191 </tt></p><a name="HIDE-CONSOLE" id=
3194 <p>The <span class="QUOTE">"hide-console"</span> option is specific to
3195 the MS-Win console version of <span class="APPLICATION">Privoxy</span>.
3196 If this option is used, <span class="APPLICATION">Privoxy</span> will
3197 disconnect from and hide the command console.</p>
3199 <p class="LITERALLAYOUT"><tt class="LITERAL"> #<span class=
3200 "emphasis"><i class="EMPHASIS">hide-console</i></span><br>
3201 </tt></p>
3205 <div class="NAVFOOTER">
3206 <hr align="left" width="100%">
3208 <table summary="Footer navigation table" width="100%" border="0"
3209 cellpadding="0" cellspacing="0">
3211 <td width="33%" align="left" valign="top"><a href=
3212 "configuration.html" accesskey="P">Prev</a></td>
3214 <td width="34%" align="center" valign="top"><a href="index.html"
3215 accesskey="H">Home</a></td>
3217 <td width="33%" align="right" valign="top"><a href=
3218 "actions-file.html" accesskey="N">Next</a></td>
3222 <td width="33%" align="left" valign="top">Privoxy Configuration</td>
3224 <td width="34%" align="center" valign="top"> </td>
3226 <td width="33%" align="right" valign="top">Actions Files</td>