Rebuild docs for +limit-cookie-lifetime{} and forward-socks5t
[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
4 <html>
5 <head>
6   <title>The Main Configuration File</title>
7   <meta name="GENERATOR" content=
8   "Modular DocBook HTML Stylesheet Version 1.79">
9   <link rel="HOME" title="Privoxy 3.0.20 User Manual" href="index.html">
10   <link rel="PREVIOUS" title="Privoxy Configuration" href=
11   "configuration.html">
12   <link rel="NEXT" title="Actions Files" href="actions-file.html">
13   <link rel="STYLESHEET" type="text/css" href="../p_doc.css">
14   <meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
15   <link rel="STYLESHEET" type="text/css" href="p_doc.css">
16 </head>
17
18 <body class="SECT1" bgcolor="#EEEEEE" text="#000000" link="#0000FF" vlink=
19 "#840084" alink="#0000FF">
20   <div class="NAVHEADER">
21     <table summary="Header navigation table" width="100%" border="0"
22     cellpadding="0" cellspacing="0">
23       <tr>
24         <th colspan="3" align="center">Privoxy 3.0.20 User Manual</th>
25       </tr>
26
27       <tr>
28         <td width="10%" align="left" valign="bottom"><a href=
29         "configuration.html" accesskey="P">Prev</a></td>
30
31         <td width="80%" align="center" valign="bottom"></td>
32
33         <td width="10%" align="right" valign="bottom"><a href=
34         "actions-file.html" accesskey="N">Next</a></td>
35       </tr>
36     </table>
37     <hr align="left" width="100%">
38   </div>
39
40   <div class="SECT1">
41     <h1 class="SECT1"><a name="CONFIG" id="CONFIG">7. The Main Configuration
42     File</a></h1>
43
44     <p>By default, the main configuration file is named <tt class=
45     "FILENAME">config</tt>, with the exception of Windows, where it is named
46     <tt class="FILENAME">config.txt</tt>. Configuration lines consist of an
47     initial keyword followed by a list of values, all separated by whitespace
48     (any number of spaces or tabs). For example:</p>
49
50     <p class="LITERALLAYOUT"><tt class="LITERAL">&nbsp;&nbsp;<span class=
51     "emphasis"><i class="EMPHASIS">confdir /etc/privoxy</i></span></tt></p>
52
53     <p>Assigns the value <tt class="LITERAL">/etc/privoxy</tt> to the option
54     <tt class="LITERAL">confdir</tt> and thus indicates that the
55     configuration directory is named <span class=
56     "QUOTE">"/etc/privoxy/"</span>.</p>
57
58     <p>All options in the config file except for <tt class=
59     "LITERAL">confdir</tt> and <tt class="LITERAL">logdir</tt> are optional.
60     Watch out in the below description for what happens if you leave them
61     unset.</p>
62
63     <p>The main config file controls all aspects of <span class=
64     "APPLICATION">Privoxy</span>'s operation that are not location dependent
65     (i.e. they apply universally, no matter where you may be surfing). Like
66     the filter and action files, the config file is a plain text file and can
67     be modified with a text editor like emacs, vim or notepad.exe.</p>
68
69     <div class="SECT2">
70       <h2 class="SECT2"><a name="LOCAL-SET-UP" id="LOCAL-SET-UP">7.1. Local
71       Set-up Documentation</a></h2>
72
73       <p>If you intend to operate <span class="APPLICATION">Privoxy</span>
74       for more users than just yourself, it might be a good idea to let them
75       know how to reach you, what you block and why you do that, your
76       policies, etc.</p>
77
78       <div class="SECT3">
79         <h4 class="SECT3"><a name="USER-MANUAL" id="USER-MANUAL">7.1.1.
80         user-manual</a></h4>
81
82         <div class="VARIABLELIST">
83           <dl>
84             <dt>Specifies:</dt>
85
86             <dd>
87               <p>Location of the <span class="APPLICATION">Privoxy</span>
88               User Manual.</p>
89             </dd>
90
91             <dt>Type of value:</dt>
92
93             <dd>
94               <p>A fully qualified URI</p>
95             </dd>
96
97             <dt>Default value:</dt>
98
99             <dd>
100               <p><span class="emphasis"><i class=
101               "EMPHASIS">Unset</i></span></p>
102             </dd>
103
104             <dt>Effect if unset:</dt>
105
106             <dd>
107               <p><a href="http://www.privoxy.org/user-manual/" target=
108               "_top">http://www.privoxy.org/<tt class=
109               "REPLACEABLE"><i>version</i></tt>/user-manual/</a> will be
110               used, where <tt class="REPLACEABLE"><i>version</i></tt> is the
111               <span class="APPLICATION">Privoxy</span> version.</p>
112             </dd>
113
114             <dt>Notes:</dt>
115
116             <dd>
117               <p>The User Manual URI is the single best source of information
118               on <span class="APPLICATION">Privoxy</span>, and is used for
119               help links from some of the internal CGI pages. The manual
120               itself is normally packaged with the binary distributions, so
121               you probably want to set this to a locally installed copy.</p>
122
123               <p>Examples:</p>
124
125               <p>The best all purpose solution is simply to put the full
126               local <tt class="LITERAL">PATH</tt> to where the <i class=
127               "CITETITLE">User Manual</i> is located:</p>
128
129               <table border="0" bgcolor="#E0E0E0" width="90%">
130                 <tr>
131                   <td>
132                     <pre class="SCREEN">
133   user-manual  /usr/share/doc/privoxy/user-manual
134 </pre>
135                   </td>
136                 </tr>
137               </table>
138
139               <p>The User Manual is then available to anyone with access to
140               <span class="APPLICATION">Privoxy</span>, by following the
141               built-in URL: <tt class=
142               "LITERAL">http://config.privoxy.org/user-manual/</tt> (or the
143               shortcut: <tt class=
144               "LITERAL">http://p.p/user-manual/</tt>).</p>
145
146               <p>If the documentation is not on the local system, it can be
147               accessed from a remote server, as:</p>
148
149               <table border="0" bgcolor="#E0E0E0" width="90%">
150                 <tr>
151                   <td>
152                     <pre class="SCREEN">
153   user-manual  http://example.com/privoxy/user-manual/
154 </pre>
155                   </td>
156                 </tr>
157               </table>
158
159               <div class="WARNING">
160                 <table class="WARNING" border="1" width="90%">
161                   <tr>
162                     <td align="center"><b>Warning</b></td>
163                   </tr>
164
165                   <tr>
166                     <td align="left">
167                       <p>If set, this option should be <span class=
168                       "emphasis"><i class="EMPHASIS">the first option in the
169                       config file</i></span>, because it is used while the
170                       config file is being read on start-up.</p>
171                     </td>
172                   </tr>
173                 </table>
174               </div>
175             </dd>
176           </dl>
177         </div>
178       </div>
179
180       <div class="SECT3">
181         <h4 class="SECT3"><a name="TRUST-INFO-URL" id="TRUST-INFO-URL">7.1.2.
182         trust-info-url</a></h4>
183
184         <div class="VARIABLELIST">
185           <dl>
186             <dt>Specifies:</dt>
187
188             <dd>
189               <p>A URL to be displayed in the error page that users will see
190               if access to an untrusted page is denied.</p>
191             </dd>
192
193             <dt>Type of value:</dt>
194
195             <dd>
196               <p>URL</p>
197             </dd>
198
199             <dt>Default value:</dt>
200
201             <dd>
202               <p><span class="emphasis"><i class=
203               "EMPHASIS">Unset</i></span></p>
204             </dd>
205
206             <dt>Effect if unset:</dt>
207
208             <dd>
209               <p>No links are displayed on the "untrusted" error page.</p>
210             </dd>
211
212             <dt>Notes:</dt>
213
214             <dd>
215               <p>The value of this option only matters if the experimental
216               trust mechanism has been activated. (See <a href=
217               "config.html#TRUSTFILE"><span class="emphasis"><i class=
218               "EMPHASIS">trustfile</i></span></a> below.)</p>
219
220               <p>If you use the trust mechanism, it is a good idea to write
221               up some on-line documentation about your trust policy and to
222               specify the URL(s) here. Use multiple times for multiple
223               URLs.</p>
224
225               <p>The URL(s) should be added to the trustfile as well, so
226               users don't end up locked out from the information on why they
227               were locked out in the first place!</p>
228             </dd>
229           </dl>
230         </div>
231       </div>
232
233       <div class="SECT3">
234         <h4 class="SECT3"><a name="ADMIN-ADDRESS" id="ADMIN-ADDRESS">7.1.3.
235         admin-address</a></h4>
236
237         <div class="VARIABLELIST">
238           <dl>
239             <dt>Specifies:</dt>
240
241             <dd>
242               <p>An email address to reach the <span class=
243               "APPLICATION">Privoxy</span> administrator.</p>
244             </dd>
245
246             <dt>Type of value:</dt>
247
248             <dd>
249               <p>Email address</p>
250             </dd>
251
252             <dt>Default value:</dt>
253
254             <dd>
255               <p><span class="emphasis"><i class=
256               "EMPHASIS">Unset</i></span></p>
257             </dd>
258
259             <dt>Effect if unset:</dt>
260
261             <dd>
262               <p>No email address is displayed on error pages and the CGI
263               user interface.</p>
264             </dd>
265
266             <dt>Notes:</dt>
267
268             <dd>
269               <p>If both <tt class="LITERAL">admin-address</tt> and
270               <tt class="LITERAL">proxy-info-url</tt> are unset, the whole
271               "Local Privoxy Support" box on all generated pages will not be
272               shown.</p>
273             </dd>
274           </dl>
275         </div>
276       </div>
277
278       <div class="SECT3">
279         <h4 class="SECT3"><a name="PROXY-INFO-URL" id="PROXY-INFO-URL">7.1.4.
280         proxy-info-url</a></h4>
281
282         <div class="VARIABLELIST">
283           <dl>
284             <dt>Specifies:</dt>
285
286             <dd>
287               <p>A URL to documentation about the local <span class=
288               "APPLICATION">Privoxy</span> setup, configuration or
289               policies.</p>
290             </dd>
291
292             <dt>Type of value:</dt>
293
294             <dd>
295               <p>URL</p>
296             </dd>
297
298             <dt>Default value:</dt>
299
300             <dd>
301               <p><span class="emphasis"><i class=
302               "EMPHASIS">Unset</i></span></p>
303             </dd>
304
305             <dt>Effect if unset:</dt>
306
307             <dd>
308               <p>No link to local documentation is displayed on error pages
309               and the CGI user interface.</p>
310             </dd>
311
312             <dt>Notes:</dt>
313
314             <dd>
315               <p>If both <tt class="LITERAL">admin-address</tt> and
316               <tt class="LITERAL">proxy-info-url</tt> are unset, the whole
317               "Local Privoxy Support" box on all generated pages will not be
318               shown.</p>
319
320               <p>This URL shouldn't be blocked ;-)</p>
321             </dd>
322           </dl>
323         </div>
324       </div>
325     </div>
326
327     <div class="SECT2">
328       <h2 class="SECT2"><a name="CONF-LOG-LOC" id="CONF-LOG-LOC">7.2.
329       Configuration and Log File Locations</a></h2>
330
331       <p><span class="APPLICATION">Privoxy</span> can (and normally does) use
332       a number of other files for additional configuration, help and logging.
333       This section of the configuration file tells <span class=
334       "APPLICATION">Privoxy</span> where to find those other files.</p>
335
336       <p>The user running <span class="APPLICATION">Privoxy</span>, must have
337       read permission for all configuration files, and write permission to
338       any files that would be modified, such as log files and actions
339       files.</p>
340
341       <div class="SECT3">
342         <h4 class="SECT3"><a name="CONFDIR" id="CONFDIR">7.2.1.
343         confdir</a></h4>
344
345         <div class="VARIABLELIST">
346           <dl>
347             <dt>Specifies:</dt>
348
349             <dd>
350               <p>The directory where the other configuration files are
351               located.</p>
352             </dd>
353
354             <dt>Type of value:</dt>
355
356             <dd>
357               <p>Path name</p>
358             </dd>
359
360             <dt>Default value:</dt>
361
362             <dd>
363               <p>/etc/privoxy (Unix) <span class="emphasis"><i class=
364               "EMPHASIS">or</i></span> <span class=
365               "APPLICATION">Privoxy</span> installation dir (Windows)</p>
366             </dd>
367
368             <dt>Effect if unset:</dt>
369
370             <dd>
371               <p><span class="emphasis"><i class=
372               "EMPHASIS">Mandatory</i></span></p>
373             </dd>
374
375             <dt>Notes:</dt>
376
377             <dd>
378               <p>No trailing <span class="QUOTE">"<tt class=
379               "LITERAL">/</tt>"</span>, please.</p>
380             </dd>
381           </dl>
382         </div>
383       </div>
384
385       <div class="SECT3">
386         <h4 class="SECT3"><a name="TEMPLDIR" id="TEMPLDIR">7.2.2.
387         templdir</a></h4>
388
389         <div class="VARIABLELIST">
390           <dl>
391             <dt>Specifies:</dt>
392
393             <dd>
394               <p>An alternative directory where the templates are loaded
395               from.</p>
396             </dd>
397
398             <dt>Type of value:</dt>
399
400             <dd>
401               <p>Path name</p>
402             </dd>
403
404             <dt>Default value:</dt>
405
406             <dd>
407               <p>unset</p>
408             </dd>
409
410             <dt>Effect if unset:</dt>
411
412             <dd>
413               <p>The templates are assumed to be located in
414               confdir/template.</p>
415             </dd>
416
417             <dt>Notes:</dt>
418
419             <dd>
420               <p><span class="APPLICATION">Privoxy's</span> original
421               templates are usually overwritten with each update. Use this
422               option to relocate customized templates that should be kept. As
423               template variables might change between updates, you shouldn't
424               expect templates to work with <span class=
425               "APPLICATION">Privoxy</span> releases other than the one they
426               were part of, though.</p>
427             </dd>
428           </dl>
429         </div>
430       </div>
431
432       <div class="SECT3">
433         <h4 class="SECT3"><a name="LOGDIR" id="LOGDIR">7.2.3. logdir</a></h4>
434
435         <div class="VARIABLELIST">
436           <dl>
437             <dt>Specifies:</dt>
438
439             <dd>
440               <p>The directory where all logging takes place (i.e. where the
441               <tt class="FILENAME">logfile</tt> is located).</p>
442             </dd>
443
444             <dt>Type of value:</dt>
445
446             <dd>
447               <p>Path name</p>
448             </dd>
449
450             <dt>Default value:</dt>
451
452             <dd>
453               <p>/var/log/privoxy (Unix) <span class="emphasis"><i class=
454               "EMPHASIS">or</i></span> <span class=
455               "APPLICATION">Privoxy</span> installation dir (Windows)</p>
456             </dd>
457
458             <dt>Effect if unset:</dt>
459
460             <dd>
461               <p><span class="emphasis"><i class=
462               "EMPHASIS">Mandatory</i></span></p>
463             </dd>
464
465             <dt>Notes:</dt>
466
467             <dd>
468               <p>No trailing <span class="QUOTE">"<tt class=
469               "LITERAL">/</tt>"</span>, please.</p>
470             </dd>
471           </dl>
472         </div>
473       </div>
474
475       <div class="SECT3">
476         <h4 class="SECT3"><a name="ACTIONSFILE" id="ACTIONSFILE">7.2.4.
477         actionsfile</a></h4><a name="DEFAULT.ACTION" id=
478         "DEFAULT.ACTION"></a><a name="STANDARD.ACTION" id=
479         "STANDARD.ACTION"></a><a name="USER.ACTION" id="USER.ACTION"></a>
480
481         <div class="VARIABLELIST">
482           <dl>
483             <dt>Specifies:</dt>
484
485             <dd>
486               <p>The <a href="actions-file.html">actions file(s)</a> to
487               use</p>
488             </dd>
489
490             <dt>Type of value:</dt>
491
492             <dd>
493               <p>Complete file name, relative to <tt class=
494               "LITERAL">confdir</tt></p>
495             </dd>
496
497             <dt>Default values:</dt>
498
499             <dd>
500               <table border="0">
501                 <tbody>
502                   <tr>
503                     <td>
504                       <p class="LITERALLAYOUT">
505                       &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>
506                     </td>
507                   </tr>
508
509                   <tr>
510                     <td>
511                       <p class="LITERALLAYOUT">
512                       &nbsp;&nbsp;default.action&nbsp;&nbsp;&nbsp;#&nbsp;Main&nbsp;actions&nbsp;file</p>
513                     </td>
514                   </tr>
515
516                   <tr>
517                     <td>
518                       <p class="LITERALLAYOUT">
519                       &nbsp;&nbsp;user.action&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;User&nbsp;customizations</p>
520                     </td>
521                   </tr>
522                 </tbody>
523               </table>
524             </dd>
525
526             <dt>Effect if unset:</dt>
527
528             <dd>
529               <p>No actions are taken at all. More or less neutral
530               proxying.</p>
531             </dd>
532
533             <dt>Notes:</dt>
534
535             <dd>
536               <p>Multiple <tt class="LITERAL">actionsfile</tt> lines are
537               permitted, and are in fact recommended!</p>
538
539               <p>The default values are <tt class=
540               "FILENAME">default.action</tt>, which is the <span class=
541               "QUOTE">"main"</span> actions file maintained by the
542               developers, and <tt class="FILENAME">user.action</tt>, where
543               you can make your personal additions.</p>
544
545               <p>Actions files contain all the per site and per URL
546               configuration for ad blocking, cookie management, privacy
547               considerations, etc. There is no point in using <span class=
548               "APPLICATION">Privoxy</span> without at least one actions
549               file.</p>
550
551               <p>Note that since Privoxy 3.0.7, the complete filename,
552               including the <span class="QUOTE">".action"</span> extension
553               has to be specified. The syntax change was necessary to be
554               consistent with the other file options and to allow previously
555               forbidden characters.</p>
556             </dd>
557           </dl>
558         </div>
559       </div>
560
561       <div class="SECT3">
562         <h4 class="SECT3"><a name="FILTERFILE" id="FILTERFILE">7.2.5.
563         filterfile</a></h4><a name="DEFAULT.FILTER" id="DEFAULT.FILTER"></a>
564
565         <div class="VARIABLELIST">
566           <dl>
567             <dt>Specifies:</dt>
568
569             <dd>
570               <p>The <a href="filter-file.html">filter file(s)</a> to use</p>
571             </dd>
572
573             <dt>Type of value:</dt>
574
575             <dd>
576               <p>File name, relative to <tt class="LITERAL">confdir</tt></p>
577             </dd>
578
579             <dt>Default value:</dt>
580
581             <dd>
582               <p>default.filter (Unix) <span class="emphasis"><i class=
583               "EMPHASIS">or</i></span> default.filter.txt (Windows)</p>
584             </dd>
585
586             <dt>Effect if unset:</dt>
587
588             <dd>
589               <p>No textual content filtering takes place, i.e. all
590               <tt class="LITERAL">+<a href=
591               "actions-file.html#FILTER">filter</a>{<tt class=
592               "REPLACEABLE"><i>name</i></tt>}</tt> actions in the actions
593               files are turned neutral.</p>
594             </dd>
595
596             <dt>Notes:</dt>
597
598             <dd>
599               <p>Multiple <tt class="LITERAL">filterfile</tt> lines are
600               permitted.</p>
601
602               <p>The <a href="filter-file.html">filter files</a> contain
603               content modification rules that use <a href=
604               "appendix.html#REGEX">regular expressions</a>. These rules
605               permit powerful changes on the content of Web pages, and
606               optionally the headers as well, e.g., you could try to disable
607               your favorite JavaScript annoyances, re-write the actual
608               displayed text, or just have some fun playing buzzword bingo
609               with web pages.</p>
610
611               <p>The <tt class="LITERAL">+<a href=
612               "actions-file.html#FILTER">filter</a>{<tt class=
613               "REPLACEABLE"><i>name</i></tt>}</tt> actions rely on the
614               relevant filter (<tt class="REPLACEABLE"><i>name</i></tt>) to
615               be defined in a filter file!</p>
616
617               <p>A pre-defined filter file called <tt class=
618               "FILENAME">default.filter</tt> that contains a number of useful
619               filters for common problems is included in the distribution.
620               See the section on the <tt class="LITERAL"><a href=
621               "actions-file.html#FILTER">filter</a></tt> action for a
622               list.</p>
623
624               <p>It is recommended to place any locally adapted filters into
625               a separate file, such as <tt class=
626               "FILENAME">user.filter</tt>.</p>
627             </dd>
628           </dl>
629         </div>
630       </div>
631
632       <div class="SECT3">
633         <h4 class="SECT3"><a name="LOGFILE" id="LOGFILE">7.2.6.
634         logfile</a></h4>
635
636         <div class="VARIABLELIST">
637           <dl>
638             <dt>Specifies:</dt>
639
640             <dd>
641               <p>The log file to use</p>
642             </dd>
643
644             <dt>Type of value:</dt>
645
646             <dd>
647               <p>File name, relative to <tt class="LITERAL">logdir</tt></p>
648             </dd>
649
650             <dt>Default value:</dt>
651
652             <dd>
653               <p><span class="emphasis"><i class="EMPHASIS">Unset (commented
654               out)</i></span>. When activated: logfile (Unix) <span class=
655               "emphasis"><i class="EMPHASIS">or</i></span> privoxy.log
656               (Windows).</p>
657             </dd>
658
659             <dt>Effect if unset:</dt>
660
661             <dd>
662               <p>No logfile is written.</p>
663             </dd>
664
665             <dt>Notes:</dt>
666
667             <dd>
668               <p>The logfile is where all logging and error messages are
669               written. The level of detail and number of messages are set
670               with the <tt class="LITERAL">debug</tt> option (see below). The
671               logfile can be useful for tracking down a problem with
672               <span class="APPLICATION">Privoxy</span> (e.g., it's not
673               blocking an ad you think it should block) and it can help you
674               to monitor what your browser is doing.</p>
675
676               <p>Depending on the debug options below, the logfile may be a
677               privacy risk if third parties can get access to it. As most
678               users will never look at it, <span class=
679               "APPLICATION">Privoxy</span> 3.0.7 and later only log fatal
680               errors by default.</p>
681
682               <p>For most troubleshooting purposes, you will have to change
683               that, please refer to the debugging section for details.</p>
684
685               <p>Your logfile will grow indefinitely, and you will probably
686               want to periodically remove it. On Unix systems, you can do
687               this with a cron job (see <span class="QUOTE">"man
688               cron"</span>).</p>
689
690               <p>Any log files must be writable by whatever user <span class=
691               "APPLICATION">Privoxy</span> is being run as (on Unix, default
692               user id is <span class="QUOTE">"privoxy"</span>).</p>
693             </dd>
694           </dl>
695         </div>
696       </div>
697
698       <div class="SECT3">
699         <h4 class="SECT3"><a name="TRUSTFILE" id="TRUSTFILE">7.2.7.
700         trustfile</a></h4>
701
702         <div class="VARIABLELIST">
703           <dl>
704             <dt>Specifies:</dt>
705
706             <dd>
707               <p>The name of the trust file to use</p>
708             </dd>
709
710             <dt>Type of value:</dt>
711
712             <dd>
713               <p>File name, relative to <tt class="LITERAL">confdir</tt></p>
714             </dd>
715
716             <dt>Default value:</dt>
717
718             <dd>
719               <p><span class="emphasis"><i class="EMPHASIS">Unset (commented
720               out)</i></span>. When activated: trust (Unix) <span class=
721               "emphasis"><i class="EMPHASIS">or</i></span> trust.txt
722               (Windows)</p>
723             </dd>
724
725             <dt>Effect if unset:</dt>
726
727             <dd>
728               <p>The entire trust mechanism is disabled.</p>
729             </dd>
730
731             <dt>Notes:</dt>
732
733             <dd>
734               <p>The trust mechanism is an experimental feature for building
735               white-lists and should be used with care. It is <span class=
736               "emphasis"><i class="EMPHASIS">NOT</i></span> recommended for
737               the casual user.</p>
738
739               <p>If you specify a trust file, <span class=
740               "APPLICATION">Privoxy</span> will only allow access to sites
741               that are specified in the trustfile. Sites can be listed in one
742               of two ways:</p>
743
744               <p>Prepending a <tt class="LITERAL">~</tt> character limits
745               access to this site only (and any sub-paths within this site),
746               e.g. <tt class="LITERAL">~www.example.com</tt> allows access to
747               <tt class="LITERAL">~www.example.com/features/news.html</tt>,
748               etc.</p>
749
750               <p>Or, you can designate sites as <span class=
751               "emphasis"><i class="EMPHASIS">trusted referrers</i></span>, by
752               prepending the name with a <tt class="LITERAL">+</tt>
753               character. The effect is that access to untrusted sites will be
754               granted -- but only if a link from this trusted referrer was
755               used to get there. The link target will then be added to the
756               <span class="QUOTE">"trustfile"</span> so that future, direct
757               accesses will be granted. Sites added via this mechanism do not
758               become trusted referrers themselves (i.e. they are added with a
759               <tt class="LITERAL">~</tt> designation). There is a limit of
760               512 such entries, after which new entries will not be made.</p>
761
762               <p>If you use the <tt class="LITERAL">+</tt> operator in the
763               trust file, it may grow considerably over time.</p>
764
765               <p>It is recommended that <span class=
766               "APPLICATION">Privoxy</span> be compiled with the <tt class=
767               "LITERAL">--disable-force</tt>, <tt class=
768               "LITERAL">--disable-toggle</tt> and <tt class=
769               "LITERAL">--disable-editor</tt> options, if this feature is to
770               be used.</p>
771
772               <p>Possible applications include limiting Internet access for
773               children.</p>
774             </dd>
775           </dl>
776         </div>
777       </div>
778     </div>
779
780     <div class="SECT2">
781       <h2 class="SECT2"><a name="DEBUGGING" id="DEBUGGING">7.3.
782       Debugging</a></h2>
783
784       <p>These options are mainly useful when tracing a problem. Note that
785       you might also want to invoke <span class="APPLICATION">Privoxy</span>
786       with the <tt class="LITERAL">--no-daemon</tt> command line option when
787       debugging.</p>
788
789       <div class="SECT3">
790         <h4 class="SECT3"><a name="DEBUG" id="DEBUG">7.3.1. debug</a></h4>
791
792         <div class="VARIABLELIST">
793           <dl>
794             <dt>Specifies:</dt>
795
796             <dd>
797               <p>Key values that determine what information gets logged.</p>
798             </dd>
799
800             <dt>Type of value:</dt>
801
802             <dd>
803               <p>Integer values</p>
804             </dd>
805
806             <dt>Default value:</dt>
807
808             <dd>
809               <p>0 (i.e.: only fatal errors (that cause Privoxy to exit) are
810               logged)</p>
811             </dd>
812
813             <dt>Effect if unset:</dt>
814
815             <dd>
816               <p>Default value is used (see above).</p>
817             </dd>
818
819             <dt>Notes:</dt>
820
821             <dd>
822               <p>The available debug levels are:</p>
823
824               <table border="0" bgcolor="#E0E0E0" width="90%">
825                 <tr>
826                   <td>
827                     <pre class="PROGRAMLISTING">
828   debug     1 # Log the destination for each request <span class=
829 "APPLICATION">Privoxy</span> let through. See also debug 1024.
830   debug     2 # show each connection status
831   debug     4 # show I/O status
832   debug     8 # show header parsing
833   debug    16 # log all data written to the network
834   debug    32 # debug force feature
835   debug    64 # debug regular expression filters
836   debug   128 # debug redirects
837   debug   256 # debug GIF de-animation
838   debug   512 # Common Log Format
839   debug  1024 # Log the destination for requests <span class=
840 "APPLICATION">Privoxy</span> didn't let through, and the reason why.
841   debug  2048 # CGI user interface
842   debug  4096 # Startup banner and warnings.
843   debug  8192 # Non-fatal errors
844   debug 32768 # log all data read from the network
845   debug 65536 # Log the applying actions
846 </pre>
847                   </td>
848                 </tr>
849               </table>
850
851               <p>To select multiple debug levels, you can either add them or
852               use multiple <tt class="LITERAL">debug</tt> lines.</p>
853
854               <p>A debug level of 1 is informative because it will show you
855               each request as it happens. <span class="emphasis"><i class=
856               "EMPHASIS">1, 1024, 4096 and 8192 are recommended</i></span> so
857               that you will notice when things go wrong. The other levels are
858               probably only of interest if you are hunting down a specific
859               problem. They can produce a hell of an output (especially
860               16).</p>
861
862               <p><span class="APPLICATION">Privoxy</span> used to ship with
863               the debug levels recommended above enabled by default, but due
864               to privacy concerns 3.0.7 and later are configured to only log
865               fatal errors.</p>
866
867               <p>If you are used to the more verbose settings, simply enable
868               the debug lines below again.</p>
869
870               <p>If you want to use pure CLF (Common Log Format), you should
871               set <span class="QUOTE">"debug 512"</span> <span class=
872               "emphasis"><i class="EMPHASIS">ONLY</i></span> and not enable
873               anything else.</p>
874
875               <p><span class="APPLICATION">Privoxy</span> has a hard-coded
876               limit for the length of log messages. If it's reached, messages
877               are logged truncated and marked with <span class="QUOTE">"...
878               [too long, truncated]"</span>.</p>
879
880               <p>Please don't file any support requests without trying to
881               reproduce the problem with increased debug level first. Once
882               you read the log messages, you may even be able to solve the
883               problem on your own.</p>
884             </dd>
885           </dl>
886         </div>
887       </div>
888
889       <div class="SECT3">
890         <h4 class="SECT3"><a name="SINGLE-THREADED" id=
891         "SINGLE-THREADED">7.3.2. single-threaded</a></h4>
892
893         <div class="VARIABLELIST">
894           <dl>
895             <dt>Specifies:</dt>
896
897             <dd>
898               <p>Whether to run only one server thread.</p>
899             </dd>
900
901             <dt>Type of value:</dt>
902
903             <dd>
904               <p><span class="emphasis"><i class=
905               "EMPHASIS">None</i></span></p>
906             </dd>
907
908             <dt>Default value:</dt>
909
910             <dd>
911               <p><span class="emphasis"><i class=
912               "EMPHASIS">Unset</i></span></p>
913             </dd>
914
915             <dt>Effect if unset:</dt>
916
917             <dd>
918               <p>Multi-threaded (or, where unavailable: forked) operation,
919               i.e. the ability to serve multiple requests simultaneously.</p>
920             </dd>
921
922             <dt>Notes:</dt>
923
924             <dd>
925               <p>This option is only there for debugging purposes.
926               <span class="emphasis"><i class="EMPHASIS">It will drastically
927               reduce performance.</i></span></p>
928             </dd>
929           </dl>
930         </div>
931       </div>
932
933       <div class="SECT3">
934         <h4 class="SECT3"><a name="HOSTNAME" id="HOSTNAME">7.3.3.
935         hostname</a></h4>
936
937         <div class="VARIABLELIST">
938           <dl>
939             <dt>Specifies:</dt>
940
941             <dd>
942               <p>The hostname shown on the CGI pages.</p>
943             </dd>
944
945             <dt>Type of value:</dt>
946
947             <dd>
948               <p>Text</p>
949             </dd>
950
951             <dt>Default value:</dt>
952
953             <dd>
954               <p><span class="emphasis"><i class=
955               "EMPHASIS">Unset</i></span></p>
956             </dd>
957
958             <dt>Effect if unset:</dt>
959
960             <dd>
961               <p>The hostname provided by the operating system is used.</p>
962             </dd>
963
964             <dt>Notes:</dt>
965
966             <dd>
967               <p>On some misconfigured systems resolving the hostname fails
968               or takes too much time and slows Privoxy down. Setting a fixed
969               hostname works around the problem.</p>
970
971               <p>In other circumstances it might be desirable to show a
972               hostname other than the one returned by the operating system.
973               For example if the system has several different hostnames and
974               you don't want to use the first one.</p>
975
976               <p>Note that Privoxy does not validate the specified hostname
977               value.</p>
978             </dd>
979           </dl>
980         </div>
981       </div>
982     </div>
983
984     <div class="SECT2">
985       <h2 class="SECT2"><a name="ACCESS-CONTROL" id="ACCESS-CONTROL">7.4.
986       Access Control and Security</a></h2>
987
988       <p>This section of the config file controls the security-relevant
989       aspects of <span class="APPLICATION">Privoxy</span>'s
990       configuration.</p>
991
992       <div class="SECT3">
993         <h4 class="SECT3"><a name="LISTEN-ADDRESS" id="LISTEN-ADDRESS">7.4.1.
994         listen-address</a></h4>
995
996         <div class="VARIABLELIST">
997           <dl>
998             <dt>Specifies:</dt>
999
1000             <dd>
1001               <p>The address and TCP port on which <span class=
1002               "APPLICATION">Privoxy</span> will listen for client
1003               requests.</p>
1004             </dd>
1005
1006             <dt>Type of value:</dt>
1007
1008             <dd>
1009               <p>[<tt class="REPLACEABLE"><i>IP-Address</i></tt>]:<tt class=
1010               "REPLACEABLE"><i>Port</i></tt></p>
1011
1012               <p>[<tt class="REPLACEABLE"><i>Hostname</i></tt>]:<tt class=
1013               "REPLACEABLE"><i>Port</i></tt></p>
1014             </dd>
1015
1016             <dt>Default value:</dt>
1017
1018             <dd>
1019               <p>127.0.0.1:8118</p>
1020             </dd>
1021
1022             <dt>Effect if unset:</dt>
1023
1024             <dd>
1025               <p>Bind to 127.0.0.1 (IPv4 localhost), port 8118. This is
1026               suitable and recommended for home users who run <span class=
1027               "APPLICATION">Privoxy</span> on the same machine as their
1028               browser.</p>
1029             </dd>
1030
1031             <dt>Notes:</dt>
1032
1033             <dd>
1034               <p>You will need to configure your browser(s) to this proxy
1035               address and port.</p>
1036
1037               <p>If you already have another service running on port 8118, or
1038               if you want to serve requests from other machines (e.g. on your
1039               local network) as well, you will need to override the
1040               default.</p>
1041
1042               <p>You can use this statement multiple times to make
1043               <span class="APPLICATION">Privoxy</span> listen on more ports
1044               or more <abbr class="ABBREV">IP</abbr> addresses. Suitable if
1045               your operating system does not support sharing <abbr class=
1046               "ABBREV">IPv6</abbr> and <abbr class="ABBREV">IPv4</abbr>
1047               protocols on the same socket.</p>
1048
1049               <p>If a hostname is used instead of an IP address, <span class=
1050               "APPLICATION">Privoxy</span> will try to resolve it to an IP
1051               address and if there are multiple, use the first one
1052               returned.</p>
1053
1054               <p>If the address for the hostname isn't already known on the
1055               system (for example because it's in /etc/hostname), this may
1056               result in DNS traffic.</p>
1057
1058               <p>If the specified address isn't available on the system, or
1059               if the hostname can't be resolved, <span class=
1060               "APPLICATION">Privoxy</span> will fail to start.</p>
1061
1062               <p>IPv6 addresses containing colons have to be quoted by
1063               brackets. They can only be used if <span class=
1064               "APPLICATION">Privoxy</span> has been compiled with IPv6
1065               support. If you aren't sure if your version supports it, have a
1066               look at <tt class=
1067               "LITERAL">http://config.privoxy.org/show-status</tt>.</p>
1068
1069               <p>Some operating systems will prefer IPv6 to IPv4 addresses
1070               even if the system has no IPv6 connectivity which is usually
1071               not expected by the user. Some even rely on DNS to resolve
1072               localhost which mean the "localhost" address used may not
1073               actually be local.</p>
1074
1075               <p>It is therefore recommended to explicitly configure the
1076               intended IP address instead of relying on the operating system,
1077               unless there's a strong reason not to.</p>
1078
1079               <p>If you leave out the address, <span class=
1080               "APPLICATION">Privoxy</span> will bind to all IPv4 interfaces
1081               (addresses) on your machine and may become reachable from the
1082               Internet and/or the local network. Be aware that some GNU/Linux
1083               distributions modify that behaviour without updating the
1084               documentation. Check for non-standard patches if your
1085               <span class="APPLICATION">Privoxy</span> version behaves
1086               differently.</p>
1087
1088               <p>If you configure <span class="APPLICATION">Privoxy</span> to
1089               be reachable from the network, consider using <a href=
1090               "config.html#ACLS">access control lists</a> (ACL's, see below),
1091               and/or a firewall.</p>
1092
1093               <p>If you open <span class="APPLICATION">Privoxy</span> to
1094               untrusted users, you will also want to make sure that the
1095               following actions are disabled: <tt class="LITERAL"><a href=
1096               "config.html#ENABLE-EDIT-ACTIONS">enable-edit-actions</a></tt>
1097               and <tt class="LITERAL"><a href=
1098               "config.html#ENABLE-REMOTE-TOGGLE">enable-remote-toggle</a></tt></p>
1099             </dd>
1100
1101             <dt>Example:</dt>
1102
1103             <dd>
1104               <p>Suppose you are running <span class=
1105               "APPLICATION">Privoxy</span> on a machine which has the address
1106               192.168.0.1 on your local private network (192.168.0.0) and has
1107               another outside connection with a different address. You want
1108               it to serve requests from inside only:</p>
1109
1110               <table border="0" bgcolor="#E0E0E0" width="90%">
1111                 <tr>
1112                   <td>
1113                     <pre class="PROGRAMLISTING">
1114   listen-address  192.168.0.1:8118
1115 </pre>
1116                   </td>
1117                 </tr>
1118               </table>
1119
1120               <p>Suppose you are running <span class=
1121               "APPLICATION">Privoxy</span> on an IPv6-capable machine and you
1122               want it to listen on the IPv6 address of the loopback
1123               device:</p>
1124
1125               <table border="0" bgcolor="#E0E0E0" width="90%">
1126                 <tr>
1127                   <td>
1128                     <pre class="PROGRAMLISTING">
1129   listen-address [::1]:8118
1130 </pre>
1131                   </td>
1132                 </tr>
1133               </table>
1134             </dd>
1135           </dl>
1136         </div>
1137       </div>
1138
1139       <div class="SECT3">
1140         <h4 class="SECT3"><a name="TOGGLE" id="TOGGLE">7.4.2. toggle</a></h4>
1141
1142         <div class="VARIABLELIST">
1143           <dl>
1144             <dt>Specifies:</dt>
1145
1146             <dd>
1147               <p>Initial state of "toggle" status</p>
1148             </dd>
1149
1150             <dt>Type of value:</dt>
1151
1152             <dd>
1153               <p>1 or 0</p>
1154             </dd>
1155
1156             <dt>Default value:</dt>
1157
1158             <dd>
1159               <p>1</p>
1160             </dd>
1161
1162             <dt>Effect if unset:</dt>
1163
1164             <dd>
1165               <p>Act as if toggled on</p>
1166             </dd>
1167
1168             <dt>Notes:</dt>
1169
1170             <dd>
1171               <p>If set to 0, <span class="APPLICATION">Privoxy</span> will
1172               start in <span class="QUOTE">"toggled off"</span> mode, i.e.
1173               mostly behave like a normal, content-neutral proxy with both ad
1174               blocking and content filtering disabled. See <tt class=
1175               "LITERAL">enable-remote-toggle</tt> below.</p>
1176
1177               <p>The windows version will only display the toggle icon in the
1178               system tray if this option is present.</p>
1179             </dd>
1180           </dl>
1181         </div>
1182       </div>
1183
1184       <div class="SECT3">
1185         <h4 class="SECT3"><a name="ENABLE-REMOTE-TOGGLE" id=
1186         "ENABLE-REMOTE-TOGGLE">7.4.3. enable-remote-toggle</a></h4>
1187
1188         <div class="VARIABLELIST">
1189           <dl>
1190             <dt>Specifies:</dt>
1191
1192             <dd>
1193               <p>Whether or not the <a href=
1194               "http://config.privoxy.org/toggle" target="_top">web-based
1195               toggle feature</a> may be used</p>
1196             </dd>
1197
1198             <dt>Type of value:</dt>
1199
1200             <dd>
1201               <p>0 or 1</p>
1202             </dd>
1203
1204             <dt>Default value:</dt>
1205
1206             <dd>
1207               <p>0</p>
1208             </dd>
1209
1210             <dt>Effect if unset:</dt>
1211
1212             <dd>
1213               <p>The web-based toggle feature is disabled.</p>
1214             </dd>
1215
1216             <dt>Notes:</dt>
1217
1218             <dd>
1219               <p>When toggled off, <span class="APPLICATION">Privoxy</span>
1220               mostly acts like a normal, content-neutral proxy, i.e. doesn't
1221               block ads or filter content.</p>
1222
1223               <p>Access to the toggle feature can <span class=
1224               "emphasis"><i class="EMPHASIS">not</i></span> be controlled
1225               separately by <span class="QUOTE">"ACLs"</span> or HTTP
1226               authentication, so that everybody who can access <span class=
1227               "APPLICATION">Privoxy</span> (see <span class=
1228               "QUOTE">"ACLs"</span> and <tt class=
1229               "LITERAL">listen-address</tt> above) can toggle it for all
1230               users. So this option is <span class="emphasis"><i class=
1231               "EMPHASIS">not recommended</i></span> for multi-user
1232               environments with untrusted users.</p>
1233
1234               <p>Note that malicious client side code (e.g Java) is also
1235               capable of using this option.</p>
1236
1237               <p>As a lot of <span class="APPLICATION">Privoxy</span> users
1238               don't read documentation, this feature is disabled by
1239               default.</p>
1240
1241               <p>Note that you must have compiled <span class=
1242               "APPLICATION">Privoxy</span> with support for this feature,
1243               otherwise this option has no effect.</p>
1244             </dd>
1245           </dl>
1246         </div>
1247       </div>
1248
1249       <div class="SECT3">
1250         <h4 class="SECT3"><a name="ENABLE-REMOTE-HTTP-TOGGLE" id=
1251         "ENABLE-REMOTE-HTTP-TOGGLE">7.4.4. enable-remote-http-toggle</a></h4>
1252
1253         <div class="VARIABLELIST">
1254           <dl>
1255             <dt>Specifies:</dt>
1256
1257             <dd>
1258               <p>Whether or not Privoxy recognizes special HTTP headers to
1259               change its behaviour.</p>
1260             </dd>
1261
1262             <dt>Type of value:</dt>
1263
1264             <dd>
1265               <p>0 or 1</p>
1266             </dd>
1267
1268             <dt>Default value:</dt>
1269
1270             <dd>
1271               <p>0</p>
1272             </dd>
1273
1274             <dt>Effect if unset:</dt>
1275
1276             <dd>
1277               <p>Privoxy ignores special HTTP headers.</p>
1278             </dd>
1279
1280             <dt>Notes:</dt>
1281
1282             <dd>
1283               <p>When toggled on, the client can change <span class=
1284               "APPLICATION">Privoxy's</span> behaviour by setting special
1285               HTTP headers. Currently the only supported special header is
1286               <span class="QUOTE">"X-Filter: No"</span>, to disable filtering
1287               for the ongoing request, even if it is enabled in one of the
1288               action files.</p>
1289
1290               <p>This feature is disabled by default. If you are using
1291               <span class="APPLICATION">Privoxy</span> in a environment with
1292               trusted clients, you may enable this feature at your
1293               discretion. Note that malicious client side code (e.g Java) is
1294               also capable of using this feature.</p>
1295
1296               <p>This option will be removed in future releases as it has
1297               been obsoleted by the more general header taggers.</p>
1298             </dd>
1299           </dl>
1300         </div>
1301       </div>
1302
1303       <div class="SECT3">
1304         <h4 class="SECT3"><a name="ENABLE-EDIT-ACTIONS" id=
1305         "ENABLE-EDIT-ACTIONS">7.4.5. enable-edit-actions</a></h4>
1306
1307         <div class="VARIABLELIST">
1308           <dl>
1309             <dt>Specifies:</dt>
1310
1311             <dd>
1312               <p>Whether or not the <a href=
1313               "http://config.privoxy.org/show-status" target="_top">web-based
1314               actions file editor</a> may be used</p>
1315             </dd>
1316
1317             <dt>Type of value:</dt>
1318
1319             <dd>
1320               <p>0 or 1</p>
1321             </dd>
1322
1323             <dt>Default value:</dt>
1324
1325             <dd>
1326               <p>0</p>
1327             </dd>
1328
1329             <dt>Effect if unset:</dt>
1330
1331             <dd>
1332               <p>The web-based actions file editor is disabled.</p>
1333             </dd>
1334
1335             <dt>Notes:</dt>
1336
1337             <dd>
1338               <p>Access to the editor can <span class="emphasis"><i class=
1339               "EMPHASIS">not</i></span> be controlled separately by
1340               <span class="QUOTE">"ACLs"</span> or HTTP authentication, so
1341               that everybody who can access <span class=
1342               "APPLICATION">Privoxy</span> (see <span class=
1343               "QUOTE">"ACLs"</span> and <tt class=
1344               "LITERAL">listen-address</tt> above) can modify its
1345               configuration for all users.</p>
1346
1347               <p>This option is <span class="emphasis"><i class=
1348               "EMPHASIS">not recommended</i></span> for environments with
1349               untrusted users and as a lot of <span class=
1350               "APPLICATION">Privoxy</span> users don't read documentation,
1351               this feature is disabled by default.</p>
1352
1353               <p>Note that malicious client side code (e.g Java) is also
1354               capable of using the actions editor and you shouldn't enable
1355               this options unless you understand the consequences and are
1356               sure your browser is configured correctly.</p>
1357
1358               <p>Note that you must have compiled <span class=
1359               "APPLICATION">Privoxy</span> with support for this feature,
1360               otherwise this option has no effect.</p>
1361             </dd>
1362           </dl>
1363         </div>
1364       </div>
1365
1366       <div class="SECT3">
1367         <h4 class="SECT3"><a name="ENFORCE-BLOCKS" id="ENFORCE-BLOCKS">7.4.6.
1368         enforce-blocks</a></h4>
1369
1370         <div class="VARIABLELIST">
1371           <dl>
1372             <dt>Specifies:</dt>
1373
1374             <dd>
1375               <p>Whether the user is allowed to ignore blocks and can
1376               <span class="QUOTE">"go there anyway"</span>.</p>
1377             </dd>
1378
1379             <dt>Type of value:</dt>
1380
1381             <dd>
1382               <p><tt class="REPLACEABLE"><i>0 or 1</i></tt></p>
1383             </dd>
1384
1385             <dt>Default value:</dt>
1386
1387             <dd>
1388               <p><span class="emphasis"><i class="EMPHASIS">0</i></span></p>
1389             </dd>
1390
1391             <dt>Effect if unset:</dt>
1392
1393             <dd>
1394               <p>Blocks are not enforced.</p>
1395             </dd>
1396
1397             <dt>Notes:</dt>
1398
1399             <dd>
1400               <p><span class="APPLICATION">Privoxy</span> is mainly used to
1401               block and filter requests as a service to the user, for example
1402               to block ads and other junk that clogs the pipes. <span class=
1403               "APPLICATION">Privoxy's</span> configuration isn't perfect and
1404               sometimes innocent pages are blocked. In this situation it
1405               makes sense to allow the user to enforce the request and have
1406               <span class="APPLICATION">Privoxy</span> ignore the block.</p>
1407
1408               <p>In the default configuration <span class=
1409               "APPLICATION">Privoxy's</span> <span class=
1410               "QUOTE">"Blocked"</span> page contains a <span class=
1411               "QUOTE">"go there anyway"</span> link to adds a special string
1412               (the force prefix) to the request URL. If that link is used,
1413               <span class="APPLICATION">Privoxy</span> will detect the force
1414               prefix, remove it again and let the request pass.</p>
1415
1416               <p>Of course <span class="APPLICATION">Privoxy</span> can also
1417               be used to enforce a network policy. In that case the user
1418               obviously should not be able to bypass any blocks, and that's
1419               what the <span class="QUOTE">"enforce-blocks"</span> option is
1420               for. If it's enabled, <span class="APPLICATION">Privoxy</span>
1421               hides the <span class="QUOTE">"go there anyway"</span> link. If
1422               the user adds the force prefix by hand, it will not be accepted
1423               and the circumvention attempt is logged.</p>
1424             </dd>
1425
1426             <dt>Examples:</dt>
1427
1428             <dd>
1429               <p>enforce-blocks 1</p>
1430             </dd>
1431           </dl>
1432         </div>
1433       </div>
1434
1435       <div class="SECT3">
1436         <h4 class="SECT3"><a name="ACLS" id="ACLS">7.4.7. ACLs: permit-access
1437         and deny-access</a></h4><a name="PERMIT-ACCESS" id=
1438         "PERMIT-ACCESS"></a><a name="DENY-ACCESS" id="DENY-ACCESS"></a>
1439
1440         <div class="VARIABLELIST">
1441           <dl>
1442             <dt>Specifies:</dt>
1443
1444             <dd>
1445               <p>Who can access what.</p>
1446             </dd>
1447
1448             <dt>Type of value:</dt>
1449
1450             <dd>
1451               <p><tt class="REPLACEABLE"><i>src_addr</i></tt>[:<tt class=
1452               "REPLACEABLE"><i>port</i></tt>][/<tt class=
1453               "REPLACEABLE"><i>src_masklen</i></tt>] [<tt class=
1454               "REPLACEABLE"><i>dst_addr</i></tt>[:<tt class=
1455               "REPLACEABLE"><i>port</i></tt>][/<tt class=
1456               "REPLACEABLE"><i>dst_masklen</i></tt>]]</p>
1457
1458               <p>Where <tt class="REPLACEABLE"><i>src_addr</i></tt> and
1459               <tt class="REPLACEABLE"><i>dst_addr</i></tt> are IPv4 addresses
1460               in dotted decimal notation or valid DNS names, <tt class=
1461               "REPLACEABLE"><i>port</i></tt> is a port number, and <tt class=
1462               "REPLACEABLE"><i>src_masklen</i></tt> and <tt class=
1463               "REPLACEABLE"><i>dst_masklen</i></tt> are subnet masks in CIDR
1464               notation, i.e. integer values from 2 to 30 representing the
1465               length (in bits) of the network address. The masks and the
1466               whole destination part are optional.</p>
1467
1468               <p>If your system implements <a href=
1469               "http://tools.ietf.org/html/rfc3493" target="_top">RFC
1470               3493</a>, then <tt class="REPLACEABLE"><i>src_addr</i></tt> and
1471               <tt class="REPLACEABLE"><i>dst_addr</i></tt> can be IPv6
1472               addresses delimeted by brackets, <tt class=
1473               "REPLACEABLE"><i>port</i></tt> can be a number or a service
1474               name, and <tt class="REPLACEABLE"><i>src_masklen</i></tt> and
1475               <tt class="REPLACEABLE"><i>dst_masklen</i></tt> can be a number
1476               from 0 to 128.</p>
1477             </dd>
1478
1479             <dt>Default value:</dt>
1480
1481             <dd>
1482               <p><span class="emphasis"><i class=
1483               "EMPHASIS">Unset</i></span></p>
1484
1485               <p>If no <tt class="REPLACEABLE"><i>port</i></tt> is specified,
1486               any port will match. If no <tt class=
1487               "REPLACEABLE"><i>src_masklen</i></tt> or <tt class=
1488               "REPLACEABLE"><i>src_masklen</i></tt> is given, the complete IP
1489               address has to match (i.e. 32 bits for IPv4 and 128 bits for
1490               IPv6).</p>
1491             </dd>
1492
1493             <dt>Effect if unset:</dt>
1494
1495             <dd>
1496               <p>Don't restrict access further than implied by <tt class=
1497               "LITERAL">listen-address</tt></p>
1498             </dd>
1499
1500             <dt>Notes:</dt>
1501
1502             <dd>
1503               <p>Access controls are included at the request of ISPs and
1504               systems administrators, and <span class="emphasis"><i class=
1505               "EMPHASIS">are not usually needed by individual
1506               users</i></span>. For a typical home user, it will normally
1507               suffice to ensure that <span class="APPLICATION">Privoxy</span>
1508               only listens on the localhost (127.0.0.1) or internal (home)
1509               network address by means of the <a href=
1510               "config.html#LISTEN-ADDRESS"><span class="emphasis"><i class=
1511               "EMPHASIS">listen-address</i></span></a> option.</p>
1512
1513               <p>Please see the warnings in the FAQ that <span class=
1514               "APPLICATION">Privoxy</span> is not intended to be a substitute
1515               for a firewall or to encourage anyone to defer addressing basic
1516               security weaknesses.</p>
1517
1518               <p>Multiple ACL lines are OK. If any ACLs are specified,
1519               <span class="APPLICATION">Privoxy</span> only talks to IP
1520               addresses that match at least one <tt class=
1521               "LITERAL">permit-access</tt> line and don't match any
1522               subsequent <tt class="LITERAL">deny-access</tt> line. In other
1523               words, the last match wins, with the default being <tt class=
1524               "LITERAL">deny-access</tt>.</p>
1525
1526               <p>If <span class="APPLICATION">Privoxy</span> is using a
1527               forwarder (see <tt class="LITERAL">forward</tt> below) for a
1528               particular destination URL, the <tt class=
1529               "REPLACEABLE"><i>dst_addr</i></tt> that is examined is the
1530               address of the forwarder and <span class="emphasis"><i class=
1531               "EMPHASIS">NOT</i></span> the address of the ultimate target.
1532               This is necessary because it may be impossible for the local
1533               <span class="APPLICATION">Privoxy</span> to determine the IP
1534               address of the ultimate target (that's often what gateways are
1535               used for).</p>
1536
1537               <p>You should prefer using IP addresses over DNS names, because
1538               the address lookups take time. All DNS names must resolve! You
1539               can <span class="emphasis"><i class="EMPHASIS">not</i></span>
1540               use domain patterns like <span class="QUOTE">"*.org"</span> or
1541               partial domain names. If a DNS name resolves to multiple IP
1542               addresses, only the first one is used.</p>
1543
1544               <p>Some systems allow IPv4 clients to connect to IPv6 server
1545               sockets. Then the client's IPv4 address will be translated by
1546               the system into IPv6 address space with special prefix
1547               ::ffff:0:0/96 (so called IPv4 mapped IPv6 address).
1548               <span class="APPLICATION">Privoxy</span> can handle it and maps
1549               such ACL addresses automatically.</p>
1550
1551               <p>Denying access to particular sites by ACL may have undesired
1552               side effects if the site in question is hosted on a machine
1553               which also hosts other sites (most sites are).</p>
1554             </dd>
1555
1556             <dt>Examples:</dt>
1557
1558             <dd>
1559               <p>Explicitly define the default behavior if no ACL and
1560               <tt class="LITERAL">listen-address</tt> are set: <span class=
1561               "QUOTE">"localhost"</span> is OK. The absence of a <tt class=
1562               "REPLACEABLE"><i>dst_addr</i></tt> implies that <span class=
1563               "emphasis"><i class="EMPHASIS">all</i></span> destination
1564               addresses are OK:</p>
1565
1566               <table border="0" bgcolor="#E0E0E0" width="90%">
1567                 <tr>
1568                   <td>
1569                     <pre class="SCREEN">
1570   permit-access  localhost
1571 </pre>
1572                   </td>
1573                 </tr>
1574               </table>
1575
1576               <p>Allow any host on the same class C subnet as www.privoxy.org
1577               access to nothing but www.example.com (or other domains hosted
1578               on the same system):</p>
1579
1580               <table border="0" bgcolor="#E0E0E0" width="90%">
1581                 <tr>
1582                   <td>
1583                     <pre class="SCREEN">
1584   permit-access  www.privoxy.org/24 www.example.com/32
1585 </pre>
1586                   </td>
1587                 </tr>
1588               </table>
1589
1590               <p>Allow access from any host on the 26-bit subnet
1591               192.168.45.64 to anywhere, with the exception that
1592               192.168.45.73 may not access the IP address behind
1593               www.dirty-stuff.example.com:</p>
1594
1595               <table border="0" bgcolor="#E0E0E0" width="90%">
1596                 <tr>
1597                   <td>
1598                     <pre class="SCREEN">
1599   permit-access  192.168.45.64/26
1600   deny-access    192.168.45.73    www.dirty-stuff.example.com
1601 </pre>
1602                   </td>
1603                 </tr>
1604               </table>
1605
1606               <p>Allow access from the IPv4 network 192.0.2.0/24 even if
1607               listening on an IPv6 wild card address (not supported on all
1608               platforms):</p>
1609
1610               <table border="0" bgcolor="#E0E0E0" width="90%">
1611                 <tr>
1612                   <td>
1613                     <pre class="PROGRAMLISTING">
1614   permit-access  192.0.2.0/24
1615 </pre>
1616                   </td>
1617                 </tr>
1618               </table>
1619
1620               <p>This is equivalent to the following line even if listening
1621               on an IPv4 address (not supported on all platforms):</p>
1622
1623               <table border="0" bgcolor="#E0E0E0" width="90%">
1624                 <tr>
1625                   <td>
1626                     <pre class="PROGRAMLISTING">
1627   permit-access  [::ffff:192.0.2.0]/120
1628 </pre>
1629                   </td>
1630                 </tr>
1631               </table>
1632             </dd>
1633           </dl>
1634         </div>
1635       </div>
1636
1637       <div class="SECT3">
1638         <h4 class="SECT3"><a name="BUFFER-LIMIT" id="BUFFER-LIMIT">7.4.8.
1639         buffer-limit</a></h4>
1640
1641         <div class="VARIABLELIST">
1642           <dl>
1643             <dt>Specifies:</dt>
1644
1645             <dd>
1646               <p>Maximum size of the buffer for content filtering.</p>
1647             </dd>
1648
1649             <dt>Type of value:</dt>
1650
1651             <dd>
1652               <p>Size in Kbytes</p>
1653             </dd>
1654
1655             <dt>Default value:</dt>
1656
1657             <dd>
1658               <p>4096</p>
1659             </dd>
1660
1661             <dt>Effect if unset:</dt>
1662
1663             <dd>
1664               <p>Use a 4MB (4096 KB) limit.</p>
1665             </dd>
1666
1667             <dt>Notes:</dt>
1668
1669             <dd>
1670               <p>For content filtering, i.e. the <tt class=
1671               "LITERAL">+filter</tt> and <tt class=
1672               "LITERAL">+deanimate-gif</tt> actions, it is necessary that
1673               <span class="APPLICATION">Privoxy</span> buffers the entire
1674               document body. This can be potentially dangerous, since a
1675               server could just keep sending data indefinitely and wait for
1676               your RAM to exhaust -- with nasty consequences. Hence this
1677               option.</p>
1678
1679               <p>When a document buffer size reaches the <tt class=
1680               "LITERAL">buffer-limit</tt>, it is flushed to the client
1681               unfiltered and no further attempt to filter the rest of the
1682               document is made. Remember that there may be multiple threads
1683               running, which might require up to <tt class=
1684               "LITERAL">buffer-limit</tt> Kbytes <span class=
1685               "emphasis"><i class="EMPHASIS">each</i></span>, unless you have
1686               enabled <span class="QUOTE">"single-threaded"</span> above.</p>
1687             </dd>
1688           </dl>
1689         </div>
1690       </div>
1691     </div>
1692
1693     <div class="SECT2">
1694       <h2 class="SECT2"><a name="FORWARDING" id="FORWARDING">7.5.
1695       Forwarding</a></h2>
1696
1697       <p>This feature allows routing of HTTP requests through a chain of
1698       multiple proxies.</p>
1699
1700       <p>Forwarding can be used to chain Privoxy with a caching proxy to
1701       speed up browsing. Using a parent proxy may also be necessary if the
1702       machine that <span class="APPLICATION">Privoxy</span> runs on has no
1703       direct Internet access.</p>
1704
1705       <p>Note that parent proxies can severely decrease your privacy level.
1706       For example a parent proxy could add your IP address to the request
1707       headers and if it's a caching proxy it may add the <span class=
1708       "QUOTE">"Etag"</span> header to revalidation requests again, even
1709       though you configured Privoxy to remove it. It may also ignore
1710       Privoxy's header time randomization and use the original values which
1711       could be used by the server as cookie replacement to track your steps
1712       between visits.</p>
1713
1714       <p>Also specified here are SOCKS proxies. <span class=
1715       "APPLICATION">Privoxy</span> supports the SOCKS 4 and SOCKS 4A
1716       protocols.</p>
1717
1718       <div class="SECT3">
1719         <h4 class="SECT3"><a name="FORWARD" id="FORWARD">7.5.1.
1720         forward</a></h4>
1721
1722         <div class="VARIABLELIST">
1723           <dl>
1724             <dt>Specifies:</dt>
1725
1726             <dd>
1727               <p>To which parent HTTP proxy specific requests should be
1728               routed.</p>
1729             </dd>
1730
1731             <dt>Type of value:</dt>
1732
1733             <dd>
1734               <p><tt class="REPLACEABLE"><i>target_pattern</i></tt>
1735               <tt class="REPLACEABLE"><i>http_parent</i></tt>[:<tt class=
1736               "REPLACEABLE"><i>port</i></tt>]</p>
1737
1738               <p>where <tt class="REPLACEABLE"><i>target_pattern</i></tt> is
1739               a <a href="actions-file.html#AF-PATTERNS">URL pattern</a> that
1740               specifies to which requests (i.e. URLs) this forward rule shall
1741               apply. Use <tt class="LITERAL">/</tt> to denote <span class=
1742               "QUOTE">"all URLs"</span>. <tt class=
1743               "REPLACEABLE"><i>http_parent</i></tt>[:<tt class=
1744               "REPLACEABLE"><i>port</i></tt>] is the DNS name or IP address
1745               of the parent HTTP proxy through which the requests should be
1746               forwarded, optionally followed by its listening port (default:
1747               8000). Use a single dot (<tt class="LITERAL">.</tt>) to denote
1748               <span class="QUOTE">"no forwarding"</span>.</p>
1749             </dd>
1750
1751             <dt>Default value:</dt>
1752
1753             <dd>
1754               <p><span class="emphasis"><i class=
1755               "EMPHASIS">Unset</i></span></p>
1756             </dd>
1757
1758             <dt>Effect if unset:</dt>
1759
1760             <dd>
1761               <p>Don't use parent HTTP proxies.</p>
1762             </dd>
1763
1764             <dt>Notes:</dt>
1765
1766             <dd>
1767               <p>If <tt class="REPLACEABLE"><i>http_parent</i></tt> is
1768               <span class="QUOTE">"."</span>, then requests are not forwarded
1769               to another HTTP proxy but are made directly to the web
1770               servers.</p>
1771
1772               <p><tt class="REPLACEABLE"><i>http_parent</i></tt> can be a
1773               numerical IPv6 address (if <a href=
1774               "http://tools.ietf.org/html/rfc3493" target="_top">RFC 3493</a>
1775               is implemented). To prevent clashes with the port delimiter,
1776               the whole IP address has to be put into brackets. On the other
1777               hand a <tt class="REPLACEABLE"><i>target_pattern</i></tt>
1778               containing an IPv6 address has to be put into angle brackets
1779               (normal brackets are reserved for regular expressions
1780               already).</p>
1781
1782               <p>Multiple lines are OK, they are checked in sequence, and the
1783               last match wins.</p>
1784             </dd>
1785
1786             <dt>Examples:</dt>
1787
1788             <dd>
1789               <p>Everything goes to an example parent proxy, except SSL on
1790               port 443 (which it doesn't handle):</p>
1791
1792               <table border="0" bgcolor="#E0E0E0" width="90%">
1793                 <tr>
1794                   <td>
1795                     <pre class="SCREEN">
1796   forward   /      parent-proxy.example.org:8080
1797   forward   :443   .
1798 </pre>
1799                   </td>
1800                 </tr>
1801               </table>
1802
1803               <p>Everything goes to our example ISP's caching proxy, except
1804               for requests to that ISP's sites:</p>
1805
1806               <table border="0" bgcolor="#E0E0E0" width="90%">
1807                 <tr>
1808                   <td>
1809                     <pre class="SCREEN">
1810   forward   /                  caching-proxy.isp.example.net:8000
1811   forward   .isp.example.net   .
1812 </pre>
1813                   </td>
1814                 </tr>
1815               </table>
1816
1817               <p>Parent proxy specified by an IPv6 address:</p>
1818
1819               <table border="0" bgcolor="#E0E0E0" width="90%">
1820                 <tr>
1821                   <td>
1822                     <pre class="PROGRAMLISTING">
1823   forward   /                   [2001:DB8::1]:8000
1824 </pre>
1825                   </td>
1826                 </tr>
1827               </table>
1828
1829               <p>Suppose your parent proxy doesn't support IPv6:</p>
1830
1831               <table border="0" bgcolor="#E0E0E0" width="90%">
1832                 <tr>
1833                   <td>
1834                     <pre class="PROGRAMLISTING">
1835   forward  /                        parent-proxy.example.org:8000
1836   forward  ipv6-server.example.org  .
1837   forward  &lt;[2-3][0-9a-f][0-9a-f][0-9a-f]:*&gt;   .
1838 </pre>
1839                   </td>
1840                 </tr>
1841               </table>
1842             </dd>
1843           </dl>
1844         </div>
1845       </div>
1846
1847       <div class="SECT3">
1848         <h4 class="SECT3"><a name="SOCKS" id="SOCKS">7.5.2. forward-socks4,
1849         forward-socks4a, forward-socks5 and forward-socks5t</a></h4><a name=
1850         "FORWARD-SOCKS4" id="FORWARD-SOCKS4"></a><a name="FORWARD-SOCKS4A"
1851         id="FORWARD-SOCKS4A"></a>
1852
1853         <div class="VARIABLELIST">
1854           <dl>
1855             <dt>Specifies:</dt>
1856
1857             <dd>
1858               <p>Through which SOCKS proxy (and optionally to which parent
1859               HTTP proxy) specific requests should be routed.</p>
1860             </dd>
1861
1862             <dt>Type of value:</dt>
1863
1864             <dd>
1865               <p><tt class="REPLACEABLE"><i>target_pattern</i></tt>
1866               <tt class="REPLACEABLE"><i>socks_proxy</i></tt>[:<tt class=
1867               "REPLACEABLE"><i>port</i></tt>] <tt class=
1868               "REPLACEABLE"><i>http_parent</i></tt>[:<tt class=
1869               "REPLACEABLE"><i>port</i></tt>]</p>
1870
1871               <p>where <tt class="REPLACEABLE"><i>target_pattern</i></tt> is
1872               a <a href="actions-file.html#AF-PATTERNS">URL pattern</a> that
1873               specifies to which requests (i.e. URLs) this forward rule shall
1874               apply. Use <tt class="LITERAL">/</tt> to denote <span class=
1875               "QUOTE">"all URLs"</span>. <tt class=
1876               "REPLACEABLE"><i>http_parent</i></tt> and <tt class=
1877               "REPLACEABLE"><i>socks_proxy</i></tt> are IP addresses in
1878               dotted decimal notation or valid DNS names (<tt class=
1879               "REPLACEABLE"><i>http_parent</i></tt> may be <span class=
1880               "QUOTE">"."</span> to denote <span class="QUOTE">"no HTTP
1881               forwarding"</span>), and the optional <tt class=
1882               "REPLACEABLE"><i>port</i></tt> parameters are TCP ports, i.e.
1883               integer values from 1 to 65535</p>
1884             </dd>
1885
1886             <dt>Default value:</dt>
1887
1888             <dd>
1889               <p><span class="emphasis"><i class=
1890               "EMPHASIS">Unset</i></span></p>
1891             </dd>
1892
1893             <dt>Effect if unset:</dt>
1894
1895             <dd>
1896               <p>Don't use SOCKS proxies.</p>
1897             </dd>
1898
1899             <dt>Notes:</dt>
1900
1901             <dd>
1902               <p>Multiple lines are OK, they are checked in sequence, and the
1903               last match wins.</p>
1904
1905               <p>The difference between <tt class=
1906               "LITERAL">forward-socks4</tt> and <tt class=
1907               "LITERAL">forward-socks4a</tt> is that in the SOCKS 4A
1908               protocol, the DNS resolution of the target hostname happens on
1909               the SOCKS server, while in SOCKS 4 it happens locally.</p>
1910
1911               <p>With <tt class="LITERAL">forward-socks5</tt> the DNS
1912               resolution will happen on the remote server as well.</p>
1913
1914               <p><tt class="LITERAL">forward-socks5t</tt> works like vanilla
1915               <tt class="LITERAL">forward-socks5</tt> but lets <span class=
1916               "APPLICATION">Privoxy</span> additionally use Tor-specific
1917               SOCKS extensions. Currently the only supported SOCKS extension
1918               is optimistic data which can reduce the latency for the first
1919               request made on a newly created connection.</p>
1920
1921               <p><tt class="REPLACEABLE"><i>socks_proxy</i></tt> and
1922               <tt class="REPLACEABLE"><i>http_parent</i></tt> can be a
1923               numerical IPv6 address (if <a href=
1924               "http://tools.ietf.org/html/rfc3493" target="_top">RFC 3493</a>
1925               is implemented). To prevent clashes with the port delimiter,
1926               the whole IP address has to be put into brackets. On the other
1927               hand a <tt class="REPLACEABLE"><i>target_pattern</i></tt>
1928               containing an IPv6 address has to be put into angle brackets
1929               (normal brackets are reserved for regular expressions
1930               already).</p>
1931
1932               <p>If <tt class="REPLACEABLE"><i>http_parent</i></tt> is
1933               <span class="QUOTE">"."</span>, then requests are not forwarded
1934               to another HTTP proxy but are made (HTTP-wise) directly to the
1935               web servers, albeit through a SOCKS proxy.</p>
1936             </dd>
1937
1938             <dt>Examples:</dt>
1939
1940             <dd>
1941               <p>From the company example.com, direct connections are made to
1942               all <span class="QUOTE">"internal"</span> domains, but
1943               everything outbound goes through their ISP's proxy by way of
1944               example.com's corporate SOCKS 4A gateway to the Internet.</p>
1945
1946               <table border="0" bgcolor="#E0E0E0" width="90%">
1947                 <tr>
1948                   <td>
1949                     <pre class="SCREEN">
1950   forward-socks4a   /              socks-gw.example.com:1080  www-cache.isp.example.net:8080
1951   forward           .example.com   .
1952 </pre>
1953                   </td>
1954                 </tr>
1955               </table>
1956
1957               <p>A rule that uses a SOCKS 4 gateway for all destinations but
1958               no HTTP parent looks like this:</p>
1959
1960               <table border="0" bgcolor="#E0E0E0" width="90%">
1961                 <tr>
1962                   <td>
1963                     <pre class="SCREEN">
1964   forward-socks4   /               socks-gw.example.com:1080  .
1965 </pre>
1966                   </td>
1967                 </tr>
1968               </table>
1969
1970               <p>To chain Privoxy and Tor, both running on the same system,
1971               you would use something like:</p>
1972
1973               <table border="0" bgcolor="#E0E0E0" width="90%">
1974                 <tr>
1975                   <td>
1976                     <pre class="SCREEN">
1977   forward-socks5   /               127.0.0.1:9050 .
1978 </pre>
1979                   </td>
1980                 </tr>
1981               </table>
1982
1983               <p>The public <span class="APPLICATION">Tor</span> network
1984               can't be used to reach your local network, if you need to
1985               access local servers you therefore might want to make some
1986               exceptions:</p>
1987
1988               <table border="0" bgcolor="#E0E0E0" width="90%">
1989                 <tr>
1990                   <td>
1991                     <pre class="SCREEN">
1992   forward         192.168.*.*/     .
1993   forward            10.*.*.*/     .
1994   forward           127.*.*.*/     .
1995 </pre>
1996                   </td>
1997                 </tr>
1998               </table>
1999
2000               <p>Unencrypted connections to systems in these address ranges
2001               will be as (un)secure as the local network is, but the
2002               alternative is that you can't reach the local network through
2003               <span class="APPLICATION">Privoxy</span> at all. Of course this
2004               may actually be desired and there is no reason to make these
2005               exceptions if you aren't sure you need them.</p>
2006
2007               <p>If you also want to be able to reach servers in your local
2008               network by using their names, you will need additional
2009               exceptions that look like this:</p>
2010
2011               <table border="0" bgcolor="#E0E0E0" width="90%">
2012                 <tr>
2013                   <td>
2014                     <pre class="SCREEN">
2015  forward           localhost/     .
2016 </pre>
2017                   </td>
2018                 </tr>
2019               </table>
2020             </dd>
2021           </dl>
2022         </div>
2023       </div>
2024
2025       <div class="SECT3">
2026         <h4 class="SECT3"><a name="ADVANCED-FORWARDING-EXAMPLES" id=
2027         "ADVANCED-FORWARDING-EXAMPLES">7.5.3. Advanced Forwarding
2028         Examples</a></h4>
2029
2030         <p>If you have links to multiple ISPs that provide various special
2031         content only to their subscribers, you can configure multiple
2032         <span class="APPLICATION">Privoxies</span> which have connections to
2033         the respective ISPs to act as forwarders to each other, so that
2034         <span class="emphasis"><i class="EMPHASIS">your</i></span> users can
2035         see the internal content of all ISPs.</p>
2036
2037         <p>Assume that host-a has a PPP connection to isp-a.example.net. And
2038         host-b has a PPP connection to isp-b.example.org. Both run
2039         <span class="APPLICATION">Privoxy</span>. Their forwarding
2040         configuration can look like this:</p>
2041
2042         <p>host-a:</p>
2043
2044         <table border="0" bgcolor="#E0E0E0" width="100%">
2045           <tr>
2046             <td>
2047               <pre class="SCREEN">
2048   forward    /           .
2049   forward    .isp-b.example.net  host-b:8118
2050 </pre>
2051             </td>
2052           </tr>
2053         </table>
2054
2055         <p>host-b:</p>
2056
2057         <table border="0" bgcolor="#E0E0E0" width="100%">
2058           <tr>
2059             <td>
2060               <pre class="SCREEN">
2061   forward    /           .
2062   forward    .isp-a.example.org  host-a:8118
2063 </pre>
2064             </td>
2065           </tr>
2066         </table>
2067
2068         <p>Now, your users can set their browser's proxy to use either host-a
2069         or host-b and be able to browse the internal content of both isp-a
2070         and isp-b.</p>
2071
2072         <p>If you intend to chain <span class="APPLICATION">Privoxy</span>
2073         and <span class="APPLICATION">squid</span> locally, then chaining as
2074         <tt class="LITERAL">browser -&gt; squid -&gt; privoxy</tt> is the
2075         recommended way.</p>
2076
2077         <p>Assuming that <span class="APPLICATION">Privoxy</span> and
2078         <span class="APPLICATION">squid</span> run on the same box, your
2079         <span class="APPLICATION">squid</span> configuration could then look
2080         like this:</p>
2081
2082         <table border="0" bgcolor="#E0E0E0" width="100%">
2083           <tr>
2084             <td>
2085               <pre class="SCREEN">
2086   # Define Privoxy as parent proxy (without ICP)
2087   cache_peer 127.0.0.1 parent 8118 7 no-query
2088
2089   # Define ACL for protocol FTP
2090   acl ftp proto FTP
2091
2092   # Do not forward FTP requests to Privoxy
2093   always_direct allow ftp
2094
2095   # Forward all the rest to Privoxy
2096   never_direct allow all
2097 </pre>
2098             </td>
2099           </tr>
2100         </table>
2101
2102         <p>You would then need to change your browser's proxy settings to
2103         <span class="APPLICATION">squid</span>'s address and port. Squid
2104         normally uses port 3128. If unsure consult <tt class=
2105         "LITERAL">http_port</tt> in <tt class="FILENAME">squid.conf</tt>.</p>
2106
2107         <p>You could just as well decide to only forward requests you suspect
2108         of leading to Windows executables through a virus-scanning parent
2109         proxy, say, on <tt class="LITERAL">antivir.example.com</tt>, port
2110         8010:</p>
2111
2112         <table border="0" bgcolor="#E0E0E0" width="100%">
2113           <tr>
2114             <td>
2115               <pre class="SCREEN">
2116   forward   /                          .
2117   forward   /.*\.(exe|com|dll|zip)$    antivir.example.com:8010
2118 </pre>
2119             </td>
2120           </tr>
2121         </table>
2122       </div>
2123
2124       <div class="SECT3">
2125         <h4 class="SECT3"><a name="FORWARDED-CONNECT-RETRIES" id=
2126         "FORWARDED-CONNECT-RETRIES">7.5.4. forwarded-connect-retries</a></h4>
2127
2128         <div class="VARIABLELIST">
2129           <dl>
2130             <dt>Specifies:</dt>
2131
2132             <dd>
2133               <p>How often Privoxy retries if a forwarded connection request
2134               fails.</p>
2135             </dd>
2136
2137             <dt>Type of value:</dt>
2138
2139             <dd>
2140               <p><tt class="REPLACEABLE"><i>Number of retries.</i></tt></p>
2141             </dd>
2142
2143             <dt>Default value:</dt>
2144
2145             <dd>
2146               <p><span class="emphasis"><i class="EMPHASIS">0</i></span></p>
2147             </dd>
2148
2149             <dt>Effect if unset:</dt>
2150
2151             <dd>
2152               <p>Connections forwarded through other proxies are treated like
2153               direct connections and no retry attempts are made.</p>
2154             </dd>
2155
2156             <dt>Notes:</dt>
2157
2158             <dd>
2159               <p><tt class=
2160               "REPLACEABLE"><i>forwarded-connect-retries</i></tt> is mainly
2161               interesting for socks4a connections, where <span class=
2162               "APPLICATION">Privoxy</span> can't detect why the connections
2163               failed. The connection might have failed because of a DNS
2164               timeout in which case a retry makes sense, but it might also
2165               have failed because the server doesn't exist or isn't
2166               reachable. In this case the retry will just delay the
2167               appearance of Privoxy's error message.</p>
2168
2169               <p>Note that in the context of this option, <span class=
2170               "QUOTE">"forwarded connections"</span> includes all connections
2171               that Privoxy forwards through other proxies. This option is not
2172               limited to the HTTP CONNECT method.</p>
2173
2174               <p>Only use this option, if you are getting lots of
2175               forwarding-related error messages that go away when you try
2176               again manually. Start with a small value and check Privoxy's
2177               logfile from time to time, to see how many retries are usually
2178               needed.</p>
2179             </dd>
2180
2181             <dt>Examples:</dt>
2182
2183             <dd>
2184               <p>forwarded-connect-retries 1</p>
2185             </dd>
2186           </dl>
2187         </div>
2188       </div>
2189     </div>
2190
2191     <div class="SECT2">
2192       <h2 class="SECT2"><a name="MISC" id="MISC">7.6. Miscellaneous</a></h2>
2193
2194       <div class="SECT3">
2195         <h4 class="SECT3"><a name="ACCEPT-INTERCEPTED-REQUESTS" id=
2196         "ACCEPT-INTERCEPTED-REQUESTS">7.6.1.
2197         accept-intercepted-requests</a></h4>
2198
2199         <div class="VARIABLELIST">
2200           <dl>
2201             <dt>Specifies:</dt>
2202
2203             <dd>
2204               <p>Whether intercepted requests should be treated as valid.</p>
2205             </dd>
2206
2207             <dt>Type of value:</dt>
2208
2209             <dd>
2210               <p><tt class="REPLACEABLE"><i>0 or 1</i></tt></p>
2211             </dd>
2212
2213             <dt>Default value:</dt>
2214
2215             <dd>
2216               <p><span class="emphasis"><i class="EMPHASIS">0</i></span></p>
2217             </dd>
2218
2219             <dt>Effect if unset:</dt>
2220
2221             <dd>
2222               <p>Only proxy requests are accepted, intercepted requests are
2223               treated as invalid.</p>
2224             </dd>
2225
2226             <dt>Notes:</dt>
2227
2228             <dd>
2229               <p>If you don't trust your clients and want to force them to
2230               use <span class="APPLICATION">Privoxy</span>, enable this
2231               option and configure your packet filter to redirect outgoing
2232               HTTP connections into <span class=
2233               "APPLICATION">Privoxy</span>.</p>
2234
2235               <p>Make sure that <span class="APPLICATION">Privoxy's</span>
2236               own requests aren't redirected as well. Additionally take care
2237               that <span class="APPLICATION">Privoxy</span> can't
2238               intentionally connect to itself, otherwise you could run into
2239               redirection loops if <span class="APPLICATION">Privoxy's</span>
2240               listening port is reachable by the outside or an attacker has
2241               access to the pages you visit.</p>
2242             </dd>
2243
2244             <dt>Examples:</dt>
2245
2246             <dd>
2247               <p>accept-intercepted-requests 1</p>
2248             </dd>
2249           </dl>
2250         </div>
2251       </div>
2252
2253       <div class="SECT3">
2254         <h4 class="SECT3"><a name="ALLOW-CGI-REQUEST-CRUNCHING" id=
2255         "ALLOW-CGI-REQUEST-CRUNCHING">7.6.2.
2256         allow-cgi-request-crunching</a></h4>
2257
2258         <div class="VARIABLELIST">
2259           <dl>
2260             <dt>Specifies:</dt>
2261
2262             <dd>
2263               <p>Whether requests to <span class=
2264               "APPLICATION">Privoxy's</span> CGI pages can be blocked or
2265               redirected.</p>
2266             </dd>
2267
2268             <dt>Type of value:</dt>
2269
2270             <dd>
2271               <p><tt class="REPLACEABLE"><i>0 or 1</i></tt></p>
2272             </dd>
2273
2274             <dt>Default value:</dt>
2275
2276             <dd>
2277               <p><span class="emphasis"><i class="EMPHASIS">0</i></span></p>
2278             </dd>
2279
2280             <dt>Effect if unset:</dt>
2281
2282             <dd>
2283               <p><span class="APPLICATION">Privoxy</span> ignores block and
2284               redirect actions for its CGI pages.</p>
2285             </dd>
2286
2287             <dt>Notes:</dt>
2288
2289             <dd>
2290               <p>By default <span class="APPLICATION">Privoxy</span> ignores
2291               block or redirect actions for its CGI pages. Intercepting these
2292               requests can be useful in multi-user setups to implement
2293               fine-grained access control, but it can also render the
2294               complete web interface useless and make debugging problems
2295               painful if done without care.</p>
2296
2297               <p>Don't enable this option unless you're sure that you really
2298               need it.</p>
2299             </dd>
2300
2301             <dt>Examples:</dt>
2302
2303             <dd>
2304               <p>allow-cgi-request-crunching 1</p>
2305             </dd>
2306           </dl>
2307         </div>
2308       </div>
2309
2310       <div class="SECT3">
2311         <h4 class="SECT3"><a name="SPLIT-LARGE-FORMS" id=
2312         "SPLIT-LARGE-FORMS">7.6.3. split-large-forms</a></h4>
2313
2314         <div class="VARIABLELIST">
2315           <dl>
2316             <dt>Specifies:</dt>
2317
2318             <dd>
2319               <p>Whether the CGI interface should stay compatible with broken
2320               HTTP clients.</p>
2321             </dd>
2322
2323             <dt>Type of value:</dt>
2324
2325             <dd>
2326               <p><tt class="REPLACEABLE"><i>0 or 1</i></tt></p>
2327             </dd>
2328
2329             <dt>Default value:</dt>
2330
2331             <dd>
2332               <p><span class="emphasis"><i class="EMPHASIS">0</i></span></p>
2333             </dd>
2334
2335             <dt>Effect if unset:</dt>
2336
2337             <dd>
2338               <p>The CGI form generate long GET URLs.</p>
2339             </dd>
2340
2341             <dt>Notes:</dt>
2342
2343             <dd>
2344               <p><span class="APPLICATION">Privoxy's</span> CGI forms can
2345               lead to rather long URLs. This isn't a problem as far as the
2346               HTTP standard is concerned, but it can confuse clients with
2347               arbitrary URL length limitations.</p>
2348
2349               <p>Enabling split-large-forms causes <span class=
2350               "APPLICATION">Privoxy</span> to divide big forms into smaller
2351               ones to keep the URL length down. It makes editing a lot less
2352               convenient and you can no longer submit all changes at once,
2353               but at least it works around this browser bug.</p>
2354
2355               <p>If you don't notice any editing problems, there is no reason
2356               to enable this option, but if one of the submit buttons appears
2357               to be broken, you should give it a try.</p>
2358             </dd>
2359
2360             <dt>Examples:</dt>
2361
2362             <dd>
2363               <p>split-large-forms 1</p>
2364             </dd>
2365           </dl>
2366         </div>
2367       </div>
2368
2369       <div class="SECT3">
2370         <h4 class="SECT3"><a name="KEEP-ALIVE-TIMEOUT" id=
2371         "KEEP-ALIVE-TIMEOUT">7.6.4. keep-alive-timeout</a></h4>
2372
2373         <div class="VARIABLELIST">
2374           <dl>
2375             <dt>Specifies:</dt>
2376
2377             <dd>
2378               <p>Number of seconds after which an open connection will no
2379               longer be reused.</p>
2380             </dd>
2381
2382             <dt>Type of value:</dt>
2383
2384             <dd>
2385               <p><tt class="REPLACEABLE"><i>Time in seconds.</i></tt></p>
2386             </dd>
2387
2388             <dt>Default value:</dt>
2389
2390             <dd>
2391               <p>None</p>
2392             </dd>
2393
2394             <dt>Effect if unset:</dt>
2395
2396             <dd>
2397               <p>Connections are not kept alive.</p>
2398             </dd>
2399
2400             <dt>Notes:</dt>
2401
2402             <dd>
2403               <p>This option allows clients to keep the connection to
2404               <span class="APPLICATION">Privoxy</span> alive. If the server
2405               supports it, <span class="APPLICATION">Privoxy</span> will keep
2406               the connection to the server alive as well. Under certain
2407               circumstances this may result in speed-ups.</p>
2408
2409               <p>By default, <span class="APPLICATION">Privoxy</span> will
2410               close the connection to the server if the client connection
2411               gets closed, or if the specified timeout has been reached
2412               without a new request coming in. This behaviour can be changed
2413               with the <a href="#CONNECTION-SHARING" target=
2414               "_top">connection-sharing</a> option.</p>
2415
2416               <p>This option has no effect if <span class=
2417               "APPLICATION">Privoxy</span> has been compiled without
2418               keep-alive support.</p>
2419
2420               <p>Note that a timeout of five seconds as used in the default
2421               configuration file significantly decreases the number of
2422               connections that will be reused. The value is used because some
2423               browsers limit the number of connections they open to a single
2424               host and apply the same limit to proxies. This can result in a
2425               single website <span class="QUOTE">"grabbing"</span> all the
2426               connections the browser allows, which means connections to
2427               other websites can't be opened until the connections currently
2428               in use time out.</p>
2429
2430               <p>Several users have reported this as a Privoxy bug, so the
2431               default value has been reduced. Consider increasing it to 300
2432               seconds or even more if you think your browser can handle it.
2433               If your browser appears to be hanging, it probably can't.</p>
2434             </dd>
2435
2436             <dt>Examples:</dt>
2437
2438             <dd>
2439               <p>keep-alive-timeout 300</p>
2440             </dd>
2441           </dl>
2442         </div>
2443       </div>
2444
2445       <div class="SECT3">
2446         <h4 class="SECT3"><a name="TOLERATE-PIPELINING" id=
2447         "TOLERATE-PIPELINING">7.6.5. tolerate-pipelining</a></h4>
2448
2449         <div class="VARIABLELIST">
2450           <dl>
2451             <dt>Specifies:</dt>
2452
2453             <dd>
2454               <p>Whether or not pipelined requests should be served.</p>
2455             </dd>
2456
2457             <dt>Type of value:</dt>
2458
2459             <dd>
2460               <p><tt class="REPLACEABLE"><i>0 or 1.</i></tt></p>
2461             </dd>
2462
2463             <dt>Default value:</dt>
2464
2465             <dd>
2466               <p>None</p>
2467             </dd>
2468
2469             <dt>Effect if unset:</dt>
2470
2471             <dd>
2472               <p>If Privoxy receives more than one request at once, it
2473               terminates the client connection after serving the first
2474               one.</p>
2475             </dd>
2476
2477             <dt>Notes:</dt>
2478
2479             <dd>
2480               <p><span class="APPLICATION">Privoxy</span> currently doesn't
2481               pipeline outgoing requests, thus allowing pipelining on the
2482               client connection is not guaranteed to improve the
2483               performance.</p>
2484
2485               <p>By default <span class="APPLICATION">Privoxy</span> tries to
2486               discourage clients from pipelining by discarding aggressively
2487               pipelined requests, which forces the client to resend them
2488               through a new connection.</p>
2489
2490               <p>This option lets <span class="APPLICATION">Privoxy</span>
2491               tolerate pipelining. Whether or not that improves performance
2492               mainly depends on the client configuration.</p>
2493
2494               <p>This options is new and should be considered
2495               experimental.</p>
2496             </dd>
2497
2498             <dt>Examples:</dt>
2499
2500             <dd>
2501               <p>tolerate-pipelining 1</p>
2502             </dd>
2503           </dl>
2504         </div>
2505       </div>
2506
2507       <div class="SECT3">
2508         <h4 class="SECT3"><a name="DEFAULT-SERVER-TIMEOUT" id=
2509         "DEFAULT-SERVER-TIMEOUT">7.6.6. default-server-timeout</a></h4>
2510
2511         <div class="VARIABLELIST">
2512           <dl>
2513             <dt>Specifies:</dt>
2514
2515             <dd>
2516               <p>Assumed server-side keep-alive timeout if not specified by
2517               the server.</p>
2518             </dd>
2519
2520             <dt>Type of value:</dt>
2521
2522             <dd>
2523               <p><tt class="REPLACEABLE"><i>Time in seconds.</i></tt></p>
2524             </dd>
2525
2526             <dt>Default value:</dt>
2527
2528             <dd>
2529               <p>None</p>
2530             </dd>
2531
2532             <dt>Effect if unset:</dt>
2533
2534             <dd>
2535               <p>Connections for which the server didn't specify the
2536               keep-alive timeout are not reused.</p>
2537             </dd>
2538
2539             <dt>Notes:</dt>
2540
2541             <dd>
2542               <p>Enabling this option significantly increases the number of
2543               connections that are reused, provided the <a href=
2544               "#KEEP-ALIVE-TIMEOUT" target="_top">keep-alive-timeout</a>
2545               option is also enabled.</p>
2546
2547               <p>While it also increases the number of connections problems
2548               when <span class="APPLICATION">Privoxy</span> tries to reuse a
2549               connection that already has been closed on the server side, or
2550               is closed while <span class="APPLICATION">Privoxy</span> is
2551               trying to reuse it, this should only be a problem if it happens
2552               for the first request sent by the client. If it happens for
2553               requests on reused client connections, <span class=
2554               "APPLICATION">Privoxy</span> will simply close the connection
2555               and the client is supposed to retry the request without
2556               bothering the user.</p>
2557
2558               <p>Enabling this option is therefore only recommended if the
2559               <a href="#CONNECTION-SHARING" target=
2560               "_top">connection-sharing</a> option is disabled.</p>
2561
2562               <p>It is an error to specify a value larger than the <a href=
2563               "#KEEP-ALIVE-TIMEOUT" target="_top">keep-alive-timeout</a>
2564               value.</p>
2565
2566               <p>This option has no effect if <span class=
2567               "APPLICATION">Privoxy</span> has been compiled without
2568               keep-alive support.</p>
2569             </dd>
2570
2571             <dt>Examples:</dt>
2572
2573             <dd>
2574               <p>default-server-timeout 60</p>
2575             </dd>
2576           </dl>
2577         </div>
2578       </div>
2579
2580       <div class="SECT3">
2581         <h4 class="SECT3"><a name="CONNECTION-SHARING" id=
2582         "CONNECTION-SHARING">7.6.7. connection-sharing</a></h4>
2583
2584         <div class="VARIABLELIST">
2585           <dl>
2586             <dt>Specifies:</dt>
2587
2588             <dd>
2589               <p>Whether or not outgoing connections that have been kept
2590               alive should be shared between different incoming
2591               connections.</p>
2592             </dd>
2593
2594             <dt>Type of value:</dt>
2595
2596             <dd>
2597               <p><tt class="REPLACEABLE"><i>0 or 1</i></tt></p>
2598             </dd>
2599
2600             <dt>Default value:</dt>
2601
2602             <dd>
2603               <p>None</p>
2604             </dd>
2605
2606             <dt>Effect if unset:</dt>
2607
2608             <dd>
2609               <p>Connections are not shared.</p>
2610             </dd>
2611
2612             <dt>Notes:</dt>
2613
2614             <dd>
2615               <p>This option has no effect if <span class=
2616               "APPLICATION">Privoxy</span> has been compiled without
2617               keep-alive support, or if it's disabled.</p>
2618             </dd>
2619
2620             <dt>Notes:</dt>
2621
2622             <dd>
2623               <p>Note that reusing connections doesn't necessary cause
2624               speedups. There are also a few privacy implications you should
2625               be aware of.</p>
2626
2627               <p>If this option is effective, outgoing connections are shared
2628               between clients (if there are more than one) and closing the
2629               browser that initiated the outgoing connection does no longer
2630               affect the connection between <span class=
2631               "APPLICATION">Privoxy</span> and the server unless the client's
2632               request hasn't been completed yet.</p>
2633
2634               <p>If the outgoing connection is idle, it will not be closed
2635               until either <span class="APPLICATION">Privoxy's</span> or the
2636               server's timeout is reached. While it's open, the server knows
2637               that the system running <span class=
2638               "APPLICATION">Privoxy</span> is still there.</p>
2639
2640               <p>If there are more than one client (maybe even belonging to
2641               multiple users), they will be able to reuse each others
2642               connections. This is potentially dangerous in case of
2643               authentication schemes like NTLM where only the connection is
2644               authenticated, instead of requiring authentication for each
2645               request.</p>
2646
2647               <p>If there is only a single client, and if said client can
2648               keep connections alive on its own, enabling this option has
2649               next to no effect. If the client doesn't support connection
2650               keep-alive, enabling this option may make sense as it allows
2651               <span class="APPLICATION">Privoxy</span> to keep outgoing
2652               connections alive even if the client itself doesn't support
2653               it.</p>
2654
2655               <p>You should also be aware that enabling this option increases
2656               the likelihood of getting the "No server or forwarder data"
2657               error message, especially if you are using a slow connection to
2658               the Internet.</p>
2659
2660               <p>This option should only be used by experienced users who
2661               understand the risks and can weight them against the
2662               benefits.</p>
2663             </dd>
2664
2665             <dt>Examples:</dt>
2666
2667             <dd>
2668               <p>connection-sharing 1</p>
2669             </dd>
2670           </dl>
2671         </div>
2672       </div>
2673
2674       <div class="SECT3">
2675         <h4 class="SECT3"><a name="SOCKET-TIMEOUT" id="SOCKET-TIMEOUT">7.6.8.
2676         socket-timeout</a></h4>
2677
2678         <div class="VARIABLELIST">
2679           <dl>
2680             <dt>Specifies:</dt>
2681
2682             <dd>
2683               <p>Number of seconds after which a socket times out if no data
2684               is received.</p>
2685             </dd>
2686
2687             <dt>Type of value:</dt>
2688
2689             <dd>
2690               <p><tt class="REPLACEABLE"><i>Time in seconds.</i></tt></p>
2691             </dd>
2692
2693             <dt>Default value:</dt>
2694
2695             <dd>
2696               <p>None</p>
2697             </dd>
2698
2699             <dt>Effect if unset:</dt>
2700
2701             <dd>
2702               <p>A default value of 300 seconds is used.</p>
2703             </dd>
2704
2705             <dt>Notes:</dt>
2706
2707             <dd>
2708               <p>The default is quite high and you probably want to reduce
2709               it. If you aren't using an occasionally slow proxy like Tor,
2710               reducing it to a few seconds should be fine.</p>
2711             </dd>
2712
2713             <dt>Examples:</dt>
2714
2715             <dd>
2716               <p>socket-timeout 300</p>
2717             </dd>
2718           </dl>
2719         </div>
2720       </div>
2721
2722       <div class="SECT3">
2723         <h4 class="SECT3"><a name="MAX-CLIENT-CONNECTIONS" id=
2724         "MAX-CLIENT-CONNECTIONS">7.6.9. max-client-connections</a></h4>
2725
2726         <div class="VARIABLELIST">
2727           <dl>
2728             <dt>Specifies:</dt>
2729
2730             <dd>
2731               <p>Maximum number of client connections that will be
2732               served.</p>
2733             </dd>
2734
2735             <dt>Type of value:</dt>
2736
2737             <dd>
2738               <p><tt class="REPLACEABLE"><i>Positive number.</i></tt></p>
2739             </dd>
2740
2741             <dt>Default value:</dt>
2742
2743             <dd>
2744               <p>None</p>
2745             </dd>
2746
2747             <dt>Effect if unset:</dt>
2748
2749             <dd>
2750               <p>Connections are served until a resource limit is
2751               reached.</p>
2752             </dd>
2753
2754             <dt>Notes:</dt>
2755
2756             <dd>
2757               <p><span class="APPLICATION">Privoxy</span> creates one thread
2758               (or process) for every incoming client connection that isn't
2759               rejected based on the access control settings.</p>
2760
2761               <p>If the system is powerful enough, <span class=
2762               "APPLICATION">Privoxy</span> can theoretically deal with
2763               several hundred (or thousand) connections at the same time, but
2764               some operating systems enforce resource limits by shutting down
2765               offending processes and their default limits may be below the
2766               ones <span class="APPLICATION">Privoxy</span> would require
2767               under heavy load.</p>
2768
2769               <p>Configuring <span class="APPLICATION">Privoxy</span> to
2770               enforce a connection limit below the thread or process limit
2771               used by the operating system makes sure this doesn't happen.
2772               Simply increasing the operating system's limit would work too,
2773               but if <span class="APPLICATION">Privoxy</span> isn't the only
2774               application running on the system, you may actually want to
2775               limit the resources used by <span class=
2776               "APPLICATION">Privoxy</span>.</p>
2777
2778               <p>If <span class="APPLICATION">Privoxy</span> is only used by
2779               a single trusted user, limiting the number of client
2780               connections is probably unnecessary. If there are multiple
2781               possibly untrusted users you probably still want to
2782               additionally use a packet filter to limit the maximal number of
2783               incoming connections per client. Otherwise a malicious user
2784               could intentionally create a high number of connections to
2785               prevent other users from using <span class=
2786               "APPLICATION">Privoxy</span>.</p>
2787
2788               <p>Obviously using this option only makes sense if you choose a
2789               limit below the one enforced by the operating system.</p>
2790             </dd>
2791
2792             <dt>Examples:</dt>
2793
2794             <dd>
2795               <p>max-client-connections 256</p>
2796             </dd>
2797           </dl>
2798         </div>
2799       </div>
2800
2801       <div class="SECT3">
2802         <h4 class="SECT3"><a name="HANDLE-AS-EMPTY-DOC-RETURNS-OK" id=
2803         "HANDLE-AS-EMPTY-DOC-RETURNS-OK">7.6.10.
2804         handle-as-empty-doc-returns-ok</a></h4>
2805
2806         <div class="VARIABLELIST">
2807           <dl>
2808             <dt>Specifies:</dt>
2809
2810             <dd>
2811               <p>The status code Privoxy returns for pages blocked with
2812               <tt class="LITERAL"><a href=
2813               "actions-file.html#HANDLE-AS-EMPTY-DOCUMENT" target=
2814               "_top">+handle-as-empty-document</a></tt>.</p>
2815             </dd>
2816
2817             <dt>Type of value:</dt>
2818
2819             <dd>
2820               <p><tt class="REPLACEABLE"><i>0 or 1</i></tt></p>
2821             </dd>
2822
2823             <dt>Default value:</dt>
2824
2825             <dd>
2826               <p>0</p>
2827             </dd>
2828
2829             <dt>Effect if unset:</dt>
2830
2831             <dd>
2832               <p>Privoxy returns a status 403(forbidden) for all blocked
2833               pages.</p>
2834             </dd>
2835
2836             <dt>Effect if set:</dt>
2837
2838             <dd>
2839               <p>Privoxy returns a status 200(OK) for pages blocked with
2840               +handle-as-empty-document and a status 403(Forbidden) for all
2841               other blocked pages.</p>
2842             </dd>
2843
2844             <dt>Notes:</dt>
2845
2846             <dd>
2847               <p>This is a work-around for Firefox bug 492459: <span class=
2848               "QUOTE">" Websites are no longer rendered if SSL requests for
2849               JavaScripts are blocked by a proxy. "</span> (<a href=
2850               "https://bugzilla.mozilla.org/show_bug.cgi?id=492459" target=
2851               "_top">https://bugzilla.mozilla.org/show_bug.cgi?id=492459</a>)
2852               As the bug has been fixed for quite some time this option
2853               should no longer be needed and will be removed in a future
2854               release. Please speak up if you have a reason why the option
2855               should be kept around.</p>
2856             </dd>
2857           </dl>
2858         </div>
2859       </div>
2860
2861       <div class="SECT3">
2862         <h4 class="SECT3"><a name="ENABLE-COMPRESSION" id=
2863         "ENABLE-COMPRESSION">7.6.11. enable-compression</a></h4>
2864
2865         <div class="VARIABLELIST">
2866           <dl>
2867             <dt>Specifies:</dt>
2868
2869             <dd>
2870               <p>Whether or not buffered content is compressed before
2871               delivery.</p>
2872             </dd>
2873
2874             <dt>Type of value:</dt>
2875
2876             <dd>
2877               <p><tt class="REPLACEABLE"><i>0 or 1</i></tt></p>
2878             </dd>
2879
2880             <dt>Default value:</dt>
2881
2882             <dd>
2883               <p>0</p>
2884             </dd>
2885
2886             <dt>Effect if unset:</dt>
2887
2888             <dd>
2889               <p>Privoxy does not compress buffered content.</p>
2890             </dd>
2891
2892             <dt>Effect if set:</dt>
2893
2894             <dd>
2895               <p>Privoxy compresses buffered content before delivering it to
2896               the client, provided the client supports it.</p>
2897             </dd>
2898
2899             <dt>Notes:</dt>
2900
2901             <dd>
2902               <p>This directive is only supported if Privoxy has been
2903               compiled with FEATURE_COMPRESSION, which should not to be
2904               confused with FEATURE_ZLIB.</p>
2905
2906               <p>Compressing buffered content is mainly useful if Privoxy and
2907               the client are running on different systems. If they are
2908               running on the same system, enabling compression is likely to
2909               slow things down. If you didn't measure otherwise, you should
2910               assume that it does and keep this option disabled.</p>
2911
2912               <p>Privoxy will not compress buffered content below a certain
2913               length.</p>
2914             </dd>
2915           </dl>
2916         </div>
2917       </div>
2918
2919       <div class="SECT3">
2920         <h4 class="SECT3"><a name="COMPRESSION-LEVEL" id=
2921         "COMPRESSION-LEVEL">7.6.12. compression-level</a></h4>
2922
2923         <div class="VARIABLELIST">
2924           <dl>
2925             <dt>Specifies:</dt>
2926
2927             <dd>
2928               <p>The compression level that is passed to the zlib library
2929               when compressing buffered content.</p>
2930             </dd>
2931
2932             <dt>Type of value:</dt>
2933
2934             <dd>
2935               <p><tt class="REPLACEABLE"><i>Positive number ranging from 0 to
2936               9.</i></tt></p>
2937             </dd>
2938
2939             <dt>Default value:</dt>
2940
2941             <dd>
2942               <p>1</p>
2943             </dd>
2944
2945             <dt>Notes:</dt>
2946
2947             <dd>
2948               <p>Compressing the data more takes usually longer than
2949               compressing it less or not compressing it at all. Which level
2950               is best depends on the connection between Privoxy and the
2951               client. If you can't be bothered to benchmark it for yourself,
2952               you should stick with the default and keep compression
2953               disabled.</p>
2954
2955               <p>If compression is disabled, the compression level is
2956               irrelevant.</p>
2957             </dd>
2958
2959             <dt>Examples:</dt>
2960
2961             <dd>
2962               <table border="0" bgcolor="#E0E0E0" width="90%">
2963                 <tr>
2964                   <td>
2965                     <pre class="SCREEN">
2966     # Best speed (compared to the other levels)
2967     compression-level 1
2968     # Best compression
2969     compression-level 9
2970     # No compression. Only useful for testing as the added header
2971     # slightly increases the amount of data that has to be sent.
2972     # If your benchmark shows that using this compression level
2973     # is superior to using no compression at all, the benchmark
2974     # is likely to be flawed.
2975     compression-level 0
2976
2977 </pre>
2978                   </td>
2979                 </tr>
2980               </table>
2981             </dd>
2982           </dl>
2983         </div>
2984       </div>
2985
2986       <div class="SECT3">
2987         <h4 class="SECT3"><a name="CLIENT-HEADER-ORDER" id=
2988         "CLIENT-HEADER-ORDER">7.6.13. client-header-order</a></h4>
2989
2990         <div class="VARIABLELIST">
2991           <dl>
2992             <dt>Specifies:</dt>
2993
2994             <dd>
2995               <p>The order in which client headers are sorted before
2996               forwarding them.</p>
2997             </dd>
2998
2999             <dt>Type of value:</dt>
3000
3001             <dd>
3002               <p><tt class="REPLACEABLE"><i>Client header names delimited by
3003               spaces or tabs</i></tt></p>
3004             </dd>
3005
3006             <dt>Default value:</dt>
3007
3008             <dd>
3009               <p>None</p>
3010             </dd>
3011
3012             <dt>Notes:</dt>
3013
3014             <dd>
3015               <p>By default <span class="APPLICATION">Privoxy</span> leaves
3016               the client headers in the order they were sent by the client.
3017               Headers are modified in-place, new headers are added at the end
3018               of the already existing headers.</p>
3019
3020               <p>The header order can be used to fingerprint client requests
3021               independently of other headers like the User-Agent.</p>
3022
3023               <p>This directive allows to sort the headers differently to
3024               better mimic a different User-Agent. Client headers will be
3025               emitted in the order given, headers whose name isn't explicitly
3026               specified are added at the end.</p>
3027
3028               <p>Note that sorting headers in an uncommon way will make
3029               fingerprinting actually easier. Encrypted headers are not
3030               affected by this directive.</p>
3031             </dd>
3032           </dl>
3033         </div>
3034       </div>
3035     </div>
3036
3037     <div class="SECT2">
3038       <h2 class="SECT2"><a name="WINDOWS-GUI" id="WINDOWS-GUI">7.7. Windows
3039       GUI Options</a></h2>
3040
3041       <p><span class="APPLICATION">Privoxy</span> has a number of options
3042       specific to the Windows GUI interface:</p><a name="ACTIVITY-ANIMATION"
3043       id="ACTIVITY-ANIMATION"></a>
3044
3045       <p>If <span class="QUOTE">"activity-animation"</span> is set to 1, the
3046       <span class="APPLICATION">Privoxy</span> icon will animate when
3047       <span class="QUOTE">"Privoxy"</span> is active. To turn off, set to
3048       0.</p>
3049
3050       <p class="LITERALLAYOUT"><tt class="LITERAL">&nbsp;&nbsp;<span class=
3051       "emphasis"><i class="EMPHASIS">activity-animation 1</i></span><br>
3052       &nbsp;&nbsp;&nbsp;</tt></p><a name="LOG-MESSAGES" id=
3053       "LOG-MESSAGES"></a>
3054
3055       <p>If <span class="QUOTE">"log-messages"</span> is set to 1,
3056       <span class="APPLICATION">Privoxy</span> copies log messages to the
3057       console window. The log detail depends on the <a href=
3058       "config.html#DEBUG">debug</a> directive.</p>
3059
3060       <p class="LITERALLAYOUT"><tt class="LITERAL">&nbsp;&nbsp;<span class=
3061       "emphasis"><i class="EMPHASIS">log-messages 1</i></span><br>
3062       &nbsp;&nbsp;&nbsp;</tt></p><a name="LOG-BUFFER-SIZE" id=
3063       "LOG-BUFFER-SIZE"></a>
3064
3065       <p>If <span class="QUOTE">"log-buffer-size"</span> is set to 1, the
3066       size of the log buffer, i.e. the amount of memory used for the log
3067       messages displayed in the console window, will be limited to
3068       <span class="QUOTE">"log-max-lines"</span> (see below).</p>
3069
3070       <p>Warning: Setting this to 0 will result in the buffer to grow
3071       infinitely and eat up all your memory!</p>
3072
3073       <p class="LITERALLAYOUT"><tt class="LITERAL">&nbsp;&nbsp;<span class=
3074       "emphasis"><i class="EMPHASIS">log-buffer-size 1</i></span><br>
3075       &nbsp;&nbsp;&nbsp;</tt></p><a name="LOG-MAX-LINES" id=
3076       "LOG-MAX-LINES"></a>
3077
3078       <p><span class="APPLICATION">log-max-lines</span> is the maximum number
3079       of lines held in the log buffer. See above.</p>
3080
3081       <p class="LITERALLAYOUT"><tt class="LITERAL">&nbsp;&nbsp;<span class=
3082       "emphasis"><i class="EMPHASIS">log-max-lines 200</i></span><br>
3083       &nbsp;&nbsp;&nbsp;</tt></p><a name="LOG-HIGHLIGHT-MESSAGES" id=
3084       "LOG-HIGHLIGHT-MESSAGES"></a>
3085
3086       <p>If <span class="QUOTE">"log-highlight-messages"</span> is set to 1,
3087       <span class="APPLICATION">Privoxy</span> will highlight portions of the
3088       log messages with a bold-faced font:</p>
3089
3090       <p class="LITERALLAYOUT"><tt class="LITERAL">&nbsp;&nbsp;<span class=
3091       "emphasis"><i class="EMPHASIS">log-highlight-messages 1</i></span><br>
3092       &nbsp;&nbsp;&nbsp;</tt></p><a name="LOG-FONT-NAME" id=
3093       "LOG-FONT-NAME"></a>
3094
3095       <p>The font used in the console window:</p>
3096
3097       <p class="LITERALLAYOUT"><tt class="LITERAL">&nbsp;&nbsp;<span class=
3098       "emphasis"><i class="EMPHASIS">log-font-name Comic Sans
3099       MS</i></span><br>
3100       &nbsp;&nbsp;&nbsp;</tt></p><a name="LOG-FONT-SIZE" id=
3101       "LOG-FONT-SIZE"></a>
3102
3103       <p>Font size used in the console window:</p>
3104
3105       <p class="LITERALLAYOUT"><tt class="LITERAL">&nbsp;&nbsp;<span class=
3106       "emphasis"><i class="EMPHASIS">log-font-size 8</i></span><br>
3107       &nbsp;&nbsp;&nbsp;</tt></p><a name="SHOW-ON-TASK-BAR" id=
3108       "SHOW-ON-TASK-BAR"></a>
3109
3110       <p><span class="QUOTE">"show-on-task-bar"</span> controls whether or
3111       not <span class="APPLICATION">Privoxy</span> will appear as a button on
3112       the Task bar when minimized:</p>
3113
3114       <p class="LITERALLAYOUT"><tt class="LITERAL">&nbsp;&nbsp;<span class=
3115       "emphasis"><i class="EMPHASIS">show-on-task-bar 0</i></span><br>
3116       &nbsp;&nbsp;&nbsp;</tt></p><a name="CLOSE-BUTTON-MINIMIZES" id=
3117       "CLOSE-BUTTON-MINIMIZES"></a>
3118
3119       <p>If <span class="QUOTE">"close-button-minimizes"</span> is set to 1,
3120       the Windows close button will minimize <span class=
3121       "APPLICATION">Privoxy</span> instead of closing the program (close with
3122       the exit option on the File menu).</p>
3123
3124       <p class="LITERALLAYOUT"><tt class="LITERAL">&nbsp;&nbsp;<span class=
3125       "emphasis"><i class="EMPHASIS">close-button-minimizes 1</i></span><br>
3126       &nbsp;&nbsp;&nbsp;</tt></p><a name="HIDE-CONSOLE" id=
3127       "HIDE-CONSOLE"></a>
3128
3129       <p>The <span class="QUOTE">"hide-console"</span> option is specific to
3130       the MS-Win console version of <span class="APPLICATION">Privoxy</span>.
3131       If this option is used, <span class="APPLICATION">Privoxy</span> will
3132       disconnect from and hide the command console.</p>
3133
3134       <p class="LITERALLAYOUT"><tt class="LITERAL">&nbsp;&nbsp;#<span class=
3135       "emphasis"><i class="EMPHASIS">hide-console</i></span><br>
3136       &nbsp;&nbsp;&nbsp;</tt></p>
3137     </div>
3138   </div>
3139
3140   <div class="NAVFOOTER">
3141     <hr align="left" width="100%">
3142
3143     <table summary="Footer navigation table" width="100%" border="0"
3144     cellpadding="0" cellspacing="0">
3145       <tr>
3146         <td width="33%" align="left" valign="top"><a href=
3147         "configuration.html" accesskey="P">Prev</a></td>
3148
3149         <td width="34%" align="center" valign="top"><a href="index.html"
3150         accesskey="H">Home</a></td>
3151
3152         <td width="33%" align="right" valign="top"><a href=
3153         "actions-file.html" accesskey="N">Next</a></td>
3154       </tr>
3155
3156       <tr>
3157         <td width="33%" align="left" valign="top">Privoxy Configuration</td>
3158
3159         <td width="34%" align="center" valign="top">&nbsp;</td>
3160
3161         <td width="33%" align="right" valign="top">Actions Files</td>
3162       </tr>
3163     </table>
3164   </div>
3165 </body>
3166 </html>