that filtering does not work on compressed pages, so if you use, or want to
use, filtering, you will need to force compression off. Example:
</para>
that filtering does not work on compressed pages, so if you use, or want to
use, filtering, you will need to force compression off. Example:
</para>
<para>
Or if you use a number of filters, or filter many sites, you may just want
to turn off compression for all sites in
<para>
Or if you use a number of filters, or filter many sites, you may just want
to turn off compression for all sites in
<figure pgwide="0" float="0"><title>Proxy Configuration Showing
Mozilla/Netscape HTTP and HTTPS (SSL) Settings</title>
<mediaobject>
<figure pgwide="0" float="0"><title>Proxy Configuration Showing
Mozilla/Netscape HTTP and HTTPS (SSL) Settings</title>
<mediaobject>
<figure pgwide="0" float="0"><title>Proxy Configuration Showing
Internet Explorer HTTP and HTTPS (Secure) Settings</title>
<mediaobject>
<figure pgwide="0" float="0"><title>Proxy Configuration Showing
Internet Explorer HTTP and HTTPS (Secure) Settings</title>
<mediaobject>
<para>
Note that if you installed <application>Privoxy</application> through
a package manager, the package will probably contain a platform-specific
<para>
Note that if you installed <application>Privoxy</application> through
a package manager, the package will probably contain a platform-specific
The default profiles, and their associated actions, as pre-defined in
<filename>default.action</filename> are:
</para>
The default profiles, and their associated actions, as pre-defined in
<filename>default.action</filename> are:
</para>
<screen>
{ +<literal>handle-as-image</literal> +<literal>block{Banner ads.}</literal> }
# Block these as if they were images. Send no block page.
banners.example.com
media.example.com/.*banners
.example.com/images/ads/</screen>
<screen>
{ +<literal>handle-as-image</literal> +<literal>block{Banner ads.}</literal> }
# Block these as if they were images. Send no block page.
banners.example.com
media.example.com/.*banners
.example.com/images/ads/</screen>
<screen>
# If the admin defined the client-specific-tag circumvent-blocks,
# and the request comes from a client that previously requested
<screen>
# If the admin defined the client-specific-tag circumvent-blocks,
# and the request comes from a client that previously requested
<itemizedlist>
<listitem>
<para>
Boolean, i.e the action can only be <quote>enabled</quote> or
<quote>disabled</quote>. Syntax:
</para>
<itemizedlist>
<listitem>
<para>
Boolean, i.e the action can only be <quote>enabled</quote> or
<quote>disabled</quote>. Syntax:
</para>
<screen>
+<replaceable class="function">name</replaceable> # enable action <replaceable class="parameter">name</replaceable>
-<replaceable class="function">name</replaceable> # disable action <replaceable class="parameter">name</replaceable></screen>
<screen>
+<replaceable class="function">name</replaceable> # enable action <replaceable class="parameter">name</replaceable>
-<replaceable class="function">name</replaceable> # disable action <replaceable class="parameter">name</replaceable></screen>
<screen>
+<replaceable class="function">name</replaceable>{<replaceable class="parameter">param</replaceable>} # enable action and set parameter to <replaceable class="parameter">param</replaceable>,
# overwriting parameter from previous match if necessary
-<replaceable class="function">name</replaceable> # disable action. The parameter can be omitted</screen>
<screen>
+<replaceable class="function">name</replaceable>{<replaceable class="parameter">param</replaceable>} # enable action and set parameter to <replaceable class="parameter">param</replaceable>,
# overwriting parameter from previous match if necessary
-<replaceable class="function">name</replaceable> # disable action. The parameter can be omitted</screen>
<para>
Note that if the URL matches multiple positive forms of a parameterized action,
the last match wins, i.e. the params from earlier matches are simply ignored.
<para>
Note that if the URL matches multiple positive forms of a parameterized action,
the last match wins, i.e. the params from earlier matches are simply ignored.
that can be executed for the same request repeatedly, like adding multiple
headers, or filtering through multiple filters. Syntax:
</para>
that can be executed for the same request repeatedly, like adding multiple
headers, or filtering through multiple filters. Syntax:
</para>
<screen>
+<replaceable class="function">name</replaceable>{<replaceable class="parameter">param</replaceable>} # enable action and add <replaceable class="parameter">param</replaceable> to the list of parameters
-<replaceable class="function">name</replaceable>{<replaceable class="parameter">param</replaceable>} # remove the parameter <replaceable class="parameter">param</replaceable> from the list of parameters
# If it was the last one left, disable the action.
<replaceable class="parameter">-name</replaceable> # disable this action completely and remove all parameters from the list</screen>
<screen>
+<replaceable class="function">name</replaceable>{<replaceable class="parameter">param</replaceable>} # enable action and add <replaceable class="parameter">param</replaceable> to the list of parameters
-<replaceable class="function">name</replaceable>{<replaceable class="parameter">param</replaceable>} # remove the parameter <replaceable class="parameter">param</replaceable> from the list of parameters
# If it was the last one left, disable the action.
<replaceable class="parameter">-name</replaceable> # disable this action completely and remove all parameters from the list</screen>
<para>
Examples: <literal>+add-header{X-Fun-Header: Some text}</literal> and
<literal>+filter{html-annoyances}</literal>
<para>
Examples: <literal>+add-header{X-Fun-Header: Some text}</literal> and
<literal>+filter{html-annoyances}</literal>
<screen># Add a DNT ("Do not track") header to all requests,
# event to those that already have one.
#
<screen># Add a DNT ("Do not track") header to all requests,
# event to those that already have one.
#
<screen># Check if www.example.net/ really uses valid XHTML
{ +content-type-overwrite{application/xml} }
www.example.net/
<screen># Check if www.example.net/ really uses valid XHTML
{ +content-type-overwrite{application/xml} }
www.example.net/
<screen># Block the non-existent "Privacy-Violation:" client header
{ +crunch-client-header{Privacy-Violation:} }
/
</screen>
<screen># Block the non-existent "Privacy-Violation:" client header
{ +crunch-client-header{Privacy-Violation:} }
/
</screen>
<screen># Let the browser revalidate cached documents but don't
# allow the server to use the revalidation headers for user tracking.
{+hide-if-modified-since{-60} \
+overwrite-last-modified{randomize} \
+crunch-if-none-match}
/ </screen>
<screen># Let the browser revalidate cached documents but don't
# allow the server to use the revalidation headers for user tracking.
{+hide-if-modified-since{-60} \
+overwrite-last-modified{randomize} \
+crunch-if-none-match}
/ </screen>
<screen>
{ +fast-redirects{simple-check} }
one.example.com
{ +fast-redirects{check-decoded-url} }
another.example.com/testing</screen>
<screen>
{ +fast-redirects{simple-check} }
one.example.com
{ +fast-redirects{check-decoded-url} }
another.example.com/testing</screen>
<screen>
# Use an ssh tunnel for requests previously tagged as
# <quote>User-Agent: fetch libfetch/2.0</quote> and make sure
<screen>
# Use an ssh tunnel for requests previously tagged as
# <quote>User-Agent: fetch libfetch/2.0</quote> and make sure
<screen># Block all documents on example.org that end with ".js",
# but send an empty document instead of the usual HTML message.
{+block{Blocked JavaScript} +handle-as-empty-document}
example.org/.*\.js$
</screen>
<screen># Block all documents on example.org that end with ".js",
# but send an empty document instead of the usual HTML message.
{+block{Blocked JavaScript} +handle-as-empty-document}
example.org/.*\.js$
</screen>
<screen># Pretend to use Canadian language settings.
{+hide-accept-language{en-ca} \
+hide-user-agent{Mozilla/5.0 (X11; U; OpenBSD i386; en-CA; rv:1.8.0.4) Gecko/20060628 Firefox/1.5.0.4} \
}
/ </screen>
<screen># Pretend to use Canadian language settings.
{+hide-accept-language{en-ca} \
+hide-user-agent{Mozilla/5.0 (X11; U; OpenBSD i386; en-CA; rv:1.8.0.4) Gecko/20060628 Firefox/1.5.0.4} \
}
/ </screen>
<screen># Disarm the download link in Sourceforge's patch tracker
{ -filter \
+content-type-overwrite{text/plain}\
+hide-content-disposition{block} }
.sourceforge.net/tracker/download\.php</screen>
<screen># Disarm the download link in Sourceforge's patch tracker
{ -filter \
+content-type-overwrite{text/plain}\
+hide-content-disposition{block} }
.sourceforge.net/tracker/download\.php</screen>
<screen># Let the browser revalidate but make tracking based on the time less likely.
{+hide-if-modified-since{-60} \
+overwrite-last-modified{randomize} \
+crunch-if-none-match}
/</screen>
<screen># Let the browser revalidate but make tracking based on the time less likely.
{+hide-if-modified-since{-60} \
+overwrite-last-modified{randomize} \
+crunch-if-none-match}
/</screen>
<!-- I had trouble getting the spacing to look right in my browser -->
<!-- I probably have the wrong font setup, bollocks. -->
<!-- Apparently the emphasis tag uses a proportional font no matter what -->
<!-- I had trouble getting the spacing to look right in my browser -->
<!-- I probably have the wrong font setup, bollocks. -->
<!-- Apparently the emphasis tag uses a proportional font no matter what -->
<screen>+limit-connect{443} # Port 443 is OK.
+limit-connect{80,443} # Ports 80 and 443 are OK.
+limit-connect{-3, 7, 20-100, 500-} # Ports less than 3, 7, 20 to 100 and above 500 are OK.
+limit-connect{-} # All ports are OK
+limit-connect{,} # No HTTPS/SSL traffic is allowed</screen>
<screen>+limit-connect{443} # Port 443 is OK.
+limit-connect{80,443} # Ports 80 and 443 are OK.
+limit-connect{-3, 7, 20-100, 500-} # Ports less than 3, 7, 20 to 100 and above 500 are OK.
+limit-connect{-} # All ports are OK
+limit-connect{,} # No HTTPS/SSL traffic is allowed</screen>
<screen># Let the browser revalidate without being tracked across sessions
{ +hide-if-modified-since{-60} \
+overwrite-last-modified{randomize} \
+crunch-if-none-match}
/</screen>
<screen># Let the browser revalidate without being tracked across sessions
{ +hide-if-modified-since{-60} \
+overwrite-last-modified{randomize} \
+crunch-if-none-match}
/</screen>
<screen># Replace example.com's style sheet with another one
{ +redirect{http://localhost/css-replacements/example.com.css} }
example.com/stylesheet\.css
<screen># Replace example.com's style sheet with another one
{ +redirect{http://localhost/css-replacements/example.com.css} }
example.com/stylesheet\.css
# to the local version delivered by Privoxy
{+redirect{s@^http://www@http://config@}}
www.privoxy.org/user-manual/</screen>
# to the local version delivered by Privoxy
{+redirect{s@^http://www@http://config@}}
www.privoxy.org/user-manual/</screen>
<screen>
# Tag every request with the content type declared by the server
{+server-header-tagger{content-type}}
<screen>
# Tag every request with the content type declared by the server
{+server-header-tagger{content-type}}
# <literal><link linkend="external-filter-syntax">silly example</link></literal>.
{+external-filter{rotate-image} +force-text-mode}
TAG:^image/
# <literal><link linkend="external-filter-syntax">silly example</link></literal>.
{+external-filter{rotate-image} +force-text-mode}
TAG:^image/
<screen>
# These sites are either very complex or very keen on
# user data and require minimal interference to work:
<screen>
# These sites are either very complex or very keen on
# user data and require minimal interference to work:
<screen>
##########################################################################
# Settings -- Don't change! For internal Privoxy use ONLY.
##########################################################################
{{settings}}
for-privoxy-version=3.0.11</screen>
<screen>
##########################################################################
# Settings -- Don't change! For internal Privoxy use ONLY.
##########################################################################
{{settings}}
for-privoxy-version=3.0.11</screen>
#
fragile = -<link linkend="BLOCK">block</link> -<link linkend="FILTER">filter</link> -crunch-all-cookies -<link linkend="FAST-REDIRECTS">fast-redirects</link> -<link linkend="HIDE-REFERER">hide-referrer</link>
shop = -crunch-all-cookies -<link linkend="FILTER-ALL-POPUPS">filter{all-popups}</link></screen>
#
fragile = -<link linkend="BLOCK">block</link> -<link linkend="FILTER">filter</link> -crunch-all-cookies -<link linkend="FAST-REDIRECTS">fast-redirects</link> -<link linkend="HIDE-REFERER">hide-referrer</link>
shop = -crunch-all-cookies -<link linkend="FILTER-ALL-POPUPS">filter{all-popups}</link></screen>
<screen>
##########################################################################
# Exceptions for sites that'll break under the default action set:
<screen>
##########################################################################
# Exceptions for sites that'll break under the default action set:
.office.microsoft.com # surprise, surprise!
.windowsupdate.microsoft.com
mail.google.com</screen>
.office.microsoft.com # surprise, surprise!
.windowsupdate.microsoft.com
mail.google.com</screen>
<screen>
##########################################################################
# Block these fine banners:
<screen>
##########################################################################
# Block these fine banners:
<screen>
##########################################################################
# Save some innocent victims of the above generic block patterns:
<screen>
##########################################################################
# Save some innocent victims of the above generic block patterns:
# Alias for specific file types that are text, but might have conflicting
# MIME types. We want the browser to force these to be text documents.
handle-as-text = -<link linkend="FILTER">filter</link> +-<link linkend="content-type-overwrite">content-type-overwrite{text/plain}</link> +-<link linkend="FORCE-TEXT-MODE">force-text-mode</link> -<link linkend="HIDE-CONTENT-DISPOSITION">hide-content-disposition</link></screen>
# Alias for specific file types that are text, but might have conflicting
# MIME types. We want the browser to force these to be text documents.
handle-as-text = -<link linkend="FILTER">filter</link> +-<link linkend="content-type-overwrite">content-type-overwrite{text/plain}</link> +-<link linkend="FORCE-TEXT-MODE">force-text-mode</link> -<link linkend="HIDE-CONTENT-DISPOSITION">hide-content-disposition</link></screen>
<screen>
# Technical documentation is likely to contain strings that might
# erroneously get altered by the JavaScript-oriented filters:
<screen>
# Technical documentation is likely to contain strings that might
# erroneously get altered by the JavaScript-oriented filters:
# so that Privoxy thinks it is getting HTML and starts filtering:
#
stupid-server.example.com/</screen>
# so that Privoxy thinks it is getting HTML and starts filtering:
#
stupid-server.example.com/</screen>
<screen>
{ +<link linkend="BLOCK">block</link>{Nasty ads.} }
www.example.com/nasty-ads/sponsor\.gif
another.example.net/more/junk/here/</screen>
<screen>
{ +<link linkend="BLOCK">block</link>{Nasty ads.} }
www.example.com/nasty-ads/sponsor\.gif
another.example.net/more/junk/here/</screen>
<screen>
FILTER: js-annoyances Get rid of particularly annoying JavaScript abuse
# Get rid of JavaScript referrer tracking. Test page: http://www.randomoddness.com/untitled.htm
#
s|(<script.*)document\.referrer(.*</script>)|$1"Not Your Business!"$2|Usg</screen>
<screen>
FILTER: js-annoyances Get rid of particularly annoying JavaScript abuse
# Get rid of JavaScript referrer tracking. Test page: http://www.randomoddness.com/untitled.htm
#
s|(<script.*)document\.referrer(.*</script>)|$1"Not Your Business!"$2|Usg</screen>
<screen>
# The status bar is for displaying link targets, not pointless blahblah
#
s/window\.status\s*=\s*(['"]).*?\1/dUmMy=1/ig</screen>
<screen>
# The status bar is for displaying link targets, not pointless blahblah
#
s/window\.status\s*=\s*(['"]).*?\1/dUmMy=1/ig</screen>
<para>
<literal>\s</literal> stands for whitespace characters (space, tab, newline,
<para>
<literal>\s</literal> stands for whitespace characters (space, tab, newline,
<screen>
# Kill OnUnload popups. Yummy. Test: http://www.zdnet.com/zdsubs/yahoo/tree/yfs.html
#
s/(<body [^>]*)onunload(.*>)/$1never$2/iU</screen>
<screen>
# Kill OnUnload popups. Yummy. Test: http://www.zdnet.com/zdsubs/yahoo/tree/yfs.html
#
s/(<body [^>]*)onunload(.*>)/$1never$2/iU</screen>
<para>
Use with caution. This is an aggressive filter, and can break sites that
rely heavily on JavaScript.
<para>
Use with caution. This is an aggressive filter, and can break sites that
rely heavily on JavaScript.
&my-app; will temporary store the content to filter in the
<literal><link linkend="temporary-directory">temporary-directory</link></literal>.
</para>
&my-app; will temporary store the content to filter in the
<literal><link linkend="temporary-directory">temporary-directory</link></literal>.
</para>
EXTERNAL-FILTER: citation-needed Adds a "[citation needed]" tag to an image. The coordinates may need adjustment.
/usr/local/bin/convert - -pointsize 16 -fill white -annotate +17+418 "[citation needed]" -
</screen>
EXTERNAL-FILTER: citation-needed Adds a "[citation needed]" tag to an image. The coordinates may need adjustment.
/usr/local/bin/convert - -pointsize 16 -fill white -annotate +17+418 "[citation needed]" -
</screen>
<screen>
<!-- @if-unstable-start -->
... beta warning HTML code goes here ...
<!-- if-unstable-end@ --></screen>
<screen>
<!-- @if-unstable-start -->
... beta warning HTML code goes here ...
<!-- if-unstable-end@ --></screen>
<member>
<emphasis>.</emphasis> - Matches any single character, e.g. <quote>a</quote>,
<quote>A</quote>, <quote>4</quote>, <quote>:</quote>, or <quote>@</quote>.
</member>
<member>
<emphasis>.</emphasis> - Matches any single character, e.g. <quote>a</quote>,
<quote>A</quote>, <quote>4</quote>, <quote>:</quote>, or <quote>@</quote>.
</member>
<member>
<emphasis>\</emphasis> - The <quote>escape</quote> character denotes that
the following character should be taken literally. This is used where one of the
<member>
<emphasis>\</emphasis> - The <quote>escape</quote> character denotes that
the following character should be taken literally. This is used where one of the
sure the period is recognized only as a period (and not expanded to its
meta-character meaning of any single character).
</member>
sure the period is recognized only as a period (and not expanded to its
meta-character meaning of any single character).
</member>
<member>
<emphasis>[ ]</emphasis> - Characters enclosed in brackets will be matched if
any of the enclosed characters are encountered. For instance, <quote>[0-9]</quote>
matches any numeric digit (zero through nine). As an example, we can combine
this with <quote>+</quote> to match any digit one of more times: <quote>[0-9]+</quote>.
</member>
<member>
<emphasis>[ ]</emphasis> - Characters enclosed in brackets will be matched if
any of the enclosed characters are encountered. For instance, <quote>[0-9]</quote>
matches any numeric digit (zero through nine). As an example, we can combine
this with <quote>+</quote> to match any digit one of more times: <quote>[0-9]+</quote>.
</member>
<member>
<emphasis>( )</emphasis> - parentheses are used to group a sub-expression,
or multiple sub-expressions.
</member>
<member>
<emphasis>( )</emphasis> - parentheses are used to group a sub-expression,
or multiple sub-expressions.
</member>
<member>
<emphasis>|</emphasis> - The <quote>bar</quote> character works like an
<quote>or</quote> conditional statement. A match is successful if the
<member>
<emphasis>|</emphasis> - The <quote>bar</quote> character works like an
<quote>or</quote> conditional statement. A match is successful if the
and would match either <quote>this example</quote> or <quote>that
example</quote>, and nothing else.
</member>
and would match either <quote>this example</quote> or <quote>that
example</quote>, and nothing else.
</member>
<para>
NOTE: This is somewhat of a simplistic overview of what happens with each URL
request. For the sake of brevity and simplicity, we have focused on
<para>
NOTE: This is somewhat of a simplistic overview of what happens with each URL
request. For the sake of brevity and simplicity, we have focused on
In file: user.action <guibutton>[ View ]</guibutton> <guibutton>[ Edit ]</guibutton>
(no matches in this file)
</screen>
In file: user.action <guibutton>[ View ]</guibutton> <guibutton>[ Edit ]</guibutton>
(no matches in this file)
</screen>
actions that are the most likely to cause trouble. This can be used as a
last resort for problem sites.
</para>
actions that are the most likely to cause trouble. This can be used as a
last resort for problem sites.
</para>