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%">
551 "PROGRAMLISTING"> debug 1 # Log the destination for each request. 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. On GNU/Linux, and other platforms that can
693 listen on not yet assigned IP addresses, Privoxy will start and will listen on the specified address
694 whenever the IP address is assigned to the system</p>
695 <p>IPv6 addresses containing colons have to be quoted by brackets. They can only be used if <span class=
696 "APPLICATION">Privoxy</span> has been compiled with IPv6 support. If you aren't sure if your version
697 supports it, have a look at <tt class="LITERAL">http://config.privoxy.org/show-status</tt>.</p>
698 <p>Some operating systems will prefer IPv6 to IPv4 addresses even if the system has no IPv6 connectivity
699 which is usually not expected by the user. Some even rely on DNS to resolve localhost which mean the
700 "localhost" address used may not actually be local.</p>
701 <p>It is therefore recommended to explicitly configure the intended IP address instead of relying on the
702 operating system, unless there's a strong reason not to.</p>
703 <p>If you leave out the address, <span class="APPLICATION">Privoxy</span> will bind to all IPv4
704 interfaces (addresses) on your machine and may become reachable from the Internet and/or the local
705 network. Be aware that some GNU/Linux distributions modify that behaviour without updating the
706 documentation. Check for non-standard patches if your <span class="APPLICATION">Privoxy</span> version
707 behaves differently.</p>
708 <p>If you configure <span class="APPLICATION">Privoxy</span> to be reachable from the network, consider
709 using <a href="config.html#ACLS">access control lists</a> (ACL's, see below), and/or a firewall.</p>
710 <p>If you open <span class="APPLICATION">Privoxy</span> to untrusted users, you will also want to make
711 sure that the following actions are disabled: <tt class="LITERAL"><a href=
712 "config.html#ENABLE-EDIT-ACTIONS">enable-edit-actions</a></tt> and <tt class="LITERAL"><a href=
713 "config.html#ENABLE-REMOTE-TOGGLE">enable-remote-toggle</a></tt></p>
717 <p>Suppose you are running <span class="APPLICATION">Privoxy</span> on a machine which has the address
718 192.168.0.1 on your local private network (192.168.0.0) and has another outside connection with a
719 different address. You want it to serve requests from inside only:</p>
720 <table border="0" bgcolor="#E0E0E0" width="90%">
723 <pre class="PROGRAMLISTING"> listen-address 192.168.0.1:8118</pre>
727 <p>Suppose you are running <span class="APPLICATION">Privoxy</span> on an IPv6-capable machine and you
728 want it to listen on the IPv6 address of the loopback device:</p>
729 <table border="0" bgcolor="#E0E0E0" width="90%">
732 <pre class="PROGRAMLISTING"> listen-address [::1]:8118</pre>
741 <h4 class="SECT3"><a name="TOGGLE" id="TOGGLE">7.4.2. toggle</a></h4>
742 <div class="VARIABLELIST">
746 <p>Initial state of "toggle" status</p>
748 <dt>Type of value:</dt>
752 <dt>Default value:</dt>
756 <dt>Effect if unset:</dt>
758 <p>Act as if toggled on</p>
762 <p>If set to 0, <span class="APPLICATION">Privoxy</span> will start in <span class="QUOTE">"toggled
763 off"</span> mode, i.e. mostly behave like a normal, content-neutral proxy with both ad blocking and
764 content filtering disabled. See <tt class="LITERAL">enable-remote-toggle</tt> below.</p>
770 <h4 class="SECT3"><a name="ENABLE-REMOTE-TOGGLE" id="ENABLE-REMOTE-TOGGLE">7.4.3. enable-remote-toggle</a></h4>
771 <div class="VARIABLELIST">
775 <p>Whether or not the <a href="http://config.privoxy.org/toggle" target="_top">web-based toggle
776 feature</a> may be used</p>
778 <dt>Type of value:</dt>
782 <dt>Default value:</dt>
786 <dt>Effect if unset:</dt>
788 <p>The web-based toggle feature is disabled.</p>
792 <p>When toggled off, <span class="APPLICATION">Privoxy</span> mostly acts like a normal, content-neutral
793 proxy, i.e. doesn't block ads or filter content.</p>
794 <p>Access to the toggle feature can <span class="emphasis"><i class="EMPHASIS">not</i></span> be
795 controlled separately by <span class="QUOTE">"ACLs"</span> or HTTP authentication, so that everybody who
796 can access <span class="APPLICATION">Privoxy</span> (see <span class="QUOTE">"ACLs"</span> and <tt class=
797 "LITERAL">listen-address</tt> above) can toggle it for all users. So this option is <span class=
798 "emphasis"><i class="EMPHASIS">not recommended</i></span> for multi-user environments with untrusted
800 <p>Note that malicious client side code (e.g Java) is also capable of using this option.</p>
801 <p>As a lot of <span class="APPLICATION">Privoxy</span> users don't read documentation, this feature is
802 disabled by default.</p>
803 <p>Note that you must have compiled <span class="APPLICATION">Privoxy</span> with support for this
804 feature, otherwise this option has no effect.</p>
810 <h4 class="SECT3"><a name="ENABLE-REMOTE-HTTP-TOGGLE" id="ENABLE-REMOTE-HTTP-TOGGLE">7.4.4.
811 enable-remote-http-toggle</a></h4>
812 <div class="VARIABLELIST">
816 <p>Whether or not Privoxy recognizes special HTTP headers to change its behaviour.</p>
818 <dt>Type of value:</dt>
822 <dt>Default value:</dt>
826 <dt>Effect if unset:</dt>
828 <p>Privoxy ignores special HTTP headers.</p>
832 <p>When toggled on, the client can change <span class="APPLICATION">Privoxy's</span> behaviour by setting
833 special HTTP headers. Currently the only supported special header is <span class="QUOTE">"X-Filter:
834 No"</span>, to disable filtering for the ongoing request, even if it is enabled in one of the action
836 <p>This feature is disabled by default. If you are using <span class="APPLICATION">Privoxy</span> in a
837 environment with trusted clients, you may enable this feature at your discretion. Note that malicious
838 client side code (e.g Java) is also capable of using this feature.</p>
839 <p>This option will be removed in future releases as it has been obsoleted by the more general header
846 <h4 class="SECT3"><a name="ENABLE-EDIT-ACTIONS" id="ENABLE-EDIT-ACTIONS">7.4.5. enable-edit-actions</a></h4>
847 <div class="VARIABLELIST">
851 <p>Whether or not the <a href="http://config.privoxy.org/show-status" target="_top">web-based actions
852 file editor</a> may be used</p>
854 <dt>Type of value:</dt>
858 <dt>Default value:</dt>
862 <dt>Effect if unset:</dt>
864 <p>The web-based actions file editor is disabled.</p>
868 <p>Access to the editor can <span class="emphasis"><i class="EMPHASIS">not</i></span> be controlled
869 separately by <span class="QUOTE">"ACLs"</span> or HTTP authentication, so that everybody who can access
870 <span class="APPLICATION">Privoxy</span> (see <span class="QUOTE">"ACLs"</span> and <tt class=
871 "LITERAL">listen-address</tt> above) can modify its configuration for all users.</p>
872 <p>This option is <span class="emphasis"><i class="EMPHASIS">not recommended</i></span> for environments
873 with untrusted users and as a lot of <span class="APPLICATION">Privoxy</span> users don't read
874 documentation, this feature is disabled by default.</p>
875 <p>Note that malicious client side code (e.g Java) is also capable of using the actions editor and you
876 shouldn't enable this options unless you understand the consequences and are sure your browser is
877 configured correctly.</p>
878 <p>Note that you must have compiled <span class="APPLICATION">Privoxy</span> with support for this
879 feature, otherwise this option has no effect.</p>
885 <h4 class="SECT3"><a name="ENFORCE-BLOCKS" id="ENFORCE-BLOCKS">7.4.6. enforce-blocks</a></h4>
886 <div class="VARIABLELIST">
890 <p>Whether the user is allowed to ignore blocks and can <span class="QUOTE">"go there anyway"</span>.</p>
892 <dt>Type of value:</dt>
894 <p><tt class="REPLACEABLE"><i>0 or 1</i></tt></p>
896 <dt>Default value:</dt>
898 <p><span class="emphasis"><i class="EMPHASIS">0</i></span></p>
900 <dt>Effect if unset:</dt>
902 <p>Blocks are not enforced.</p>
906 <p><span class="APPLICATION">Privoxy</span> is mainly used to block and filter requests as a service to
907 the user, for example to block ads and other junk that clogs the pipes. <span class=
908 "APPLICATION">Privoxy's</span> configuration isn't perfect and sometimes innocent pages are blocked. In
909 this situation it makes sense to allow the user to enforce the request and have <span class=
910 "APPLICATION">Privoxy</span> ignore the block.</p>
911 <p>In the default configuration <span class="APPLICATION">Privoxy's</span> <span class=
912 "QUOTE">"Blocked"</span> page contains a <span class="QUOTE">"go there anyway"</span> link to adds a
913 special string (the force prefix) to the request URL. If that link is used, <span class=
914 "APPLICATION">Privoxy</span> will detect the force prefix, remove it again and let the request pass.</p>
915 <p>Of course <span class="APPLICATION">Privoxy</span> can also be used to enforce a network policy. In
916 that case the user obviously should not be able to bypass any blocks, and that's what the <span class=
917 "QUOTE">"enforce-blocks"</span> option is for. If it's enabled, <span class="APPLICATION">Privoxy</span>
918 hides the <span class="QUOTE">"go there anyway"</span> link. If the user adds the force prefix by hand,
919 it will not be accepted and the circumvention attempt is logged.</p>
923 <p>enforce-blocks 1</p>
929 <h4 class="SECT3"><a name="ACLS" id="ACLS">7.4.7. ACLs: permit-access and deny-access</a></h4><a name=
930 "PERMIT-ACCESS" id="PERMIT-ACCESS"></a><a name="DENY-ACCESS" id="DENY-ACCESS"></a>
931 <div class="VARIABLELIST">
935 <p>Who can access what.</p>
937 <dt>Type of value:</dt>
939 <p><tt class="REPLACEABLE"><i>src_addr</i></tt>[:<tt class="REPLACEABLE"><i>port</i></tt>][/<tt class=
940 "REPLACEABLE"><i>src_masklen</i></tt>] [<tt class="REPLACEABLE"><i>dst_addr</i></tt>[:<tt class=
941 "REPLACEABLE"><i>port</i></tt>][/<tt class="REPLACEABLE"><i>dst_masklen</i></tt>]]</p>
942 <p>Where <tt class="REPLACEABLE"><i>src_addr</i></tt> and <tt class="REPLACEABLE"><i>dst_addr</i></tt>
943 are IPv4 addresses in dotted decimal notation or valid DNS names, <tt class=
944 "REPLACEABLE"><i>port</i></tt> is a port number, and <tt class="REPLACEABLE"><i>src_masklen</i></tt> and
945 <tt class="REPLACEABLE"><i>dst_masklen</i></tt> are subnet masks in CIDR notation, i.e. integer values
946 from 2 to 30 representing the length (in bits) of the network address. The masks and the whole
947 destination part are optional.</p>
948 <p>If your system implements <a href="http://tools.ietf.org/html/rfc3493" target="_top">RFC 3493</a>,
949 then <tt class="REPLACEABLE"><i>src_addr</i></tt> and <tt class="REPLACEABLE"><i>dst_addr</i></tt> can be
950 IPv6 addresses delimited by brackets, <tt class="REPLACEABLE"><i>port</i></tt> can be a number or a
951 service name, and <tt class="REPLACEABLE"><i>src_masklen</i></tt> and <tt class=
952 "REPLACEABLE"><i>dst_masklen</i></tt> can be a number from 0 to 128.</p>
954 <dt>Default value:</dt>
956 <p><span class="emphasis"><i class="EMPHASIS">Unset</i></span></p>
957 <p>If no <tt class="REPLACEABLE"><i>port</i></tt> is specified, any port will match. If no <tt class=
958 "REPLACEABLE"><i>src_masklen</i></tt> or <tt class="REPLACEABLE"><i>src_masklen</i></tt> is given, the
959 complete IP address has to match (i.e. 32 bits for IPv4 and 128 bits for IPv6).</p>
961 <dt>Effect if unset:</dt>
963 <p>Don't restrict access further than implied by <tt class="LITERAL">listen-address</tt></p>
967 <p>Access controls are included at the request of ISPs and systems administrators, and <span class=
968 "emphasis"><i class="EMPHASIS">are not usually needed by individual users</i></span>. For a typical home
969 user, it will normally suffice to ensure that <span class="APPLICATION">Privoxy</span> only listens on
970 the localhost (127.0.0.1) or internal (home) network address by means of the <a href=
971 "config.html#LISTEN-ADDRESS"><span class="emphasis"><i class="EMPHASIS">listen-address</i></span></a>
973 <p>Please see the warnings in the FAQ that <span class="APPLICATION">Privoxy</span> is not intended to be
974 a substitute for a firewall or to encourage anyone to defer addressing basic security weaknesses.</p>
975 <p>Multiple ACL lines are OK. If any ACLs are specified, <span class="APPLICATION">Privoxy</span> only
976 talks to IP addresses that match at least one <tt class="LITERAL">permit-access</tt> line and don't match
977 any subsequent <tt class="LITERAL">deny-access</tt> line. In other words, the last match wins, with the
978 default being <tt class="LITERAL">deny-access</tt>.</p>
979 <p>If <span class="APPLICATION">Privoxy</span> is using a forwarder (see <tt class="LITERAL">forward</tt>
980 below) for a particular destination URL, the <tt class="REPLACEABLE"><i>dst_addr</i></tt> that is
981 examined is the address of the forwarder and <span class="emphasis"><i class="EMPHASIS">NOT</i></span>
982 the address of the ultimate target. This is necessary because it may be impossible for the local
983 <span class="APPLICATION">Privoxy</span> to determine the IP address of the ultimate target (that's often
984 what gateways are used for).</p>
985 <p>You should prefer using IP addresses over DNS names, because the address lookups take time. All DNS
986 names must resolve! You can <span class="emphasis"><i class="EMPHASIS">not</i></span> use domain patterns
987 like <span class="QUOTE">"*.org"</span> or partial domain names. If a DNS name resolves to multiple IP
988 addresses, only the first one is used.</p>
989 <p>Some systems allow IPv4 clients to connect to IPv6 server sockets. Then the client's IPv4 address will
990 be translated by the system into IPv6 address space with special prefix ::ffff:0:0/96 (so called IPv4
991 mapped IPv6 address). <span class="APPLICATION">Privoxy</span> can handle it and maps such ACL addresses
993 <p>Denying access to particular sites by ACL may have undesired side effects if the site in question is
994 hosted on a machine which also hosts other sites (most sites are).</p>
998 <p>Explicitly define the default behavior if no ACL and <tt class="LITERAL">listen-address</tt> are set:
999 <span class="QUOTE">"localhost"</span> is OK. The absence of a <tt class=
1000 "REPLACEABLE"><i>dst_addr</i></tt> implies that <span class="emphasis"><i class="EMPHASIS">all</i></span>
1001 destination addresses are OK:</p>
1002 <table border="0" bgcolor="#E0E0E0" width="90%">
1005 <pre class="SCREEN"> permit-access localhost</pre>
1009 <p>Allow any host on the same class C subnet as www.privoxy.org access to nothing but www.example.com (or
1010 other domains hosted on the same system):</p>
1011 <table border="0" bgcolor="#E0E0E0" width="90%">
1014 <pre class="SCREEN"> permit-access www.privoxy.org/24 www.example.com/32</pre>
1018 <p>Allow access from any host on the 26-bit subnet 192.168.45.64 to anywhere, with the exception that
1019 192.168.45.73 may not access the IP address behind www.dirty-stuff.example.com:</p>
1020 <table border="0" bgcolor="#E0E0E0" width="90%">
1023 <pre class="SCREEN"> permit-access 192.168.45.64/26
1024 deny-access 192.168.45.73 www.dirty-stuff.example.com</pre>
1028 <p>Allow access from the IPv4 network 192.0.2.0/24 even if listening on an IPv6 wild card address (not
1029 supported on all platforms):</p>
1030 <table border="0" bgcolor="#E0E0E0" width="90%">
1033 <pre class="PROGRAMLISTING"> permit-access 192.0.2.0/24</pre>
1037 <p>This is equivalent to the following line even if listening on an IPv4 address (not supported on all
1039 <table border="0" bgcolor="#E0E0E0" width="90%">
1042 <pre class="PROGRAMLISTING"> permit-access [::ffff:192.0.2.0]/120</pre>
1051 <h4 class="SECT3"><a name="BUFFER-LIMIT" id="BUFFER-LIMIT">7.4.8. buffer-limit</a></h4>
1052 <div class="VARIABLELIST">
1056 <p>Maximum size of the buffer for content filtering.</p>
1058 <dt>Type of value:</dt>
1060 <p>Size in Kbytes</p>
1062 <dt>Default value:</dt>
1066 <dt>Effect if unset:</dt>
1068 <p>Use a 4MB (4096 KB) limit.</p>
1072 <p>For content filtering, i.e. the <tt class="LITERAL">+filter</tt> and <tt class=
1073 "LITERAL">+deanimate-gif</tt> actions, it is necessary that <span class="APPLICATION">Privoxy</span>
1074 buffers the entire document body. This can be potentially dangerous, since a server could just keep
1075 sending data indefinitely and wait for your RAM to exhaust -- with nasty consequences. Hence this
1077 <p>When a document buffer size reaches the <tt class="LITERAL">buffer-limit</tt>, it is flushed to the
1078 client unfiltered and no further attempt to filter the rest of the document is made. Remember that there
1079 may be multiple threads running, which might require up to <tt class="LITERAL">buffer-limit</tt> Kbytes
1080 <span class="emphasis"><i class="EMPHASIS">each</i></span>, unless you have enabled <span class=
1081 "QUOTE">"single-threaded"</span> above.</p>
1087 <h4 class="SECT3"><a name="ENABLE-PROXY-AUTHENTICATION-FORWARDING" id=
1088 "ENABLE-PROXY-AUTHENTICATION-FORWARDING">7.4.9. enable-proxy-authentication-forwarding</a></h4>
1089 <div class="VARIABLELIST">
1093 <p>Whether or not proxy authentication through <span class="APPLICATION">Privoxy</span> should work.</p>
1095 <dt>Type of value:</dt>
1099 <dt>Default value:</dt>
1103 <dt>Effect if unset:</dt>
1105 <p>Proxy authentication headers are removed.</p>
1109 <p>Privoxy itself does not support proxy authentication, but can allow clients to authenticate against
1110 Privoxy's parent proxy.</p>
1111 <p>By default Privoxy (3.0.21 and later) don't do that and remove Proxy-Authorization headers in requests
1112 and Proxy-Authenticate headers in responses to make it harder for malicious sites to trick inexperienced
1113 users into providing login information.</p>
1114 <p>If this option is enabled the headers are forwarded.</p>
1115 <p>Enabling this option is <span class="emphasis"><i class="EMPHASIS">not recommended</i></span> if there
1116 is no parent proxy that requires authentication or if the local network between Privoxy and the parent
1117 proxy isn't trustworthy. If proxy authentication is only required for some requests, it is recommended to
1118 use a client header filter to remove the authentication headers for requests where they aren't
1125 <h4 class="SECT3"><a name="TRUSTED-CGI-REFERER" id="TRUSTED-CGI-REFERER">7.4.10. trusted-cgi-referer</a></h4>
1126 <div class="VARIABLELIST">
1130 <p>A trusted website or webpage whose links can be followed to reach sensitive CGI pages</p>
1132 <dt>Type of value:</dt>
1134 <p>URL or URL prefix</p>
1136 <dt>Default value:</dt>
1140 <dt>Effect if unset:</dt>
1142 <p>No external pages are considered trusted referers.</p>
1146 <p>Before <span class="APPLICATION">Privoxy</span> accepts configuration changes through CGI pages like
1147 <a href="config.html#CLIENT-SPECIFIC-TAG">client-tags</a> or the <a href=
1148 "config.html#ENABLE-REMOTE-TOGGLE">remote toggle</a>, it checks the Referer header to see if the request
1149 comes from a trusted source.</p>
1150 <p>By default only the webinterface domains <a href="http://config.privoxy.org/" target=
1151 "_top">config.privoxy.org</a> and <a href="http://p.p/" target="_top">p.p</a> are considered trustworthy.
1152 Requests originating from other domains are rejected to prevent third-parties from modifiying Privoxy's
1153 state by e.g. embedding images that result in CGI requests.</p>
1154 <p>In some environments it may be desirable to embed links to CGI pages on external pages, for example on
1155 an Intranet homepage the Privoxy admin controls.</p>
1156 <p>The <span class="QUOTE">"trusted-cgi-referer"</span> option can be used to add that page, or the whole
1157 domain, as trusted source so the resulting requests aren't rejected. Requests are accepted if the
1158 specified trusted-cgi-refer is the prefix of the Referer.</p>
1159 <p>If the trusted source is supposed to access the CGI pages via JavaScript the <a href=
1160 "config.html#CORS-ALLOWED-ORIGIN">cors-allowed-origin</a> option can be used.</p>
1161 <div class="WARNING">
1162 <table class="WARNING" border="1" width="90%">
1164 <td align="center"><b>Warning</b></td>
1168 <p>Declaring pages the admin doesn't control trustworthy may allow malicious third parties to
1169 modify Privoxy's internal state against the user's wishes and without the user's knowledge.</p>
1179 <h4 class="SECT3"><a name="CORS-ALLOWED-ORIGIN" id="CORS-ALLOWED-ORIGIN">7.4.11. cors-allowed-origin</a></h4>
1180 <div class="VARIABLELIST">
1184 <p>A trusted website which can access <span class="APPLICATION">Privoxy</span>'s CGI pages through
1187 <dt>Type of value:</dt>
1191 <dt>Default value:</dt>
1195 <dt>Effect if unset:</dt>
1197 <p>No external sites get access via cross-origin resource sharing.</p>
1201 <p>Modern browsers by default prevent cross-origin requests made via JavaScript to <span class=
1202 "APPLICATION">Privoxy</span>'s CGI interface even if <span class="APPLICATION">Privoxy</span> would trust
1203 the referer because it's white listed via the <a href=
1204 "config.html#TRUSTED-CGI-REFERER">trusted-cgi-referer</a> directive.</p>
1205 <p><a href="https://en.wikipedia.org/wiki/Cross-origin_resource_sharing" target="_top">Cross-origin
1206 resource sharing (CORS)</a> is a mechanism to allow cross-origin requests.</p>
1207 <p>The <span class="QUOTE">"cors-allowed-origin"</span> option can be used to specify a domain that is
1208 allowed to make requests to Privoxy CGI interface via JavaScript. It is used in combination with the
1209 <a href="config.html#TRUSTED-CGI-REFERER">trusted-cgi-referer</a> directive.</p>
1210 <div class="WARNING">
1211 <table class="WARNING" border="1" width="90%">
1213 <td align="center"><b>Warning</b></td>
1217 <p>Declaring domains the admin doesn't control trustworthy may allow malicious third parties to
1218 modify Privoxy's internal state against the user's wishes and without the user's knowledge.</p>
1229 <h2 class="SECT2"><a name="FORWARDING" id="FORWARDING">7.5. Forwarding</a></h2>
1230 <p>This feature allows routing of HTTP requests through a chain of multiple proxies.</p>
1231 <p>Forwarding can be used to chain Privoxy with a caching proxy to speed up browsing. Using a parent proxy may
1232 also be necessary if the machine that <span class="APPLICATION">Privoxy</span> runs on has no direct Internet
1234 <p>Note that parent proxies can severely decrease your privacy level. For example a parent proxy could add your
1235 IP address to the request headers and if it's a caching proxy it may add the <span class="QUOTE">"Etag"</span>
1236 header to revalidation requests again, even though you configured Privoxy to remove it. It may also ignore
1237 Privoxy's header time randomization and use the original values which could be used by the server as cookie
1238 replacement to track your steps between visits.</p>
1239 <p>Also specified here are SOCKS proxies. <span class="APPLICATION">Privoxy</span> supports the SOCKS 4 and SOCKS
1242 <h4 class="SECT3"><a name="FORWARD" id="FORWARD">7.5.1. forward</a></h4>
1243 <div class="VARIABLELIST">
1247 <p>To which parent HTTP proxy specific requests should be routed.</p>
1249 <dt>Type of value:</dt>
1251 <p><tt class="REPLACEABLE"><i>target_pattern</i></tt> <tt class=
1252 "REPLACEABLE"><i>http_parent</i></tt>[:<tt class="REPLACEABLE"><i>port</i></tt>]</p>
1253 <p>where <tt class="REPLACEABLE"><i>target_pattern</i></tt> is a <a href=
1254 "actions-file.html#AF-PATTERNS">URL pattern</a> that specifies to which requests (i.e. URLs) this forward
1255 rule shall apply. Use <tt class="LITERAL">/</tt> to denote <span class="QUOTE">"all URLs"</span>.
1256 <tt class="REPLACEABLE"><i>http_parent</i></tt>[:<tt class="REPLACEABLE"><i>port</i></tt>] is the DNS
1257 name or IP address of the parent HTTP proxy through which the requests should be forwarded, optionally
1258 followed by its listening port (default: 8000). Use a single dot (<tt class="LITERAL">.</tt>) to denote
1259 <span class="QUOTE">"no forwarding"</span>.</p>
1261 <dt>Default value:</dt>
1263 <p><span class="emphasis"><i class="EMPHASIS">Unset</i></span></p>
1265 <dt>Effect if unset:</dt>
1267 <p>Don't use parent HTTP proxies.</p>
1271 <p>If <tt class="REPLACEABLE"><i>http_parent</i></tt> is <span class="QUOTE">"."</span>, then requests
1272 are not forwarded to another HTTP proxy but are made directly to the web servers.</p>
1273 <p><tt class="REPLACEABLE"><i>http_parent</i></tt> can be a numerical IPv6 address (if <a href=
1274 "http://tools.ietf.org/html/rfc3493" target="_top">RFC 3493</a> is implemented). To prevent clashes with
1275 the port delimiter, the whole IP address has to be put into brackets. On the other hand a <tt class=
1276 "REPLACEABLE"><i>target_pattern</i></tt> containing an IPv6 address has to be put into angle brackets
1277 (normal brackets are reserved for regular expressions already).</p>
1278 <p>Multiple lines are OK, they are checked in sequence, and the last match wins.</p>
1282 <p>Everything goes to an example parent proxy, except SSL on port 443 (which it doesn't handle):</p>
1283 <table border="0" bgcolor="#E0E0E0" width="90%">
1286 <pre class="SCREEN"> forward / parent-proxy.example.org:8080
1287 forward :443 .</pre>
1291 <p>Everything goes to our example ISP's caching proxy, except for requests to that ISP's sites:</p>
1292 <table border="0" bgcolor="#E0E0E0" width="90%">
1295 <pre class="SCREEN"> forward / caching-proxy.isp.example.net:8000
1296 forward .isp.example.net .</pre>
1300 <p>Parent proxy specified by an IPv6 address:</p>
1301 <table border="0" bgcolor="#E0E0E0" width="90%">
1304 <pre class="PROGRAMLISTING"> forward / [2001:DB8::1]:8000</pre>
1308 <p>Suppose your parent proxy doesn't support IPv6:</p>
1309 <table border="0" bgcolor="#E0E0E0" width="90%">
1312 <pre class="PROGRAMLISTING"> forward / parent-proxy.example.org:8000
1313 forward ipv6-server.example.org .
1314 forward <[2-3][0-9a-f][0-9a-f][0-9a-f]:*> .</pre>
1323 <h4 class="SECT3"><a name="SOCKS" id="SOCKS">7.5.2. forward-socks4, forward-socks4a, forward-socks5 and
1324 forward-socks5t</a></h4><a name="FORWARD-SOCKS4" id="FORWARD-SOCKS4"></a><a name="FORWARD-SOCKS4A" id=
1325 "FORWARD-SOCKS4A"></a>
1326 <div class="VARIABLELIST">
1330 <p>Through which SOCKS proxy (and optionally to which parent HTTP proxy) specific requests should be
1333 <dt>Type of value:</dt>
1335 <p><tt class="REPLACEABLE"><i>target_pattern</i></tt> [<tt class=
1336 "REPLACEABLE"><i>user</i></tt>:<tt class="REPLACEABLE"><i>pass</i></tt>@]<tt class=
1337 "REPLACEABLE"><i>socks_proxy</i></tt>[:<tt class="REPLACEABLE"><i>port</i></tt>] <tt class=
1338 "REPLACEABLE"><i>http_parent</i></tt>[:<tt class="REPLACEABLE"><i>port</i></tt>]</p>
1339 <p>where <tt class="REPLACEABLE"><i>target_pattern</i></tt> is a <a href=
1340 "actions-file.html#AF-PATTERNS">URL pattern</a> that specifies to which requests (i.e. URLs) this forward
1341 rule shall apply. Use <tt class="LITERAL">/</tt> to denote <span class="QUOTE">"all URLs"</span>.
1342 <tt class="REPLACEABLE"><i>http_parent</i></tt> and <tt class="REPLACEABLE"><i>socks_proxy</i></tt> are
1343 IP addresses in dotted decimal notation or valid DNS names (<tt class=
1344 "REPLACEABLE"><i>http_parent</i></tt> may be <span class="QUOTE">"."</span> to denote <span class=
1345 "QUOTE">"no HTTP forwarding"</span>), and the optional <tt class="REPLACEABLE"><i>port</i></tt>
1346 parameters are TCP ports, i.e. integer values from 1 to 65535. <tt class="REPLACEABLE"><i>user</i></tt>
1347 and <tt class="REPLACEABLE"><i>pass</i></tt> can be used for SOCKS5 authentication if required.</p>
1349 <dt>Default value:</dt>
1351 <p><span class="emphasis"><i class="EMPHASIS">Unset</i></span></p>
1353 <dt>Effect if unset:</dt>
1355 <p>Don't use SOCKS proxies.</p>
1359 <p>Multiple lines are OK, they are checked in sequence, and the last match wins.</p>
1360 <p>The difference between <tt class="LITERAL">forward-socks4</tt> and <tt class=
1361 "LITERAL">forward-socks4a</tt> is that in the SOCKS 4A protocol, the DNS resolution of the target
1362 hostname happens on the SOCKS server, while in SOCKS 4 it happens locally.</p>
1363 <p>With <tt class="LITERAL">forward-socks5</tt> the DNS resolution will happen on the remote server as
1365 <p><tt class="LITERAL">forward-socks5t</tt> works like vanilla <tt class="LITERAL">forward-socks5</tt>
1366 but lets <span class="APPLICATION">Privoxy</span> additionally use Tor-specific SOCKS extensions.
1367 Currently the only supported SOCKS extension is optimistic data which can reduce the latency for the
1368 first request made on a newly created connection.</p>
1369 <p><tt class="REPLACEABLE"><i>socks_proxy</i></tt> and <tt class="REPLACEABLE"><i>http_parent</i></tt>
1370 can be a numerical IPv6 address (if <a href="http://tools.ietf.org/html/rfc3493" target="_top">RFC
1371 3493</a> is implemented). To prevent clashes with the port delimiter, the whole IP address has to be put
1372 into brackets. On the other hand a <tt class="REPLACEABLE"><i>target_pattern</i></tt> containing an IPv6
1373 address has to be put into angle brackets (normal brackets are reserved for regular expressions
1375 <p>If <tt class="REPLACEABLE"><i>http_parent</i></tt> is <span class="QUOTE">"."</span>, then requests
1376 are not forwarded to another HTTP proxy but are made (HTTP-wise) directly to the web servers, albeit
1377 through a SOCKS proxy.</p>
1381 <p>From the company example.com, direct connections are made to all <span class="QUOTE">"internal"</span>
1382 domains, but everything outbound goes through their ISP's proxy by way of example.com's corporate SOCKS
1383 4A gateway to the Internet.</p>
1384 <table border="0" bgcolor="#E0E0E0" width="90%">
1388 "SCREEN"> forward-socks4a / socks-gw.example.com:1080 www-cache.isp.example.net:8080
1389 forward .example.com .</pre>
1393 <p>A rule that uses a SOCKS 4 gateway for all destinations but no HTTP parent looks like this:</p>
1394 <table border="0" bgcolor="#E0E0E0" width="90%">
1397 <pre class="SCREEN"> forward-socks4 / socks-gw.example.com:1080 .</pre>
1401 <p>To connect SOCKS5 proxy which requires username/password authentication:</p>
1402 <table border="0" bgcolor="#E0E0E0" width="90%">
1405 <pre class="SCREEN"> forward-socks5 / user:pass@socks-gw.example.com:1080 .</pre>
1409 <p>To chain Privoxy and Tor, both running on the same system, you would use something like:</p>
1410 <table border="0" bgcolor="#E0E0E0" width="90%">
1413 <pre class="SCREEN"> forward-socks5t / 127.0.0.1:9050 .</pre>
1417 <p>Note that if you got Tor through one of the bundles, you may have to change the port from 9050 to 9150
1418 (or even another one). For details, please check the documentation on the <a href=
1419 "https://torproject.org/" target="_top">Tor website</a>.</p>
1420 <p>The public <span class="APPLICATION">Tor</span> network can't be used to reach your local network, if
1421 you need to access local servers you therefore might want to make some exceptions:</p>
1422 <table border="0" bgcolor="#E0E0E0" width="90%">
1425 <pre class="SCREEN"> forward 192.168.*.*/ .
1427 forward 127.*.*.*/ .</pre>
1431 <p>Unencrypted connections to systems in these address ranges will be as (un)secure as the local network
1432 is, but the alternative is that you can't reach the local network through <span class=
1433 "APPLICATION">Privoxy</span> at all. Of course this may actually be desired and there is no reason to
1434 make these exceptions if you aren't sure you need them.</p>
1435 <p>If you also want to be able to reach servers in your local network by using their names, you will need
1436 additional exceptions that look like this:</p>
1437 <table border="0" bgcolor="#E0E0E0" width="90%">
1440 <pre class="SCREEN"> forward localhost/ .</pre>
1449 <h4 class="SECT3"><a name="ADVANCED-FORWARDING-EXAMPLES" id="ADVANCED-FORWARDING-EXAMPLES">7.5.3. Advanced
1450 Forwarding Examples</a></h4>
1451 <p>If you have links to multiple ISPs that provide various special content only to their subscribers, you can
1452 configure multiple <span class="APPLICATION">Privoxies</span> which have connections to the respective ISPs to
1453 act as forwarders to each other, so that <span class="emphasis"><i class="EMPHASIS">your</i></span> users can
1454 see the internal content of all ISPs.</p>
1455 <p>Assume that host-a has a PPP connection to isp-a.example.net. And host-b has a PPP connection to
1456 isp-b.example.org. Both run <span class="APPLICATION">Privoxy</span>. Their forwarding configuration can look
1459 <table border="0" bgcolor="#E0E0E0" width="100%">
1462 <pre class="SCREEN"> forward / .
1463 forward .isp-b.example.net host-b:8118</pre>
1468 <table border="0" bgcolor="#E0E0E0" width="100%">
1471 <pre class="SCREEN"> forward / .
1472 forward .isp-a.example.org host-a:8118</pre>
1476 <p>Now, your users can set their browser's proxy to use either host-a or host-b and be able to browse the
1477 internal content of both isp-a and isp-b.</p>
1478 <p>If you intend to chain <span class="APPLICATION">Privoxy</span> and <span class="APPLICATION">squid</span>
1479 locally, then chaining as <tt class="LITERAL">browser -> squid -> privoxy</tt> is the recommended
1481 <p>Assuming that <span class="APPLICATION">Privoxy</span> and <span class="APPLICATION">squid</span> run on the
1482 same box, your <span class="APPLICATION">squid</span> configuration could then look like this:</p>
1483 <table border="0" bgcolor="#E0E0E0" width="100%">
1486 <pre class="SCREEN"> # Define Privoxy as parent proxy (without ICP)
1487 cache_peer 127.0.0.1 parent 8118 7 no-query
1489 # Define ACL for protocol FTP
1492 # Do not forward FTP requests to Privoxy
1493 always_direct allow ftp
1495 # Forward all the rest to Privoxy
1496 never_direct allow all</pre>
1500 <p>You would then need to change your browser's proxy settings to <span class="APPLICATION">squid</span>'s
1501 address and port. Squid normally uses port 3128. If unsure consult <tt class="LITERAL">http_port</tt> in
1502 <tt class="FILENAME">squid.conf</tt>.</p>
1503 <p>You could just as well decide to only forward requests you suspect of leading to Windows executables through
1504 a virus-scanning parent proxy, say, on <tt class="LITERAL">antivir.example.com</tt>, port 8010:</p>
1505 <table border="0" bgcolor="#E0E0E0" width="100%">
1508 <pre class="SCREEN"> forward / .
1509 forward /.*\.(exe|com|dll|zip)$ antivir.example.com:8010</pre>
1515 <h4 class="SECT3"><a name="FORWARDED-CONNECT-RETRIES" id="FORWARDED-CONNECT-RETRIES">7.5.4.
1516 forwarded-connect-retries</a></h4>
1517 <div class="VARIABLELIST">
1521 <p>How often Privoxy retries if a forwarded connection request fails.</p>
1523 <dt>Type of value:</dt>
1525 <p><tt class="REPLACEABLE"><i>Number of retries.</i></tt></p>
1527 <dt>Default value:</dt>
1529 <p><span class="emphasis"><i class="EMPHASIS">0</i></span></p>
1531 <dt>Effect if unset:</dt>
1533 <p>Connections forwarded through other proxies are treated like direct connections and no retry attempts
1538 <p><tt class="REPLACEABLE"><i>forwarded-connect-retries</i></tt> is mainly interesting for socks4a
1539 connections, where <span class="APPLICATION">Privoxy</span> can't detect why the connections failed. The
1540 connection might have failed because of a DNS timeout in which case a retry makes sense, but it might
1541 also have failed because the server doesn't exist or isn't reachable. In this case the retry will just
1542 delay the appearance of Privoxy's error message.</p>
1543 <p>Note that in the context of this option, <span class="QUOTE">"forwarded connections"</span> includes
1544 all connections that Privoxy forwards through other proxies. This option is not limited to the HTTP
1546 <p>Only use this option, if you are getting lots of forwarding-related error messages that go away when
1547 you try again manually. Start with a small value and check Privoxy's logfile from time to time, to see
1548 how many retries are usually needed.</p>
1552 <p>forwarded-connect-retries 1</p>
1559 <h2 class="SECT2"><a name="MISC" id="MISC">7.6. Miscellaneous</a></h2>
1561 <h4 class="SECT3"><a name="ACCEPT-INTERCEPTED-REQUESTS" id="ACCEPT-INTERCEPTED-REQUESTS">7.6.1.
1562 accept-intercepted-requests</a></h4>
1563 <div class="VARIABLELIST">
1567 <p>Whether intercepted requests should be treated as valid.</p>
1569 <dt>Type of value:</dt>
1571 <p><tt class="REPLACEABLE"><i>0 or 1</i></tt></p>
1573 <dt>Default value:</dt>
1575 <p><span class="emphasis"><i class="EMPHASIS">0</i></span></p>
1577 <dt>Effect if unset:</dt>
1579 <p>Only proxy requests are accepted, intercepted requests are treated as invalid.</p>
1583 <p>If you don't trust your clients and want to force them to use <span class=
1584 "APPLICATION">Privoxy</span>, enable this option and configure your packet filter to redirect outgoing
1585 HTTP connections into <span class="APPLICATION">Privoxy</span>.</p>
1586 <p>Note that intercepting encrypted connections (HTTPS) isn't supported.</p>
1587 <p>Make sure that <span class="APPLICATION">Privoxy's</span> own requests aren't redirected as well.
1588 Additionally take care that <span class="APPLICATION">Privoxy</span> can't intentionally connect to
1589 itself, otherwise you could run into redirection loops if <span class="APPLICATION">Privoxy's</span>
1590 listening port is reachable by the outside or an attacker has access to the pages you visit.</p>
1591 <p>If you are running Privoxy as intercepting proxy without being able to intercept all client requests
1592 you may want to adjust the CGI templates to make sure they don't reference content from
1593 config.privoxy.org.</p>
1597 <p>accept-intercepted-requests 1</p>
1603 <h4 class="SECT3"><a name="ALLOW-CGI-REQUEST-CRUNCHING" id="ALLOW-CGI-REQUEST-CRUNCHING">7.6.2.
1604 allow-cgi-request-crunching</a></h4>
1605 <div class="VARIABLELIST">
1609 <p>Whether requests to <span class="APPLICATION">Privoxy's</span> CGI pages can be blocked or
1612 <dt>Type of value:</dt>
1614 <p><tt class="REPLACEABLE"><i>0 or 1</i></tt></p>
1616 <dt>Default value:</dt>
1618 <p><span class="emphasis"><i class="EMPHASIS">0</i></span></p>
1620 <dt>Effect if unset:</dt>
1622 <p><span class="APPLICATION">Privoxy</span> ignores block and redirect actions for its CGI pages.</p>
1626 <p>By default <span class="APPLICATION">Privoxy</span> ignores block or redirect actions for its CGI
1627 pages. Intercepting these requests can be useful in multi-user setups to implement fine-grained access
1628 control, but it can also render the complete web interface useless and make debugging problems painful if
1629 done without care.</p>
1630 <p>Don't enable this option unless you're sure that you really need it.</p>
1634 <p>allow-cgi-request-crunching 1</p>
1640 <h4 class="SECT3"><a name="SPLIT-LARGE-FORMS" id="SPLIT-LARGE-FORMS">7.6.3. split-large-forms</a></h4>
1641 <div class="VARIABLELIST">
1645 <p>Whether the CGI interface should stay compatible with broken HTTP clients.</p>
1647 <dt>Type of value:</dt>
1649 <p><tt class="REPLACEABLE"><i>0 or 1</i></tt></p>
1651 <dt>Default value:</dt>
1653 <p><span class="emphasis"><i class="EMPHASIS">0</i></span></p>
1655 <dt>Effect if unset:</dt>
1657 <p>The CGI form generate long GET URLs.</p>
1661 <p><span class="APPLICATION">Privoxy's</span> CGI forms can lead to rather long URLs. This isn't a
1662 problem as far as the HTTP standard is concerned, but it can confuse clients with arbitrary URL length
1664 <p>Enabling split-large-forms causes <span class="APPLICATION">Privoxy</span> to divide big forms into
1665 smaller ones to keep the URL length down. It makes editing a lot less convenient and you can no longer
1666 submit all changes at once, but at least it works around this browser bug.</p>
1667 <p>If you don't notice any editing problems, there is no reason to enable this option, but if one of the
1668 submit buttons appears to be broken, you should give it a try.</p>
1672 <p>split-large-forms 1</p>
1678 <h4 class="SECT3"><a name="KEEP-ALIVE-TIMEOUT" id="KEEP-ALIVE-TIMEOUT">7.6.4. keep-alive-timeout</a></h4>
1679 <div class="VARIABLELIST">
1683 <p>Number of seconds after which an open connection will no longer be reused.</p>
1685 <dt>Type of value:</dt>
1687 <p><tt class="REPLACEABLE"><i>Time in seconds.</i></tt></p>
1689 <dt>Default value:</dt>
1693 <dt>Effect if unset:</dt>
1695 <p>Connections are not kept alive.</p>
1699 <p>This option allows clients to keep the connection to <span class="APPLICATION">Privoxy</span> alive.
1700 If the server supports it, <span class="APPLICATION">Privoxy</span> will keep the connection to the
1701 server alive as well. Under certain circumstances this may result in speed-ups.</p>
1702 <p>By default, <span class="APPLICATION">Privoxy</span> will close the connection to the server if the
1703 client connection gets closed, or if the specified timeout has been reached without a new request coming
1704 in. This behaviour can be changed with the <a href="#CONNECTION-SHARING" target=
1705 "_top">connection-sharing</a> option.</p>
1706 <p>This option has no effect if <span class="APPLICATION">Privoxy</span> has been compiled without
1707 keep-alive support.</p>
1708 <p>Note that a timeout of five seconds as used in the default configuration file significantly decreases
1709 the number of connections that will be reused. The value is used because some browsers limit the number
1710 of connections they open to a single host and apply the same limit to proxies. This can result in a
1711 single website <span class="QUOTE">"grabbing"</span> all the connections the browser allows, which means
1712 connections to other websites can't be opened until the connections currently in use time out.</p>
1713 <p>Several users have reported this as a Privoxy bug, so the default value has been reduced. Consider
1714 increasing it to 300 seconds or even more if you think your browser can handle it. If your browser
1715 appears to be hanging, it probably can't.</p>
1719 <p>keep-alive-timeout 300</p>
1725 <h4 class="SECT3"><a name="TOLERATE-PIPELINING" id="TOLERATE-PIPELINING">7.6.5. tolerate-pipelining</a></h4>
1726 <div class="VARIABLELIST">
1730 <p>Whether or not pipelined requests should be served.</p>
1732 <dt>Type of value:</dt>
1734 <p><tt class="REPLACEABLE"><i>0 or 1.</i></tt></p>
1736 <dt>Default value:</dt>
1740 <dt>Effect if unset:</dt>
1742 <p>If Privoxy receives more than one request at once, it terminates the client connection after serving
1747 <p><span class="APPLICATION">Privoxy</span> currently doesn't pipeline outgoing requests, thus allowing
1748 pipelining on the client connection is not guaranteed to improve the performance.</p>
1749 <p>By default <span class="APPLICATION">Privoxy</span> tries to discourage clients from pipelining by
1750 discarding aggressively pipelined requests, which forces the client to resend them through a new
1752 <p>This option lets <span class="APPLICATION">Privoxy</span> tolerate pipelining. Whether or not that
1753 improves performance mainly depends on the client configuration.</p>
1754 <p>If you are seeing problems with pages not properly loading, disabling this option could work around
1759 <p>tolerate-pipelining 1</p>
1765 <h4 class="SECT3"><a name="DEFAULT-SERVER-TIMEOUT" id="DEFAULT-SERVER-TIMEOUT">7.6.6.
1766 default-server-timeout</a></h4>
1767 <div class="VARIABLELIST">
1771 <p>Assumed server-side keep-alive timeout if not specified by the server.</p>
1773 <dt>Type of value:</dt>
1775 <p><tt class="REPLACEABLE"><i>Time in seconds.</i></tt></p>
1777 <dt>Default value:</dt>
1781 <dt>Effect if unset:</dt>
1783 <p>Connections for which the server didn't specify the keep-alive timeout are not reused.</p>
1787 <p>Enabling this option significantly increases the number of connections that are reused, provided the
1788 <a href="#KEEP-ALIVE-TIMEOUT" target="_top">keep-alive-timeout</a> option is also enabled.</p>
1789 <p>While it also increases the number of connections problems when <span class=
1790 "APPLICATION">Privoxy</span> tries to reuse a connection that already has been closed on the server side,
1791 or is closed while <span class="APPLICATION">Privoxy</span> is trying to reuse it, this should only be a
1792 problem if it happens for the first request sent by the client. If it happens for requests on reused
1793 client connections, <span class="APPLICATION">Privoxy</span> will simply close the connection and the
1794 client is supposed to retry the request without bothering the user.</p>
1795 <p>Enabling this option is therefore only recommended if the <a href="#CONNECTION-SHARING" target=
1796 "_top">connection-sharing</a> option is disabled.</p>
1797 <p>It is an error to specify a value larger than the <a href="#KEEP-ALIVE-TIMEOUT" target=
1798 "_top">keep-alive-timeout</a> value.</p>
1799 <p>This option has no effect if <span class="APPLICATION">Privoxy</span> has been compiled without
1800 keep-alive support.</p>
1804 <p>default-server-timeout 60</p>
1810 <h4 class="SECT3"><a name="CONNECTION-SHARING" id="CONNECTION-SHARING">7.6.7. connection-sharing</a></h4>
1811 <div class="VARIABLELIST">
1815 <p>Whether or not outgoing connections that have been kept alive should be shared between different
1816 incoming connections.</p>
1818 <dt>Type of value:</dt>
1820 <p><tt class="REPLACEABLE"><i>0 or 1</i></tt></p>
1822 <dt>Default value:</dt>
1826 <dt>Effect if unset:</dt>
1828 <p>Connections are not shared.</p>
1832 <p>This option has no effect if <span class="APPLICATION">Privoxy</span> has been compiled without
1833 keep-alive support, or if it's disabled.</p>
1837 <p>Note that reusing connections doesn't necessary cause speedups. There are also a few privacy
1838 implications you should be aware of.</p>
1839 <p>If this option is effective, outgoing connections are shared between clients (if there are more than
1840 one) and closing the browser that initiated the outgoing connection does no longer affect the connection
1841 between <span class="APPLICATION">Privoxy</span> and the server unless the client's request hasn't been
1843 <p>If the outgoing connection is idle, it will not be closed until either <span class=
1844 "APPLICATION">Privoxy's</span> or the server's timeout is reached. While it's open, the server knows that
1845 the system running <span class="APPLICATION">Privoxy</span> is still there.</p>
1846 <p>If there are more than one client (maybe even belonging to multiple users), they will be able to reuse
1847 each others connections. This is potentially dangerous in case of authentication schemes like NTLM where
1848 only the connection is authenticated, instead of requiring authentication for each request.</p>
1849 <p>If there is only a single client, and if said client can keep connections alive on its own, enabling
1850 this option has next to no effect. If the client doesn't support connection keep-alive, enabling this
1851 option may make sense as it allows <span class="APPLICATION">Privoxy</span> to keep outgoing connections
1852 alive even if the client itself doesn't support it.</p>
1853 <p>You should also be aware that enabling this option increases the likelihood of getting the "No server
1854 or forwarder data" error message, especially if you are using a slow connection to the Internet.</p>
1855 <p>This option should only be used by experienced users who understand the risks and can weight them
1856 against the benefits.</p>
1860 <p>connection-sharing 1</p>
1866 <h4 class="SECT3"><a name="SOCKET-TIMEOUT" id="SOCKET-TIMEOUT">7.6.8. socket-timeout</a></h4>
1867 <div class="VARIABLELIST">
1871 <p>Number of seconds after which a socket times out if no data is received.</p>
1873 <dt>Type of value:</dt>
1875 <p><tt class="REPLACEABLE"><i>Time in seconds.</i></tt></p>
1877 <dt>Default value:</dt>
1881 <dt>Effect if unset:</dt>
1883 <p>A default value of 300 seconds is used.</p>
1887 <p>The default is quite high and you probably want to reduce it. If you aren't using an occasionally slow
1888 proxy like Tor, reducing it to a few seconds should be fine.</p>
1892 <p>socket-timeout 300</p>
1898 <h4 class="SECT3"><a name="MAX-CLIENT-CONNECTIONS" id="MAX-CLIENT-CONNECTIONS">7.6.9.
1899 max-client-connections</a></h4>
1900 <div class="VARIABLELIST">
1904 <p>Maximum number of client connections that will be served.</p>
1906 <dt>Type of value:</dt>
1908 <p><tt class="REPLACEABLE"><i>Positive number.</i></tt></p>
1910 <dt>Default value:</dt>
1914 <dt>Effect if unset:</dt>
1916 <p>Connections are served until a resource limit is reached.</p>
1920 <p><span class="APPLICATION">Privoxy</span> creates one thread (or process) for every incoming client
1921 connection that isn't rejected based on the access control settings.</p>
1922 <p>If the system is powerful enough, <span class="APPLICATION">Privoxy</span> can theoretically deal with
1923 several hundred (or thousand) connections at the same time, but some operating systems enforce resource
1924 limits by shutting down offending processes and their default limits may be below the ones <span class=
1925 "APPLICATION">Privoxy</span> would require under heavy load.</p>
1926 <p>Configuring <span class="APPLICATION">Privoxy</span> to enforce a connection limit below the thread or
1927 process limit used by the operating system makes sure this doesn't happen. Simply increasing the
1928 operating system's limit would work too, but if <span class="APPLICATION">Privoxy</span> isn't the only
1929 application running on the system, you may actually want to limit the resources used by <span class=
1930 "APPLICATION">Privoxy</span>.</p>
1931 <p>If <span class="APPLICATION">Privoxy</span> is only used by a single trusted user, limiting the number
1932 of client connections is probably unnecessary. If there are multiple possibly untrusted users you
1933 probably still want to additionally use a packet filter to limit the maximal number of incoming
1934 connections per client. Otherwise a malicious user could intentionally create a high number of
1935 connections to prevent other users from using <span class="APPLICATION">Privoxy</span>.</p>
1936 <p>Obviously using this option only makes sense if you choose a limit below the one enforced by the
1937 operating system.</p>
1938 <p>One most POSIX-compliant systems <span class="APPLICATION">Privoxy</span> can't properly deal with
1939 more than FD_SETSIZE file descriptors at the same time and has to reject connections if the limit is
1940 reached. This will likely change in a future version, but currently this limit can't be increased without
1941 recompiling <span class="APPLICATION">Privoxy</span> with a different FD_SETSIZE limit.</p>
1945 <p>max-client-connections 256</p>
1951 <h4 class="SECT3"><a name="LISTEN-BACKLOG" id="LISTEN-BACKLOG">7.6.10. listen-backlog</a></h4>
1952 <div class="VARIABLELIST">
1956 <p>Connection queue length requested from the operating system.</p>
1958 <dt>Type of value:</dt>
1960 <p><tt class="REPLACEABLE"><i>Number.</i></tt></p>
1962 <dt>Default value:</dt>
1966 <dt>Effect if unset:</dt>
1968 <p>A connection queue length of 128 is requested from the operating system.</p>
1972 <p>Under high load incoming connection may queue up before Privoxy gets around to serve them. The queue
1973 length is limited by the operating system. Once the queue is full, additional connections are dropped
1974 before Privoxy can accept and serve them.</p>
1975 <p>Increasing the queue length allows Privoxy to accept more incoming connections that arrive roughly at
1977 <p>Note that Privoxy can only request a certain queue length, whether or not the requested length is
1978 actually used depends on the operating system which may use a different length instead.</p>
1979 <p>On many operating systems a limit of -1 can be specified to instruct the operating system to use the
1980 maximum queue length allowed. Check the listen man page to see if your platform allows this.</p>
1981 <p>On some platforms you can use "netstat -Lan -p tcp" to see the effective queue length.</p>
1982 <p>Effectively using a value above 128 usually requires changing the system configuration as well. On
1983 FreeBSD-based system the limit is controlled by the kern.ipc.soacceptqueue sysctl.</p>
1987 <p>listen-backlog 4096</p>
1993 <h4 class="SECT3"><a name="ENABLE-ACCEPT-FILTER" id="ENABLE-ACCEPT-FILTER">7.6.11.
1994 enable-accept-filter</a></h4>
1995 <div class="VARIABLELIST">
1999 <p>Whether or not Privoxy should use an accept filter</p>
2001 <dt>Type of value:</dt>
2003 <p><tt class="REPLACEABLE"><i>0 or 1</i></tt></p>
2005 <dt>Default value:</dt>
2009 <dt>Effect if unset:</dt>
2011 <p>No accept filter is enabled.</p>
2015 <p>Accept filters reduce the number of context switches by not passing sockets for new connections to
2016 Privoxy until a complete HTTP request is available.</p>
2017 <p>As a result, Privoxy can process the whole request right away without having to wait for additional
2019 <p>For this option to work, Privoxy has to be compiled with FEATURE_ACCEPT_FILTER and the operating
2020 system has to support it (which may require loading a kernel module).</p>
2021 <p>Currently accept filters are only supported on FreeBSD-based systems. Check the <a href=
2022 "https://www.freebsd.org/cgi/man.cgi?query=accf_http" target="_top">accf_http(9) man page</a> to learn
2023 how to enable the support in the operating system.</p>
2027 <p>enable-accept-filter 1</p>
2033 <h4 class="SECT3"><a name="HANDLE-AS-EMPTY-DOC-RETURNS-OK" id="HANDLE-AS-EMPTY-DOC-RETURNS-OK">7.6.12.
2034 handle-as-empty-doc-returns-ok</a></h4>
2035 <div class="VARIABLELIST">
2039 <p>The status code Privoxy returns for pages blocked with <tt class="LITERAL"><a href=
2040 "actions-file.html#HANDLE-AS-EMPTY-DOCUMENT" target="_top">+handle-as-empty-document</a></tt>.</p>
2042 <dt>Type of value:</dt>
2044 <p><tt class="REPLACEABLE"><i>0 or 1</i></tt></p>
2046 <dt>Default value:</dt>
2050 <dt>Effect if unset:</dt>
2052 <p>Privoxy returns a status 403(forbidden) for all blocked pages.</p>
2054 <dt>Effect if set:</dt>
2056 <p>Privoxy returns a status 200(OK) for pages blocked with +handle-as-empty-document and a status
2057 403(Forbidden) for all other blocked pages.</p>
2061 <p>This directive was added as a work-around for Firefox bug 492459: <span class="QUOTE">"Websites are no
2062 longer rendered if SSL requests for JavaScripts are blocked by a proxy."</span> ( <a href=
2063 "https://bugzilla.mozilla.org/show_bug.cgi?id=492459" target=
2064 "_top">https://bugzilla.mozilla.org/show_bug.cgi?id=492459</a>), the bug has been fixed for quite some
2065 time, but this directive is also useful to make it harder for websites to detect whether or not resources
2066 are being blocked.</p>
2072 <h4 class="SECT3"><a name="ENABLE-COMPRESSION" id="ENABLE-COMPRESSION">7.6.13. enable-compression</a></h4>
2073 <div class="VARIABLELIST">
2077 <p>Whether or not buffered content is compressed before delivery.</p>
2079 <dt>Type of value:</dt>
2081 <p><tt class="REPLACEABLE"><i>0 or 1</i></tt></p>
2083 <dt>Default value:</dt>
2087 <dt>Effect if unset:</dt>
2089 <p>Privoxy does not compress buffered content.</p>
2091 <dt>Effect if set:</dt>
2093 <p>Privoxy compresses buffered content before delivering it to the client, provided the client supports
2098 <p>This directive is only supported if Privoxy has been compiled with FEATURE_COMPRESSION, which should
2099 not to be confused with FEATURE_ZLIB.</p>
2100 <p>Compressing buffered content is mainly useful if Privoxy and the client are running on different
2101 systems. If they are running on the same system, enabling compression is likely to slow things down. If
2102 you didn't measure otherwise, you should assume that it does and keep this option disabled.</p>
2103 <p>Privoxy will not compress buffered content below a certain length.</p>
2109 <h4 class="SECT3"><a name="COMPRESSION-LEVEL" id="COMPRESSION-LEVEL">7.6.14. compression-level</a></h4>
2110 <div class="VARIABLELIST">
2114 <p>The compression level that is passed to the zlib library when compressing buffered content.</p>
2116 <dt>Type of value:</dt>
2118 <p><tt class="REPLACEABLE"><i>Positive number ranging from 0 to 9.</i></tt></p>
2120 <dt>Default value:</dt>
2126 <p>Compressing the data more takes usually longer than compressing it less or not compressing it at all.
2127 Which level is best depends on the connection between Privoxy and the client. If you can't be bothered to
2128 benchmark it for yourself, you should stick with the default and keep compression disabled.</p>
2129 <p>If compression is disabled, the compression level is irrelevant.</p>
2133 <table border="0" bgcolor="#E0E0E0" width="90%">
2136 <pre class="SCREEN"> # Best speed (compared to the other levels)
2142 # No compression. Only useful for testing as the added header
2143 # slightly increases the amount of data that has to be sent.
2144 # If your benchmark shows that using this compression level
2145 # is superior to using no compression at all, the benchmark
2146 # is likely to be flawed.
2147 compression-level 0</pre>
2156 <h4 class="SECT3"><a name="CLIENT-HEADER-ORDER" id="CLIENT-HEADER-ORDER">7.6.15. client-header-order</a></h4>
2157 <div class="VARIABLELIST">
2161 <p>The order in which client headers are sorted before forwarding them.</p>
2163 <dt>Type of value:</dt>
2165 <p><tt class="REPLACEABLE"><i>Client header names delimited by spaces or tabs</i></tt></p>
2167 <dt>Default value:</dt>
2173 <p>By default <span class="APPLICATION">Privoxy</span> leaves the client headers in the order they were
2174 sent by the client. Headers are modified in-place, new headers are added at the end of the already
2175 existing headers.</p>
2176 <p>The header order can be used to fingerprint client requests independently of other headers like the
2178 <p>This directive allows to sort the headers differently to better mimic a different User-Agent. Client
2179 headers will be emitted in the order given, headers whose name isn't explicitly specified are added at
2181 <p>Note that sorting headers in an uncommon way will make fingerprinting actually easier. Encrypted
2182 headers are not affected by this directive.</p>
2188 <h4 class="SECT3"><a name="CLIENT-SPECIFIC-TAG" id="CLIENT-SPECIFIC-TAG">7.6.16. client-specific-tag</a></h4>
2189 <div class="VARIABLELIST">
2193 <p>The name of a tag that will always be set for clients that requested it through the webinterface.</p>
2195 <dt>Type of value:</dt>
2197 <p><tt class="REPLACEABLE"><i>Tag name followed by a description that will be shown in the
2198 webinterface</i></tt></p>
2200 <dt>Default value:</dt>
2206 <div class="WARNING">
2207 <table class="WARNING" border="1" width="90%">
2209 <td align="center"><b>Warning</b></td>
2213 <p>This is an experimental feature. The syntax is likely to change in future versions.</p>
2218 <p>Client-specific tags allow Privoxy admins to create different profiles and let the users chose which
2219 one they want without impacting other users.</p>
2220 <p>One use case is allowing users to circumvent certain blocks without having to allow them to circumvent
2221 all blocks. This is not possible with the <a href="config.html#ENABLE-REMOTE-TOGGLE">enable-remote-toggle
2222 feature</a> because it would bluntly disable all blocks for all users and also affect other actions like
2223 filters. It also is set globally which renders it useless in most multi-user setups.</p>
2224 <p>After a client-specific tag has been defined with the client-specific-tag directive, action sections
2225 can be activated based on the tag by using a <a href="actions-file.html#CLIENT-TAG-PATTERN" target=
2226 "_top">CLIENT-TAG</a> pattern. The CLIENT-TAG pattern is evaluated at the same priority as URL patterns,
2227 as a result the last matching pattern wins. Tags that are created based on client or server headers are
2228 evaluated later on and can overrule CLIENT-TAG and URL patterns!</p>
2229 <p>The tag is set for all requests that come from clients that requested it to be set. Note that
2230 "clients" are differentiated by IP address, if the IP address changes the tag has to be requested
2232 <p>Clients can request tags to be set by using the CGI interface <a href=
2233 "http://config.privoxy.org/client-tags" target="_top">http://config.privoxy.org/client-tags</a>. The
2234 specific tag description is only used on the web page and should be phrased in away that the user
2235 understand the effect of the tag.</p>
2239 <table border="0" bgcolor="#E0E0E0" width="90%">
2242 <pre class="SCREEN"> # Define a couple of tags, the described effect requires action sections
2243 # that are enabled based on CLIENT-TAG patterns.
2244 client-specific-tag circumvent-blocks Overrule blocks but do not affect other actions
2245 client-specific-tag disable-content-filters Disable content-filters but do not affect other actions</pre>
2254 <h4 class="SECT3"><a name="CLIENT-TAG-LIFETIME" id="CLIENT-TAG-LIFETIME">7.6.17. client-tag-lifetime</a></h4>
2255 <div class="VARIABLELIST">
2259 <p>How long a temporarily enabled tag remains enabled.</p>
2261 <dt>Type of value:</dt>
2263 <p><tt class="REPLACEABLE"><i>Time in seconds.</i></tt></p>
2265 <dt>Default value:</dt>
2271 <div class="WARNING">
2272 <table class="WARNING" border="1" width="90%">
2274 <td align="center"><b>Warning</b></td>
2278 <p>This is an experimental feature. The syntax is likely to change in future versions.</p>
2283 <p>In case of some tags users may not want to enable them permanently, but only for a short amount of
2284 time, for example to circumvent a block that is the result of an overly-broad URL pattern.</p>
2285 <p>The CGI interface <a href="http://config.privoxy.org/client-tags" target=
2286 "_top">http://config.privoxy.org/client-tags</a> therefore provides a "enable this tag temporarily"
2287 option. If it is used, the tag will be set until the client-tag-lifetime is over.</p>
2291 <table border="0" bgcolor="#E0E0E0" width="90%">
2294 <pre class="SCREEN"> # Increase the time to life for temporarily enabled tags to 3 minutes
2295 client-tag-lifetime 180</pre>
2304 <h4 class="SECT3"><a name="TRUST-X-FORWARDED-FOR" id="TRUST-X-FORWARDED-FOR">7.6.18.
2305 trust-x-forwarded-for</a></h4>
2306 <div class="VARIABLELIST">
2310 <p>Whether or not Privoxy should use IP addresses specified with the X-Forwarded-For header</p>
2312 <dt>Type of value:</dt>
2314 <p><tt class="REPLACEABLE"><i>0 or one</i></tt></p>
2316 <dt>Default value:</dt>
2322 <div class="WARNING">
2323 <table class="WARNING" border="1" width="90%">
2325 <td align="center"><b>Warning</b></td>
2329 <p>This is an experimental feature. The syntax is likely to change in future versions.</p>
2334 <p>If clients reach Privoxy through another proxy, for example a load balancer, Privoxy can't tell the
2335 client's IP address from the connection. If multiple clients use the same proxy, they will share the same
2336 client tag settings which is usually not desired.</p>
2337 <p>This option lets Privoxy use the X-Forwarded-For header value as client IP address. If the proxy sets
2338 the header, multiple clients using the same proxy do not share the same client tag settings.</p>
2339 <p>This option should only be enabled if Privoxy can only be reached through a proxy and if the proxy can
2340 be trusted to set the header correctly. It is recommended that ACL are used to make sure only trusted
2341 systems can reach Privoxy.</p>
2342 <p>If access to Privoxy isn't limited to trusted systems, this option would allow malicious clients to
2343 change the client tags for other clients or increase Privoxy's memory requirements by registering lots of
2344 client tag settings for clients that don't exist.</p>
2348 <table border="0" bgcolor="#E0E0E0" width="90%">
2351 <pre class="SCREEN"> # Allow systems that can reach Privoxy to provide the client
2352 # IP address with a X-Forwarded-For header.
2353 trust-x-forwarded-for 1</pre>
2362 <h4 class="SECT3"><a name="RECEIVE-BUFFER-SIZE" id="RECEIVE-BUFFER-SIZE">7.6.19. receive-buffer-size</a></h4>
2363 <div class="VARIABLELIST">
2367 <p>The size of the buffer Privoxy uses to receive data from the server.</p>
2369 <dt>Type of value:</dt>
2371 <p><tt class="REPLACEABLE"><i>Size in bytes</i></tt></p>
2373 <dt>Default value:</dt>
2379 <p>Increasing the receive-buffer-size increases Privoxy's memory usage but can lower the number of
2380 context switches and thereby reduce the cpu usage and potentially increase the throughput.</p>
2381 <p>This is mostly relevant for fast network connections and large downloads that don't require
2383 <p>Reducing the buffer size reduces the amount of memory Privoxy needs to handle the request but
2384 increases the number of systemcalls and may reduce the throughput.</p>
2385 <p>A dtrace command like: <span class="QUOTE">"sudo dtrace -n 'syscall::read:return /execname ==
2386 "privoxy"/ { @[execname] = llquantize(arg0, 10, 0, 5, 20); @m = max(arg0)}'"</span> can be used to
2387 properly tune the receive-buffer-size. On systems without dtrace, strace or truss may be used as less
2388 convenient alternatives.</p>
2389 <p>If the buffer is too large it will increase Privoxy's memory footprint without any benefit. As the
2390 memory is (currently) cleared before using it, a buffer that is too large can actually reduce the
2395 <table border="0" bgcolor="#E0E0E0" width="90%">
2398 <pre class="SCREEN"> # Increase the receive buffer size
2399 receive-buffer-size 32768</pre>
2409 <h2 class="SECT2"><a name="HTTPS-INSPECTION-DIRECTIVES" id="HTTPS-INSPECTION-DIRECTIVES">7.7. HTTPS Inspection
2410 (Experimental)</a></h2>
2411 <p>HTTPS inspection allows to filter encrypted requests. This is only supported when <span class=
2412 "APPLICATION">Privoxy</span> has been built with FEATURE_HTTPS_INSPECTION.</p>
2414 <h4 class="SECT3"><a name="CA-DIRECTORY" id="CA-DIRECTORY">7.7.1. ca-directory</a></h4>
2415 <div class="VARIABLELIST">
2419 <p>Directory with the CA key, the CA certificate and the trusted CAs file.</p>
2421 <dt>Type of value:</dt>
2425 <dt>Default value:</dt>
2427 <p><span class="emphasis"><i class="EMPHASIS">Empty string</i></span></p>
2429 <dt>Effect if unset:</dt>
2431 <p>Default value is used.</p>
2435 <p>This directive specifies the directory where the CA key, the CA certificate and the trusted CAs file
2437 <p>The permissions should only let <span class="APPLICATION">Privoxy</span> and the <span class=
2438 "APPLICATION">Privoxy</span> admin access the directory.</p>
2442 <p>ca-directory /usr/local/etc/privoxy/CA</p>
2448 <h4 class="SECT3"><a name="CA-CERT-FILE" id="CA-CERT-FILE">7.7.2. ca-cert-file</a></h4>
2449 <div class="VARIABLELIST">
2453 <p>The CA certificate file in ".crt" format.</p>
2455 <dt>Type of value:</dt>
2459 <dt>Default value:</dt>
2461 <p><span class="emphasis"><i class="EMPHASIS">cacert.crt</i></span></p>
2463 <dt>Effect if unset:</dt>
2465 <p>Default value is used.</p>
2469 <p>This directive specifies the name of the CA certificate file in ".crt" format.</p>
2470 <p>The file is used by <span class="APPLICATION">Privoxy</span> to generate website certificates when
2471 https inspection is enabled with the <tt class="LITERAL"><a href="actions-file.html#HTTPS-INSPECTION"
2472 target="_top">https-inspection</a></tt> action.</p>
2473 <p><span class="APPLICATION">Privoxy</span> clients should import the certificate so that they can
2474 validate the generated certificates.</p>
2475 <p>The file can be generated with: openssl req -new -x509 -extensions v3_ca -keyout cakey.pem -out
2476 cacert.crt -days 3650</p>
2480 <p>ca-cert-file root.crt</p>
2486 <h4 class="SECT3"><a name="CA-KEY-FILE" id="CA-KEY-FILE">7.7.3. ca-key-file</a></h4>
2487 <div class="VARIABLELIST">
2491 <p>The CA key file in ".pem" format.</p>
2493 <dt>Type of value:</dt>
2497 <dt>Default value:</dt>
2499 <p><span class="emphasis"><i class="EMPHASIS">cacert.pem</i></span></p>
2501 <dt>Effect if unset:</dt>
2503 <p>Default value is used.</p>
2507 <p>This directive specifies the name of the CA key file in ".pem" format. See the <a href="#CA-CERT-FILE"
2508 target="_top">ca-cert-file</a> for a command to generate it.</p>
2512 <p>ca-key-file cakey.pem</p>
2518 <h4 class="SECT3"><a name="CA-PASSWORD" id="CA-PASSWORD">7.7.4. ca-password</a></h4>
2519 <div class="VARIABLELIST">
2523 <p>The password for the CA keyfile.</p>
2525 <dt>Type of value:</dt>
2529 <dt>Default value:</dt>
2531 <p><span class="emphasis"><i class="EMPHASIS">Empty string</i></span></p>
2533 <dt>Effect if unset:</dt>
2535 <p>Default value is used.</p>
2539 <p>This directive specifies the password for the CA keyfile that is used when Privoxy generates
2540 certificates for intercepted requests.</p>
2541 <p>Note that the password is shown on the CGI page so don't reuse an important one.</p>
2545 <p>ca-password blafasel</p>
2551 <h4 class="SECT3"><a name="CERTIFICATE-DIRECTORY" id="CERTIFICATE-DIRECTORY">7.7.5.
2552 certificate-directory</a></h4>
2553 <div class="VARIABLELIST">
2557 <p>Directory to save generated keys and certificates.</p>
2559 <dt>Type of value:</dt>
2563 <dt>Default value:</dt>
2565 <p><span class="emphasis"><i class="EMPHASIS">./certs</i></span></p>
2567 <dt>Effect if unset:</dt>
2569 <p>Default value is used.</p>
2573 <p>This directive specifies the directory where generated TLS/SSL keys and certificates are saved when
2574 https inspection is enabled with the <tt class="LITERAL"><a href="actions-file.html#HTTPS-INSPECTION"
2575 target="_top">https-inspection</a></tt> action.</p>
2576 <p>The keys and certificates currently have to be deleted manually when changing the <a href=
2577 "#CA-CERT-FILE" target="_top">ca-cert-file</a> and the <a href="#CA-CERT-KEY" target=
2578 "_top">ca-cert-key</a>.</p>
2579 <p>The permissions should only let <span class="APPLICATION">Privoxy</span> and the <span class=
2580 "APPLICATION">Privoxy</span> admin access the directory.</p>
2581 <div class="WARNING">
2582 <table class="WARNING" border="1" width="90%">
2584 <td align="center"><b>Warning</b></td>
2588 <p><span class="APPLICATION">Privoxy</span> currently does not garbage-collect obsolete keys and
2589 certificates and does not keep track of how may keys and certificates exist.</p>
2590 <p><span class="APPLICATION">Privoxy</span> admins should monitor the size of the directory
2591 and/or make sure there is sufficient space available. A cron job to limit the number of keys and
2592 certificates to a certain number may be worth considering.</p>
2600 <p>certificate-directory /usr/local/var/privoxy/certs</p>
2606 <h4 class="SECT3"><a name="CIPHER-LIST" id="CIPHER-LIST">7.7.6. cipher-list</a></h4>
2607 <div class="VARIABLELIST">
2611 <p>A list of ciphers to use in TLS handshakes</p>
2613 <dt>Type of value:</dt>
2617 <dt>Default value:</dt>
2621 <dt>Effect if unset:</dt>
2623 <p>A default value is inherited from the TLS library.</p>
2627 <p>This directive allows to specify a non-default list of ciphers to use in TLS handshakes with clients
2629 <p>Ciphers are separated by colons. Which ciphers are supported depends on the TLS library. When using
2630 OpenSSL, unsupported ciphers are skipped. When using MbedTLS they are rejected.</p>
2631 <div class="WARNING">
2632 <table class="WARNING" border="1" width="90%">
2634 <td align="center"><b>Warning</b></td>
2638 <p>Specifying an unusual cipher list makes fingerprinting easier. Note that the default list
2639 provided by the TLS library may be unusual when compared to the one used by modern browsers as
2648 <table border="0" bgcolor="#E0E0E0" width="90%">
2651 <pre class="SCREEN"> # Explicitly set a couple of ciphers with names used by MbedTLS
2652 cipher-list cipher-list TLS-ECDHE-RSA-WITH-CHACHA20-POLY1305-SHA256:\
2653 TLS-ECDHE-ECDSA-WITH-CHACHA20-POLY1305-SHA256:\
2654 TLS-DHE-RSA-WITH-CHACHA20-POLY1305-SHA256:\
2655 TLS-ECDHE-ECDSA-WITH-AES-128-GCM-SHA256:\
2656 TLS-ECDHE-ECDSA-WITH-AES-256-GCM-SHA384:\
2657 TLS-ECDHE-ECDSA-WITH-AES-256-CCM:\
2658 TLS-ECDHE-ECDSA-WITH-AES-256-CCM-8:\
2659 TLS-ECDHE-ECDSA-WITH-AES-128-CCM:\
2660 TLS-ECDHE-ECDSA-WITH-AES-128-CCM-8:\
2661 TLS-ECDHE-ECDSA-WITH-CAMELLIA-128-GCM-SHA256:\
2662 TLS-ECDHE-ECDSA-WITH-CAMELLIA-256-GCM-SHA384:\
2663 TLS-ECDHE-RSA-WITH-AES-128-GCM-SHA256:\
2664 TLS-ECDHE-RSA-WITH-AES-256-GCM-SHA384:\
2665 TLS-ECDHE-RSA-WITH-CAMELLIA-128-GCM-SHA256:\
2666 TLS-ECDHE-RSA-WITH-CAMELLIA-256-GCM-SHA384:\
2667 TLS-DHE-RSA-WITH-AES-256-GCM-SHA384:\
2668 TLS-DHE-RSA-WITH-AES-128-GCM-SHA256:\
2669 TLS-DHE-RSA-WITH-AES-256-CCM:\
2670 TLS-DHE-RSA-WITH-AES-256-CCM-8:\
2671 TLS-DHE-RSA-WITH-AES-128-CCM:\
2672 TLS-DHE-RSA-WITH-AES-128-CCM-8:\
2673 TLS-DHE-RSA-WITH-CAMELLIA-128-GCM-SHA256:\
2674 TLS-DHE-RSA-WITH-CAMELLIA-256-GCM-SHA384:\
2675 TLS-ECDH-RSA-WITH-AES-128-GCM-SHA256:\
2676 TLS-ECDH-RSA-WITH-AES-256-GCM-SHA384:\
2677 TLS-ECDH-RSA-WITH-CAMELLIA-128-GCM-SHA256:\
2678 TLS-ECDH-RSA-WITH-CAMELLIA-256-GCM-SHA384:\
2679 TLS-ECDH-ECDSA-WITH-AES-128-GCM-SHA256:\
2680 TLS-ECDH-ECDSA-WITH-AES-256-GCM-SHA384:\
2681 TLS-ECDH-ECDSA-WITH-CAMELLIA-128-GCM-SHA256:\
2682 TLS-ECDH-ECDSA-WITH-CAMELLIA-256-GCM-SHA384
2687 <table border="0" bgcolor="#E0E0E0" width="90%">
2690 <pre class="SCREEN"> # Explicitly set a couple of ciphers with names used by OpenSSL
2691 cipher-list ECDHE-RSA-AES256-GCM-SHA384:\
2692 ECDHE-ECDSA-AES256-GCM-SHA384:\
2693 DH-DSS-AES256-GCM-SHA384:\
2694 DHE-DSS-AES256-GCM-SHA384:\
2695 DH-RSA-AES256-GCM-SHA384:\
2696 DHE-RSA-AES256-GCM-SHA384:\
2697 ECDH-RSA-AES256-GCM-SHA384:\
2698 ECDH-ECDSA-AES256-GCM-SHA384:\
2699 ECDHE-RSA-AES128-GCM-SHA256:\
2700 ECDHE-ECDSA-AES128-GCM-SHA256:\
2701 DH-DSS-AES128-GCM-SHA256:\
2702 DHE-DSS-AES128-GCM-SHA256:\
2703 DH-RSA-AES128-GCM-SHA256:\
2704 DHE-RSA-AES128-GCM-SHA256:\
2705 ECDH-RSA-AES128-GCM-SHA256:\
2706 ECDH-ECDSA-AES128-GCM-SHA256:\
2707 ECDHE-RSA-AES256-GCM-SHA384:\
2713 <table border="0" bgcolor="#E0E0E0" width="90%">
2717 "SCREEN"> # Use keywords instead of explicity naming the ciphers (Does not work with MbedTLS)
2718 cipher-list ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
2728 <h4 class="SECT3"><a name="TRUSTED-CAS-FILE" id="TRUSTED-CAS-FILE">7.7.7. trusted-cas-file</a></h4>
2729 <div class="VARIABLELIST">
2733 <p>The trusted CAs file in ".pem" format.</p>
2735 <dt>Type of value:</dt>
2737 <p>File name relative to ca-directory</p>
2739 <dt>Default value:</dt>
2741 <p><span class="emphasis"><i class="EMPHASIS">trustedCAs.pem</i></span></p>
2743 <dt>Effect if unset:</dt>
2745 <p>Default value is used.</p>
2749 <p>This directive specifies the trusted CAs file that is used when validating certificates for
2750 intercepted TLS/SSL requests.</p>
2751 <p>An example file can be downloaded from <a href="https://curl.haxx.se/ca/cacert.pem" target=
2752 "_top">https://curl.haxx.se/ca/cacert.pem</a>.</p>
2756 <p>trusted-cas-file trusted_cas_file.pem</p>
2763 <h2 class="SECT2"><a name="WINDOWS-GUI" id="WINDOWS-GUI">7.8. Windows GUI Options</a></h2>
2764 <p><span class="APPLICATION">Privoxy</span> has a number of options specific to the Windows GUI
2765 interface:</p><a name="ACTIVITY-ANIMATION" id="ACTIVITY-ANIMATION"></a>
2766 <p>If <span class="QUOTE">"activity-animation"</span> is set to 1, the <span class="APPLICATION">Privoxy</span>
2767 icon will animate when <span class="QUOTE">"Privoxy"</span> is active. To turn off, set to 0.</p>
2768 <p class="LITERALLAYOUT"> <span class="emphasis"><i class="EMPHASIS">activity-animation
2769 1</i></span></p><a name="LOG-MESSAGES" id="LOG-MESSAGES"></a>
2770 <p>If <span class="QUOTE">"log-messages"</span> is set to 1, <span class="APPLICATION">Privoxy</span> copies log
2771 messages to the console window. The log detail depends on the <a href="config.html#DEBUG">debug</a>
2773 <p class="LITERALLAYOUT"> <span class="emphasis"><i class="EMPHASIS">log-messages
2774 1</i></span></p><a name="LOG-BUFFER-SIZE" id="LOG-BUFFER-SIZE"></a>
2775 <p>If <span class="QUOTE">"log-buffer-size"</span> is set to 1, the size of the log buffer, i.e. the amount of
2776 memory used for the log messages displayed in the console window, will be limited to <span class=
2777 "QUOTE">"log-max-lines"</span> (see below).</p>
2778 <p>Warning: Setting this to 0 will result in the buffer to grow infinitely and eat up all your memory!</p>
2779 <p class="LITERALLAYOUT"> <span class="emphasis"><i class="EMPHASIS">log-buffer-size
2780 1</i></span></p><a name="LOG-MAX-LINES" id="LOG-MAX-LINES"></a>
2781 <p><span class="APPLICATION">log-max-lines</span> is the maximum number of lines held in the log buffer. See
2783 <p class="LITERALLAYOUT"> <span class="emphasis"><i class="EMPHASIS">log-max-lines
2784 200</i></span></p><a name="LOG-HIGHLIGHT-MESSAGES" id="LOG-HIGHLIGHT-MESSAGES"></a>
2785 <p>If <span class="QUOTE">"log-highlight-messages"</span> is set to 1, <span class="APPLICATION">Privoxy</span>
2786 will highlight portions of the log messages with a bold-faced font:</p>
2787 <p class="LITERALLAYOUT"> <span class="emphasis"><i class="EMPHASIS">log-highlight-messages
2788 1</i></span></p><a name="LOG-FONT-NAME" id="LOG-FONT-NAME"></a>
2789 <p>The font used in the console window:</p>
2790 <p class="LITERALLAYOUT"> <span class="emphasis"><i class="EMPHASIS">log-font-name Comic Sans
2791 MS</i></span></p><a name="LOG-FONT-SIZE" id="LOG-FONT-SIZE"></a>
2792 <p>Font size used in the console window:</p>
2793 <p class="LITERALLAYOUT"> <span class="emphasis"><i class="EMPHASIS">log-font-size
2794 8</i></span></p><a name="SHOW-ON-TASK-BAR" id="SHOW-ON-TASK-BAR"></a>
2795 <p><span class="QUOTE">"show-on-task-bar"</span> controls whether or not <span class="APPLICATION">Privoxy</span>
2796 will appear as a button on the Task bar when minimized:</p>
2797 <p class="LITERALLAYOUT"> <span class="emphasis"><i class="EMPHASIS">show-on-task-bar
2798 0</i></span></p><a name="CLOSE-BUTTON-MINIMIZES" id="CLOSE-BUTTON-MINIMIZES"></a>
2799 <p>If <span class="QUOTE">"close-button-minimizes"</span> is set to 1, the Windows close button will minimize
2800 <span class="APPLICATION">Privoxy</span> instead of closing the program (close with the exit option on the File