<!--
- File : $Source: /cvsroot/ijbswa/current/doc/source/p-config.sgml,v $
+ File : doc/source/p-config.sgml
Purpose : Used with other docs and files only.
- $Id: p-config.sgml,v 2.127 2017/06/26 12:14:38 fabiankeil Exp $
-
- Copyright (C) 2001-2017 Privoxy Developers https://www.privoxy.org/
+ Copyright (C) 2001-2018 Privoxy Developers https://www.privoxy.org/
See LICENSE.
========================================================================
example:
</para>
-<para>
- <literal>
- <msgtext>
- <literallayout>
- <emphasis>confdir /etc/privoxy</emphasis></literallayout>
- </msgtext>
- </literal>
-</para>
+<literallayout>
+ <emphasis>confdir /etc/privoxy</emphasis>
+</literallayout>
<para>
Assigns the value <literal>/etc/privoxy</literal> to the option
Sample Configuration File for Privoxy &p-version;
</title>
<para>
- $Id: p-config.sgml,v 2.127 2017/06/26 12:14:38 fabiankeil Exp $
-</para>
-<para>
-Copyright (C) 2001-2017 Privoxy Developers https://www.privoxy.org/
+Copyright (C) 2001-2018 Privoxy Developers https://www.privoxy.org/
</para>
-<para>
- <literallayout>
+<literallayout>
##################################################################
#
Table of Contents #
7. WINDOWS GUI OPTIONS #
#
##################################################################
- </literallayout>
-</para>
-<literallayout>I. INTRODUCTION
- =============== <!-- fuck this madness --></literallayout>
+
+I. INTRODUCTION
+ ===============
+</literallayout>
<para>
This file holds Privoxy's main configuration. Privoxy detects
<para>
Unix, in local filesystem (may not work with all browsers):
</para>
- <para>
<screen> user-manual file:///usr/share/doc/privoxy-&p-version;/user-manual/</screen>
- </para>
<para>
Windows, in local filesystem, <emphasis>must</emphasis> use forward slash notation:
</para>
- <para>
<screen> user-manual file:/c:/some-dir/privoxy-&p-version;/user-manual/</screen>
- </para>
<para>
Windows, UNC notation (with forward slashes):
</para>
- <para>
<screen> user-manual file://///some-server/some-path/privoxy-&p-version;/user-manual/</screen>
- </para>
-->
<para>
The best all purpose solution is simply to put the full local
<literal>PATH</literal> to where the <citetitle>User Manual</citetitle> is
located:
</para>
- <para>
- <screen> user-manual /usr/share/doc/privoxy/user-manual</screen>
- </para>
+ <screen> user-manual /usr/share/doc/privoxy/user-manual</screen>
<para>
The User Manual is then available to anyone with access to
<application>Privoxy</application>, by following the built-in URL:
If the documentation is not on the local system, it can be accessed
from a remote server, as:
</para>
- <para>
- <screen> user-manual http://example.com/privoxy/user-manual/</screen>
- </para>
+ <screen> user-manual http://example.com/privoxy/user-manual/</screen>
<![%user-man;[
<!-- this gets hammered in conversion to config. Text repeated below. -->
<warning>
<para>
The available debug levels are:
</para>
- <para>
<programlisting>
debug 1 # Log the destination for each request &my-app; let through. See also debug 1024.
debug 2 # show each connection status
debug 32768 # log all data read from the network
debug 65536 # Log the applying actions
</programlisting>
- </para>
<para>
To select multiple debug levels, you can either add them or use
multiple <literal>debug</literal> lines.
(192.168.0.0) and has another outside connection with a different address.
You want it to serve requests from inside only:
</para>
- <para>
<programlisting>
listen-address 192.168.0.1:8118
</programlisting>
- </para>
<para>
Suppose you are running <application>Privoxy</application> on an
IPv6-capable machine and you want it to listen on the IPv6 address
of the loopback device:
</para>
- <para>
<programlisting>
listen-address [::1]:8118
</programlisting>
- </para>
</listitem>
</varlistentry>
</variablelist>
is OK. The absence of a <replaceable class="parameter">dst_addr</replaceable> implies that
<emphasis>all</emphasis> destination addresses are OK:
</para>
- <para>
<screen>
permit-access localhost
</screen>
- </para>
<para>
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):
</para>
- <para>
<screen>
permit-access www.privoxy.org/24 www.example.com/32
</screen>
- </para>
<para>
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:
</para>
- <para>
<screen>
permit-access 192.168.45.64/26
deny-access 192.168.45.73 www.dirty-stuff.example.com
</screen>
- </para>
<para>
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):
</para>
- <para>
<programlisting>
permit-access 192.0.2.0/24
</programlisting>
- </para>
<para>
This is equivalent to the following line even if listening on an
IPv4 address (not supported on all platforms):
</para>
- <para>
<programlisting>
permit-access [::ffff:192.0.2.0]/120
</programlisting>
- </para>
</listitem>
</varlistentry>
</variablelist>
</varlistentry>
</variablelist>
-<![%config-file;[<literallayout>@@trusted-cgi-referer http://www.example.org/local-privoxy-control-page</literallayout>]]>
+<![%config-file;[<literallayout>@@#trusted-cgi-referer http://www.example.org/local-privoxy-control-page</literallayout>]]>
</sect3>
</sect2>
<para>
Everything goes to an example parent proxy, except SSL on port 443 (which it doesn't handle):
</para>
- <para>
<screen>
forward / parent-proxy.example.org:8080
forward :443 .
</screen>
- </para>
<para>
Everything goes to our example ISP's caching proxy, except for requests
to that ISP's sites:
</para>
- <para>
<screen>
forward / caching-proxy.isp.example.net:8000
forward .isp.example.net .
</screen>
- </para>
<para>
Parent proxy specified by an IPv6 address:
</para>
- <para>
<programlisting>
forward / [2001:DB8::1]:8000
</programlisting>
- </para>
<para>
Suppose your parent proxy doesn't support IPv6:
</para>
- <para>
<programlisting>
forward / parent-proxy.example.org:8000
forward ipv6-server.example.org .
forward <[2-3][0-9a-f][0-9a-f][0-9a-f]:*> .
</programlisting>
- </para>
</listitem>
</varlistentry>
</variablelist>
their ISP's proxy by way of example.com's corporate SOCKS 4A gateway to
the Internet.
</para>
- <para>
<screen>
forward-socks4a / socks-gw.example.com:1080 www-cache.isp.example.net:8080
forward .example.com .
</screen>
- </para>
<para>
A rule that uses a SOCKS 4 gateway for all destinations but no HTTP parent looks like this:
</para>
- <para>
<screen>
forward-socks4 / socks-gw.example.com:1080 .
</screen>
- </para>
<para>
To chain Privoxy and Tor, both running on the same system, you would use
something like:
</para>
- <para>
<screen>
forward-socks5t / 127.0.0.1:9050 .
</screen>
- </para>
<para>
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).
reach your local network, if you need to access local servers you
therefore might want to make some exceptions:
</para>
- <para>
<screen>
forward 192.168.*.*/ .
- forward 10.*.*.*/ .
- forward 127.*.*.*/ .
+ forward 10.*.*.*/ .
+ forward 127.*.*.*/ .
</screen>
- </para>
<para>
Unencrypted connections to systems in these address ranges will
be as (un)secure as the local network is, but the alternative is that you
using their names, you will need additional exceptions that look like
this:
</para>
- <para>
<screen>
forward localhost/ .
</screen>
- </para>
</listitem>
</varlistentry>
host-a:
</para>
-<para>
<screen>
forward / .
forward .isp-b.example.net host-b:8118
</screen>
-</para>
<para>
host-b:
</para>
-<para>
<screen>
forward / .
forward .isp-a.example.org host-a:8118
</screen>
-</para>
<para>
Now, your users can set their browser's proxy to use either
run on the same box, your <application>squid</application> configuration could then look like this:
</para>
-<para>
<screen>
# Define Privoxy as parent proxy (without ICP)
cache_peer 127.0.0.1 parent 8118 7 no-query
# Forward all the rest to Privoxy
never_direct allow all</screen>
-</para>
<para>
You would then need to change your browser's proxy settings to <application>squid</application>'s address and port.
say, on <literal>antivir.example.com</literal>, port 8010:
</para>
-<para>
<screen>
forward / .
forward /.*\.(exe|com|dll|zip)$ antivir.example.com:8010</screen>
-</para>
</sect3>
]]>
<para>
This directive was added as a work-around for Firefox bug 492459:
<quote>Websites are no longer rendered if SSL requests for JavaScripts are blocked by a proxy.</quote>
- (<ulink url="https://bugzilla.mozilla.org/show_bug.cgi?id=492459"
- >https://bugzilla.mozilla.org/show_bug.cgi?id=492459</ulink>),
+ (<ulink url="https://bugzilla.mozilla.org/show_bug.cgi?id=492459">
+ https://bugzilla.mozilla.org/show_bug.cgi?id=492459</ulink>),
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.
<varlistentry>
<term>Examples:</term>
<listitem>
- <para>
<screen>
# 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
- </screen>
- </para>
+</screen>
</listitem>
</varlistentry>
</variablelist>
<varlistentry>
<term>Examples:</term>
<listitem>
- <para>
<screen>
# 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
- </screen>
- </para>
+</screen>
</listitem>
</varlistentry>
</variablelist>
<varlistentry>
<term>Examples:</term>
<listitem>
- <para>
<screen>
# Increase the time to life for temporarily enabled tags to 3 minutes
client-tag-lifetime 180
- </screen>
- </para>
+</screen>
</listitem>
</varlistentry>
</variablelist>
<varlistentry>
<term>Examples:</term>
<listitem>
- <para>
<screen>
# Allow systems that can reach Privoxy to provide the client
# IP address with a X-Forwarded-For header.
trust-x-forwarded-for 1
- </screen>
- </para>
+</screen>
</listitem>
</varlistentry>
</variablelist>
<varlistentry>
<term>Examples:</term>
<listitem>
- <para>
<screen>
# Increase the receive buffer size
receive-buffer-size 32768
- </screen>
- </para>
+</screen>
</listitem>
</varlistentry>
</variablelist>
<![%config-file;[<literallayout>@@#activity-animation 1</literallayout>]]>
<![%user-man;[
-<para>
- <literal>
- <msgtext>
<literallayout>
<emphasis>activity-animation 1</emphasis>
- </literallayout>
- </msgtext>
- </literal>
-</para>
+</literallayout>
]]>
<anchor id="log-messages">
<![%config-file;[<literallayout>@@#log-messages 1</literallayout>]]>
<![%user-man;[
-<para>
- <literal>
- <msgtext>
<literallayout>
<emphasis>log-messages 1</emphasis>
- </literallayout>
- </msgtext>
- </literal>
-</para>
+</literallayout>
]]>
<anchor id="log-buffer-size">
<![%config-file;[<literallayout>@@#log-buffer-size 1</literallayout>]]>
<![%user-man;[
-<para>
- <literal>
- <msgtext>
<literallayout>
<emphasis>log-buffer-size 1</emphasis>
- </literallayout>
- </msgtext>
- </literal>
-</para>
+</literallayout>
]]>
<anchor id="log-max-lines">
<![%config-file;[<literallayout>@@#log-max-lines 200</literallayout>]]>
<![%user-man;[
-<para>
- <literal>
- <msgtext>
<literallayout>
<emphasis>log-max-lines 200</emphasis>
- </literallayout>
- </msgtext>
- </literal>
-</para>
+</literallayout>
]]>
<anchor id="log-highlight-messages">
<![%config-file;[<literallayout>@@#log-highlight-messages 1</literallayout>]]>
<![%user-man;[
-<para>
- <literal>
- <msgtext>
<literallayout>
<emphasis>log-highlight-messages 1</emphasis>
- </literallayout>
- </msgtext>
- </literal>
-</para>
+</literallayout>
]]>
<anchor id="log-font-name">
<![%config-file;[<literallayout>@@#log-font-name Comic Sans MS</literallayout>]]>
<![%user-man;[
-<para>
- <literal>
- <msgtext>
<literallayout>
<emphasis>log-font-name Comic Sans MS</emphasis>
- </literallayout>
- </msgtext>
- </literal>
-</para>
+</literallayout>
]]>
<anchor id="log-font-size">
<![%config-file;[<literallayout>@@#log-font-size 8</literallayout>]]>
<![%user-man;[
-<para>
- <literal>
- <msgtext>
<literallayout>
<emphasis>log-font-size 8</emphasis>
- </literallayout>
- </msgtext>
- </literal>
-</para>
+</literallayout>
]]>
<anchor id="show-on-task-bar">
<![%config-file;[<literallayout>@@#show-on-task-bar 0</literallayout>]]>
<![%user-man;[
-<para>
- <literal>
- <msgtext>
<literallayout>
<emphasis>show-on-task-bar 0</emphasis>
- </literallayout>
- </msgtext>
- </literal>
-</para>
+</literallayout>
]]>
<anchor id="close-button-minimizes">
<![%config-file;[<literallayout>@@#close-button-minimizes 1</literallayout>]]>
<![%user-man;[
-<para>
- <literal>
- <msgtext>
<literallayout>
<emphasis>close-button-minimizes 1</emphasis>
- </literallayout>
- </msgtext>
- </literal>
-</para>
+</literallayout>
]]>
<anchor id="hide-console">
<![%config-file;[<literallayout>@@#hide-console</literallayout>]]>
<![%user-man;[
-<para>
- <literal>
- <msgtext>
<literallayout>
#<emphasis>hide-console</emphasis>
- </literallayout>
- </msgtext>
- </literal>
-</para>
+</literallayout>
]]>
</sect2>