1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
5 >The Main Configuration File</TITLE
8 CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
10 TITLE="Privoxy 3.0.18 User Manual"
11 HREF="index.html"><LINK
13 TITLE="Privoxy Configuration"
14 HREF="configuration.html"><LINK
17 HREF="actions-file.html"><LINK
20 HREF="../p_doc.css"><META
21 HTTP-EQUIV="Content-Type"
24 <LINK REL="STYLESHEET" TYPE="text/css" HREF="p_doc.css">
36 SUMMARY="Header navigation table"
45 >Privoxy 3.0.18 User Manual</TH
53 HREF="configuration.html"
67 HREF="actions-file.html"
82 >7. The Main Configuration File</A
85 > By default, the main configuration file is named <TT
89 with the exception of Windows, where it is named <TT
93 Configuration lines consist of an initial keyword followed by a list of
94 values, all separated by whitespace (any number of spaces or tabs). For
100 CLASS="LITERALLAYOUT"
105 >confdir /etc/privoxy</I
112 > Assigns the value <TT
119 > and thus indicates that the configuration
120 directory is named <SPAN
122 >"/etc/privoxy/"</SPAN
125 > All options in the config file except for <TT
132 > are optional. Watch out in the below description
133 for what happens if you leave them unset.</P
135 > The main config file controls all aspects of <SPAN
139 operation that are not location dependent (i.e. they apply universally, no matter
140 where you may be surfing). Like the filter and action files, the config file is
141 a plain text file and can be modified with a text editor like emacs, vim or
149 >7.1. Local Set-up Documentation</A
152 > If you intend to operate <SPAN
156 than just yourself, it might be a good idea to let them know how to reach
157 you, what you block and why you do that, your policies, etc.
165 >7.1.1. user-manual</A
176 > Location of the <SPAN
186 >A fully qualified URI</P
201 >Effect if unset:</DT
205 HREF="http://www.privoxy.org/user-manual/"
207 >http://www.privoxy.org/<TT
214 will be used, where <TT
229 > The User Manual URI is the single best source of information on
233 >, and is used for help links from some
234 of the internal CGI pages. The manual itself is normally packaged with the
235 binary distributions, so you probably want to set this to a locally
242 > The best all purpose solution is simply to put the full local
261 > user-manual /usr/share/doc/privoxy/user-manual</PRE
268 > The User Manual is then available to anyone with access to
272 >, by following the built-in URL:
275 >http://config.privoxy.org/user-manual/</TT
277 (or the shortcut: <TT
279 >http://p.p/user-manual/</TT
283 > If the documentation is not on the local system, it can be accessed
284 from a remote server, as:
295 > user-manual http://example.com/privoxy/user-manual/</PRE
320 > If set, this option should be <SPAN
324 >the first option in the config
327 >, because it is used while the config file is being read
343 NAME="TRUST-INFO-URL"
344 >7.1.2. trust-info-url</A
355 > A URL to be displayed in the error page that users will see if access to an untrusted page is denied.
377 >Effect if unset:</DT
380 > No links are displayed on the "untrusted" error page.
387 > The value of this option only matters if the experimental trust mechanism has been
389 HREF="config.html#TRUSTFILE"
400 > If you use the trust mechanism, it is a good idea to write up some on-line
401 documentation about your trust policy and to specify the URL(s) here.
402 Use multiple times for multiple URLs.
405 > The URL(s) should be added to the trustfile as well, so users don't end up
406 locked out from the information on why they were locked out in the first place!
418 >7.1.3. admin-address</A
429 > An email address to reach the <SPAN
454 >Effect if unset:</DT
457 > No email address is displayed on error pages and the CGI user interface.
471 are unset, the whole "Local Privoxy Support" box on all generated pages will
483 NAME="PROXY-INFO-URL"
484 >7.1.4. proxy-info-url</A
495 > A URL to documentation about the local <SPAN
499 configuration or policies.
521 >Effect if unset:</DT
524 > No link to local documentation is displayed on error pages and the CGI user interface.
538 are unset, the whole "Local Privoxy Support" box on all generated pages will
542 > This URL shouldn't be blocked ;-)
555 >7.2. Configuration and Log File Locations</A
561 > can (and normally does) use a number of
562 other files for additional configuration, help and logging.
563 This section of the configuration file tells <SPAN
567 where to find those other files. </P
569 > The user running <SPAN
573 permission for all configuration files, and write permission to any files
574 that would be modified, such as log files and actions files.</P
592 >The directory where the other configuration files are located.</P
604 >/etc/privoxy (Unix) <SPAN
613 > installation dir (Windows) </P
616 >Effect if unset:</DT
660 >An alternative directory where the templates are loaded from.</P
675 >Effect if unset:</DT
678 >The templates are assumed to be located in confdir/template.</P
687 > original templates are usually
688 overwritten with each update. Use this option to relocate customized
689 templates that should be kept. As template variables might change
690 between updates, you shouldn't expect templates to work with
694 > releases other than the one
695 they were part of, though.
718 > The directory where all logging takes place
735 >/var/log/privoxy (Unix) <SPAN
744 > installation dir (Windows) </P
747 >Effect if unset:</DT
780 >7.2.4. actionsfile</A
783 NAME="DEFAULT.ACTION"
786 NAME="STANDARD.ACTION"
801 HREF="actions-file.html"
810 >Complete file name, relative to <TT
826 CLASS="LITERALLAYOUT"
827 > match-all.action # Actions that are applied to all sites and maybe overruled later on.</P
834 CLASS="LITERALLAYOUT"
835 > default.action # Main actions file</P
842 CLASS="LITERALLAYOUT"
843 > user.action # User customizations</P
853 >Effect if unset:</DT
856 > No actions are taken at all. More or less neutral proxying.
866 > lines are permitted, and are in fact recommended!
870 The default values are <TT
877 > actions file maintained by the developers, and
881 >, where you can make your personal additions.
885 Actions files contain all the per site and per URL configuration for
886 ad blocking, cookie management, privacy considerations, etc.
887 There is no point in using <SPAN
891 least one actions file.
894 > Note that since Privoxy 3.0.7, the complete filename, including the <SPAN
898 extension has to be specified. The syntax change was necessary to be consistent
899 with the other file options and to allow previously forbidden characters.
911 >7.2.5. filterfile</A
914 NAME="DEFAULT.FILTER"
926 HREF="filter-file.html"
935 >File name, relative to <TT
944 >default.filter (Unix) <SPAN
950 > default.filter.txt (Windows)</P
953 >Effect if unset:</DT
956 > No textual content filtering takes place, i.e. all
960 HREF="actions-file.html#FILTER"
969 actions in the actions files are turned neutral.
979 > lines are permitted.
983 HREF="filter-file.html"
985 > contain content modification
987 HREF="appendix.html#REGEX"
988 >regular expressions</A
989 >. These rules permit
990 powerful changes on the content of Web pages, and optionally the headers
991 as well, e.g., you could try to disable your favorite JavaScript annoyances,
992 re-write the actual displayed text, or just have some fun
993 playing buzzword bingo with web pages.
1000 HREF="actions-file.html#FILTER"
1009 actions rely on the relevant filter (<TT
1015 to be defined in a filter file!
1018 > A pre-defined filter file called <TT
1022 a number of useful filters for common problems is included in the distribution.
1023 See the section on the <TT
1026 HREF="actions-file.html#FILTER"
1033 > It is recommended to place any locally adapted filters into a separate
1054 CLASS="VARIABLELIST"
1060 > The log file to use
1067 >File name, relative to <TT
1080 >Unset (commented out)</I
1082 >. When activated: logfile (Unix) <SPAN
1088 > privoxy.log (Windows).</P
1091 >Effect if unset:</DT
1094 > No logfile is written.
1101 > The logfile is where all logging and error messages are written. The level
1102 of detail and number of messages are set with the <TT
1106 option (see below). The logfile can be useful for tracking down a problem with
1110 > (e.g., it's not blocking an ad you
1111 think it should block) and it can help you to monitor what your browser
1115 > Depending on the debug options below, the logfile may be a privacy risk
1116 if third parties can get access to it. As most users will never look
1120 > 3.0.7 and later only log fatal
1124 > For most troubleshooting purposes, you will have to change that,
1125 please refer to the debugging section for details.
1128 > Your logfile will grow indefinitely, and you will probably want to
1129 periodically remove it. On Unix systems, you can do this with a cron job
1133 >). For Red Hat based Linux distributions, a
1137 > script has been included.
1140 > Any log files must be writable by whatever user <SPAN
1144 is being run as (on Unix, default user id is <SPAN
1159 >7.2.7. trustfile</A
1164 CLASS="VARIABLELIST"
1170 > The name of the trust file to use
1177 >File name, relative to <TT
1190 >Unset (commented out)</I
1192 >. When activated: trust (Unix) <SPAN
1198 > trust.txt (Windows)</P
1201 >Effect if unset:</DT
1204 > The entire trust mechanism is disabled.
1211 > The trust mechanism is an experimental feature for building white-lists and should
1212 be used with care. It is <SPAN
1218 > recommended for the casual user.
1221 > If you specify a trust file, <SPAN
1225 access to sites that are specified in the trustfile. Sites can be listed
1232 > character limits access to this site
1233 only (and any sub-paths within this site), e.g.
1236 >~www.example.com</TT
1240 >~www.example.com/features/news.html</TT
1244 > Or, you can designate sites as <SPAN
1248 >trusted referrers</I
1251 prepending the name with a <TT
1254 > character. The effect is that
1255 access to untrusted sites will be granted -- but only if a link from this
1256 trusted referrer was used to get there. The link target will then be added
1260 > so that future, direct accesses will be
1261 granted. Sites added via this mechanism do not become trusted referrers
1262 themselves (i.e. they are added with a <TT
1266 There is a limit of 512 such entries, after which new entries will not be
1270 > If you use the <TT
1273 > operator in the trust file, it may grow
1274 considerably over time.
1277 > It is recommended that <SPAN
1283 >--disable-force</TT
1286 >--disable-toggle</TT
1290 > --disable-editor</TT
1291 > options, if this feature is to be
1295 > Possible applications include limiting Internet access for children.
1311 > These options are mainly useful when tracing a problem.
1312 Note that you might also want to invoke
1320 command line option when debugging.
1333 CLASS="VARIABLELIST"
1339 > Key values that determine what information gets logged.
1352 >0 (i.e.: only fatal errors (that cause Privoxy to exit) are logged)</P
1355 >Effect if unset:</DT
1358 > Default value is used (see above).
1365 > The available debug levels are:
1375 CLASS="PROGRAMLISTING"
1376 > debug 1 # Log the destination for each request <SPAN
1379 > let through. See also debug 1024.
1380 debug 2 # show each connection status
1381 debug 4 # show I/O status
1382 debug 8 # show header parsing
1383 debug 16 # log all data written to the network
1384 debug 32 # debug force feature
1385 debug 64 # debug regular expression filters
1386 debug 128 # debug redirects
1387 debug 256 # debug GIF de-animation
1388 debug 512 # Common Log Format
1389 debug 1024 # Log the destination for requests <SPAN
1392 > didn't let through, and the reason why.
1393 debug 2048 # CGI user interface
1394 debug 4096 # Startup banner and warnings.
1395 debug 8192 # Non-fatal errors
1396 debug 32768 # log all data read from the network</PRE
1403 > To select multiple debug levels, you can either add them or use
1410 > A debug level of 1 is informative because it will show you each request
1411 as it happens. <SPAN
1415 >1, 1024, 4096 and 8192 are recommended</I
1418 so that you will notice when things go wrong. The other levels are
1419 probably only of interest if you are hunting down a specific problem.
1420 They can produce a hell of an output (especially 16).
1427 > used to ship with the debug levels recommended above enabled by
1428 default, but due to privacy concerns 3.0.7 and later are configured to
1429 only log fatal errors.
1432 > If you are used to the more verbose settings, simply enable the debug lines
1436 > If you want to use pure CLF (Common Log Format), you should set <SPAN
1446 > and not enable anything else.
1452 > has a hard-coded limit for the
1453 length of log messages. If it's reached, messages are logged truncated
1454 and marked with <SPAN
1456 >"... [too long, truncated]"</SPAN
1460 > Please don't file any support requests without trying to reproduce
1461 the problem with increased debug level first. Once you read the log
1462 messages, you may even be able to solve the problem on your own.
1473 NAME="SINGLE-THREADED"
1474 >7.3.2. single-threaded</A
1479 CLASS="VARIABLELIST"
1485 > Whether to run only one server thread.
1513 >Effect if unset:</DT
1516 > Multi-threaded (or, where unavailable: forked) operation, i.e. the ability to
1517 serve multiple requests simultaneously.
1524 > This option is only there for debugging purposes.
1529 >It will drastically reduce performance.</I
1548 CLASS="VARIABLELIST"
1554 > The hostname shown on the CGI pages.
1576 >Effect if unset:</DT
1579 > The hostname provided by the operating system is used.
1586 > On some misconfigured systems resolving the hostname fails or
1587 takes too much time and slows Privoxy down. Setting a fixed hostname
1588 works around the problem.
1591 > In other circumstances it might be desirable to show a hostname
1592 other than the one returned by the operating system. For example
1593 if the system has several different hostnames and you don't want
1594 to use the first one.
1597 > Note that Privoxy does not validate the specified hostname value.
1609 NAME="ACCESS-CONTROL"
1610 >7.4. Access Control and Security</A
1613 > This section of the config file controls the security-relevant aspects
1624 NAME="LISTEN-ADDRESS"
1625 >7.4.1. listen-address</A
1630 CLASS="VARIABLELIST"
1636 > The address and TCP port on which <SPAN
1640 listen for client requests.
1678 >Effect if unset:</DT
1681 > Bind to 127.0.0.1 (IPv4 localhost), port 8118. This is suitable and
1682 recommended for home users who run <SPAN
1686 the same machine as their browser.
1693 > You will need to configure your browser(s) to this proxy address and port.
1696 > If you already have another service running on port 8118, or if you want to
1697 serve requests from other machines (e.g. on your local network) as well, you
1698 will need to override the default.
1701 > You can use this statement multiple times to make
1705 > listen on more ports or more
1709 > addresses. Suitable if your operating system does not
1710 support sharing <ABBR
1720 > If a hostname is used instead of an IP address, <SPAN
1724 will try to resolve it to an IP address and if there are multiple, use the first
1728 > If the address for the hostname isn't already known on the system
1729 (for example because it's in /etc/hostname), this may result in DNS
1733 > If the specified address isn't available on the system, or if the
1734 hostname can't be resolved, <SPAN
1741 > IPv6 addresses containing colons have to be quoted by brackets.
1742 They can only be used if <SPAN
1746 been compiled with IPv6 support. If you aren't sure if your version
1747 supports it, have a look at
1750 >http://config.privoxy.org/show-status</TT
1754 > Some operating systems will prefer IPv6 to IPv4 addresses even if the
1755 system has no IPv6 connectivity which is usually not expected by the user.
1756 Some even rely on DNS to resolve localhost which mean the "localhost" address
1757 used may not actually be local.
1760 > It is therefore recommended to explicitly configure the intended IP address
1761 instead of relying on the operating system, unless there's a strong reason not to.
1764 > If you leave out the address, <SPAN
1768 IPv4 interfaces (addresses) on your machine and may become reachable from the
1769 Internet and/or the local network. Be aware that some GNU/Linux distributions
1770 modify that behaviour without updating the documentation. Check for non-standard
1771 patches if your <SPAN
1774 >version behaves differently.
1777 > If you configure <SPAN
1780 >to be reachable from the
1781 network, consider using <A
1782 HREF="config.html#ACLS"
1783 >access control lists</A
1785 (ACL's, see below), and/or a firewall.
1791 > to untrusted users, you will
1792 also want to make sure that the following actions are disabled: <TT
1795 HREF="config.html#ENABLE-EDIT-ACTIONS"
1796 >enable-edit-actions</A
1802 HREF="config.html#ENABLE-REMOTE-TOGGLE"
1803 >enable-remote-toggle</A
1808 > With the exception noted above, listening on multiple addresses is currently
1809 not supported by <SPAN
1813 It can be done on most operating systems by letting a packet filter
1814 redirect request for certain addresses to Privoxy, though.
1821 > Suppose you are running <SPAN
1825 a machine which has the address 192.168.0.1 on your local private network
1826 (192.168.0.0) and has another outside connection with a different address.
1827 You want it to serve requests from inside only:
1837 CLASS="PROGRAMLISTING"
1838 > listen-address 192.168.0.1:8118</PRE
1845 > Suppose you are running <SPAN
1849 IPv6-capable machine and you want it to listen on the IPv6 address
1850 of the loopback device:
1860 CLASS="PROGRAMLISTING"
1861 > listen-address [::1]:8118</PRE
1882 CLASS="VARIABLELIST"
1888 > Initial state of "toggle" status
1904 >Effect if unset:</DT
1907 > Act as if toggled on
1914 > If set to 0, <SPAN
1920 >"toggled off"</SPAN
1921 > mode, i.e. mostly behave like a normal,
1922 content-neutral proxy with both ad blocking and content filtering
1925 >enable-remote-toggle</TT
1929 > The windows version will only display the toggle icon in the system tray
1930 if this option is present.
1941 NAME="ENABLE-REMOTE-TOGGLE"
1942 >7.4.3. enable-remote-toggle</A
1947 CLASS="VARIABLELIST"
1953 > Whether or not the <A
1954 HREF="http://config.privoxy.org/toggle"
1974 >Effect if unset:</DT
1977 > The web-based toggle feature is disabled.
1984 > When toggled off, <SPAN
1987 > mostly acts like a normal,
1988 content-neutral proxy, i.e. doesn't block ads or filter content.
1991 > Access to the toggle feature can <SPAN
1998 controlled separately by <SPAN
2001 > or HTTP authentication,
2002 so that everybody who can access <SPAN
2013 toggle it for all users. So this option is <SPAN
2020 for multi-user environments with untrusted users.
2023 > Note that malicious client side code (e.g Java) is also
2024 capable of using this option.
2031 documentation, this feature is disabled by default.
2034 > Note that you must have compiled <SPAN
2038 support for this feature, otherwise this option has no effect.
2049 NAME="ENABLE-REMOTE-HTTP-TOGGLE"
2050 >7.4.4. enable-remote-http-toggle</A
2055 CLASS="VARIABLELIST"
2061 > Whether or not Privoxy recognizes special HTTP headers to change its behaviour.
2077 >Effect if unset:</DT
2080 > Privoxy ignores special HTTP headers.
2087 > When toggled on, the client can change <SPAN
2091 behaviour by setting special HTTP headers. Currently the only supported
2092 special header is <SPAN
2094 >"X-Filter: No"</SPAN
2095 >, to disable filtering for
2096 the ongoing request, even if it is enabled in one of the action files.
2099 > This feature is disabled by default. If you are using
2103 > in a environment with trusted clients,
2104 you may enable this feature at your discretion. Note that malicious client
2105 side code (e.g Java) is also capable of using this feature.
2108 > This option will be removed in future releases as it has been obsoleted
2109 by the more general header taggers.
2120 NAME="ENABLE-EDIT-ACTIONS"
2121 >7.4.5. enable-edit-actions</A
2126 CLASS="VARIABLELIST"
2132 > Whether or not the <A
2133 HREF="http://config.privoxy.org/show-status"
2153 >Effect if unset:</DT
2156 > The web-based actions file editor is disabled.
2163 > Access to the editor can <SPAN
2170 controlled separately by <SPAN
2173 > or HTTP authentication,
2174 so that everybody who can access <SPAN
2185 modify its configuration for all users.
2188 > This option is <SPAN
2195 with untrusted users and as a lot of <SPAN
2199 users don't read documentation, this feature is disabled by default.
2202 > Note that malicious client side code (e.g Java) is also
2203 capable of using the actions editor and you shouldn't enable
2204 this options unless you understand the consequences and are
2205 sure your browser is configured correctly.
2208 > Note that you must have compiled <SPAN
2212 support for this feature, otherwise this option has no effect.
2223 NAME="ENFORCE-BLOCKS"
2224 >7.4.6. enforce-blocks</A
2229 CLASS="VARIABLELIST"
2235 > Whether the user is allowed to ignore blocks and can <SPAN
2237 >"go there anyway"</SPAN
2266 >Effect if unset:</DT
2269 > Blocks are not enforced.
2279 > is mainly used to block and filter
2280 requests as a service to the user, for example to block ads and other
2281 junk that clogs the pipes. <SPAN
2285 isn't perfect and sometimes innocent pages are blocked. In this situation it
2286 makes sense to allow the user to enforce the request and have
2293 > In the default configuration <SPAN
2300 > page contains a <SPAN
2302 >"go there anyway"</SPAN
2304 link to adds a special string (the force prefix) to the request URL.
2305 If that link is used, <SPAN
2309 detect the force prefix, remove it again and let the request pass.
2315 > can also be used to enforce
2316 a network policy. In that case the user obviously should not be able to
2317 bypass any blocks, and that's what the <SPAN
2319 >"enforce-blocks"</SPAN
2321 option is for. If it's enabled, <SPAN
2327 >"go there anyway"</SPAN
2328 > link. If the user adds the force
2329 prefix by hand, it will not be accepted and the circumvention attempt
2349 >7.4.7. ACLs: permit-access and deny-access</A
2352 NAME="PERMIT-ACCESS"
2360 CLASS="VARIABLELIST"
2366 > Who can access what.
2418 > are IPv4 addresses in dotted decimal notation or valid
2436 > are subnet masks in CIDR notation, i.e. integer
2437 values from 2 to 30 representing the length (in bits) of the network address. The masks and the whole
2438 destination part are optional.
2441 > If your system implements
2443 HREF="http://tools.ietf.org/html/rfc3493"
2457 > can be IPv6 addresses delimeted by
2464 or a service name, and
2498 any port will match. If no <TT
2509 > is given, the complete IP
2510 address has to match (i.e. 32 bits for IPv4 and 128 bits for IPv6).
2514 >Effect if unset:</DT
2517 > Don't restrict access further than implied by <TT
2527 > Access controls are included at the request of ISPs and systems
2528 administrators, and <SPAN
2532 >are not usually needed by individual users</I
2535 For a typical home user, it will normally suffice to ensure that
2539 > only listens on the localhost
2540 (127.0.0.1) or internal (home) network address by means of the
2542 HREF="config.html#LISTEN-ADDRESS"
2554 > Please see the warnings in the FAQ that <SPAN
2558 is not intended to be a substitute for a firewall or to encourage anyone
2559 to defer addressing basic security weaknesses.
2562 > Multiple ACL lines are OK.
2563 If any ACLs are specified, <SPAN
2567 to IP addresses that match at least one <TT
2571 and don't match any subsequent <TT
2574 > line. In other words, the
2575 last match wins, with the default being <TT
2584 > is using a forwarder (see <TT
2588 for a particular destination URL, the <TT
2594 that is examined is the address of the forwarder and <SPAN
2601 of the ultimate target. This is necessary because it may be impossible for the local
2605 > to determine the IP address of the
2606 ultimate target (that's often what gateways are used for).
2609 > You should prefer using IP addresses over DNS names, because the address lookups take
2610 time. All DNS names must resolve! You can <SPAN
2616 > use domain patterns
2620 > or partial domain names. If a DNS name resolves to multiple
2621 IP addresses, only the first one is used.
2624 > Some systems allow IPv4 clients to connect to IPv6 server sockets.
2625 Then the client's IPv4 address will be translated by the system into
2626 IPv6 address space with special prefix ::ffff:0:0/96 (so called IPv4
2627 mapped IPv6 address). <SPAN
2631 and maps such ACL addresses automatically.
2634 > Denying access to particular sites by ACL may have undesired side effects
2635 if the site in question is hosted on a machine which also hosts other sites
2643 > Explicitly define the default behavior if no ACL and
2651 is OK. The absence of a <TT
2663 > destination addresses are OK:
2674 > permit-access localhost</PRE
2681 > Allow any host on the same class C subnet as www.privoxy.org access to
2682 nothing but www.example.com (or other domains hosted on the same system):
2693 > permit-access www.privoxy.org/24 www.example.com/32</PRE
2700 > Allow access from any host on the 26-bit subnet 192.168.45.64 to anywhere,
2701 with the exception that 192.168.45.73 may not access the IP address behind
2702 www.dirty-stuff.example.com:
2713 > permit-access 192.168.45.64/26
2714 deny-access 192.168.45.73 www.dirty-stuff.example.com</PRE
2721 > Allow access from the IPv4 network 192.0.2.0/24 even if listening on
2722 an IPv6 wild card address (not supported on all platforms):
2732 CLASS="PROGRAMLISTING"
2733 > permit-access 192.0.2.0/24</PRE
2740 > This is equivalent to the following line even if listening on an
2741 IPv4 address (not supported on all platforms):
2751 CLASS="PROGRAMLISTING"
2752 > permit-access [::ffff:192.0.2.0]/120</PRE
2768 >7.4.8. buffer-limit</A
2773 CLASS="VARIABLELIST"
2779 > Maximum size of the buffer for content filtering.
2795 >Effect if unset:</DT
2798 > Use a 4MB (4096 KB) limit.
2805 > For content filtering, i.e. the <TT
2812 > actions, it is necessary that
2816 > buffers the entire document body.
2817 This can be potentially dangerous, since a server could just keep sending
2818 data indefinitely and wait for your RAM to exhaust -- with nasty consequences.
2822 > When a document buffer size reaches the <TT
2826 flushed to the client unfiltered and no further attempt to
2827 filter the rest of the document is made. Remember that there may be multiple threads
2828 running, which might require up to <TT
2838 >, unless you have enabled <SPAN
2840 >"single-threaded"</SPAN
2858 > This feature allows routing of HTTP requests through a chain of
2859 multiple proxies.</P
2861 > Forwarding can be used to chain Privoxy with a caching proxy to speed
2862 up browsing. Using a parent proxy may also be necessary if the machine
2866 > runs on has no direct Internet access.</P
2868 > Note that parent proxies can severely decrease your privacy level.
2869 For example a parent proxy could add your IP address to the request
2870 headers and if it's a caching proxy it may add the <SPAN
2874 header to revalidation requests again, even though you configured Privoxy
2875 to remove it. It may also ignore Privoxy's header time randomization and use the
2876 original values which could be used by the server as cookie replacement
2877 to track your steps between visits.</P
2879 > Also specified here are SOCKS proxies. <SPAN
2883 supports the SOCKS 4 and SOCKS 4A protocols.</P
2895 CLASS="VARIABLELIST"
2901 > To which parent HTTP proxy specific requests should be routed.
2933 HREF="actions-file.html#AF-PATTERNS"
2936 that specifies to which requests (i.e. URLs) this forward rule shall apply. Use <TT
2955 is the DNS name or IP address of the parent HTTP proxy through which the requests should be forwarded,
2956 optionally followed by its listening port (default: 8000).
2957 Use a single dot (<TT
2962 >"no forwarding"</SPAN
2979 >Effect if unset:</DT
2982 > Don't use parent HTTP proxies.
2997 >, then requests are not
2998 forwarded to another HTTP proxy but are made directly to the web servers.
3007 numerical IPv6 address (if
3009 HREF="http://tools.ietf.org/html/rfc3493"
3013 implemented). To prevent clashes with the port delimiter, the whole IP
3014 address has to be put into brackets. On the other hand a <TT
3019 > containing an IPv6 address
3020 has to be put into angle brackets (normal brackets are reserved for
3021 regular expressions already).
3024 > Multiple lines are OK, they are checked in sequence, and the last match wins.
3031 > Everything goes to an example parent proxy, except SSL on port 443 (which it doesn't handle):
3042 > forward / parent-proxy.example.org:8080
3050 > Everything goes to our example ISP's caching proxy, except for requests
3051 to that ISP's sites:
3062 > forward / caching-proxy.isp.example.net:8000
3063 forward .isp.example.net .</PRE
3070 > Parent proxy specified by an IPv6 address:
3080 CLASS="PROGRAMLISTING"
3081 > forward / [2001:DB8::1]:8000</PRE
3088 > Suppose your parent proxy doesn't support IPv6:
3098 CLASS="PROGRAMLISTING"
3099 > forward / parent-proxy.example.org:8000
3100 forward ipv6-server.example.org .
3101 forward <[2-3][0-9a-f][0-9a-f][0-9a-f]:*> .</PRE
3117 >7.5.2. forward-socks4, forward-socks4a and forward-socks5</A
3120 NAME="FORWARD-SOCKS4"
3123 NAME="FORWARD-SOCKS4A"
3128 CLASS="VARIABLELIST"
3134 > Through which SOCKS proxy (and optionally to which parent HTTP proxy) specific requests should be routed.
3178 HREF="actions-file.html#AF-PATTERNS"
3180 > that specifies to which
3181 requests (i.e. URLs) this forward rule shall apply. Use <TT
3200 are IP addresses in dotted decimal notation or valid DNS names
3212 >"no HTTP forwarding"</SPAN
3213 >), and the optional
3219 > parameters are TCP ports,
3220 i.e. integer values from 1 to 65535
3236 >Effect if unset:</DT
3239 > Don't use SOCKS proxies.
3246 > Multiple lines are OK, they are checked in sequence, and the last match wins.
3249 > The difference between <TT
3254 >forward-socks4a</TT
3256 is that in the SOCKS 4A protocol, the DNS resolution of the target hostname happens on the SOCKS
3257 server, while in SOCKS 4 it happens locally.
3263 > the DNS resolution will happen on the remote server as well.
3278 numerical IPv6 address (if
3280 HREF="http://tools.ietf.org/html/rfc3493"
3284 implemented). To prevent clashes with the port delimiter, the whole IP
3285 address has to be put into brackets. On the other hand a <TT
3290 > containing an IPv6 address
3291 has to be put into angle brackets (normal brackets are reserved for
3292 regular expressions already).
3303 >, then requests are not
3304 forwarded to another HTTP proxy but are made (HTTP-wise) directly to the web servers, albeit through
3312 > From the company example.com, direct connections are made to all
3316 > domains, but everything outbound goes through
3317 their ISP's proxy by way of example.com's corporate SOCKS 4A gateway to
3329 > forward-socks4a / socks-gw.example.com:1080 www-cache.isp.example.net:8080
3330 forward .example.com .</PRE
3337 > A rule that uses a SOCKS 4 gateway for all destinations but no HTTP parent looks like this:
3348 > forward-socks4 / socks-gw.example.com:1080 .</PRE
3355 > To chain Privoxy and Tor, both running on the same system, you would use
3367 > forward-socks5 / 127.0.0.1:9050 .</PRE
3377 > network can't be used to
3378 reach your local network, if you need to access local servers you
3379 therefore might want to make some exceptions:
3390 > forward 192.168.*.*/ .
3392 forward 127.*.*.*/ .</PRE
3399 > Unencrypted connections to systems in these address ranges will
3400 be as (un)secure as the local network is, but the alternative is that you
3401 can't reach the local network through <SPAN
3405 at all. Of course this may actually be desired and there is no reason
3406 to make these exceptions if you aren't sure you need them.
3409 > If you also want to be able to reach servers in your local network by
3410 using their names, you will need additional exceptions that look like
3422 > forward localhost/ .</PRE
3437 NAME="ADVANCED-FORWARDING-EXAMPLES"
3438 >7.5.3. Advanced Forwarding Examples</A
3441 > If you have links to multiple ISPs that provide various special content
3442 only to their subscribers, you can configure multiple <SPAN
3446 which have connections to the respective ISPs to act as forwarders to each other, so that
3453 > users can see the internal content of all ISPs.</P
3455 > Assume that host-a has a PPP connection to isp-a.example.net. And host-b has a PPP connection to
3456 isp-b.example.org. Both run <SPAN
3460 configuration can look like this:</P
3473 forward .isp-b.example.net host-b:8118</PRE
3490 forward .isp-a.example.org host-a:8118</PRE
3496 > Now, your users can set their browser's proxy to use either
3497 host-a or host-b and be able to browse the internal content
3498 of both isp-a and isp-b.</P
3500 > If you intend to chain <SPAN
3507 > locally, then chaining as
3510 >browser -> squid -> privoxy</TT
3511 > is the recommended way. </P
3513 > Assuming that <SPAN
3520 run on the same box, your <SPAN
3523 > configuration could then look like this:</P
3533 > # Define Privoxy as parent proxy (without ICP)
3534 cache_peer 127.0.0.1 parent 8118 7 no-query
3536 # Define ACL for protocol FTP
3539 # Do not forward FTP requests to Privoxy
3540 always_direct allow ftp
3542 # Forward all the rest to Privoxy
3543 never_direct allow all</PRE
3549 > You would then need to change your browser's proxy settings to <SPAN
3552 >'s address and port.
3553 Squid normally uses port 3128. If unsure consult <TT
3561 > You could just as well decide to only forward requests you suspect
3562 of leading to Windows executables through a virus-scanning parent proxy,
3565 >antivir.example.com</TT
3577 forward /.*\.(exe|com|dll|zip)$ antivir.example.com:8010</PRE
3588 NAME="FORWARDED-CONNECT-RETRIES"
3589 >7.5.4. forwarded-connect-retries</A
3594 CLASS="VARIABLELIST"
3600 > How often Privoxy retries if a forwarded connection request fails.
3610 >Number of retries.</I
3628 >Effect if unset:</DT
3631 > Connections forwarded through other proxies are treated like direct connections and no retry attempts are made.
3641 >forwarded-connect-retries</I
3643 > is mainly interesting
3644 for socks4a connections, where <SPAN
3647 > can't detect why the connections failed.
3648 The connection might have failed because of a DNS timeout in which case a retry makes sense,
3649 but it might also have failed because the server doesn't exist or isn't reachable. In this
3650 case the retry will just delay the appearance of Privoxy's error message.
3653 > Note that in the context of this option, <SPAN
3655 >"forwarded connections"</SPAN
3656 > includes all connections
3657 that Privoxy forwards through other proxies. This option is not limited to the HTTP CONNECT method.
3660 > Only use this option, if you are getting lots of forwarding-related error messages
3661 that go away when you try again manually. Start with a small value and check Privoxy's
3662 logfile from time to time, to see how many retries are usually needed.
3669 > forwarded-connect-retries 1
3682 >7.6. Miscellaneous</A
3689 NAME="ACCEPT-INTERCEPTED-REQUESTS"
3690 >7.6.1. accept-intercepted-requests</A
3695 CLASS="VARIABLELIST"
3701 > Whether intercepted requests should be treated as valid.
3729 >Effect if unset:</DT
3732 > Only proxy requests are accepted, intercepted requests are treated as invalid.
3739 > If you don't trust your clients and want to force them
3744 option and configure your packet filter to redirect outgoing
3745 HTTP connections into <SPAN
3751 > Make sure that <SPAN
3755 aren't redirected as well. Additionally take care that
3759 > can't intentionally connect
3760 to itself, otherwise you could run into redirection loops if
3764 > listening port is reachable
3765 by the outside or an attacker has access to the pages you visit.
3772 > accept-intercepted-requests 1
3783 NAME="ALLOW-CGI-REQUEST-CRUNCHING"
3784 >7.6.2. allow-cgi-request-crunching</A
3789 CLASS="VARIABLELIST"
3795 > Whether requests to <SPAN
3798 > CGI pages can be blocked or redirected.
3826 >Effect if unset:</DT
3832 > ignores block and redirect actions for its CGI pages.
3842 > ignores block or redirect actions
3843 for its CGI pages. Intercepting these requests can be useful in multi-user
3844 setups to implement fine-grained access control, but it can also render the complete
3845 web interface useless and make debugging problems painful if done without care.
3848 > Don't enable this option unless you're sure that you really need it.
3855 > allow-cgi-request-crunching 1
3866 NAME="SPLIT-LARGE-FORMS"
3867 >7.6.3. split-large-forms</A
3872 CLASS="VARIABLELIST"
3878 > Whether the CGI interface should stay compatible with broken HTTP clients.
3906 >Effect if unset:</DT
3909 > The CGI form generate long GET URLs.
3919 > CGI forms can lead to
3920 rather long URLs. This isn't a problem as far as the HTTP
3921 standard is concerned, but it can confuse clients with arbitrary
3922 URL length limitations.
3925 > Enabling split-large-forms causes <SPAN
3929 to divide big forms into smaller ones to keep the URL length down.
3930 It makes editing a lot less convenient and you can no longer
3931 submit all changes at once, but at least it works around this
3935 > If you don't notice any editing problems, there is no reason
3936 to enable this option, but if one of the submit buttons appears
3937 to be broken, you should give it a try.
3944 > split-large-forms 1
3955 NAME="KEEP-ALIVE-TIMEOUT"
3956 >7.6.4. keep-alive-timeout</A
3961 CLASS="VARIABLELIST"
3967 > Number of seconds after which an open connection will no longer be reused.
3977 >Time in seconds.</I
3989 >Effect if unset:</DT
3992 > Connections are not kept alive.
3999 > This option allows clients to keep the connection to <SPAN
4003 alive. If the server supports it, <SPAN
4007 the connection to the server alive as well. Under certain
4008 circumstances this may result in speed-ups.
4014 > will close the connection to the server if
4015 the client connection gets closed, or if the specified timeout
4016 has been reached without a new request coming in. This behaviour
4017 can be changed with the <A
4018 HREF="#CONNECTION-SHARING"
4020 >connection-sharing</A
4024 > This option has no effect if <SPAN
4028 has been compiled without keep-alive support.
4031 > Note that a timeout of five seconds as used in the default
4032 configuration file significantly decreases the number of
4033 connections that will be reused. The value is used because
4034 some browsers limit the number of connections they open to
4035 a single host and apply the same limit to proxies. This can
4036 result in a single website <SPAN
4040 connections the browser allows, which means connections to
4041 other websites can't be opened until the connections currently
4045 > Several users have reported this as a Privoxy bug, so the
4046 default value has been reduced. Consider increasing it to
4047 300 seconds or even more if you think your browser can handle
4048 it. If your browser appears to be hanging it can't.
4055 > keep-alive-timeout 300
4066 NAME="DEFAULT-SERVER-TIMEOUT"
4067 >7.6.5. default-server-timeout</A
4072 CLASS="VARIABLELIST"
4078 > Assumed server-side keep-alive timeout if not specified by the server.
4088 >Time in seconds.</I
4100 >Effect if unset:</DT
4103 > Connections for which the server didn't specify the keep-alive
4104 timeout are not reused.
4111 > Enabling this option significantly increases the number of connections
4112 that are reused, provided the <A
4113 HREF="#KEEP-ALIVE-TIMEOUT"
4115 >keep-alive-timeout</A
4120 > While it also increases the number of connections problems
4124 > tries to reuse a connection that already has
4125 been closed on the server side, or is closed while <SPAN
4129 is trying to reuse it, this should only be a problem if it
4130 happens for the first request sent by the client. If it happens
4131 for requests on reused client connections, <SPAN
4135 close the connection and the client is supposed to retry the
4136 request without bothering the user.
4139 > Enabling this option is therefore only recommended if the
4141 HREF="#CONNECTION-SHARING"
4143 >connection-sharing</A
4148 > It is an error to specify a value larger than the <A
4149 HREF="#KEEP-ALIVE-TIMEOUT"
4151 >keep-alive-timeout</A
4155 > This option has no effect if <SPAN
4159 has been compiled without keep-alive support.
4166 > default-server-timeout 60
4177 NAME="CONNECTION-SHARING"
4178 >7.6.6. connection-sharing</A
4183 CLASS="VARIABLELIST"
4189 > Whether or not outgoing connections that have been kept alive
4190 should be shared between different incoming connections.
4212 >Effect if unset:</DT
4215 > Connections are not shared.
4222 > This option has no effect if <SPAN
4226 has been compiled without keep-alive support, or if it's disabled.
4233 > Note that reusing connections doesn't necessary cause speedups.
4234 There are also a few privacy implications you should be aware of.
4237 > If this option is effective, outgoing connections are shared between
4238 clients (if there are more than one) and closing the browser that initiated
4239 the outgoing connection does no longer affect the connection between <SPAN
4243 and the server unless the client's request hasn't been completed yet.
4246 > If the outgoing connection is idle, it will not be closed until either
4250 > or the server's timeout is reached.
4251 While it's open, the server knows that the system running <SPAN
4258 > If there are more than one client (maybe even belonging to multiple users),
4259 they will be able to reuse each others connections. This is potentially
4260 dangerous in case of authentication schemes like NTLM where only the
4261 connection is authenticated, instead of requiring authentication for
4265 > If there is only a single client, and if said client can keep connections
4266 alive on its own, enabling this option has next to no effect. If the client
4267 doesn't support connection keep-alive, enabling this option may make sense
4271 > to keep outgoing connections alive even if the client
4272 itself doesn't support it.
4275 > You should also be aware that enabling this option increases the likelihood
4276 of getting the "No server or forwarder data" error message, especially if you
4277 are using a slow connection to the Internet.
4280 > This option should only be used by experienced users who
4281 understand the risks and can weight them against the benefits.
4288 > connection-sharing 1
4299 NAME="SOCKET-TIMEOUT"
4300 >7.6.7. socket-timeout</A
4305 CLASS="VARIABLELIST"
4311 > Number of seconds after which a socket times out if
4312 no data is received.
4322 >Time in seconds.</I
4334 >Effect if unset:</DT
4337 > A default value of 300 seconds is used.
4344 > The default is quite high and you probably want to reduce it.
4345 If you aren't using an occasionally slow proxy like Tor, reducing
4346 it to a few seconds should be fine.
4353 > socket-timeout 300
4364 NAME="MAX-CLIENT-CONNECTIONS"
4365 >7.6.8. max-client-connections</A
4370 CLASS="VARIABLELIST"
4376 > Maximum number of client connections that will be served.
4386 >Positive number.</I
4398 >Effect if unset:</DT
4401 > Connections are served until a resource limit is reached.
4411 > creates one thread (or process) for every incoming client
4412 connection that isn't rejected based on the access control settings.
4415 > If the system is powerful enough, <SPAN
4418 > can theoretically deal with
4419 several hundred (or thousand) connections at the same time, but some
4420 operating systems enforce resource limits by shutting down offending
4421 processes and their default limits may be below the ones <SPAN
4425 require under heavy load.
4431 > to enforce a connection limit below the thread
4432 or process limit used by the operating system makes sure this doesn't
4433 happen. Simply increasing the operating system's limit would work too,
4437 > isn't the only application running on the system,
4438 you may actually want to limit the resources used by <SPAN
4447 > is only used by a single trusted user, limiting the
4448 number of client connections is probably unnecessary. If there
4449 are multiple possibly untrusted users you probably still want to
4450 additionally use a packet filter to limit the maximal number of
4451 incoming connections per client. Otherwise a malicious user could
4452 intentionally create a high number of connections to prevent other
4453 users from using <SPAN
4459 > Obviously using this option only makes sense if you choose a limit
4460 below the one enforced by the operating system.
4467 > max-client-connections 256
4478 NAME="HANDLE-AS-EMPTY-DOC-RETURNS-OK"
4479 >7.6.9. handle-as-empty-doc-returns-ok</A
4484 CLASS="VARIABLELIST"
4490 > The status code Privoxy returns for pages blocked with
4495 HREF="actions-file.html#HANDLE-AS-EMPTY-DOCUMENT"
4497 >+handle-as-empty-document</A
4521 >Effect if unset:</DT
4524 > Privoxy returns a status 403(forbidden) for all blocked pages.
4531 > Privoxy returns a status 200(OK) for pages blocked with +handle-as-empty-document
4532 and a status 403(Forbidden) for all other blocked pages.
4539 > This is a work-around for Firefox bug 492459:
4542 >" Websites are no longer rendered if SSL requests for JavaScripts are blocked by a proxy.
4546 HREF="https://bugzilla.mozilla.org/show_bug.cgi?id=492459"
4548 >https://bugzilla.mozilla.org/show_bug.cgi?id=492459</A
4550 As the bug has been fixed for quite some time this option should no longer
4551 be needed and will be removed in a future release. Please speak up if you
4552 have a reason why the option should be kept around.
4563 NAME="ENABLE-COMPRESSION"
4564 >7.6.10. enable-compression</A
4569 CLASS="VARIABLELIST"
4575 > Whether or not buffered content is compressed before delivery.
4597 >Effect if unset:</DT
4600 > Privoxy does not compress buffered content.
4607 > Privoxy compresses buffered content before delivering it to the client,
4608 provided the client supports it.
4615 > This directive is only supported if Privoxy has been compiled with
4616 FEATURE_COMPRESSION, which should not to be confused with FEATURE_ZLIB.
4619 > Compressing buffered content is mainly useful if Privoxy and the
4620 client are running on different systems. If they are running on the
4621 same system, enabling compression is likely to slow things down.
4622 If you didn't measure otherwise, you should assume that it does
4623 and keep this option disabled.
4626 > Privoxy will not compress buffered content below a certain length.
4637 NAME="COMPRESSION-LEVEL"
4638 >7.6.11. compression-level</A
4643 CLASS="VARIABLELIST"
4649 > The compression level that is passed to the zlib library when compressing buffered content.
4659 >Positive number ranging from 0 to 9.</I
4674 > Compressing the data more takes usually longer than compressing
4675 it less or not compressing it at all. Which level is best depends
4676 on the connection between Privoxy and the client. If you can't
4677 be bothered to benchmark it for yourself, you should stick with
4678 the default and keep compression disabled.
4681 > If compression is disabled, the compression level is irrelevant.
4696 > # Best speed (compared to the other levels)
4700 # No compression. Only useful for testing as the added header
4701 # slightly increases the amount of data that has to be sent.
4702 # If your benchmark shows that using this compression level
4703 # is superior to using no compression at all, the benchmark
4704 # is likely to be flawed.
4723 >7.7. Windows GUI Options</A
4729 > has a number of options specific to the
4730 Windows GUI interface:</P
4732 NAME="ACTIVITY-ANIMATION"
4737 >"activity-animation"</SPAN
4742 > icon will animate when
4746 > is active. To turn off, set to 0.</P
4751 CLASS="LITERALLAYOUT"
4756 >activity-animation 1</I
4759 </P
4769 >"log-messages"</SPAN
4774 > will log messages to the console
4780 CLASS="LITERALLAYOUT"
4788 </P
4793 NAME="LOG-BUFFER-SIZE"
4799 >"log-buffer-size"</SPAN
4800 > is set to 1, the size of the log buffer,
4801 i.e. the amount of memory used for the log messages displayed in the
4802 console window, will be limited to <SPAN
4804 >"log-max-lines"</SPAN
4807 > Warning: Setting this to 0 will result in the buffer to grow infinitely and
4808 eat up all your memory!</P
4813 CLASS="LITERALLAYOUT"
4818 >log-buffer-size 1</I
4821 </P
4826 NAME="LOG-MAX-LINES"
4831 >log-max-lines</SPAN
4832 > is the maximum number of lines held
4833 in the log buffer. See above.</P
4838 CLASS="LITERALLAYOUT"
4843 >log-max-lines 200</I
4846 </P
4851 NAME="LOG-HIGHLIGHT-MESSAGES"
4856 >"log-highlight-messages"</SPAN
4861 > will highlight portions of the log
4862 messages with a bold-faced font:</P
4867 CLASS="LITERALLAYOUT"
4872 >log-highlight-messages 1</I
4875 </P
4880 NAME="LOG-FONT-NAME"
4883 > The font used in the console window:</P
4888 CLASS="LITERALLAYOUT"
4893 >log-font-name Comic Sans MS</I
4896 </P
4901 NAME="LOG-FONT-SIZE"
4904 > Font size used in the console window:</P
4909 CLASS="LITERALLAYOUT"
4917 </P
4922 NAME="SHOW-ON-TASK-BAR"
4928 >"show-on-task-bar"</SPAN
4929 > controls whether or not
4933 > will appear as a button on the Task bar
4939 CLASS="LITERALLAYOUT"
4944 >show-on-task-bar 0</I
4947 </P
4952 NAME="CLOSE-BUTTON-MINIMIZES"
4957 >"close-button-minimizes"</SPAN
4958 > is set to 1, the Windows close
4959 button will minimize <SPAN
4962 > instead of closing
4963 the program (close with the exit option on the File menu).</P
4968 CLASS="LITERALLAYOUT"
4973 >close-button-minimizes 1</I
4976 </P
4986 >"hide-console"</SPAN
4987 > option is specific to the MS-Win console
4991 >. If this option is used,
4995 > will disconnect from and hide the
5001 CLASS="LITERALLAYOUT"
5009 </P
5020 SUMMARY="Footer navigation table"
5031 HREF="configuration.html"
5049 HREF="actions-file.html"
5059 >Privoxy Configuration</TD