X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=blobdiff_plain;f=doc%2Fwebserver%2Fuser-manual%2Fconfig.html;h=529fefb23dd0db82594606dfd4ba3fc440943549;hp=11221c271e711ecd4b15bea772b8cb5505347661;hb=3e837e6e9561de90b1db799199f8036977cb36b0;hpb=594da2fb0547a6325317ff12476f400622bb6cf5 diff --git a/doc/webserver/user-manual/config.html b/doc/webserver/user-manual/config.html index 11221c27..529fefb2 100644 --- a/doc/webserver/user-manual/config.html +++ b/doc/webserver/user-manual/config.html @@ -7,7 +7,7 @@ NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.79">Privoxy 3.0.13 User ManualPrivoxy 3.0.27 User Manual7. The Main Configuration File

Again, the main configuration file is named By default, the main configuration file is named config on - Linux/Unix/BSD and OS/2, and , + with the exception of Windows, where it is named config.txt on Windows. +>. Configuration lines consist of an initial keyword followed by a list of values, all separated by whitespace (any number of spaces or tabs). For example:

  confdir /etc/privoxy

-

Assigns the value Privoxy's operation that are not location dependent (i.e. they apply universally, no matter - where you may be surfing).

http://www.privoxy.org/https://www.privoxy.org/versionNotes:

The User Manual URI is the single best source of information on +> The User Manual URI is the single best source of information on Privoxy, and is used for help links from some of the internal CGI pages. The manual itself is normally packaged with the binary distributions, so you probably want to set this to a locally - installed copy. + installed copy.

Examples: @@ -247,8 +243,7 @@ CLASS="CITETITLE" > is located:

  user-manual  /usr/share/doc/privoxy/user-manual
user-manual /usr/share/doc/privoxy/user-manual
-

The User Manual is then available to anyone with access to ).

If the documentation is not on the local system, it can be accessed +> If the documentation is not on the local system, it can be accessed from a remote server, as:

  user-manual  http://example.com/privoxy/user-manual/
user-manual http://example.com/privoxy/user-manual/
-

A URL to be displayed in the error page that users will see if access to an untrusted page is denied. +> A URL to be displayed in the error page that users will see if access to an untrusted page is denied.

Privoxy - where to find those other files.

The user running

7.2.3. temporary-directory

Specifies:

A directory where Privoxy can create temporary files.

Type of value:

Path name

Default value:

unset

Effect if unset:

No temporary files are created, external filters don't work.

Notes:

To execute external filters, + Privoxy has to create temporary files. + This directive specifies the directory the temporary files should + be written to. +

It should be a directory only Privoxy + (and trusted users) can access. +

7.2.3. logdir7.2.4. logdir

7.2.4. actionsfile7.2.5. actionsfileEffect if unset:

No actions are taken at all. More or less neutral proxying. +> No actions are taken at all. More or less neutral proxying.

lines are permitted, and are in fact recommended!

- The default values are The default values are default.action, which is the @@ -879,22 +935,8 @@ CLASS="FILENAME" >, where you can make your personal additions.

- Actions files contain all the per site and per URL configuration for +> Actions files contain all the per site and per URL configuration for ad blocking, cookie management, privacy considerations, etc. - There is no point in using Privoxy without at - least one actions file. -

Note that since Privoxy 3.0.7, the complete filename, including the ".action" - extension has to be specified. The syntax change was necessary to be consistent - with the other file options and to allow previously forbidden characters.

7.2.5. filterfile7.2.6. filterfile. These rules permit powerful changes on the content of Web pages, and optionally the headers as well, e.g., you could try to disable your favorite JavaScript annoyances, - re-write the actual displayed text, or just have some fun + re-write the actual displayed text, or just have some fun playing buzzword bingo with web pages.

7.2.6. logfile7.2.7. logfile

Privoxy 3.0.7 and later only log fatal - errors by default. +> only logs fatal errors by default.

For most troubleshooting purposes, you will have to change that, please refer to the debugging section for details.

Your logfile will grow indefinitely, and you will probably want to - periodically remove it. On Unix systems, you can do this with a cron job - (see "man cron"). For Red Hat based Linux distributions, a - logrotate script has been included. -

Any log files must be writable by whatever user Privoxy"privoxy").

To prevent the logfile from growing indefinitely, it is recommended to + periodically rotate or shorten it. Many operating systems support log + rotation out of the box, some require additional software to do it. + For details, please refer to the documentation for your operating system. +

