1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2 "http://www.w3.org/TR/html4/loose.dtd">
5 <title>The Main Configuration File</title>
6 <meta name="GENERATOR" content=
7 "Modular DocBook HTML Stylesheet Version 1.79">
8 <link rel="HOME" title="Privoxy 3.0.26 User Manual" href="index.html">
9 <link rel="PREVIOUS" title="Privoxy Configuration" href=
11 <link rel="NEXT" title="Actions Files" href="actions-file.html">
12 <link rel="STYLESHEET" type="text/css" href="../p_doc.css">
13 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
14 <link rel="STYLESHEET" type="text/css" href="p_doc.css">
16 <body class="SECT1" bgcolor="#EEEEEE" text="#000000" link="#0000FF" vlink=
17 "#840084" alink="#0000FF">
18 <div class="NAVHEADER">
19 <table summary="Header navigation table" width="100%" border="0"
20 cellpadding="0" cellspacing="0">
22 <th colspan="3" align="center">Privoxy 3.0.26 User Manual</th>
25 <td width="10%" align="left" valign="bottom"><a href=
26 "configuration.html" accesskey="P">Prev</a></td>
27 <td width="80%" align="center" valign="bottom"></td>
28 <td width="10%" align="right" valign="bottom"><a href=
29 "actions-file.html" accesskey="N">Next</a></td>
32 <hr align="left" width="100%">
35 <h1 class="SECT1"><a name="CONFIG" id="CONFIG">7. The Main Configuration
37 <p>By default, the main configuration file is named <tt class=
38 "FILENAME">config</tt>, with the exception of Windows, where it is named
39 <tt class="FILENAME">config.txt</tt>. Configuration lines consist of an
40 initial keyword followed by a list of values, all separated by whitespace
41 (any number of spaces or tabs). For example:</p>
42 <p class="LITERALLAYOUT"><tt class="LITERAL"> <span class=
43 "emphasis"><i class="EMPHASIS">confdir /etc/privoxy</i></span></tt></p>
44 <p>Assigns the value <tt class="LITERAL">/etc/privoxy</tt> to the option
45 <tt class="LITERAL">confdir</tt> and thus indicates that the
46 configuration directory is named <span class=
47 "QUOTE">"/etc/privoxy/"</span>.</p>
48 <p>All options in the config file except for <tt class=
49 "LITERAL">confdir</tt> and <tt class="LITERAL">logdir</tt> are optional.
50 Watch out in the below description for what happens if you leave them
52 <p>The main config file controls all aspects of <span class=
53 "APPLICATION">Privoxy</span>'s operation that are not location dependent
54 (i.e. they apply universally, no matter where you may be surfing). Like
55 the filter and action files, the config file is a plain text file and can
56 be modified with a text editor like emacs, vim or notepad.exe.</p>
58 <h2 class="SECT2"><a name="LOCAL-SET-UP" id="LOCAL-SET-UP">7.1. Local
59 Set-up Documentation</a></h2>
60 <p>If you intend to operate <span class="APPLICATION">Privoxy</span>
61 for more users than just yourself, it might be a good idea to let them
62 know how to reach you, what you block and why you do that, your
65 <h4 class="SECT3"><a name="USER-MANUAL" id="USER-MANUAL">7.1.1.
67 <div class="VARIABLELIST">
71 <p>Location of the <span class="APPLICATION">Privoxy</span>
74 <dt>Type of value:</dt>
76 <p>A fully qualified URI</p>
78 <dt>Default value:</dt>
80 <p><span class="emphasis"><i class=
81 "EMPHASIS">Unset</i></span></p>
83 <dt>Effect if unset:</dt>
85 <p><a href="https://www.privoxy.org/user-manual/" target=
86 "_top">https://www.privoxy.org/<tt class=
87 "REPLACEABLE"><i>version</i></tt>/user-manual/</a> will be
88 used, where <tt class="REPLACEABLE"><i>version</i></tt> is the
89 <span class="APPLICATION">Privoxy</span> version.</p>
93 <p>The User Manual URI is the single best source of information
94 on <span class="APPLICATION">Privoxy</span>, and is used for
95 help links from some of the internal CGI pages. The manual
96 itself is normally packaged with the binary distributions, so
97 you probably want to set this to a locally installed copy.</p>
99 <p>The best all purpose solution is simply to put the full
100 local <tt class="LITERAL">PATH</tt> to where the <i class=
101 "CITETITLE">User Manual</i> is located:</p>
102 <table border="0" bgcolor="#E0E0E0" width="90%">
106 ��user-manual��/usr/share/doc/privoxy/user-manual</pre>
110 <p>The User Manual is then available to anyone with access to
111 <span class="APPLICATION">Privoxy</span>, by following the
112 built-in URL: <tt class=
113 "LITERAL">http://config.privoxy.org/user-manual/</tt> (or the
115 "LITERAL">http://p.p/user-manual/</tt>).</p>
116 <p>If the documentation is not on the local system, it can be
117 accessed from a remote server, as:</p>
118 <table border="0" bgcolor="#E0E0E0" width="90%">
122 ��user-manual��http://example.com/privoxy/user-manual/</pre>
126 <div class="WARNING">
127 <table class="WARNING" border="1" width="90%">
129 <td align="center"><b>Warning</b></td>
133 <p>If set, this option should be <span class=
134 "emphasis"><i class="EMPHASIS">the first option in the
135 config file</i></span>, because it is used while the
136 config file is being read on start-up.</p>
146 <h4 class="SECT3"><a name="TRUST-INFO-URL" id="TRUST-INFO-URL">7.1.2.
147 trust-info-url</a></h4>
148 <div class="VARIABLELIST">
152 <p>A URL to be displayed in the error page that users will see
153 if access to an untrusted page is denied.</p>
155 <dt>Type of value:</dt>
159 <dt>Default value:</dt>
161 <p><span class="emphasis"><i class=
162 "EMPHASIS">Unset</i></span></p>
164 <dt>Effect if unset:</dt>
166 <p>No links are displayed on the "untrusted" error page.</p>
170 <p>The value of this option only matters if the experimental
171 trust mechanism has been activated. (See <a href=
172 "config.html#TRUSTFILE"><span class="emphasis"><i class=
173 "EMPHASIS">trustfile</i></span></a> below.)</p>
174 <p>If you use the trust mechanism, it is a good idea to write
175 up some on-line documentation about your trust policy and to
176 specify the URL(s) here. Use multiple times for multiple
178 <p>The URL(s) should be added to the trustfile as well, so
179 users don't end up locked out from the information on why they
180 were locked out in the first place!</p>
186 <h4 class="SECT3"><a name="ADMIN-ADDRESS" id="ADMIN-ADDRESS">7.1.3.
187 admin-address</a></h4>
188 <div class="VARIABLELIST">
192 <p>An email address to reach the <span class=
193 "APPLICATION">Privoxy</span> administrator.</p>
195 <dt>Type of value:</dt>
199 <dt>Default value:</dt>
201 <p><span class="emphasis"><i class=
202 "EMPHASIS">Unset</i></span></p>
204 <dt>Effect if unset:</dt>
206 <p>No email address is displayed on error pages and the CGI
211 <p>If both <tt class="LITERAL">admin-address</tt> and
212 <tt class="LITERAL">proxy-info-url</tt> are unset, the whole
213 "Local Privoxy Support" box on all generated pages will not be
220 <h4 class="SECT3"><a name="PROXY-INFO-URL" id="PROXY-INFO-URL">7.1.4.
221 proxy-info-url</a></h4>
222 <div class="VARIABLELIST">
226 <p>A URL to documentation about the local <span class=
227 "APPLICATION">Privoxy</span> setup, configuration or
230 <dt>Type of value:</dt>
234 <dt>Default value:</dt>
236 <p><span class="emphasis"><i class=
237 "EMPHASIS">Unset</i></span></p>
239 <dt>Effect if unset:</dt>
241 <p>No link to local documentation is displayed on error pages
242 and the CGI user interface.</p>
246 <p>If both <tt class="LITERAL">admin-address</tt> and
247 <tt class="LITERAL">proxy-info-url</tt> are unset, the whole
248 "Local Privoxy Support" box on all generated pages will not be
250 <p>This URL shouldn't be blocked ;-)</p>
257 <h2 class="SECT2"><a name="CONF-LOG-LOC" id="CONF-LOG-LOC">7.2.
258 Configuration and Log File Locations</a></h2>
259 <p><span class="APPLICATION">Privoxy</span> can (and normally does) use
260 a number of other files for additional configuration, help and logging.
261 This section of the configuration file tells <span class=
262 "APPLICATION">Privoxy</span> where to find those other files.</p>
263 <p>The user running <span class="APPLICATION">Privoxy</span>, must have
264 read permission for all configuration files, and write permission to
265 any files that would be modified, such as log files and actions
268 <h4 class="SECT3"><a name="CONFDIR" id="CONFDIR">7.2.1.
270 <div class="VARIABLELIST">
274 <p>The directory where the other configuration files are
277 <dt>Type of value:</dt>
281 <dt>Default value:</dt>
283 <p>/etc/privoxy (Unix) <span class="emphasis"><i class=
284 "EMPHASIS">or</i></span> <span class=
285 "APPLICATION">Privoxy</span> installation dir (Windows)</p>
287 <dt>Effect if unset:</dt>
289 <p><span class="emphasis"><i class=
290 "EMPHASIS">Mandatory</i></span></p>
294 <p>No trailing <span class="QUOTE">"<tt class=
295 "LITERAL">/</tt>"</span>, please.</p>
301 <h4 class="SECT3"><a name="TEMPLDIR" id="TEMPLDIR">7.2.2.
303 <div class="VARIABLELIST">
307 <p>An alternative directory where the templates are loaded
310 <dt>Type of value:</dt>
314 <dt>Default value:</dt>
318 <dt>Effect if unset:</dt>
320 <p>The templates are assumed to be located in
321 confdir/template.</p>
325 <p><span class="APPLICATION">Privoxy's</span> original
326 templates are usually overwritten with each update. Use this
327 option to relocate customized templates that should be kept. As
328 template variables might change between updates, you shouldn't
329 expect templates to work with <span class=
330 "APPLICATION">Privoxy</span> releases other than the one they
331 were part of, though.</p>
337 <h4 class="SECT3"><a name="TEMPORARY-DIRECTORY" id=
338 "TEMPORARY-DIRECTORY">7.2.3. temporary-directory</a></h4>
339 <div class="VARIABLELIST">
343 <p>A directory where Privoxy can create temporary files.</p>
345 <dt>Type of value:</dt>
349 <dt>Default value:</dt>
353 <dt>Effect if unset:</dt>
355 <p>No temporary files are created, external filters don't
360 <p>To execute <tt class="LITERAL"><a href=
361 "actions-file.html#EXTERNAL-FILTER" target="_top">external
362 filters</a></tt>, <span class="APPLICATION">Privoxy</span> has
363 to create temporary files. This directive specifies the
364 directory the temporary files should be written to.</p>
365 <p>It should be a directory only <span class=
366 "APPLICATION">Privoxy</span> (and trusted users) can
373 <h4 class="SECT3"><a name="LOGDIR" id="LOGDIR">7.2.4. logdir</a></h4>
374 <div class="VARIABLELIST">
378 <p>The directory where all logging takes place (i.e. where the
379 <tt class="FILENAME">logfile</tt> is located).</p>
381 <dt>Type of value:</dt>
385 <dt>Default value:</dt>
387 <p>/var/log/privoxy (Unix) <span class="emphasis"><i class=
388 "EMPHASIS">or</i></span> <span class=
389 "APPLICATION">Privoxy</span> installation dir (Windows)</p>
391 <dt>Effect if unset:</dt>
393 <p><span class="emphasis"><i class=
394 "EMPHASIS">Mandatory</i></span></p>
398 <p>No trailing <span class="QUOTE">"<tt class=
399 "LITERAL">/</tt>"</span>, please.</p>
405 <h4 class="SECT3"><a name="ACTIONSFILE" id="ACTIONSFILE">7.2.5.
406 actionsfile</a></h4><a name="DEFAULT.ACTION" id=
407 "DEFAULT.ACTION"></a><a name="STANDARD.ACTION" id=
408 "STANDARD.ACTION"></a><a name="USER.ACTION" id="USER.ACTION"></a>
409 <div class="VARIABLELIST">
413 <p>The <a href="actions-file.html">actions file(s)</a> to
416 <dt>Type of value:</dt>
418 <p>Complete file name, relative to <tt class=
419 "LITERAL">confdir</tt></p>
421 <dt>Default values:</dt>
427 <p class="LITERALLAYOUT">
428 match-all.action # Actions that are applied to all sites and maybe overruled later on.</p>
433 <p class="LITERALLAYOUT">
434 default.action # Main actions file</p>
439 <p class="LITERALLAYOUT">
440 user.action # User customizations</p>
446 <dt>Effect if unset:</dt>
448 <p>No actions are taken at all. More or less neutral
453 <p>Multiple <tt class="LITERAL">actionsfile</tt> lines are
454 permitted, and are in fact recommended!</p>
455 <p>The default values are <tt class=
456 "FILENAME">default.action</tt>, which is the <span class=
457 "QUOTE">"main"</span> actions file maintained by the
458 developers, and <tt class="FILENAME">user.action</tt>, where
459 you can make your personal additions.</p>
460 <p>Actions files contain all the per site and per URL
461 configuration for ad blocking, cookie management, privacy
462 considerations, etc.</p>
468 <h4 class="SECT3"><a name="FILTERFILE" id="FILTERFILE">7.2.6.
469 filterfile</a></h4><a name="DEFAULT.FILTER" id="DEFAULT.FILTER"></a>
470 <div class="VARIABLELIST">
474 <p>The <a href="filter-file.html">filter file(s)</a> to use</p>
476 <dt>Type of value:</dt>
478 <p>File name, relative to <tt class="LITERAL">confdir</tt></p>
480 <dt>Default value:</dt>
482 <p>default.filter (Unix) <span class="emphasis"><i class=
483 "EMPHASIS">or</i></span> default.filter.txt (Windows)</p>
485 <dt>Effect if unset:</dt>
487 <p>No textual content filtering takes place, i.e. all
488 <tt class="LITERAL">+<a href=
489 "actions-file.html#FILTER">filter</a>{<tt class=
490 "REPLACEABLE"><i>name</i></tt>}</tt> actions in the actions
491 files are turned neutral.</p>
495 <p>Multiple <tt class="LITERAL">filterfile</tt> lines are
497 <p>The <a href="filter-file.html">filter files</a> contain
498 content modification rules that use <a href=
499 "appendix.html#REGEX">regular expressions</a>. These rules
500 permit powerful changes on the content of Web pages, and
501 optionally the headers as well, e.g., you could try to disable
502 your favorite JavaScript annoyances, re-write the actual
503 displayed text, or just have some fun playing buzzword bingo
505 <p>The <tt class="LITERAL">+<a href=
506 "actions-file.html#FILTER">filter</a>{<tt class=
507 "REPLACEABLE"><i>name</i></tt>}</tt> actions rely on the
508 relevant filter (<tt class="REPLACEABLE"><i>name</i></tt>) to
509 be defined in a filter file!</p>
510 <p>A pre-defined filter file called <tt class=
511 "FILENAME">default.filter</tt> that contains a number of useful
512 filters for common problems is included in the distribution.
513 See the section on the <tt class="LITERAL"><a href=
514 "actions-file.html#FILTER">filter</a></tt> action for a
516 <p>It is recommended to place any locally adapted filters into
517 a separate file, such as <tt class=
518 "FILENAME">user.filter</tt>.</p>
524 <h4 class="SECT3"><a name="LOGFILE" id="LOGFILE">7.2.7.
526 <div class="VARIABLELIST">
530 <p>The log file to use</p>
532 <dt>Type of value:</dt>
534 <p>File name, relative to <tt class="LITERAL">logdir</tt></p>
536 <dt>Default value:</dt>
538 <p><span class="emphasis"><i class="EMPHASIS">Unset (commented
539 out)</i></span>. When activated: logfile (Unix) <span class=
540 "emphasis"><i class="EMPHASIS">or</i></span> privoxy.log
543 <dt>Effect if unset:</dt>
545 <p>No logfile is written.</p>
549 <p>The logfile is where all logging and error messages are
550 written. The level of detail and number of messages are set
551 with the <tt class="LITERAL">debug</tt> option (see below). The
552 logfile can be useful for tracking down a problem with
553 <span class="APPLICATION">Privoxy</span> (e.g., it's not
554 blocking an ad you think it should block) and it can help you
555 to monitor what your browser is doing.</p>
556 <p>Depending on the debug options below, the logfile may be a
557 privacy risk if third parties can get access to it. As most
558 users will never look at it, <span class=
559 "APPLICATION">Privoxy</span> only logs fatal errors by
561 <p>For most troubleshooting purposes, you will have to change
562 that, please refer to the debugging section for details.</p>
563 <p>Any log files must be writable by whatever user <span class=
564 "APPLICATION">Privoxy</span> is being run as (on Unix, default
565 user id is <span class="QUOTE">"privoxy"</span>).</p>
566 <p>To prevent the logfile from growing indefinitely, it is
567 recommended to periodically rotate or shorten it. Many
568 operating systems support log rotation out of the box, some
569 require additional software to do it. For details, please refer
570 to the documentation for your operating system.</p>
576 <h4 class="SECT3"><a name="TRUSTFILE" id="TRUSTFILE">7.2.8.
578 <div class="VARIABLELIST">
582 <p>The name of the trust file to use</p>
584 <dt>Type of value:</dt>
586 <p>File name, relative to <tt class="LITERAL">confdir</tt></p>
588 <dt>Default value:</dt>
590 <p><span class="emphasis"><i class="EMPHASIS">Unset (commented
591 out)</i></span>. When activated: trust (Unix) <span class=
592 "emphasis"><i class="EMPHASIS">or</i></span> trust.txt
595 <dt>Effect if unset:</dt>
597 <p>The entire trust mechanism is disabled.</p>
601 <p>The trust mechanism is an experimental feature for building
602 white-lists and should be used with care. It is <span class=
603 "emphasis"><i class="EMPHASIS">NOT</i></span> recommended for
605 <p>If you specify a trust file, <span class=
606 "APPLICATION">Privoxy</span> will only allow access to sites
607 that are specified in the trustfile. Sites can be listed in one
609 <p>Prepending a <tt class="LITERAL">~</tt> character limits
610 access to this site only (and any sub-paths within this site),
611 e.g. <tt class="LITERAL">~www.example.com</tt> allows access to
612 <tt class="LITERAL">~www.example.com/features/news.html</tt>,
614 <p>Or, you can designate sites as <span class=
615 "emphasis"><i class="EMPHASIS">trusted referrers</i></span>, by
616 prepending the name with a <tt class="LITERAL">+</tt>
617 character. The effect is that access to untrusted sites will be
618 granted -- but only if a link from this trusted referrer was
619 used to get there. The link target will then be added to the
620 <span class="QUOTE">"trustfile"</span> so that future, direct
621 accesses will be granted. Sites added via this mechanism do not
622 become trusted referrers themselves (i.e. they are added with a
623 <tt class="LITERAL">~</tt> designation). There is a limit of
624 512 such entries, after which new entries will not be made.</p>
625 <p>If you use the <tt class="LITERAL">+</tt> operator in the
626 trust file, it may grow considerably over time.</p>
627 <p>It is recommended that <span class=
628 "APPLICATION">Privoxy</span> be compiled with the <tt class=
629 "LITERAL">--disable-force</tt>, <tt class=
630 "LITERAL">--disable-toggle</tt> and <tt class=
631 "LITERAL">--disable-editor</tt> options, if this feature is to
633 <p>Possible applications include limiting Internet access for
641 <h2 class="SECT2"><a name="DEBUGGING" id="DEBUGGING">7.3.
643 <p>These options are mainly useful when tracing a problem. Note that
644 you might also want to invoke <span class="APPLICATION">Privoxy</span>
645 with the <tt class="LITERAL">--no-daemon</tt> command line option when
648 <h4 class="SECT3"><a name="DEBUG" id="DEBUG">7.3.1. debug</a></h4>
649 <div class="VARIABLELIST">
653 <p>Key values that determine what information gets logged.</p>
655 <dt>Type of value:</dt>
657 <p>Integer values</p>
659 <dt>Default value:</dt>
661 <p>0 (i.e.: only fatal errors (that cause Privoxy to exit) are
664 <dt>Effect if unset:</dt>
666 <p>Default value is used (see above).</p>
670 <p>The available debug levels are:</p>
671 <table border="0" bgcolor="#E0E0E0" width="90%">
674 <pre class="PROGRAMLISTING">
675 debug 1 # Log the destination for each request <span class="APPLICATION">Privoxy</span> let through. See also debug 1024.
676 debug 2 # show each connection status
677 debug 4 # show I/O status
678 debug 8 # show header parsing
679 debug 16 # log all data written to the network
680 debug 32 # debug force feature
681 debug 64 # debug regular expression filters
682 debug 128 # debug redirects
683 debug 256 # debug GIF de-animation
684 debug 512 # Common Log Format
685 debug 1024 # Log the destination for requests <span class=
686 "APPLICATION">Privoxy</span> didn't let through, and the reason why.
687 debug 2048 # CGI user interface
688 debug 4096 # Startup banner and warnings.
689 debug 8192 # Non-fatal errors
690 debug 32768 # log all data read from the network
691 debug 65536 # Log the applying actions</pre>
695 <p>To select multiple debug levels, you can either add them or
696 use multiple <tt class="LITERAL">debug</tt> lines.</p>
697 <p>A debug level of 1 is informative because it will show you
698 each request as it happens. <span class="emphasis"><i class=
699 "EMPHASIS">1, 1024, 4096 and 8192 are recommended</i></span> so
700 that you will notice when things go wrong. The other levels are
701 probably only of interest if you are hunting down a specific
702 problem. They can produce a hell of an output (especially
704 <p>If you are used to the more verbose settings, simply enable
705 the debug lines below again.</p>
706 <p>If you want to use pure CLF (Common Log Format), you should
707 set <span class="QUOTE">"debug 512"</span> <span class=
708 "emphasis"><i class="EMPHASIS">ONLY</i></span> and not enable
710 <p><span class="APPLICATION">Privoxy</span> has a hard-coded
711 limit for the length of log messages. If it's reached, messages
712 are logged truncated and marked with <span class="QUOTE">"...
713 [too long, truncated]"</span>.</p>
714 <p>Please don't file any support requests without trying to
715 reproduce the problem with increased debug level first. Once
716 you read the log messages, you may even be able to solve the
717 problem on your own.</p>
723 <h4 class="SECT3"><a name="SINGLE-THREADED" id=
724 "SINGLE-THREADED">7.3.2. single-threaded</a></h4>
725 <div class="VARIABLELIST">
729 <p>Whether to run only one server thread.</p>
731 <dt>Type of value:</dt>
733 <p><span class="emphasis"><i class="EMPHASIS">1 or
736 <dt>Default value:</dt>
738 <p><span class="emphasis"><i class="EMPHASIS">0</i></span></p>
740 <dt>Effect if unset:</dt>
742 <p>Multi-threaded (or, where unavailable: forked) operation,
743 i.e. the ability to serve multiple requests simultaneously.</p>
747 <p>This option is only there for debugging purposes.
748 <span class="emphasis"><i class="EMPHASIS">It will drastically
749 reduce performance.</i></span></p>
755 <h4 class="SECT3"><a name="HOSTNAME" id="HOSTNAME">7.3.3.
757 <div class="VARIABLELIST">
761 <p>The hostname shown on the CGI pages.</p>
763 <dt>Type of value:</dt>
767 <dt>Default value:</dt>
769 <p><span class="emphasis"><i class=
770 "EMPHASIS">Unset</i></span></p>
772 <dt>Effect if unset:</dt>
774 <p>The hostname provided by the operating system is used.</p>
778 <p>On some misconfigured systems resolving the hostname fails
779 or takes too much time and slows Privoxy down. Setting a fixed
780 hostname works around the problem.</p>
781 <p>In other circumstances it might be desirable to show a
782 hostname other than the one returned by the operating system.
783 For example if the system has several different hostnames and
784 you don't want to use the first one.</p>
785 <p>Note that Privoxy does not validate the specified hostname
793 <h2 class="SECT2"><a name="ACCESS-CONTROL" id="ACCESS-CONTROL">7.4.
794 Access Control and Security</a></h2>
795 <p>This section of the config file controls the security-relevant
796 aspects of <span class="APPLICATION">Privoxy</span>'s
799 <h4 class="SECT3"><a name="LISTEN-ADDRESS" id="LISTEN-ADDRESS">7.4.1.
800 listen-address</a></h4>
801 <div class="VARIABLELIST">
805 <p>The address and TCP port on which <span class=
806 "APPLICATION">Privoxy</span> will listen for client
809 <dt>Type of value:</dt>
811 <p>[<tt class="REPLACEABLE"><i>IP-Address</i></tt>]:<tt class=
812 "REPLACEABLE"><i>Port</i></tt></p>
813 <p>[<tt class="REPLACEABLE"><i>Hostname</i></tt>]:<tt class=
814 "REPLACEABLE"><i>Port</i></tt></p>
816 <dt>Default value:</dt>
818 <p>127.0.0.1:8118</p>
820 <dt>Effect if unset:</dt>
822 <p>Bind to 127.0.0.1 (IPv4 localhost), port 8118. This is
823 suitable and recommended for home users who run <span class=
824 "APPLICATION">Privoxy</span> on the same machine as their
829 <p>You will need to configure your browser(s) to this proxy
830 address and port.</p>
831 <p>If you already have another service running on port 8118, or
832 if you want to serve requests from other machines (e.g. on your
833 local network) as well, you will need to override the
835 <p>You can use this statement multiple times to make
836 <span class="APPLICATION">Privoxy</span> listen on more ports
837 or more <abbr class="ABBREV">IP</abbr> addresses. Suitable if
838 your operating system does not support sharing <abbr class=
839 "ABBREV">IPv6</abbr> and <abbr class="ABBREV">IPv4</abbr>
840 protocols on the same socket.</p>
841 <p>If a hostname is used instead of an IP address, <span class=
842 "APPLICATION">Privoxy</span> will try to resolve it to an IP
843 address and if there are multiple, use the first one
845 <p>If the address for the hostname isn't already known on the
846 system (for example because it's in /etc/hostname), this may
847 result in DNS traffic.</p>
848 <p>If the specified address isn't available on the system, or
849 if the hostname can't be resolved, <span class=
850 "APPLICATION">Privoxy</span> will fail to start.</p>
851 <p>IPv6 addresses containing colons have to be quoted by
852 brackets. They can only be used if <span class=
853 "APPLICATION">Privoxy</span> has been compiled with IPv6
854 support. If you aren't sure if your version supports it, have a
856 "LITERAL">http://config.privoxy.org/show-status</tt>.</p>
857 <p>Some operating systems will prefer IPv6 to IPv4 addresses
858 even if the system has no IPv6 connectivity which is usually
859 not expected by the user. Some even rely on DNS to resolve
860 localhost which mean the "localhost" address used may not
861 actually be local.</p>
862 <p>It is therefore recommended to explicitly configure the
863 intended IP address instead of relying on the operating system,
864 unless there's a strong reason not to.</p>
865 <p>If you leave out the address, <span class=
866 "APPLICATION">Privoxy</span> will bind to all IPv4 interfaces
867 (addresses) on your machine and may become reachable from the
868 Internet and/or the local network. Be aware that some GNU/Linux
869 distributions modify that behaviour without updating the
870 documentation. Check for non-standard patches if your
871 <span class="APPLICATION">Privoxy</span> version behaves
873 <p>If you configure <span class="APPLICATION">Privoxy</span> to
874 be reachable from the network, consider using <a href=
875 "config.html#ACLS">access control lists</a> (ACL's, see below),
876 and/or a firewall.</p>
877 <p>If you open <span class="APPLICATION">Privoxy</span> to
878 untrusted users, you will also want to make sure that the
879 following actions are disabled: <tt class="LITERAL"><a href=
880 "config.html#ENABLE-EDIT-ACTIONS">enable-edit-actions</a></tt>
881 and <tt class="LITERAL"><a href=
882 "config.html#ENABLE-REMOTE-TOGGLE">enable-remote-toggle</a></tt></p>
886 <p>Suppose you are running <span class=
887 "APPLICATION">Privoxy</span> on a machine which has the address
888 192.168.0.1 on your local private network (192.168.0.0) and has
889 another outside connection with a different address. You want
890 it to serve requests from inside only:</p>
891 <table border="0" bgcolor="#E0E0E0" width="90%">
894 <pre class="PROGRAMLISTING">
895 listen-address 192.168.0.1:8118</pre>
899 <p>Suppose you are running <span class=
900 "APPLICATION">Privoxy</span> on an IPv6-capable machine and you
901 want it to listen on the IPv6 address of the loopback
903 <table border="0" bgcolor="#E0E0E0" width="90%">
906 <pre class="PROGRAMLISTING">
907 listen-address [::1]:8118</pre>
916 <h4 class="SECT3"><a name="TOGGLE" id="TOGGLE">7.4.2. toggle</a></h4>
917 <div class="VARIABLELIST">
921 <p>Initial state of "toggle" status</p>
923 <dt>Type of value:</dt>
927 <dt>Default value:</dt>
931 <dt>Effect if unset:</dt>
933 <p>Act as if toggled on</p>
937 <p>If set to 0, <span class="APPLICATION">Privoxy</span> will
938 start in <span class="QUOTE">"toggled off"</span> mode, i.e.
939 mostly behave like a normal, content-neutral proxy with both ad
940 blocking and content filtering disabled. See <tt class=
941 "LITERAL">enable-remote-toggle</tt> below.</p>
947 <h4 class="SECT3"><a name="ENABLE-REMOTE-TOGGLE" id=
948 "ENABLE-REMOTE-TOGGLE">7.4.3. enable-remote-toggle</a></h4>
949 <div class="VARIABLELIST">
953 <p>Whether or not the <a href=
954 "http://config.privoxy.org/toggle" target="_top">web-based
955 toggle feature</a> may be used</p>
957 <dt>Type of value:</dt>
961 <dt>Default value:</dt>
965 <dt>Effect if unset:</dt>
967 <p>The web-based toggle feature is disabled.</p>
971 <p>When toggled off, <span class="APPLICATION">Privoxy</span>
972 mostly acts like a normal, content-neutral proxy, i.e. doesn't
973 block ads or filter content.</p>
974 <p>Access to the toggle feature can <span class=
975 "emphasis"><i class="EMPHASIS">not</i></span> be controlled
976 separately by <span class="QUOTE">"ACLs"</span> or HTTP
977 authentication, so that everybody who can access <span class=
978 "APPLICATION">Privoxy</span> (see <span class=
979 "QUOTE">"ACLs"</span> and <tt class=
980 "LITERAL">listen-address</tt> above) can toggle it for all
981 users. So this option is <span class="emphasis"><i class=
982 "EMPHASIS">not recommended</i></span> for multi-user
983 environments with untrusted users.</p>
984 <p>Note that malicious client side code (e.g Java) is also
985 capable of using this option.</p>
986 <p>As a lot of <span class="APPLICATION">Privoxy</span> users
987 don't read documentation, this feature is disabled by
989 <p>Note that you must have compiled <span class=
990 "APPLICATION">Privoxy</span> with support for this feature,
991 otherwise this option has no effect.</p>
997 <h4 class="SECT3"><a name="ENABLE-REMOTE-HTTP-TOGGLE" id=
998 "ENABLE-REMOTE-HTTP-TOGGLE">7.4.4. enable-remote-http-toggle</a></h4>
999 <div class="VARIABLELIST">
1003 <p>Whether or not Privoxy recognizes special HTTP headers to
1004 change its behaviour.</p>
1006 <dt>Type of value:</dt>
1010 <dt>Default value:</dt>
1014 <dt>Effect if unset:</dt>
1016 <p>Privoxy ignores special HTTP headers.</p>
1020 <p>When toggled on, the client can change <span class=
1021 "APPLICATION">Privoxy's</span> behaviour by setting special
1022 HTTP headers. Currently the only supported special header is
1023 <span class="QUOTE">"X-Filter: No"</span>, to disable filtering
1024 for the ongoing request, even if it is enabled in one of the
1026 <p>This feature is disabled by default. If you are using
1027 <span class="APPLICATION">Privoxy</span> in a environment with
1028 trusted clients, you may enable this feature at your
1029 discretion. Note that malicious client side code (e.g Java) is
1030 also capable of using this feature.</p>
1031 <p>This option will be removed in future releases as it has
1032 been obsoleted by the more general header taggers.</p>
1038 <h4 class="SECT3"><a name="ENABLE-EDIT-ACTIONS" id=
1039 "ENABLE-EDIT-ACTIONS">7.4.5. enable-edit-actions</a></h4>
1040 <div class="VARIABLELIST">
1044 <p>Whether or not the <a href=
1045 "http://config.privoxy.org/show-status" target="_top">web-based
1046 actions file editor</a> may be used</p>
1048 <dt>Type of value:</dt>
1052 <dt>Default value:</dt>
1056 <dt>Effect if unset:</dt>
1058 <p>The web-based actions file editor is disabled.</p>
1062 <p>Access to the editor can <span class="emphasis"><i class=
1063 "EMPHASIS">not</i></span> be controlled separately by
1064 <span class="QUOTE">"ACLs"</span> or HTTP authentication, so
1065 that everybody who can access <span class=
1066 "APPLICATION">Privoxy</span> (see <span class=
1067 "QUOTE">"ACLs"</span> and <tt class=
1068 "LITERAL">listen-address</tt> above) can modify its
1069 configuration for all users.</p>
1070 <p>This option is <span class="emphasis"><i class=
1071 "EMPHASIS">not recommended</i></span> for environments with
1072 untrusted users and as a lot of <span class=
1073 "APPLICATION">Privoxy</span> users don't read documentation,
1074 this feature is disabled by default.</p>
1075 <p>Note that malicious client side code (e.g Java) is also
1076 capable of using the actions editor and you shouldn't enable
1077 this options unless you understand the consequences and are
1078 sure your browser is configured correctly.</p>
1079 <p>Note that you must have compiled <span class=
1080 "APPLICATION">Privoxy</span> with support for this feature,
1081 otherwise this option has no effect.</p>
1087 <h4 class="SECT3"><a name="ENFORCE-BLOCKS" id="ENFORCE-BLOCKS">7.4.6.
1088 enforce-blocks</a></h4>
1089 <div class="VARIABLELIST">
1093 <p>Whether the user is allowed to ignore blocks and can
1094 <span class="QUOTE">"go there anyway"</span>.</p>
1096 <dt>Type of value:</dt>
1098 <p><tt class="REPLACEABLE"><i>0 or 1</i></tt></p>
1100 <dt>Default value:</dt>
1102 <p><span class="emphasis"><i class="EMPHASIS">0</i></span></p>
1104 <dt>Effect if unset:</dt>
1106 <p>Blocks are not enforced.</p>
1110 <p><span class="APPLICATION">Privoxy</span> is mainly used to
1111 block and filter requests as a service to the user, for example
1112 to block ads and other junk that clogs the pipes. <span class=
1113 "APPLICATION">Privoxy's</span> configuration isn't perfect and
1114 sometimes innocent pages are blocked. In this situation it
1115 makes sense to allow the user to enforce the request and have
1116 <span class="APPLICATION">Privoxy</span> ignore the block.</p>
1117 <p>In the default configuration <span class=
1118 "APPLICATION">Privoxy's</span> <span class=
1119 "QUOTE">"Blocked"</span> page contains a <span class=
1120 "QUOTE">"go there anyway"</span> link to adds a special string
1121 (the force prefix) to the request URL. If that link is used,
1122 <span class="APPLICATION">Privoxy</span> will detect the force
1123 prefix, remove it again and let the request pass.</p>
1124 <p>Of course <span class="APPLICATION">Privoxy</span> can also
1125 be used to enforce a network policy. In that case the user
1126 obviously should not be able to bypass any blocks, and that's
1127 what the <span class="QUOTE">"enforce-blocks"</span> option is
1128 for. If it's enabled, <span class="APPLICATION">Privoxy</span>
1129 hides the <span class="QUOTE">"go there anyway"</span> link. If
1130 the user adds the force prefix by hand, it will not be accepted
1131 and the circumvention attempt is logged.</p>
1135 <p>enforce-blocks 1</p>
1141 <h4 class="SECT3"><a name="ACLS" id="ACLS">7.4.7. ACLs: permit-access
1142 and deny-access</a></h4><a name="PERMIT-ACCESS" id=
1143 "PERMIT-ACCESS"></a><a name="DENY-ACCESS" id="DENY-ACCESS"></a>
1144 <div class="VARIABLELIST">
1148 <p>Who can access what.</p>
1150 <dt>Type of value:</dt>
1152 <p><tt class="REPLACEABLE"><i>src_addr</i></tt>[:<tt class=
1153 "REPLACEABLE"><i>port</i></tt>][/<tt class=
1154 "REPLACEABLE"><i>src_masklen</i></tt>] [<tt class=
1155 "REPLACEABLE"><i>dst_addr</i></tt>[:<tt class=
1156 "REPLACEABLE"><i>port</i></tt>][/<tt class=
1157 "REPLACEABLE"><i>dst_masklen</i></tt>]]</p>
1158 <p>Where <tt class="REPLACEABLE"><i>src_addr</i></tt> and
1159 <tt class="REPLACEABLE"><i>dst_addr</i></tt> are IPv4 addresses
1160 in dotted decimal notation or valid DNS names, <tt class=
1161 "REPLACEABLE"><i>port</i></tt> is a port number, and <tt class=
1162 "REPLACEABLE"><i>src_masklen</i></tt> and <tt class=
1163 "REPLACEABLE"><i>dst_masklen</i></tt> are subnet masks in CIDR
1164 notation, i.e. integer values from 2 to 30 representing the
1165 length (in bits) of the network address. The masks and the
1166 whole destination part are optional.</p>
1167 <p>If your system implements <a href=
1168 "http://tools.ietf.org/html/rfc3493" target="_top">RFC
1169 3493</a>, then <tt class="REPLACEABLE"><i>src_addr</i></tt> and
1170 <tt class="REPLACEABLE"><i>dst_addr</i></tt> can be IPv6
1171 addresses delimeted by brackets, <tt class=
1172 "REPLACEABLE"><i>port</i></tt> can be a number or a service
1173 name, and <tt class="REPLACEABLE"><i>src_masklen</i></tt> and
1174 <tt class="REPLACEABLE"><i>dst_masklen</i></tt> can be a number
1177 <dt>Default value:</dt>
1179 <p><span class="emphasis"><i class=
1180 "EMPHASIS">Unset</i></span></p>
1181 <p>If no <tt class="REPLACEABLE"><i>port</i></tt> is specified,
1182 any port will match. If no <tt class=
1183 "REPLACEABLE"><i>src_masklen</i></tt> or <tt class=
1184 "REPLACEABLE"><i>src_masklen</i></tt> is given, the complete IP
1185 address has to match (i.e. 32 bits for IPv4 and 128 bits for
1188 <dt>Effect if unset:</dt>
1190 <p>Don't restrict access further than implied by <tt class=
1191 "LITERAL">listen-address</tt></p>
1195 <p>Access controls are included at the request of ISPs and
1196 systems administrators, and <span class="emphasis"><i class=
1197 "EMPHASIS">are not usually needed by individual
1198 users</i></span>. For a typical home user, it will normally
1199 suffice to ensure that <span class="APPLICATION">Privoxy</span>
1200 only listens on the localhost (127.0.0.1) or internal (home)
1201 network address by means of the <a href=
1202 "config.html#LISTEN-ADDRESS"><span class="emphasis"><i class=
1203 "EMPHASIS">listen-address</i></span></a> option.</p>
1204 <p>Please see the warnings in the FAQ that <span class=
1205 "APPLICATION">Privoxy</span> is not intended to be a substitute
1206 for a firewall or to encourage anyone to defer addressing basic
1207 security weaknesses.</p>
1208 <p>Multiple ACL lines are OK. If any ACLs are specified,
1209 <span class="APPLICATION">Privoxy</span> only talks to IP
1210 addresses that match at least one <tt class=
1211 "LITERAL">permit-access</tt> line and don't match any
1212 subsequent <tt class="LITERAL">deny-access</tt> line. In other
1213 words, the last match wins, with the default being <tt class=
1214 "LITERAL">deny-access</tt>.</p>
1215 <p>If <span class="APPLICATION">Privoxy</span> is using a
1216 forwarder (see <tt class="LITERAL">forward</tt> below) for a
1217 particular destination URL, the <tt class=
1218 "REPLACEABLE"><i>dst_addr</i></tt> that is examined is the
1219 address of the forwarder and <span class="emphasis"><i class=
1220 "EMPHASIS">NOT</i></span> the address of the ultimate target.
1221 This is necessary because it may be impossible for the local
1222 <span class="APPLICATION">Privoxy</span> to determine the IP
1223 address of the ultimate target (that's often what gateways are
1225 <p>You should prefer using IP addresses over DNS names, because
1226 the address lookups take time. All DNS names must resolve! You
1227 can <span class="emphasis"><i class="EMPHASIS">not</i></span>
1228 use domain patterns like <span class="QUOTE">"*.org"</span> or
1229 partial domain names. If a DNS name resolves to multiple IP
1230 addresses, only the first one is used.</p>
1231 <p>Some systems allow IPv4 clients to connect to IPv6 server
1232 sockets. Then the client's IPv4 address will be translated by
1233 the system into IPv6 address space with special prefix
1234 ::ffff:0:0/96 (so called IPv4 mapped IPv6 address).
1235 <span class="APPLICATION">Privoxy</span> can handle it and maps
1236 such ACL addresses automatically.</p>
1237 <p>Denying access to particular sites by ACL may have undesired
1238 side effects if the site in question is hosted on a machine
1239 which also hosts other sites (most sites are).</p>
1243 <p>Explicitly define the default behavior if no ACL and
1244 <tt class="LITERAL">listen-address</tt> are set: <span class=
1245 "QUOTE">"localhost"</span> is OK. The absence of a <tt class=
1246 "REPLACEABLE"><i>dst_addr</i></tt> implies that <span class=
1247 "emphasis"><i class="EMPHASIS">all</i></span> destination
1248 addresses are OK:</p>
1249 <table border="0" bgcolor="#E0E0E0" width="90%">
1252 <pre class="SCREEN"> permit-access localhost</pre>
1256 <p>Allow any host on the same class C subnet as www.privoxy.org
1257 access to nothing but www.example.com (or other domains hosted
1258 on the same system):</p>
1259 <table border="0" bgcolor="#E0E0E0" width="90%">
1262 <pre class="SCREEN">
1263 permit-access www.privoxy.org/24 www.example.com/32</pre>
1267 <p>Allow access from any host on the 26-bit subnet
1268 192.168.45.64 to anywhere, with the exception that
1269 192.168.45.73 may not access the IP address behind
1270 www.dirty-stuff.example.com:</p>
1271 <table border="0" bgcolor="#E0E0E0" width="90%">
1274 <pre class="SCREEN"> permit-access 192.168.45.64/26
1275 deny-access 192.168.45.73 www.dirty-stuff.example.com</pre>
1279 <p>Allow access from the IPv4 network 192.0.2.0/24 even if
1280 listening on an IPv6 wild card address (not supported on all
1282 <table border="0" bgcolor="#E0E0E0" width="90%">
1285 <pre class="PROGRAMLISTING">
1286 permit-access 192.0.2.0/24</pre>
1290 <p>This is equivalent to the following line even if listening
1291 on an IPv4 address (not supported on all platforms):</p>
1292 <table border="0" bgcolor="#E0E0E0" width="90%">
1295 <pre class="PROGRAMLISTING">
1296 permit-access [::ffff:192.0.2.0]/120</pre>
1305 <h4 class="SECT3"><a name="BUFFER-LIMIT" id="BUFFER-LIMIT">7.4.8.
1306 buffer-limit</a></h4>
1307 <div class="VARIABLELIST">
1311 <p>Maximum size of the buffer for content filtering.</p>
1313 <dt>Type of value:</dt>
1315 <p>Size in Kbytes</p>
1317 <dt>Default value:</dt>
1321 <dt>Effect if unset:</dt>
1323 <p>Use a 4MB (4096 KB) limit.</p>
1327 <p>For content filtering, i.e. the <tt class=
1328 "LITERAL">+filter</tt> and <tt class=
1329 "LITERAL">+deanimate-gif</tt> actions, it is necessary that
1330 <span class="APPLICATION">Privoxy</span> buffers the entire
1331 document body. This can be potentially dangerous, since a
1332 server could just keep sending data indefinitely and wait for
1333 your RAM to exhaust -- with nasty consequences. Hence this
1335 <p>When a document buffer size reaches the <tt class=
1336 "LITERAL">buffer-limit</tt>, it is flushed to the client
1337 unfiltered and no further attempt to filter the rest of the
1338 document is made. Remember that there may be multiple threads
1339 running, which might require up to <tt class=
1340 "LITERAL">buffer-limit</tt> Kbytes <span class=
1341 "emphasis"><i class="EMPHASIS">each</i></span>, unless you have
1342 enabled <span class="QUOTE">"single-threaded"</span> above.</p>
1348 <h4 class="SECT3"><a name="ENABLE-PROXY-AUTHENTICATION-FORWARDING"
1349 id="ENABLE-PROXY-AUTHENTICATION-FORWARDING">7.4.9.
1350 enable-proxy-authentication-forwarding</a></h4>
1351 <div class="VARIABLELIST">
1355 <p>Whether or not proxy authentication through <span class=
1356 "APPLICATION">Privoxy</span> should work.</p>
1358 <dt>Type of value:</dt>
1362 <dt>Default value:</dt>
1366 <dt>Effect if unset:</dt>
1368 <p>Proxy authentication headers are removed.</p>
1372 <p>Privoxy itself does not support proxy authentication, but
1373 can allow clients to authenticate against Privoxy's parent
1375 <p>By default Privoxy (3.0.21 and later) don't do that and
1376 remove Proxy-Authorization headers in requests and
1377 Proxy-Authenticate headers in responses to make it harder for
1378 malicious sites to trick inexperienced users into providing
1379 login information.</p>
1380 <p>If this option is enabled the headers are forwarded.</p>
1381 <p>Enabling this option is <span class="emphasis"><i class=
1382 "EMPHASIS">not recommended</i></span> if there is no parent
1383 proxy that requires authentication or if the local network
1384 between Privoxy and the parent proxy isn't trustworthy. If
1385 proxy authentication is only required for some requests, it is
1386 recommended to use a client header filter to remove the
1387 authentication headers for requests where they aren't
1395 <h2 class="SECT2"><a name="FORWARDING" id="FORWARDING">7.5.
1397 <p>This feature allows routing of HTTP requests through a chain of
1398 multiple proxies.</p>
1399 <p>Forwarding can be used to chain Privoxy with a caching proxy to
1400 speed up browsing. Using a parent proxy may also be necessary if the
1401 machine that <span class="APPLICATION">Privoxy</span> runs on has no
1402 direct Internet access.</p>
1403 <p>Note that parent proxies can severely decrease your privacy level.
1404 For example a parent proxy could add your IP address to the request
1405 headers and if it's a caching proxy it may add the <span class=
1406 "QUOTE">"Etag"</span> header to revalidation requests again, even
1407 though you configured Privoxy to remove it. It may also ignore
1408 Privoxy's header time randomization and use the original values which
1409 could be used by the server as cookie replacement to track your steps
1411 <p>Also specified here are SOCKS proxies. <span class=
1412 "APPLICATION">Privoxy</span> supports the SOCKS 4 and SOCKS 4A
1415 <h4 class="SECT3"><a name="FORWARD" id="FORWARD">7.5.1.
1417 <div class="VARIABLELIST">
1421 <p>To which parent HTTP proxy specific requests should be
1424 <dt>Type of value:</dt>
1426 <p><tt class="REPLACEABLE"><i>target_pattern</i></tt>
1427 <tt class="REPLACEABLE"><i>http_parent</i></tt>[:<tt class=
1428 "REPLACEABLE"><i>port</i></tt>]</p>
1429 <p>where <tt class="REPLACEABLE"><i>target_pattern</i></tt> is
1430 a <a href="actions-file.html#AF-PATTERNS">URL pattern</a> that
1431 specifies to which requests (i.e. URLs) this forward rule shall
1432 apply. Use <tt class="LITERAL">/</tt> to denote <span class=
1433 "QUOTE">"all URLs"</span>. <tt class=
1434 "REPLACEABLE"><i>http_parent</i></tt>[:<tt class=
1435 "REPLACEABLE"><i>port</i></tt>] is the DNS name or IP address
1436 of the parent HTTP proxy through which the requests should be
1437 forwarded, optionally followed by its listening port (default:
1438 8000). Use a single dot (<tt class="LITERAL">.</tt>) to denote
1439 <span class="QUOTE">"no forwarding"</span>.</p>
1441 <dt>Default value:</dt>
1443 <p><span class="emphasis"><i class=
1444 "EMPHASIS">Unset</i></span></p>
1446 <dt>Effect if unset:</dt>
1448 <p>Don't use parent HTTP proxies.</p>
1452 <p>If <tt class="REPLACEABLE"><i>http_parent</i></tt> is
1453 <span class="QUOTE">"."</span>, then requests are not forwarded
1454 to another HTTP proxy but are made directly to the web
1456 <p><tt class="REPLACEABLE"><i>http_parent</i></tt> can be a
1457 numerical IPv6 address (if <a href=
1458 "http://tools.ietf.org/html/rfc3493" target="_top">RFC 3493</a>
1459 is implemented). To prevent clashes with the port delimiter,
1460 the whole IP address has to be put into brackets. On the other
1461 hand a <tt class="REPLACEABLE"><i>target_pattern</i></tt>
1462 containing an IPv6 address has to be put into angle brackets
1463 (normal brackets are reserved for regular expressions
1465 <p>Multiple lines are OK, they are checked in sequence, and the
1466 last match wins.</p>
1470 <p>Everything goes to an example parent proxy, except SSL on
1471 port 443 (which it doesn't handle):</p>
1472 <table border="0" bgcolor="#E0E0E0" width="90%">
1475 <pre class="SCREEN">
1476 forward / parent-proxy.example.org:8080
1477 forward :443 .</pre>
1481 <p>Everything goes to our example ISP's caching proxy, except
1482 for requests to that ISP's sites:</p>
1483 <table border="0" bgcolor="#E0E0E0" width="90%">
1486 <pre class="SCREEN">
1487 forward / caching-proxy.isp.example.net:8000
1488 forward .isp.example.net .</pre>
1492 <p>Parent proxy specified by an IPv6 address:</p>
1493 <table border="0" bgcolor="#E0E0E0" width="90%">
1496 <pre class="PROGRAMLISTING">
1497 forward / [2001:DB8::1]:8000</pre>
1501 <p>Suppose your parent proxy doesn't support IPv6:</p>
1502 <table border="0" bgcolor="#E0E0E0" width="90%">
1505 <pre class="PROGRAMLISTING">
1506 forward / parent-proxy.example.org:8000
1507 forward ipv6-server.example.org .
1508 forward <[2-3][0-9a-f][0-9a-f][0-9a-f]:*> .</pre>
1517 <h4 class="SECT3"><a name="SOCKS" id="SOCKS">7.5.2. forward-socks4,
1518 forward-socks4a, forward-socks5 and forward-socks5t</a></h4><a name=
1519 "FORWARD-SOCKS4" id="FORWARD-SOCKS4"></a><a name="FORWARD-SOCKS4A"
1520 id="FORWARD-SOCKS4A"></a>
1521 <div class="VARIABLELIST">
1525 <p>Through which SOCKS proxy (and optionally to which parent
1526 HTTP proxy) specific requests should be routed.</p>
1528 <dt>Type of value:</dt>
1530 <p><tt class="REPLACEABLE"><i>target_pattern</i></tt>
1531 <tt class="REPLACEABLE"><i>socks_proxy</i></tt>[:<tt class=
1532 "REPLACEABLE"><i>port</i></tt>] <tt class=
1533 "REPLACEABLE"><i>http_parent</i></tt>[:<tt class=
1534 "REPLACEABLE"><i>port</i></tt>]</p>
1535 <p>where <tt class="REPLACEABLE"><i>target_pattern</i></tt> is
1536 a <a href="actions-file.html#AF-PATTERNS">URL pattern</a> that
1537 specifies to which requests (i.e. URLs) this forward rule shall
1538 apply. Use <tt class="LITERAL">/</tt> to denote <span class=
1539 "QUOTE">"all URLs"</span>. <tt class=
1540 "REPLACEABLE"><i>http_parent</i></tt> and <tt class=
1541 "REPLACEABLE"><i>socks_proxy</i></tt> are IP addresses in
1542 dotted decimal notation or valid DNS names (<tt class=
1543 "REPLACEABLE"><i>http_parent</i></tt> may be <span class=
1544 "QUOTE">"."</span> to denote <span class="QUOTE">"no HTTP
1545 forwarding"</span>), and the optional <tt class=
1546 "REPLACEABLE"><i>port</i></tt> parameters are TCP ports, i.e.
1547 integer values from 1 to 65535</p>
1549 <dt>Default value:</dt>
1551 <p><span class="emphasis"><i class=
1552 "EMPHASIS">Unset</i></span></p>
1554 <dt>Effect if unset:</dt>
1556 <p>Don't use SOCKS proxies.</p>
1560 <p>Multiple lines are OK, they are checked in sequence, and the
1561 last match wins.</p>
1562 <p>The difference between <tt class=
1563 "LITERAL">forward-socks4</tt> and <tt class=
1564 "LITERAL">forward-socks4a</tt> is that in the SOCKS 4A
1565 protocol, the DNS resolution of the target hostname happens on
1566 the SOCKS server, while in SOCKS 4 it happens locally.</p>
1567 <p>With <tt class="LITERAL">forward-socks5</tt> the DNS
1568 resolution will happen on the remote server as well.</p>
1569 <p><tt class="LITERAL">forward-socks5t</tt> works like vanilla
1570 <tt class="LITERAL">forward-socks5</tt> but lets <span class=
1571 "APPLICATION">Privoxy</span> additionally use Tor-specific
1572 SOCKS extensions. Currently the only supported SOCKS extension
1573 is optimistic data which can reduce the latency for the first
1574 request made on a newly created connection.</p>
1575 <p><tt class="REPLACEABLE"><i>socks_proxy</i></tt> and
1576 <tt class="REPLACEABLE"><i>http_parent</i></tt> can be a
1577 numerical IPv6 address (if <a href=
1578 "http://tools.ietf.org/html/rfc3493" target="_top">RFC 3493</a>
1579 is implemented). To prevent clashes with the port delimiter,
1580 the whole IP address has to be put into brackets. On the other
1581 hand a <tt class="REPLACEABLE"><i>target_pattern</i></tt>
1582 containing an IPv6 address has to be put into angle brackets
1583 (normal brackets are reserved for regular expressions
1585 <p>If <tt class="REPLACEABLE"><i>http_parent</i></tt> is
1586 <span class="QUOTE">"."</span>, then requests are not forwarded
1587 to another HTTP proxy but are made (HTTP-wise) directly to the
1588 web servers, albeit through a SOCKS proxy.</p>
1592 <p>From the company example.com, direct connections are made to
1593 all <span class="QUOTE">"internal"</span> domains, but
1594 everything outbound goes through their ISP's proxy by way of
1595 example.com's corporate SOCKS 4A gateway to the Internet.</p>
1596 <table border="0" bgcolor="#E0E0E0" width="90%">
1599 <pre class="SCREEN">
1600 forward-socks4a / socks-gw.example.com:1080 www-cache.isp.example.net:8080
1601 forward .example.com .</pre>
1605 <p>A rule that uses a SOCKS 4 gateway for all destinations but
1606 no HTTP parent looks like this:</p>
1607 <table border="0" bgcolor="#E0E0E0" width="90%">
1610 <pre class="SCREEN">
1611 forward-socks4 / socks-gw.example.com:1080 .</pre>
1615 <p>To chain Privoxy and Tor, both running on the same system,
1616 you would use something like:</p>
1617 <table border="0" bgcolor="#E0E0E0" width="90%">
1620 <pre class="SCREEN">
1621 forward-socks5t / 127.0.0.1:9050 .</pre>
1625 <p>Note that if you got Tor through one of the bundles, you may
1626 have to change the port from 9050 to 9150 (or even another
1627 one). For details, please check the documentation on the
1628 <a href="https://torproject.org/" target="_top">Tor
1630 <p>The public <span class="APPLICATION">Tor</span> network
1631 can't be used to reach your local network, if you need to
1632 access local servers you therefore might want to make some
1634 <table border="0" bgcolor="#E0E0E0" width="90%">
1637 <pre class="SCREEN"> forward 192.168.*.*/ .
1639 forward 127.*.*.*/ .</pre>
1643 <p>Unencrypted connections to systems in these address ranges
1644 will be as (un)secure as the local network is, but the
1645 alternative is that you can't reach the local network through
1646 <span class="APPLICATION">Privoxy</span> at all. Of course this
1647 may actually be desired and there is no reason to make these
1648 exceptions if you aren't sure you need them.</p>
1649 <p>If you also want to be able to reach servers in your local
1650 network by using their names, you will need additional
1651 exceptions that look like this:</p>
1652 <table border="0" bgcolor="#E0E0E0" width="90%">
1655 <pre class="SCREEN">
1656 forward localhost/ .</pre>
1665 <h4 class="SECT3"><a name="ADVANCED-FORWARDING-EXAMPLES" id=
1666 "ADVANCED-FORWARDING-EXAMPLES">7.5.3. Advanced Forwarding
1668 <p>If you have links to multiple ISPs that provide various special
1669 content only to their subscribers, you can configure multiple
1670 <span class="APPLICATION">Privoxies</span> which have connections to
1671 the respective ISPs to act as forwarders to each other, so that
1672 <span class="emphasis"><i class="EMPHASIS">your</i></span> users can
1673 see the internal content of all ISPs.</p>
1674 <p>Assume that host-a has a PPP connection to isp-a.example.net. And
1675 host-b has a PPP connection to isp-b.example.org. Both run
1676 <span class="APPLICATION">Privoxy</span>. Their forwarding
1677 configuration can look like this:</p>
1679 <table border="0" bgcolor="#E0E0E0" width="100%">
1682 <pre class="SCREEN"> forward / .
1683 forward .isp-b.example.net host-b:8118</pre>
1688 <table border="0" bgcolor="#E0E0E0" width="100%">
1691 <pre class="SCREEN"> forward / .
1692 forward .isp-a.example.org host-a:8118</pre>
1696 <p>Now, your users can set their browser's proxy to use either host-a
1697 or host-b and be able to browse the internal content of both isp-a
1699 <p>If you intend to chain <span class="APPLICATION">Privoxy</span>
1700 and <span class="APPLICATION">squid</span> locally, then chaining as
1701 <tt class="LITERAL">browser -> squid -> privoxy</tt> is the
1702 recommended way.</p>
1703 <p>Assuming that <span class="APPLICATION">Privoxy</span> and
1704 <span class="APPLICATION">squid</span> run on the same box, your
1705 <span class="APPLICATION">squid</span> configuration could then look
1707 <table border="0" bgcolor="#E0E0E0" width="100%">
1710 <pre class="SCREEN">
1711 # Define Privoxy as parent proxy (without ICP)
1712 cache_peer 127.0.0.1 parent 8118 7 no-query
1714 # Define ACL for protocol FTP
1717 # Do not forward FTP requests to Privoxy
1718 always_direct allow ftp
1720 # Forward all the rest to Privoxy
1721 never_direct allow all</pre>
1725 <p>You would then need to change your browser's proxy settings to
1726 <span class="APPLICATION">squid</span>'s address and port. Squid
1727 normally uses port 3128. If unsure consult <tt class=
1728 "LITERAL">http_port</tt> in <tt class="FILENAME">squid.conf</tt>.</p>
1729 <p>You could just as well decide to only forward requests you suspect
1730 of leading to Windows executables through a virus-scanning parent
1731 proxy, say, on <tt class="LITERAL">antivir.example.com</tt>, port
1733 <table border="0" bgcolor="#E0E0E0" width="100%">
1736 <pre class="SCREEN"> forward / .
1737 forward /.*\.(exe|com|dll|zip)$ antivir.example.com:8010</pre>
1743 <h4 class="SECT3"><a name="FORWARDED-CONNECT-RETRIES" id=
1744 "FORWARDED-CONNECT-RETRIES">7.5.4. forwarded-connect-retries</a></h4>
1745 <div class="VARIABLELIST">
1749 <p>How often Privoxy retries if a forwarded connection request
1752 <dt>Type of value:</dt>
1754 <p><tt class="REPLACEABLE"><i>Number of retries.</i></tt></p>
1756 <dt>Default value:</dt>
1758 <p><span class="emphasis"><i class="EMPHASIS">0</i></span></p>
1760 <dt>Effect if unset:</dt>
1762 <p>Connections forwarded through other proxies are treated like
1763 direct connections and no retry attempts are made.</p>
1768 "REPLACEABLE"><i>forwarded-connect-retries</i></tt> is mainly
1769 interesting for socks4a connections, where <span class=
1770 "APPLICATION">Privoxy</span> can't detect why the connections
1771 failed. The connection might have failed because of a DNS
1772 timeout in which case a retry makes sense, but it might also
1773 have failed because the server doesn't exist or isn't
1774 reachable. In this case the retry will just delay the
1775 appearance of Privoxy's error message.</p>
1776 <p>Note that in the context of this option, <span class=
1777 "QUOTE">"forwarded connections"</span> includes all connections
1778 that Privoxy forwards through other proxies. This option is not
1779 limited to the HTTP CONNECT method.</p>
1780 <p>Only use this option, if you are getting lots of
1781 forwarding-related error messages that go away when you try
1782 again manually. Start with a small value and check Privoxy's
1783 logfile from time to time, to see how many retries are usually
1788 <p>forwarded-connect-retries 1</p>
1795 <h2 class="SECT2"><a name="MISC" id="MISC">7.6. Miscellaneous</a></h2>
1797 <h4 class="SECT3"><a name="ACCEPT-INTERCEPTED-REQUESTS" id=
1798 "ACCEPT-INTERCEPTED-REQUESTS">7.6.1.
1799 accept-intercepted-requests</a></h4>
1800 <div class="VARIABLELIST">
1804 <p>Whether intercepted requests should be treated as valid.</p>
1806 <dt>Type of value:</dt>
1808 <p><tt class="REPLACEABLE"><i>0 or 1</i></tt></p>
1810 <dt>Default value:</dt>
1812 <p><span class="emphasis"><i class="EMPHASIS">0</i></span></p>
1814 <dt>Effect if unset:</dt>
1816 <p>Only proxy requests are accepted, intercepted requests are
1817 treated as invalid.</p>
1821 <p>If you don't trust your clients and want to force them to
1822 use <span class="APPLICATION">Privoxy</span>, enable this
1823 option and configure your packet filter to redirect outgoing
1824 HTTP connections into <span class=
1825 "APPLICATION">Privoxy</span>.</p>
1826 <p>Note that intercepting encrypted connections (HTTPS) isn't
1828 <p>Make sure that <span class="APPLICATION">Privoxy's</span>
1829 own requests aren't redirected as well. Additionally take care
1830 that <span class="APPLICATION">Privoxy</span> can't
1831 intentionally connect to itself, otherwise you could run into
1832 redirection loops if <span class="APPLICATION">Privoxy's</span>
1833 listening port is reachable by the outside or an attacker has
1834 access to the pages you visit.</p>
1835 <p>If you are running Privoxy as intercepting proxy without
1836 being able to intercept all client requests you may want to
1837 adjust the CGI templates to make sure they don't reference
1838 content from config.privoxy.org.</p>
1842 <p>accept-intercepted-requests 1</p>
1848 <h4 class="SECT3"><a name="ALLOW-CGI-REQUEST-CRUNCHING" id=
1849 "ALLOW-CGI-REQUEST-CRUNCHING">7.6.2.
1850 allow-cgi-request-crunching</a></h4>
1851 <div class="VARIABLELIST">
1855 <p>Whether requests to <span class=
1856 "APPLICATION">Privoxy's</span> CGI pages can be blocked or
1859 <dt>Type of value:</dt>
1861 <p><tt class="REPLACEABLE"><i>0 or 1</i></tt></p>
1863 <dt>Default value:</dt>
1865 <p><span class="emphasis"><i class="EMPHASIS">0</i></span></p>
1867 <dt>Effect if unset:</dt>
1869 <p><span class="APPLICATION">Privoxy</span> ignores block and
1870 redirect actions for its CGI pages.</p>
1874 <p>By default <span class="APPLICATION">Privoxy</span> ignores
1875 block or redirect actions for its CGI pages. Intercepting these
1876 requests can be useful in multi-user setups to implement
1877 fine-grained access control, but it can also render the
1878 complete web interface useless and make debugging problems
1879 painful if done without care.</p>
1880 <p>Don't enable this option unless you're sure that you really
1885 <p>allow-cgi-request-crunching 1</p>
1891 <h4 class="SECT3"><a name="SPLIT-LARGE-FORMS" id=
1892 "SPLIT-LARGE-FORMS">7.6.3. split-large-forms</a></h4>
1893 <div class="VARIABLELIST">
1897 <p>Whether the CGI interface should stay compatible with broken
1900 <dt>Type of value:</dt>
1902 <p><tt class="REPLACEABLE"><i>0 or 1</i></tt></p>
1904 <dt>Default value:</dt>
1906 <p><span class="emphasis"><i class="EMPHASIS">0</i></span></p>
1908 <dt>Effect if unset:</dt>
1910 <p>The CGI form generate long GET URLs.</p>
1914 <p><span class="APPLICATION">Privoxy's</span> CGI forms can
1915 lead to rather long URLs. This isn't a problem as far as the
1916 HTTP standard is concerned, but it can confuse clients with
1917 arbitrary URL length limitations.</p>
1918 <p>Enabling split-large-forms causes <span class=
1919 "APPLICATION">Privoxy</span> to divide big forms into smaller
1920 ones to keep the URL length down. It makes editing a lot less
1921 convenient and you can no longer submit all changes at once,
1922 but at least it works around this browser bug.</p>
1923 <p>If you don't notice any editing problems, there is no reason
1924 to enable this option, but if one of the submit buttons appears
1925 to be broken, you should give it a try.</p>
1929 <p>split-large-forms 1</p>
1935 <h4 class="SECT3"><a name="KEEP-ALIVE-TIMEOUT" id=
1936 "KEEP-ALIVE-TIMEOUT">7.6.4. keep-alive-timeout</a></h4>
1937 <div class="VARIABLELIST">
1941 <p>Number of seconds after which an open connection will no
1942 longer be reused.</p>
1944 <dt>Type of value:</dt>
1946 <p><tt class="REPLACEABLE"><i>Time in seconds.</i></tt></p>
1948 <dt>Default value:</dt>
1952 <dt>Effect if unset:</dt>
1954 <p>Connections are not kept alive.</p>
1958 <p>This option allows clients to keep the connection to
1959 <span class="APPLICATION">Privoxy</span> alive. If the server
1960 supports it, <span class="APPLICATION">Privoxy</span> will keep
1961 the connection to the server alive as well. Under certain
1962 circumstances this may result in speed-ups.</p>
1963 <p>By default, <span class="APPLICATION">Privoxy</span> will
1964 close the connection to the server if the client connection
1965 gets closed, or if the specified timeout has been reached
1966 without a new request coming in. This behaviour can be changed
1967 with the <a href="#CONNECTION-SHARING" target=
1968 "_top">connection-sharing</a> option.</p>
1969 <p>This option has no effect if <span class=
1970 "APPLICATION">Privoxy</span> has been compiled without
1971 keep-alive support.</p>
1972 <p>Note that a timeout of five seconds as used in the default
1973 configuration file significantly decreases the number of
1974 connections that will be reused. The value is used because some
1975 browsers limit the number of connections they open to a single
1976 host and apply the same limit to proxies. This can result in a
1977 single website <span class="QUOTE">"grabbing"</span> all the
1978 connections the browser allows, which means connections to
1979 other websites can't be opened until the connections currently
1980 in use time out.</p>
1981 <p>Several users have reported this as a Privoxy bug, so the
1982 default value has been reduced. Consider increasing it to 300
1983 seconds or even more if you think your browser can handle it.
1984 If your browser appears to be hanging, it probably can't.</p>
1988 <p>keep-alive-timeout 300</p>
1994 <h4 class="SECT3"><a name="TOLERATE-PIPELINING" id=
1995 "TOLERATE-PIPELINING">7.6.5. tolerate-pipelining</a></h4>
1996 <div class="VARIABLELIST">
2000 <p>Whether or not pipelined requests should be served.</p>
2002 <dt>Type of value:</dt>
2004 <p><tt class="REPLACEABLE"><i>0 or 1.</i></tt></p>
2006 <dt>Default value:</dt>
2010 <dt>Effect if unset:</dt>
2012 <p>If Privoxy receives more than one request at once, it
2013 terminates the client connection after serving the first
2018 <p><span class="APPLICATION">Privoxy</span> currently doesn't
2019 pipeline outgoing requests, thus allowing pipelining on the
2020 client connection is not guaranteed to improve the
2022 <p>By default <span class="APPLICATION">Privoxy</span> tries to
2023 discourage clients from pipelining by discarding aggressively
2024 pipelined requests, which forces the client to resend them
2025 through a new connection.</p>
2026 <p>This option lets <span class="APPLICATION">Privoxy</span>
2027 tolerate pipelining. Whether or not that improves performance
2028 mainly depends on the client configuration.</p>
2029 <p>If you are seeing problems with pages not properly loading,
2030 disabling this option could work around the problem.</p>
2034 <p>tolerate-pipelining 1</p>
2040 <h4 class="SECT3"><a name="DEFAULT-SERVER-TIMEOUT" id=
2041 "DEFAULT-SERVER-TIMEOUT">7.6.6. default-server-timeout</a></h4>
2042 <div class="VARIABLELIST">
2046 <p>Assumed server-side keep-alive timeout if not specified by
2049 <dt>Type of value:</dt>
2051 <p><tt class="REPLACEABLE"><i>Time in seconds.</i></tt></p>
2053 <dt>Default value:</dt>
2057 <dt>Effect if unset:</dt>
2059 <p>Connections for which the server didn't specify the
2060 keep-alive timeout are not reused.</p>
2064 <p>Enabling this option significantly increases the number of
2065 connections that are reused, provided the <a href=
2066 "#KEEP-ALIVE-TIMEOUT" target="_top">keep-alive-timeout</a>
2067 option is also enabled.</p>
2068 <p>While it also increases the number of connections problems
2069 when <span class="APPLICATION">Privoxy</span> tries to reuse a
2070 connection that already has been closed on the server side, or
2071 is closed while <span class="APPLICATION">Privoxy</span> is
2072 trying to reuse it, this should only be a problem if it happens
2073 for the first request sent by the client. If it happens for
2074 requests on reused client connections, <span class=
2075 "APPLICATION">Privoxy</span> will simply close the connection
2076 and the client is supposed to retry the request without
2077 bothering the user.</p>
2078 <p>Enabling this option is therefore only recommended if the
2079 <a href="#CONNECTION-SHARING" target=
2080 "_top">connection-sharing</a> option is disabled.</p>
2081 <p>It is an error to specify a value larger than the <a href=
2082 "#KEEP-ALIVE-TIMEOUT" target="_top">keep-alive-timeout</a>
2084 <p>This option has no effect if <span class=
2085 "APPLICATION">Privoxy</span> has been compiled without
2086 keep-alive support.</p>
2090 <p>default-server-timeout 60</p>
2096 <h4 class="SECT3"><a name="CONNECTION-SHARING" id=
2097 "CONNECTION-SHARING">7.6.7. connection-sharing</a></h4>
2098 <div class="VARIABLELIST">
2102 <p>Whether or not outgoing connections that have been kept
2103 alive should be shared between different incoming
2106 <dt>Type of value:</dt>
2108 <p><tt class="REPLACEABLE"><i>0 or 1</i></tt></p>
2110 <dt>Default value:</dt>
2114 <dt>Effect if unset:</dt>
2116 <p>Connections are not shared.</p>
2120 <p>This option has no effect if <span class=
2121 "APPLICATION">Privoxy</span> has been compiled without
2122 keep-alive support, or if it's disabled.</p>
2126 <p>Note that reusing connections doesn't necessary cause
2127 speedups. There are also a few privacy implications you should
2129 <p>If this option is effective, outgoing connections are shared
2130 between clients (if there are more than one) and closing the
2131 browser that initiated the outgoing connection does no longer
2132 affect the connection between <span class=
2133 "APPLICATION">Privoxy</span> and the server unless the client's
2134 request hasn't been completed yet.</p>
2135 <p>If the outgoing connection is idle, it will not be closed
2136 until either <span class="APPLICATION">Privoxy's</span> or the
2137 server's timeout is reached. While it's open, the server knows
2138 that the system running <span class=
2139 "APPLICATION">Privoxy</span> is still there.</p>
2140 <p>If there are more than one client (maybe even belonging to
2141 multiple users), they will be able to reuse each others
2142 connections. This is potentially dangerous in case of
2143 authentication schemes like NTLM where only the connection is
2144 authenticated, instead of requiring authentication for each
2146 <p>If there is only a single client, and if said client can
2147 keep connections alive on its own, enabling this option has
2148 next to no effect. If the client doesn't support connection
2149 keep-alive, enabling this option may make sense as it allows
2150 <span class="APPLICATION">Privoxy</span> to keep outgoing
2151 connections alive even if the client itself doesn't support
2153 <p>You should also be aware that enabling this option increases
2154 the likelihood of getting the "No server or forwarder data"
2155 error message, especially if you are using a slow connection to
2157 <p>This option should only be used by experienced users who
2158 understand the risks and can weight them against the
2163 <p>connection-sharing 1</p>
2169 <h4 class="SECT3"><a name="SOCKET-TIMEOUT" id="SOCKET-TIMEOUT">7.6.8.
2170 socket-timeout</a></h4>
2171 <div class="VARIABLELIST">
2175 <p>Number of seconds after which a socket times out if no data
2178 <dt>Type of value:</dt>
2180 <p><tt class="REPLACEABLE"><i>Time in seconds.</i></tt></p>
2182 <dt>Default value:</dt>
2186 <dt>Effect if unset:</dt>
2188 <p>A default value of 300 seconds is used.</p>
2192 <p>The default is quite high and you probably want to reduce
2193 it. If you aren't using an occasionally slow proxy like Tor,
2194 reducing it to a few seconds should be fine.</p>
2198 <p>socket-timeout 300</p>
2204 <h4 class="SECT3"><a name="MAX-CLIENT-CONNECTIONS" id=
2205 "MAX-CLIENT-CONNECTIONS">7.6.9. max-client-connections</a></h4>
2206 <div class="VARIABLELIST">
2210 <p>Maximum number of client connections that will be
2213 <dt>Type of value:</dt>
2215 <p><tt class="REPLACEABLE"><i>Positive number.</i></tt></p>
2217 <dt>Default value:</dt>
2221 <dt>Effect if unset:</dt>
2223 <p>Connections are served until a resource limit is
2228 <p><span class="APPLICATION">Privoxy</span> creates one thread
2229 (or process) for every incoming client connection that isn't
2230 rejected based on the access control settings.</p>
2231 <p>If the system is powerful enough, <span class=
2232 "APPLICATION">Privoxy</span> can theoretically deal with
2233 several hundred (or thousand) connections at the same time, but
2234 some operating systems enforce resource limits by shutting down
2235 offending processes and their default limits may be below the
2236 ones <span class="APPLICATION">Privoxy</span> would require
2237 under heavy load.</p>
2238 <p>Configuring <span class="APPLICATION">Privoxy</span> to
2239 enforce a connection limit below the thread or process limit
2240 used by the operating system makes sure this doesn't happen.
2241 Simply increasing the operating system's limit would work too,
2242 but if <span class="APPLICATION">Privoxy</span> isn't the only
2243 application running on the system, you may actually want to
2244 limit the resources used by <span class=
2245 "APPLICATION">Privoxy</span>.</p>
2246 <p>If <span class="APPLICATION">Privoxy</span> is only used by
2247 a single trusted user, limiting the number of client
2248 connections is probably unnecessary. If there are multiple
2249 possibly untrusted users you probably still want to
2250 additionally use a packet filter to limit the maximal number of
2251 incoming connections per client. Otherwise a malicious user
2252 could intentionally create a high number of connections to
2253 prevent other users from using <span class=
2254 "APPLICATION">Privoxy</span>.</p>
2255 <p>Obviously using this option only makes sense if you choose a
2256 limit below the one enforced by the operating system.</p>
2257 <p>One most POSIX-compliant systems <span class=
2258 "APPLICATION">Privoxy</span> can't properly deal with more than
2259 FD_SETSIZE file descriptors at the same time and has to reject
2260 connections if the limit is reached. This will likely change in
2261 a future version, but currently this limit can't be increased
2262 without recompiling <span class="APPLICATION">Privoxy</span>
2263 with a different FD_SETSIZE limit.</p>
2267 <p>max-client-connections 256</p>
2273 <h4 class="SECT3"><a name="HANDLE-AS-EMPTY-DOC-RETURNS-OK" id=
2274 "HANDLE-AS-EMPTY-DOC-RETURNS-OK">7.6.10.
2275 handle-as-empty-doc-returns-ok</a></h4>
2276 <div class="VARIABLELIST">
2280 <p>The status code Privoxy returns for pages blocked with
2281 <tt class="LITERAL"><a href=
2282 "actions-file.html#HANDLE-AS-EMPTY-DOCUMENT" target=
2283 "_top">+handle-as-empty-document</a></tt>.</p>
2285 <dt>Type of value:</dt>
2287 <p><tt class="REPLACEABLE"><i>0 or 1</i></tt></p>
2289 <dt>Default value:</dt>
2293 <dt>Effect if unset:</dt>
2295 <p>Privoxy returns a status 403(forbidden) for all blocked
2298 <dt>Effect if set:</dt>
2300 <p>Privoxy returns a status 200(OK) for pages blocked with
2301 +handle-as-empty-document and a status 403(Forbidden) for all
2302 other blocked pages.</p>
2306 <p>This directive was added as a work-around for Firefox bug
2307 492459: <span class="QUOTE">"Websites are no longer rendered if
2308 SSL requests for JavaScripts are blocked by a proxy."</span>
2309 (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=492459"
2311 "_top">https://bugzilla.mozilla.org/show_bug.cgi?id=492459</a>),
2312 the bug has been fixed for quite some time, but this directive
2313 is also useful to make it harder for websites to detect whether
2314 or not resources are being blocked.</p>
2320 <h4 class="SECT3"><a name="ENABLE-COMPRESSION" id=
2321 "ENABLE-COMPRESSION">7.6.11. enable-compression</a></h4>
2322 <div class="VARIABLELIST">
2326 <p>Whether or not buffered content is compressed before
2329 <dt>Type of value:</dt>
2331 <p><tt class="REPLACEABLE"><i>0 or 1</i></tt></p>
2333 <dt>Default value:</dt>
2337 <dt>Effect if unset:</dt>
2339 <p>Privoxy does not compress buffered content.</p>
2341 <dt>Effect if set:</dt>
2343 <p>Privoxy compresses buffered content before delivering it to
2344 the client, provided the client supports it.</p>
2348 <p>This directive is only supported if Privoxy has been
2349 compiled with FEATURE_COMPRESSION, which should not to be
2350 confused with FEATURE_ZLIB.</p>
2351 <p>Compressing buffered content is mainly useful if Privoxy and
2352 the client are running on different systems. If they are
2353 running on the same system, enabling compression is likely to
2354 slow things down. If you didn't measure otherwise, you should
2355 assume that it does and keep this option disabled.</p>
2356 <p>Privoxy will not compress buffered content below a certain
2363 <h4 class="SECT3"><a name="COMPRESSION-LEVEL" id=
2364 "COMPRESSION-LEVEL">7.6.12. compression-level</a></h4>
2365 <div class="VARIABLELIST">
2369 <p>The compression level that is passed to the zlib library
2370 when compressing buffered content.</p>
2372 <dt>Type of value:</dt>
2374 <p><tt class="REPLACEABLE"><i>Positive number ranging from 0 to
2377 <dt>Default value:</dt>
2383 <p>Compressing the data more takes usually longer than
2384 compressing it less or not compressing it at all. Which level
2385 is best depends on the connection between Privoxy and the
2386 client. If you can't be bothered to benchmark it for yourself,
2387 you should stick with the default and keep compression
2389 <p>If compression is disabled, the compression level is
2394 <table border="0" bgcolor="#E0E0E0" width="90%">
2397 <pre class="SCREEN">
2398 # Best speed (compared to the other levels)
2402 # No compression. Only useful for testing as the added header
2403 # slightly increases the amount of data that has to be sent.
2404 # If your benchmark shows that using this compression level
2405 # is superior to using no compression at all, the benchmark
2406 # is likely to be flawed.
2417 <h4 class="SECT3"><a name="CLIENT-HEADER-ORDER" id=
2418 "CLIENT-HEADER-ORDER">7.6.13. client-header-order</a></h4>
2419 <div class="VARIABLELIST">
2423 <p>The order in which client headers are sorted before
2424 forwarding them.</p>
2426 <dt>Type of value:</dt>
2428 <p><tt class="REPLACEABLE"><i>Client header names delimited by
2429 spaces or tabs</i></tt></p>
2431 <dt>Default value:</dt>
2437 <p>By default <span class="APPLICATION">Privoxy</span> leaves
2438 the client headers in the order they were sent by the client.
2439 Headers are modified in-place, new headers are added at the end
2440 of the already existing headers.</p>
2441 <p>The header order can be used to fingerprint client requests
2442 independently of other headers like the User-Agent.</p>
2443 <p>This directive allows to sort the headers differently to
2444 better mimic a different User-Agent. Client headers will be
2445 emitted in the order given, headers whose name isn't explicitly
2446 specified are added at the end.</p>
2447 <p>Note that sorting headers in an uncommon way will make
2448 fingerprinting actually easier. Encrypted headers are not
2449 affected by this directive.</p>
2455 <h4 class="SECT3"><a name="CLIENT-SPECIFIC-TAG" id=
2456 "CLIENT-SPECIFIC-TAG">7.6.14. client-specific-tag</a></h4>
2457 <div class="VARIABLELIST">
2461 <p>The name of a tag that will always be set for clients that
2462 requested it through the webinterface.</p>
2464 <dt>Type of value:</dt>
2466 <p><tt class="REPLACEABLE"><i>Tag name followed by a
2467 description that will be shown in the webinterface</i></tt></p>
2469 <dt>Default value:</dt>
2475 <div class="WARNING">
2476 <table class="WARNING" border="1" width="90%">
2478 <td align="center"><b>Warning</b></td>
2482 <p>This is an experimental feature. The syntax is
2483 likely to change in future versions.</p>
2488 <p>Client-specific tags allow Privoxy admins to create
2489 different profiles and let the users chose which one they want
2490 without impacting other users.</p>
2491 <p>One use case is allowing users to circumvent certain blocks
2492 without having to allow them to circumvent all blocks. This is
2493 not possible with the <a href=
2494 "config.html#ENABLE-REMOTE-TOGGLE">enable-remote-toggle
2495 feature</a> because it would bluntly disable all blocks for all
2496 users and also affect other actions like filters. It also is
2497 set globally which renders it useless in most multi-user
2499 <p>After a client-specific tag has been defined with the
2500 client-specific-tag directive, action sections can be activated
2501 based on the tag by using a <a href=
2502 "actions-file.html#CLIENT-TAG-PATTERN" target=
2503 "_top">CLIENT-TAG</a> pattern. The CLIENT-TAG pattern is
2504 evaluated at the same priority as URL patterns, as a result the
2505 last matching pattern wins. Tags that are created based on
2506 client or server headers are evaluated later on and can
2507 overrule CLIENT-TAG and URL patterns!</p>
2508 <p>The tag is set for all requests that come from clients that
2509 requested it to be set. Note that "clients" are differentiated
2510 by IP address, if the IP address changes the tag has to be
2511 requested again.</p>
2512 <p>Clients can request tags to be set by using the CGI
2513 interface <a href="http://config.privoxy.org/client-tags"
2514 target="_top">http://config.privoxy.org/client-tags</a>. The
2515 specific tag description is only used on the web page and
2516 should be phrased in away that the user understand the effect
2521 <table border="0" bgcolor="#E0E0E0" width="90%">
2524 <pre class="SCREEN">
2525 # Define a couple of tags, the described effect requires action sections
2526 # that are enabled based on CLIENT-TAG patterns.
2527 client-specific-tag circumvent-blocks Overrule blocks but do not affect other actions
2528 disable-content-filters Disable content-filters but do not affect other actions
2538 <h4 class="SECT3"><a name="CLIENT-TAG-LIFETIME" id=
2539 "CLIENT-TAG-LIFETIME">7.6.15. client-tag-lifetime</a></h4>
2540 <div class="VARIABLELIST">
2544 <p>How long a temporarily enabled tag remains enabled.</p>
2546 <dt>Type of value:</dt>
2548 <p><tt class="REPLACEABLE"><i>Time in seconds.</i></tt></p>
2550 <dt>Default value:</dt>
2556 <div class="WARNING">
2557 <table class="WARNING" border="1" width="90%">
2559 <td align="center"><b>Warning</b></td>
2563 <p>This is an experimental feature. The syntax is
2564 likely to change in future versions.</p>
2569 <p>In case of some tags users may not want to enable them
2570 permanently, but only for a short amount of time, for example
2571 to circumvent a block that is the result of an overly-broad URL
2573 <p>The CGI interface <a href=
2574 "http://config.privoxy.org/client-tags" target=
2575 "_top">http://config.privoxy.org/client-tags</a> therefore
2576 provides a "enable this tag temporarily" option. If it is used,
2577 the tag will be set until the client-tag-lifetime is over.</p>
2581 <table border="0" bgcolor="#E0E0E0" width="90%">
2584 <pre class="SCREEN">
2585 # Increase the time to life for temporarily enabled tags to 3 minutes
2586 client-tag-lifetime 180
2596 <h4 class="SECT3"><a name="TRUST-X-FORWARDED-FOR" id=
2597 "TRUST-X-FORWARDED-FOR">7.6.16. trust-x-forwarded-for</a></h4>
2598 <div class="VARIABLELIST">
2602 <p>Whether or not Privoxy should use IP addresses specified
2603 with the X-Forwarded-For header</p>
2605 <dt>Type of value:</dt>
2607 <p><tt class="REPLACEABLE"><i>0 or one</i></tt></p>
2609 <dt>Default value:</dt>
2615 <div class="WARNING">
2616 <table class="WARNING" border="1" width="90%">
2618 <td align="center"><b>Warning</b></td>
2622 <p>This is an experimental feature. The syntax is
2623 likely to change in future versions.</p>
2628 <p>If clients reach Privoxy through another proxy, for example
2629 a load balancer, Privoxy can't tell the client's IP address
2630 from the connection. If multiple clients use the same proxy,
2631 they will share the same client tag settings which is usually
2633 <p>This option lets Privoxy use the X-Forwarded-For header
2634 value as client IP address. If the proxy sets the header,
2635 multiple clients using the same proxy do not share the same
2636 client tag settings.</p>
2637 <p>This option should only be enabled if Privoxy can only be
2638 reached through a proxy and if the proxy can be trusted to set
2639 the header correctly. It is recommended that ACL are used to
2640 make sure only trusted systems can reach Privoxy.</p>
2641 <p>If access to Privoxy isn't limited to trusted systems, this
2642 option would allow malicious clients to change the client tags
2643 for other clients or increase Privoxy's memory requirements by
2644 registering lots of client tag settings for clients that don't
2649 <table border="0" bgcolor="#E0E0E0" width="90%">
2652 <pre class="SCREEN">
2653 # Allow systems that can reach Privoxy to provide the client
2654 # IP address with a X-Forwarded-For header.
2655 trust-x-forwarded-for 1
2666 <h2 class="SECT2"><a name="WINDOWS-GUI" id="WINDOWS-GUI">7.7. Windows
2667 GUI Options</a></h2>
2668 <p><span class="APPLICATION">Privoxy</span> has a number of options
2669 specific to the Windows GUI interface:</p><a name="ACTIVITY-ANIMATION"
2670 id="ACTIVITY-ANIMATION"></a>
2671 <p>If <span class="QUOTE">"activity-animation"</span> is set to 1, the
2672 <span class="APPLICATION">Privoxy</span> icon will animate when
2673 <span class="QUOTE">"Privoxy"</span> is active. To turn off, set to
2675 <p class="LITERALLAYOUT"><tt class="LITERAL"> <span class=
2676 "emphasis"><i class="EMPHASIS">activity-animation 1</i></span><br>
2677 </tt></p><a name="LOG-MESSAGES" id=
2679 <p>If <span class="QUOTE">"log-messages"</span> is set to 1,
2680 <span class="APPLICATION">Privoxy</span> copies log messages to the
2681 console window. The log detail depends on the <a href=
2682 "config.html#DEBUG">debug</a> directive.</p>
2683 <p class="LITERALLAYOUT"><tt class="LITERAL"> <span class=
2684 "emphasis"><i class="EMPHASIS">log-messages 1</i></span><br>
2685 </tt></p><a name="LOG-BUFFER-SIZE" id=
2686 "LOG-BUFFER-SIZE"></a>
2687 <p>If <span class="QUOTE">"log-buffer-size"</span> is set to 1, the
2688 size of the log buffer, i.e. the amount of memory used for the log
2689 messages displayed in the console window, will be limited to
2690 <span class="QUOTE">"log-max-lines"</span> (see below).</p>
2691 <p>Warning: Setting this to 0 will result in the buffer to grow
2692 infinitely and eat up all your memory!</p>
2693 <p class="LITERALLAYOUT"><tt class="LITERAL"> <span class=
2694 "emphasis"><i class="EMPHASIS">log-buffer-size 1</i></span><br>
2695 </tt></p><a name="LOG-MAX-LINES" id=
2696 "LOG-MAX-LINES"></a>
2697 <p><span class="APPLICATION">log-max-lines</span> is the maximum number
2698 of lines held in the log buffer. See above.</p>
2699 <p class="LITERALLAYOUT"><tt class="LITERAL"> <span class=
2700 "emphasis"><i class="EMPHASIS">log-max-lines 200</i></span><br>
2701 </tt></p><a name="LOG-HIGHLIGHT-MESSAGES" id=
2702 "LOG-HIGHLIGHT-MESSAGES"></a>
2703 <p>If <span class="QUOTE">"log-highlight-messages"</span> is set to 1,
2704 <span class="APPLICATION">Privoxy</span> will highlight portions of the
2705 log messages with a bold-faced font:</p>
2706 <p class="LITERALLAYOUT"><tt class="LITERAL"> <span class=
2707 "emphasis"><i class="EMPHASIS">log-highlight-messages 1</i></span><br>
2708 </tt></p><a name="LOG-FONT-NAME" id=
2709 "LOG-FONT-NAME"></a>
2710 <p>The font used in the console window:</p>
2711 <p class="LITERALLAYOUT"><tt class="LITERAL"> <span class=
2712 "emphasis"><i class="EMPHASIS">log-font-name Comic Sans
2714 </tt></p><a name="LOG-FONT-SIZE" id=
2715 "LOG-FONT-SIZE"></a>
2716 <p>Font size used in the console window:</p>
2717 <p class="LITERALLAYOUT"><tt class="LITERAL"> <span class=
2718 "emphasis"><i class="EMPHASIS">log-font-size 8</i></span><br>
2719 </tt></p><a name="SHOW-ON-TASK-BAR" id=
2720 "SHOW-ON-TASK-BAR"></a>
2721 <p><span class="QUOTE">"show-on-task-bar"</span> controls whether or
2722 not <span class="APPLICATION">Privoxy</span> will appear as a button on
2723 the Task bar when minimized:</p>
2724 <p class="LITERALLAYOUT"><tt class="LITERAL"> <span class=
2725 "emphasis"><i class="EMPHASIS">show-on-task-bar 0</i></span><br>
2726 </tt></p><a name="CLOSE-BUTTON-MINIMIZES" id=
2727 "CLOSE-BUTTON-MINIMIZES"></a>
2728 <p>If <span class="QUOTE">"close-button-minimizes"</span> is set to 1,
2729 the Windows close button will minimize <span class=
2730 "APPLICATION">Privoxy</span> instead of closing the program (close with
2731 the exit option on the File menu).</p>
2732 <p class="LITERALLAYOUT"><tt class="LITERAL"> <span class=
2733 "emphasis"><i class="EMPHASIS">close-button-minimizes 1</i></span><br>
2734 </tt></p><a name="HIDE-CONSOLE" id=
2736 <p>The <span class="QUOTE">"hide-console"</span> option is specific to
2737 the MS-Win console version of <span class="APPLICATION">Privoxy</span>.
2738 If this option is used, <span class="APPLICATION">Privoxy</span> will
2739 disconnect from and hide the command console.</p>
2740 <p class="LITERALLAYOUT"><tt class="LITERAL"> #<span class=
2741 "emphasis"><i class="EMPHASIS">hide-console</i></span><br>
2742 </tt></p>
2745 <div class="NAVFOOTER">
2746 <hr align="left" width="100%">
2747 <table summary="Footer navigation table" width="100%" border="0"
2748 cellpadding="0" cellspacing="0">
2750 <td width="33%" align="left" valign="top"><a href=
2751 "configuration.html" accesskey="P">Prev</a></td>
2752 <td width="34%" align="center" valign="top"><a href="index.html"
2753 accesskey="H">Home</a></td>
2754 <td width="33%" align="right" valign="top"><a href=
2755 "actions-file.html" accesskey="N">Next</a></td>
2758 <td width="33%" align="left" valign="top">Privoxy Configuration</td>
2759 <td width="34%" align="center" valign="top"> </td>
2760 <td width="33%" align="right" valign="top">Actions Files</td>