1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2 "http://www.w3.org/TR/html4/loose.dtd">
5 <title>The Main Configuration File</title>
6 <meta name="GENERATOR" content="Modular DocBook HTML Stylesheet Version 1.79">
7 <link rel="HOME" title="Privoxy 3.0.29 User Manual" href="index.html">
8 <link rel="PREVIOUS" title="Privoxy Configuration" href="configuration.html">
9 <link rel="NEXT" title="Actions Files" href="actions-file.html">
10 <link rel="STYLESHEET" type="text/css" href="../p_doc.css">
11 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
12 <link rel="STYLESHEET" type="text/css" href="p_doc.css">
14 <body class="SECT1" bgcolor="#EEEEEE" text="#000000" link="#0000FF" vlink="#840084" alink="#0000FF">
15 <div class="NAVHEADER">
16 <table summary="Header navigation table" width="100%" border="0" cellpadding="0" cellspacing="0">
18 <th colspan="3" align="center">Privoxy 3.0.29 User Manual</th>
21 <td width="10%" align="left" valign="bottom"><a href="configuration.html" accesskey="P">Prev</a></td>
22 <td width="80%" align="center" valign="bottom"></td>
23 <td width="10%" align="right" valign="bottom"><a href="actions-file.html" accesskey="N">Next</a></td>
26 <hr align="left" width="100%">
29 <h1 class="SECT1"><a name="CONFIG" id="CONFIG">7. The Main Configuration File</a></h1>
30 <p>By default, the main configuration file is named <tt class="FILENAME">config</tt>, with the exception of
31 Windows, where it is named <tt class="FILENAME">config.txt</tt>. Configuration lines consist of an initial keyword
32 followed by a list of values, all separated by whitespace (any number of spaces or tabs). For example:</p>
33 <p class="LITERALLAYOUT"> <span class="emphasis"><i class="EMPHASIS">confdir /etc/privoxy</i></span></p>
34 <p>Assigns the value <tt class="LITERAL">/etc/privoxy</tt> to the option <tt class="LITERAL">confdir</tt> and thus
35 indicates that the configuration directory is named <span class="QUOTE">"/etc/privoxy/"</span>.</p>
36 <p>All options in the config file except for <tt class="LITERAL">confdir</tt> and <tt class="LITERAL">logdir</tt>
37 are optional. Watch out in the below description for what happens if you leave them unset.</p>
38 <p>The main config file controls all aspects of <span class="APPLICATION">Privoxy</span>'s operation that are not
39 location dependent (i.e. they apply universally, no matter where you may be surfing). Like the filter and action
40 files, the config file is a plain text file and can be modified with a text editor like emacs, vim or
43 <h2 class="SECT2"><a name="LOCAL-SET-UP" id="LOCAL-SET-UP">7.1. Local Set-up Documentation</a></h2>
44 <p>If you intend to operate <span class="APPLICATION">Privoxy</span> for more users than just yourself, it might
45 be a good idea to let them know how to reach you, what you block and why you do that, your policies, etc.</p>
47 <h4 class="SECT3"><a name="USER-MANUAL" id="USER-MANUAL">7.1.1. user-manual</a></h4>
48 <div class="VARIABLELIST">
52 <p>Location of the <span class="APPLICATION">Privoxy</span> User Manual.</p>
54 <dt>Type of value:</dt>
56 <p>A fully qualified URI</p>
58 <dt>Default value:</dt>
60 <p><span class="emphasis"><i class="EMPHASIS">Unset</i></span></p>
62 <dt>Effect if unset:</dt>
64 <p><a href="https://www.privoxy.org/user-manual/" target="_top">https://www.privoxy.org/<tt class=
65 "REPLACEABLE"><i>version</i></tt>/user-manual/</a> will be used, where <tt class=
66 "REPLACEABLE"><i>version</i></tt> is the <span class="APPLICATION">Privoxy</span> version.</p>
70 <p>The User Manual URI is the single best source of information on <span class=
71 "APPLICATION">Privoxy</span>, and is used for help links from some of the internal CGI pages. The manual
72 itself is normally packaged with the binary distributions, so you probably want to set this to a locally
75 <p>The best all purpose solution is simply to put the full local <tt class="LITERAL">PATH</tt> to where
76 the <i class="CITETITLE">User Manual</i> is located:</p>
77 <table border="0" bgcolor="#E0E0E0" width="90%">
80 <pre class="SCREEN"> user-manual /usr/share/doc/privoxy/user-manual</pre>
84 <p>The User Manual is then available to anyone with access to <span class="APPLICATION">Privoxy</span>,
85 by following the built-in URL: <tt class="LITERAL">http://config.privoxy.org/user-manual/</tt> (or the
86 shortcut: <tt class="LITERAL">http://p.p/user-manual/</tt>).</p>
87 <p>If the documentation is not on the local system, it can be accessed from a remote server, as:</p>
88 <table border="0" bgcolor="#E0E0E0" width="90%">
91 <pre class="SCREEN"> user-manual http://example.com/privoxy/user-manual/</pre>
96 <table class="WARNING" border="1" width="90%">
98 <td align="center"><b>Warning</b></td>
102 <p>If set, this option should be <span class="emphasis"><i class="EMPHASIS">the first option in
103 the config file</i></span>, because it is used while the config file is being read on
114 <h4 class="SECT3"><a name="TRUST-INFO-URL" id="TRUST-INFO-URL">7.1.2. trust-info-url</a></h4>
115 <div class="VARIABLELIST">
119 <p>A URL to be displayed in the error page that users will see if access to an untrusted page is
122 <dt>Type of value:</dt>
126 <dt>Default value:</dt>
128 <p><span class="emphasis"><i class="EMPHASIS">Unset</i></span></p>
130 <dt>Effect if unset:</dt>
132 <p>No links are displayed on the "untrusted" error page.</p>
136 <p>The value of this option only matters if the experimental trust mechanism has been activated. (See
137 <a href="config.html#TRUSTFILE"><span class="emphasis"><i class="EMPHASIS">trustfile</i></span></a>
139 <p>If you use the trust mechanism, it is a good idea to write up some on-line documentation about your
140 trust policy and to specify the URL(s) here. Use multiple times for multiple URLs.</p>
141 <p>The URL(s) should be added to the trustfile as well, so users don't end up locked out from the
142 information on why they were locked out in the first place!</p>
148 <h4 class="SECT3"><a name="ADMIN-ADDRESS" id="ADMIN-ADDRESS">7.1.3. admin-address</a></h4>
149 <div class="VARIABLELIST">
153 <p>An email address to reach the <span class="APPLICATION">Privoxy</span> administrator.</p>
155 <dt>Type of value:</dt>
159 <dt>Default value:</dt>
161 <p><span class="emphasis"><i class="EMPHASIS">Unset</i></span></p>
163 <dt>Effect if unset:</dt>
165 <p>No email address is displayed on error pages and the CGI user interface.</p>
169 <p>If both <tt class="LITERAL">admin-address</tt> and <tt class="LITERAL">proxy-info-url</tt> are unset,
170 the whole "Local Privoxy Support" box on all generated pages will not be shown.</p>
176 <h4 class="SECT3"><a name="PROXY-INFO-URL" id="PROXY-INFO-URL">7.1.4. proxy-info-url</a></h4>
177 <div class="VARIABLELIST">
181 <p>A URL to documentation about the local <span class="APPLICATION">Privoxy</span> setup, configuration
184 <dt>Type of value:</dt>
188 <dt>Default value:</dt>
190 <p><span class="emphasis"><i class="EMPHASIS">Unset</i></span></p>
192 <dt>Effect if unset:</dt>
194 <p>No link to local documentation is displayed on error pages and the CGI user interface.</p>
198 <p>If both <tt class="LITERAL">admin-address</tt> and <tt class="LITERAL">proxy-info-url</tt> are unset,
199 the whole "Local Privoxy Support" box on all generated pages will not be shown.</p>
200 <p>This URL shouldn't be blocked ;-)</p>
207 <h2 class="SECT2"><a name="CONF-LOG-LOC" id="CONF-LOG-LOC">7.2. Configuration and Log File Locations</a></h2>
208 <p><span class="APPLICATION">Privoxy</span> can (and normally does) use a number of other files for additional
209 configuration, help and logging. This section of the configuration file tells <span class=
210 "APPLICATION">Privoxy</span> where to find those other files.</p>
211 <p>The user running <span class="APPLICATION">Privoxy</span>, must have read permission for all configuration
212 files, and write permission to any files that would be modified, such as log files and actions files.</p>
214 <h4 class="SECT3"><a name="CONFDIR" id="CONFDIR">7.2.1. confdir</a></h4>
215 <div class="VARIABLELIST">
219 <p>The directory where the other configuration files are located.</p>
221 <dt>Type of value:</dt>
225 <dt>Default value:</dt>
227 <p>/etc/privoxy (Unix) <span class="emphasis"><i class="EMPHASIS">or</i></span> <span class=
228 "APPLICATION">Privoxy</span> installation dir (Windows)</p>
230 <dt>Effect if unset:</dt>
232 <p><span class="emphasis"><i class="EMPHASIS">Mandatory</i></span></p>
236 <p>No trailing <span class="QUOTE">"<tt class="LITERAL">/</tt>"</span>, please.</p>
242 <h4 class="SECT3"><a name="TEMPLDIR" id="TEMPLDIR">7.2.2. templdir</a></h4>
243 <div class="VARIABLELIST">
247 <p>An alternative directory where the templates are loaded from.</p>
249 <dt>Type of value:</dt>
253 <dt>Default value:</dt>
257 <dt>Effect if unset:</dt>
259 <p>The templates are assumed to be located in confdir/template.</p>
263 <p><span class="APPLICATION">Privoxy's</span> original templates are usually overwritten with each
264 update. Use this option to relocate customized templates that should be kept. As template variables might
265 change between updates, you shouldn't expect templates to work with <span class=
266 "APPLICATION">Privoxy</span> releases other than the one they were part of, though.</p>
272 <h4 class="SECT3"><a name="TEMPORARY-DIRECTORY" id="TEMPORARY-DIRECTORY">7.2.3. temporary-directory</a></h4>
273 <div class="VARIABLELIST">
277 <p>A directory where Privoxy can create temporary files.</p>
279 <dt>Type of value:</dt>
283 <dt>Default value:</dt>
287 <dt>Effect if unset:</dt>
289 <p>No temporary files are created, external filters don't work.</p>
293 <p>To execute <tt class="LITERAL"><a href="actions-file.html#EXTERNAL-FILTER" target="_top">external
294 filters</a></tt>, <span class="APPLICATION">Privoxy</span> has to create temporary files. This directive
295 specifies the directory the temporary files should be written to.</p>
296 <p>It should be a directory only <span class="APPLICATION">Privoxy</span> (and trusted users) can
303 <h4 class="SECT3"><a name="LOGDIR" id="LOGDIR">7.2.4. logdir</a></h4>
304 <div class="VARIABLELIST">
308 <p>The directory where all logging takes place (i.e. where the <tt class="FILENAME">logfile</tt> is
311 <dt>Type of value:</dt>
315 <dt>Default value:</dt>
317 <p>/var/log/privoxy (Unix) <span class="emphasis"><i class="EMPHASIS">or</i></span> <span class=
318 "APPLICATION">Privoxy</span> installation dir (Windows)</p>
320 <dt>Effect if unset:</dt>
322 <p><span class="emphasis"><i class="EMPHASIS">Mandatory</i></span></p>
326 <p>No trailing <span class="QUOTE">"<tt class="LITERAL">/</tt>"</span>, please.</p>
332 <h4 class="SECT3"><a name="ACTIONSFILE" id="ACTIONSFILE">7.2.5. actionsfile</a></h4><a name="DEFAULT.ACTION"
333 id="DEFAULT.ACTION"></a><a name="STANDARD.ACTION" id="STANDARD.ACTION"></a><a name="USER.ACTION" id=
335 <div class="VARIABLELIST">
339 <p>The <a href="actions-file.html">actions file(s)</a> to use</p>
341 <dt>Type of value:</dt>
343 <p>Complete file name, relative to <tt class="LITERAL">confdir</tt></p>
345 <dt>Default values:</dt>
351 <p class="LITERALLAYOUT">
352 match-all.action # Actions that are applied to all sites and maybe overruled later on.</p>
357 <p class="LITERALLAYOUT">
358 default.action # Main actions file</p>
363 <p class="LITERALLAYOUT">
364 user.action # User customizations</p>
370 <dt>Effect if unset:</dt>
372 <p>No actions are taken at all. More or less neutral proxying.</p>
376 <p>Multiple <tt class="LITERAL">actionsfile</tt> lines are permitted, and are in fact recommended!</p>
377 <p>The default values are <tt class="FILENAME">default.action</tt>, which is the <span class=
378 "QUOTE">"main"</span> actions file maintained by the developers, and <tt class=
379 "FILENAME">user.action</tt>, where you can make your personal additions.</p>
380 <p>Actions files contain all the per site and per URL configuration for ad blocking, cookie management,
381 privacy considerations, etc.</p>
387 <h4 class="SECT3"><a name="FILTERFILE" id="FILTERFILE">7.2.6. filterfile</a></h4><a name="DEFAULT.FILTER" id=
388 "DEFAULT.FILTER"></a>
389 <div class="VARIABLELIST">
393 <p>The <a href="filter-file.html">filter file(s)</a> to use</p>
395 <dt>Type of value:</dt>
397 <p>File name, relative to <tt class="LITERAL">confdir</tt></p>
399 <dt>Default value:</dt>
401 <p>default.filter (Unix) <span class="emphasis"><i class="EMPHASIS">or</i></span> default.filter.txt
404 <dt>Effect if unset:</dt>
406 <p>No textual content filtering takes place, i.e. all <tt class="LITERAL">+<a href=
407 "actions-file.html#FILTER">filter</a>{<tt class="REPLACEABLE"><i>name</i></tt>}</tt> actions in the
408 actions files are turned neutral.</p>
412 <p>Multiple <tt class="LITERAL">filterfile</tt> lines are permitted.</p>
413 <p>The <a href="filter-file.html">filter files</a> contain content modification rules that use <a href=
414 "appendix.html#REGEX">regular expressions</a>. These rules permit powerful changes on the content of Web
415 pages, and optionally the headers as well, e.g., you could try to disable your favorite JavaScript
416 annoyances, re-write the actual displayed text, or just have some fun playing buzzword bingo with web
418 <p>The <tt class="LITERAL">+<a href="actions-file.html#FILTER">filter</a>{<tt class=
419 "REPLACEABLE"><i>name</i></tt>}</tt> actions rely on the relevant filter (<tt class=
420 "REPLACEABLE"><i>name</i></tt>) to be defined in a filter file!</p>
421 <p>A pre-defined filter file called <tt class="FILENAME">default.filter</tt> that contains a number of
422 useful filters for common problems is included in the distribution. See the section on the <tt class=
423 "LITERAL"><a href="actions-file.html#FILTER">filter</a></tt> action for a list.</p>
424 <p>It is recommended to place any locally adapted filters into a separate file, such as <tt class=
425 "FILENAME">user.filter</tt>.</p>
431 <h4 class="SECT3"><a name="LOGFILE" id="LOGFILE">7.2.7. logfile</a></h4>
432 <div class="VARIABLELIST">
436 <p>The log file to use</p>
438 <dt>Type of value:</dt>
440 <p>File name, relative to <tt class="LITERAL">logdir</tt></p>
442 <dt>Default value:</dt>
444 <p><span class="emphasis"><i class="EMPHASIS">Unset (commented out)</i></span>. When activated: logfile
445 (Unix) <span class="emphasis"><i class="EMPHASIS">or</i></span> privoxy.log (Windows).</p>
447 <dt>Effect if unset:</dt>
449 <p>No logfile is written.</p>
453 <p>The logfile is where all logging and error messages are written. The level of detail and number of
454 messages are set with the <tt class="LITERAL">debug</tt> option (see below). The logfile can be useful
455 for tracking down a problem with <span class="APPLICATION">Privoxy</span> (e.g., it's not blocking an ad
456 you think it should block) and it can help you to monitor what your browser is doing.</p>
457 <p>Depending on the debug options below, the logfile may be a privacy risk if third parties can get
458 access to it. As most users will never look at it, <span class="APPLICATION">Privoxy</span> only logs
459 fatal errors by default.</p>
460 <p>For most troubleshooting purposes, you will have to change that, please refer to the debugging section
462 <p>Any log files must be writable by whatever user <span class="APPLICATION">Privoxy</span> is being run
463 as (on Unix, default user id is <span class="QUOTE">"privoxy"</span>).</p>
464 <p>To prevent the logfile from growing indefinitely, it is recommended to periodically rotate or shorten
465 it. Many operating systems support log rotation out of the box, some require additional software to do
466 it. For details, please refer to the documentation for your operating system.</p>
472 <h4 class="SECT3"><a name="TRUSTFILE" id="TRUSTFILE">7.2.8. trustfile</a></h4>
473 <div class="VARIABLELIST">
477 <p>The name of the trust file to use</p>
479 <dt>Type of value:</dt>
481 <p>File name, relative to <tt class="LITERAL">confdir</tt></p>
483 <dt>Default value:</dt>
485 <p><span class="emphasis"><i class="EMPHASIS">Unset (commented out)</i></span>. When activated: trust
486 (Unix) <span class="emphasis"><i class="EMPHASIS">or</i></span> trust.txt (Windows)</p>
488 <dt>Effect if unset:</dt>
490 <p>The entire trust mechanism is disabled.</p>
494 <p>The trust mechanism is an experimental feature for building white-lists and should be used with care.
495 It is <span class="emphasis"><i class="EMPHASIS">NOT</i></span> recommended for the casual user.</p>
496 <p>If you specify a trust file, <span class="APPLICATION">Privoxy</span> will only allow access to sites
497 that are specified in the trustfile. Sites can be listed in one of two ways:</p>
498 <p>Prepending a <tt class="LITERAL">~</tt> character limits access to this site only (and any sub-paths
499 within this site), e.g. <tt class="LITERAL">~www.example.com</tt> allows access to <tt class=
500 "LITERAL">~www.example.com/features/news.html</tt>, etc.</p>
501 <p>Or, you can designate sites as <span class="emphasis"><i class="EMPHASIS">trusted
502 referrers</i></span>, by prepending the name with a <tt class="LITERAL">+</tt> character. The effect is
503 that access to untrusted sites will be granted -- but only if a link from this trusted referrer was used
504 to get there. The link target will then be added to the <span class="QUOTE">"trustfile"</span> so that
505 future, direct accesses will be granted. Sites added via this mechanism do not become trusted referrers
506 themselves (i.e. they are added with a <tt class="LITERAL">~</tt> designation). There is a limit of 512
507 such entries, after which new entries will not be made.</p>
508 <p>If you use the <tt class="LITERAL">+</tt> operator in the trust file, it may grow considerably over
510 <p>It is recommended that <span class="APPLICATION">Privoxy</span> be compiled with the <tt class=
511 "LITERAL">--disable-force</tt>, <tt class="LITERAL">--disable-toggle</tt> and <tt class=
512 "LITERAL">--disable-editor</tt> options, if this feature is to be used.</p>
513 <p>Possible applications include limiting Internet access for children.</p>
520 <h2 class="SECT2"><a name="DEBUGGING" id="DEBUGGING">7.3. Debugging</a></h2>
521 <p>These options are mainly useful when tracing a problem. Note that you might also want to invoke <span class=
522 "APPLICATION">Privoxy</span> with the <tt class="LITERAL">--no-daemon</tt> command line option when
525 <h4 class="SECT3"><a name="DEBUG" id="DEBUG">7.3.1. debug</a></h4>
526 <div class="VARIABLELIST">
530 <p>Key values that determine what information gets logged.</p>
532 <dt>Type of value:</dt>
534 <p>Integer values</p>
536 <dt>Default value:</dt>
538 <p>0 (i.e.: only fatal errors (that cause Privoxy to exit) are logged)</p>
540 <dt>Effect if unset:</dt>
542 <p>Default value is used (see above).</p>
546 <p>The available debug levels are:</p>
547 <table border="0" bgcolor="#E0E0E0" width="90%">
550 <pre class="PROGRAMLISTING"> debug 1 # Log the destination for each request <span class=
551 "APPLICATION">Privoxy</span> let through. See also debug 1024.
552 debug 2 # show each connection status
553 debug 4 # show I/O status
554 debug 8 # show header parsing
555 debug 16 # log all data written to the network
556 debug 32 # debug force feature
557 debug 64 # debug regular expression filters
558 debug 128 # debug redirects
559 debug 256 # debug GIF de-animation
560 debug 512 # Common Log Format
561 debug 1024 # Log the destination for requests <span class=
562 "APPLICATION">Privoxy</span> didn't let through, and the reason why.
563 debug 2048 # CGI user interface
564 debug 4096 # Startup banner and warnings.
565 debug 8192 # Non-fatal errors
566 debug 32768 # log all data read from the network
567 debug 65536 # Log the applying actions</pre>
571 <p>To select multiple debug levels, you can either add them or use multiple <tt class=
572 "LITERAL">debug</tt> lines.</p>
573 <p>A debug level of 1 is informative because it will show you each request as it happens. <span class=
574 "emphasis"><i class="EMPHASIS">1, 1024, 4096 and 8192 are recommended</i></span> so that you will notice
575 when things go wrong. The other levels are probably only of interest if you are hunting down a specific
576 problem. They can produce a hell of an output (especially 16).</p>
577 <p>If you are used to the more verbose settings, simply enable the debug lines below again.</p>
578 <p>If you want to use pure CLF (Common Log Format), you should set <span class="QUOTE">"debug 512"</span>
579 <span class="emphasis"><i class="EMPHASIS">ONLY</i></span> and not enable anything else.</p>
580 <p><span class="APPLICATION">Privoxy</span> has a hard-coded limit for the length of log messages. If
581 it's reached, messages are logged truncated and marked with <span class="QUOTE">"... [too long,
582 truncated]"</span>.</p>
583 <p>Please don't file any support requests without trying to reproduce the problem with increased debug
584 level first. Once you read the log messages, you may even be able to solve the problem on your own.</p>
590 <h4 class="SECT3"><a name="SINGLE-THREADED" id="SINGLE-THREADED">7.3.2. single-threaded</a></h4>
591 <div class="VARIABLELIST">
595 <p>Whether to run only one server thread.</p>
597 <dt>Type of value:</dt>
599 <p><span class="emphasis"><i class="EMPHASIS">1 or 0</i></span></p>
601 <dt>Default value:</dt>
603 <p><span class="emphasis"><i class="EMPHASIS">0</i></span></p>
605 <dt>Effect if unset:</dt>
607 <p>Multi-threaded (or, where unavailable: forked) operation, i.e. the ability to serve multiple requests
612 <p>This option is only there for debugging purposes. <span class="emphasis"><i class="EMPHASIS">It will
613 drastically reduce performance.</i></span></p>
619 <h4 class="SECT3"><a name="HOSTNAME" id="HOSTNAME">7.3.3. hostname</a></h4>
620 <div class="VARIABLELIST">
624 <p>The hostname shown on the CGI pages.</p>
626 <dt>Type of value:</dt>
630 <dt>Default value:</dt>
632 <p><span class="emphasis"><i class="EMPHASIS">Unset</i></span></p>
634 <dt>Effect if unset:</dt>
636 <p>The hostname provided by the operating system is used.</p>
640 <p>On some misconfigured systems resolving the hostname fails or takes too much time and slows Privoxy
641 down. Setting a fixed hostname works around the problem.</p>
642 <p>In other circumstances it might be desirable to show a hostname other than the one returned by the
643 operating system. For example if the system has several different hostnames and you don't want to use the
645 <p>Note that Privoxy does not validate the specified hostname value.</p>
652 <h2 class="SECT2"><a name="ACCESS-CONTROL" id="ACCESS-CONTROL">7.4. Access Control and Security</a></h2>
653 <p>This section of the config file controls the security-relevant aspects of <span class=
654 "APPLICATION">Privoxy</span>'s configuration.</p>
656 <h4 class="SECT3"><a name="LISTEN-ADDRESS" id="LISTEN-ADDRESS">7.4.1. listen-address</a></h4>
657 <div class="VARIABLELIST">
661 <p>The address and TCP port on which <span class="APPLICATION">Privoxy</span> will listen for client
664 <dt>Type of value:</dt>
666 <p>[<tt class="REPLACEABLE"><i>IP-Address</i></tt>]:<tt class="REPLACEABLE"><i>Port</i></tt></p>
667 <p>[<tt class="REPLACEABLE"><i>Hostname</i></tt>]:<tt class="REPLACEABLE"><i>Port</i></tt></p>
669 <dt>Default value:</dt>
671 <p>127.0.0.1:8118</p>
673 <dt>Effect if unset:</dt>
675 <p>Bind to 127.0.0.1 (IPv4 localhost), port 8118. This is suitable and recommended for home users who run
676 <span class="APPLICATION">Privoxy</span> on the same machine as their browser.</p>
680 <p>You will need to configure your browser(s) to this proxy address and port.</p>
681 <p>If you already have another service running on port 8118, or if you want to serve requests from other
682 machines (e.g. on your local network) as well, you will need to override the default.</p>
683 <p>You can use this statement multiple times to make <span class="APPLICATION">Privoxy</span> listen on
684 more ports or more <abbr class="ABBREV">IP</abbr> addresses. Suitable if your operating system does not
685 support sharing <abbr class="ABBREV">IPv6</abbr> and <abbr class="ABBREV">IPv4</abbr> protocols on the
687 <p>If a hostname is used instead of an IP address, <span class="APPLICATION">Privoxy</span> will try to
688 resolve it to an IP address and if there are multiple, use the first one returned.</p>
689 <p>If the address for the hostname isn't already known on the system (for example because it's in
690 /etc/hostname), this may result in DNS traffic.</p>
691 <p>If the specified address isn't available on the system, or if the hostname can't be resolved,
692 <span class="APPLICATION">Privoxy</span> will fail to start.</p>
693 <p>IPv6 addresses containing colons have to be quoted by brackets. They can only be used if <span class=
694 "APPLICATION">Privoxy</span> has been compiled with IPv6 support. If you aren't sure if your version
695 supports it, have a look at <tt class="LITERAL">http://config.privoxy.org/show-status</tt>.</p>
696 <p>Some operating systems will prefer IPv6 to IPv4 addresses even if the system has no IPv6 connectivity
697 which is usually not expected by the user. Some even rely on DNS to resolve localhost which mean the
698 "localhost" address used may not actually be local.</p>
699 <p>It is therefore recommended to explicitly configure the intended IP address instead of relying on the
700 operating system, unless there's a strong reason not to.</p>
701 <p>If you leave out the address, <span class="APPLICATION">Privoxy</span> will bind to all IPv4
702 interfaces (addresses) on your machine and may become reachable from the Internet and/or the local
703 network. Be aware that some GNU/Linux distributions modify that behaviour without updating the
704 documentation. Check for non-standard patches if your <span class="APPLICATION">Privoxy</span> version
705 behaves differently.</p>
706 <p>If you configure <span class="APPLICATION">Privoxy</span> to be reachable from the network, consider
707 using <a href="config.html#ACLS">access control lists</a> (ACL's, see below), and/or a firewall.</p>
708 <p>If you open <span class="APPLICATION">Privoxy</span> to untrusted users, you will also want to make
709 sure that the following actions are disabled: <tt class="LITERAL"><a href=
710 "config.html#ENABLE-EDIT-ACTIONS">enable-edit-actions</a></tt> and <tt class="LITERAL"><a href=
711 "config.html#ENABLE-REMOTE-TOGGLE">enable-remote-toggle</a></tt></p>
715 <p>Suppose you are running <span class="APPLICATION">Privoxy</span> on a machine which has the address
716 192.168.0.1 on your local private network (192.168.0.0) and has another outside connection with a
717 different address. You want it to serve requests from inside only:</p>
718 <table border="0" bgcolor="#E0E0E0" width="90%">
721 <pre class="PROGRAMLISTING"> listen-address 192.168.0.1:8118</pre>
725 <p>Suppose you are running <span class="APPLICATION">Privoxy</span> on an IPv6-capable machine and you
726 want it to listen on the IPv6 address of the loopback device:</p>
727 <table border="0" bgcolor="#E0E0E0" width="90%">
730 <pre class="PROGRAMLISTING"> listen-address [::1]:8118</pre>
739 <h4 class="SECT3"><a name="TOGGLE" id="TOGGLE">7.4.2. toggle</a></h4>
740 <div class="VARIABLELIST">
744 <p>Initial state of "toggle" status</p>
746 <dt>Type of value:</dt>
750 <dt>Default value:</dt>
754 <dt>Effect if unset:</dt>
756 <p>Act as if toggled on</p>
760 <p>If set to 0, <span class="APPLICATION">Privoxy</span> will start in <span class="QUOTE">"toggled
761 off"</span> mode, i.e. mostly behave like a normal, content-neutral proxy with both ad blocking and
762 content filtering disabled. See <tt class="LITERAL">enable-remote-toggle</tt> below.</p>
768 <h4 class="SECT3"><a name="ENABLE-REMOTE-TOGGLE" id="ENABLE-REMOTE-TOGGLE">7.4.3. enable-remote-toggle</a></h4>
769 <div class="VARIABLELIST">
773 <p>Whether or not the <a href="http://config.privoxy.org/toggle" target="_top">web-based toggle
774 feature</a> may be used</p>
776 <dt>Type of value:</dt>
780 <dt>Default value:</dt>
784 <dt>Effect if unset:</dt>
786 <p>The web-based toggle feature is disabled.</p>
790 <p>When toggled off, <span class="APPLICATION">Privoxy</span> mostly acts like a normal, content-neutral
791 proxy, i.e. doesn't block ads or filter content.</p>
792 <p>Access to the toggle feature can <span class="emphasis"><i class="EMPHASIS">not</i></span> be
793 controlled separately by <span class="QUOTE">"ACLs"</span> or HTTP authentication, so that everybody who
794 can access <span class="APPLICATION">Privoxy</span> (see <span class="QUOTE">"ACLs"</span> and <tt class=
795 "LITERAL">listen-address</tt> above) can toggle it for all users. So this option is <span class=
796 "emphasis"><i class="EMPHASIS">not recommended</i></span> for multi-user environments with untrusted
798 <p>Note that malicious client side code (e.g Java) is also capable of using this option.</p>
799 <p>As a lot of <span class="APPLICATION">Privoxy</span> users don't read documentation, this feature is
800 disabled by default.</p>
801 <p>Note that you must have compiled <span class="APPLICATION">Privoxy</span> with support for this
802 feature, otherwise this option has no effect.</p>
808 <h4 class="SECT3"><a name="ENABLE-REMOTE-HTTP-TOGGLE" id="ENABLE-REMOTE-HTTP-TOGGLE">7.4.4.
809 enable-remote-http-toggle</a></h4>
810 <div class="VARIABLELIST">
814 <p>Whether or not Privoxy recognizes special HTTP headers to change its behaviour.</p>
816 <dt>Type of value:</dt>
820 <dt>Default value:</dt>
824 <dt>Effect if unset:</dt>
826 <p>Privoxy ignores special HTTP headers.</p>
830 <p>When toggled on, the client can change <span class="APPLICATION">Privoxy's</span> behaviour by setting
831 special HTTP headers. Currently the only supported special header is <span class="QUOTE">"X-Filter:
832 No"</span>, to disable filtering for the ongoing request, even if it is enabled in one of the action
834 <p>This feature is disabled by default. If you are using <span class="APPLICATION">Privoxy</span> in a
835 environment with trusted clients, you may enable this feature at your discretion. Note that malicious
836 client side code (e.g Java) is also capable of using this feature.</p>
837 <p>This option will be removed in future releases as it has been obsoleted by the more general header
844 <h4 class="SECT3"><a name="ENABLE-EDIT-ACTIONS" id="ENABLE-EDIT-ACTIONS">7.4.5. enable-edit-actions</a></h4>
845 <div class="VARIABLELIST">
849 <p>Whether or not the <a href="http://config.privoxy.org/show-status" target="_top">web-based actions
850 file editor</a> may be used</p>
852 <dt>Type of value:</dt>
856 <dt>Default value:</dt>
860 <dt>Effect if unset:</dt>
862 <p>The web-based actions file editor is disabled.</p>
866 <p>Access to the editor can <span class="emphasis"><i class="EMPHASIS">not</i></span> be controlled
867 separately by <span class="QUOTE">"ACLs"</span> or HTTP authentication, so that everybody who can access
868 <span class="APPLICATION">Privoxy</span> (see <span class="QUOTE">"ACLs"</span> and <tt class=
869 "LITERAL">listen-address</tt> above) can modify its configuration for all users.</p>
870 <p>This option is <span class="emphasis"><i class="EMPHASIS">not recommended</i></span> for environments
871 with untrusted users and as a lot of <span class="APPLICATION">Privoxy</span> users don't read
872 documentation, this feature is disabled by default.</p>
873 <p>Note that malicious client side code (e.g Java) is also capable of using the actions editor and you
874 shouldn't enable this options unless you understand the consequences and are sure your browser is
875 configured correctly.</p>
876 <p>Note that you must have compiled <span class="APPLICATION">Privoxy</span> with support for this
877 feature, otherwise this option has no effect.</p>
883 <h4 class="SECT3"><a name="ENFORCE-BLOCKS" id="ENFORCE-BLOCKS">7.4.6. enforce-blocks</a></h4>
884 <div class="VARIABLELIST">
888 <p>Whether the user is allowed to ignore blocks and can <span class="QUOTE">"go there anyway"</span>.</p>
890 <dt>Type of value:</dt>
892 <p><tt class="REPLACEABLE"><i>0 or 1</i></tt></p>
894 <dt>Default value:</dt>
896 <p><span class="emphasis"><i class="EMPHASIS">0</i></span></p>
898 <dt>Effect if unset:</dt>
900 <p>Blocks are not enforced.</p>
904 <p><span class="APPLICATION">Privoxy</span> is mainly used to block and filter requests as a service to
905 the user, for example to block ads and other junk that clogs the pipes. <span class=
906 "APPLICATION">Privoxy's</span> configuration isn't perfect and sometimes innocent pages are blocked. In
907 this situation it makes sense to allow the user to enforce the request and have <span class=
908 "APPLICATION">Privoxy</span> ignore the block.</p>
909 <p>In the default configuration <span class="APPLICATION">Privoxy's</span> <span class=
910 "QUOTE">"Blocked"</span> page contains a <span class="QUOTE">"go there anyway"</span> link to adds a
911 special string (the force prefix) to the request URL. If that link is used, <span class=
912 "APPLICATION">Privoxy</span> will detect the force prefix, remove it again and let the request pass.</p>
913 <p>Of course <span class="APPLICATION">Privoxy</span> can also be used to enforce a network policy. In
914 that case the user obviously should not be able to bypass any blocks, and that's what the <span class=
915 "QUOTE">"enforce-blocks"</span> option is for. If it's enabled, <span class="APPLICATION">Privoxy</span>
916 hides the <span class="QUOTE">"go there anyway"</span> link. If the user adds the force prefix by hand,
917 it will not be accepted and the circumvention attempt is logged.</p>
921 <p>enforce-blocks 1</p>
927 <h4 class="SECT3"><a name="ACLS" id="ACLS">7.4.7. ACLs: permit-access and deny-access</a></h4><a name=
928 "PERMIT-ACCESS" id="PERMIT-ACCESS"></a><a name="DENY-ACCESS" id="DENY-ACCESS"></a>
929 <div class="VARIABLELIST">
933 <p>Who can access what.</p>
935 <dt>Type of value:</dt>
937 <p><tt class="REPLACEABLE"><i>src_addr</i></tt>[:<tt class="REPLACEABLE"><i>port</i></tt>][/<tt class=
938 "REPLACEABLE"><i>src_masklen</i></tt>] [<tt class="REPLACEABLE"><i>dst_addr</i></tt>[:<tt class=
939 "REPLACEABLE"><i>port</i></tt>][/<tt class="REPLACEABLE"><i>dst_masklen</i></tt>]]</p>
940 <p>Where <tt class="REPLACEABLE"><i>src_addr</i></tt> and <tt class="REPLACEABLE"><i>dst_addr</i></tt>
941 are IPv4 addresses in dotted decimal notation or valid DNS names, <tt class=
942 "REPLACEABLE"><i>port</i></tt> is a port number, and <tt class="REPLACEABLE"><i>src_masklen</i></tt> and
943 <tt class="REPLACEABLE"><i>dst_masklen</i></tt> are subnet masks in CIDR notation, i.e. integer values
944 from 2 to 30 representing the length (in bits) of the network address. The masks and the whole
945 destination part are optional.</p>
946 <p>If your system implements <a href="http://tools.ietf.org/html/rfc3493" target="_top">RFC 3493</a>,
947 then <tt class="REPLACEABLE"><i>src_addr</i></tt> and <tt class="REPLACEABLE"><i>dst_addr</i></tt> can be
948 IPv6 addresses delimeted by brackets, <tt class="REPLACEABLE"><i>port</i></tt> can be a number or a
949 service name, and <tt class="REPLACEABLE"><i>src_masklen</i></tt> and <tt class=
950 "REPLACEABLE"><i>dst_masklen</i></tt> can be a number from 0 to 128.</p>
952 <dt>Default value:</dt>
954 <p><span class="emphasis"><i class="EMPHASIS">Unset</i></span></p>
955 <p>If no <tt class="REPLACEABLE"><i>port</i></tt> is specified, any port will match. If no <tt class=
956 "REPLACEABLE"><i>src_masklen</i></tt> or <tt class="REPLACEABLE"><i>src_masklen</i></tt> is given, the
957 complete IP address has to match (i.e. 32 bits for IPv4 and 128 bits for IPv6).</p>
959 <dt>Effect if unset:</dt>
961 <p>Don't restrict access further than implied by <tt class="LITERAL">listen-address</tt></p>
965 <p>Access controls are included at the request of ISPs and systems administrators, and <span class=
966 "emphasis"><i class="EMPHASIS">are not usually needed by individual users</i></span>. For a typical home
967 user, it will normally suffice to ensure that <span class="APPLICATION">Privoxy</span> only listens on
968 the localhost (127.0.0.1) or internal (home) network address by means of the <a href=
969 "config.html#LISTEN-ADDRESS"><span class="emphasis"><i class="EMPHASIS">listen-address</i></span></a>
971 <p>Please see the warnings in the FAQ that <span class="APPLICATION">Privoxy</span> is not intended to be
972 a substitute for a firewall or to encourage anyone to defer addressing basic security weaknesses.</p>
973 <p>Multiple ACL lines are OK. If any ACLs are specified, <span class="APPLICATION">Privoxy</span> only
974 talks to IP addresses that match at least one <tt class="LITERAL">permit-access</tt> line and don't match
975 any subsequent <tt class="LITERAL">deny-access</tt> line. In other words, the last match wins, with the
976 default being <tt class="LITERAL">deny-access</tt>.</p>
977 <p>If <span class="APPLICATION">Privoxy</span> is using a forwarder (see <tt class="LITERAL">forward</tt>
978 below) for a particular destination URL, the <tt class="REPLACEABLE"><i>dst_addr</i></tt> that is
979 examined is the address of the forwarder and <span class="emphasis"><i class="EMPHASIS">NOT</i></span>
980 the address of the ultimate target. This is necessary because it may be impossible for the local
981 <span class="APPLICATION">Privoxy</span> to determine the IP address of the ultimate target (that's often
982 what gateways are used for).</p>
983 <p>You should prefer using IP addresses over DNS names, because the address lookups take time. All DNS
984 names must resolve! You can <span class="emphasis"><i class="EMPHASIS">not</i></span> use domain patterns
985 like <span class="QUOTE">"*.org"</span> or partial domain names. If a DNS name resolves to multiple IP
986 addresses, only the first one is used.</p>
987 <p>Some systems allow IPv4 clients to connect to IPv6 server sockets. Then the client's IPv4 address will
988 be translated by the system into IPv6 address space with special prefix ::ffff:0:0/96 (so called IPv4
989 mapped IPv6 address). <span class="APPLICATION">Privoxy</span> can handle it and maps such ACL addresses
991 <p>Denying access to particular sites by ACL may have undesired side effects if the site in question is
992 hosted on a machine which also hosts other sites (most sites are).</p>
996 <p>Explicitly define the default behavior if no ACL and <tt class="LITERAL">listen-address</tt> are set:
997 <span class="QUOTE">"localhost"</span> is OK. The absence of a <tt class=
998 "REPLACEABLE"><i>dst_addr</i></tt> implies that <span class="emphasis"><i class="EMPHASIS">all</i></span>
999 destination addresses are OK:</p>
1000 <table border="0" bgcolor="#E0E0E0" width="90%">
1003 <pre class="SCREEN"> permit-access localhost</pre>
1007 <p>Allow any host on the same class C subnet as www.privoxy.org access to nothing but www.example.com (or
1008 other domains hosted on the same system):</p>
1009 <table border="0" bgcolor="#E0E0E0" width="90%">
1012 <pre class="SCREEN"> permit-access www.privoxy.org/24 www.example.com/32</pre>
1016 <p>Allow access from any host on the 26-bit subnet 192.168.45.64 to anywhere, with the exception that
1017 192.168.45.73 may not access the IP address behind www.dirty-stuff.example.com:</p>
1018 <table border="0" bgcolor="#E0E0E0" width="90%">
1021 <pre class="SCREEN"> permit-access 192.168.45.64/26
1022 deny-access 192.168.45.73 www.dirty-stuff.example.com</pre>
1026 <p>Allow access from the IPv4 network 192.0.2.0/24 even if listening on an IPv6 wild card address (not
1027 supported on all platforms):</p>
1028 <table border="0" bgcolor="#E0E0E0" width="90%">
1031 <pre class="PROGRAMLISTING"> permit-access 192.0.2.0/24</pre>
1035 <p>This is equivalent to the following line even if listening on an IPv4 address (not supported on all
1037 <table border="0" bgcolor="#E0E0E0" width="90%">
1040 <pre class="PROGRAMLISTING"> permit-access [::ffff:192.0.2.0]/120</pre>
1049 <h4 class="SECT3"><a name="BUFFER-LIMIT" id="BUFFER-LIMIT">7.4.8. buffer-limit</a></h4>
1050 <div class="VARIABLELIST">
1054 <p>Maximum size of the buffer for content filtering.</p>
1056 <dt>Type of value:</dt>
1058 <p>Size in Kbytes</p>
1060 <dt>Default value:</dt>
1064 <dt>Effect if unset:</dt>
1066 <p>Use a 4MB (4096 KB) limit.</p>
1070 <p>For content filtering, i.e. the <tt class="LITERAL">+filter</tt> and <tt class=
1071 "LITERAL">+deanimate-gif</tt> actions, it is necessary that <span class="APPLICATION">Privoxy</span>
1072 buffers the entire document body. This can be potentially dangerous, since a server could just keep
1073 sending data indefinitely and wait for your RAM to exhaust -- with nasty consequences. Hence this
1075 <p>When a document buffer size reaches the <tt class="LITERAL">buffer-limit</tt>, it is flushed to the
1076 client unfiltered and no further attempt to filter the rest of the document is made. Remember that there
1077 may be multiple threads running, which might require up to <tt class="LITERAL">buffer-limit</tt> Kbytes
1078 <span class="emphasis"><i class="EMPHASIS">each</i></span>, unless you have enabled <span class=
1079 "QUOTE">"single-threaded"</span> above.</p>
1085 <h4 class="SECT3"><a name="ENABLE-PROXY-AUTHENTICATION-FORWARDING" id=
1086 "ENABLE-PROXY-AUTHENTICATION-FORWARDING">7.4.9. enable-proxy-authentication-forwarding</a></h4>
1087 <div class="VARIABLELIST">
1091 <p>Whether or not proxy authentication through <span class="APPLICATION">Privoxy</span> should work.</p>
1093 <dt>Type of value:</dt>
1097 <dt>Default value:</dt>
1101 <dt>Effect if unset:</dt>
1103 <p>Proxy authentication headers are removed.</p>
1107 <p>Privoxy itself does not support proxy authentication, but can allow clients to authenticate against
1108 Privoxy's parent proxy.</p>
1109 <p>By default Privoxy (3.0.21 and later) don't do that and remove Proxy-Authorization headers in requests
1110 and Proxy-Authenticate headers in responses to make it harder for malicious sites to trick inexperienced
1111 users into providing login information.</p>
1112 <p>If this option is enabled the headers are forwarded.</p>
1113 <p>Enabling this option is <span class="emphasis"><i class="EMPHASIS">not recommended</i></span> if there
1114 is no parent proxy that requires authentication or if the local network between Privoxy and the parent
1115 proxy isn't trustworthy. If proxy authentication is only required for some requests, it is recommended to
1116 use a client header filter to remove the authentication headers for requests where they aren't
1123 <h4 class="SECT3"><a name="TRUSTED-CGI-REFERER" id="TRUSTED-CGI-REFERER">7.4.10. trusted-cgi-referer</a></h4>
1124 <div class="VARIABLELIST">
1128 <p>A trusted website or webpage whose links can be followed to reach sensitive CGI pages</p>
1130 <dt>Type of value:</dt>
1132 <p>URL or URL prefix</p>
1134 <dt>Default value:</dt>
1138 <dt>Effect if unset:</dt>
1140 <p>No external pages are considered trusted referers.</p>
1144 <p>Before <span class="APPLICATION">Privoxy</span> accepts configuration changes through CGI pages like
1145 <a href="config.html#CLIENT-SPECIFIC-TAG">client-tags</a> or the <a href=
1146 "config.html#ENABLE-REMOTE-TOGGLE">remote toggle</a>, it checks the Referer header to see if the request
1147 comes from a trusted source.</p>
1148 <p>By default only the webinterface domains <a href="http://config.privoxy.org/" target=
1149 "_top">config.privoxy.org</a> and <a href="http://p.p/" target="_top">p.p</a> are considered trustworthy.
1150 Requests originating from other domains are rejected to prevent third-parties from modifiying Privoxy's
1151 state by e.g. embedding images that result in CGI requests.</p>
1152 <p>In some environments it may be desirable to embed links to CGI pages on external pages, for example on
1153 an Intranet homepage the Privoxy admin controls.</p>
1154 <p>The <span class="QUOTE">"trusted-cgi-referer"</span> option can be used to add that page, or the whole
1155 domain, as trusted source so the resulting requests aren't rejected. Requests are accepted if the
1156 specified trusted-cgi-refer is the prefix of the Referer.</p>
1157 <p>If the trusted source is supposed to access the CGI pages via JavaScript the <a href=
1158 "config.html#CORS-ALLOWED-ORIGIN">cors-allowed-origin</a> option can be used.</p>
1159 <div class="WARNING">
1160 <table class="WARNING" border="1" width="90%">
1162 <td align="center"><b>Warning</b></td>
1166 <p>Declaring pages the admin doesn't control trustworthy may allow malicious third parties to
1167 modify Privoxy's internal state against the user's wishes and without the user's knowledge.</p>
1177 <h4 class="SECT3"><a name="CORS-ALLOWED-ORIGIN" id="CORS-ALLOWED-ORIGIN">7.4.11. cors-allowed-origin</a></h4>
1178 <div class="VARIABLELIST">
1182 <p>A trusted website which can access <span class="APPLICATION">Privoxy</span>'s CGI pages through
1185 <dt>Type of value:</dt>
1189 <dt>Default value:</dt>
1193 <dt>Effect if unset:</dt>
1195 <p>No external sites get access via cross-origin resource sharing.</p>
1199 <p>Modern browsers by default prevent cross-origin requests made via JavaScript to <span class=
1200 "APPLICATION">Privoxy</span>'s CGI interface even if <span class="APPLICATION">Privoxy</span> would trust
1201 the referer because it's white listed via the <a href=
1202 "config.html#TRUSTED-CGI-REFERER">trusted-cgi-referer</a> directive.</p>
1203 <p><a href="https://en.wikipedia.org/wiki/Cross-origin_resource_sharing" target="_top">Cross-origin
1204 resource sharing (CORS)</a> is a mechanism to allow cross-origin requests.</p>
1205 <p>The <span class="QUOTE">"cors-allowed-origin"</span> option can be used to specify a domain that is
1206 allowed to make requests to Privoxy CGI interface via JavaScript. It is used in combination with the
1207 <a href="config.html#TRUSTED-CGI-REFERER">trusted-cgi-referer</a> directive.</p>
1208 <div class="WARNING">
1209 <table class="WARNING" border="1" width="90%">
1211 <td align="center"><b>Warning</b></td>
1215 <p>Declaring domains the admin doesn't control trustworthy may allow malicious third parties to
1216 modify Privoxy's internal state against the user's wishes and without the user's knowledge.</p>
1227 <h2 class="SECT2"><a name="FORWARDING" id="FORWARDING">7.5. Forwarding</a></h2>
1228 <p>This feature allows routing of HTTP requests through a chain of multiple proxies.</p>
1229 <p>Forwarding can be used to chain Privoxy with a caching proxy to speed up browsing. Using a parent proxy may
1230 also be necessary if the machine that <span class="APPLICATION">Privoxy</span> runs on has no direct Internet
1232 <p>Note that parent proxies can severely decrease your privacy level. For example a parent proxy could add your
1233 IP address to the request headers and if it's a caching proxy it may add the <span class="QUOTE">"Etag"</span>
1234 header to revalidation requests again, even though you configured Privoxy to remove it. It may also ignore
1235 Privoxy's header time randomization and use the original values which could be used by the server as cookie
1236 replacement to track your steps between visits.</p>
1237 <p>Also specified here are SOCKS proxies. <span class="APPLICATION">Privoxy</span> supports the SOCKS 4 and SOCKS
1240 <h4 class="SECT3"><a name="FORWARD" id="FORWARD">7.5.1. forward</a></h4>
1241 <div class="VARIABLELIST">
1245 <p>To which parent HTTP proxy specific requests should be routed.</p>
1247 <dt>Type of value:</dt>
1249 <p><tt class="REPLACEABLE"><i>target_pattern</i></tt> <tt class=
1250 "REPLACEABLE"><i>http_parent</i></tt>[:<tt class="REPLACEABLE"><i>port</i></tt>]</p>
1251 <p>where <tt class="REPLACEABLE"><i>target_pattern</i></tt> is a <a href=
1252 "actions-file.html#AF-PATTERNS">URL pattern</a> that specifies to which requests (i.e. URLs) this forward
1253 rule shall apply. Use <tt class="LITERAL">/</tt> to denote <span class="QUOTE">"all URLs"</span>.
1254 <tt class="REPLACEABLE"><i>http_parent</i></tt>[:<tt class="REPLACEABLE"><i>port</i></tt>] is the DNS
1255 name or IP address of the parent HTTP proxy through which the requests should be forwarded, optionally
1256 followed by its listening port (default: 8000). Use a single dot (<tt class="LITERAL">.</tt>) to denote
1257 <span class="QUOTE">"no forwarding"</span>.</p>
1259 <dt>Default value:</dt>
1261 <p><span class="emphasis"><i class="EMPHASIS">Unset</i></span></p>
1263 <dt>Effect if unset:</dt>
1265 <p>Don't use parent HTTP proxies.</p>
1269 <p>If <tt class="REPLACEABLE"><i>http_parent</i></tt> is <span class="QUOTE">"."</span>, then requests
1270 are not forwarded to another HTTP proxy but are made directly to the web servers.</p>
1271 <p><tt class="REPLACEABLE"><i>http_parent</i></tt> can be a numerical IPv6 address (if <a href=
1272 "http://tools.ietf.org/html/rfc3493" target="_top">RFC 3493</a> is implemented). To prevent clashes with
1273 the port delimiter, the whole IP address has to be put into brackets. On the other hand a <tt class=
1274 "REPLACEABLE"><i>target_pattern</i></tt> containing an IPv6 address has to be put into angle brackets
1275 (normal brackets are reserved for regular expressions already).</p>
1276 <p>Multiple lines are OK, they are checked in sequence, and the last match wins.</p>
1280 <p>Everything goes to an example parent proxy, except SSL on port 443 (which it doesn't handle):</p>
1281 <table border="0" bgcolor="#E0E0E0" width="90%">
1284 <pre class="SCREEN"> forward / parent-proxy.example.org:8080
1285 forward :443 .</pre>
1289 <p>Everything goes to our example ISP's caching proxy, except for requests to that ISP's sites:</p>
1290 <table border="0" bgcolor="#E0E0E0" width="90%">
1293 <pre class="SCREEN"> forward / caching-proxy.isp.example.net:8000
1294 forward .isp.example.net .</pre>
1298 <p>Parent proxy specified by an IPv6 address:</p>
1299 <table border="0" bgcolor="#E0E0E0" width="90%">
1302 <pre class="PROGRAMLISTING"> forward / [2001:DB8::1]:8000</pre>
1306 <p>Suppose your parent proxy doesn't support IPv6:</p>
1307 <table border="0" bgcolor="#E0E0E0" width="90%">
1310 <pre class="PROGRAMLISTING"> forward / parent-proxy.example.org:8000
1311 forward ipv6-server.example.org .
1312 forward <[2-3][0-9a-f][0-9a-f][0-9a-f]:*> .</pre>
1321 <h4 class="SECT3"><a name="SOCKS" id="SOCKS">7.5.2. forward-socks4, forward-socks4a, forward-socks5 and
1322 forward-socks5t</a></h4><a name="FORWARD-SOCKS4" id="FORWARD-SOCKS4"></a><a name="FORWARD-SOCKS4A" id=
1323 "FORWARD-SOCKS4A"></a>
1324 <div class="VARIABLELIST">
1328 <p>Through which SOCKS proxy (and optionally to which parent HTTP proxy) specific requests should be
1331 <dt>Type of value:</dt>
1333 <p><tt class="REPLACEABLE"><i>target_pattern</i></tt> <tt class=
1334 "REPLACEABLE"><i>socks_proxy</i></tt>[:<tt class="REPLACEABLE"><i>port</i></tt>] <tt class=
1335 "REPLACEABLE"><i>http_parent</i></tt>[:<tt class="REPLACEABLE"><i>port</i></tt>]</p>
1336 <p>where <tt class="REPLACEABLE"><i>target_pattern</i></tt> is a <a href=
1337 "actions-file.html#AF-PATTERNS">URL pattern</a> that specifies to which requests (i.e. URLs) this forward
1338 rule shall apply. Use <tt class="LITERAL">/</tt> to denote <span class="QUOTE">"all URLs"</span>.
1339 <tt class="REPLACEABLE"><i>http_parent</i></tt> and <tt class="REPLACEABLE"><i>socks_proxy</i></tt> are
1340 IP addresses in dotted decimal notation or valid DNS names (<tt class=
1341 "REPLACEABLE"><i>http_parent</i></tt> may be <span class="QUOTE">"."</span> to denote <span class=
1342 "QUOTE">"no HTTP forwarding"</span>), and the optional <tt class="REPLACEABLE"><i>port</i></tt>
1343 parameters are TCP ports, i.e. integer values from 1 to 65535</p>
1345 <dt>Default value:</dt>
1347 <p><span class="emphasis"><i class="EMPHASIS">Unset</i></span></p>
1349 <dt>Effect if unset:</dt>
1351 <p>Don't use SOCKS proxies.</p>
1355 <p>Multiple lines are OK, they are checked in sequence, and the last match wins.</p>
1356 <p>The difference between <tt class="LITERAL">forward-socks4</tt> and <tt class=
1357 "LITERAL">forward-socks4a</tt> is that in the SOCKS 4A protocol, the DNS resolution of the target
1358 hostname happens on the SOCKS server, while in SOCKS 4 it happens locally.</p>
1359 <p>With <tt class="LITERAL">forward-socks5</tt> the DNS resolution will happen on the remote server as
1361 <p><tt class="LITERAL">forward-socks5t</tt> works like vanilla <tt class="LITERAL">forward-socks5</tt>
1362 but lets <span class="APPLICATION">Privoxy</span> additionally use Tor-specific SOCKS extensions.
1363 Currently the only supported SOCKS extension is optimistic data which can reduce the latency for the
1364 first request made on a newly created connection.</p>
1365 <p><tt class="REPLACEABLE"><i>socks_proxy</i></tt> and <tt class="REPLACEABLE"><i>http_parent</i></tt>
1366 can be a numerical IPv6 address (if <a href="http://tools.ietf.org/html/rfc3493" target="_top">RFC
1367 3493</a> is implemented). To prevent clashes with the port delimiter, the whole IP address has to be put
1368 into brackets. On the other hand a <tt class="REPLACEABLE"><i>target_pattern</i></tt> containing an IPv6
1369 address has to be put into angle brackets (normal brackets are reserved for regular expressions
1371 <p>If <tt class="REPLACEABLE"><i>http_parent</i></tt> is <span class="QUOTE">"."</span>, then requests
1372 are not forwarded to another HTTP proxy but are made (HTTP-wise) directly to the web servers, albeit
1373 through a SOCKS proxy.</p>
1377 <p>From the company example.com, direct connections are made to all <span class="QUOTE">"internal"</span>
1378 domains, but everything outbound goes through their ISP's proxy by way of example.com's corporate SOCKS
1379 4A gateway to the Internet.</p>
1380 <table border="0" bgcolor="#E0E0E0" width="90%">
1383 <pre class="SCREEN">
1384 forward-socks4a / socks-gw.example.com:1080 www-cache.isp.example.net:8080
1385 forward .example.com .</pre>
1389 <p>A rule that uses a SOCKS 4 gateway for all destinations but no HTTP parent looks like this:</p>
1390 <table border="0" bgcolor="#E0E0E0" width="90%">
1393 <pre class="SCREEN"> forward-socks4 / socks-gw.example.com:1080 .</pre>
1397 <p>To chain Privoxy and Tor, both running on the same system, you would use something like:</p>
1398 <table border="0" bgcolor="#E0E0E0" width="90%">
1401 <pre class="SCREEN"> forward-socks5t / 127.0.0.1:9050 .</pre>
1405 <p>Note that if you got Tor through one of the bundles, you may have to change the port from 9050 to 9150
1406 (or even another one). For details, please check the documentation on the <a href=
1407 "https://torproject.org/" target="_top">Tor website</a>.</p>
1408 <p>The public <span class="APPLICATION">Tor</span> network can't be used to reach your local network, if
1409 you need to access local servers you therefore might want to make some exceptions:</p>
1410 <table border="0" bgcolor="#E0E0E0" width="90%">
1413 <pre class="SCREEN"> forward 192.168.*.*/ .
1415 forward 127.*.*.*/ .</pre>
1419 <p>Unencrypted connections to systems in these address ranges will be as (un)secure as the local network
1420 is, but the alternative is that you can't reach the local network through <span class=
1421 "APPLICATION">Privoxy</span> at all. Of course this may actually be desired and there is no reason to
1422 make these exceptions if you aren't sure you need them.</p>
1423 <p>If you also want to be able to reach servers in your local network by using their names, you will need
1424 additional exceptions that look like this:</p>
1425 <table border="0" bgcolor="#E0E0E0" width="90%">
1428 <pre class="SCREEN"> forward localhost/ .</pre>
1437 <h4 class="SECT3"><a name="ADVANCED-FORWARDING-EXAMPLES" id="ADVANCED-FORWARDING-EXAMPLES">7.5.3. Advanced
1438 Forwarding Examples</a></h4>
1439 <p>If you have links to multiple ISPs that provide various special content only to their subscribers, you can
1440 configure multiple <span class="APPLICATION">Privoxies</span> which have connections to the respective ISPs to
1441 act as forwarders to each other, so that <span class="emphasis"><i class="EMPHASIS">your</i></span> users can
1442 see the internal content of all ISPs.</p>
1443 <p>Assume that host-a has a PPP connection to isp-a.example.net. And host-b has a PPP connection to
1444 isp-b.example.org. Both run <span class="APPLICATION">Privoxy</span>. Their forwarding configuration can look
1447 <table border="0" bgcolor="#E0E0E0" width="100%">
1450 <pre class="SCREEN"> forward / .
1451 forward .isp-b.example.net host-b:8118</pre>
1456 <table border="0" bgcolor="#E0E0E0" width="100%">
1459 <pre class="SCREEN"> forward / .
1460 forward .isp-a.example.org host-a:8118</pre>
1464 <p>Now, your users can set their browser's proxy to use either host-a or host-b and be able to browse the
1465 internal content of both isp-a and isp-b.</p>
1466 <p>If you intend to chain <span class="APPLICATION">Privoxy</span> and <span class="APPLICATION">squid</span>
1467 locally, then chaining as <tt class="LITERAL">browser -> squid -> privoxy</tt> is the recommended
1469 <p>Assuming that <span class="APPLICATION">Privoxy</span> and <span class="APPLICATION">squid</span> run on the
1470 same box, your <span class="APPLICATION">squid</span> configuration could then look like this:</p>
1471 <table border="0" bgcolor="#E0E0E0" width="100%">
1474 <pre class="SCREEN"> # Define Privoxy as parent proxy (without ICP)
1475 cache_peer 127.0.0.1 parent 8118 7 no-query
1477 # Define ACL for protocol FTP
1480 # Do not forward FTP requests to Privoxy
1481 always_direct allow ftp
1483 # Forward all the rest to Privoxy
1484 never_direct allow all</pre>
1488 <p>You would then need to change your browser's proxy settings to <span class="APPLICATION">squid</span>'s
1489 address and port. Squid normally uses port 3128. If unsure consult <tt class="LITERAL">http_port</tt> in
1490 <tt class="FILENAME">squid.conf</tt>.</p>
1491 <p>You could just as well decide to only forward requests you suspect of leading to Windows executables through
1492 a virus-scanning parent proxy, say, on <tt class="LITERAL">antivir.example.com</tt>, port 8010:</p>
1493 <table border="0" bgcolor="#E0E0E0" width="100%">
1496 <pre class="SCREEN"> forward / .
1497 forward /.*\.(exe|com|dll|zip)$ antivir.example.com:8010</pre>
1503 <h4 class="SECT3"><a name="FORWARDED-CONNECT-RETRIES" id="FORWARDED-CONNECT-RETRIES">7.5.4.
1504 forwarded-connect-retries</a></h4>
1505 <div class="VARIABLELIST">
1509 <p>How often Privoxy retries if a forwarded connection request fails.</p>
1511 <dt>Type of value:</dt>
1513 <p><tt class="REPLACEABLE"><i>Number of retries.</i></tt></p>
1515 <dt>Default value:</dt>
1517 <p><span class="emphasis"><i class="EMPHASIS">0</i></span></p>
1519 <dt>Effect if unset:</dt>
1521 <p>Connections forwarded through other proxies are treated like direct connections and no retry attempts
1526 <p><tt class="REPLACEABLE"><i>forwarded-connect-retries</i></tt> is mainly interesting for socks4a
1527 connections, where <span class="APPLICATION">Privoxy</span> can't detect why the connections failed. The
1528 connection might have failed because of a DNS timeout in which case a retry makes sense, but it might
1529 also have failed because the server doesn't exist or isn't reachable. In this case the retry will just
1530 delay the appearance of Privoxy's error message.</p>
1531 <p>Note that in the context of this option, <span class="QUOTE">"forwarded connections"</span> includes
1532 all connections that Privoxy forwards through other proxies. This option is not limited to the HTTP
1534 <p>Only use this option, if you are getting lots of forwarding-related error messages that go away when
1535 you try again manually. Start with a small value and check Privoxy's logfile from time to time, to see
1536 how many retries are usually needed.</p>
1540 <p>forwarded-connect-retries 1</p>
1547 <h2 class="SECT2"><a name="MISC" id="MISC">7.6. Miscellaneous</a></h2>
1549 <h4 class="SECT3"><a name="ACCEPT-INTERCEPTED-REQUESTS" id="ACCEPT-INTERCEPTED-REQUESTS">7.6.1.
1550 accept-intercepted-requests</a></h4>
1551 <div class="VARIABLELIST">
1555 <p>Whether intercepted requests should be treated as valid.</p>
1557 <dt>Type of value:</dt>
1559 <p><tt class="REPLACEABLE"><i>0 or 1</i></tt></p>
1561 <dt>Default value:</dt>
1563 <p><span class="emphasis"><i class="EMPHASIS">0</i></span></p>
1565 <dt>Effect if unset:</dt>
1567 <p>Only proxy requests are accepted, intercepted requests are treated as invalid.</p>
1571 <p>If you don't trust your clients and want to force them to use <span class=
1572 "APPLICATION">Privoxy</span>, enable this option and configure your packet filter to redirect outgoing
1573 HTTP connections into <span class="APPLICATION">Privoxy</span>.</p>
1574 <p>Note that intercepting encrypted connections (HTTPS) isn't supported.</p>
1575 <p>Make sure that <span class="APPLICATION">Privoxy's</span> own requests aren't redirected as well.
1576 Additionally take care that <span class="APPLICATION">Privoxy</span> can't intentionally connect to
1577 itself, otherwise you could run into redirection loops if <span class="APPLICATION">Privoxy's</span>
1578 listening port is reachable by the outside or an attacker has access to the pages you visit.</p>
1579 <p>If you are running Privoxy as intercepting proxy without being able to intercept all client requests
1580 you may want to adjust the CGI templates to make sure they don't reference content from
1581 config.privoxy.org.</p>
1585 <p>accept-intercepted-requests 1</p>
1591 <h4 class="SECT3"><a name="ALLOW-CGI-REQUEST-CRUNCHING" id="ALLOW-CGI-REQUEST-CRUNCHING">7.6.2.
1592 allow-cgi-request-crunching</a></h4>
1593 <div class="VARIABLELIST">
1597 <p>Whether requests to <span class="APPLICATION">Privoxy's</span> CGI pages can be blocked or
1600 <dt>Type of value:</dt>
1602 <p><tt class="REPLACEABLE"><i>0 or 1</i></tt></p>
1604 <dt>Default value:</dt>
1606 <p><span class="emphasis"><i class="EMPHASIS">0</i></span></p>
1608 <dt>Effect if unset:</dt>
1610 <p><span class="APPLICATION">Privoxy</span> ignores block and redirect actions for its CGI pages.</p>
1614 <p>By default <span class="APPLICATION">Privoxy</span> ignores block or redirect actions for its CGI
1615 pages. Intercepting these requests can be useful in multi-user setups to implement fine-grained access
1616 control, but it can also render the complete web interface useless and make debugging problems painful if
1617 done without care.</p>
1618 <p>Don't enable this option unless you're sure that you really need it.</p>
1622 <p>allow-cgi-request-crunching 1</p>
1628 <h4 class="SECT3"><a name="SPLIT-LARGE-FORMS" id="SPLIT-LARGE-FORMS">7.6.3. split-large-forms</a></h4>
1629 <div class="VARIABLELIST">
1633 <p>Whether the CGI interface should stay compatible with broken HTTP clients.</p>
1635 <dt>Type of value:</dt>
1637 <p><tt class="REPLACEABLE"><i>0 or 1</i></tt></p>
1639 <dt>Default value:</dt>
1641 <p><span class="emphasis"><i class="EMPHASIS">0</i></span></p>
1643 <dt>Effect if unset:</dt>
1645 <p>The CGI form generate long GET URLs.</p>
1649 <p><span class="APPLICATION">Privoxy's</span> CGI forms can lead to rather long URLs. This isn't a
1650 problem as far as the HTTP standard is concerned, but it can confuse clients with arbitrary URL length
1652 <p>Enabling split-large-forms causes <span class="APPLICATION">Privoxy</span> to divide big forms into
1653 smaller ones to keep the URL length down. It makes editing a lot less convenient and you can no longer
1654 submit all changes at once, but at least it works around this browser bug.</p>
1655 <p>If you don't notice any editing problems, there is no reason to enable this option, but if one of the
1656 submit buttons appears to be broken, you should give it a try.</p>
1660 <p>split-large-forms 1</p>
1666 <h4 class="SECT3"><a name="KEEP-ALIVE-TIMEOUT" id="KEEP-ALIVE-TIMEOUT">7.6.4. keep-alive-timeout</a></h4>
1667 <div class="VARIABLELIST">
1671 <p>Number of seconds after which an open connection will no longer be reused.</p>
1673 <dt>Type of value:</dt>
1675 <p><tt class="REPLACEABLE"><i>Time in seconds.</i></tt></p>
1677 <dt>Default value:</dt>
1681 <dt>Effect if unset:</dt>
1683 <p>Connections are not kept alive.</p>
1687 <p>This option allows clients to keep the connection to <span class="APPLICATION">Privoxy</span> alive.
1688 If the server supports it, <span class="APPLICATION">Privoxy</span> will keep the connection to the
1689 server alive as well. Under certain circumstances this may result in speed-ups.</p>
1690 <p>By default, <span class="APPLICATION">Privoxy</span> will close the connection to the server if the
1691 client connection gets closed, or if the specified timeout has been reached without a new request coming
1692 in. This behaviour can be changed with the <a href="#CONNECTION-SHARING" target=
1693 "_top">connection-sharing</a> option.</p>
1694 <p>This option has no effect if <span class="APPLICATION">Privoxy</span> has been compiled without
1695 keep-alive support.</p>
1696 <p>Note that a timeout of five seconds as used in the default configuration file significantly decreases
1697 the number of connections that will be reused. The value is used because some browsers limit the number
1698 of connections they open to a single host and apply the same limit to proxies. This can result in a
1699 single website <span class="QUOTE">"grabbing"</span> all the connections the browser allows, which means
1700 connections to other websites can't be opened until the connections currently in use time out.</p>
1701 <p>Several users have reported this as a Privoxy bug, so the default value has been reduced. Consider
1702 increasing it to 300 seconds or even more if you think your browser can handle it. If your browser
1703 appears to be hanging, it probably can't.</p>
1707 <p>keep-alive-timeout 300</p>
1713 <h4 class="SECT3"><a name="TOLERATE-PIPELINING" id="TOLERATE-PIPELINING">7.6.5. tolerate-pipelining</a></h4>
1714 <div class="VARIABLELIST">
1718 <p>Whether or not pipelined requests should be served.</p>
1720 <dt>Type of value:</dt>
1722 <p><tt class="REPLACEABLE"><i>0 or 1.</i></tt></p>
1724 <dt>Default value:</dt>
1728 <dt>Effect if unset:</dt>
1730 <p>If Privoxy receives more than one request at once, it terminates the client connection after serving
1735 <p><span class="APPLICATION">Privoxy</span> currently doesn't pipeline outgoing requests, thus allowing
1736 pipelining on the client connection is not guaranteed to improve the performance.</p>
1737 <p>By default <span class="APPLICATION">Privoxy</span> tries to discourage clients from pipelining by
1738 discarding aggressively pipelined requests, which forces the client to resend them through a new
1740 <p>This option lets <span class="APPLICATION">Privoxy</span> tolerate pipelining. Whether or not that
1741 improves performance mainly depends on the client configuration.</p>
1742 <p>If you are seeing problems with pages not properly loading, disabling this option could work around
1747 <p>tolerate-pipelining 1</p>
1753 <h4 class="SECT3"><a name="DEFAULT-SERVER-TIMEOUT" id="DEFAULT-SERVER-TIMEOUT">7.6.6.
1754 default-server-timeout</a></h4>
1755 <div class="VARIABLELIST">
1759 <p>Assumed server-side keep-alive timeout if not specified by the server.</p>
1761 <dt>Type of value:</dt>
1763 <p><tt class="REPLACEABLE"><i>Time in seconds.</i></tt></p>
1765 <dt>Default value:</dt>
1769 <dt>Effect if unset:</dt>
1771 <p>Connections for which the server didn't specify the keep-alive timeout are not reused.</p>
1775 <p>Enabling this option significantly increases the number of connections that are reused, provided the
1776 <a href="#KEEP-ALIVE-TIMEOUT" target="_top">keep-alive-timeout</a> option is also enabled.</p>
1777 <p>While it also increases the number of connections problems when <span class=
1778 "APPLICATION">Privoxy</span> tries to reuse a connection that already has been closed on the server side,
1779 or is closed while <span class="APPLICATION">Privoxy</span> is trying to reuse it, this should only be a
1780 problem if it happens for the first request sent by the client. If it happens for requests on reused
1781 client connections, <span class="APPLICATION">Privoxy</span> will simply close the connection and the
1782 client is supposed to retry the request without bothering the user.</p>
1783 <p>Enabling this option is therefore only recommended if the <a href="#CONNECTION-SHARING" target=
1784 "_top">connection-sharing</a> option is disabled.</p>
1785 <p>It is an error to specify a value larger than the <a href="#KEEP-ALIVE-TIMEOUT" target=
1786 "_top">keep-alive-timeout</a> value.</p>
1787 <p>This option has no effect if <span class="APPLICATION">Privoxy</span> has been compiled without
1788 keep-alive support.</p>
1792 <p>default-server-timeout 60</p>
1798 <h4 class="SECT3"><a name="CONNECTION-SHARING" id="CONNECTION-SHARING">7.6.7. connection-sharing</a></h4>
1799 <div class="VARIABLELIST">
1803 <p>Whether or not outgoing connections that have been kept alive should be shared between different
1804 incoming connections.</p>
1806 <dt>Type of value:</dt>
1808 <p><tt class="REPLACEABLE"><i>0 or 1</i></tt></p>
1810 <dt>Default value:</dt>
1814 <dt>Effect if unset:</dt>
1816 <p>Connections are not shared.</p>
1820 <p>This option has no effect if <span class="APPLICATION">Privoxy</span> has been compiled without
1821 keep-alive support, or if it's disabled.</p>
1825 <p>Note that reusing connections doesn't necessary cause speedups. There are also a few privacy
1826 implications you should be aware of.</p>
1827 <p>If this option is effective, outgoing connections are shared between clients (if there are more than
1828 one) and closing the browser that initiated the outgoing connection does no longer affect the connection
1829 between <span class="APPLICATION">Privoxy</span> and the server unless the client's request hasn't been
1831 <p>If the outgoing connection is idle, it will not be closed until either <span class=
1832 "APPLICATION">Privoxy's</span> or the server's timeout is reached. While it's open, the server knows that
1833 the system running <span class="APPLICATION">Privoxy</span> is still there.</p>
1834 <p>If there are more than one client (maybe even belonging to multiple users), they will be able to reuse
1835 each others connections. This is potentially dangerous in case of authentication schemes like NTLM where
1836 only the connection is authenticated, instead of requiring authentication for each request.</p>
1837 <p>If there is only a single client, and if said client can keep connections alive on its own, enabling
1838 this option has next to no effect. If the client doesn't support connection keep-alive, enabling this
1839 option may make sense as it allows <span class="APPLICATION">Privoxy</span> to keep outgoing connections
1840 alive even if the client itself doesn't support it.</p>
1841 <p>You should also be aware that enabling this option increases the likelihood of getting the "No server
1842 or forwarder data" error message, especially if you are using a slow connection to the Internet.</p>
1843 <p>This option should only be used by experienced users who understand the risks and can weight them
1844 against the benefits.</p>
1848 <p>connection-sharing 1</p>
1854 <h4 class="SECT3"><a name="SOCKET-TIMEOUT" id="SOCKET-TIMEOUT">7.6.8. socket-timeout</a></h4>
1855 <div class="VARIABLELIST">
1859 <p>Number of seconds after which a socket times out if no data is received.</p>
1861 <dt>Type of value:</dt>
1863 <p><tt class="REPLACEABLE"><i>Time in seconds.</i></tt></p>
1865 <dt>Default value:</dt>
1869 <dt>Effect if unset:</dt>
1871 <p>A default value of 300 seconds is used.</p>
1875 <p>The default is quite high and you probably want to reduce it. If you aren't using an occasionally slow
1876 proxy like Tor, reducing it to a few seconds should be fine.</p>
1880 <p>socket-timeout 300</p>
1886 <h4 class="SECT3"><a name="MAX-CLIENT-CONNECTIONS" id="MAX-CLIENT-CONNECTIONS">7.6.9.
1887 max-client-connections</a></h4>
1888 <div class="VARIABLELIST">
1892 <p>Maximum number of client connections that will be served.</p>
1894 <dt>Type of value:</dt>
1896 <p><tt class="REPLACEABLE"><i>Positive number.</i></tt></p>
1898 <dt>Default value:</dt>
1902 <dt>Effect if unset:</dt>
1904 <p>Connections are served until a resource limit is reached.</p>
1908 <p><span class="APPLICATION">Privoxy</span> creates one thread (or process) for every incoming client
1909 connection that isn't rejected based on the access control settings.</p>
1910 <p>If the system is powerful enough, <span class="APPLICATION">Privoxy</span> can theoretically deal with
1911 several hundred (or thousand) connections at the same time, but some operating systems enforce resource
1912 limits by shutting down offending processes and their default limits may be below the ones <span class=
1913 "APPLICATION">Privoxy</span> would require under heavy load.</p>
1914 <p>Configuring <span class="APPLICATION">Privoxy</span> to enforce a connection limit below the thread or
1915 process limit used by the operating system makes sure this doesn't happen. Simply increasing the
1916 operating system's limit would work too, but if <span class="APPLICATION">Privoxy</span> isn't the only
1917 application running on the system, you may actually want to limit the resources used by <span class=
1918 "APPLICATION">Privoxy</span>.</p>
1919 <p>If <span class="APPLICATION">Privoxy</span> is only used by a single trusted user, limiting the number
1920 of client connections is probably unnecessary. If there are multiple possibly untrusted users you
1921 probably still want to additionally use a packet filter to limit the maximal number of incoming
1922 connections per client. Otherwise a malicious user could intentionally create a high number of
1923 connections to prevent other users from using <span class="APPLICATION">Privoxy</span>.</p>
1924 <p>Obviously using this option only makes sense if you choose a limit below the one enforced by the
1925 operating system.</p>
1926 <p>One most POSIX-compliant systems <span class="APPLICATION">Privoxy</span> can't properly deal with
1927 more than FD_SETSIZE file descriptors at the same time and has to reject connections if the limit is
1928 reached. This will likely change in a future version, but currently this limit can't be increased without
1929 recompiling <span class="APPLICATION">Privoxy</span> with a different FD_SETSIZE limit.</p>
1933 <p>max-client-connections 256</p>
1939 <h4 class="SECT3"><a name="LISTEN-BACKLOG" id="LISTEN-BACKLOG">7.6.10. listen-backlog</a></h4>
1940 <div class="VARIABLELIST">
1944 <p>Connection queue length requested from the operating system.</p>
1946 <dt>Type of value:</dt>
1948 <p><tt class="REPLACEABLE"><i>Number.</i></tt></p>
1950 <dt>Default value:</dt>
1954 <dt>Effect if unset:</dt>
1956 <p>A connection queue length of 128 is requested from the operating system.</p>
1960 <p>Under high load incoming connection may queue up before Privoxy gets around to serve them. The queue
1961 length is limitted by the operating system. Once the queue is full, additional connections are dropped
1962 before Privoxy can accept and serve them.</p>
1963 <p>Increasing the queue length allows Privoxy to accept more incomming connections that arrive roughly at
1965 <p>Note that Privoxy can only request a certain queue length, whether or not the requested length is
1966 actually used depends on the operating system which may use a different length instead.</p>
1967 <p>On many operating systems a limit of -1 can be specified to instruct the operating system to use the
1968 maximum queue length allowed. Check the listen man page to see if your platform allows this.</p>
1969 <p>On some platforms you can use "netstat -Lan -p tcp" to see the effective queue length.</p>
1970 <p>Effectively using a value above 128 usually requires changing the system configuration as well. On
1971 FreeBSD-based system the limit is controlled by the kern.ipc.soacceptqueue sysctl.</p>
1975 <p>listen-backlog 4096</p>
1981 <h4 class="SECT3"><a name="ENABLE-ACCEPT-FILTER" id="ENABLE-ACCEPT-FILTER">7.6.11.
1982 enable-accept-filter</a></h4>
1983 <div class="VARIABLELIST">
1987 <p>Whether or not Privoxy should use an accept filter</p>
1989 <dt>Type of value:</dt>
1991 <p><tt class="REPLACEABLE"><i>0 or 1</i></tt></p>
1993 <dt>Default value:</dt>
1997 <dt>Effect if unset:</dt>
1999 <p>No accept filter is enabled.</p>
2003 <p>Accept filters reduce the number of context switches by not passing sockets for new connections to
2004 Privoxy until a complete HTTP request is available.</p>
2005 <p>As a result, Privoxy can process the whole request right away without having to wait for additional
2007 <p>For this option to work, Privoxy has to be compiled with FEATURE_ACCEPT_FILTER and the operating
2008 system has to support it (which may require loading a kernel module).</p>
2009 <p>Currently accept filters are only supported on FreeBSD-based systems. Check the <a href=
2010 "https://www.freebsd.org/cgi/man.cgi?query=accf_http" target="_top">accf_http(9) man page</a> to learn
2011 how to enable the support in the operating system.</p>
2015 <p>enable-accept-filter 1</p>
2021 <h4 class="SECT3"><a name="HANDLE-AS-EMPTY-DOC-RETURNS-OK" id="HANDLE-AS-EMPTY-DOC-RETURNS-OK">7.6.12.
2022 handle-as-empty-doc-returns-ok</a></h4>
2023 <div class="VARIABLELIST">
2027 <p>The status code Privoxy returns for pages blocked with <tt class="LITERAL"><a href=
2028 "actions-file.html#HANDLE-AS-EMPTY-DOCUMENT" target="_top">+handle-as-empty-document</a></tt>.</p>
2030 <dt>Type of value:</dt>
2032 <p><tt class="REPLACEABLE"><i>0 or 1</i></tt></p>
2034 <dt>Default value:</dt>
2038 <dt>Effect if unset:</dt>
2040 <p>Privoxy returns a status 403(forbidden) for all blocked pages.</p>
2042 <dt>Effect if set:</dt>
2044 <p>Privoxy returns a status 200(OK) for pages blocked with +handle-as-empty-document and a status
2045 403(Forbidden) for all other blocked pages.</p>
2049 <p>This directive was added as a work-around for Firefox bug 492459: <span class="QUOTE">"Websites are no
2050 longer rendered if SSL requests for JavaScripts are blocked by a proxy."</span> ( <a href=
2051 "https://bugzilla.mozilla.org/show_bug.cgi?id=492459" target=
2052 "_top">https://bugzilla.mozilla.org/show_bug.cgi?id=492459</a>), the bug has been fixed for quite some
2053 time, but this directive is also useful to make it harder for websites to detect whether or not resources
2054 are being blocked.</p>
2060 <h4 class="SECT3"><a name="ENABLE-COMPRESSION" id="ENABLE-COMPRESSION">7.6.13. enable-compression</a></h4>
2061 <div class="VARIABLELIST">
2065 <p>Whether or not buffered content is compressed before delivery.</p>
2067 <dt>Type of value:</dt>
2069 <p><tt class="REPLACEABLE"><i>0 or 1</i></tt></p>
2071 <dt>Default value:</dt>
2075 <dt>Effect if unset:</dt>
2077 <p>Privoxy does not compress buffered content.</p>
2079 <dt>Effect if set:</dt>
2081 <p>Privoxy compresses buffered content before delivering it to the client, provided the client supports
2086 <p>This directive is only supported if Privoxy has been compiled with FEATURE_COMPRESSION, which should
2087 not to be confused with FEATURE_ZLIB.</p>
2088 <p>Compressing buffered content is mainly useful if Privoxy and the client are running on different
2089 systems. If they are running on the same system, enabling compression is likely to slow things down. If
2090 you didn't measure otherwise, you should assume that it does and keep this option disabled.</p>
2091 <p>Privoxy will not compress buffered content below a certain length.</p>
2097 <h4 class="SECT3"><a name="COMPRESSION-LEVEL" id="COMPRESSION-LEVEL">7.6.14. compression-level</a></h4>
2098 <div class="VARIABLELIST">
2102 <p>The compression level that is passed to the zlib library when compressing buffered content.</p>
2104 <dt>Type of value:</dt>
2106 <p><tt class="REPLACEABLE"><i>Positive number ranging from 0 to 9.</i></tt></p>
2108 <dt>Default value:</dt>
2114 <p>Compressing the data more takes usually longer than compressing it less or not compressing it at all.
2115 Which level is best depends on the connection between Privoxy and the client. If you can't be bothered to
2116 benchmark it for yourself, you should stick with the default and keep compression disabled.</p>
2117 <p>If compression is disabled, the compression level is irrelevant.</p>
2121 <table border="0" bgcolor="#E0E0E0" width="90%">
2124 <pre class="SCREEN"> # Best speed (compared to the other levels)
2130 # No compression. Only useful for testing as the added header
2131 # slightly increases the amount of data that has to be sent.
2132 # If your benchmark shows that using this compression level
2133 # is superior to using no compression at all, the benchmark
2134 # is likely to be flawed.
2135 compression-level 0</pre>
2144 <h4 class="SECT3"><a name="CLIENT-HEADER-ORDER" id="CLIENT-HEADER-ORDER">7.6.15. client-header-order</a></h4>
2145 <div class="VARIABLELIST">
2149 <p>The order in which client headers are sorted before forwarding them.</p>
2151 <dt>Type of value:</dt>
2153 <p><tt class="REPLACEABLE"><i>Client header names delimited by spaces or tabs</i></tt></p>
2155 <dt>Default value:</dt>
2161 <p>By default <span class="APPLICATION">Privoxy</span> leaves the client headers in the order they were
2162 sent by the client. Headers are modified in-place, new headers are added at the end of the already
2163 existing headers.</p>
2164 <p>The header order can be used to fingerprint client requests independently of other headers like the
2166 <p>This directive allows to sort the headers differently to better mimic a different User-Agent. Client
2167 headers will be emitted in the order given, headers whose name isn't explicitly specified are added at
2169 <p>Note that sorting headers in an uncommon way will make fingerprinting actually easier. Encrypted
2170 headers are not affected by this directive.</p>
2176 <h4 class="SECT3"><a name="CLIENT-SPECIFIC-TAG" id="CLIENT-SPECIFIC-TAG">7.6.16. client-specific-tag</a></h4>
2177 <div class="VARIABLELIST">
2181 <p>The name of a tag that will always be set for clients that requested it through the webinterface.</p>
2183 <dt>Type of value:</dt>
2185 <p><tt class="REPLACEABLE"><i>Tag name followed by a description that will be shown in the
2186 webinterface</i></tt></p>
2188 <dt>Default value:</dt>
2194 <div class="WARNING">
2195 <table class="WARNING" border="1" width="90%">
2197 <td align="center"><b>Warning</b></td>
2201 <p>This is an experimental feature. The syntax is likely to change in future versions.</p>
2206 <p>Client-specific tags allow Privoxy admins to create different profiles and let the users chose which
2207 one they want without impacting other users.</p>
2208 <p>One use case is allowing users to circumvent certain blocks without having to allow them to circumvent
2209 all blocks. This is not possible with the <a href="config.html#ENABLE-REMOTE-TOGGLE">enable-remote-toggle
2210 feature</a> because it would bluntly disable all blocks for all users and also affect other actions like
2211 filters. It also is set globally which renders it useless in most multi-user setups.</p>
2212 <p>After a client-specific tag has been defined with the client-specific-tag directive, action sections
2213 can be activated based on the tag by using a <a href="actions-file.html#CLIENT-TAG-PATTERN" target=
2214 "_top">CLIENT-TAG</a> pattern. The CLIENT-TAG pattern is evaluated at the same priority as URL patterns,
2215 as a result the last matching pattern wins. Tags that are created based on client or server headers are
2216 evaluated later on and can overrule CLIENT-TAG and URL patterns!</p>
2217 <p>The tag is set for all requests that come from clients that requested it to be set. Note that
2218 "clients" are differentiated by IP address, if the IP address changes the tag has to be requested
2220 <p>Clients can request tags to be set by using the CGI interface <a href=
2221 "http://config.privoxy.org/client-tags" target="_top">http://config.privoxy.org/client-tags</a>. The
2222 specific tag description is only used on the web page and should be phrased in away that the user
2223 understand the effect of the tag.</p>
2227 <table border="0" bgcolor="#E0E0E0" width="90%">
2230 <pre class="SCREEN"> # Define a couple of tags, the described effect requires action sections
2231 # that are enabled based on CLIENT-TAG patterns.
2232 client-specific-tag circumvent-blocks Overrule blocks but do not affect other actions
2233 disable-content-filters Disable content-filters but do not affect other actions</pre>
2242 <h4 class="SECT3"><a name="CLIENT-TAG-LIFETIME" id="CLIENT-TAG-LIFETIME">7.6.17. client-tag-lifetime</a></h4>
2243 <div class="VARIABLELIST">
2247 <p>How long a temporarily enabled tag remains enabled.</p>
2249 <dt>Type of value:</dt>
2251 <p><tt class="REPLACEABLE"><i>Time in seconds.</i></tt></p>
2253 <dt>Default value:</dt>
2259 <div class="WARNING">
2260 <table class="WARNING" border="1" width="90%">
2262 <td align="center"><b>Warning</b></td>
2266 <p>This is an experimental feature. The syntax is likely to change in future versions.</p>
2271 <p>In case of some tags users may not want to enable them permanently, but only for a short amount of
2272 time, for example to circumvent a block that is the result of an overly-broad URL pattern.</p>
2273 <p>The CGI interface <a href="http://config.privoxy.org/client-tags" target=
2274 "_top">http://config.privoxy.org/client-tags</a> therefore provides a "enable this tag temporarily"
2275 option. If it is used, the tag will be set until the client-tag-lifetime is over.</p>
2279 <table border="0" bgcolor="#E0E0E0" width="90%">
2282 <pre class="SCREEN"> # Increase the time to life for temporarily enabled tags to 3 minutes
2283 client-tag-lifetime 180</pre>
2292 <h4 class="SECT3"><a name="TRUST-X-FORWARDED-FOR" id="TRUST-X-FORWARDED-FOR">7.6.18.
2293 trust-x-forwarded-for</a></h4>
2294 <div class="VARIABLELIST">
2298 <p>Whether or not Privoxy should use IP addresses specified with the X-Forwarded-For header</p>
2300 <dt>Type of value:</dt>
2302 <p><tt class="REPLACEABLE"><i>0 or one</i></tt></p>
2304 <dt>Default value:</dt>
2310 <div class="WARNING">
2311 <table class="WARNING" border="1" width="90%">
2313 <td align="center"><b>Warning</b></td>
2317 <p>This is an experimental feature. The syntax is likely to change in future versions.</p>
2322 <p>If clients reach Privoxy through another proxy, for example a load balancer, Privoxy can't tell the
2323 client's IP address from the connection. If multiple clients use the same proxy, they will share the same
2324 client tag settings which is usually not desired.</p>
2325 <p>This option lets Privoxy use the X-Forwarded-For header value as client IP address. If the proxy sets
2326 the header, multiple clients using the same proxy do not share the same client tag settings.</p>
2327 <p>This option should only be enabled if Privoxy can only be reached through a proxy and if the proxy can
2328 be trusted to set the header correctly. It is recommended that ACL are used to make sure only trusted
2329 systems can reach Privoxy.</p>
2330 <p>If access to Privoxy isn't limited to trusted systems, this option would allow malicious clients to
2331 change the client tags for other clients or increase Privoxy's memory requirements by registering lots of
2332 client tag settings for clients that don't exist.</p>
2336 <table border="0" bgcolor="#E0E0E0" width="90%">
2339 <pre class="SCREEN"> # Allow systems that can reach Privoxy to provide the client
2340 # IP address with a X-Forwarded-For header.
2341 trust-x-forwarded-for 1</pre>
2350 <h4 class="SECT3"><a name="RECEIVE-BUFFER-SIZE" id="RECEIVE-BUFFER-SIZE">7.6.19. receive-buffer-size</a></h4>
2351 <div class="VARIABLELIST">
2355 <p>The size of the buffer Privoxy uses to receive data from the server.</p>
2357 <dt>Type of value:</dt>
2359 <p><tt class="REPLACEABLE"><i>Size in bytes</i></tt></p>
2361 <dt>Default value:</dt>
2367 <p>Increasing the receive-buffer-size increases Privoxy's memory usage but can lower the number of
2368 context switches and thereby reduce the cpu usage and potentially increase the throughput.</p>
2369 <p>This is mostly relevant for fast network connections and large downloads that don't require
2371 <p>Reducing the buffer size reduces the amount of memory Privoxy needs to handle the request but
2372 increases the number of systemcalls and may reduce the throughput.</p>
2373 <p>A dtrace command like: <span class="QUOTE">"sudo dtrace -n 'syscall::read:return /execname ==
2374 "privoxy"/ { @[execname] = llquantize(arg0, 10, 0, 5, 20); @m = max(arg0)}'"</span> can be used to
2375 properly tune the receive-buffer-size. On systems without dtrace, strace or truss may be used as less
2376 convenient alternatives.</p>
2377 <p>If the buffer is too large it will increase Privoxy's memory footprint without any benefit. As the
2378 memory is (currently) cleared before using it, a buffer that is too large can actually reduce the
2383 <table border="0" bgcolor="#E0E0E0" width="90%">
2386 <pre class="SCREEN"> # Increase the receive buffer size
2387 receive-buffer-size 32768</pre>
2397 <h2 class="SECT2"><a name="WINDOWS-GUI" id="WINDOWS-GUI">7.7. Windows GUI Options</a></h2>
2398 <p><span class="APPLICATION">Privoxy</span> has a number of options specific to the Windows GUI
2399 interface:</p><a name="ACTIVITY-ANIMATION" id="ACTIVITY-ANIMATION"></a>
2400 <p>If <span class="QUOTE">"activity-animation"</span> is set to 1, the <span class="APPLICATION">Privoxy</span>
2401 icon will animate when <span class="QUOTE">"Privoxy"</span> is active. To turn off, set to 0.</p>
2402 <p class="LITERALLAYOUT"> <span class="emphasis"><i class="EMPHASIS">activity-animation
2403 1</i></span></p><a name="LOG-MESSAGES" id="LOG-MESSAGES"></a>
2404 <p>If <span class="QUOTE">"log-messages"</span> is set to 1, <span class="APPLICATION">Privoxy</span> copies log
2405 messages to the console window. The log detail depends on the <a href="config.html#DEBUG">debug</a>
2407 <p class="LITERALLAYOUT"> <span class="emphasis"><i class="EMPHASIS">log-messages
2408 1</i></span></p><a name="LOG-BUFFER-SIZE" id="LOG-BUFFER-SIZE"></a>
2409 <p>If <span class="QUOTE">"log-buffer-size"</span> is set to 1, the size of the log buffer, i.e. the amount of
2410 memory used for the log messages displayed in the console window, will be limited to <span class=
2411 "QUOTE">"log-max-lines"</span> (see below).</p>
2412 <p>Warning: Setting this to 0 will result in the buffer to grow infinitely and eat up all your memory!</p>
2413 <p class="LITERALLAYOUT"> <span class="emphasis"><i class="EMPHASIS">log-buffer-size
2414 1</i></span></p><a name="LOG-MAX-LINES" id="LOG-MAX-LINES"></a>
2415 <p><span class="APPLICATION">log-max-lines</span> is the maximum number of lines held in the log buffer. See
2417 <p class="LITERALLAYOUT"> <span class="emphasis"><i class="EMPHASIS">log-max-lines
2418 200</i></span></p><a name="LOG-HIGHLIGHT-MESSAGES" id="LOG-HIGHLIGHT-MESSAGES"></a>
2419 <p>If <span class="QUOTE">"log-highlight-messages"</span> is set to 1, <span class="APPLICATION">Privoxy</span>
2420 will highlight portions of the log messages with a bold-faced font:</p>
2421 <p class="LITERALLAYOUT"> <span class="emphasis"><i class="EMPHASIS">log-highlight-messages
2422 1</i></span></p><a name="LOG-FONT-NAME" id="LOG-FONT-NAME"></a>
2423 <p>The font used in the console window:</p>
2424 <p class="LITERALLAYOUT"> <span class="emphasis"><i class="EMPHASIS">log-font-name Comic Sans
2425 MS</i></span></p><a name="LOG-FONT-SIZE" id="LOG-FONT-SIZE"></a>
2426 <p>Font size used in the console window:</p>
2427 <p class="LITERALLAYOUT"> <span class="emphasis"><i class="EMPHASIS">log-font-size
2428 8</i></span></p><a name="SHOW-ON-TASK-BAR" id="SHOW-ON-TASK-BAR"></a>
2429 <p><span class="QUOTE">"show-on-task-bar"</span> controls whether or not <span class="APPLICATION">Privoxy</span>
2430 will appear as a button on the Task bar when minimized:</p>
2431 <p class="LITERALLAYOUT"> <span class="emphasis"><i class="EMPHASIS">show-on-task-bar
2432 0</i></span></p><a name="CLOSE-BUTTON-MINIMIZES" id="CLOSE-BUTTON-MINIMIZES"></a>
2433 <p>If <span class="QUOTE">"close-button-minimizes"</span> is set to 1, the Windows close button will minimize
2434 <span class="APPLICATION">Privoxy</span> instead of closing the program (close with the exit option on the File
2436 <p class="LITERALLAYOUT"> <span class="emphasis"><i class="EMPHASIS">close-button-minimizes
2437 1</i></span></p><a name="HIDE-CONSOLE" id="HIDE-CONSOLE"></a>
2438 <p>The <span class="QUOTE">"hide-console"</span> option is specific to the MS-Win console version of <span class=
2439 "APPLICATION">Privoxy</span>. If this option is used, <span class="APPLICATION">Privoxy</span> will disconnect
2440 from and hide the command console.</p>
2441 <p class="LITERALLAYOUT"> #<span class="emphasis"><i class="EMPHASIS">hide-console</i></span></p>
2444 <div class="NAVFOOTER">
2445 <hr align="left" width="100%">
2446 <table summary="Footer navigation table" width="100%" border="0" cellpadding="0" cellspacing="0">
2448 <td width="33%" align="left" valign="top"><a href="configuration.html" accesskey="P">Prev</a></td>
2449 <td width="34%" align="center" valign="top"><a href="index.html" accesskey="H">Home</a></td>
2450 <td width="33%" align="right" valign="top"><a href="actions-file.html" accesskey="N">Next</a></td>
2453 <td width="33%" align="left" valign="top">Privoxy Configuration</td>
2454 <td width="34%" align="center" valign="top"> </td>
2455 <td width="33%" align="right" valign="top">Actions Files</td>