7.2.7. trustfile7.2.8. trustfile

Privoxy will only allow - access to sites that are specified in the trustfile. Sites can be listed + access to sites that are specified in the trustfile. Sites can be listed in one of two ways:

Prepending a ~ character limits access to this site - only (and any sub-paths within this site), e.g. +> character limits access to this site + only (and any sub-paths within this site), e.g. ~www.example.com~www.example.com/features/news.html, etc. +>, etc.

Or, you can designate sites as If you use the + operator in the trust file, it may grow +> operator in the trust file, it may grow considerably over time.

The available debug levels are:

didn't let through, and the reason why. debug 2048 # CGI user interface debug 4096 # Startup banner and warnings. - debug 8192 # Non-fatal errors
-

To select multiple debug levels, you can either add them or use multiple

Privoxy used to ship with the debug levels recommended above enabled by - default, but due to privacy concerns 3.0.7 and later are configured to - only log fatal errors.

If you are used to the more verbose settings, simply enable the debug lines @@ -1490,7 +1515,7 @@ CLASS="VARIABLELIST" CLASS="emphasis" >None1 or 0

Unset0

Specifies:

The IP address and TCP port on which The address and TCP port on which Privoxy will @@ -1652,6 +1677,18 @@ CLASS="REPLACEABLE" >Port

[Hostname]:Port

Default value:

You can use this statement multiple times to make + Privoxy listen on more ports or more + IP addresses. Suitable if your operating system does not + support sharing IPv6 and IPv4 protocols + on the same socket. +

If a hostname is used instead of an IP address, Privoxy + will try to resolve it to an IP address and if there are multiple, use the first + one returned. +

If the address for the hostname isn't already known on the system + (for example because it's in /etc/hostname), this may result in DNS + traffic. +

If the specified address isn't available on the system, or if the + hostname can't be resolved, Privoxy + will fail to start. +

IPv6 addresses containing colons have to be quoted by brackets. + They can only be used if Privoxy has + been compiled with IPv6 support. If you aren't sure if your version + supports it, have a look at + http://config.privoxy.org/show-status.

If you leave out the IP address, Some operating systems will prefer IPv6 to IPv4 addresses even if the + system has no IPv6 connectivity which is usually not expected by the user. + Some even rely on DNS to resolve localhost which mean the "localhost" address + used may not actually be local. +

It is therefore recommended to explicitly configure the intended IP address + instead of relying on the operating system, unless there's a strong reason not to. +

