X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=blobdiff_plain;f=doc%2Fwebserver%2Fuser-manual%2Factions-file.html;h=d62ddefe0c6df60ac03e5d75139c8fcf120d2b23;hp=454611318cbccd6ba1a694623b0d24ad2b0c7f4c;hb=60cbbc5f5d7514135bc5afc02d24e77a231c47f4;hpb=900ef1d91632a70d1bbb4c3117e9027509b35d7e diff --git a/doc/webserver/user-manual/actions-file.html b/doc/webserver/user-manual/actions-file.html index 45461131..d62ddefe 100644 --- a/doc/webserver/user-manual/actions-file.html +++ b/doc/webserver/user-manual/actions-file.html @@ -3,42 +3,25 @@ - - Actions Files - + - - +
@@ -59,7 +42,7 @@ body { Files

The actions files are used to define what actions actions Privoxy takes for which URLs, and thus determines how ad images, cookies and various other aspects of HTTP content and transactions are handled, and on which sites (or even parts thereof). @@ -103,8 +86,8 @@ body { Set to Advanced

These have increasing levels of aggressiveness and have no influence on your browsing unless - you select them explicitly in the editor. A default + "emphasis">and have no influence on your browsing + unless you select them explicitly in the editor. A default installation should be pre-set to Cautious. New users should try this for a while before adjusting the settings to more aggressive levels. The more aggressive the settings, then the @@ -134,9 +117,9 @@ body { in default.action are:

- + -

Table 1. Default Configurations

+

Table 1. Default Configurations

@@ -303,20 +286,21 @@ body { default.action), followed by any exceptions (typically also in default.action), which are then followed lastly by any local preferences (typically in user.action). - Generally, user.action has the last word.

+ "emphasis">user.action). Generally, user.action has the last word.

An actions file typically has multiple sections. If you want to use "aliases" in an actions file, you have to place the (optional) alias section at the top of that file. Then comes the default set of rules which will apply universally to all sites and pages (be very careful with using such a universal - set in user.action or any other actions file - after default.action, because it will override - the result from consulting any previous file). And then below that, - exceptions to the defined universal policies. You can regard user.action as an appendix to very careful with using such a + universal set in user.action or any other + actions file after default.action, because it + will override the result from consulting any previous file). And then + below that, exceptions to the defined universal policies. You can regard + user.action as an appendix to default.action, with the advantage that it is a separate file, which makes preserving your personal settings across Privoxy upgrades easier.

@@ -330,7 +314,7 @@ body { actions.

-

8.1. Finding the Right +

8.1. Finding the Right Mix

Note that some actions, like @@ -355,7 +339,7 @@ body {

-

8.2. How to +

8.2. How to Edit

The easiest way to edit the actions files is with a browser by using @@ -404,11 +388,11 @@ body { +handle-as-image }, then later another one with just { +block }, resulting in - both actions to apply. And - there may well be cases where you will want to combine actions - together. Such a section then might look like:

+ both actions to + apply. And there may well be cases where you will want to combine + actions together. Such a section then might look like:

-

+
@@ -438,12 +422,12 @@ body {
 
       

As mentioned, Privoxy uses "patterns" to determine what actions might apply to which sites and - pages your browser attempts to access. These actions might apply to which + sites and pages your browser attempts to access. These "patterns" use wild card type pattern matching to achieve a high degree - of flexibility. This allows one expression to be expanded and - potentially match against many similar patterns.

+ "emphasis">pattern matching to achieve a + high degree of flexibility. This allows one expression to be expanded + and potentially match against many similar patterns.

Generally, an URL pattern has the form <domain><port>/<path>, where the @@ -452,9 +436,9 @@ body { "LITERAL"><path> are optional. (This is why the special / pattern matches all URLs). Note that the protocol portion of the URL pattern (e.g. http://) should not be included in the pattern. This is - assumed already!

+ "LITERAL">http://) should not be included in the pattern. This is assumed + already!

The pattern matching syntax is different for the domain and path parts of the URL. The domain part uses a simple globbing type matching @@ -509,7 +493,8 @@ body {

matches the document /index.html, regardless of the domain, i.e. on any web server anywhere.

+ "emphasis">any web server + anywhere.

/
@@ -544,7 +529,7 @@ body {
-

8.4.1. The Domain +

8.4.1. The Domain Pattern

The matching of the domain part offers some flexible options: if @@ -569,18 +554,17 @@ body {

www.
-

matches any domain that STARTS with www. (It also matches the domain www but most of the time that doesn't - matter.)

+

matches any domain that STARTS with www. + (It also matches the domain www but + most of the time that doesn't matter.)

.example.
-

matches any domain that CONTAINS matches any domain that CONTAINS .example.. And, by the way, also included would be any files or documents that exist within that domain since no path limitations are specified. (Correctly speaking: It @@ -639,7 +623,7 @@ body { www4.example.cc, wwwd.example.cy, wwwz.example.com etc., but not not wwww.example.com.

@@ -650,7 +634,7 @@ body {

-

8.4.2. The Path +

8.4.2. The Path Pattern

Privoxy uses

Please also note that matching in the path is CASE INSENSITIVE by default, but you - can switch to case sensitive at any point in the pattern by using the - "(?-i)" switch: www.example.com/(?-i)PaTtErN.* will match only - documents whose path starts with PaTtErN in - exactly this - capitalization.

+ "emphasis">CASE INSENSITIVE by + default, but you can switch to case sensitive at any point in the + pattern by using the "(?-i)" switch: + www.example.com/(?-i)PaTtErN.* will match + only documents whose path starts with PaTtErN in exactly this capitalization.

@@ -831,14 +815,14 @@ body { "QUOTE">"enabled" or "disabled". Syntax:

- +
@@ -851,16 +835,15 @@ body {

Parameterized, where some value is required in order to enable this type of action. Syntax:

-
-  +name        # enable action name
-  -name        # disable action name
+  +name        # enable action name
+  -name        # disable action name
 
+
@@ -879,25 +862,25 @@ body {

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, all the parameters from all 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:

+ "emphasis">all the parameters from + all 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:

-
-  +name{param}  # enable action and set parameter to param,
+  +name{param}  # enable action and set parameter to param,
                # overwriting parameter from previous match if necessary
   -name         # disable action. The parameter can be omitted
+"REPLACEABLE">name         # disable action. The parameter can be omitted
 
+
@@ -981,7 +964,7 @@ body {
Example usage:
-
-  +name{param}   # enable action and add param to the list of parameters
-  -name{param}   # remove the parameter param from the list of parameters
+  +name{param}   # enable action and add param to the list of parameters
+  -name{param}   # remove the parameter param from the list of parameters
                 # If it was the last one left, disable the action.
   -name          # disable this action completely and remove all parameters from the list
+"REPLACEABLE">-name          # disable this action completely and remove all parameters from the list
 
+
@@ -1045,7 +1028,7 @@ body {
               force feature is available and enabled).

A very important exception occurs if both both block and handle-as-image, apply to the same request: it will then be replaced by an @@ -1072,7 +1055,7 @@ body {

Example usage (section):
- +
@@ -1153,7 +1136,7 @@ body {
             
Example usage:
- +
@@ -1212,7 +1195,7 @@ body {
               

Client-header filters are executed after the other header actions have finished and use their output as input.

-

If the request URL gets changed, If the request URI gets changed, Privoxy will detect that and use the new one. This can be used to rewrite the request destination behind the client's back, for example to specify a Tor exit relay for @@ -1226,7 +1209,7 @@ body {

Example usage (section):
- +
@@ -1291,7 +1274,7 @@ body {
             
Example usage (section):
- +
+ +
@@ -1318,6 +1301,28 @@ TAG:^User-Agent: fetch libfetch/
 TAG:^User-Agent: Ubuntu APT-HTTP/
 TAG:^User-Agent: MPlayer/
 
+
+
+ + + + @@ -1415,7 +1420,7 @@ TAG:^User-Agent: MPlayer/
Example usage (sections):
-
+
+# Tag all requests with the Range header set
+{+client-header-tagger{range-requests}}
+/
+
+# Disable filtering for the tagged requests.
+#
+# With filtering enabled Privoxy would remove the Range headers
+# to be able to filter the whole response. The downside is that
+# it prevents clients from resuming downloads or skipping over
+# parts of multimedia files.
+{-filter -deanimate-gifs}
+TAG:^RANGE-REQUEST$
+
 
+
@@ -1477,10 +1482,10 @@ www.example.net/.*style
               every client header that contains the string you supplied as
               parameter.

-

Regular expressions are not supported and you can't use - this action to block different headers in the same request, - unless they contain the same string.

+

Regular expressions are not supported and you can't use this + action to block different headers in the same request, unless + they contain the same string.

crunch-client-header is only meant for quick tests. If you have to block several different @@ -1492,7 +1497,7 @@ www.example.net/.*style

- + @@ -1508,7 +1513,7 @@ www.example.net/.*style
Example usage (section):
-
WarningWarning
+
@@ -1584,7 +1589,7 @@ www.example.net/.*style
             
Example usage (section):
- +
@@ -1639,15 +1644,16 @@ www.example.net/.*style
 
             

This action is only concerned with incoming HTTP cookies. For - outgoing HTTP - cookies, use incoming HTTP + cookies. For outgoing HTTP cookies, use crunch-outgoing-cookies. - Use both to disable - HTTP cookies completely.

+ Use both + to disable HTTP cookies completely.

-

It makes no sense at - all to use this action in conjunction with the +

It makes no sense + at all to use this action in conjunction with the session-cookies-only action, since it would prevent the session cookies from being @@ -1658,7 +1664,7 @@ www.example.net/.*style

Example usage:
- +
@@ -1713,10 +1719,10 @@ www.example.net/.*style
               every server header that contains the string you supplied as
               parameter.

-

Regular expressions are not supported and you can't use - this action to block different headers in the same request, - unless they contain the same string.

+

Regular expressions are not supported and you can't use this + action to block different headers in the same request, unless + they contain the same string.

crunch-server-header is only meant for quick tests. If you have to block several different @@ -1728,7 +1734,7 @@ www.example.net/.*style

- + @@ -1744,7 +1750,7 @@ www.example.net/.*style
Example usage (section):
-
WarningWarning
+
@@ -1796,15 +1802,16 @@ www.example.net/.*style
 
             

This action is only concerned with outgoing HTTP cookies. For - incoming HTTP - cookies, use outgoing HTTP + cookies. For incoming HTTP cookies, use crunch-incoming-cookies. - Use both to disable - HTTP cookies completely.

+ Use both + to disable HTTP cookies completely.

-

It makes no sense at - all to use this action in conjunction with the +

It makes no sense + at all to use this action in conjunction with the session-cookies-only action, since it would prevent the session cookies from being @@ -1814,7 +1821,7 @@ www.example.net/.*style

Example usage:
- +
@@ -1880,7 +1887,7 @@ www.example.net/.*style
             
Example usage:
- +
@@ -1949,7 +1956,7 @@ www.example.net/.*style
             
Example usage (section):
- +
@@ -2069,7 +2076,7 @@ problem-host.example.com
             
Example usage:
- +
@@ -2133,8 +2140,8 @@ problem-host.example.com
               "FILENAME">user.filter.

When used in its negative form, and without parameters, - all filtering is - completely disabled.

+ all + filtering is completely disabled.

Notes:
@@ -2218,7 +2225,7 @@ problem-host.example.com

- +
@@ -2230,7 +2237,7 @@ problem-host.example.com
 
               

- +
@@ -2243,7 +2250,7 @@ problem-host.example.com
               

- +
@@ -2256,7 +2263,7 @@ problem-host.example.com
               

- +
@@ -2269,7 +2276,7 @@ problem-host.example.com
               

- +
@@ -2282,7 +2289,7 @@ problem-host.example.com
               

- +
@@ -2294,7 +2301,7 @@ problem-host.example.com
 
               

- +
@@ -2307,7 +2314,7 @@ problem-host.example.com
               

- +
@@ -2320,7 +2327,7 @@ problem-host.example.com
               

- +
@@ -2333,7 +2340,7 @@ problem-host.example.com
               

- +
@@ -2345,7 +2352,7 @@ problem-host.example.com
 
               

- +
@@ -2358,7 +2365,7 @@ problem-host.example.com
               

- +
@@ -2371,7 +2378,7 @@ problem-host.example.com
               

- +
@@ -2384,7 +2391,7 @@ problem-host.example.com
               

- +
@@ -2397,7 +2404,7 @@ problem-host.example.com
               

- +
@@ -2410,7 +2417,7 @@ problem-host.example.com
               

- +
@@ -2423,7 +2430,7 @@ problem-host.example.com
               

- +
@@ -2435,7 +2442,7 @@ problem-host.example.com
 
               

- +
@@ -2448,7 +2455,7 @@ problem-host.example.com
               

- +
@@ -2461,7 +2468,7 @@ problem-host.example.com
               

- +
@@ -2474,7 +2481,7 @@ problem-host.example.com
               

- +
@@ -2486,7 +2493,7 @@ problem-host.example.com
 
               

- +
@@ -2498,7 +2505,7 @@ problem-host.example.com
 
               

- +
@@ -2510,7 +2517,7 @@ problem-host.example.com
 
               

- +
@@ -2522,7 +2529,7 @@ problem-host.example.com
 
               

- +
@@ -2534,7 +2541,7 @@ problem-host.example.com
 
               

- +
@@ -2559,7 +2566,7 @@ problem-host.example.com
             

Force Privoxy to treat a document as if it was in some kind of text format.

+ "emphasis">text format.

Effect:
@@ -2597,7 +2604,7 @@ problem-host.example.com
- + @@ -2614,7 +2621,7 @@ problem-host.example.com
Example usage:
-
WarningWarning
+
@@ -2706,7 +2713,7 @@ problem-host.example.com
               
- + @@ -2735,7 +2742,7 @@ problem-host.example.com
Example usage:
-
WarningWarning
+
@@ -2772,8 +2779,8 @@ TAG:^User-Agent: fetch libfetch/2\.0$
 
             

Mark URLs that should be replaced by empty documents - if they get - blocked

+ if they get + blocked

Effect:
@@ -2782,12 +2789,13 @@ TAG:^User-Agent: fetch libfetch/2\.0$

This action alone doesn't do anything noticeable. It just marks URLs. If the block action also applies, the presence or - absence of this mark decides whether an HTML "BLOCKED" page, or an empty document will be - sent to the client as a substitute for the blocked content. The - empty document isn't - literally empty, but actually contains a single space.

+ "emphasis">also applies, the + presence or absence of this mark decides whether an HTML + "BLOCKED" page, or an empty document + will be sent to the client as a substitute for the blocked + content. The empty document isn't literally empty, but + actually contains a single space.

Type:
@@ -2821,7 +2829,7 @@ TAG:^User-Agent: fetch libfetch/2\.0$
Example usage:
- +
@@ -2849,8 +2857,8 @@ example.org/.*\.js$
 
             

Mark URLs as belonging to images (so they'll be replaced by - images if they do get - blocked, rather than HTML pages)

+ images if they do + get blocked, rather than HTML pages)

Effect:
@@ -2859,10 +2867,10 @@ example.org/.*\.js$

This action alone doesn't do anything noticeable. It just marks URLs as images. If the block action also applies, the presence or - absence of this mark decides whether an HTML "blocked" page, or a replacement image (as - determined by the also applies, the + presence or absence of this mark decides whether an HTML + "blocked" page, or a replacement + image (as determined by the set-image-blocker action) will be sent to the client as a substitute for the blocked content.

@@ -2905,7 +2913,7 @@ example.org/.*\.js$
Example usage (sections):
- +
@@ -2990,7 +2998,7 @@ nasty-banner-server.example.com/junk.cgi\?output=trash
             
Example usage (section):
- +
@@ -3053,9 +3061,9 @@ nasty-banner-server.example.com/junk.cgi\?output=trash
               default.

In most browsers that understand this header, it makes it - impossible to just - view the document, without downloading it first, even if - it's just a simple text file or an image.

+ impossible to just + view the document, without downloading it first, + even if it's just a simple text file or an image.

Removing the "Content-Disposition:" header helps to prevent @@ -3076,7 +3084,7 @@ nasty-banner-server.example.com/junk.cgi\?output=trash

Example usage:
- +
@@ -3163,7 +3171,7 @@ nasty-banner-server.example.com/junk.cgi\?output=trash
             
Example usage (section):
- +
@@ -3233,7 +3241,7 @@ nasty-banner-server.example.com/junk.cgi\?output=trash
             
Example usage:
- +
@@ -3243,7 +3251,7 @@ nasty-banner-server.example.com/junk.cgi\?output=trash
                 
or - +
@@ -3352,7 +3360,7 @@ nasty-banner-server.example.com/junk.cgi\?output=trash
             
Example usage:
- +
@@ -3362,7 +3370,7 @@ nasty-banner-server.example.com/junk.cgi\?output=trash
                 
or - +
@@ -3415,7 +3423,7 @@ nasty-banner-server.example.com/junk.cgi\?output=trash
               
- + @@ -3423,9 +3431,9 @@ nasty-banner-server.example.com/junk.cgi\?output=trash

This can lead to problems on web sites that depend on looking at this header in order to customize their content for different browsers (which, by the way, is - NOT the right - thing to do: good web sites work - browser-independently).

+ NOT the right thing to do: good + web sites work browser-independently).

WarningWarning
@@ -3434,9 +3442,9 @@ nasty-banner-server.example.com/junk.cgi\?output=trash

Using this action in multi-user setups or wherever different types of browsers will access the same Privoxy is not recommended. In single-user, - single-browser setups, you might use it to delete your OS - version information from the headers, because it is an + "emphasis">not recommended. In + single-user, single-browser setups, you might use it to delete + your OS version information from the headers, because it is an invitation to exploit known bugs for your OS. It is also occasionally useful to forge this in order to access sites that won't let you in otherwise (though there may be a good reason @@ -3452,7 +3460,7 @@ nasty-banner-server.example.com/junk.cgi\?output=trash

Example usage:
- +
@@ -3528,7 +3536,7 @@ nasty-banner-server.example.com/junk.cgi\?output=trash
             
Example usages:
- +
+ +
@@ -3537,6 +3545,88 @@ nasty-banner-server.example.com/junk.cgi\?output=trash
 +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
+
+
+
+ + + + +
+

8.5.27. limit-cookie-lifetime

+ +
+
+
Typical use:
+ +
+

Limit the lifetime of HTTP cookies to a couple of minutes or + hours.

+
+ +
Effect:
+ +
+

Overwrites the expires field in Set-Cookie server headers if + it's above the specified limit.

+
+ +
Type:
+ +
+

Parameterized.

+
+ +
Parameter:
+ +
+

The lifetime limit in minutes, or 0.

+
+ +
Notes:
+ +
+

This action reduces the lifetime of HTTP cookies coming from + the server to the specified number of minutes, starting from + the time the cookie passes Privoxy.

+ +

Cookies with a lifetime below the limit are not modified. + The lifetime of session cookies is set to the specified + limit.

+ +

The effect of this action depends on the server.

+ +

In case of servers which refresh their cookies with each + response (or at least frequently), the lifetime limit set by + this action is updated as well. Thus, a session associated with + the cookie continues to work with this action enabled, as long + as a new request is made before the last limit set is + reached.

+ +

However, some servers send their cookies once, with a + lifetime of several years (the year 2037 is a popular choice), + and do not refresh them until a certain event in the future, + for example the user logging out. In this case this action may + limit the absolute lifetime of the session, even if requests + are made frequently.

+ +

If the parameter is "0", this + action behaves like session-cookies-only.

+
+ +
Example usages:
+ +
+ + + @@ -3548,7 +3638,7 @@ nasty-banner-server.example.com/junk.cgi\?output=trash

8.5.27. prevent-compression

+ "PREVENT-COMPRESSION">8.5.28. prevent-compression
@@ -3620,7 +3710,7 @@ nasty-banner-server.example.com/junk.cgi\?output=trash
Example usage (sections):
-
+
++limit-cookie-lifetime{60}
+
 
+
@@ -3652,7 +3742,7 @@ nasty-banner-server.example.com/junk.cgi\?output=trash
 
       

8.5.28. overwrite-last-modified

+ "OVERWRITE-LAST-MODIFIED">8.5.29. overwrite-last-modified
@@ -3729,7 +3819,7 @@ nasty-banner-server.example.com/junk.cgi\?output=trash
Example usage:
- +
@@ -3748,7 +3838,7 @@ nasty-banner-server.example.com/junk.cgi\?output=trash
       
 
       
-

8.5.29. +

8.5.30. redirect

@@ -3787,6 +3877,9 @@ nasty-banner-server.example.com/junk.cgi\?output=trash provided as parameter, or derived by applying a single pcrs command to the original URL.

+

The syntax for pcrs commands is documented in the filter file section.

+

This action will be ignored if you use it together with block. It can be combined @@ -3806,7 +3899,7 @@ nasty-banner-server.example.com/junk.cgi\?output=trash

Example usages:
- +
@@ -3849,7 +3942,7 @@ www.privoxy.org/user-manual/
 
       

8.5.30. server-header-filter

+ "SERVER-HEADER-FILTER">8.5.31. server-header-filter
@@ -3900,7 +3993,7 @@ www.privoxy.org/user-manual/
Example usage (section):
- +
@@ -3921,7 +4014,7 @@ example.org/instance-that-is-delivered-as-xml-but-is-not
 
       

8.5.31. server-header-tagger

+ "SERVER-HEADER-TAGGER">8.5.32. server-header-tagger
@@ -3975,7 +4068,7 @@ example.org/instance-that-is-delivered-as-xml-but-is-not
Example usage (section):
- +
@@ -3994,7 +4087,7 @@ example.org/instance-that-is-delivered-as-xml-but-is-not
 
       

8.5.32. session-cookies-only

+ "SESSION-COOKIES-ONLY">8.5.33. session-cookies-only
@@ -4003,7 +4096,7 @@ example.org/instance-that-is-delivered-as-xml-but-is-not

Allow only temporary "session" cookies (for the current browser session only).

+ "emphasis">only).

Effect:
@@ -4046,9 +4139,10 @@ example.org/instance-that-is-delivered-as-xml-but-is-not generally turned on for all sites, and is the recommended setting.

-

It makes no sense at - all to use session-cookies-only - together with It makes no sense + at all to use session-cookies-only together with crunch-incoming-cookies or crunch-outgoing-cookies. @@ -4075,7 +4169,7 @@ example.org/instance-that-is-delivered-as-xml-but-is-not

Example usage:
- +
@@ -4091,7 +4185,7 @@ example.org/instance-that-is-delivered-as-xml-but-is-not
 
       

8.5.33. set-image-blocker

+ "SET-IMAGE-BLOCKER">8.5.34. set-image-blocker
@@ -4105,15 +4199,17 @@ example.org/instance-that-is-delivered-as-xml-but-is-not

This action alone doesn't do anything noticeable. If - both block - and both + block and handle-as-image - also apply, i.e. if - the request is to be blocked as an image, then the parameter of this action - decides what will be sent as a replacement.

+ also + apply, i.e. if the request is to be blocked as an image, + then the + parameter of this action decides what will be sent as a + replacement.

Type:
@@ -4145,9 +4241,9 @@ example.org/instance-that-is-delivered-as-xml-but-is-not
  • "target-url" to send a redirect - to target-url. You can - redirect to any image anywhere, even in your local + "REPLACEABLE">target-url" to send a + redirect to target-url. + You can redirect to any image anywhere, even in your local filesystem via "file:///" URL. (But note that not all browsers support redirecting to a local file system).

    @@ -4155,11 +4251,12 @@ example.org/instance-that-is-delivered-as-xml-but-is-not

    A good application of redirects is to use special Privoxy-built-in URLs, which send the built-in images, as target-url. This has the same visual - effect as specifying "blank" or - "pattern" in the first place, - but enables your browser to cache the replacement image, - instead of requesting it over and over again.

    + "REPLACEABLE">target-url. This has the same + visual effect as specifying "blank" or "pattern" in the first place, but enables + your browser to cache the replacement image, instead of + requesting it over and over again.

  • @@ -4169,14 +4266,14 @@ example.org/instance-that-is-delivered-as-xml-but-is-not

    The URLs for the built-in images are "http://config.privoxy.org/send-banner?type=type", where type is either type", where type is either "blank" or "pattern".

    There is a third (advanced) type, called "auto". It is NOT to be used in "auto". It is NOT to be used in set-image-blocker, but meant for use from filters. Auto will select the type of image that would have applied to the referring page, @@ -4188,7 +4285,7 @@ example.org/instance-that-is-delivered-as-xml-but-is-not

    Built-in pattern:

    - +
    @@ -4200,7 +4297,7 @@ example.org/instance-that-is-delivered-as-xml-but-is-not
     
                   

    Redirect to the BSD daemon:

    - +
    @@ -4212,7 +4309,7 @@ example.org/instance-that-is-delivered-as-xml-but-is-not
     
                   

    Redirect to the built-in pattern for better caching:

    - +
    @@ -4227,7 +4324,7 @@ example.org/instance-that-is-delivered-as-xml-but-is-not
           
     
           
    -

    8.5.34. +

    8.5.35. Summary

    Note that many of these actions have the potential to cause a page @@ -4249,27 +4346,29 @@ example.org/instance-that-is-delivered-as-xml-but-is-not just like the built-in actions. Currently, an alias name can contain any character except space, tab, "=", "{" and "}", but - we strongly recommend that - you only use "a" to "z", "0" to "9", "+", and "-". Alias names are not case sensitive, and are not - required to start with a "+" or "-" sign, since they are merely textually expanded.

    + we strongly + recommend that you only use "a" + to "z", "0" to + "9", "+", and + "-". Alias names are not case sensitive, and + are not required to start with a "+" or + "-" sign, since they are merely textually + expanded.

    Aliases can be used throughout the actions file, but they - must be defined in a special section - at the top of the file! And there can only be one such section - per actions file. Each actions file may have its own alias section, and - the aliases defined in it are only visible within that file.

    + must be defined in a special + section at the top of the file! And there can only be one + such section per actions file. Each actions file may have its own alias + section, and the aliases defined in it are only visible within that + file.

    There are two main reasons to use aliases: One is to save typing for frequently used combinations of actions, the other one is a gain in flexibility: If you decide once how you want to handle shops by defining an alias called "shop", you can - later change your policy on shops in one place, and your changes will take - effect everywhere in the actions file where the one place, and your changes will take effect + everywhere in the actions file where the "shop" alias is used. Calling aliases by their purpose also makes your actions files more readable.

    @@ -4282,7 +4381,7 @@ example.org/instance-that-is-delivered-as-xml-but-is-not

    Now let's define some aliases...

    - +
    @@ -4331,7 +4430,7 @@ example.org/instance-that-is-delivered-as-xml-but-is-not
           (as specified further up for the "/"
           pattern):

    - +
    @@ -4384,12 +4483,12 @@ example.org/instance-that-is-delivered-as-xml-but-is-not
           together:

    -

    8.7.1. +

    8.7.1. match-all.action

    -

    Remember all actions are - disabled when matching starts, so we have to explicitly enable - the ones we want.

    +

    Remember all actions + are disabled when matching starts, so we have to + explicitly enable the ones we want.

    While the match-all.action file only contains a single section, it is probably the most important one. It @@ -4397,11 +4496,12 @@ example.org/instance-that-is-delivered-as-xml-but-is-not "LITERAL">/", but this pattern matches all URLs. Therefore, the set of actions used in this "default" - section will be applied to all - requests as a start. It can be partly or wholly overridden by - other actions files like default.action and - user.action, but it will still be largely - responsible for your overall browsing experience.

    + section will be applied to + all requests as a start. It can be partly or wholly + overridden by other actions files like default.action and user.action, but it will still be largely responsible + for your overall browsing experience.

    Again, at the start of matching, all actions are disabled, so there is no need to disable any actions here. (Remember: a @@ -4410,7 +4510,7 @@ example.org/instance-that-is-delivered-as-xml-but-is-not this long line has been made more readable by splitting it into multiple lines with line continuation.

    - +
    @@ -4432,7 +4532,7 @@ example.org/instance-that-is-delivered-as-xml-but-is-not
           
     
           
    -

    8.7.2. +

    8.7.2. default.action

    If you aren't a developer, there's no need for you to edit the @@ -4449,7 +4549,7 @@ example.org/instance-that-is-delivered-as-xml-but-is-not use that prevents older Privoxy versions from reading the file:

    - +
    @@ -4468,7 +4568,7 @@ for-privoxy-version=3.0.11
             "actions-file.html#ALIASES">chapter on aliases, that also
             explains why and how aliases are used:

    - +
    @@ -4511,7 +4611,7 @@ for-privoxy-version=3.0.11
             pre-defined fragile alias instead of stating
             the list of actions explicitly:

    - +
    @@ -4534,7 +4634,7 @@ mail.google.com
             cookies to log in, and pop-up windows for shopping carts or item
             details. Again, we'll use a pre-defined alias:

    - +
    @@ -4556,7 +4656,7 @@ mail.google.com
             "FILENAME">match-all.action, breaks some sites. So disable it
             for popular sites where we know it misbehaves:

    - +
    @@ -4574,17 +4674,17 @@ edit.*.yahoo.com
     
             

    It is important that Privoxy knows which URLs belong to images, so that if they are to be blocked, a substitute - image can be sent, rather than an HTML page. Contacting the remote - site to find out is not an option, since it would destroy the loading - time advantage of banner blocking, and it would feed the advertisers - information about you. We can mark any URL as an image with the - if they are to be blocked, + a substitute image can be sent, rather than an HTML page. Contacting + the remote site to find out is not an option, since it would destroy + the loading time advantage of banner blocking, and it would feed the + advertisers information about you. We can mark any URL as an image + with the handle-as-image action, and marking all URLs that end in a known image file extension is a good start:

    - +
    @@ -4605,9 +4705,9 @@ edit.*.yahoo.com
             

    And then there are known banner sources. They often use scripts to generate the banners, so it won't be visible from the URL that the request is for an image. Hence we block them and mark them as images in one go, with - the help of our +block-as-image alias - defined above. (We could of course just as well use and mark them as images in + one go, with the help of our +block-as-image + alias defined above. (We could of course just as well use +block +handle-as-image here.) Remember that the type of the replacement image is chosen by the @@ -4618,7 +4718,7 @@ edit.*.yahoo.com "actions-file.html#SET-IMAGE-BLOCKER">set-image-blocker{pattern} action before, it still applies and needn't be repeated:

    - +
    @@ -4655,7 +4755,7 @@ bs*.gsanet.com
             comes a list of individual patterns for specific sites, which is
             omitted here to keep the example short:

    - +
    @@ -4682,20 +4782,20 @@ count*.
             

    It's quite remarkable how many advertisers actually call their - banner servers ads.company.com, or - call the directory in which the banners are stored simply + banner servers ads.company.com, + or call the directory in which the banners are stored simply "banners". So the above generic patterns are surprisingly effective.

    But being very generic, they necessarily also catch URLs that we don't want to block. The pattern .*ads. e.g. - catches "nasty-ads.nasty-corp.com" as intended, - but also "downloads.sourcefroge.net" or - "adsl.some-provider.net." So here - come some well-known exceptions to the +"nasty-ads.nasty-corp.com" as intended, but + also "downloads.sourcefroge.net" or "adsl.some-provider.net." So here come + some well-known exceptions to the +block section above.

    Note that these are exceptions to exceptions from the default! @@ -4709,12 +4809,12 @@ count*. "LITERAL">+block applies. And now, it'll match .*loads., where -block - applies, so (unless it matches again further down) it ends up with no + applies, so (unless it matches again further down) it ends up with no block action applying.

    - +
    @@ -4749,10 +4849,10 @@ www.ugu.com/sui/ugu/adv
             exception for our friends at sourceforge.net, and all paths with
             "cvs" in them. Note that -filter
    -        disables all filters in one
    -        fell swoop!

    + disables all + filters in one fell swoop!

    - +
    @@ -4775,7 +4875,7 @@ wiki.
           
     
           
    -

    8.7.3. +

    8.7.3. user.action

    So far we are painting with a broad brush by setting general @@ -4787,15 +4887,16 @@ wiki. is parsed after all other actions files and hence has the last word, over-riding any previously defined actions. user.action is also a safe place for your personal settings, - since default.action is actively maintained - by the Privoxy developers and you'll - probably want to install updated versions from time to time.

    + "emphasis">safe place for your + personal settings, since default.action is + actively maintained by the Privoxy + developers and you'll probably want to install updated versions from + time to time.

    So let's look at a few examples of things that one might typically do in user.action:

    - +
    @@ -4810,7 +4911,7 @@ wiki.
             from default.action, unless you repeat them
             here:

    - +
    @@ -4855,7 +4956,7 @@ handle-as-text = -filter +-
     
    -        
    +        
    @@ -4872,7 +4973,7 @@ handle-as-text = -filter +-Your bank is allergic to some filter, but you don't know which, so
             you disable them all:

    - +
    @@ -4886,7 +4987,7 @@ handle-as-text = -filter +-Some file types you may not want to filter for various
             reasons:

    - +
    @@ -4915,7 +5016,7 @@ stupid-server.example.com/
             in .gif will be tagged as images by the
             general rules as set in default.action anyway:

    - +
    @@ -4937,7 +5038,7 @@ stupid-server.example.com/
             as a "broken image" icon by the browser.
             Use cautiously.

    - +
    @@ -4956,14 +5057,14 @@ stupid-server.example.com/
             culprit, and you were again too lazy to give feedback, so you just used the fragile alias on the site, and -- whoa! -- it worked. The fragile aliases disables those actions that are most
    -        likely to break a site. Also, good for testing purposes to see if it
    -        is Privoxy that is causing the
    -        problem or not. We later find other regular sites that misbehave, and
    -        add those to our personalized list of troublemakers:

    - - + "emphasis">whoa! -- it worked. The + fragile aliases disables those actions that + are most likely to break a site. Also, good for testing purposes to + see if it is Privoxy that is causing + the problem or not. We later find other regular sites that misbehave, + and add those to our personalized list of troublemakers:

    + +
    @@ -4981,7 +5082,7 @@ stupid-server.example.com/
             distributed actions file. So you'd like to turn it on in your
             private, update-safe config, once and for all:

    - +
    @@ -5004,7 +5105,7 @@ stupid-server.example.com/
             to survive. So you might want to specifically allow banners for those
             sites that you feel provide value to you:

    - +
    @@ -5031,7 +5132,7 @@ stupid-server.example.com/
             a download type dialog. In my case, I want to look at the shell
             script, and then I can save it should I choose to.

    - +
    @@ -5047,11 +5148,11 @@ stupid-server.example.com/
             default.action. Some actions are safe to
             have their default policies set here though. So let's set a default
             policy to have a "blank" image as opposed
    -        to the checkerboard pattern for ALL sites. "/" of course matches all URL paths and patterns:

    + to the checkerboard pattern for ALL sites. "/" of + course matches all URL paths and patterns:

    - +
    @@ -5067,7 +5168,7 @@ stupid-server.example.com/