-<variablelist>
- <varlistentry>
- <term><literal>ad*.example.com</literal></term>
- <listitem>
- <para>
- matches <quote>adserver.example.com</quote>,
- <quote>ads.example.com</quote>, etc but not <quote>sfads.example.com</quote>
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>*ad*.example.com</literal></term>
- <listitem>
- <para>
- matches all of the above, and then some.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>.?pix.com</literal></term>
- <listitem>
- <para>
- matches <literal>www.ipix.com</literal>,
- <literal>pictures.epix.com</literal>, <literal>a.b.c.d.e.upix.com</literal> etc.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>www[1-9a-ez].example.c*</literal></term>
- <listitem>
- <para>
- matches <literal>www1.example.com</literal>,
- <literal>www4.example.cc</literal>, <literal>wwwd.example.cy</literal>,
- <literal>wwwz.example.com</literal> etc., but <emphasis>not</emphasis>
- <literal>wwww.example.com</literal>.
- </para>
- </listitem>
- </varlistentry>
-</variablelist>
-
-</sect3>
-
-<!-- ~ End section ~ -->
-
-
-<!-- ~~~~~ New section ~~~~~ -->
-<sect3><title>The Path Pattern</title>
-
-<para>
- <application>Privoxy</application> uses Perl compatible regular expressions
- (through the <ulink url="http://www.pcre.org/">PCRE</ulink> library) for
- matching the path.
-</para>
-
-<para>
- There is an <link linkend="regex">Appendix</link> with a brief quick-start into regular
- expressions, and full (very technical) documentation on PCRE regex syntax is available on-line
- at <ulink url="http://www.pcre.org/man.txt">http://www.pcre.org/man.txt</ulink>.
- You might also find the Perl man page on regular expressions (<literal>man perlre</literal>)
- useful, which is available on-line at <ulink
- url="http://www.perldoc.com/perl5.6/pod/perlre.html">http://www.perldoc.com/perl5.6/pod/perlre.html</ulink>.
-</para>
-
-<para>
- Note that the path pattern is automatically left-anchored at the <quote>/</quote>,
- i.e. it matches as if it would start with a <quote>^</quote> (regular expression speak
- for the beginning of a line).
-</para>
-
-<para>
- Please also note that matching in the path is case
- <emphasis>INSENSITIVE</emphasis> by default, but you can switch to case
- sensitive at any point in the pattern by using the
- <quote>(?-i)</quote> switch:
- <literal>www.example.com/(?-i)PaTtErN.*</literal> will match only
- documents whose path starts with <literal>PaTtErN</literal> in
- <emphasis>exactly</emphasis> this capitalization.
-</para>
-</sect3>
-
-</sect2>
-
-<!-- ~ End section ~ -->
-
-
-<!-- ~~~~~ New section ~~~~~ -->
-
-<sect2 id="actions">
-<title>Actions</title>
-<para>
- All actions are disabled by default, until they are explicitly enabled
- somewhere in an actions file. Actions are turned on if preceded with a
- <quote>+</quote>, and turned off if preceded with a <quote>-</quote>. So a
- <literal>+action</literal> means <quote>do that action</quote>, e.g.
- <literal>+block</literal> means <quote>please block URLs that match the
- following patterns</quote>, and <literal>-block</literal> means <quote>don't
- block URLs that match the following patterns, even if <literal>+block</literal>
- previously applied.</quote>
-
-</para>
-
-<para>
- Again, actions are invoked by placing them on a line, enclosed in curly braces and
- separated by whitespace, like in
- <literal>{+some-action -some-other-action{some-parameter}}</literal>,
- followed by a list of URL patterns, one per line, to which they apply.
- Together, the actions line and the following pattern lines make up a section
- of the actions file.
-</para>
-
-<para>
- There are three classes of actions:
-</para>
-
-<para>
- <itemizedlist>
- <listitem>
- <para>
- Boolean, i.e the action can only be <quote>enabled</quote> or
- <quote>disabled</quote>. Syntax:
- </para>
- <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>
- </para>
- <para>
- Example: <literal>+block</literal>
- </para>
- </listitem>
-
-
- <listitem>
- <para>
- Parameterized, where some value is required in order to enable this type of action.
- Syntax:
- </para>
- <para>
- <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>
- <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>
- <para>
- Example: <literal>+hide-user-agent{ Mozilla 1.0 }</literal>
- </para>
- </listitem>
-
- <listitem>
- <para>
- Multi-value. These look exactly like parameterized actions,
- but they behave differently: If the action applies multiple times to the
- same URL, but with different parameters, <emphasis>all</emphasis> the parameters
- from <emphasis>all</emphasis> matches are remembered. This is used for actions
- that can be executed for the same request repeatedly, like adding multiple
- headers, or filtering through multiple filters. Syntax:
- </para>
- <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>
- </para>
- <para>
- Examples: <literal>+add-header{X-Fun-Header: Some text}</literal> and
- <literal>+filter{html-annoyances}</literal>
- </para>
- </listitem>
-
- </itemizedlist>
-</para>
-
-<para>
- If nothing is specified in any actions file, no <quote>actions</quote> are
- taken. So in this case <application>Privoxy</application> would just be a
- normal, non-blocking, non-anonymizing proxy. You must specifically enable the
- privacy and blocking features you need (although the provided default actions
- files will give a good starting point).
-</para>
-
-<para>
- Later defined actions always over-ride earlier ones. So exceptions
- to any rules you make, should come in the latter part of the file (or
- in a file that is processed later when using multiple actions files). For
- multi-valued actions, the actions are applied in the order they are specified.
- Actions files are processed in the order they are defined in
- <filename>config</filename> (the default installation has three actions
- files). It also quite possible for any given URL pattern to match more than
- one pattern and thus more than one set of actions!
-</para>
-
-<!-- start actions listing -->
-<para>
- The list of valid <application>Privoxy</application> actions are:
-</para>
-
-
-<!-- ********************************************************** -->
-<!-- Please note the below defined actions use id's that are -->
-<!-- probably linked from other places, so please don't change. -->
-<!-- -->
-<!-- ********************************************************** -->
-
-
-<!-- ~~~~~ New section ~~~~~ -->
-
-<sect3 renderas="sect4" id="add-header">
-<title><emphasis>+add-header</emphasis></title>
-
-<variablelist>
- <varlistentry>
- <term>Type:</term>
- <!-- boolean, parameterized, Multi-value -->
- <listitem>
- <para>Multi-value.</para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Purpose and typical uses:</term>
- <listitem>
- <para>
- Send a user defined HTTP header to the web server. Can be used to confuse log analysis.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Possible values:</term>
- <listitem>
- <para>
- Any value is possible. Validity of the defined HTTP headers is not checked.
- It is recommended that you use the <quote><literal>X-</literal></quote> prefix
- for custom headers.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Example usage:</term>
- <listitem>
- <literallayout>
- <emphasis>{+add-header{X-User-Tracking: sucks}}</emphasis>
- <emphasis>.example.com</emphasis></literallayout>
- </listitem>
- </varlistentry>
-
-<varlistentry>
- <term>Notes:</term>
- <listitem>
- <para>
- This action may be specified multiple times, in order to define multiple
- headers. This is rarely needed for the typical user. If you don't know what
- <quote>HTTP headers</quote> are, you definitely don't need to worry about this
- one.
- </para>
- </listitem>
- </varlistentry>
-</variablelist>
-</sect3>
-
-
-<!-- ~~~~~ New section ~~~~~ -->
-<sect3 renderas="sect4" id="block">
-<title><emphasis>+block</emphasis></title>
-
-<variablelist>
- <varlistentry>
- <term>Type:</term>
- <!-- boolean, parameterized, Multi-value -->
- <listitem>
- <para>Boolean.</para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Purpose and typical uses:</term>
- <listitem>
- <para>
- Requests for URLs to which this action applies are blocked, i.e. the requests are not
- forwarded to the remote server, but answered locally with a substitute page or image,
- as determined by the <link linkend="handle-as-image">handle-as-image</link> and
- <link linkend="set-image-blocker">set-image-blocker</link> actions.
- It is typically used to block ads or other obnoxious content.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Possible values:</term>
- <listitem>
- <para>N/A</para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Example usage:</term>
- <listitem>
- <literallayout>
- <emphasis>{+block}</emphasis>
- <emphasis>.banners.example.com</emphasis>
- <emphasis>.ads.r.us</emphasis>
- </literallayout>
- </listitem>
- </varlistentry>
-
-<varlistentry>
- <term>Notes:</term>
- <listitem>
- <para>
- If a URL matches one of the blocked patterns, <application>Privoxy</application>
- will intercept the URL and display its special <quote>BLOCKED</quote> page
- instead. If there is sufficient space, a large red banner will appear with
- a friendly message about why the page was blocked, and a way to go there
- anyway. If there is insufficient space a smaller <quote>BLOCKED</quote>
- page will appear without the red banner.
- <ulink url="http://ads.bannerserver.example.com/nasty-ads/sponsor.html">Click here</ulink>
- to view the default blocked HTML page (<application>Privoxy</application> must be running
- for this to work as intended!).
- </para>
-
- <para>
- A very important exception is if the URL <emphasis>matches both</emphasis>
- <quote>+block</quote> and <ulink
- url="actions-file.html#HANDLE-AS-IMAGE"><quote>+handle-as-image</quote></ulink>,
- then it will be handled by
- <ulink url="actions-file.html#SET-IMAGE-BLOCKER"><quote>+set-image-blocker</quote></ulink>
- (see below). It is important to understand this process, in order
- to understand how <application>Privoxy</application> is able to deal with
- ads and other objectionable content.
- </para>
- <para>
- The <ulink url="actions-file.html#FILTER"><quote>+filter</quote></ulink>
- action can also perform some of the
- same functionality as <quote>+block</quote>, but by virtue of very
- different programming techniques, and is most often used for different
- reasons.
- </para>
- </listitem>
- </varlistentry>
-
-</variablelist>
-</sect3>
-
-
-<!-- ~~~~~ New section ~~~~~ -->
-<sect3 renderas="sect4" id="deanimate-gifs">
-<title><emphasis>+deanimate-gifs</emphasis></title>
-
-<variablelist>
- <varlistentry>
- <term>Type:</term>
- <!-- boolean, parameterized, Multi-value -->
- <listitem>
- <para>Parameterized.</para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Typical uses:</term>
- <listitem>
- <para>
- To stop those annoying, distracting animated GIF images.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Possible values:</term>
- <listitem>
- <para>
- <quote>last</quote> or <quote>first</quote>
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Example usage:</term>
- <listitem>
- <literallayout>
- <emphasis>{+deanimate-gifs{last}}</emphasis>
- <emphasis>.example.com</emphasis>
- </literallayout>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Notes:</term>
- <listitem>
- <para>
- De-animate all animated GIF images, i.e. reduce them to their last frame.
- This will also shrink the images considerably (in bytes, not pixels!). If
- the option <quote>first</quote> is given, the first frame of the animation
- is used as the replacement. If <quote>last</quote> is given, the last
- frame of the animation is used instead, which probably makes more sense for
- most banner animations, but also has the risk of not showing the entire
- last frame (if it is only a delta to an earlier frame).
- </para>
- </listitem>
- </varlistentry>
-
-</variablelist>
-</sect3>
-
-<!-- ~~~~~ New section ~~~~~ -->
-<sect3 renderas="sect4" id="downgrade-http-version">
-<title><emphasis>+downgrade-http-version</emphasis></title>
-
-<variablelist>
- <varlistentry>
- <term>Type:</term>
- <!-- boolean, parameterized, Multi-value -->
- <listitem>
- <para>Boolean.</para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Typical uses:</term>
- <listitem>
- <para>
- <quote>+downgrade-http-version</quote> will downgrade HTTP/1.1 client requests to
- HTTP/1.0 and downgrade the responses as well.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Possible values:</term>
- <listitem>
- <para>
- N/A
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Example usage:</term>
- <listitem>
- <literallayout>
- <emphasis>{+downgrade-http-version}</emphasis>
- <emphasis>.example.com</emphasis>
- </literallayout>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Notes:</term>
- <listitem>
- <para>
- Use this action for servers that use HTTP/1.1 protocol features that
- <application>Privoxy</application> doesn't handle well yet. HTTP/1.1 is
- only partially implemented. Default is not to downgrade requests. This is
- an infrequently needed action, and is used to help with rare problem sites only.
- </para>
- </listitem>
- </varlistentry>
-
-</variablelist>
-</sect3>
-
-<!-- ~~~~~ New section ~~~~~ -->
-<sect3 renderas="sect4" id="fast-redirects">
-<title><emphasis>+fast-redirects</emphasis></title>
-
-<variablelist>
- <varlistentry>
- <term>Type:</term>
- <!-- boolean, parameterized, Multi-value -->
- <listitem>
- <para>Boolean.</para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Typical uses:</term>
- <listitem>
- <para>
- The <quote>+fast-redirects</quote> action enables interception of
- <quote>redirect</quote> requests from one server to another, which
- are used to track users.<application>Privoxy</application> can cut off
- all but the last valid URL in a redirect request and send a local redirect
- back to your browser without contacting the intermediate site(s).
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Possible values:</term>
- <listitem>
- <para>
- N/A
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Example usage:</term>
- <listitem>
- <literallayout>
- <emphasis>{+fast-redirects}</emphasis>
- <emphasis>.example.com</emphasis>
- </literallayout>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Notes:</term>
- <listitem>
- <para>
- Many sites, like yahoo.com, don't just link to other sites. Instead, they
- will link to some script on their own server, giving the destination as a
- parameter, which will then redirect you to the final target. URLs
- resulting from this scheme typically look like:
- <emphasis>http://some.place/some_script?http://some.where-else</emphasis>.
- </para>
- <para>
- Sometimes, there are even multiple consecutive redirects encoded in the
- URL. These redirections via scripts make your web browsing more traceable,
- since the server from which you follow such a link can see where you go
- to. Apart from that, valuable bandwidth and time is wasted, while your
- browser ask the server for one redirect after the other. Plus, it feeds
- the advertisers.
- </para>
- <para>
- This is a normally <quote>on</quote> feature, and often requires exceptions
- for sites that are sensitive to defeating this mechanism.
- </para>
- </listitem>
- </varlistentry>
-
-</variablelist>
-</sect3>
-
-
-<!-- ~~~~~ New section ~~~~~ -->
-<sect3 renderas="sect4" id="filter">
-<title><emphasis>+filter</emphasis></title>
-
-<variablelist>
- <varlistentry>
- <term>Type:</term>
- <!-- boolean, parameterized, Multi-value -->
- <listitem>
- <para>Parameterized.</para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Typical uses:</term>
- <listitem>
- <para>
- Apply page filtering as defined by named sections of the
- <filename>default.filter</filename> file to the specified site(s).
- <quote>Filtering</quote> can be any modification of the raw
- page content, including re-writing or deletion of content.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Possible values:</term>
- <listitem>
- <para>
- <quote>+filter</quote> must include the name of one of the section identifiers
- from <filename>default.filter</filename> (or whatever
- <emphasis>filterfile</emphasis> is specified in <filename>config</filename>).
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Example usage (from the current <filename>default.filter</filename>):</term>
- <listitem>
- <simplelist>
- <member>
- <anchor id="filter-html-annoyances">
- <emphasis>+filter{html-annoyances}</emphasis>: Get rid of particularly annoying HTML abuse.
- </member>
- </simplelist>
- <simplelist>
- <member>
- <anchor id="filter-js-annoyances">
- <emphasis>+filter{js-annoyances}</emphasis>: Get rid of particularly annoying JavaScript abuse
- </member>
- </simplelist>
- <simplelist>
- <member>
- <anchor id="filter-content-cookies">
- <emphasis>+filter{content-cookies}</emphasis>: Kill cookies that come in the HTML or JS content
- </member>
- </simplelist>
- <simplelist>
- <member>
- <anchor id="filter-popups">
- <emphasis>+filter{popups}</emphasis>: Kill all popups in JS and HTML
- </member>
- </simplelist>
- <simplelist>
- <member>
- <anchor id="filter-frameset-borders">
- <emphasis>+filter{frameset-borders}</emphasis>: Give frames a border and make them resizable
- </member>
- </simplelist>
- <simplelist>
- <member>
- <anchor id="filter-webbugs">
- <emphasis>+filter{webbugs}</emphasis>: Squish WebBugs (1x1 invisible GIFs used for user tracking)
- </member>
- </simplelist>
- <simplelist>
- <member>
- <anchor id="filter-refresh-tags">
- <emphasis>+filter{refresh-tags}</emphasis>: Kill automatic refresh tags (for dial-on-demand setups)
- </member>
- </simplelist>
- <simplelist>
- <member>
- <anchor id="filter-fun">
- <emphasis>+filter{fun}</emphasis>: Text replacements for subversive browsing fun!
- </member>
- </simplelist>
- <simplelist>
- <member>
- <anchor id="filter-nimda">
- <emphasis>+filter{nimda}</emphasis>: Remove Nimda (virus) code.
- </member>
- </simplelist>
- <simplelist>
- <member>
- <anchor id="filter-banners-by-size">
- <emphasis>+filter{banners-by-size}</emphasis>: Kill banners by size (<emphasis>very</emphasis> efficient!)
- </member>
- </simplelist>
- <simplelist>
- <member>
- <anchor id="filter-shockwave-flash">
- <emphasis>+filter{shockwave-flash}</emphasis>: Kill embedded Shockwave Flash objects
- </member>
- </simplelist>
- <simplelist>
- <member>
- <anchor id="filter-crude-parental">
- <emphasis>+filter{crude-parental}</emphasis>: Kill all web pages that contain the words "sex" or "warez"
- </member>
- </simplelist>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Notes:</term>
- <listitem>
- <para>
- This is potentially a very powerful feature! And requires a knowledge
- of regular expressions if you want to <quote>roll your own</quote>.
- Filtering operates on a line by line basis throughout the entire page.
- </para>
- <para>
- Filtering requires buffering the page content, which may appear to
- slow down page rendering since nothing is displayed until all content has
- passed the filters. (It does not really take longer, but seems that way
- since the page is not incrementally displayed.) This effect will be more
- noticeable on slower connections.
- </para>
- <para>
- Filtering can achieve some of the effects as the
- <ulink url="actions-file#BLOCK"><quote>+block</quote></ulink>
- action, i.e. it can be used to block ads and banners. In the overall
- scheme of things, filtering is one of the first things <quote>Privoxy</quote>
- does with a web page. So other most other actions are applied to the
- already <quote>filtered</quote> page.
- </para>
- </listitem>
- </varlistentry>
-
-</variablelist>
-</sect3>
-
-
-<!-- ~~~~~ New section ~~~~~ -->
-<sect3 renderas="sect4" id="hide-forwarded-for-headers">
-<title><emphasis>+hide-forwarded-for-headers</emphasis></title>
-
-<variablelist>
- <varlistentry>
- <term>Type:</term>
- <!-- Boolean, Parameterized, Multi-value -->
- <listitem>
- <para>Boolean.</para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Typical uses:</term>
- <listitem>
- <para>
- Block any existing X-Forwarded-for HTTP header, and do not add a new one.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Possible values:</term>
- <listitem>
- <para>
- N/A
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Example usage:</term>
- <listitem>
- <literallayout>
- <emphasis>{+hide-forwarded-for-headers}</emphasis>
- <emphasis>.example.com</emphasis>
- </literallayout>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Notes:</term>
- <listitem>
- <para>
- It is fairly safe to leave this on. It does not seem to break many sites.
- </para>
- </listitem>
- </varlistentry>
-
-</variablelist>
-</sect3>
-
-
-<!-- ~~~~~ New section ~~~~~ -->
-<sect3 renderas="sect4" id="hide-from-header">
-<title><emphasis>+hide-from-header</emphasis></title>
-
-<variablelist>
- <varlistentry>
- <term>Type:</term>
- <!-- Boolean, Parameterized, Multi-value -->
- <listitem>
- <para>Parameterized.</para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Typical uses:</term>
- <listitem>
- <para>
- To block the browser from sending your email address in a <quote>From:</quote>
- header.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Possible values:</term>
- <listitem>
- <para>
- Keyword: <quote>block</quote>, or any user defined value.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Example usage:</term>
- <listitem>
- <literallayout>
- <emphasis>{+hide-from-header{block}}</emphasis>
- <emphasis>.example.com</emphasis>
- </literallayout>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Notes:</term>
- <listitem>
- <para>
- The keyword <quote>block</quote> will completely remove the header
- (not to be confused with the <ulink
- url="actions-file.html#BLOCK"><quote>+block</quote></ulink> action).
- Alternately, you can specify any value you prefer to send to the web
- server.
- </para>
- </listitem>
- </varlistentry>
-
-</variablelist>
-</sect3>
-
-
-<!-- ~~~~~ New section ~~~~~ -->
-<sect3 renderas="sect4" id="hide-referer">
-<title><emphasis>+hide-referer</emphasis></title>
-<anchor id="hide-referrer">
-<variablelist>
- <varlistentry>
- <term>Type:</term>
- <!-- Boolean, Parameterized, Multi-value -->
- <listitem>
- <para>Parameterized.</para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Typical uses:</term>
- <listitem>
- <para>
- Don't send the <quote>Referer:</quote> (sic) HTTP header to the web site.
- Or, alternately send a forged header instead.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Possible values:</term>
- <listitem>
- <para>
- Prevent the header from being sent with the keyword, <quote>block</quote>.
- Or, <quote>forge</quote> a URL to one from the same server as the request.
- Or, set to user defined value of your choice.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Example usage:</term>
- <listitem>
- <literallayout>
- <emphasis>{+hide-referer{forge}}</emphasis>
- <emphasis>.example.com</emphasis>
- </literallayout>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Notes:</term>
- <listitem>
- <para>
- <quote>forge</quote> is the preferred option here, since some servers will
- not send images back otherwise.
- </para>
- <para>
- <quote>+hide-referrer</quote> is an alternate spelling of
- <quote>+hide-referer</quote>. It has the exact same parameters, and can be freely
- mixed with, <quote>+hide-referer</quote>. (<quote>referrer</quote> is the
- correct English spelling, however the HTTP specification has a bug - it
- requires it to be spelled as <quote>referer</quote>.)
- </para>
- </listitem>
- </varlistentry>
-
-</variablelist>
-</sect3>
-
-
-<!-- ~~~~~ New section ~~~~~ -->
-<sect3 renderas="sect4" id="hide-user-agent">
-<title><emphasis>+hide-user-agent</emphasis></title>
-
-<variablelist>
- <varlistentry>
- <term>Type:</term>
- <!-- Boolean, Parameterized, Multi-value -->
- <listitem>
- <para>Parameterized.</para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Typical uses:</term>
- <listitem>
- <para>
- To change the <quote>User-Agent:</quote> header so web servers can't tell
- your browser type. Who's business is it anyway?
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Possible values:</term>
- <listitem>
- <para>
- Any user defined string.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Example usage:</term>
- <listitem>
- <literallayout>
- <emphasis>{+hide-user-agent{Netscape 6.1 (X11; I; Linux 2.4.18 i686)}}</emphasis>
- <emphasis>.msn.com</emphasis>
- </literallayout>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Notes:</term>
- <listitem>
- <para>
- Warning! This breaks many web sites that depend on this in order
- to determine how the target browser will respond to various
- requests. Use with caution.
- </para>
- </listitem>
- </varlistentry>
-
-</variablelist>
-</sect3>
-
-<!-- ~~~~~ New section ~~~~~ -->
-<sect3 renderas="sect4" id="handle-as-image">
-<title><emphasis>+handle-as-image</emphasis></title>
-
-<variablelist>
- <varlistentry>
- <term>Type:</term>
- <!-- Boolean, Parameterized, Multi-value -->
- <listitem>
- <para>Boolean.</para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Typical uses:</term>
- <listitem>
- <para>
- To define what <application>Privoxy</application> should treat
- automatically as an image, and is an important ingredient of how
- ads are handled.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Possible values:</term>
- <listitem>
- <para>
- N/A
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Example usage:</term>
- <listitem>
- <literallayout>
- <emphasis>{+handle-as-image}</emphasis>
- <emphasis>/.*\.(gif|jpg|jpeg|png|bmp|ico)</emphasis>
- </literallayout>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Notes:</term>
- <listitem>
- <para>
- This only has meaning if the URL (or pattern) also is
- <quote>+block</quote>ed, in which case a user definable image can
- be sent rather than a HTML page. This is integral to the whole concept of
- ad blocking: the URL must match <emphasis>both</emphasis> a <ulink
- url="actions-file.html#BLOCK"><quote>+block</quote></ulink> rule,
- <emphasis>and</emphasis> <quote>+handle-as-image</quote>.
- (See <ulink
- url="actions-file.html#SET-IMAGE-BLOCKER"><quote>+set-image-blocker</quote></ulink>
- below for control over what will actually be displayed by the browser.)
- </para>
- <para>
- There is little reason to change the default definition for this action.
- </para>
- </listitem>
- </varlistentry>
-
-</variablelist>
-</sect3>
-
-
-<!-- ~~~~~ New section ~~~~~ -->
-<sect3 renderas="sect4" id="set-image-blocker">
-<title><emphasis>+set-image-blocker</emphasis></title>
-
-<variablelist>
- <varlistentry>
- <term>Type:</term>
- <!-- Boolean, Parameterized, Multi-value -->
- <listitem>
- <para>Parameterized.</para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Typical uses:</term>
- <listitem>
- <para>
- Decide what to do with URLs that end up tagged with <emphasis>both</emphasis>
- <ulink url="actions-file.html#BLOCK"><quote>+block</quote></ulink>
- and <ulink
- url="actions-file.html#HANDLE-AS-IMAGE"><quote>+handle-as-image</quote></ulink>,
- e.g an advertisement.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Possible values:</term>
- <listitem>
- <para>
- There are four available options: <quote>-set-image-blocker</quote> will send a HTML
- <quote>blocked</quote> page, usually resulting in a <quote>broken
- image</quote> icon.
- <quote>+set-image-blocker{<emphasis>blank</emphasis>}</quote> will send a
- 1x1 transparent GIF image.
- <quote>+set-image-blocker{<emphasis>pattern</emphasis>}</quote> will send a
- checkerboard type pattern (the default). And finally,
- <quote>+set-image-blocker{<emphasis>http://xyz.com</emphasis>}</quote> will
- send a HTTP temporary redirect to the specified image. This has the
- advantage of the icon being being cached by the browser, which will speed
- up the display.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Example usage:</term>
- <listitem>
- <literallayout>
- <emphasis>{+set-image-blocker{blank}}</emphasis>
- <emphasis>.example.com</emphasis>
- </literallayout>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Notes:</term>
- <listitem>
- <para>
- If you want <emphasis>invisible</emphasis> ads, they need to meet
- criteria as matching both <emphasis>images</emphasis> and <emphasis>blocked</emphasis>
- actions. And then, <quote>image-blocker</quote> should be set to
- <quote>blank</quote> for invisibility. Note you cannot treat HTML pages as
- images in most cases. For instance, frames require an HTML page to
- display. So a frame that is an ad, typically cannot be treated as an image.
- Forcing an <quote>image</quote> in this situation just will not work
- reliably.
- </para>
- </listitem>
- </varlistentry>
-
-</variablelist>
-</sect3>
-
-<!-- ~~~~~ New section ~~~~~ -->
-<sect3 renderas="sect4" id="limit-connect">
-<title><emphasis>+limit-connect</emphasis></title>
-
-<variablelist>
- <varlistentry>
- <term>Type:</term>
- <!-- Boolean, Parameterized, Multi-value -->
- <listitem>
- <para>Parameterized.</para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Typical uses:</term>
- <listitem>
- <para>
- By default, <application>Privoxy</application> only allows HTTP CONNECT
- requests to port 443 (the standard, secure HTTPS port). Use
- <quote>+limit-connect</quote> to disable this altogether, or to allow
- more ports.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Possible values:</term>
- <listitem>
- <para>
- Any valid port number, or port number range.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Example usages:</term>
- <listitem>
- <!-- 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 -->
- <literallayout>
- <emphasis>+limit-connect{443}</emphasis> # This is the default and need not be specified.
- <emphasis>+limit-connect{80,443}</emphasis> # Ports 80 and 443 are OK.
- <emphasis>+limit-connect{-3, 7, 20-100, 500-}</emphasis> # Port less than 3, 7, 20 to 100 and above 500 are OK.
- </literallayout>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Notes:</term>
- <listitem>
- <para>
- The CONNECT methods exists in HTTP to allow access to secure websites
- (https:// URLs) through proxies. It works very simply: the proxy connects
- to the server on the specified port, and then short-circuits its
- connections to the client <emphasis>and</emphasis> to the remote proxy.
- This can be a big security hole, since CONNECT-enabled proxies can be
- abused as TCP relays very easily.
- </para>
- <para>
- If you want to allow CONNECT for more ports than this, or want to forbid
- CONNECT altogether, you can specify a comma separated list of ports and
- port ranges (the latter using dashes, with the minimum defaulting to 0 and
- max to 65K).
- </para>
- <para>
- If you don't know what any of this means, there probably is no reason to
- change this one.
- </para>
- </listitem>
- </varlistentry>
-
-</variablelist>
-</sect3>
-
-<!-- ~~~~~ New section ~~~~~ -->
-<sect3 renderas="sect4" id="prevent-compression">
-<title><emphasis>+prevent-compression</emphasis></title>
-
-<variablelist>
- <varlistentry>
- <term>Type:</term>
- <!-- Boolean, Parameterized, Multi-value -->
- <listitem>
- <para>Boolean.</para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Typical uses:</term>
- <listitem>
- <para>
- Prevent the specified websites from compressing HTTP data.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Possible values:</term>
- <listitem>
- <para>
- N/A
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Example usage:</term>
- <listitem>
- <literallayout>
- <emphasis>{+prevent-compression}</emphasis>
- <emphasis>.example.com</emphasis>
- </literallayout>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Notes:</term>
- <listitem>
- <para>
- Some websites do this, which can be a problem for
- <application>Privoxy</application>, since
- <ulink url="actions-file.html#FILTER"><quote>+filter</quote></ulink>,
- <ulink url="actions-file.html#KILL-POPUPS"><quote>+kill-popups</quote></ulink>
- and <ulink
- url="actions-file.html#GIF-DEANIMATE"><quote>+gif-deanimate</quote></ulink>
- will not work on compressed data. This will slow down connections to those
- websites, though. Default typically is to turn
- <quote>prevent-compression</quote> on.
- </para>
- </listitem>
- </varlistentry>
-
-</variablelist>
-</sect3>
-
-<!-- ~~~~~ New section ~~~~~ -->
-<sect3 renderas="sect4" id="session-cookies-only">
-<title><emphasis>+session-cookies-only</emphasis></title>
-
-<variablelist>
- <varlistentry>
- <term>Type:</term>
- <!-- Boolean, Parameterized, Multi-value -->
- <listitem>
- <para>Boolean.</para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Typical uses:</term>
- <listitem>
- <para>
- Allow cookies for the current browser session <emphasis>only</emphasis>.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Possible values:</term>
- <listitem>
- <para>
- N/A
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Example usage (disabling):</term>
- <listitem>
- <literallayout>
- <emphasis>{-session-cookies-only}</emphasis>
- <emphasis>.example.com</emphasis>
- </literallayout>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Notes:</term>
- <listitem>
- <para>
- If websites set cookies, <quote>+session-cookies-only</quote> will make sure
- they are erased when you exit and restart your web browser. This makes
- profiling cookies useless, but won't break sites which require cookies so
- that you can log in for transactions. This is generally turned on for all
- sites, and is the recommended setting.
- </para>
- <para>
- <quote>+prevent-*-cookies</quote> actions should be turned off as well (see
- below), for <quote>+session-cookies-only</quote> to work. Or, else no cookies
- will get through at all. For, <quote>persistent</quote> cookies that survive
- across browser sessions, see below as well.
- </para>
- </listitem>
- </varlistentry>
-
-</variablelist>
-</sect3>
-
-
-<!-- ~~~~~ New section ~~~~~ -->
-<sect3 renderas="sect4" id="prevent-reading-cookies">
-<title><emphasis>+prevent-reading-cookies</emphasis></title>
-
-<variablelist>
- <varlistentry>
- <term>Type:</term>
- <!-- Boolean, Parameterized, Multi-value -->
- <listitem>
- <para>Boolean.</para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Typical uses:</term>
- <listitem>
- <para>
- Explicitly prevent the web server from reading any cookies on your
- system.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Possible values:</term>
- <listitem>
- <para>
- N/A
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Example usage:</term>
- <listitem>
- <literallayout>
- <emphasis>{+prevent-reading-cookies}</emphasis>
- <emphasis>.example.com</emphasis>
- </literallayout>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Notes:</term>
- <listitem>
- <para>
- Often used in conjunction with <quote>+prevent-setting-cookies</quote> to
- disable cookies completely. Note that
- <ulink url="actions-file.html#SESSION-COOKIES-ONLY"><quote>+session-cookies-only</quote></ulink>
- requires these to both be disabled (or else it never gets any cookies to cache).
- </para>
- <para>
- For <quote>persistent</quote> cookies to work (i.e. they survive across browser
- sessions and reboots), all three cookie settings should be <quote>off</quote>
- for the specified sites.
- </para>
- </listitem>
- </varlistentry>
-
-</variablelist>
-</sect3>
-
-
-<!-- ~~~~~ New section ~~~~~ -->
-<sect3 renderas="sect4" id="prevent-setting-cookies">
-<title><emphasis>+prevent-setting-cookies</emphasis></title>
-
-<variablelist>
- <varlistentry>
- <term>Type:</term>
- <!-- Boolean, Parameterized, Multi-value -->
- <listitem>
- <para>Boolean.</para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Typical uses:</term>
- <listitem>
- <para>
- Explicitly block the web server from storing cookies on your
- system.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Possible values:</term>
- <listitem>
- <para>
- N/A
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Example usage:</term>
- <listitem>
- <literallayout>
- <emphasis>{+prevent-setting-cookies}</emphasis>
- <emphasis>.example.com</emphasis>
- </literallayout>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Notes:</term>
- <listitem>
- <para>
- Often used in conjunction with <quote>+prevent-reading-cookies</quote> to
- disable cookies completely (see above).
- </para>
- </listitem>
- </varlistentry>
-
-</variablelist>
-</sect3>
-
-
-<!-- ~~~~~ New section ~~~~~ -->
-<sect3 renderas="sect4" id="kill-popup">
-<title><emphasis>+kill-popups<anchor id="kill-popups"></emphasis></title>
-<variablelist>
- <varlistentry>
- <term>Type:</term>
- <!-- Boolean, Parameterized, Multi-value -->
- <listitem>
- <para>Boolean.</para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Typical uses:</term>
- <listitem>
- <para>
- Stop those annoying JavaScript pop-up windows!
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Possible values:</term>
- <listitem>
- <para>
- N/A
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Example usage:</term>
- <listitem>
- <literallayout>
- <emphasis>{+kill-popups}</emphasis>
- <emphasis>.example.com</emphasis>
- </literallayout>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Notes:</term>
- <listitem>
- <para>
- <quote>+kill-popups</quote> uses a built in filter to disable pop-ups
- that use the <literal>window.open()</literal> function, etc. This is
- one of the first actions processed by <application>Privoxy</application>
- as it contacts the remote web server. This action is not always 100% reliable,
- and is supplemented by <quote>+filter{<emphasis>popups</emphasis>}</quote>.
- </para>
- <!--
- <para>
- An alternate spelling is <quote>+kill-popup</quote>, which is
- interchangeable.
- </para>
- -->
- </listitem>
- </varlistentry>
-
-</variablelist>
-</sect3>
-
-
-<!-- ~~~~~ New section ~~~~~ -->
-<sect3 renderas="sect4" id="send-vanilla-wafer">
-<title><emphasis>+send-vanilla-wafer</emphasis></title>
-
-<variablelist>
- <varlistentry>
- <term>Type:</term>
- <!-- Boolean, Parameterized, Multi-value -->
- <listitem>
- <para>Boolean.</para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Typical uses:</term>
- <listitem>
- <para>
- Sends a cookie for every site stating that you do not accept any copyright
- on cookies sent to you, and asking them not to track you.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Possible values:</term>
- <listitem>
- <para>
- N/A
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Example usage:</term>
- <listitem>
- <literallayout>
- <emphasis>{+send-vanilla-wafer}</emphasis>
- <emphasis>.example.com</emphasis>
- </literallayout>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Notes:</term>
- <listitem>
- <para>
- This action only applies if you are using a <filename>jarfile</filename>
- for saving cookies. Of course, this is a (relatively) unique header and
- could conceivably be used to track you.
- </para>
- </listitem>
- </varlistentry>
-
-</variablelist>
-</sect3>
-
-
-<!-- ~~~~~ New section ~~~~~ -->
-<sect3 renderas="sect4" id="send-wafer">
-<title><emphasis>+send-wafer</emphasis></title>
-
-<variablelist>
- <varlistentry>
- <term>Type:</term>
- <!-- Boolean, Parameterized, Multi-value -->
- <listitem>
- <para>Multi-value.</para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Typical uses:</term>
- <listitem>
- <para>
- This allows you to send an arbitrary, user definable cookie.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Possible values:</term>
- <listitem>
- <para>
- User specified cookie name and corresponding value.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Example usage:</term>
- <listitem>
- <literallayout>
- <emphasis>{+send-wafer{name=value}}</emphasis>
- <emphasis>.example.com</emphasis>
- </literallayout>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Notes:</term>
- <listitem>
- <para>
- This can be specified multiple times in order to add as many cookies as you
- like.
- </para>
- </listitem>
- </varlistentry>
-
-</variablelist>
-</sect3>
-
-
-<!-- ~~~~~ New section ~~~~~ -->
-<sect3>
-<title>Summary</title>
-<para>
- Note that many of these actions have the potential to cause a page to
- misbehave, possibly even not to display at all. There are many ways
- a site designer may choose to design his site, and what HTTP header
- content, and other criteria, he may depend on. There is no way to have hard
- and fast rules for all sites. See the <link
- linkend="ACTIONSANAT">Appendix</link> for a brief example on troubleshooting
- actions.
-</para>
-</sect3>
-
-
-<!-- ~~~~~ New section ~~~~~ -->
-<sect3 renderas="sect2" id="act-examples">
-<title>Sample Actions Files</title>