Rebuild user manual with typo fix
[privoxy.git] / doc / webserver / user-manual / config.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2 "http://www.w3.org/TR/html4/loose.dtd">
3 <html>
4 <head>
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">
13 </head>
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">
17       <tr>
18         <th colspan="3" align="center">Privoxy 3.0.29 User Manual</th>
19       </tr>
20       <tr>
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>
24       </tr>
25     </table>
26     <hr align="left" width="100%">
27   </div>
28   <div class="SECT1">
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">&nbsp;&nbsp;<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
41     notepad.exe.</p>
42     <div class="SECT2">
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>
46       <div class="SECT3">
47         <h4 class="SECT3"><a name="USER-MANUAL" id="USER-MANUAL">7.1.1. user-manual</a></h4>
48         <div class="VARIABLELIST">
49           <dl>
50             <dt>Specifies:</dt>
51             <dd>
52               <p>Location of the <span class="APPLICATION">Privoxy</span> User Manual.</p>
53             </dd>
54             <dt>Type of value:</dt>
55             <dd>
56               <p>A fully qualified URI</p>
57             </dd>
58             <dt>Default value:</dt>
59             <dd>
60               <p><span class="emphasis"><i class="EMPHASIS">Unset</i></span></p>
61             </dd>
62             <dt>Effect if unset:</dt>
63             <dd>
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>
67             </dd>
68             <dt>Notes:</dt>
69             <dd>
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
73               installed copy.</p>
74               <p>Examples:</p>
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%">
78                 <tr>
79                   <td>
80                     <pre class="SCREEN">  user-manual  /usr/share/doc/privoxy/user-manual</pre>
81                   </td>
82                 </tr>
83               </table>
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%">
89                 <tr>
90                   <td>
91                     <pre class="SCREEN">  user-manual  http://example.com/privoxy/user-manual/</pre>
92                   </td>
93                 </tr>
94               </table>
95               <div class="WARNING">
96                 <table class="WARNING" border="1" width="90%">
97                   <tr>
98                     <td align="center"><b>Warning</b></td>
99                   </tr>
100                   <tr>
101                     <td align="left">
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
104                       start-up.</p>
105                     </td>
106                   </tr>
107                 </table>
108               </div>
109             </dd>
110           </dl>
111         </div>
112       </div>
113       <div class="SECT3">
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">
116           <dl>
117             <dt>Specifies:</dt>
118             <dd>
119               <p>A URL to be displayed in the error page that users will see if access to an untrusted page is
120               denied.</p>
121             </dd>
122             <dt>Type of value:</dt>
123             <dd>
124               <p>URL</p>
125             </dd>
126             <dt>Default value:</dt>
127             <dd>
128               <p><span class="emphasis"><i class="EMPHASIS">Unset</i></span></p>
129             </dd>
130             <dt>Effect if unset:</dt>
131             <dd>
132               <p>No links are displayed on the "untrusted" error page.</p>
133             </dd>
134             <dt>Notes:</dt>
135             <dd>
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>
138               below.)</p>
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>
143             </dd>
144           </dl>
145         </div>
146       </div>
147       <div class="SECT3">
148         <h4 class="SECT3"><a name="ADMIN-ADDRESS" id="ADMIN-ADDRESS">7.1.3. admin-address</a></h4>
149         <div class="VARIABLELIST">
150           <dl>
151             <dt>Specifies:</dt>
152             <dd>
153               <p>An email address to reach the <span class="APPLICATION">Privoxy</span> administrator.</p>
154             </dd>
155             <dt>Type of value:</dt>
156             <dd>
157               <p>Email address</p>
158             </dd>
159             <dt>Default value:</dt>
160             <dd>
161               <p><span class="emphasis"><i class="EMPHASIS">Unset</i></span></p>
162             </dd>
163             <dt>Effect if unset:</dt>
164             <dd>
165               <p>No email address is displayed on error pages and the CGI user interface.</p>
166             </dd>
167             <dt>Notes:</dt>
168             <dd>
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>
171             </dd>
172           </dl>
173         </div>
174       </div>
175       <div class="SECT3">
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">
178           <dl>
179             <dt>Specifies:</dt>
180             <dd>
181               <p>A URL to documentation about the local <span class="APPLICATION">Privoxy</span> setup, configuration
182               or policies.</p>
183             </dd>
184             <dt>Type of value:</dt>
185             <dd>
186               <p>URL</p>
187             </dd>
188             <dt>Default value:</dt>
189             <dd>
190               <p><span class="emphasis"><i class="EMPHASIS">Unset</i></span></p>
191             </dd>
192             <dt>Effect if unset:</dt>
193             <dd>
194               <p>No link to local documentation is displayed on error pages and the CGI user interface.</p>
195             </dd>
196             <dt>Notes:</dt>
197             <dd>
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>
201             </dd>
202           </dl>
203         </div>
204       </div>
205     </div>
206     <div class="SECT2">
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>
213       <div class="SECT3">
214         <h4 class="SECT3"><a name="CONFDIR" id="CONFDIR">7.2.1. confdir</a></h4>
215         <div class="VARIABLELIST">
216           <dl>
217             <dt>Specifies:</dt>
218             <dd>
219               <p>The directory where the other configuration files are located.</p>
220             </dd>
221             <dt>Type of value:</dt>
222             <dd>
223               <p>Path name</p>
224             </dd>
225             <dt>Default value:</dt>
226             <dd>
227               <p>/etc/privoxy (Unix) <span class="emphasis"><i class="EMPHASIS">or</i></span> <span class=
228               "APPLICATION">Privoxy</span> installation dir (Windows)</p>
229             </dd>
230             <dt>Effect if unset:</dt>
231             <dd>
232               <p><span class="emphasis"><i class="EMPHASIS">Mandatory</i></span></p>
233             </dd>
234             <dt>Notes:</dt>
235             <dd>
236               <p>No trailing <span class="QUOTE">"<tt class="LITERAL">/</tt>"</span>, please.</p>
237             </dd>
238           </dl>
239         </div>
240       </div>
241       <div class="SECT3">
242         <h4 class="SECT3"><a name="TEMPLDIR" id="TEMPLDIR">7.2.2. templdir</a></h4>
243         <div class="VARIABLELIST">
244           <dl>
245             <dt>Specifies:</dt>
246             <dd>
247               <p>An alternative directory where the templates are loaded from.</p>
248             </dd>
249             <dt>Type of value:</dt>
250             <dd>
251               <p>Path name</p>
252             </dd>
253             <dt>Default value:</dt>
254             <dd>
255               <p>unset</p>
256             </dd>
257             <dt>Effect if unset:</dt>
258             <dd>
259               <p>The templates are assumed to be located in confdir/template.</p>
260             </dd>
261             <dt>Notes:</dt>
262             <dd>
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>
267             </dd>
268           </dl>
269         </div>
270       </div>
271       <div class="SECT3">
272         <h4 class="SECT3"><a name="TEMPORARY-DIRECTORY" id="TEMPORARY-DIRECTORY">7.2.3. temporary-directory</a></h4>
273         <div class="VARIABLELIST">
274           <dl>
275             <dt>Specifies:</dt>
276             <dd>
277               <p>A directory where Privoxy can create temporary files.</p>
278             </dd>
279             <dt>Type of value:</dt>
280             <dd>
281               <p>Path name</p>
282             </dd>
283             <dt>Default value:</dt>
284             <dd>
285               <p>unset</p>
286             </dd>
287             <dt>Effect if unset:</dt>
288             <dd>
289               <p>No temporary files are created, external filters don't work.</p>
290             </dd>
291             <dt>Notes:</dt>
292             <dd>
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
297               access.</p>
298             </dd>
299           </dl>
300         </div>
301       </div>
302       <div class="SECT3">
303         <h4 class="SECT3"><a name="LOGDIR" id="LOGDIR">7.2.4. logdir</a></h4>
304         <div class="VARIABLELIST">
305           <dl>
306             <dt>Specifies:</dt>
307             <dd>
308               <p>The directory where all logging takes place (i.e. where the <tt class="FILENAME">logfile</tt> is
309               located).</p>
310             </dd>
311             <dt>Type of value:</dt>
312             <dd>
313               <p>Path name</p>
314             </dd>
315             <dt>Default value:</dt>
316             <dd>
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>
319             </dd>
320             <dt>Effect if unset:</dt>
321             <dd>
322               <p><span class="emphasis"><i class="EMPHASIS">Mandatory</i></span></p>
323             </dd>
324             <dt>Notes:</dt>
325             <dd>
326               <p>No trailing <span class="QUOTE">"<tt class="LITERAL">/</tt>"</span>, please.</p>
327             </dd>
328           </dl>
329         </div>
330       </div>
331       <div class="SECT3">
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=
334         "USER.ACTION"></a>
335         <div class="VARIABLELIST">
336           <dl>
337             <dt>Specifies:</dt>
338             <dd>
339               <p>The <a href="actions-file.html">actions file(s)</a> to use</p>
340             </dd>
341             <dt>Type of value:</dt>
342             <dd>
343               <p>Complete file name, relative to <tt class="LITERAL">confdir</tt></p>
344             </dd>
345             <dt>Default values:</dt>
346             <dd>
347               <table border="0">
348                 <tbody>
349                   <tr>
350                     <td>
351                       <p class="LITERALLAYOUT">
352                       &nbsp;&nbsp;match-all.action&nbsp;#&nbsp;Actions&nbsp;that&nbsp;are&nbsp;applied&nbsp;to&nbsp;all&nbsp;sites&nbsp;and&nbsp;maybe&nbsp;overruled&nbsp;later&nbsp;on.</p>
353                     </td>
354                   </tr>
355                   <tr>
356                     <td>
357                       <p class="LITERALLAYOUT">
358                       &nbsp;&nbsp;default.action&nbsp;&nbsp;&nbsp;#&nbsp;Main&nbsp;actions&nbsp;file</p>
359                     </td>
360                   </tr>
361                   <tr>
362                     <td>
363                       <p class="LITERALLAYOUT">
364                       &nbsp;&nbsp;user.action&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;User&nbsp;customizations</p>
365                     </td>
366                   </tr>
367                 </tbody>
368               </table>
369             </dd>
370             <dt>Effect if unset:</dt>
371             <dd>
372               <p>No actions are taken at all. More or less neutral proxying.</p>
373             </dd>
374             <dt>Notes:</dt>
375             <dd>
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>
382             </dd>
383           </dl>
384         </div>
385       </div>
386       <div class="SECT3">
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">
390           <dl>
391             <dt>Specifies:</dt>
392             <dd>
393               <p>The <a href="filter-file.html">filter file(s)</a> to use</p>
394             </dd>
395             <dt>Type of value:</dt>
396             <dd>
397               <p>File name, relative to <tt class="LITERAL">confdir</tt></p>
398             </dd>
399             <dt>Default value:</dt>
400             <dd>
401               <p>default.filter (Unix) <span class="emphasis"><i class="EMPHASIS">or</i></span> default.filter.txt
402               (Windows)</p>
403             </dd>
404             <dt>Effect if unset:</dt>
405             <dd>
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>
409             </dd>
410             <dt>Notes:</dt>
411             <dd>
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
417               pages.</p>
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>
426             </dd>
427           </dl>
428         </div>
429       </div>
430       <div class="SECT3">
431         <h4 class="SECT3"><a name="LOGFILE" id="LOGFILE">7.2.7. logfile</a></h4>
432         <div class="VARIABLELIST">
433           <dl>
434             <dt>Specifies:</dt>
435             <dd>
436               <p>The log file to use</p>
437             </dd>
438             <dt>Type of value:</dt>
439             <dd>
440               <p>File name, relative to <tt class="LITERAL">logdir</tt></p>
441             </dd>
442             <dt>Default value:</dt>
443             <dd>
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>
446             </dd>
447             <dt>Effect if unset:</dt>
448             <dd>
449               <p>No logfile is written.</p>
450             </dd>
451             <dt>Notes:</dt>
452             <dd>
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
461               for details.</p>
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>
467             </dd>
468           </dl>
469         </div>
470       </div>
471       <div class="SECT3">
472         <h4 class="SECT3"><a name="TRUSTFILE" id="TRUSTFILE">7.2.8. trustfile</a></h4>
473         <div class="VARIABLELIST">
474           <dl>
475             <dt>Specifies:</dt>
476             <dd>
477               <p>The name of the trust file to use</p>
478             </dd>
479             <dt>Type of value:</dt>
480             <dd>
481               <p>File name, relative to <tt class="LITERAL">confdir</tt></p>
482             </dd>
483             <dt>Default value:</dt>
484             <dd>
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>
487             </dd>
488             <dt>Effect if unset:</dt>
489             <dd>
490               <p>The entire trust mechanism is disabled.</p>
491             </dd>
492             <dt>Notes:</dt>
493             <dd>
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
509               time.</p>
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>
514             </dd>
515           </dl>
516         </div>
517       </div>
518     </div>
519     <div class="SECT2">
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
523       debugging.</p>
524       <div class="SECT3">
525         <h4 class="SECT3"><a name="DEBUG" id="DEBUG">7.3.1. debug</a></h4>
526         <div class="VARIABLELIST">
527           <dl>
528             <dt>Specifies:</dt>
529             <dd>
530               <p>Key values that determine what information gets logged.</p>
531             </dd>
532             <dt>Type of value:</dt>
533             <dd>
534               <p>Integer values</p>
535             </dd>
536             <dt>Default value:</dt>
537             <dd>
538               <p>0 (i.e.: only fatal errors (that cause Privoxy to exit) are logged)</p>
539             </dd>
540             <dt>Effect if unset:</dt>
541             <dd>
542               <p>Default value is used (see above).</p>
543             </dd>
544             <dt>Notes:</dt>
545             <dd>
546               <p>The available debug levels are:</p>
547               <table border="0" bgcolor="#E0E0E0" width="90%">
548                 <tr>
549                   <td>
550                     <pre class=
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>
568                   </td>
569                 </tr>
570               </table>
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>
585             </dd>
586           </dl>
587         </div>
588       </div>
589       <div class="SECT3">
590         <h4 class="SECT3"><a name="SINGLE-THREADED" id="SINGLE-THREADED">7.3.2. single-threaded</a></h4>
591         <div class="VARIABLELIST">
592           <dl>
593             <dt>Specifies:</dt>
594             <dd>
595               <p>Whether to run only one server thread.</p>
596             </dd>
597             <dt>Type of value:</dt>
598             <dd>
599               <p><span class="emphasis"><i class="EMPHASIS">1 or 0</i></span></p>
600             </dd>
601             <dt>Default value:</dt>
602             <dd>
603               <p><span class="emphasis"><i class="EMPHASIS">0</i></span></p>
604             </dd>
605             <dt>Effect if unset:</dt>
606             <dd>
607               <p>Multi-threaded (or, where unavailable: forked) operation, i.e. the ability to serve multiple requests
608               simultaneously.</p>
609             </dd>
610             <dt>Notes:</dt>
611             <dd>
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>
614             </dd>
615           </dl>
616         </div>
617       </div>
618       <div class="SECT3">
619         <h4 class="SECT3"><a name="HOSTNAME" id="HOSTNAME">7.3.3. hostname</a></h4>
620         <div class="VARIABLELIST">
621           <dl>
622             <dt>Specifies:</dt>
623             <dd>
624               <p>The hostname shown on the CGI pages.</p>
625             </dd>
626             <dt>Type of value:</dt>
627             <dd>
628               <p>Text</p>
629             </dd>
630             <dt>Default value:</dt>
631             <dd>
632               <p><span class="emphasis"><i class="EMPHASIS">Unset</i></span></p>
633             </dd>
634             <dt>Effect if unset:</dt>
635             <dd>
636               <p>The hostname provided by the operating system is used.</p>
637             </dd>
638             <dt>Notes:</dt>
639             <dd>
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
644               first one.</p>
645               <p>Note that Privoxy does not validate the specified hostname value.</p>
646             </dd>
647           </dl>
648         </div>
649       </div>
650     </div>
651     <div class="SECT2">
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>
655       <div class="SECT3">
656         <h4 class="SECT3"><a name="LISTEN-ADDRESS" id="LISTEN-ADDRESS">7.4.1. listen-address</a></h4>
657         <div class="VARIABLELIST">
658           <dl>
659             <dt>Specifies:</dt>
660             <dd>
661               <p>The address and TCP port on which <span class="APPLICATION">Privoxy</span> will listen for client
662               requests.</p>
663             </dd>
664             <dt>Type of value:</dt>
665             <dd>
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>
668             </dd>
669             <dt>Default value:</dt>
670             <dd>
671               <p>127.0.0.1:8118</p>
672             </dd>
673             <dt>Effect if unset:</dt>
674             <dd>
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>
677             </dd>
678             <dt>Notes:</dt>
679             <dd>
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
686               same socket.</p>
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>
714             </dd>
715             <dt>Example:</dt>
716             <dd>
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%">
721                 <tr>
722                   <td>
723                     <pre class="PROGRAMLISTING">  listen-address  192.168.0.1:8118</pre>
724                   </td>
725                 </tr>
726               </table>
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%">
730                 <tr>
731                   <td>
732                     <pre class="PROGRAMLISTING">  listen-address [::1]:8118</pre>
733                   </td>
734                 </tr>
735               </table>
736             </dd>
737           </dl>
738         </div>
739       </div>
740       <div class="SECT3">
741         <h4 class="SECT3"><a name="TOGGLE" id="TOGGLE">7.4.2. toggle</a></h4>
742         <div class="VARIABLELIST">
743           <dl>
744             <dt>Specifies:</dt>
745             <dd>
746               <p>Initial state of "toggle" status</p>
747             </dd>
748             <dt>Type of value:</dt>
749             <dd>
750               <p>1 or 0</p>
751             </dd>
752             <dt>Default value:</dt>
753             <dd>
754               <p>1</p>
755             </dd>
756             <dt>Effect if unset:</dt>
757             <dd>
758               <p>Act as if toggled on</p>
759             </dd>
760             <dt>Notes:</dt>
761             <dd>
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>
765             </dd>
766           </dl>
767         </div>
768       </div>
769       <div class="SECT3">
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">
772           <dl>
773             <dt>Specifies:</dt>
774             <dd>
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>
777             </dd>
778             <dt>Type of value:</dt>
779             <dd>
780               <p>0 or 1</p>
781             </dd>
782             <dt>Default value:</dt>
783             <dd>
784               <p>0</p>
785             </dd>
786             <dt>Effect if unset:</dt>
787             <dd>
788               <p>The web-based toggle feature is disabled.</p>
789             </dd>
790             <dt>Notes:</dt>
791             <dd>
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
799               users.</p>
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>
805             </dd>
806           </dl>
807         </div>
808       </div>
809       <div class="SECT3">
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">
813           <dl>
814             <dt>Specifies:</dt>
815             <dd>
816               <p>Whether or not Privoxy recognizes special HTTP headers to change its behaviour.</p>
817             </dd>
818             <dt>Type of value:</dt>
819             <dd>
820               <p>0 or 1</p>
821             </dd>
822             <dt>Default value:</dt>
823             <dd>
824               <p>0</p>
825             </dd>
826             <dt>Effect if unset:</dt>
827             <dd>
828               <p>Privoxy ignores special HTTP headers.</p>
829             </dd>
830             <dt>Notes:</dt>
831             <dd>
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
835               files.</p>
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
840               taggers.</p>
841             </dd>
842           </dl>
843         </div>
844       </div>
845       <div class="SECT3">
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">
848           <dl>
849             <dt>Specifies:</dt>
850             <dd>
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>
853             </dd>
854             <dt>Type of value:</dt>
855             <dd>
856               <p>0 or 1</p>
857             </dd>
858             <dt>Default value:</dt>
859             <dd>
860               <p>0</p>
861             </dd>
862             <dt>Effect if unset:</dt>
863             <dd>
864               <p>The web-based actions file editor is disabled.</p>
865             </dd>
866             <dt>Notes:</dt>
867             <dd>
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>
880             </dd>
881           </dl>
882         </div>
883       </div>
884       <div class="SECT3">
885         <h4 class="SECT3"><a name="ENFORCE-BLOCKS" id="ENFORCE-BLOCKS">7.4.6. enforce-blocks</a></h4>
886         <div class="VARIABLELIST">
887           <dl>
888             <dt>Specifies:</dt>
889             <dd>
890               <p>Whether the user is allowed to ignore blocks and can <span class="QUOTE">"go there anyway"</span>.</p>
891             </dd>
892             <dt>Type of value:</dt>
893             <dd>
894               <p><tt class="REPLACEABLE"><i>0 or 1</i></tt></p>
895             </dd>
896             <dt>Default value:</dt>
897             <dd>
898               <p><span class="emphasis"><i class="EMPHASIS">0</i></span></p>
899             </dd>
900             <dt>Effect if unset:</dt>
901             <dd>
902               <p>Blocks are not enforced.</p>
903             </dd>
904             <dt>Notes:</dt>
905             <dd>
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>
920             </dd>
921             <dt>Example:</dt>
922             <dd>
923               <p>enforce-blocks 1</p>
924             </dd>
925           </dl>
926         </div>
927       </div>
928       <div class="SECT3">
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">
932           <dl>
933             <dt>Specifies:</dt>
934             <dd>
935               <p>Who can access what.</p>
936             </dd>
937             <dt>Type of value:</dt>
938             <dd>
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>
953             </dd>
954             <dt>Default value:</dt>
955             <dd>
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>
960             </dd>
961             <dt>Effect if unset:</dt>
962             <dd>
963               <p>Don't restrict access further than implied by <tt class="LITERAL">listen-address</tt></p>
964             </dd>
965             <dt>Notes:</dt>
966             <dd>
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>
972               option.</p>
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
992               automatically.</p>
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>
995             </dd>
996             <dt>Examples:</dt>
997             <dd>
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%">
1003                 <tr>
1004                   <td>
1005                     <pre class="SCREEN">  permit-access  localhost</pre>
1006                   </td>
1007                 </tr>
1008               </table>
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%">
1012                 <tr>
1013                   <td>
1014                     <pre class="SCREEN">  permit-access  www.privoxy.org/24 www.example.com/32</pre>
1015                   </td>
1016                 </tr>
1017               </table>
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%">
1021                 <tr>
1022                   <td>
1023                     <pre class="SCREEN">  permit-access  192.168.45.64/26
1024   deny-access    192.168.45.73    www.dirty-stuff.example.com</pre>
1025                   </td>
1026                 </tr>
1027               </table>
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%">
1031                 <tr>
1032                   <td>
1033                     <pre class="PROGRAMLISTING">  permit-access  192.0.2.0/24</pre>
1034                   </td>
1035                 </tr>
1036               </table>
1037               <p>This is equivalent to the following line even if listening on an IPv4 address (not supported on all
1038               platforms):</p>
1039               <table border="0" bgcolor="#E0E0E0" width="90%">
1040                 <tr>
1041                   <td>
1042                     <pre class="PROGRAMLISTING">  permit-access  [::ffff:192.0.2.0]/120</pre>
1043                   </td>
1044                 </tr>
1045               </table>
1046             </dd>
1047           </dl>
1048         </div>
1049       </div>
1050       <div class="SECT3">
1051         <h4 class="SECT3"><a name="BUFFER-LIMIT" id="BUFFER-LIMIT">7.4.8. buffer-limit</a></h4>
1052         <div class="VARIABLELIST">
1053           <dl>
1054             <dt>Specifies:</dt>
1055             <dd>
1056               <p>Maximum size of the buffer for content filtering.</p>
1057             </dd>
1058             <dt>Type of value:</dt>
1059             <dd>
1060               <p>Size in Kbytes</p>
1061             </dd>
1062             <dt>Default value:</dt>
1063             <dd>
1064               <p>4096</p>
1065             </dd>
1066             <dt>Effect if unset:</dt>
1067             <dd>
1068               <p>Use a 4MB (4096 KB) limit.</p>
1069             </dd>
1070             <dt>Notes:</dt>
1071             <dd>
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
1076               option.</p>
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>
1082             </dd>
1083           </dl>
1084         </div>
1085       </div>
1086       <div class="SECT3">
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">
1090           <dl>
1091             <dt>Specifies:</dt>
1092             <dd>
1093               <p>Whether or not proxy authentication through <span class="APPLICATION">Privoxy</span> should work.</p>
1094             </dd>
1095             <dt>Type of value:</dt>
1096             <dd>
1097               <p>0 or 1</p>
1098             </dd>
1099             <dt>Default value:</dt>
1100             <dd>
1101               <p>0</p>
1102             </dd>
1103             <dt>Effect if unset:</dt>
1104             <dd>
1105               <p>Proxy authentication headers are removed.</p>
1106             </dd>
1107             <dt>Notes:</dt>
1108             <dd>
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
1119               needed.</p>
1120             </dd>
1121           </dl>
1122         </div>
1123       </div>
1124       <div class="SECT3">
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">
1127           <dl>
1128             <dt>Specifies:</dt>
1129             <dd>
1130               <p>A trusted website or webpage whose links can be followed to reach sensitive CGI pages</p>
1131             </dd>
1132             <dt>Type of value:</dt>
1133             <dd>
1134               <p>URL or URL prefix</p>
1135             </dd>
1136             <dt>Default value:</dt>
1137             <dd>
1138               <p>Unset</p>
1139             </dd>
1140             <dt>Effect if unset:</dt>
1141             <dd>
1142               <p>No external pages are considered trusted referers.</p>
1143             </dd>
1144             <dt>Notes:</dt>
1145             <dd>
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%">
1163                   <tr>
1164                     <td align="center"><b>Warning</b></td>
1165                   </tr>
1166                   <tr>
1167                     <td align="left">
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>
1170                     </td>
1171                   </tr>
1172                 </table>
1173               </div>
1174             </dd>
1175           </dl>
1176         </div>
1177       </div>
1178       <div class="SECT3">
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">
1181           <dl>
1182             <dt>Specifies:</dt>
1183             <dd>
1184               <p>A trusted website which can access <span class="APPLICATION">Privoxy</span>'s CGI pages through
1185               JavaScript.</p>
1186             </dd>
1187             <dt>Type of value:</dt>
1188             <dd>
1189               <p>URL</p>
1190             </dd>
1191             <dt>Default value:</dt>
1192             <dd>
1193               <p>Unset</p>
1194             </dd>
1195             <dt>Effect if unset:</dt>
1196             <dd>
1197               <p>No external sites get access via cross-origin resource sharing.</p>
1198             </dd>
1199             <dt>Notes:</dt>
1200             <dd>
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%">
1212                   <tr>
1213                     <td align="center"><b>Warning</b></td>
1214                   </tr>
1215                   <tr>
1216                     <td align="left">
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>
1219                     </td>
1220                   </tr>
1221                 </table>
1222               </div>
1223             </dd>
1224           </dl>
1225         </div>
1226       </div>
1227     </div>
1228     <div class="SECT2">
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
1233       access.</p>
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
1240       4A protocols.</p>
1241       <div class="SECT3">
1242         <h4 class="SECT3"><a name="FORWARD" id="FORWARD">7.5.1. forward</a></h4>
1243         <div class="VARIABLELIST">
1244           <dl>
1245             <dt>Specifies:</dt>
1246             <dd>
1247               <p>To which parent HTTP proxy specific requests should be routed.</p>
1248             </dd>
1249             <dt>Type of value:</dt>
1250             <dd>
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>
1260             </dd>
1261             <dt>Default value:</dt>
1262             <dd>
1263               <p><span class="emphasis"><i class="EMPHASIS">Unset</i></span></p>
1264             </dd>
1265             <dt>Effect if unset:</dt>
1266             <dd>
1267               <p>Don't use parent HTTP proxies.</p>
1268             </dd>
1269             <dt>Notes:</dt>
1270             <dd>
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>
1279             </dd>
1280             <dt>Examples:</dt>
1281             <dd>
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%">
1284                 <tr>
1285                   <td>
1286                     <pre class="SCREEN">  forward   /      parent-proxy.example.org:8080
1287   forward   :443   .</pre>
1288                   </td>
1289                 </tr>
1290               </table>
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%">
1293                 <tr>
1294                   <td>
1295                     <pre class="SCREEN">  forward   /                  caching-proxy.isp.example.net:8000
1296   forward   .isp.example.net   .</pre>
1297                   </td>
1298                 </tr>
1299               </table>
1300               <p>Parent proxy specified by an IPv6 address:</p>
1301               <table border="0" bgcolor="#E0E0E0" width="90%">
1302                 <tr>
1303                   <td>
1304                     <pre class="PROGRAMLISTING">  forward   /                   [2001:DB8::1]:8000</pre>
1305                   </td>
1306                 </tr>
1307               </table>
1308               <p>Suppose your parent proxy doesn't support IPv6:</p>
1309               <table border="0" bgcolor="#E0E0E0" width="90%">
1310                 <tr>
1311                   <td>
1312                     <pre class="PROGRAMLISTING">  forward  /                        parent-proxy.example.org:8000
1313   forward  ipv6-server.example.org  .
1314   forward  &lt;[2-3][0-9a-f][0-9a-f][0-9a-f]:*&gt;   .</pre>
1315                   </td>
1316                 </tr>
1317               </table>
1318             </dd>
1319           </dl>
1320         </div>
1321       </div>
1322       <div class="SECT3">
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">
1327           <dl>
1328             <dt>Specifies:</dt>
1329             <dd>
1330               <p>Through which SOCKS proxy (and optionally to which parent HTTP proxy) specific requests should be
1331               routed.</p>
1332             </dd>
1333             <dt>Type of value:</dt>
1334             <dd>
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>
1348             </dd>
1349             <dt>Default value:</dt>
1350             <dd>
1351               <p><span class="emphasis"><i class="EMPHASIS">Unset</i></span></p>
1352             </dd>
1353             <dt>Effect if unset:</dt>
1354             <dd>
1355               <p>Don't use SOCKS proxies.</p>
1356             </dd>
1357             <dt>Notes:</dt>
1358             <dd>
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
1364               well.</p>
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
1374               already).</p>
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>
1378             </dd>
1379             <dt>Examples:</dt>
1380             <dd>
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%">
1385                 <tr>
1386                   <td>
1387                     <pre class=
1388                     "SCREEN">  forward-socks4a   /              socks-gw.example.com:1080  www-cache.isp.example.net:8080
1389   forward           .example.com   .</pre>
1390                   </td>
1391                 </tr>
1392               </table>
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%">
1395                 <tr>
1396                   <td>
1397                     <pre class="SCREEN">  forward-socks4   /               socks-gw.example.com:1080  .</pre>
1398                   </td>
1399                 </tr>
1400               </table>
1401               <p>To connect SOCKS5 proxy which requires username/password authentication:</p>
1402               <table border="0" bgcolor="#E0E0E0" width="90%">
1403                 <tr>
1404                   <td>
1405                     <pre class="SCREEN">  forward-socks5   /               user:pass@socks-gw.example.com:1080  .</pre>
1406                   </td>
1407                 </tr>
1408               </table>
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%">
1411                 <tr>
1412                   <td>
1413                     <pre class="SCREEN">  forward-socks5t   /               127.0.0.1:9050 .</pre>
1414                   </td>
1415                 </tr>
1416               </table>
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%">
1423                 <tr>
1424                   <td>
1425                     <pre class="SCREEN">  forward         192.168.*.*/     .
1426   forward          10.*.*.*/       .
1427   forward         127.*.*.*/       .</pre>
1428                   </td>
1429                 </tr>
1430               </table>
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%">
1438                 <tr>
1439                   <td>
1440                     <pre class="SCREEN"> forward           localhost/     .</pre>
1441                   </td>
1442                 </tr>
1443               </table>
1444             </dd>
1445           </dl>
1446         </div>
1447       </div>
1448       <div class="SECT3">
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
1457         like this:</p>
1458         <p>host-a:</p>
1459         <table border="0" bgcolor="#E0E0E0" width="100%">
1460           <tr>
1461             <td>
1462               <pre class="SCREEN">  forward    /           .
1463   forward    .isp-b.example.net  host-b:8118</pre>
1464             </td>
1465           </tr>
1466         </table>
1467         <p>host-b:</p>
1468         <table border="0" bgcolor="#E0E0E0" width="100%">
1469           <tr>
1470             <td>
1471               <pre class="SCREEN">  forward    /           .
1472   forward    .isp-a.example.org  host-a:8118</pre>
1473             </td>
1474           </tr>
1475         </table>
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 -&#62; squid -&#62; privoxy</tt> is the recommended
1480         way.</p>
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%">
1484           <tr>
1485             <td>
1486               <pre class="SCREEN">  # Define Privoxy as parent proxy (without ICP)
1487   cache_peer 127.0.0.1 parent 8118 7 no-query
1488
1489   # Define ACL for protocol FTP
1490   acl ftp proto FTP
1491
1492   # Do not forward FTP requests to Privoxy
1493   always_direct allow ftp
1494
1495   # Forward all the rest to Privoxy
1496   never_direct allow all</pre>
1497             </td>
1498           </tr>
1499         </table>
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%">
1506           <tr>
1507             <td>
1508               <pre class="SCREEN">  forward   /                          .
1509   forward   /.*\.(exe|com|dll|zip)$    antivir.example.com:8010</pre>
1510             </td>
1511           </tr>
1512         </table>
1513       </div>
1514       <div class="SECT3">
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">
1518           <dl>
1519             <dt>Specifies:</dt>
1520             <dd>
1521               <p>How often Privoxy retries if a forwarded connection request fails.</p>
1522             </dd>
1523             <dt>Type of value:</dt>
1524             <dd>
1525               <p><tt class="REPLACEABLE"><i>Number of retries.</i></tt></p>
1526             </dd>
1527             <dt>Default value:</dt>
1528             <dd>
1529               <p><span class="emphasis"><i class="EMPHASIS">0</i></span></p>
1530             </dd>
1531             <dt>Effect if unset:</dt>
1532             <dd>
1533               <p>Connections forwarded through other proxies are treated like direct connections and no retry attempts
1534               are made.</p>
1535             </dd>
1536             <dt>Notes:</dt>
1537             <dd>
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
1545               CONNECT method.</p>
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>
1549             </dd>
1550             <dt>Example:</dt>
1551             <dd>
1552               <p>forwarded-connect-retries 1</p>
1553             </dd>
1554           </dl>
1555         </div>
1556       </div>
1557     </div>
1558     <div class="SECT2">
1559       <h2 class="SECT2"><a name="MISC" id="MISC">7.6. Miscellaneous</a></h2>
1560       <div class="SECT3">
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">
1564           <dl>
1565             <dt>Specifies:</dt>
1566             <dd>
1567               <p>Whether intercepted requests should be treated as valid.</p>
1568             </dd>
1569             <dt>Type of value:</dt>
1570             <dd>
1571               <p><tt class="REPLACEABLE"><i>0 or 1</i></tt></p>
1572             </dd>
1573             <dt>Default value:</dt>
1574             <dd>
1575               <p><span class="emphasis"><i class="EMPHASIS">0</i></span></p>
1576             </dd>
1577             <dt>Effect if unset:</dt>
1578             <dd>
1579               <p>Only proxy requests are accepted, intercepted requests are treated as invalid.</p>
1580             </dd>
1581             <dt>Notes:</dt>
1582             <dd>
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>
1594             </dd>
1595             <dt>Example:</dt>
1596             <dd>
1597               <p>accept-intercepted-requests 1</p>
1598             </dd>
1599           </dl>
1600         </div>
1601       </div>
1602       <div class="SECT3">
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">
1606           <dl>
1607             <dt>Specifies:</dt>
1608             <dd>
1609               <p>Whether requests to <span class="APPLICATION">Privoxy's</span> CGI pages can be blocked or
1610               redirected.</p>
1611             </dd>
1612             <dt>Type of value:</dt>
1613             <dd>
1614               <p><tt class="REPLACEABLE"><i>0 or 1</i></tt></p>
1615             </dd>
1616             <dt>Default value:</dt>
1617             <dd>
1618               <p><span class="emphasis"><i class="EMPHASIS">0</i></span></p>
1619             </dd>
1620             <dt>Effect if unset:</dt>
1621             <dd>
1622               <p><span class="APPLICATION">Privoxy</span> ignores block and redirect actions for its CGI pages.</p>
1623             </dd>
1624             <dt>Notes:</dt>
1625             <dd>
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>
1631             </dd>
1632             <dt>Example:</dt>
1633             <dd>
1634               <p>allow-cgi-request-crunching 1</p>
1635             </dd>
1636           </dl>
1637         </div>
1638       </div>
1639       <div class="SECT3">
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">
1642           <dl>
1643             <dt>Specifies:</dt>
1644             <dd>
1645               <p>Whether the CGI interface should stay compatible with broken HTTP clients.</p>
1646             </dd>
1647             <dt>Type of value:</dt>
1648             <dd>
1649               <p><tt class="REPLACEABLE"><i>0 or 1</i></tt></p>
1650             </dd>
1651             <dt>Default value:</dt>
1652             <dd>
1653               <p><span class="emphasis"><i class="EMPHASIS">0</i></span></p>
1654             </dd>
1655             <dt>Effect if unset:</dt>
1656             <dd>
1657               <p>The CGI form generate long GET URLs.</p>
1658             </dd>
1659             <dt>Notes:</dt>
1660             <dd>
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
1663               limitations.</p>
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>
1669             </dd>
1670             <dt>Example:</dt>
1671             <dd>
1672               <p>split-large-forms 1</p>
1673             </dd>
1674           </dl>
1675         </div>
1676       </div>
1677       <div class="SECT3">
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">
1680           <dl>
1681             <dt>Specifies:</dt>
1682             <dd>
1683               <p>Number of seconds after which an open connection will no longer be reused.</p>
1684             </dd>
1685             <dt>Type of value:</dt>
1686             <dd>
1687               <p><tt class="REPLACEABLE"><i>Time in seconds.</i></tt></p>
1688             </dd>
1689             <dt>Default value:</dt>
1690             <dd>
1691               <p>None</p>
1692             </dd>
1693             <dt>Effect if unset:</dt>
1694             <dd>
1695               <p>Connections are not kept alive.</p>
1696             </dd>
1697             <dt>Notes:</dt>
1698             <dd>
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>
1716             </dd>
1717             <dt>Example:</dt>
1718             <dd>
1719               <p>keep-alive-timeout 300</p>
1720             </dd>
1721           </dl>
1722         </div>
1723       </div>
1724       <div class="SECT3">
1725         <h4 class="SECT3"><a name="TOLERATE-PIPELINING" id="TOLERATE-PIPELINING">7.6.5. tolerate-pipelining</a></h4>
1726         <div class="VARIABLELIST">
1727           <dl>
1728             <dt>Specifies:</dt>
1729             <dd>
1730               <p>Whether or not pipelined requests should be served.</p>
1731             </dd>
1732             <dt>Type of value:</dt>
1733             <dd>
1734               <p><tt class="REPLACEABLE"><i>0 or 1.</i></tt></p>
1735             </dd>
1736             <dt>Default value:</dt>
1737             <dd>
1738               <p>None</p>
1739             </dd>
1740             <dt>Effect if unset:</dt>
1741             <dd>
1742               <p>If Privoxy receives more than one request at once, it terminates the client connection after serving
1743               the first one.</p>
1744             </dd>
1745             <dt>Notes:</dt>
1746             <dd>
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
1751               connection.</p>
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
1755               the problem.</p>
1756             </dd>
1757             <dt>Example:</dt>
1758             <dd>
1759               <p>tolerate-pipelining 1</p>
1760             </dd>
1761           </dl>
1762         </div>
1763       </div>
1764       <div class="SECT3">
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">
1768           <dl>
1769             <dt>Specifies:</dt>
1770             <dd>
1771               <p>Assumed server-side keep-alive timeout if not specified by the server.</p>
1772             </dd>
1773             <dt>Type of value:</dt>
1774             <dd>
1775               <p><tt class="REPLACEABLE"><i>Time in seconds.</i></tt></p>
1776             </dd>
1777             <dt>Default value:</dt>
1778             <dd>
1779               <p>None</p>
1780             </dd>
1781             <dt>Effect if unset:</dt>
1782             <dd>
1783               <p>Connections for which the server didn't specify the keep-alive timeout are not reused.</p>
1784             </dd>
1785             <dt>Notes:</dt>
1786             <dd>
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>
1801             </dd>
1802             <dt>Example:</dt>
1803             <dd>
1804               <p>default-server-timeout 60</p>
1805             </dd>
1806           </dl>
1807         </div>
1808       </div>
1809       <div class="SECT3">
1810         <h4 class="SECT3"><a name="CONNECTION-SHARING" id="CONNECTION-SHARING">7.6.7. connection-sharing</a></h4>
1811         <div class="VARIABLELIST">
1812           <dl>
1813             <dt>Specifies:</dt>
1814             <dd>
1815               <p>Whether or not outgoing connections that have been kept alive should be shared between different
1816               incoming connections.</p>
1817             </dd>
1818             <dt>Type of value:</dt>
1819             <dd>
1820               <p><tt class="REPLACEABLE"><i>0 or 1</i></tt></p>
1821             </dd>
1822             <dt>Default value:</dt>
1823             <dd>
1824               <p>None</p>
1825             </dd>
1826             <dt>Effect if unset:</dt>
1827             <dd>
1828               <p>Connections are not shared.</p>
1829             </dd>
1830             <dt>Notes:</dt>
1831             <dd>
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>
1834             </dd>
1835             <dt>Notes:</dt>
1836             <dd>
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
1842               completed yet.</p>
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>
1857             </dd>
1858             <dt>Example:</dt>
1859             <dd>
1860               <p>connection-sharing 1</p>
1861             </dd>
1862           </dl>
1863         </div>
1864       </div>
1865       <div class="SECT3">
1866         <h4 class="SECT3"><a name="SOCKET-TIMEOUT" id="SOCKET-TIMEOUT">7.6.8. socket-timeout</a></h4>
1867         <div class="VARIABLELIST">
1868           <dl>
1869             <dt>Specifies:</dt>
1870             <dd>
1871               <p>Number of seconds after which a socket times out if no data is received.</p>
1872             </dd>
1873             <dt>Type of value:</dt>
1874             <dd>
1875               <p><tt class="REPLACEABLE"><i>Time in seconds.</i></tt></p>
1876             </dd>
1877             <dt>Default value:</dt>
1878             <dd>
1879               <p>None</p>
1880             </dd>
1881             <dt>Effect if unset:</dt>
1882             <dd>
1883               <p>A default value of 300 seconds is used.</p>
1884             </dd>
1885             <dt>Notes:</dt>
1886             <dd>
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>
1889             </dd>
1890             <dt>Example:</dt>
1891             <dd>
1892               <p>socket-timeout 300</p>
1893             </dd>
1894           </dl>
1895         </div>
1896       </div>
1897       <div class="SECT3">
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">
1901           <dl>
1902             <dt>Specifies:</dt>
1903             <dd>
1904               <p>Maximum number of client connections that will be served.</p>
1905             </dd>
1906             <dt>Type of value:</dt>
1907             <dd>
1908               <p><tt class="REPLACEABLE"><i>Positive number.</i></tt></p>
1909             </dd>
1910             <dt>Default value:</dt>
1911             <dd>
1912               <p>128</p>
1913             </dd>
1914             <dt>Effect if unset:</dt>
1915             <dd>
1916               <p>Connections are served until a resource limit is reached.</p>
1917             </dd>
1918             <dt>Notes:</dt>
1919             <dd>
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>
1942             </dd>
1943             <dt>Example:</dt>
1944             <dd>
1945               <p>max-client-connections 256</p>
1946             </dd>
1947           </dl>
1948         </div>
1949       </div>
1950       <div class="SECT3">
1951         <h4 class="SECT3"><a name="LISTEN-BACKLOG" id="LISTEN-BACKLOG">7.6.10. listen-backlog</a></h4>
1952         <div class="VARIABLELIST">
1953           <dl>
1954             <dt>Specifies:</dt>
1955             <dd>
1956               <p>Connection queue length requested from the operating system.</p>
1957             </dd>
1958             <dt>Type of value:</dt>
1959             <dd>
1960               <p><tt class="REPLACEABLE"><i>Number.</i></tt></p>
1961             </dd>
1962             <dt>Default value:</dt>
1963             <dd>
1964               <p>128</p>
1965             </dd>
1966             <dt>Effect if unset:</dt>
1967             <dd>
1968               <p>A connection queue length of 128 is requested from the operating system.</p>
1969             </dd>
1970             <dt>Notes:</dt>
1971             <dd>
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
1976               the same time.</p>
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>
1984             </dd>
1985             <dt>Example:</dt>
1986             <dd>
1987               <p>listen-backlog 4096</p>
1988             </dd>
1989           </dl>
1990         </div>
1991       </div>
1992       <div class="SECT3">
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">
1996           <dl>
1997             <dt>Specifies:</dt>
1998             <dd>
1999               <p>Whether or not Privoxy should use an accept filter</p>
2000             </dd>
2001             <dt>Type of value:</dt>
2002             <dd>
2003               <p><tt class="REPLACEABLE"><i>0 or 1</i></tt></p>
2004             </dd>
2005             <dt>Default value:</dt>
2006             <dd>
2007               <p>0</p>
2008             </dd>
2009             <dt>Effect if unset:</dt>
2010             <dd>
2011               <p>No accept filter is enabled.</p>
2012             </dd>
2013             <dt>Notes:</dt>
2014             <dd>
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
2018               data first.</p>
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>
2024             </dd>
2025             <dt>Example:</dt>
2026             <dd>
2027               <p>enable-accept-filter 1</p>
2028             </dd>
2029           </dl>
2030         </div>
2031       </div>
2032       <div class="SECT3">
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">
2036           <dl>
2037             <dt>Specifies:</dt>
2038             <dd>
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>
2041             </dd>
2042             <dt>Type of value:</dt>
2043             <dd>
2044               <p><tt class="REPLACEABLE"><i>0 or 1</i></tt></p>
2045             </dd>
2046             <dt>Default value:</dt>
2047             <dd>
2048               <p>0</p>
2049             </dd>
2050             <dt>Effect if unset:</dt>
2051             <dd>
2052               <p>Privoxy returns a status 403(forbidden) for all blocked pages.</p>
2053             </dd>
2054             <dt>Effect if set:</dt>
2055             <dd>
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>
2058             </dd>
2059             <dt>Notes:</dt>
2060             <dd>
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>
2067             </dd>
2068           </dl>
2069         </div>
2070       </div>
2071       <div class="SECT3">
2072         <h4 class="SECT3"><a name="ENABLE-COMPRESSION" id="ENABLE-COMPRESSION">7.6.13. enable-compression</a></h4>
2073         <div class="VARIABLELIST">
2074           <dl>
2075             <dt>Specifies:</dt>
2076             <dd>
2077               <p>Whether or not buffered content is compressed before delivery.</p>
2078             </dd>
2079             <dt>Type of value:</dt>
2080             <dd>
2081               <p><tt class="REPLACEABLE"><i>0 or 1</i></tt></p>
2082             </dd>
2083             <dt>Default value:</dt>
2084             <dd>
2085               <p>0</p>
2086             </dd>
2087             <dt>Effect if unset:</dt>
2088             <dd>
2089               <p>Privoxy does not compress buffered content.</p>
2090             </dd>
2091             <dt>Effect if set:</dt>
2092             <dd>
2093               <p>Privoxy compresses buffered content before delivering it to the client, provided the client supports
2094               it.</p>
2095             </dd>
2096             <dt>Notes:</dt>
2097             <dd>
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>
2104             </dd>
2105           </dl>
2106         </div>
2107       </div>
2108       <div class="SECT3">
2109         <h4 class="SECT3"><a name="COMPRESSION-LEVEL" id="COMPRESSION-LEVEL">7.6.14. compression-level</a></h4>
2110         <div class="VARIABLELIST">
2111           <dl>
2112             <dt>Specifies:</dt>
2113             <dd>
2114               <p>The compression level that is passed to the zlib library when compressing buffered content.</p>
2115             </dd>
2116             <dt>Type of value:</dt>
2117             <dd>
2118               <p><tt class="REPLACEABLE"><i>Positive number ranging from 0 to 9.</i></tt></p>
2119             </dd>
2120             <dt>Default value:</dt>
2121             <dd>
2122               <p>1</p>
2123             </dd>
2124             <dt>Notes:</dt>
2125             <dd>
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>
2130             </dd>
2131             <dt>Examples:</dt>
2132             <dd>
2133               <table border="0" bgcolor="#E0E0E0" width="90%">
2134                 <tr>
2135                   <td>
2136                     <pre class="SCREEN">    # Best speed (compared to the other levels)
2137     compression-level 1
2138
2139     # Best compression
2140     compression-level 9
2141
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>
2148                   </td>
2149                 </tr>
2150               </table>
2151             </dd>
2152           </dl>
2153         </div>
2154       </div>
2155       <div class="SECT3">
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">
2158           <dl>
2159             <dt>Specifies:</dt>
2160             <dd>
2161               <p>The order in which client headers are sorted before forwarding them.</p>
2162             </dd>
2163             <dt>Type of value:</dt>
2164             <dd>
2165               <p><tt class="REPLACEABLE"><i>Client header names delimited by spaces or tabs</i></tt></p>
2166             </dd>
2167             <dt>Default value:</dt>
2168             <dd>
2169               <p>None</p>
2170             </dd>
2171             <dt>Notes:</dt>
2172             <dd>
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
2177               User-Agent.</p>
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
2180               the end.</p>
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>
2183             </dd>
2184           </dl>
2185         </div>
2186       </div>
2187       <div class="SECT3">
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">
2190           <dl>
2191             <dt>Specifies:</dt>
2192             <dd>
2193               <p>The name of a tag that will always be set for clients that requested it through the webinterface.</p>
2194             </dd>
2195             <dt>Type of value:</dt>
2196             <dd>
2197               <p><tt class="REPLACEABLE"><i>Tag name followed by a description that will be shown in the
2198               webinterface</i></tt></p>
2199             </dd>
2200             <dt>Default value:</dt>
2201             <dd>
2202               <p>None</p>
2203             </dd>
2204             <dt>Notes:</dt>
2205             <dd>
2206               <div class="WARNING">
2207                 <table class="WARNING" border="1" width="90%">
2208                   <tr>
2209                     <td align="center"><b>Warning</b></td>
2210                   </tr>
2211                   <tr>
2212                     <td align="left">
2213                       <p>This is an experimental feature. The syntax is likely to change in future versions.</p>
2214                     </td>
2215                   </tr>
2216                 </table>
2217               </div>
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
2231               again.</p>
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>
2236             </dd>
2237             <dt>Examples:</dt>
2238             <dd>
2239               <table border="0" bgcolor="#E0E0E0" width="90%">
2240                 <tr>
2241                   <td>
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>
2246                   </td>
2247                 </tr>
2248               </table>
2249             </dd>
2250           </dl>
2251         </div>
2252       </div>
2253       <div class="SECT3">
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">
2256           <dl>
2257             <dt>Specifies:</dt>
2258             <dd>
2259               <p>How long a temporarily enabled tag remains enabled.</p>
2260             </dd>
2261             <dt>Type of value:</dt>
2262             <dd>
2263               <p><tt class="REPLACEABLE"><i>Time in seconds.</i></tt></p>
2264             </dd>
2265             <dt>Default value:</dt>
2266             <dd>
2267               <p>60</p>
2268             </dd>
2269             <dt>Notes:</dt>
2270             <dd>
2271               <div class="WARNING">
2272                 <table class="WARNING" border="1" width="90%">
2273                   <tr>
2274                     <td align="center"><b>Warning</b></td>
2275                   </tr>
2276                   <tr>
2277                     <td align="left">
2278                       <p>This is an experimental feature. The syntax is likely to change in future versions.</p>
2279                     </td>
2280                   </tr>
2281                 </table>
2282               </div>
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>
2288             </dd>
2289             <dt>Example:</dt>
2290             <dd>
2291               <table border="0" bgcolor="#E0E0E0" width="90%">
2292                 <tr>
2293                   <td>
2294                     <pre class="SCREEN">      # Increase the time to life for temporarily enabled tags to 3 minutes
2295       client-tag-lifetime 180</pre>
2296                   </td>
2297                 </tr>
2298               </table>
2299             </dd>
2300           </dl>
2301         </div>
2302       </div>
2303       <div class="SECT3">
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">
2307           <dl>
2308             <dt>Specifies:</dt>
2309             <dd>
2310               <p>Whether or not Privoxy should use IP addresses specified with the X-Forwarded-For header</p>
2311             </dd>
2312             <dt>Type of value:</dt>
2313             <dd>
2314               <p><tt class="REPLACEABLE"><i>0 or one</i></tt></p>
2315             </dd>
2316             <dt>Default value:</dt>
2317             <dd>
2318               <p>0</p>
2319             </dd>
2320             <dt>Notes:</dt>
2321             <dd>
2322               <div class="WARNING">
2323                 <table class="WARNING" border="1" width="90%">
2324                   <tr>
2325                     <td align="center"><b>Warning</b></td>
2326                   </tr>
2327                   <tr>
2328                     <td align="left">
2329                       <p>This is an experimental feature. The syntax is likely to change in future versions.</p>
2330                     </td>
2331                   </tr>
2332                 </table>
2333               </div>
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>
2345             </dd>
2346             <dt>Example:</dt>
2347             <dd>
2348               <table border="0" bgcolor="#E0E0E0" width="90%">
2349                 <tr>
2350                   <td>
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>
2354                   </td>
2355                 </tr>
2356               </table>
2357             </dd>
2358           </dl>
2359         </div>
2360       </div>
2361       <div class="SECT3">
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">
2364           <dl>
2365             <dt>Specifies:</dt>
2366             <dd>
2367               <p>The size of the buffer Privoxy uses to receive data from the server.</p>
2368             </dd>
2369             <dt>Type of value:</dt>
2370             <dd>
2371               <p><tt class="REPLACEABLE"><i>Size in bytes</i></tt></p>
2372             </dd>
2373             <dt>Default value:</dt>
2374             <dd>
2375               <p>5000</p>
2376             </dd>
2377             <dt>Notes:</dt>
2378             <dd>
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
2382               filtering.</p>
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
2391               throughput.</p>
2392             </dd>
2393             <dt>Example:</dt>
2394             <dd>
2395               <table border="0" bgcolor="#E0E0E0" width="90%">
2396                 <tr>
2397                   <td>
2398                     <pre class="SCREEN">      # Increase the receive buffer size
2399       receive-buffer-size 32768</pre>
2400                   </td>
2401                 </tr>
2402               </table>
2403             </dd>
2404           </dl>
2405         </div>
2406       </div>
2407     </div>
2408     <div class="SECT2">
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>
2413       <div class="SECT3">
2414         <h4 class="SECT3"><a name="CA-DIRECTORY" id="CA-DIRECTORY">7.7.1. ca-directory</a></h4>
2415         <div class="VARIABLELIST">
2416           <dl>
2417             <dt>Specifies:</dt>
2418             <dd>
2419               <p>Directory with the CA key, the CA certificate and the trusted CAs file.</p>
2420             </dd>
2421             <dt>Type of value:</dt>
2422             <dd>
2423               <p>Text</p>
2424             </dd>
2425             <dt>Default value:</dt>
2426             <dd>
2427               <p><span class="emphasis"><i class="EMPHASIS">Empty string</i></span></p>
2428             </dd>
2429             <dt>Effect if unset:</dt>
2430             <dd>
2431               <p>Default value is used.</p>
2432             </dd>
2433             <dt>Notes:</dt>
2434             <dd>
2435               <p>This directive specifies the directory where the CA key, the CA certificate and the trusted CAs file
2436               are located.</p>
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>
2439             </dd>
2440             <dt>Example:</dt>
2441             <dd>
2442               <p>ca-directory /usr/local/etc/privoxy/CA</p>
2443             </dd>
2444           </dl>
2445         </div>
2446       </div>
2447       <div class="SECT3">
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">
2450           <dl>
2451             <dt>Specifies:</dt>
2452             <dd>
2453               <p>The CA certificate file in ".crt" format.</p>
2454             </dd>
2455             <dt>Type of value:</dt>
2456             <dd>
2457               <p>Text</p>
2458             </dd>
2459             <dt>Default value:</dt>
2460             <dd>
2461               <p><span class="emphasis"><i class="EMPHASIS">cacert.crt</i></span></p>
2462             </dd>
2463             <dt>Effect if unset:</dt>
2464             <dd>
2465               <p>Default value is used.</p>
2466             </dd>
2467             <dt>Notes:</dt>
2468             <dd>
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>
2477             </dd>
2478             <dt>Example:</dt>
2479             <dd>
2480               <p>ca-cert-file root.crt</p>
2481             </dd>
2482           </dl>
2483         </div>
2484       </div>
2485       <div class="SECT3">
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">
2488           <dl>
2489             <dt>Specifies:</dt>
2490             <dd>
2491               <p>The CA key file in ".pem" format.</p>
2492             </dd>
2493             <dt>Type of value:</dt>
2494             <dd>
2495               <p>Text</p>
2496             </dd>
2497             <dt>Default value:</dt>
2498             <dd>
2499               <p><span class="emphasis"><i class="EMPHASIS">cacert.pem</i></span></p>
2500             </dd>
2501             <dt>Effect if unset:</dt>
2502             <dd>
2503               <p>Default value is used.</p>
2504             </dd>
2505             <dt>Notes:</dt>
2506             <dd>
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>
2509             </dd>
2510             <dt>Example:</dt>
2511             <dd>
2512               <p>ca-key-file cakey.pem</p>
2513             </dd>
2514           </dl>
2515         </div>
2516       </div>
2517       <div class="SECT3">
2518         <h4 class="SECT3"><a name="CA-PASSWORD" id="CA-PASSWORD">7.7.4. ca-password</a></h4>
2519         <div class="VARIABLELIST">
2520           <dl>
2521             <dt>Specifies:</dt>
2522             <dd>
2523               <p>The password for the CA keyfile.</p>
2524             </dd>
2525             <dt>Type of value:</dt>
2526             <dd>
2527               <p>Text</p>
2528             </dd>
2529             <dt>Default value:</dt>
2530             <dd>
2531               <p><span class="emphasis"><i class="EMPHASIS">Empty string</i></span></p>
2532             </dd>
2533             <dt>Effect if unset:</dt>
2534             <dd>
2535               <p>Default value is used.</p>
2536             </dd>
2537             <dt>Notes:</dt>
2538             <dd>
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>
2542             </dd>
2543             <dt>Example:</dt>
2544             <dd>
2545               <p>ca-password blafasel</p>
2546             </dd>
2547           </dl>
2548         </div>
2549       </div>
2550       <div class="SECT3">
2551         <h4 class="SECT3"><a name="CERTIFICATE-DIRECTORY" id="CERTIFICATE-DIRECTORY">7.7.5.
2552         certificate-directory</a></h4>
2553         <div class="VARIABLELIST">
2554           <dl>
2555             <dt>Specifies:</dt>
2556             <dd>
2557               <p>Directory to save generated keys and certificates.</p>
2558             </dd>
2559             <dt>Type of value:</dt>
2560             <dd>
2561               <p>Text</p>
2562             </dd>
2563             <dt>Default value:</dt>
2564             <dd>
2565               <p><span class="emphasis"><i class="EMPHASIS">./certs</i></span></p>
2566             </dd>
2567             <dt>Effect if unset:</dt>
2568             <dd>
2569               <p>Default value is used.</p>
2570             </dd>
2571             <dt>Notes:</dt>
2572             <dd>
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%">
2583                   <tr>
2584                     <td align="center"><b>Warning</b></td>
2585                   </tr>
2586                   <tr>
2587                     <td align="left">
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>
2593                     </td>
2594                   </tr>
2595                 </table>
2596               </div>
2597             </dd>
2598             <dt>Example:</dt>
2599             <dd>
2600               <p>certificate-directory /usr/local/var/privoxy/certs</p>
2601             </dd>
2602           </dl>
2603         </div>
2604       </div>
2605       <div class="SECT3">
2606         <h4 class="SECT3"><a name="CIPHER-LIST" id="CIPHER-LIST">7.7.6. cipher-list</a></h4>
2607         <div class="VARIABLELIST">
2608           <dl>
2609             <dt>Specifies:</dt>
2610             <dd>
2611               <p>A list of ciphers to use in TLS handshakes</p>
2612             </dd>
2613             <dt>Type of value:</dt>
2614             <dd>
2615               <p>Text</p>
2616             </dd>
2617             <dt>Default value:</dt>
2618             <dd>
2619               <p>None</p>
2620             </dd>
2621             <dt>Effect if unset:</dt>
2622             <dd>
2623               <p>A default value is inherited from the TLS library.</p>
2624             </dd>
2625             <dt>Notes:</dt>
2626             <dd>
2627               <p>This directive allows to specify a non-default list of ciphers to use in TLS handshakes with clients
2628               and servers.</p>
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%">
2633                   <tr>
2634                     <td align="center"><b>Warning</b></td>
2635                   </tr>
2636                   <tr>
2637                     <td align="left">
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
2640                       well.</p>
2641                     </td>
2642                   </tr>
2643                 </table>
2644               </div>
2645             </dd>
2646             <dt>Examples:</dt>
2647             <dd>
2648               <table border="0" bgcolor="#E0E0E0" width="90%">
2649                 <tr>
2650                   <td>
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
2683    </pre>
2684                   </td>
2685                 </tr>
2686               </table>
2687               <table border="0" bgcolor="#E0E0E0" width="90%">
2688                 <tr>
2689                   <td>
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:\
2708 AES128-SHA
2709    </pre>
2710                   </td>
2711                 </tr>
2712               </table>
2713               <table border="0" bgcolor="#E0E0E0" width="90%">
2714                 <tr>
2715                   <td>
2716                     <pre class=
2717                     "SCREEN">    # Use keywords instead of explicitly naming the ciphers (Does not work with MbedTLS)
2718     cipher-list ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
2719    </pre>
2720                   </td>
2721                 </tr>
2722               </table>
2723             </dd>
2724           </dl>
2725         </div>
2726       </div>
2727       <div class="SECT3">
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">
2730           <dl>
2731             <dt>Specifies:</dt>
2732             <dd>
2733               <p>The trusted CAs file in ".pem" format.</p>
2734             </dd>
2735             <dt>Type of value:</dt>
2736             <dd>
2737               <p>File name relative to ca-directory</p>
2738             </dd>
2739             <dt>Default value:</dt>
2740             <dd>
2741               <p><span class="emphasis"><i class="EMPHASIS">trustedCAs.pem</i></span></p>
2742             </dd>
2743             <dt>Effect if unset:</dt>
2744             <dd>
2745               <p>Default value is used.</p>
2746             </dd>
2747             <dt>Notes:</dt>
2748             <dd>
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>
2753             </dd>
2754             <dt>Example:</dt>
2755             <dd>
2756               <p>trusted-cas-file trusted_cas_file.pem</p>
2757             </dd>
2758           </dl>
2759         </div>
2760       </div>
2761     </div>
2762     <div class="SECT2">
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">&nbsp;&nbsp;<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>
2772       directive.</p>
2773       <p class="LITERALLAYOUT">&nbsp;&nbsp;<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">&nbsp;&nbsp;<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
2782       above.</p>
2783       <p class="LITERALLAYOUT">&nbsp;&nbsp;<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">&nbsp;&nbsp;<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">&nbsp;&nbsp;<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">&nbsp;&nbsp;<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">&nbsp;&nbsp;<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