If you leave out the address, Privoxy will - bind to all IPv4 interfaces (addresses) on your machine and may become reachable - from the Internet. In that case, consider using access control lists (ACL's, see below), and/or - a firewall. If the hostname is localhost, will bind to all + IPv4 interfaces (addresses) on your machine and may become reachable from the + Internet and/or the local network. Be aware that some GNU/Linux distributions + modify that behaviour without updating the documentation. Check for non-standard + patches if your Privoxy version behaves differently. +

If you configure Privoxy to be reachable from the + network, consider using access control lists - will explicitly try to bind to an IPv4 address. For other hostnames it depends - on the operating system which IP version will be used. + (ACL's, see below), and/or a firewall.

If you open

-

Suppose you are running

-

enable-remote-toggle
below.

The windows version will only display the toggle icon in the system tray - if this option is present. -

Privoxy with - support for this feature, otherwise this option has no effect. + support for this feature, otherwise this option has no effect.

Privoxy with - support for this feature, otherwise this option has no effect. + support for this feature, otherwise this option has no effect.

src_addr
and +> and are not usually needed by individual users. - For a typical home user, it will normally suffice to ensure that + For a typical home user, it will normally suffice to ensure that Privoxy - option. + option.

Please see the warnings in the FAQ that

Some systems allows IPv4 client to connect to IPv6 server socket. - Then the client's IPv4 address will be translated by system into +> Some systems allow IPv4 clients to connect to IPv6 server sockets. + Then the client's IPv4 address will be translated by the system into IPv6 address space with special prefix ::ffff:0:0/96 (so called IPv4 mapped IPv6 address). destination addresses are OK:

-

Allow any host on the same class C subnet as www.privoxy.org access to nothing but www.example.com (or other domains hosted on the same system):

-

Allow access from any host on the 26-bit subnet 192.168.45.64 to anywhere, with the exception that 192.168.45.73 may not access the IP address behind www.dirty-stuff.example.com:

-

Allow access from the IPv4 network 192.0.2.0/24 even if listening on an IPv6 wild card address (not supported on all platforms):

-

This is equivalent to the following line even if listening on an IPv4 address (not supported on all platforms):

-

+deanimate-gif
actions, it is necessary that +> actions, it is necessary that Privoxy

7.5. Forwarding

7.4.9. enable-proxy-authentication-forwarding

This feature allows routing of HTTP requests through a chain of - multiple proxies.

Specifies:

Forwarding can be used to chain Privoxy with a caching proxy to speed - up browsing. Using a parent proxy may also be necessary if the machine - that Whether or not proxy authentication through Privoxy runs on has no direct Internet access.

should work. +

Type of value:

Note that parent proxies can severely decrease your privacy level. - For example a parent proxy could add your IP address to the request - headers and if it's a caching proxy it may add the "Etag" - header to revalidation requests again, even though you configured Privoxy - to remove it. It may also ignore Privoxy's header time randomization and use the - original values which could be used by the server as cookie replacement - to track your steps between visits.

0 or 1

Default value:

Also specified here are SOCKS proxies. Privoxy - supports the SOCKS 4 and SOCKS 4A protocols.

0

Effect if unset:

Proxy authentication headers are removed. +

Notes:

Privoxy itself does not support proxy authentication, but can + allow clients to authenticate against Privoxy's parent proxy. +

By default Privoxy (3.0.21 and later) don't do that and remove + Proxy-Authorization headers in requests and Proxy-Authenticate + headers in responses to make it harder for malicious sites to + trick inexperienced users into providing login information. +

If this option is enabled the headers are forwarded. +

Enabling this option is not recommended if there is + no parent proxy that requires authentication or if the local network between + Privoxy and the parent proxy isn't trustworthy. If proxy authentication is + only required for some requests, it is recommended to use a client header filter + to remove the authentication headers for requests where they aren't needed. +

7.5.1. forward7.4.10. trusted-cgi-referer

Specifies:

To which parent HTTP proxy specific requests should be routed. +> A trusted website or webpage whose links can be followed to reach sensitive CGI pages

Type of value:

target_pattern - http_parent[:URL or URL prefix

Default value:

Unset

Effect if unset:

No external pages are considered trusted referers. +

Notes:

Before Privoxy accepts configuration changes through CGI pages like + client-tags or the + remote toggle, it checks + the Referer header to see if the request comes from a trusted source. +

By default only the webinterface domains + config.privoxy.org + and + p.p + are considered trustworthy. + Requests originating from other domains are rejected to prevent + third-parties from modifiying Privoxy's state by e.g. embedding + images that result in CGI requests. +

In some environments it may be desirable to embed links to CGI pages + on external pages, for example on an Intranet homepage the Privoxy admin + controls. +

The "trusted-cgi-referer" option can be used to add that page, + or the whole domain, as trusted source so the resulting requests aren't + rejected. + Requests are accepted if the specified trusted-cgi-refer is the prefix + of the Referer. +

Warning

Declaring pages the admin doesn't control trustworthy may allow + malicious third parties to modify Privoxy's internal state against + the user's wishes and without the user's knowledge. +

7.5. Forwarding

This feature allows routing of HTTP requests through a chain of + multiple proxies.

Forwarding can be used to chain Privoxy with a caching proxy to speed + up browsing. Using a parent proxy may also be necessary if the machine + that Privoxy runs on has no direct Internet access.

Note that parent proxies can severely decrease your privacy level. + For example a parent proxy could add your IP address to the request + headers and if it's a caching proxy it may add the "Etag" + header to revalidation requests again, even though you configured Privoxy + to remove it. It may also ignore Privoxy's header time randomization and use the + original values which could be used by the server as cookie replacement + to track your steps between visits.

Also specified here are SOCKS proxies. Privoxy + supports the SOCKS 4 and SOCKS 4A protocols.

7.5.1. forward

Specifies:

To which parent HTTP proxy specific requests should be routed. +

Type of value:

target_pattern + http_parent[:port is a URL pattern +> that specifies to which requests (i.e. URLs) this forward rule shall apply. Use /

Everything goes to an example parent proxy, except SSL on port 443 (which it doesn't handle):

-

Everything goes to our example ISP's caching proxy, except for requests to that ISP's sites:

-

Parent proxy specified by an IPv6 address:

  foward   /                   [2001:DB8::1]:8000
forward / [2001:DB8::1]:8000
-

Suppose your parent proxy doesn't support IPv6:

-

7.5.2. forward-socks4, forward-socks4a and forward-socks57.5.2. forward-socks4, forward-socks4a, forward-socks5 and forward-socks5t to denote "no HTTP forwarding"), and the optional +>), and the optional

forward-socks5t works like vanilla forward-socks5 but + lets Privoxy additionally use Tor-specific SOCKS extensions. Currently the only supported + SOCKS extension is optimistic data which can reduce the latency for the first request made + on a newly created connection. +

socks_proxy

-

A rule that uses a SOCKS 4 gateway for all destinations but no HTTP parent looks like this:

-

To chain Privoxy and Tor, both running on the same system, you would use +> To chain Privoxy and Tor, both running on the same system, you would use something like:

  forward-socks5   /               127.0.0.1:9050 .
forward-socks5t / 127.0.0.1:9050 .
+>

Note that if you got Tor through one of the bundles, you may + have to change the port from 9050 to 9150 (or even another one). + For details, please check the documentation on the + Tor website.

The public

  forward         192.168.*.*/     .
-  forward            10.*.*.*/     .
-  forward           127.*.*.*/     .
-

Unencrypted connections to systems in these address ranges will be as (un)secure as the local network is, but the alternative is that you @@ -3319,8 +3595,7 @@ CLASS="APPLICATION" using their names, you will need additional exceptions that look like this:

-

7.5.3. Advanced Forwarding Examples

If you have links to multiple ISPs that provide various special content +> If you have links to multiple ISPs that provide various special content only to their subscribers, you can configure multiple Privoxies

host-a:

host-b:

Now, your users can set their browser's proxy to use either host-a or host-b and be able to browse the internal content @@ -3409,15 +3678,15 @@ CLASS="SCREEN" > If you intend to chain Privoxy and +> and squid locally, then chaining as +> locally, then chaining as browser -> squid -> privoxy is the recommended way.

is the recommended way.

Assuming that squid configuration could then look like this:

  # Define Privoxy as parent proxy (without ICP) 
-  cache_peer 127.0.0.1 parent 8118 7 no-query 
+>  # Define Privoxy as parent proxy (without ICP)
+  cache_peer 127.0.0.1 parent 8118 7 no-query
 
-  # Define ACL for protocol FTP 
-  acl ftp proto FTP 
+  # Define ACL for protocol FTP
+  acl ftp proto FTP
 
   # Do not forward FTP requests to Privoxy
-  always_direct allow ftp 
+  always_direct allow ftp
 
   # Forward all the rest to Privoxy
   never_direct allow all

You would then need to change your browser's proxy settings to antivir.example.com, port 8010:

Specifies:

How often Privoxy retries if a forwarded connection request fails. +> How often Privoxy retries if a forwarded connection request fails.

Privoxy. +>. +

Note that intercepting encrypted connections (HTTPS) isn't supported.

Make sure that listening port is reachable by the outside or an attacker has access to the pages you visit.

If you are running Privoxy as intercepting proxy without being + able to intercept all client requests you may want to adjust + the CGI templates to make sure they don't reference content from + config.privoxy.org. +

Examples:
has been compiled without keep-alive support.

Note that a timeout of five seconds as used in the default + configuration file significantly decreases the number of + connections that will be reused. The value is used because + some browsers limit the number of connections they open to + a single host and apply the same limit to proxies. This can + result in a single website "grabbing" all the + connections the browser allows, which means connections to + other websites can't be opened until the connections currently + in use time out. +

Several users have reported this as a Privoxy bug, so the + default value has been reduced. Consider increasing it to + 300 seconds or even more if you think your browser can handle + it. If your browser appears to be hanging, it probably can't. +

Examples:

7.6.5. connection-sharing7.6.5. tolerate-pipelining

Specifies:

Whether or not outgoing connections that have been kept alive - should be shared between different incoming connections. +> Whether or not pipelined requests should be served.

0 or 10 or 1.

Effect if unset:

Connections are not shared. -

Notes:

This option has no effect if Privoxy - has been compiled without keep-alive support, or if it's disabled. +> If Privoxy receives more than one request at once, it terminates the + client connection after serving the first one.

Notes:

Note that reusing connections doesn't necessary cause speedups. - There are also a few privacy implications you should be aware of. -

If this option is effective, outgoing connections are shared between - clients (if there are more than one) and closing the client that initiated - the outgoing connection does no longer affect the connection between Privoxy - and the server unless the client's request hasn't been completed yet. +> currently doesn't pipeline outgoing requests, + thus allowing pipelining on the client connection is not + guaranteed to improve the performance.

If the outgoing connection is idle, it will not be closed until either - Privoxy's or the server's timeout is reached. - While it's open, the server knows that the system running By default Privoxy is still - there. -

If there are more than one client (maybe even belonging to multiple users), - they will be able to reuse each others connections. This is potentially - dangerous in case of authentication schemes like NTLM where only the - connection is authenticated, instead of requiring authentication for - each request. +> tries to discourage clients from pipelining + by discarding aggressively pipelined requests, which forces the + client to resend them through a new connection.

If there is only a single client, and if said client can keep connections - alive on its own, enabling this option has next to no effect. If the client - doesn't support connection keep-alive, enabling this option may make sense - as it allows This option lets Privoxy to keep outgoing connections alive even if the client - itself doesn't support it. +> tolerate pipelining. Whether or not + that improves performance mainly depends on the client configuration.

This option should only be used by experienced users who - understand the risks and can weight them against the benefits. +> If you are seeing problems with pages not properly loading, + disabling this option could work around the problem.

Examples:

connection-sharing 1 +> tolerate-pipelining 1

7.6.6. socket-timeout7.6.6. default-server-timeout

Specifies:

Assumed server-side keep-alive timeout if not specified by the server. +

Type of value:

Time in seconds. +

Default value:

None

Effect if unset:

Connections for which the server didn't specify the keep-alive + timeout are not reused. +

Notes:

Enabling this option significantly increases the number of connections + that are reused, provided the keep-alive-timeout option + is also enabled. +

While it also increases the number of connections problems + when Privoxy tries to reuse a connection that already has + been closed on the server side, or is closed while Privoxy + is trying to reuse it, this should only be a problem if it + happens for the first request sent by the client. If it happens + for requests on reused client connections, Privoxy will simply + close the connection and the client is supposed to retry the + request without bothering the user. +

Enabling this option is therefore only recommended if the + connection-sharing option + is disabled. +

It is an error to specify a value larger than the keep-alive-timeout value. +

This option has no effect if Privoxy + has been compiled without keep-alive support. +

Examples:

default-server-timeout 60 +

7.6.7. connection-sharing

Specifies:

Whether or not outgoing connections that have been kept alive + should be shared between different incoming connections. +

Type of value:

0 or 1 +

Default value:

None

Effect if unset:

Connections are not shared. +

Notes:

This option has no effect if Privoxy + has been compiled without keep-alive support, or if it's disabled. +

Notes:

Note that reusing connections doesn't necessary cause speedups. + There are also a few privacy implications you should be aware of. +

If this option is effective, outgoing connections are shared between + clients (if there are more than one) and closing the browser that initiated + the outgoing connection does no longer affect the connection between Privoxy + and the server unless the client's request hasn't been completed yet. +

If the outgoing connection is idle, it will not be closed until either + Privoxy's or the server's timeout is reached. + While it's open, the server knows that the system running Privoxy is still + there. +

If there are more than one client (maybe even belonging to multiple users), + they will be able to reuse each others connections. This is potentially + dangerous in case of authentication schemes like NTLM where only the + connection is authenticated, instead of requiring authentication for + each request. +

If there is only a single client, and if said client can keep connections + alive on its own, enabling this option has next to no effect. If the client + doesn't support connection keep-alive, enabling this option may make sense + as it allows Privoxy to keep outgoing connections alive even if the client + itself doesn't support it. +

You should also be aware that enabling this option increases the likelihood + of getting the "No server or forwarder data" error message, especially if you + are using a slow connection to the Internet. +

This option should only be used by experienced users who + understand the risks and can weight them against the benefits. +

Examples:

connection-sharing 1 +

7.6.8. socket-timeout

Default value:

None

None

Effect if unset:

A default value of 300 seconds is used. +

Notes:

The default is quite high and you probably want to reduce it. + If you aren't using an occasionally slow proxy like Tor, reducing + it to a few seconds should be fine. +

Examples:

socket-timeout 300 +

7.6.9. max-client-connections

Specifies:

Maximum number of client connections that will be served. +

Type of value:

Positive number. +

Default value:

128

Effect if unset:

Connections are served until a resource limit is reached. +

Notes:

Privoxy creates one thread (or process) for every incoming client + connection that isn't rejected based on the access control settings. +

If the system is powerful enough, Privoxy can theoretically deal with + several hundred (or thousand) connections at the same time, but some + operating systems enforce resource limits by shutting down offending + processes and their default limits may be below the ones Privoxy would + require under heavy load. +

Configuring Privoxy to enforce a connection limit below the thread + or process limit used by the operating system makes sure this doesn't + happen. Simply increasing the operating system's limit would work too, + but if Privoxy isn't the only application running on the system, + you may actually want to limit the resources used by Privoxy. +

If Privoxy is only used by a single trusted user, limiting the + number of client connections is probably unnecessary. If there + are multiple possibly untrusted users you probably still want to + additionally use a packet filter to limit the maximal number of + incoming connections per client. Otherwise a malicious user could + intentionally create a high number of connections to prevent other + users from using Privoxy. +

Obviously using this option only makes sense if you choose a limit + below the one enforced by the operating system. +

One most POSIX-compliant systems Privoxy can't properly deal with + more than FD_SETSIZE file descriptors at the same time and has to reject + connections if the limit is reached. This will likely change in a + future version, but currently this limit can't be increased without + recompiling Privoxy with a different FD_SETSIZE limit. +

Examples:

max-client-connections 256 +

7.6.10. listen-backlog

Specifies:

Connection queue length requested from the operating system. +

Type of value:

Number. +

Default value:

128

Effect if unset:

A connection queue length of 128 is requested from the operating system. +

Notes:

Under high load incoming connection may queue up before Privoxy + gets around to serve them. The queue length is limitted by the + operating system. Once the queue is full, additional connections + are dropped before Privoxy can accept and serve them. +

Increasing the queue length allows Privoxy to accept more + incomming connections that arrive roughly at the same time. +

Note that Privoxy can only request a certain queue length, + whether or not the requested length is actually used depends + on the operating system which may use a different length instead. +

On many operating systems a limit of -1 can be specified to + instruct the operating system to use the maximum queue length + allowed. Check the listen man page to see if your platform allows this. +

On some platforms you can use "netstat -Lan -p tcp" to see the effective + queue length. +

Effectively using a value above 128 usually requires changing + the system configuration as well. On FreeBSD-based system the + limit is controlled by the kern.ipc.soacceptqueue sysctl. +

Examples:

listen-backlog 4096 +

7.6.11. enable-accept-filter

Specifies:

Whether or not Privoxy should use an accept filter +

Type of value:

0 or 1 +

Default value:

0

Effect if unset:

No accept filter is enabled. +

Notes:

Accept filters reduce the number of context switches by not + passing sockets for new connections to Privoxy until a complete + HTTP request is available. +

As a result, Privoxy can process the whole request right away + without having to wait for additional data first. +

For this option to work, Privoxy has to be compiled with + FEATURE_ACCEPT_FILTER and the operating system has to support + it (which may require loading a kernel module). +

Currently accept filters are only supported on FreeBSD-based + systems. Check the + accf_http(9) + man page + to learn how to enable the support in the operating system. +

Examples:

enable-accept-filter 1 +

7.6.12. handle-as-empty-doc-returns-ok

Specifies:

The status code Privoxy returns for pages blocked with + + +handle-as-empty-document. +

Type of value:

0 or 1 +

Default value:

0

Effect if unset:

Privoxy returns a status 403(forbidden) for all blocked pages. +

Effect if set:

Privoxy returns a status 200(OK) for pages blocked with +handle-as-empty-document + and a status 403(Forbidden) for all other blocked pages. +

Notes:

This directive was added as a work-around for Firefox bug 492459: + "Websites are no longer rendered if SSL requests for JavaScripts are blocked by a proxy." + ( https://bugzilla.mozilla.org/show_bug.cgi?id=492459), + the bug has been fixed for quite some time, but this directive is also useful + to make it harder for websites to detect whether or not resources are being + blocked. +

7.6.13. enable-compression

Specifies:

Whether or not buffered content is compressed before delivery. +

Type of value:

0 or 1 +

Default value:

0

Effect if unset:

Privoxy does not compress buffered content. +

Effect if set:

Privoxy compresses buffered content before delivering it to the client, + provided the client supports it. +

Notes:

This directive is only supported if Privoxy has been compiled with + FEATURE_COMPRESSION, which should not to be confused with FEATURE_ZLIB. +

Compressing buffered content is mainly useful if Privoxy and the + client are running on different systems. If they are running on the + same system, enabling compression is likely to slow things down. + If you didn't measure otherwise, you should assume that it does + and keep this option disabled. +

Privoxy will not compress buffered content below a certain length. +

7.6.14. compression-level

Specifies:

The compression level that is passed to the zlib library when compressing buffered content. +

Type of value:

Positive number ranging from 0 to 9. +

Default value:

1

Notes:

Compressing the data more takes usually longer than compressing + it less or not compressing it at all. Which level is best depends + on the connection between Privoxy and the client. If you can't + be bothered to benchmark it for yourself, you should stick with + the default and keep compression disabled. +

If compression is disabled, the compression level is irrelevant. +

Examples:
    # Best speed (compared to the other levels)
+    compression-level 1
+
+    # Best compression
+    compression-level 9
+
+    # No compression. Only useful for testing as the added header
+    # slightly increases the amount of data that has to be sent.
+    # If your benchmark shows that using this compression level
+    # is superior to using no compression at all, the benchmark
+    # is likely to be flawed.
+    compression-level 0

7.6.15. client-header-order

Specifies:

The order in which client headers are sorted before forwarding them. +

Type of value:

Client header names delimited by spaces or tabs +

Default value:

None

Notes:

By default Privoxy leaves the client headers in the order they + were sent by the client. Headers are modified in-place, new headers + are added at the end of the already existing headers. +

The header order can be used to fingerprint client requests + independently of other headers like the User-Agent. +

This directive allows to sort the headers differently to better + mimic a different User-Agent. Client headers will be emitted + in the order given, headers whose name isn't explicitly specified + are added at the end. +

Note that sorting headers in an uncommon way will make fingerprinting + actually easier. Encrypted headers are not affected by this directive. +

7.6.16. client-specific-tag

Specifies:

The name of a tag that will always be set for clients that + requested it through the webinterface. +

Type of value:

Tag name followed by a description that will be shown in the webinterface +

Default value:

None

Notes:

Warning

This is an experimental feature. The syntax is likely to change + in future versions. +

Client-specific tags allow Privoxy admins to create different + profiles and let the users chose which one they want without + impacting other users. +

One use case is allowing users to circumvent certain blocks + without having to allow them to circumvent all blocks. + This is not possible with the + enable-remote-toggle feature + because it would bluntly disable all blocks for all users and also affect + other actions like filters. + It also is set globally which renders it useless in most multi-user setups. +

After a client-specific tag has been defined with the client-specific-tag + directive, action sections can be activated based on the tag by using a + CLIENT-TAG pattern. + The CLIENT-TAG pattern is evaluated at the same priority + as URL patterns, as a result the last matching pattern wins. + Tags that are created based on client or server headers are evaluated + later on and can overrule CLIENT-TAG and URL patterns! +

The tag is set for all requests that come from clients that requested + it to be set. + Note that "clients" are differentiated by IP address, + if the IP address changes the tag has to be requested again. +

Clients can request tags to be set by using the CGI interface http://config.privoxy.org/client-tags. + The specific tag description is only used on the web page and should + be phrased in away that the user understand the effect of the tag. +

Examples:
    # Define a couple of tags, the described effect requires action sections
+    # that are enabled based on CLIENT-TAG patterns.
+    client-specific-tag circumvent-blocks Overrule blocks but do not affect other actions
+    disable-content-filters Disable content-filters but do not affect other actions

7.6.17. client-tag-lifetime

Specifies:

How long a temporarily enabled tag remains enabled. +

Type of value:

Time in seconds. +

Default value:

60

Effect if unset:
Notes:

A default value of 300 seconds is used. +>

Warning

This is an experimental feature. The syntax is likely to change + in future versions. +

In case of some tags users may not want to enable them permanently, + but only for a short amount of time, for example to circumvent a block + that is the result of an overly-broad URL pattern.

Notes:

For SOCKS requests the timeout currently doesn't start until - the SOCKS server accepted the request. This will be fixed in - the next release. +> The CGI interface http://config.privoxy.org/client-tags + therefore provides a "enable this tag temporarily" option. + If it is used, the tag will be set until the client-tag-lifetime + is over.

Examples:

socket-timeout 300 -

      # Increase the time to life for temporarily enabled tags to 3 minutes
+      client-tag-lifetime 180

7.6.7. max-client-connections7.6.18. trust-x-forwarded-for

Specifies:

Maximum number of client connections that will be served. +> Whether or not Privoxy should use IP addresses specified with the X-Forwarded-For header

Positive number.0 or one

Default value:

None

0

Effect if unset:
Notes:

Connections are served until a resource limit is reached. +>

Warning

This is an experimental feature. The syntax is likely to change + in future versions. +

If clients reach Privoxy through another proxy, for example a load + balancer, Privoxy can't tell the client's IP address from the connection. + If multiple clients use the same proxy, they will share the same + client tag settings which is usually not desired. +

This option lets Privoxy use the X-Forwarded-For header value as + client IP address. If the proxy sets the header, multiple clients + using the same proxy do not share the same client tag settings. +

This option should only be enabled if Privoxy can only be reached + through a proxy and if the proxy can be trusted to set the header + correctly. It is recommended that ACL are used to make sure only + trusted systems can reach Privoxy. +

If access to Privoxy isn't limited to trusted systems, this option + would allow malicious clients to change the client tags for other + clients or increase Privoxy's memory requirements by registering + lots of client tag settings for clients that don't exist. +

Examples:
      # Allow systems that can reach Privoxy to provide the client
+      # IP address with a X-Forwarded-For header.
+      trust-x-forwarded-for 1

7.6.19. receive-buffer-size

Specifies:

The size of the buffer Privoxy uses to receive data from the server. +

Type of value:

Size in bytes

Default value:

5000

Notes:

Privoxy creates one thread (or process) for every incoming client - connection that isn't rejected based on the access control settings. +> Increasing the receive-buffer-size increases Privoxy's memory usage but + can lower the number of context switches and thereby reduce the + cpu usage and potentially increase the throughput.

If the system is powerful enough, Privoxy can theoretically deal with - several hundred (or thousand) connections at the same time, but some - operating systems enforce resource limits by shutting down offending - processes and their default limits may be below the ones Privoxy would - require under heavy load. +> This is mostly relevant for fast network connections and + large downloads that don't require filtering.

Configuring Privoxy to enforce a connection limit below the thread - or process limit used by the operating system makes sure this doesn't - happen. Simply increasing the operating system's limit would work too, - but if Privoxy isn't the only application running on the system, - you may actually want to limit the resources used by Privoxy. +> Reducing the buffer size reduces the amount of memory Privoxy + needs to handle the request but increases the number of systemcalls + and may reduce the throughput.

If Privoxy is only used by a single trusted user, limiting the - number of client connections is probably unnecessary. If there - are multiple possibly untrusted users you probably still want to - additionally use a packet filter to limit the maximal number of - incoming connections per client. Otherwise a malicious user could - intentionally create a high number of connections to prevent other - users from using Privoxy. +> A dtrace command like: + "sudo dtrace -n 'syscall::read:return /execname == "privoxy"/ { @[execname] = llquantize(arg0, 10, 0, 5, 20); @m = max(arg0)}'" + can be used to properly tune the receive-buffer-size. + On systems without dtrace, strace or truss may be used as + less convenient alternatives.

Obviously using this option only makes sense if you choose a limit - below the one enforced by the operating system. +> If the buffer is too large it will increase Privoxy's memory + footprint without any benefit. As the memory is (currently) + cleared before using it, a buffer that is too large can + actually reduce the throughput.

Examples:

max-client-connections 256 -

      # Increase the receive buffer size
+      receive-buffer-size 32768
"Privoxy" is active. To turn off, set to 0.

  activity-animation 1
-   

-

Privoxy will log messages to the console - window:

copies log messages to the console + window. + The log detail depends on the
debug directive.

  log-messages 1
-   

-

- If If "log-buffer-size" is set to 1, the size of the log buffer, @@ -4337,9 +5758,6 @@ CLASS="QUOTE" > Warning: Setting this to 0 will result in the buffer to grow infinitely and eat up all your memory!

  log-buffer-size 1
-   

-

is the maximum number of lines held in the log buffer. See above.

  log-max-lines 200
-   

-

will highlight portions of the log messages with a bold-faced font:

  log-highlight-messages 1
-   

-

The font used in the console window:

  log-font-name Comic Sans MS
-   

-

Font size used in the console window:

  log-font-size 8
-   

-

- "show-on-task-bar" controls whether or not @@ -4463,9 +5848,6 @@ CLASS="APPLICATION" > will appear as a button on the Task bar when minimized:

  show-on-task-bar 0
-   

-

instead of closing the program (close with the exit option on the File menu).

  close-button-minimizes 1
-   

-

will disconnect from and hide the command console.

  #hide-console
-   

-