1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
8 CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
10 TITLE="Privoxy 3.0.27 User Manual"
11 HREF="index.html"><LINK
13 TITLE="The Main Configuration File"
14 HREF="config.html"><LINK
17 HREF="filter-file.html"><LINK
20 HREF="../p_doc.css"><META
21 HTTP-EQUIV="Content-Type"
24 <LINK REL="STYLESHEET" TYPE="text/css" HREF="p_doc.css">
36 SUMMARY="Header navigation table"
45 >Privoxy 3.0.27 User Manual</TH
67 HREF="filter-file.html"
85 > The actions files are used to define what <SPAN
95 > takes for which URLs, and thus determines
96 how ad images, cookies and various other aspects of HTTP content and
97 transactions are handled, and on which sites (or even parts thereof).
98 There are a number of such actions, with a wide range of functionality.
99 Each action does something a little different.
100 These actions give us a veritable arsenal of tools with which to exert
101 our control, preferences and independence. Actions can be combined so that
102 their effects are aggregated when applied against a given set of URLs.</P
105 are three action files included with <SPAN
109 differing purposes:</P
117 >match-all.action</TT
118 > - is used to define which
122 > relating to banner-blocking, images, pop-ups,
123 content modification, cookie handling etc should be applied by default.
124 It should be the first actions file loaded
132 > - defines many exceptions (both
133 positive and negative) from the default set of actions that's configured
136 >match-all.action</TT
137 >. It is a set of rules that should
138 work reasonably well as-is for most users. This file is only supposed to
139 be edited by the developers. It should be the second actions file loaded.
147 > - is intended to be for local site
148 preferences and exceptions. As an example, if your ISP or your bank
149 has specific requirements, and need special handling, this kind of
150 thing should go here. This file will not be upgraded.
160 >Set to Cautious</SPAN
166 >Set to Advanced</SPAN
170 > These have increasing levels of aggressiveness <SPAN
175 influence on your browsing unless you select them explicitly in the
178 >. A default installation should be pre-set to
182 >. New users should try this for a while before
183 adjusting the settings to more aggressive levels. The more aggressive
184 the settings, then the more likelihood there is of problems such as sites
185 not working as they should.
191 > button allows you to turn each
192 action on/off individually for fine-tuning. The <SPAN
196 button changes the actions list to low/safe settings which will activate
197 ad blocking and a minimal set of <SPAN
200 >'s features, and subsequently
201 there will be less of a chance for accidental problems. The
205 > button sets the list to a medium level of
206 other features and a low level set of privacy features. The
210 > button sets the list to a high level of
211 ad blocking and medium level of privacy. See the chart below. The latter
212 three buttons over-ride any changes via with the
216 > button. More fine-tuning can be done in the
217 lower sections of this internal page.
220 > While the actions file editor allows to enable these settings in all
221 actions files, they are only supposed to be enabled in the first one
222 to make sure you don't unintentionally overrule earlier rules.
225 > The default profiles, and their associated actions, as pre-defined in
238 >Table 1. Default Configurations</B
268 >Ad-blocking Aggressiveness</TD
278 >Ad-filtering by size</TD
288 >Ad-filtering by link</TD
308 >Privacy Features</TD
338 >GIF de-animation</TD
368 >JavaScript taming</TD
388 >Image tag reordering</TD
402 > The list of actions files to be used are defined in the main configuration
403 file, and are processed in the order they are defined (e.g.
407 > is typically processed before
411 >). The content of these can all be viewed and
413 HREF="http://config.privoxy.org/show-status"
415 >http://config.privoxy.org/show-status</A
417 The over-riding principle when applying actions, is that the last action that
418 matches a given URL wins. The broadest, most general rules go first
423 followed by any exceptions (typically also in
427 >), which are then followed lastly by any
428 local preferences (typically in <SPAN
444 > An actions file typically has multiple sections. If you want to use
448 > in an actions file, you have to place the (optional)
450 HREF="actions-file.html#ALIASES"
452 > at the top of that file.
453 Then comes the default set of rules which will apply universally to all
454 sites and pages (be <SPAN
464 > or any other actions file after
468 >, because it will override the result
469 from consulting any previous file). And then below that,
470 exceptions to the defined universal policies. You can regard
474 > as an appendix to <TT
478 with the advantage that it is a separate file, which makes preserving your
479 personal settings across <SPAN
482 > upgrades easier.</P
484 > Actions can be used to block anything you want, including ads, banners, or
485 just some obnoxious URL whose content you would rather not see. Cookies can be accepted
486 or rejected, or accepted only during the current browser session (i.e. not
487 written to disk), content can be modified, some JavaScripts tamed, user-tracking
488 fooled, and much more. See below for a <A
489 HREF="actions-file.html#ACTIONS"
499 >8.1. Finding the Right Mix</A
503 HREF="actions-file.html#ACTIONS"
505 >, like cookie suppression
506 or script disabling, may render some sites unusable that rely on these
507 techniques to work properly. Finding the right mix of actions is not always easy and
508 certainly a matter of personal taste. And, things can always change, requiring
509 refinements in the configuration. In general, it can be said that the more
513 > your default settings (in the top section of the
514 actions file) are, the more exceptions for <SPAN
518 will have to make later. If, for example, you want to crunch all cookies per
519 default, you'll have to make exceptions from that rule for sites that you
520 regularly use and that require cookies for actually useful purposes, like maybe
521 your bank, favorite shop, or newspaper.</P
523 > We have tried to provide you with reasonable rules to start from in the
524 distribution actions files. But there is no general rule of thumb on these
525 things. There just are too many variables, and sites are constantly changing.
526 Sooner or later you will want to change the rules (and read this chapter again :).</P
537 > The easiest way to edit the actions files is with a browser by
538 using our browser-based editor, which can be reached from <A
539 HREF="http://config.privoxy.org/show-status"
541 >http://config.privoxy.org/show-status</A
543 Note: the config file option <A
544 HREF="config.html#ENABLE-EDIT-ACTIONS"
545 >enable-edit-actions</A
546 > must be enabled for
547 this to work. The editor allows both fine-grained control over every single
548 feature on a per-URL basis, and easy choosing from wholesale sets of defaults
559 >. Warning: the <SPAN
563 aggressive, and will be more likely to cause problems for some sites.
564 Experienced users only!
567 > If you prefer plain text editing to GUIs, you can of course also directly edit the
568 the actions files with your favorite text editor. Look at
572 > which is richly commented with many
581 >8.3. How Actions are Applied to Requests</A
584 > Actions files are divided into sections. There are special sections,
588 HREF="actions-file.html#ALIASES"
591 > sections which will
592 be discussed later. For now let's concentrate on regular sections: They have a
593 heading line (often split up to multiple lines for readability) which consist
594 of a list of actions, separated by whitespace and enclosed in curly braces.
595 Below that, there is a list of URL and tag patterns, each on a separate line.</P
597 > To determine which actions apply to a request, the URL of the request is
598 compared to all URL patterns in each <SPAN
602 Every time it matches, the list of applicable actions for the request is
603 incrementally updated, using the heading of the section in which the
604 pattern is located. The same is done again for tags and tag patterns later on.</P
606 > If multiple applying sections set the same action differently,
607 the last match wins. If not, the effects are aggregated.
608 E.g. a URL might match a regular section with a heading line of <TT
612 HREF="actions-file.html#HANDLE-AS-IMAGE"
616 then later another one with just <TT
620 HREF="actions-file.html#BLOCK"
630 > actions to apply. And there may well be
631 cases where you will want to combine actions together. Such a section then
646 >block{Banner ads.}</TT
648 # Block these as if they were images. Send no block page.
650 media.example.com/.*banners
651 .example.com/images/ads/</PRE
656 > You can trace this process for URL patterns and any given URL by visiting <A
657 HREF="http://config.privoxy.org/show-url-info"
659 >http://config.privoxy.org/show-url-info</A
662 > Examples and more detail on this is provided in the Appendix, <A
663 HREF="appendix.html#ACTIONSANAT"
664 > Troubleshooting: Anatomy of an Action</A
676 > As mentioned, <SPAN
683 to determine what <SPAN
689 > might apply to which sites and
690 pages your browser attempts to access. These <SPAN
700 > matching to achieve a high degree of
701 flexibility. This allows one expression to be expanded and potentially match
702 against many similar patterns.</P
704 > Generally, an URL pattern has the form
707 ><host><port>/<path></TT
719 > are optional. (This is why the special
723 > pattern matches all URLs). Note that the protocol
724 portion of the URL pattern (e.g. <TT
734 > be included in the pattern. This is assumed already!</P
736 > The pattern matching syntax is different for the host and path parts of
737 the URL. The host part uses a simple globbing type matching technique,
738 while the path part uses more flexible
740 HREF="http://en.wikipedia.org/wiki/Regular_expressions"
749 > The port part of a pattern is a decimal port number preceded by a colon
753 >). If the host part contains a numerical IPv6 address,
754 it has to be put into angle brackets
770 >www.example.com/</TT
774 > is a host-only pattern and will match any request to <TT
778 regardless of which document on that server is requested. So ALL pages in
779 this domain would be covered by the scope of this action. Note that a
783 > is different and would NOT match.
793 > means exactly the same. For host-only patterns, the trailing <TT
803 >www.example.com/index.html</TT
807 > matches all the documents on <TT
811 whose name starts with <TT
820 >www.example.com/index.html$</TT
824 > matches only the single document <TT
841 > matches the document <TT
844 >, regardless of the domain,
851 > web server anywhere.
861 > Matches any URL because there's no requirement for either the
862 domain or the path to match anything.
872 > Matches any URL pointing to TCP port 8000.
882 > Matches any URL with the host address <TT
886 (Note that the real URL uses plain brackets, not angle brackets.)
892 ><2001:db8::1>/</TT
896 > Matches any URL with the host address <TT
900 (Note that the real URL uses plain brackets, not angle brackets.)
910 > matches nothing, since it would be interpreted as a domain name and
911 there is no top-level domain called <TT
926 >8.4.1. The Host Pattern</A
929 > The matching of the host part offers some flexible options: if the
930 host pattern starts or ends with a dot, it becomes unanchored at that end.
931 The host pattern is often referred to as domain pattern as it is usually
932 used to match domain names and not IP addresses.
946 > matches any domain with first-level domain <TT
950 and second-level domain <TT
963 >foo.bar.baz.example.com</TT
965 Note that it wouldn't match if the second-level domain was <TT
978 > matches any domain that <SPAN
988 > (It also matches the domain
992 > but most of the time that doesn't matter.)
1002 > matches any domain that <SPAN
1012 And, by the way, also included would be any files or documents that exist
1013 within that domain since no path limitations are specified. (Correctly
1014 speaking: It matches any FQDN that contains <TT
1018 a domain.) This might be <TT
1020 >www.example.com</TT
1024 >news.example.de</TT
1028 >www.example.net/cgi/testing.pl</TT
1029 > for instance. All these
1036 > Additionally, there are wild-cards that you can use in the domain names
1037 themselves. These work similarly to shell globbing type wild-cards:
1041 > represents zero or more arbitrary characters (this is
1044 HREF="http://en.wikipedia.org/wiki/Regular_expressions"
1051 > based syntax of <SPAN
1058 > represents any single character (this is equivalent to the
1059 regular expression syntax of a simple <SPAN
1062 >), and you can define
1065 >"character classes"</SPAN
1066 > in square brackets which is similar to
1067 the same regular expression technique. All of this can be freely mixed:</P
1071 CLASS="VARIABLELIST"
1076 >ad*.example.com</TT
1082 >"adserver.example.com"</SPAN
1086 >"ads.example.com"</SPAN
1087 >, etc but not <SPAN
1089 >"sfads.example.com"</SPAN
1096 >*ad*.example.com</TT
1100 > matches all of the above, and then some.
1116 >pictures.epix.com</TT
1119 >a.b.c.d.e.upix.com</TT
1126 >www[1-9a-ez].example.c*</TT
1132 >www1.example.com</TT
1136 >www4.example.cc</TT
1139 >wwwd.example.cy</TT
1143 >wwwz.example.com</TT
1153 >wwww.example.com</TT
1160 > While flexible, this is not the sophistication of full regular expression based syntax.</P
1168 >8.4.2. The Path Pattern</A
1179 HREF="http://en.wikipedia.org/wiki/Regular_expressions"
1186 > for matching the path portion (after the slash),
1187 and is thus more flexible.</P
1190 HREF="appendix.html#REGEX"
1192 > with a brief quick-start into regular
1193 expressions, you also might want to have a look at your operating system's documentation
1194 on regular expressions (try <TT
1199 > Note that the path pattern is automatically left-anchored at the <SPAN
1203 i.e. it matches as if it would start with a <SPAN
1206 > (regular expression speak
1207 for the beginning of a line).</P
1209 > Please also note that matching in the path is <SPAN
1213 >CASE INSENSITIVE</I
1216 by default, but you can switch to case sensitive at any point in the pattern by using the
1222 >www.example.com/(?-i)PaTtErN.*</TT
1224 only documents whose path starts with <TT
1234 > this capitalization.</P
1238 CLASS="VARIABLELIST"
1243 >.example.com/.*</TT
1247 > Is equivalent to just <SPAN
1249 >".example.com"</SPAN
1250 >, since any documents
1251 within that domain are matched with or without the <SPAN
1255 regular expression. This is redundant
1261 >.example.com/.*/index.html$</TT
1265 > Will match any page in the domain of <SPAN
1267 >"example.com"</SPAN
1272 >, and that is part of some path. For
1273 example, it matches <SPAN
1275 >"www.example.com/testing/index.html"</SPAN
1279 >"www.example.com/index.html"</SPAN
1280 > because the regular
1281 expression called for at least two <SPAN
1285 requirement. It also would match
1288 >"www.example.com/testing/index_html"</SPAN
1290 special meta-character <SPAN
1299 >.example.com/(.*/)?index\.html$</TT
1303 > This regular expression is conditional so it will match any page
1307 > regardless of path which in this case can
1308 have one or more <SPAN
1311 >. And this one must contain exactly
1315 > (and end with that!).
1321 >.example.com/(.*/)(ads|banners?|junk)</TT
1325 > This regular expression will match any path of <SPAN
1327 >"example.com"</SPAN
1329 that contains any of the words <SPAN
1339 > (because of the <SPAN
1346 The path does not have to end in these words, just contain them.
1347 The path has to contain at least two slashes (including the one at the beginning).
1353 >.example.com/(.*/)(ads|banners?|junk)/.*\.(jpe?g|gif|png)$</TT
1357 > This is very much the same as above, except now it must end in either
1371 one is limited to common image formats.
1377 > There are many, many good examples to be found in <TT
1381 and more tutorials below in <A
1382 HREF="appendix.html#REGEX"
1383 >Appendix on regular expressions</A
1392 >8.4.3. The Request Tag Pattern</A
1395 > Request tag patterns are used to change the applying actions based on the
1396 request's tags. Tags can be created based on HTTP headers with either
1398 HREF="actions-file.html#CLIENT-HEADER-TAGGER"
1399 >client-header-tagger</A
1402 HREF="actions-file.html#SERVER-HEADER-TAGGER"
1403 >server-header-tagger</A
1406 > Request tag patterns have to start with <SPAN
1413 can tell them apart from other patterns. Everything after the colon
1414 including white space, is interpreted as a regular expression with
1415 path pattern syntax, except that tag patterns aren't left-anchored
1416 automatically (<SPAN
1419 > doesn't silently add a <SPAN
1423 you have to do it yourself if you need it).</P
1425 > To match all requests that are tagged with <SPAN
1429 your pattern line should be <SPAN
1436 > would work as well, but it would also
1437 match requests whose tags contain <SPAN
1444 > wouldn't work as it requires white space.</P
1446 > Sections can contain URL and request tag patterns at the same time,
1447 but request tag patterns are checked after the URL patterns and thus
1448 always overrule them, even if they are located before the URL patterns.</P
1450 > Once a new request tag is added, Privoxy checks right away if it's matched by one
1451 of the request tag patterns and updates the action settings accordingly. As a result
1452 request tags can be used to activate other tagger actions, as long as these other
1453 taggers look for headers that haven't already be parsed.</P
1455 > For example you could tag client requests which use the
1460 then use this tag to activate another tagger that adds a tag if cookies
1461 are sent, and then use a block action based on the cookie tag. This allows
1462 the outcome of one action, to be input into a subsequent action. However if
1463 you'd reverse the position of the described taggers, and activated the
1464 method tagger based on the cookie tagger, no method tags would be created.
1465 The method tagger would look for the request line, but at the time
1466 the cookie tag is created, the request line has already been parsed.</P
1468 > While this is a limitation you should be aware of, this kind of
1469 indirection is seldom needed anyway and even the example doesn't
1470 make too much sense.</P
1477 NAME="NEGATIVE-TAG-PATTERNS"
1478 >8.4.4. The Negative Request Tag Patterns</A
1481 > To match requests that do not have a certain request tag, specify a negative tag pattern
1482 by prefixing the tag pattern line with either <SPAN
1484 >"NO-REQUEST-TAG:"</SPAN
1488 >"NO-RESPONSE-TAG:"</SPAN
1494 > Negative request tag patterns created with <SPAN
1496 >"NO-REQUEST-TAG:"</SPAN
1498 after all client headers are scanned, the ones created with <SPAN
1500 >"NO-RESPONSE-TAG:"</SPAN
1502 are checked after all server headers are scanned. In both cases all the created
1503 tags are considered.</P
1510 NAME="CLIENT-TAG-PATTERN"
1511 >8.4.5. The Client Tag Pattern</A
1532 > This is an experimental feature. The syntax is likely to change in future versions.</P
1538 > Client tag patterns are not set based on HTTP headers but based on
1539 the client's IP address. Users can enable them themselves, but the
1540 Privoxy admin controls which tags are available and what their effect
1543 > After a client-specific tag has been defined with the
1545 HREF="config.html#CLIENT-SPECIFIC-TAG"
1546 >client-specific-tag</A
1548 directive, action sections can be activated based on the tag by using a
1549 CLIENT-TAG pattern. The CLIENT-TAG pattern is evaluated at the same priority
1550 as URL patterns, as a result the last matching pattern wins. Tags that
1551 are created based on client or server headers are evaluated later on
1552 and can overrule CLIENT-TAG and URL patterns!</P
1554 > The tag is set for all requests that come from clients that requested
1555 it to be set. Note that "clients" are differentiated by IP address,
1556 if the IP address changes the tag has to be requested again.</P
1558 > Clients can request tags to be set by using the CGI interface <A
1559 HREF="http://config.privoxy.org/client-tags"
1561 >http://config.privoxy.org/client-tags</A
1573 ># If the admin defined the client-specific-tag circumvent-blocks,
1574 # and the request comes from a client that previously requested
1575 # the tag to be set, overrule all previous +block actions that
1576 # are enabled based on URL to CLIENT-TAG patterns.
1578 CLIENT-TAG:^circumvent-blocks$
1580 # This section is not overruled because it's located after
1582 {+block{Nobody is supposed to request this.}}
1583 example.org/blocked-example-page</PRE
1598 > All actions are disabled by default, until they are explicitly enabled
1599 somewhere in an actions file. Actions are turned on if preceded with a
1603 >, and turned off if preceded with a <SPAN
1612 >"do that action"</SPAN
1619 >"please block URLs that match the
1620 following patterns"</SPAN
1627 block URLs that match the following patterns, even if <TT
1631 previously applied."</SPAN
1634 > Again, actions are invoked by placing them on a line, enclosed in curly braces and
1635 separated by whitespace, like in
1638 >{+some-action -some-other-action{some-parameter}}</TT
1640 followed by a list of URL patterns, one per line, to which they apply.
1641 Together, the actions line and the following pattern lines make up a section
1642 of the actions file.</P
1644 > Actions fall into three categories:</P
1650 > Boolean, i.e the action can only be <SPAN
1672 > # enable action <TT
1683 > # disable action <TT
1695 >+handle-as-image</TT
1701 > Parameterized, where some value is required in order to enable this type of action.
1722 >} # enable action and set parameter to <TT
1728 # overwriting parameter from previous match if necessary
1734 > # disable action. The parameter can be omitted</PRE
1739 > Note that if the URL matches multiple positive forms of a parameterized action,
1740 the last match wins, i.e. the params from earlier matches are simply ignored.
1745 >+hide-user-agent{Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.8.1.4) Gecko/20070602 Firefox/2.0.0.4}</TT
1751 > Multi-value. These look exactly like parameterized actions,
1752 but they behave differently: If the action applies multiple times to the
1753 same URL, but with different parameters, <SPAN
1766 > matches are remembered. This is used for actions
1767 that can be executed for the same request repeatedly, like adding multiple
1768 headers, or filtering through multiple filters. Syntax:
1788 >} # enable action and add <TT
1793 > to the list of parameters
1804 >} # remove the parameter <TT
1809 > from the list of parameters
1810 # If it was the last one left, disable the action.
1816 > # disable this action completely and remove all parameters from the list</PRE
1823 >+add-header{X-Fun-Header: Some text}</TT
1827 >+filter{html-annoyances}</TT
1833 > If nothing is specified in any actions file, no <SPAN
1837 taken. So in this case <SPAN
1841 normal, non-blocking, non-filtering proxy. You must specifically enable the
1842 privacy and blocking features you need (although the provided default actions
1843 files will give a good starting point).</P
1845 > Later defined action sections always over-ride earlier ones of the same type.
1846 So exceptions to any rules you make, should come in the latter part of the file (or
1847 in a file that is processed later when using multiple actions files such
1851 >). For multi-valued actions, the actions
1852 are applied in the order they are specified. Actions files are processed in
1853 the order they are defined in <TT
1857 installation has three actions files). It also quite possible for any given
1858 URL to match more than one <SPAN
1861 > (because of wildcards and
1862 regular expressions), and thus to trigger more than one set of actions! Last
1865 > The list of valid <SPAN
1875 >8.5.1. add-header</A
1880 CLASS="VARIABLELIST"
1886 >Confuse log analysis, custom applications</P
1892 > Sends a user defined HTTP header to the web server.
1905 > Any string value is possible. Validity of the defined HTTP headers is not checked.
1906 It is recommended that you use the <SPAN
1920 > This action may be specified multiple times, in order to define multiple
1921 headers. This is rarely needed for the typical user. If you don't know what
1924 >"HTTP headers"</SPAN
1925 > are, you definitely don't need to worry about this
1929 > Headers added by this action are not modified by other actions.
1943 ># Add a DNT ("Do not track") header to all requests,
1944 # event to those that already have one.
1946 # This is just an example, not a recommendation.
1948 # There is no reason to believe that user-tracking websites care
1949 # about the DNT header and depending on the User-Agent, adding the
1950 # header may make user-tracking easier.
1951 {+add-header{DNT: 1}}
1971 CLASS="VARIABLELIST"
1977 >Block ads or other unwanted content</P
1983 > Requests for URLs to which this action applies are blocked, i.e. the
1984 requests are trapped by <SPAN
1987 > and the requested URL is never retrieved,
1988 but is answered locally with a substitute page or image, as determined by
1992 HREF="actions-file.html#HANDLE-AS-IMAGE"
1999 HREF="actions-file.html#SET-IMAGE-BLOCKER"
2000 >set-image-blocker</A
2006 HREF="actions-file.html#HANDLE-AS-EMPTY-DOCUMENT"
2007 >handle-as-empty-document</A
2023 >A block reason that should be given to the user.</P
2032 > sends a special <SPAN
2036 for requests to blocked pages. This page contains the block reason given as
2037 parameter, a link to find out why the block action applies, and a click-through
2038 to the blocked content (the latter only if the force feature is available and
2042 > A very important exception occurs if <SPAN
2055 HREF="actions-file.html#HANDLE-AS-IMAGE"
2059 apply to the same request: it will then be replaced by an image. If
2063 HREF="actions-file.html#SET-IMAGE-BLOCKER"
2064 >set-image-blocker</A
2067 (see below) also applies, the type of image will be determined by its parameter,
2068 if not, the standard checkerboard pattern is sent.
2071 > It is important to understand this process, in order
2072 to understand how <SPAN
2076 ads and other unwanted content. Blocking is a core feature, and one
2077 upon which various other features depend.
2083 HREF="actions-file.html#FILTER"
2087 action can perform a very similar task, by <SPAN
2091 banner images and other content through rewriting the relevant URLs in the
2092 document's HTML source, so they don't get requested in the first place.
2093 Note that this is a totally different technique, and it's easy to confuse the two.
2097 >Example usage (section):</DT
2107 >{+block{No nasty stuff for you.}}
2108 # Block and replace with "blocked" page
2109 .nasty-stuff.example.com
2111 {+block{Doubleclick banners.} +handle-as-image}
2112 # Block and replace with image
2116 {+block{Layered ads.} +handle-as-empty-document}
2117 # Block and then ignore
2118 adserver.example.net/.*\.js$</PRE
2131 NAME="CHANGE-X-FORWARDED-FOR"
2132 >8.5.3. change-x-forwarded-for</A
2137 CLASS="VARIABLELIST"
2143 >Improve privacy by not forwarding the source of the request in the HTTP headers.</P
2151 >"X-Forwarded-For:"</SPAN
2152 > HTTP header from the client request,
2173 > to delete the header.</P
2180 > to create the header (or append
2181 the client's IP address to an already existing one).
2190 > It is safe and recommended to use <TT
2196 > Forwarding the source address of the request may make
2197 sense in some multi-user setups but is also a privacy risk.
2211 >+change-x-forwarded-for{block}</PRE
2224 NAME="CLIENT-HEADER-FILTER"
2225 >8.5.4. client-header-filter</A
2230 CLASS="VARIABLELIST"
2236 > Rewrite or remove single client headers.
2243 > All client headers to which this action applies are filtered on-the-fly through
2244 the specified regular expression based substitutions.
2257 > The name of a client-header filter, as defined in one of the
2259 HREF="filter-file.html"
2268 > Client-header filters are applied to each header on its own, not to
2269 all at once. This makes it easier to diagnose problems, but on the downside
2270 you can't write filters that only change header x if header y's value is z.
2271 You can do that by using tags though.
2274 > Client-header filters are executed after the other header actions have finished
2275 and use their output as input.
2278 > If the request URI gets changed, <SPAN
2281 > will detect that and use the new
2282 one. This can be used to rewrite the request destination behind the client's
2283 back, for example to specify a Tor exit relay for certain requests.
2286 > Please refer to the <A
2287 HREF="filter-file.html"
2288 >filter file chapter</A
2290 to learn which client-header filters are available by default, and how to
2295 >Example usage (section):</DT
2305 ># Hide Tor exit notation in Host and Referer Headers
2306 {+client-header-filter{hide-tor-exit-notation}}
2320 NAME="CLIENT-HEADER-TAGGER"
2321 >8.5.5. client-header-tagger</A
2326 CLASS="VARIABLELIST"
2332 > Block requests based on their headers.
2339 > Client headers to which this action applies are filtered on-the-fly through
2340 the specified regular expression based substitutions, the result is used as
2354 > The name of a client-header tagger, as defined in one of the
2356 HREF="filter-file.html"
2365 > Client-header taggers are applied to each header on its own,
2366 and as the header isn't modified, each tagger <SPAN
2373 > Client-header taggers are the first actions that are executed
2374 and their tags can be used to control every other action.
2378 >Example usage (section):</DT
2388 ># Tag every request with the User-Agent header
2389 {+client-header-tagger{user-agent}}
2392 # Tagging itself doesn't change the action
2393 # settings, sections with TAG patterns do:
2395 # If it's a download agent, use a different forwarding proxy,
2396 # show the real User-Agent and make sure resume works.
2397 {+forward-override{forward-socks5 10.0.0.2:2222 .} \
2398 -hide-if-modified-since \
2399 -overwrite-last-modified \
2404 TAG:^User-Agent: NetBSD-ftp/
2405 TAG:^User-Agent: Novell ZYPP Installer
2406 TAG:^User-Agent: RPM APT-HTTP/
2407 TAG:^User-Agent: fetch libfetch/
2408 TAG:^User-Agent: Ubuntu APT-HTTP/
2409 TAG:^User-Agent: MPlayer/
2422 ># Tag all requests with the Range header set
2423 {+client-header-tagger{range-requests}}
2426 # Disable filtering for the tagged requests.
2428 # With filtering enabled Privoxy would remove the Range headers
2429 # to be able to filter the whole response. The downside is that
2430 # it prevents clients from resuming downloads or skipping over
2431 # parts of multimedia files.
2432 {-filter -deanimate-gifs}
2446 ># Tag all requests with the client IP address
2448 # (Technically the client IP address isn't included in the
2449 # client headers but client-header taggers can set it anyway.
2450 # For details see the tagger in default.filter)
2451 {+client-header-tagger{client-ip-address}}
2454 # Change forwarding settings for requests coming from address 10.0.0.1
2455 {+forward-override{forward-socks5 127.0.1.2:2222 .}}
2456 TAG:^IP-ADDRESS: 10\.0\.0\.1$
2470 NAME="CONTENT-TYPE-OVERWRITE"
2471 >8.5.6. content-type-overwrite</A
2476 CLASS="VARIABLELIST"
2482 >Stop useless download menus from popping up, or change the browser's rendering mode</P
2488 > Replaces the <SPAN
2490 >"Content-Type:"</SPAN
2491 > HTTP server header.
2513 >"Content-Type:"</SPAN
2514 > HTTP server header is used by the
2515 browser to decide what to do with the document. The value of this
2516 header can cause the browser to open a download menu instead of
2517 displaying the document by itself, even if the document's format is
2518 supported by the browser.
2521 > The declared content type can also affect which rendering mode
2522 the browser chooses. If XHTML is delivered as <SPAN
2526 many browsers treat it as yet another broken HTML document.
2527 If it is send as <SPAN
2529 >"application/xml"</SPAN
2531 XHTML support will only display it, if the syntax is correct.
2534 > If you see a web site that proudly uses XHTML buttons, but sets
2537 >"Content-Type: text/html"</SPAN
2538 >, you can use <SPAN
2542 to overwrite it with <SPAN
2544 >"application/xml"</SPAN
2546 the web master's claim inside your XHTML-supporting browser.
2547 If the syntax is incorrect, the browser will complain loudly.
2550 > You can also go the opposite direction: if your browser prints
2551 error messages instead of rendering a document falsely declared
2552 as XHTML, you can overwrite the content type with
2556 > and have it rendered as broken HTML document.
2561 >content-type-overwrite</TT
2565 >"Content-Type:"</SPAN
2566 > headers that look like some kind of text.
2567 If you want to overwrite it unconditionally, you have to combine it with
2571 HREF="actions-file.html#FORCE-TEXT-MODE"
2575 This limitation exists for a reason, think twice before circumventing it.
2578 > Most of the time it's easier to replace this action with a custom
2582 HREF="actions-file.html#SERVER-HEADER-FILTER"
2583 >server-header filter</A
2586 It allows you to activate it for every document of a certain site and it will still
2587 only replace the content types you aimed at.
2590 > Of course you can apply <TT
2592 >content-type-overwrite</TT
2594 to a whole site and then make URL based exceptions, but it's a lot
2595 more work to get the same precision.
2599 >Example usage (sections):</DT
2609 ># Check if www.example.net/ really uses valid XHTML
2610 { +content-type-overwrite{application/xml} }
2613 # but leave the content type unmodified if the URL looks like a style sheet
2614 {-content-type-overwrite}
2615 www.example.net/.*\.css$
2616 www.example.net/.*style</PRE
2629 NAME="CRUNCH-CLIENT-HEADER"
2630 >8.5.7. crunch-client-header</A
2635 CLASS="VARIABLELIST"
2641 >Remove a client header <SPAN
2644 > has no dedicated action for.</P
2650 > Deletes every header sent by the client that contains the string the user supplied as parameter.
2670 > This action allows you to block client headers for which no dedicated
2678 > will remove every client header that
2679 contains the string you supplied as parameter.
2682 > Regular expressions are <SPAN
2689 use this action to block different headers in the same request, unless
2690 they contain the same string.
2695 >crunch-client-header</TT
2696 > is only meant for quick tests.
2697 If you have to block several different headers, or only want to modify
2698 parts of them, you should use a
2702 HREF="actions-file.html#CLIENT-HEADER-FILTER"
2703 >client-header filter</A
2726 > Don't block any header without understanding the consequences.
2734 >Example usage (section):</DT
2744 ># Block the non-existent "Privacy-Violation:" client header
2745 { +crunch-client-header{Privacy-Violation:} }
2760 NAME="CRUNCH-IF-NONE-MATCH"
2761 >8.5.8. crunch-if-none-match</A
2766 CLASS="VARIABLELIST"
2772 >Prevent yet another way to track the user's steps between sessions.</P
2780 >"If-None-Match:"</SPAN
2781 > HTTP client header.
2801 > Removing the <SPAN
2803 >"If-None-Match:"</SPAN
2804 > HTTP client header
2805 is useful for filter testing, where you want to force a real
2806 reload instead of getting status code <SPAN
2810 would cause the browser to use a cached copy of the page.
2813 > It is also useful to make sure the header isn't used as a cookie
2814 replacement (unlikely but possible).
2817 > Blocking the <SPAN
2819 >"If-None-Match:"</SPAN
2820 > header shouldn't cause any
2821 caching problems, as long as the <SPAN
2823 >"If-Modified-Since:"</SPAN
2825 isn't blocked or missing as well.
2828 > It is recommended to use this action together with
2832 HREF="actions-file.html#HIDE-IF-MODIFIED-SINCE"
2833 >hide-if-modified-since</A
2840 HREF="actions-file.html#OVERWRITE-LAST-MODIFIED"
2841 >overwrite-last-modified</A
2847 >Example usage (section):</DT
2857 ># Let the browser revalidate cached documents but don't
2858 # allow the server to use the revalidation headers for user tracking.
2859 {+hide-if-modified-since{-60} \
2860 +overwrite-last-modified{randomize} \
2861 +crunch-if-none-match}
2875 NAME="CRUNCH-INCOMING-COOKIES"
2876 >8.5.9. crunch-incoming-cookies</A
2881 CLASS="VARIABLELIST"
2887 > Prevent the web server from setting HTTP cookies on your system
2896 >"Set-Cookie:"</SPAN
2897 > HTTP headers from server replies.
2917 > This action is only concerned with <SPAN
2934 HREF="actions-file.html#CRUNCH-OUTGOING-COOKIES"
2935 >crunch-outgoing-cookies</A
2944 > to disable HTTP cookies completely.
2953 > to use this action in conjunction
2957 HREF="actions-file.html#SESSION-COOKIES-ONLY"
2958 >session-cookies-only</A
2961 since it would prevent the session cookies from being set. See also
2965 HREF="actions-file.html#FILTER-CONTENT-COOKIES"
2966 >filter-content-cookies</A
2982 >+crunch-incoming-cookies</PRE
2995 NAME="CRUNCH-SERVER-HEADER"
2996 >8.5.10. crunch-server-header</A
3001 CLASS="VARIABLELIST"
3007 >Remove a server header <SPAN
3010 > has no dedicated action for.</P
3016 > Deletes every header sent by the server that contains the string the user supplied as parameter.
3036 > This action allows you to block server headers for which no dedicated
3040 > action exists. <SPAN
3044 will remove every server header that contains the string you supplied as parameter.
3047 > Regular expressions are <SPAN
3054 use this action to block different headers in the same request, unless
3055 they contain the same string.
3060 >crunch-server-header</TT
3061 > is only meant for quick tests.
3062 If you have to block several different headers, or only want to modify
3063 parts of them, you should use a custom
3067 HREF="actions-file.html#SERVER-HEADER-FILTER"
3068 >server-header filter</A
3091 > Don't block any header without understanding the consequences.
3099 >Example usage (section):</DT
3109 ># Crunch server headers that try to prevent caching
3110 { +crunch-server-header{no-cache} }
3124 NAME="CRUNCH-OUTGOING-COOKIES"
3125 >8.5.11. crunch-outgoing-cookies</A
3130 CLASS="VARIABLELIST"
3136 > Prevent the web server from reading any HTTP cookies from your system
3146 > HTTP headers from client requests.
3166 > This action is only concerned with <SPAN
3183 HREF="actions-file.html#CRUNCH-INCOMING-COOKIES"
3184 >crunch-incoming-cookies</A
3193 > to disable HTTP cookies completely.
3202 > to use this action in conjunction
3206 HREF="actions-file.html#SESSION-COOKIES-ONLY"
3207 >session-cookies-only</A
3210 since it would prevent the session cookies from being read.
3224 >+crunch-outgoing-cookies</PRE
3237 NAME="DEANIMATE-GIFS"
3238 >8.5.12. deanimate-gifs</A
3243 CLASS="VARIABLELIST"
3249 >Stop those annoying, distracting animated GIF images.</P
3255 > De-animate GIF animations, i.e. reduce them to their first or last image.
3281 > This will also shrink the images considerably (in bytes, not pixels!). If
3285 > is given, the first frame of the animation
3286 is used as the replacement. If <SPAN
3289 > is given, the last
3290 frame of the animation is used instead, which probably makes more sense for
3291 most banner animations, but also has the risk of not showing the entire
3292 last frame (if it is only a delta to an earlier frame).
3295 > You can safely use this action with patterns that will also match non-GIF
3296 objects, because no attempt will be made at anything that doesn't look like
3311 >+deanimate-gifs{last}</PRE
3324 NAME="DOWNGRADE-HTTP-VERSION"
3325 >8.5.13. downgrade-http-version</A
3330 CLASS="VARIABLELIST"
3336 >Work around (very rare) problems with HTTP/1.1</P
3342 > Downgrades HTTP/1.1 client requests and server replies to HTTP/1.0.
3362 > This is a left-over from the time when <SPAN
3366 didn't support important HTTP/1.1 features well. It is left here for the
3367 unlikely case that you experience HTTP/1.1-related problems with some server
3371 > Note that enabling this action is only a workaround. It should not
3372 be enabled for sites that work without it. While it shouldn't break
3373 any pages, it has an (usually negative) performance impact.
3376 > If you come across a site where enabling this action helps, please report it,
3377 so the cause of the problem can be analyzed. If the problem turns out to be
3378 caused by a bug in <SPAN
3382 fixed so the following release works without the work around.
3386 >Example usage (section):</DT
3396 >{+downgrade-http-version}
3397 problem-host.example.com</PRE
3410 NAME="EXTERNAL-FILTER"
3411 >8.5.14. external-filter</A
3416 CLASS="VARIABLELIST"
3422 >Modify content using a programming language of your choice.</P
3428 > All instances of text-based type, most notably HTML and JavaScript, to which
3429 this action applies, can be filtered on-the-fly through the specified external
3431 By default plain text documents are exempted from filtering, because web
3432 servers often use the <TT
3435 > MIME type for all files
3436 whose type they don't know.)
3449 > The name of an external content filter, as defined in the
3451 HREF="filter-file.html"
3454 External filters can be defined in one or more files as defined by the
3458 HREF="config.html#FILTERFILE"
3468 > When used in its negative form,
3469 and without parameters, <SPAN
3475 > filtering with external
3476 filters is completely disabled.
3483 > External filters are scripts or programs that can modify the content in
3487 HREF="actions-file.html#FILTER"
3491 aren't powerful enough. With the exception that this action doesn't
3492 use pcrs-based filters, the notes in the
3496 HREF="actions-file.html#FILTER"
3520 > Currently external filters are executed with <SPAN
3524 Only use external filters you understand and trust.
3531 > This feature is experimental, the <TT
3534 HREF="filter-file.html#EXTERNAL-FILTER-SYNTAX"
3538 may change in the future.
3552 >+external-filter{fancy-filter}</PRE
3565 NAME="FAST-REDIRECTS"
3566 >8.5.15. fast-redirects</A
3571 CLASS="VARIABLELIST"
3577 >Fool some click-tracking scripts and speed up indirect links.</P
3583 > Detects redirection URLs and redirects the browser without contacting
3584 the redirection server first.
3603 >"simple-check"</SPAN
3604 > to just search for the string <SPAN
3608 to detect redirection URLs.
3615 >"check-decoded-url"</SPAN
3616 > to decode URLs (if necessary) before searching
3617 for redirection URLs.
3626 > Many sites, like yahoo.com, don't just link to other sites. Instead, they
3627 will link to some script on their own servers, giving the destination as a
3628 parameter, which will then redirect you to the final target. URLs
3629 resulting from this scheme typically look like:
3632 >"http://www.example.org/click-tracker.cgi?target=http%3a//www.example.net/"</SPAN
3636 > Sometimes, there are even multiple consecutive redirects encoded in the
3637 URL. These redirections via scripts make your web browsing more traceable,
3638 since the server from which you follow such a link can see where you go
3639 to. Apart from that, valuable bandwidth and time is wasted, while your
3640 browser asks the server for one redirect after the other. Plus, it feeds
3644 > This feature is currently not very smart and is scheduled for improvement.
3645 If it is enabled by default, you will have to create some exceptions to
3646 this action. It can lead to failures in several ways:
3649 > Not every URLs with other URLs as parameters is evil.
3650 Some sites offer a real service that requires this information to work.
3651 For example a validation service needs to know, which document to validate.
3655 > assumes that every URL parameter that
3656 looks like another URL is a redirection target, and will always redirect to
3657 the last one. Most of the time the assumption is correct, but if it isn't,
3658 the user gets redirected anyway.
3661 > Another failure occurs if the URL contains other parameters after the URL parameter.
3665 >"http://www.example.org/?redirect=http%3a//www.example.net/&foo=bar"</SPAN
3667 contains the redirection URL <SPAN
3669 >"http://www.example.net/"</SPAN
3671 followed by another parameter. <TT
3675 and will cause a redirect to <SPAN
3677 >"http://www.example.net/&foo=bar"</SPAN
3679 Depending on the target server configuration, the parameter will be silently ignored
3682 >"page not found"</SPAN
3683 > error. You can prevent this problem by
3687 HREF="actions-file.html#REDIRECT"
3691 to remove the last part of the URL, but it requires a little effort.
3694 > To detect a redirection URL, <TT
3698 looks for the string <SPAN
3701 >, either in plain text
3702 (invalid but often used) or encoded as <SPAN
3706 Some sites use their own URL encoding scheme, encrypt the address
3707 of the target server or replace it with a database id. In theses cases
3711 > is fooled and the request reaches the
3712 redirection server where it probably gets logged.
3726 > { +fast-redirects{simple-check} }
3729 { +fast-redirects{check-decoded-url} }
3730 another.example.com/testing</PRE
3749 CLASS="VARIABLELIST"
3755 >Get rid of HTML and JavaScript annoyances, banner advertisements (by size),
3756 do fun text replacements, add personalized effects, etc.</P
3762 > All instances of text-based type, most notably HTML and JavaScript, to which
3763 this action applies, can be filtered on-the-fly through the specified regular
3764 expression based substitutions. (Note: as of version 3.0.3 plain text documents
3765 are exempted from filtering, because web servers often use the
3769 > MIME type for all files whose type they don't know.)
3782 > The name of a content filter, as defined in the <A
3783 HREF="filter-file.html"
3786 Filters can be defined in one or more files as defined by the
3790 HREF="config.html#FILTERFILE"
3801 > is the collection of filters
3802 supplied by the developers. Locally defined filters should go
3803 in their own file, such as <TT
3809 > When used in its negative form,
3810 and without parameters, <SPAN
3816 > filtering is completely disabled.
3823 > For your convenience, there are a number of pre-defined filters available
3824 in the distribution filter file that you can use. See the examples below for
3828 > Filtering requires buffering the page content, which may appear to
3829 slow down page rendering since nothing is displayed until all content has
3830 passed the filters. (The total time until the page is completely rendered
3831 doesn't change much, but it may be perceived as slower since the page is
3832 not incrementally displayed.)
3833 This effect will be more noticeable on slower connections.
3838 >"Rolling your own"</SPAN
3840 filters requires a knowledge of
3842 HREF="http://en.wikipedia.org/wiki/Regular_expressions"
3851 HREF="http://en.wikipedia.org/wiki/Html"
3858 This is very powerful feature, and potentially very intrusive.
3859 Filters should be used with caution, and where an equivalent
3866 > The amount of data that can be filtered is limited to the
3870 HREF="config.html#BUFFER-LIMIT"
3874 option in the main <A
3878 default is 4096 KB (4 Megs). Once this limit is exceeded, the buffered
3879 data, and all pending data, is passed through unfiltered.
3882 > Inappropriate MIME types, such as zipped files, are not filtered at all.
3883 (Again, only text-based types except plain text). Encrypted SSL data
3884 (from HTTPS servers) cannot be filtered either, since this would violate
3885 the integrity of the secure transaction. In some situations it might
3886 be necessary to protect certain text, like source code, from filtering
3887 by defining appropriate <TT
3893 > Compressed content can't be filtered either, but if <SPAN
3897 is compiled with zlib support and a supported compression algorithm
3898 is used (gzip or deflate), <SPAN
3901 > can first decompress the content
3905 > If you use a <SPAN
3908 > version without zlib support, but want filtering to work on
3909 as much documents as possible, even those that would normally be sent compressed,
3910 you must use the <TT
3913 HREF="actions-file.html#PREVENT-COMPRESSION"
3914 >prevent-compression</A
3917 action in conjunction with <TT
3923 > Content filtering can achieve some of the same effects as the
3927 HREF="actions-file.html#BLOCK"
3931 action, i.e. it can be used to block ads and banners. But the mechanism
3932 works quite differently. One effective use, is to block ad banners
3933 based on their size (see below), since many of these seem to be somewhat
3940 > with suggestions for new or
3941 improved filters is particularly welcome!
3944 > The below list has only the names and a one-line description of each
3945 predefined filter. There are <A
3946 HREF="filter-file.html#PREDEFINED-FILTERS"
3948 verbose explanations</A
3949 > of what these filters do in the <A
3950 HREF="filter-file.html"
3951 >filter file chapter</A
3956 >Example usage (with filters from the distribution <TT
3961 HREF="filter-file.html#PREDEFINED-FILTERS"
3962 >the Predefined Filters section</A
3964 more explanation on each:</DT
3968 NAME="FILTER-JS-ANNOYANCES"
3980 >+filter{js-annoyances} # Get rid of particularly annoying JavaScript abuse.</PRE
3986 NAME="FILTER-JS-EVENTS"
3998 >+filter{js-events} # Kill JavaScript event bindings and timers (Radically destructive! Only for extra nasty sites).</PRE
4004 NAME="FILTER-HTML-ANNOYANCES"
4016 >+filter{html-annoyances} # Get rid of particularly annoying HTML abuse.</PRE
4022 NAME="FILTER-CONTENT-COOKIES"
4034 >+filter{content-cookies} # Kill cookies that come in the HTML or JS content.</PRE
4040 NAME="FILTER-REFRESH-TAGS"
4052 >+filter{refresh-tags} # Kill automatic refresh tags if refresh time is larger than 9 seconds.</PRE
4058 NAME="FILTER-UNSOLICITED-POPUPS"
4070 >+filter{unsolicited-popups} # Disable only unsolicited pop-up windows.</PRE
4076 NAME="FILTER-ALL-POPUPS"
4088 >+filter{all-popups} # Kill all popups in JavaScript and HTML.</PRE
4094 NAME="FILTER-IMG-REORDER"
4106 >+filter{img-reorder} # Reorder attributes in <img> tags to make the banners-by-* filters more effective.</PRE
4112 NAME="FILTER-BANNERS-BY-SIZE"
4124 >+filter{banners-by-size} # Kill banners by size.</PRE
4130 NAME="FILTER-BANNERS-BY-LINK"
4142 >+filter{banners-by-link} # Kill banners by their links to known clicktrackers.</PRE
4148 NAME="FILTER-WEBBUGS"
4160 >+filter{webbugs} # Squish WebBugs (1x1 invisible GIFs used for user tracking).</PRE
4166 NAME="FILTER-TINY-TEXTFORMS"
4178 >+filter{tiny-textforms} # Extend those tiny textareas up to 40x80 and kill the hard wrap.</PRE
4184 NAME="FILTER-JUMPING-WINDOWS"
4196 >+filter{jumping-windows} # Prevent windows from resizing and moving themselves.</PRE
4202 NAME="FILTER-FRAMESET-BORDERS"
4214 >+filter{frameset-borders} # Give frames a border and make them resizable.</PRE
4220 NAME="FILTER-IFRAMES"
4232 >+filter{iframes} # Removes all detected iframes. Should only be enabled for individual sites.</PRE
4238 NAME="FILTER-DEMORONIZER"
4250 >+filter{demoronizer} # Fix MS's non-standard use of standard charsets.</PRE
4256 NAME="FILTER-SHOCKWAVE-FLASH"
4268 >+filter{shockwave-flash} # Kill embedded Shockwave Flash objects.</PRE
4274 NAME="FILTER-QUICKTIME-KIOSKMODE"
4286 >+filter{quicktime-kioskmode} # Make Quicktime movies saveable.</PRE
4304 >+filter{fun} # Text replacements for subversive browsing fun!</PRE
4310 NAME="FILTER-CRUDE-PARENTAL"
4322 >+filter{crude-parental} # Crude parental filtering. Note that this filter doesn't work reliably.</PRE
4328 NAME="FILTER-IE-EXPLOITS"
4340 >+filter{ie-exploits} # Disable some known Internet Explorer bug exploits.</PRE
4346 NAME="FILTER-SITE-SPECIFICS"
4358 >+filter{site-specifics} # Cure for site-specific problems. Don't apply generally!</PRE
4364 NAME="FILTER-NO-PING"
4376 >+filter{no-ping} # Removes non-standard ping attributes in <a> and <area> tags.</PRE
4382 NAME="FILTER-GOOGLE"
4394 >+filter{google} # CSS-based block for Google text ads. Also removes a width limitation and the toolbar advertisement.</PRE
4412 >+filter{yahoo} # CSS-based block for Yahoo text ads. Also removes a width limitation.</PRE
4430 >+filter{msn} # CSS-based block for MSN text ads. Also removes tracking URLs and a width limitation.</PRE
4436 NAME="FILTER-BLOGSPOT"
4448 >+filter{blogspot} # Cleans up some Blogspot blogs. Read the fine print before using this.</PRE
4461 NAME="FORCE-TEXT-MODE"
4462 >8.5.17. force-text-mode</A
4467 CLASS="VARIABLELIST"
4476 > to treat a document as if it was in some kind of <SPAN
4488 > Declares a document as text, even if the <SPAN
4490 >"Content-Type:"</SPAN
4491 > isn't detected as such.
4514 HREF="actions-file.html#FILTER"
4521 > tries to only filter files that are
4522 in some kind of text format. The same restrictions apply to
4526 HREF="actions-file.html#CONTENT-TYPE-OVERWRITE"
4527 >content-type-overwrite</A
4532 >force-text-mode</TT
4533 > declares a document as text,
4534 without looking at the <SPAN
4536 >"Content-Type:"</SPAN
4558 > Think twice before activating this action. Filtering binary data
4559 with regular expressions can cause file damage.
4591 NAME="FORWARD-OVERRIDE"
4592 >8.5.18. forward-override</A
4597 CLASS="VARIABLELIST"
4603 >Change the forwarding settings based on User-Agent or request origin</P
4609 > Overrules the forward directives in the configuration file.
4629 > to use a direct connection without any additional proxies.</P
4635 >"forward 127.0.0.1:8123"</SPAN
4636 > to use the HTTP proxy listening at 127.0.0.1 port 8123.
4643 >"forward-socks4a 127.0.0.1:9050 ."</SPAN
4644 > to use the socks4a proxy listening at
4645 127.0.0.1 port 9050. Replace <SPAN
4647 >"forward-socks4a"</SPAN
4650 >"forward-socks4"</SPAN
4652 to use a socks4 connection (with local DNS resolution) instead, use <SPAN
4654 >"forward-socks5"</SPAN
4656 for socks5 connections (with remote DNS resolution).
4663 >"forward-socks4a 127.0.0.1:9050 proxy.example.org:8000"</SPAN
4664 > to use the socks4a proxy
4665 listening at 127.0.0.1 port 9050 to reach the HTTP proxy listening at proxy.example.org port 8000.
4668 >"forward-socks4a"</SPAN
4671 >"forward-socks4"</SPAN
4672 > to use a socks4 connection
4673 (with local DNS resolution) instead, use <SPAN
4675 >"forward-socks5"</SPAN
4677 for socks5 connections (with remote DNS resolution).
4684 >"forward-webserver 127.0.0.1:80"</SPAN
4686 server listening at 127.0.0.1 port 80 without adjusting the
4690 > This makes it more convenient to use Privoxy to make
4691 existing websites available as onion services as well.
4694 > Many websites serve content with hardcoded URLs and
4695 can't be easily adjusted to change the domain based
4696 on the one used by the client.
4699 > Putting Privoxy between Tor and the webserver (or an stunnel
4700 that forwards to the webserver) allows to rewrite headers and
4701 content to make client and server happy at the same time.
4704 > Using Privoxy for webservers that are only reachable through
4705 onion addresses and whose location is supposed to be secret
4706 is not recommended and should not be necessary anyway.
4715 > This action takes parameters similar to the
4717 HREF="config.html#FORWARDING"
4719 > directives in the configuration
4720 file, but without the URL pattern. It can be used as replacement, but normally it's only
4721 used in cases where matching based on the request URL isn't sufficient.
4742 > Please read the description for the <A
4743 HREF="config.html#FORWARDING"
4746 using this action. Forwarding to the wrong people will reduce your privacy and increase the
4747 chances of man-in-the-middle attacks.
4750 > If the ports are missing or invalid, default values will be used. This might change
4751 in the future and you shouldn't rely on it. Otherwise incorrect syntax causes Privoxy
4752 to exit. Due to design limitations, invalid parameter syntax isn't detected until the
4753 action is used the first time.
4757 HREF="http://config.privoxy.org/show-url-info"
4759 >show-url-info CGI page</A
4761 to verify that your forward settings do what you thought the do.
4779 ># Use an ssh tunnel for requests previously tagged as
4782 >"User-Agent: fetch libfetch/2.0"</SPAN
4784 # resuming downloads continues to work.
4786 # This way you can continue to use Tor for your normal browsing,
4787 # without overloading the Tor network with your FreeBSD ports updates
4788 # or downloads of bigger files like ISOs.
4790 # Note that HTTP headers are easy to fake and therefore their
4791 # values are as (un)trustworthy as your clients and users.
4792 {+forward-override{forward-socks5 10.0.0.2:2222 .} \
4793 -hide-if-modified-since \
4794 -overwrite-last-modified \
4796 TAG:^User-Agent: fetch libfetch/2\.0$
4810 NAME="HANDLE-AS-EMPTY-DOCUMENT"
4811 >8.5.19. handle-as-empty-document</A
4816 CLASS="VARIABLELIST"
4822 >Mark URLs that should be replaced by empty documents <SPAN
4826 >if they get blocked</I
4834 > This action alone doesn't do anything noticeable. It just marks URLs.
4838 HREF="actions-file.html#BLOCK"
4848 the presence or absence of this mark decides whether an HTML <SPAN
4852 page, or an empty document will be sent to the client as a substitute for the blocked content.
4859 > document isn't literally empty, but actually contains a single space.
4879 > Some browsers complain about syntax errors if JavaScript documents
4880 are blocked with <SPAN
4884 default HTML page; this option can be used to silence them.
4885 And of course this action can also be used to eliminate the <SPAN
4889 BLOCKED message in frames.
4892 > The content type for the empty document can be specified with
4896 HREF="actions-file.html#CONTENT-TYPE-OVERWRITE"
4897 >content-type-overwrite{}</A
4900 but usually this isn't necessary.
4914 ># Block all documents on example.org that end with ".js",
4915 # but send an empty document instead of the usual HTML message.
4916 {+block{Blocked JavaScript} +handle-as-empty-document}
4931 NAME="HANDLE-AS-IMAGE"
4932 >8.5.20. handle-as-image</A
4937 CLASS="VARIABLELIST"
4943 >Mark URLs as belonging to images (so they'll be replaced by images <SPAN
4947 >if they do get blocked</I
4949 >, rather than HTML pages)</P
4955 > This action alone doesn't do anything noticeable. It just marks URLs as images.
4959 HREF="actions-file.html#BLOCK"
4969 the presence or absence of this mark decides whether an HTML <SPAN
4973 page, or a replacement image (as determined by the <TT
4976 HREF="actions-file.html#SET-IMAGE-BLOCKER"
4977 >set-image-blocker</A
4979 > action) will be sent to the
4980 client as a substitute for the blocked content.
5000 > The below generic example section is actually part of <TT
5004 It marks all URLs with well-known image file name extensions as images and should
5008 > Users will probably only want to use the handle-as-image action in conjunction with
5012 HREF="actions-file.html#BLOCK"
5015 >, to block sources of banners, whose URLs don't
5016 reflect the file type, like in the second example section.
5019 > Note that you cannot treat HTML pages as images in most cases. For instance, (in-line) ad
5020 frames require an HTML page to be sent, or they won't display properly.
5023 >handle-as-image</TT
5024 > in this situation will not replace the
5025 ad frame with an image, but lead to error messages.
5029 >Example usage (sections):</DT
5039 ># Generic image extensions:
5042 /.*\.(gif|jpg|jpeg|png|bmp|ico)$
5044 # These don't look like images, but they're banners and should be
5045 # blocked as images:
5047 {+block{Nasty banners.} +handle-as-image}
5048 nasty-banner-server.example.com/junk.cgi\?output=trash</PRE
5061 NAME="HIDE-ACCEPT-LANGUAGE"
5062 >8.5.21. hide-accept-language</A
5067 CLASS="VARIABLELIST"
5073 >Pretend to use different language settings.</P
5079 > Deletes or replaces the <SPAN
5081 >"Accept-Language:"</SPAN
5082 > HTTP header in client requests.
5098 >, or any user defined value.
5105 > Faking the browser's language settings can be useful to make a
5106 foreign User-Agent set with
5110 HREF="actions-file.html#HIDE-USER-AGENT"
5117 > However some sites with content in different languages check the
5120 >"Accept-Language:"</SPAN
5121 > to decide which one to take by default.
5122 Sometimes it isn't possible to later switch to another language without
5125 >"Accept-Language:"</SPAN
5129 > Therefore it's a good idea to either only change the
5132 >"Accept-Language:"</SPAN
5133 > header to languages you understand,
5134 or to languages that aren't wide spread.
5137 > Before setting the <SPAN
5139 >"Accept-Language:"</SPAN
5141 to a rare language, you should consider that it helps to
5142 make your requests unique and thus easier to trace.
5143 If you don't plan to change this header frequently,
5144 you should stick to a common language.
5148 >Example usage (section):</DT
5158 ># Pretend to use Canadian language settings.
5159 {+hide-accept-language{en-ca} \
5160 +hide-user-agent{Mozilla/5.0 (X11; U; OpenBSD i386; en-CA; rv:1.8.0.4) Gecko/20060628 Firefox/1.5.0.4} \
5175 NAME="HIDE-CONTENT-DISPOSITION"
5176 >8.5.22. hide-content-disposition</A
5181 CLASS="VARIABLELIST"
5187 >Prevent download menus for content you prefer to view inside the browser.</P
5193 > Deletes or replaces the <SPAN
5195 >"Content-Disposition:"</SPAN
5196 > HTTP header set by some servers.
5212 >, or any user defined value.
5219 > Some servers set the <SPAN
5221 >"Content-Disposition:"</SPAN
5223 documents they assume you want to save locally before viewing them.
5226 >"Content-Disposition:"</SPAN
5227 > header contains the file name
5228 the browser is supposed to use by default.
5231 > In most browsers that understand this header, it makes it impossible to
5238 > the document, without downloading it first,
5239 even if it's just a simple text file or an image.
5242 > Removing the <SPAN
5244 >"Content-Disposition:"</SPAN
5246 to prevent this annoyance, but some browsers additionally check the
5249 >"Content-Type:"</SPAN
5250 > header, before they decide if they can
5251 display a document without saving it first. In these cases, you have
5252 to change this header as well, before the browser stops displaying
5256 > It is also possible to change the server's file name suggestion
5257 to another one, but in most cases it isn't worth the time to set
5261 > This action will probably be removed in the future,
5262 use server-header filters instead.
5276 ># Disarm the download link in Sourceforge's patch tracker
5278 +content-type-overwrite{text/plain}\
5279 +hide-content-disposition{block} }
5280 .sourceforge.net/tracker/download\.php</PRE
5293 NAME="HIDE-IF-MODIFIED-SINCE"
5294 >8.5.23. hide-if-modified-since</A
5299 CLASS="VARIABLELIST"
5305 >Prevent yet another way to track the user's steps between sessions.</P
5313 >"If-Modified-Since:"</SPAN
5314 > HTTP client header or modifies its value.
5330 >, or a user defined value that specifies a range of hours.
5337 > Removing this header is useful for filter testing, where you want to force a real
5338 reload instead of getting status code <SPAN
5341 >, which would cause the
5342 browser to use a cached copy of the page.
5345 > Instead of removing the header, <TT
5347 >hide-if-modified-since</TT
5349 also add or subtract a random amount of time to/from the header's value.
5350 You specify a range of minutes where the random factor should be chosen from and
5354 > does the rest. A negative value means
5355 subtracting, a positive value adding.
5358 > Randomizing the value of the <SPAN
5360 >"If-Modified-Since:"</SPAN
5362 it less likely that the server can use the time as a cookie replacement,
5363 but you will run into caching problems if the random range is too high.
5366 > It is a good idea to only use a small negative value and let
5370 HREF="actions-file.html#OVERWRITE-LAST-MODIFIED"
5371 >overwrite-last-modified</A
5374 handle the greater changes.
5377 > It is also recommended to use this action together with
5381 HREF="actions-file.html#CRUNCH-IF-NONE-MATCH"
5382 >crunch-if-none-match</A
5385 otherwise it's more or less pointless.
5389 >Example usage (section):</DT
5399 ># Let the browser revalidate but make tracking based on the time less likely.
5400 {+hide-if-modified-since{-60} \
5401 +overwrite-last-modified{randomize} \
5402 +crunch-if-none-match}
5416 NAME="HIDE-FROM-HEADER"
5417 >8.5.24. hide-from-header</A
5422 CLASS="VARIABLELIST"
5428 >Keep your (old and ill) browser from telling web servers your email address</P
5434 > Deletes any existing <SPAN
5437 > HTTP header, or replaces it with the
5454 >, or any user defined value.
5464 > will completely remove the header
5465 (not to be confused with the <TT
5468 HREF="actions-file.html#BLOCK"
5475 > Alternately, you can specify any value you prefer to be sent to the web
5476 server. If you do, it is a matter of fairness not to use any address that
5477 is actually used by a real person.
5480 > This action is rarely needed, as modern web browsers don't send
5498 >+hide-from-header{block}</PRE
5512 >+hide-from-header{spam-me-senseless@sittingduck.example.com}</PRE
5525 NAME="HIDE-REFERRER"
5526 >8.5.25. hide-referrer</A
5534 CLASS="VARIABLELIST"
5540 >Conceal which link you followed to get to a particular site</P
5549 > (sic) HTTP header from the client request,
5550 or replaces it with a forged one.
5569 >"conditional-block"</SPAN
5570 > to delete the header completely if the host has changed.</P
5576 >"conditional-forge"</SPAN
5577 > to forge the header if the host has changed.</P
5584 > to delete the header unconditionally.</P
5591 > to pretend to be coming from the homepage of the server we are talking to.</P
5595 >Any other string to set a user defined referrer.</P
5605 >conditional-block</TT
5606 > is the only parameter,
5607 that isn't easily detected in the server's log file. If it blocks the
5608 referrer, the request will look like the visitor used a bookmark or
5609 typed in the address directly.
5612 > Leaving the referrer unmodified for requests on the same host
5613 allows the server owner to see the visitor's <SPAN
5617 but in most cases she could also get that information by comparing
5618 other parts of the log file: for example the User-Agent if it isn't
5619 a very common one, or the user's IP address if it doesn't change between
5623 > Always blocking the referrer, or using a custom one, can lead to
5624 failures on servers that check the referrer before they answer any
5625 requests, in an attempt to prevent their content from being
5626 embedded or linked to elsewhere.
5631 >conditional-block</TT
5636 will work with referrer checks, as long as content and valid referring page
5637 are on the same host. Most of the time that's the case.
5643 > is an alternate spelling of
5647 > and the two can be can be freely
5648 substituted with each other. (<SPAN
5652 correct English spelling, however the HTTP specification has a bug - it
5653 requires it to be spelled as <SPAN
5670 >+hide-referrer{forge}</PRE
5684 >+hide-referrer{http://www.yahoo.com/}</PRE
5697 NAME="HIDE-USER-AGENT"
5698 >8.5.26. hide-user-agent</A
5703 CLASS="VARIABLELIST"
5709 >Try to conceal your type of browser and client operating system</P
5715 > Replaces the value of the <SPAN
5717 >"User-Agent:"</SPAN
5719 in client requests with the specified value.
5732 > Any user-defined string.
5757 > This can lead to problems on web sites that depend on looking at this header in
5758 order to customize their content for different browsers (which, by the
5765 > the right thing to do: good web sites
5766 work browser-independently).
5773 > Using this action in multi-user setups or wherever different types of
5774 browsers will access the same <SPAN
5784 >. In single-user, single-browser
5785 setups, you might use it to delete your OS version information from
5786 the headers, because it is an invitation to exploit known bugs for your
5787 OS. It is also occasionally useful to forge this in order to access
5788 sites that won't let you in otherwise (though there may be a good
5789 reason in some cases).
5792 > More information on known user-agent strings can be found at
5794 HREF="http://www.user-agents.org/"
5796 >http://www.user-agents.org/</A
5800 HREF="http://en.wikipedia.org/wiki/User_agent"
5802 >http://en.wikipedia.org/wiki/User_agent</A
5817 >+hide-user-agent{Netscape 6.1 (X11; I; Linux 2.4.18 i686)}</PRE
5830 NAME="LIMIT-CONNECT"
5831 >8.5.27. limit-connect</A
5836 CLASS="VARIABLELIST"
5842 >Prevent abuse of <SPAN
5845 > as a TCP proxy relay or disable SSL for untrusted sites</P
5851 > Specifies to which ports HTTP CONNECT requests are allowable.
5864 > A comma-separated list of ports or port ranges (the latter using dashes, with the minimum
5865 defaulting to 0 and the maximum to 65K).
5872 > By default, i.e. if no <TT
5879 > allows HTTP CONNECT requests to all
5883 > if fine-grained control
5884 is desired for some or all destinations.
5887 > The CONNECT methods exists in HTTP to allow access to secure websites
5891 > URLs) through proxies. It works very simply:
5892 the proxy connects to the server on the specified port, and then
5893 short-circuits its connections to the client and to the remote server.
5894 This means CONNECT-enabled proxies can be used as TCP relays very easily.
5900 > relays HTTPS traffic without seeing
5901 the decoded content. Websites can leverage this limitation to circumvent <SPAN
5905 filters. By specifying an invalid port range you can disable HTTPS entirely.
5909 >Example usages:</DT
5919 >+limit-connect{443} # Port 443 is OK.
5920 +limit-connect{80,443} # Ports 80 and 443 are OK.
5921 +limit-connect{-3, 7, 20-100, 500-} # Ports less than 3, 7, 20 to 100 and above 500 are OK.
5922 +limit-connect{-} # All ports are OK
5923 +limit-connect{,} # No HTTPS/SSL traffic is allowed</PRE
5936 NAME="LIMIT-COOKIE-LIFETIME"
5937 >8.5.28. limit-cookie-lifetime</A
5942 CLASS="VARIABLELIST"
5948 >Limit the lifetime of HTTP cookies to a couple of minutes or hours.</P
5954 > Overwrites the expires field in Set-Cookie server headers if it's above the specified limit.
5967 > The lifetime limit in minutes, or 0.
5974 > This action reduces the lifetime of HTTP cookies coming from the
5975 server to the specified number of minutes, starting from the time
5976 the cookie passes Privoxy.
5979 > Cookies with a lifetime below the limit are not modified.
5980 The lifetime of session cookies is set to the specified limit.
5983 > The effect of this action depends on the server.
5986 > In case of servers which refresh their cookies with each response
5987 (or at least frequently), the lifetime limit set by this action
5989 Thus, a session associated with the cookie continues to work with
5990 this action enabled, as long as a new request is made before the
5991 last limit set is reached.
5994 > However, some servers send their cookies once, with a lifetime of several
5995 years (the year 2037 is a popular choice), and do not refresh them
5996 until a certain event in the future, for example the user logging out.
5997 In this case this action may limit the absolute lifetime of the session,
5998 even if requests are made frequently.
6001 > If the parameter is <SPAN
6004 >, this action behaves like
6008 HREF="actions-file.html#SESSION-COOKIES-ONLY"
6009 >session-cookies-only</A
6015 >Example usages:</DT
6025 >+limit-cookie-lifetime{60}</PRE
6038 NAME="PREVENT-COMPRESSION"
6039 >8.5.29. prevent-compression</A
6044 CLASS="VARIABLELIST"
6050 > Ensure that servers send the content uncompressed, so it can be
6054 HREF="actions-file.html#FILTER"
6064 > Removes the Accept-Encoding header which can be used to ask for compressed transfer.
6084 > More and more websites send their content compressed by default, which
6085 is generally a good idea and saves bandwidth. But the <TT
6088 HREF="actions-file.html#FILTER"
6095 HREF="actions-file.html#DEANIMATE-GIFS"
6099 actions need access to the uncompressed data.
6102 > When compiled with zlib support (available since <SPAN
6105 > 3.0.7), content that should be
6106 filtered is decompressed on-the-fly and you don't have to worry about this action.
6107 If you are using an older <SPAN
6110 > version, or one that hasn't been compiled with zlib
6111 support, this action can be used to convince the server to send the content uncompressed.
6114 > Most text-based instances compress very well, the size is seldom decreased by less than 50%,
6115 for markup-heavy instances like news feeds saving more than 90% of the original size isn't
6119 > Not using compression will therefore slow down the transfer, and you should only
6120 enable this action if you really need it. As of <SPAN
6123 > 3.0.7 it's disabled in all
6124 predefined action settings.
6127 > Note that some (rare) ill-configured sites don't handle requests for uncompressed
6128 documents correctly. Broken PHP applications tend to send an empty document body,
6129 some IIS versions only send the beginning of the content. If you enable
6132 >prevent-compression</TT
6133 > per default, you might want to add
6134 exceptions for those sites. See the example for how to do that.
6138 >Example usage (sections):</DT
6148 ># Selectively turn off compression, and enable a filter
6150 { +filter{tiny-textforms} +prevent-compression }
6151 # Match only these sites
6156 # Or instead, we could set a universal default:
6158 { +prevent-compression }
6161 # Then maybe make exceptions for broken sites:
6163 { -prevent-compression }
6177 NAME="OVERWRITE-LAST-MODIFIED"
6178 >8.5.30. overwrite-last-modified</A
6183 CLASS="VARIABLELIST"
6189 >Prevent yet another way to track the user's steps between sessions.</P
6197 >"Last-Modified:"</SPAN
6198 > HTTP server header or modifies its value.
6211 > One of the keywords: <SPAN
6216 >"reset-to-request-time"</SPAN
6228 > Removing the <SPAN
6230 >"Last-Modified:"</SPAN
6231 > header is useful for filter
6232 testing, where you want to force a real reload instead of getting status
6236 >, which would cause the browser to reuse the old
6237 version of the page.
6243 > option overwrites the value of the
6246 >"Last-Modified:"</SPAN
6247 > header with a randomly chosen time
6248 between the original value and the current time. In theory the server
6249 could send each document with a different <SPAN
6251 >"Last-Modified:"</SPAN
6253 header to track visits without using cookies. <SPAN
6257 makes it impossible and the browser can still revalidate cached documents.
6262 >"reset-to-request-time"</SPAN
6263 > overwrites the value of the
6266 >"Last-Modified:"</SPAN
6267 > header with the current time. You could use
6268 this option together with
6272 HREF="actions-file.html#HIDE-IF-MODIFIED-SINCE"
6273 >hide-if-modified-since</A
6276 to further customize your random range.
6279 > The preferred parameter here is <SPAN
6283 to use, as long as the time settings are more or less correct.
6284 If the server sets the <SPAN
6286 >"Last-Modified:"</SPAN
6287 > header to the time
6288 of the request, the random range becomes zero and the value stays the same.
6289 Therefore you should later randomize it a second time with
6293 HREF="actions-file.html#HIDE-IF-MODIFIED-SINCE"
6294 >hided-if-modified-since</A
6300 > It is also recommended to use this action together with
6304 HREF="actions-file.html#CRUNCH-IF-NONE-MATCH"
6305 >crunch-if-none-match</A
6321 ># Let the browser revalidate without being tracked across sessions
6322 { +hide-if-modified-since{-60} \
6323 +overwrite-last-modified{randomize} \
6324 +crunch-if-none-match}
6339 >8.5.31. redirect</A
6344 CLASS="VARIABLELIST"
6350 > Redirect requests to other sites.
6357 > Convinces the browser that the requested document has been moved
6358 to another location and the browser should get it from there.
6371 > An absolute URL or a single pcrs command.
6378 > Requests to which this action applies are answered with a
6379 HTTP redirect to URLs of your choosing. The new URL is
6380 either provided as parameter, or derived by applying a
6381 single pcrs command to the original URL.
6384 > The syntax for pcrs commands is documented in the
6386 HREF="filter-file.html"
6391 > Requests can't be blocked and redirected at the same time,
6392 applying this action together with
6396 HREF="actions-file.html#BLOCK"
6400 is a configuration error. Currently the request is blocked
6401 and an error message logged, the behavior may change in the
6402 future and result in Privoxy rejecting the action file.
6405 > This action can be combined with
6409 HREF="actions-file.html#FAST-REDIRECTS"
6410 >fast-redirects{check-decoded-url}</A
6413 to redirect to a decoded version of a rewritten URL.
6416 > Use this action carefully, make sure not to create redirection loops
6417 and be aware that using your own redirects might make it
6418 possible to fingerprint your requests.
6421 > In case of problems with your redirects, or simply to watch
6422 them working, enable <A
6423 HREF="config.html#DEBUG"
6429 >Example usages:</DT
6439 ># Replace example.com's style sheet with another one
6440 { +redirect{http://localhost/css-replacements/example.com.css} }
6441 example.com/stylesheet\.css
6443 # Create a short, easy to remember nickname for a favorite site
6444 # (relies on the browser to accept and forward invalid URLs to <SPAN
6448 { +redirect{https://www.privoxy.org/user-manual/actions-file.html} }
6451 # Always use the expanded view for Undeadly.org articles
6452 # (Note the $ at the end of the URL pattern to make sure
6453 # the request for the rewritten URL isn't redirected as well)
6454 {+redirect{s@$@&mode=expanded@}}
6455 undeadly.org/cgi\?action=article&sid=\d*$
6457 # Redirect Google search requests to MSN
6458 {+redirect{s@^http://[^/]*/search\?q=([^&]*).*@http://search.msn.com/results.aspx?q=$1@}}
6461 # Redirect MSN search requests to Yahoo
6462 {+redirect{s@^http://[^/]*/results\.aspx\?q=([^&]*).*@http://search.yahoo.com/search?p=$1@}}
6463 search.msn.com//results\.aspx\?q=
6465 # Redirect http://example.com/&bla=fasel&toChange=foo (and any other value but "bar")
6466 # to http://example.com/&bla=fasel&toChange=bar
6468 # The URL pattern makes sure that the following request isn't redirected again.
6469 {+redirect{s@toChange=[^&]+@toChange=bar@}}
6470 example.com/.*toChange=(?!bar)
6472 # Add a shortcut to look up illumos bugs
6473 {+redirect{s@^http://i([0-9]+)/.*@https://www.illumos.org/issues/$1@}}
6474 # Redirected URL = http://i4974/
6475 # Redirect Destination = https://www.illumos.org/issues/4974
6476 i[0-9][0-9][0-9][0-9]*/
6478 # Redirect remote requests for this manual
6479 # to the local version delivered by Privoxy
6480 {+redirect{s@^http://www@http://config@}}
6481 www.privoxy.org/user-manual/</PRE
6494 NAME="SERVER-HEADER-FILTER"
6495 >8.5.32. server-header-filter</A
6500 CLASS="VARIABLELIST"
6506 > Rewrite or remove single server headers.
6513 > All server headers to which this action applies are filtered on-the-fly
6514 through the specified regular expression based substitutions.
6527 > The name of a server-header filter, as defined in one of the
6529 HREF="filter-file.html"
6538 > Server-header filters are applied to each header on its own, not to
6539 all at once. This makes it easier to diagnose problems, but on the downside
6540 you can't write filters that only change header x if header y's value is z.
6541 You can do that by using tags though.
6544 > Server-header filters are executed after the other header actions have finished
6545 and use their output as input.
6548 > Please refer to the <A
6549 HREF="filter-file.html"
6550 >filter file chapter</A
6552 to learn which server-header filters are available by default, and how to
6557 >Example usage (section):</DT
6567 >{+server-header-filter{html-to-xml}}
6568 example.org/xml-instance-that-is-delivered-as-html
6570 {+server-header-filter{xml-to-html}}
6571 example.org/instance-that-is-delivered-as-xml-but-is-not
6585 NAME="SERVER-HEADER-TAGGER"
6586 >8.5.33. server-header-tagger</A
6591 CLASS="VARIABLELIST"
6597 > Enable or disable filters based on the Content-Type header.
6604 > Server headers to which this action applies are filtered on-the-fly through
6605 the specified regular expression based substitutions, the result is used as
6619 > The name of a server-header tagger, as defined in one of the
6621 HREF="filter-file.html"
6630 > Server-header taggers are applied to each header on its own,
6631 and as the header isn't modified, each tagger <SPAN
6638 > Server-header taggers are executed before all other header actions
6639 that modify server headers. Their tags can be used to control
6640 all of the other server-header actions, the content filters
6641 and the crunch actions (<A
6642 HREF="actions-file.html#REDIRECT"
6646 HREF="actions-file.html#BLOCK"
6651 > Obviously crunching based on tags created by server-header taggers
6652 doesn't prevent the request from showing up in the server's log file.
6656 >Example usage (section):</DT
6666 ># Tag every request with the content type declared by the server
6667 {+server-header-tagger{content-type}}
6670 # If the response has a tag starting with 'image/' enable an external
6671 # filter that only applies to images.
6673 # Note that the filter is not available by default, it's just a
6677 HREF="filter-file.html#EXTERNAL-FILTER-SYNTAX"
6681 {+external-filter{rotate-image} +force-text-mode}
6695 NAME="SESSION-COOKIES-ONLY"
6696 >8.5.34. session-cookies-only</A
6701 CLASS="VARIABLELIST"
6707 > Allow only temporary <SPAN
6710 > cookies (for the current
6711 browser session <SPAN
6729 >"Set-Cookie:"</SPAN
6731 server headers. Most browsers will not store such cookies permanently and
6732 forget them in between sessions.
6752 > This is less strict than <TT
6755 HREF="actions-file.html#CRUNCH-INCOMING-COOKIES"
6756 >crunch-incoming-cookies</A
6762 HREF="actions-file.html#CRUNCH-OUTGOING-COOKIES"
6763 >crunch-outgoing-cookies</A
6765 > and allows you to browse
6766 websites that insist or rely on setting cookies, without compromising your privacy too badly.
6769 > Most browsers will not permanently store cookies that have been processed by
6772 >session-cookies-only</TT
6773 > and will forget about them between sessions.
6774 This makes profiling cookies useless, but won't break sites which require cookies so
6775 that you can log in for transactions. This is generally turned on for all
6776 sites, and is the recommended setting.
6787 >session-cookies-only</TT
6792 HREF="actions-file.html#CRUNCH-INCOMING-COOKIES"
6793 >crunch-incoming-cookies</A
6799 HREF="actions-file.html#CRUNCH-OUTGOING-COOKIES"
6800 >crunch-outgoing-cookies</A
6802 >. If you do, cookies
6803 will be plainly killed.
6806 > Note that it is up to the browser how it handles such cookies without an <SPAN
6810 field. If you use an exotic browser, you might want to try it out to be sure.
6813 > This setting also has no effect on cookies that may have been stored
6814 previously by the browser before starting <SPAN
6818 These would have to be removed manually.
6826 HREF="actions-file.html#FILTER-CONTENT-COOKIES"
6827 >content-cookies filter</A
6829 to block some types of cookies. Content cookies are not effected by
6832 >session-cookies-only</TT
6847 >+session-cookies-only</PRE
6860 NAME="SET-IMAGE-BLOCKER"
6861 >8.5.35. set-image-blocker</A
6866 CLASS="VARIABLELIST"
6872 >Choose the replacement for blocked images</P
6878 > This action alone doesn't do anything noticeable. If <SPAN
6888 HREF="actions-file.html#BLOCK"
6900 HREF="actions-file.html#HANDLE-AS-IMAGE"
6910 apply, i.e. if the request is to be blocked as an image,
6917 > the parameter of this action decides what will be
6918 sent as a replacement.
6938 > to send a built-in checkerboard pattern image. The image is visually
6939 decent, scales very well, and makes it obvious where banners were busted.
6947 > to send a built-in transparent image. This makes banners disappear
6948 completely, but makes it hard to detect where <SPAN
6952 images on a given page and complicates troubleshooting if <SPAN
6956 has blocked innocent images, like navigation icons.
6970 send a redirect to <TT
6976 to any image anywhere, even in your local filesystem via <SPAN
6980 (But note that not all browsers support redirecting to a local file system).
6983 > A good application of redirects is to use special <SPAN
6987 URLs, which send the built-in images, as <TT
6993 This has the same visual effect as specifying <SPAN
7000 the first place, but enables your browser to cache the replacement image, instead of requesting
7001 it over and over again.
7010 > The URLs for the built-in images are <SPAN
7012 >"http://config.privoxy.org/send-banner?type=<TT
7033 > There is a third (advanced) type, called <SPAN
7045 >set-image-blocker</TT
7046 >, but meant for use from <A
7047 HREF="filter-file.html"
7050 Auto will select the type of image that would have applied to the referring page, had it been an image.
7067 >+set-image-blocker{pattern}</PRE
7072 > Redirect to the BSD daemon:
7082 >+set-image-blocker{http://www.freebsd.org/gifs/dae_up3.gif}</PRE
7087 > Redirect to the built-in pattern for better caching:
7097 >+set-image-blocker{http://config.privoxy.org/send-banner?type=pattern}</PRE
7114 > Note that many of these actions have the potential to cause a page to
7115 misbehave, possibly even not to display at all. There are many ways
7116 a site designer may choose to design his site, and what HTTP header
7117 content, and other criteria, he may depend on. There is no way to have hard
7118 and fast rules for all sites. See the <A
7119 HREF="appendix.html#ACTIONSANAT"
7121 > for a brief example on troubleshooting
7144 >, can be defined by combining other actions.
7145 These can in turn be invoked just like the built-in actions.
7146 Currently, an alias name can contain any character except space, tab,
7164 > that you only use <SPAN
7184 Alias names are not case sensitive, and are not required to start with a
7191 > sign, since they are merely textually
7194 > Aliases can be used throughout the actions file, but they <SPAN
7199 defined in a special section at the top of the file!</I
7202 And there can only be one such section per actions file. Each actions file may
7203 have its own alias section, and the aliases defined in it are only visible
7204 within that file.</P
7206 > There are two main reasons to use aliases: One is to save typing for frequently
7207 used combinations of actions, the other one is a gain in flexibility: If you
7208 decide once how you want to handle shops by defining an alias called
7212 >, you can later change your policy on shops in
7219 > place, and your changes will take effect everywhere
7220 in the actions file where the <SPAN
7223 > alias is used. Calling aliases
7224 by their purpose also makes your actions files more readable.</P
7226 > Currently, there is one big drawback to using aliases, though:
7230 >'s built-in web-based action file
7231 editor honors aliases when reading the actions files, but it expands
7232 them before writing. So the effects of your aliases are of course preserved,
7233 but the aliases themselves are lost when you edit sections that use aliases
7236 > Now let's define some aliases...</P
7245 > # Useful custom aliases we can use later.
7247 # Note the (required!) section header line and that this section
7248 # must be at the top of the actions file!
7252 # These aliases just save typing later:
7253 # (Note that some already use other aliases!)
7255 +crunch-all-cookies = +<A
7256 HREF="actions-file.html#CRUNCH-INCOMING-COOKIES"
7257 >crunch-incoming-cookies</A
7259 HREF="actions-file.html#CRUNCH-OUTGOING-COOKIES"
7260 >crunch-outgoing-cookies</A
7262 -crunch-all-cookies = -<A
7263 HREF="actions-file.html#CRUNCH-INCOMING-COOKIES"
7264 >crunch-incoming-cookies</A
7266 HREF="actions-file.html#CRUNCH-OUTGOING-COOKIES"
7267 >crunch-outgoing-cookies</A
7269 +block-as-image = +block{Blocked image.} +handle-as-image
7270 allow-all-cookies = -crunch-all-cookies -<A
7271 HREF="actions-file.html#SESSION-COOKIES-ONLY"
7272 >session-cookies-only</A
7274 HREF="actions-file.html#FILTER-CONTENT-COOKIES"
7275 >filter{content-cookies}</A
7278 # These aliases define combinations of actions
7279 # that are useful for certain types of sites:
7282 HREF="actions-file.html#BLOCK"
7285 HREF="actions-file.html#FILTER"
7287 > -crunch-all-cookies -<A
7288 HREF="actions-file.html#FAST-REDIRECTS"
7291 HREF="actions-file.html#HIDE-REFERER"
7294 HREF="actions-file.html#PREVENT-COMPRESSION"
7295 >prevent-compression</A
7298 shop = -crunch-all-cookies -<A
7299 HREF="actions-file.html#FILTER-ALL-POPUPS"
7300 >filter{all-popups}</A
7303 # Short names for other aliases, for really lazy people ;-)
7305 c0 = +crunch-all-cookies
7306 c1 = -crunch-all-cookies</PRE
7311 > ...and put them to use. These sections would appear in the lower part of an
7312 actions file and define exceptions to the default actions (as specified further
7325 > # These sites are either very complex or very keen on
7326 # user data and require minimal interference to work:
7329 .office.microsoft.com
7330 .windowsupdate.microsoft.com
7331 # Gmail is really mail.google.com, not gmail.com
7335 # Allow cookies (for setting and retrieving your customer data)
7339 .worldpay.com # for quietpc.com
7342 # These shops require pop-ups:
7344 {-filter{all-popups} -filter{unsolicited-popups}}
7346 .overclockers.co.uk</PRE
7351 > Aliases like <SPAN
7357 > are typically used for
7361 > sites that require more than one action to be disabled
7362 in order to function properly.</P
7370 >8.7. Actions Files Tutorial</A
7373 > The above chapters have shown <A
7374 HREF="actions-file.html"
7375 >which actions files
7376 there are and how they are organized</A
7377 >, how actions are <A
7378 HREF="actions-file.html#ACTIONS"
7381 HREF="actions-file.html#ACTIONS-APPLY"
7385 HREF="actions-file.html#AF-PATTERNS"
7389 HREF="actions-file.html#ALIASES"
7391 >. Now, let's look at an
7394 >match-all.action</TT
7402 > file and see how all these pieces come together:</P
7409 >8.7.1. match-all.action</A
7416 >all actions are disabled when matching starts</I
7419 so we have to explicitly enable the ones we want.</P
7423 >match-all.action</TT
7424 > file only contains a
7425 single section, it is probably the most important one. It has only one
7434 HREF="actions-file.html#AF-PATTERNS"
7435 >matches all URLs</A
7436 >. Therefore, the set of
7437 actions used in this <SPAN
7445 be applied to all requests as a start</I
7447 >. It can be partly or
7448 wholly overridden by other actions files like <TT
7455 >, but it will still be largely responsible
7456 for your overall browsing experience.</P
7458 > Again, at the start of matching, all actions are disabled, so there is
7459 no need to disable any actions here. (Remember: a <SPAN
7463 preceding the action name enables the action, a <SPAN
7467 Also note how this long line has been made more readable by splitting it into
7468 multiple lines with line continuation.</P
7479 HREF="actions-file.html#CHANGE-X-FORWARDED-FOR"
7480 >change-x-forwarded-for{block}</A
7483 HREF="actions-file.html#HIDE-FROM-HEADER"
7484 >hide-from-header{block}</A
7487 HREF="actions-file.html#SET-IMAGE-BLOCKER"
7488 >set-image-blocker{pattern}</A
7497 > The default behavior is now set.</P
7504 NAME="DEFAULT-ACTION"
7505 >8.7.2. default.action</A
7508 > If you aren't a developer, there's no need for you to edit the
7512 > file. It is maintained by
7516 > developers and if you disagree with some of the
7517 sections, you should overrule them in your <TT
7522 > Understanding the <TT
7526 help you with your <TT
7531 > The first section in this file is a special section for internal use
7532 that prevents older <SPAN
7535 > versions from reading the file:</P
7544 >##########################################################################
7545 # Settings -- Don't change! For internal Privoxy use ONLY.
7546 ##########################################################################
7548 for-privoxy-version=3.0.11</PRE
7553 > After that comes the (optional) alias section. We'll use the example
7554 section from the above <A
7555 HREF="actions-file.html#ALIASES"
7556 >chapter on aliases</A
7558 that also explains why and how aliases are used:</P
7567 >##########################################################################
7569 ##########################################################################
7572 # These aliases just save typing later:
7573 # (Note that some already use other aliases!)
7575 +crunch-all-cookies = +<A
7576 HREF="actions-file.html#CRUNCH-INCOMING-COOKIES"
7577 >crunch-incoming-cookies</A
7579 HREF="actions-file.html#CRUNCH-OUTGOING-COOKIES"
7580 >crunch-outgoing-cookies</A
7582 -crunch-all-cookies = -<A
7583 HREF="actions-file.html#CRUNCH-INCOMING-COOKIES"
7584 >crunch-incoming-cookies</A
7586 HREF="actions-file.html#CRUNCH-OUTGOING-COOKIES"
7587 >crunch-outgoing-cookies</A
7589 +block-as-image = +block{Blocked image.} +handle-as-image
7590 mercy-for-cookies = -crunch-all-cookies -<A
7591 HREF="actions-file.html#SESSION-COOKIES-ONLY"
7592 >session-cookies-only</A
7594 HREF="actions-file.html#FILTER-CONTENT-COOKIES"
7595 >filter{content-cookies}</A
7598 # These aliases define combinations of actions
7599 # that are useful for certain types of sites:
7602 HREF="actions-file.html#BLOCK"
7605 HREF="actions-file.html#FILTER"
7607 > -crunch-all-cookies -<A
7608 HREF="actions-file.html#FAST-REDIRECTS"
7611 HREF="actions-file.html#HIDE-REFERER"
7614 shop = -crunch-all-cookies -<A
7615 HREF="actions-file.html#FILTER-ALL-POPUPS"
7616 >filter{all-popups}</A
7622 > The first of our specialized sections is concerned with <SPAN
7626 sites, i.e. sites that require minimum interference, because they are either
7627 very complex or very keen on tracking you (and have mechanisms in place that
7628 make them unusable for people who avoid being tracked). We will use
7632 > alias instead of stating the list
7633 of actions explicitly:</P
7642 >##########################################################################
7643 # Exceptions for sites that'll break under the default action set:
7644 ##########################################################################
7646 # "Fragile" Use a minimum set of actions for these sites (see alias above):
7649 .office.microsoft.com # surprise, surprise!
7650 .windowsupdate.microsoft.com
7651 mail.google.com</PRE
7656 > Shopping sites are not as fragile, but they typically
7657 require cookies to log in, and pop-up windows for shopping
7658 carts or item details. Again, we'll use a pre-defined alias:</P
7671 .worldpay.com # for quietpc.com
7681 HREF="actions-file.html#FAST-REDIRECTS"
7685 action, which may have been enabled in <TT
7687 >match-all.action</TT
7689 breaks some sites. So disable it for popular sites where we know it misbehaves:</P
7699 HREF="actions-file.html#FAST-REDIRECTS"
7705 .altavista.com/.*(like|url|link):http
7706 .altavista.com/trans.*urltext=http
7712 > It is important that <SPAN
7716 URLs belong to images, so that <SPAN
7723 be blocked, a substitute image can be sent, rather than an HTML page.
7724 Contacting the remote site to find out is not an option, since it
7725 would destroy the loading time advantage of banner blocking, and it
7726 would feed the advertisers information about you. We can mark any
7727 URL as an image with the <TT
7730 HREF="actions-file.html#HANDLE-AS-IMAGE"
7734 and marking all URLs that end in a known image file extension is a
7744 >##########################################################################
7746 ##########################################################################
7748 # Define which file types will be treated as images, in case they get
7749 # blocked further down this file:
7752 HREF="actions-file.html#HANDLE-AS-IMAGE"
7755 /.*\.(gif|jpe?g|png|bmp|ico)$</PRE
7760 > And then there are known banner sources. They often use scripts to
7761 generate the banners, so it won't be visible from the URL that the
7762 request is for an image. Hence we block them <SPAN
7769 mark them as images in one go, with the help of our
7772 >+block-as-image</TT
7773 > alias defined above. (We could of
7774 course just as well use <TT
7777 HREF="actions-file.html#BLOCK"
7781 HREF="actions-file.html#HANDLE-AS-IMAGE"
7785 Remember that the type of the replacement image is chosen by the
7789 HREF="actions-file.html#SET-IMAGE-BLOCKER"
7790 >set-image-blocker</A
7793 action. Since all URLs have matched the default section with its
7797 HREF="actions-file.html#SET-IMAGE-BLOCKER"
7798 >set-image-blocker</A
7801 action before, it still applies and needn't be repeated:</P
7810 ># Known ad generators:
7815 .ad.*.doubleclick.net
7816 .a.yimg.com/(?:(?!/i/).)*$
7817 .a[0-9].yimg.com/(?:(?!/i/).)*$
7824 > One of the most important jobs of <SPAN
7828 is to block banners. Many of these can be <SPAN
7835 HREF="actions-file.html#FILTER"
7837 >{banners-by-size}</TT
7839 action, which we enabled above, and which deletes the references to banner
7840 images from the pages while they are loaded, so the browser doesn't request
7841 them anymore, and hence they don't need to be blocked here. But this naturally
7842 doesn't catch all banners, and some people choose not to use filters, so we
7843 need a comprehensive list of patterns for banner URLs here, and apply the
7847 HREF="actions-file.html#BLOCK"
7850 > action to them.</P
7852 > First comes many generic patterns, which do most of the work, by
7853 matching typical domain and path name components of banners. Then comes
7854 a list of individual patterns for specific sites, which is omitted here
7855 to keep the example short:</P
7864 >##########################################################################
7865 # Block these fine banners:
7866 ##########################################################################
7868 HREF="actions-file.html#BLOCK"
7869 >+block{Banner ads.}</A
7878 /.*count(er)?\.(pl|cgi|exe|dll|asp|php[34]?)
7879 /(?:.*/)?(publicite|werbung|rekla(ma|me|am)|annonse|maino(kset|nta|s)?)/
7881 # Site-specific patterns (abbreviated):
7888 > It's quite remarkable how many advertisers actually call their banner
7894 >.com, or call the directory
7895 in which the banners are stored literally <SPAN
7899 generic patterns are surprisingly effective.</P
7901 > But being very generic, they necessarily also catch URLs that we don't want
7902 to block. The pattern <TT
7914 >.nasty-corp.com"</SPAN
7924 >.sourcefroge.net"</SPAN
7934 >l.some-provider.net."</SPAN
7936 well-known exceptions to the <TT
7939 HREF="actions-file.html#BLOCK"
7945 > Note that these are exceptions to exceptions from the default! Consider the URL
7948 >"downloads.sourcefroge.net"</SPAN
7949 >: Initially, all actions are deactivated,
7950 so it wouldn't get blocked. Then comes the defaults section, which matches the
7951 URL, but just deactivates the <TT
7954 HREF="actions-file.html#BLOCK"
7958 action once again. Then it matches <TT
7961 >, an exception to the
7962 general non-blocking policy, and suddenly
7966 HREF="actions-file.html#BLOCK"
7969 > applies. And now, it'll match
7976 HREF="actions-file.html#BLOCK"
7980 applies, so (unless it matches <SPAN
7986 > further down) it ends up
7990 HREF="actions-file.html#BLOCK"
7993 > action applying.</P
8002 >##########################################################################
8003 # Save some innocent victims of the above generic block patterns:
8004 ##########################################################################
8009 HREF="actions-file.html#BLOCK"
8012 adv[io]*. # (for advogato.org and advice.*)
8013 adsl. # (has nothing to do with ads)
8014 adobe. # (has nothing to do with ads either)
8015 ad[ud]*. # (adult.* and add.*)
8016 .edu # (universities don't host banners (yet!))
8017 .*loads. # (downloads, uploads etc)
8025 www.globalintersec.com/adv # (adv = advanced)
8026 www.ugu.com/sui/ugu/adv</PRE
8031 > Filtering source code can have nasty side effects,
8032 so make an exception for our friends at sourceforge.net,
8033 and all paths with <SPAN
8036 > in them. Note that
8040 HREF="actions-file.html#FILTER"
8050 > filters in one fell swoop!</P
8059 ># Don't filter code!
8062 HREF="actions-file.html#FILTER"
8069 .sourceforge.net</PRE
8077 > is of course much more
8078 comprehensive, but we hope this example made clear how it works.</P
8086 >8.7.3. user.action</A
8089 > So far we are painting with a broad brush by setting general policies,
8090 which would be a reasonable starting point for many people. Now,
8091 you might want to be more specific and have customized rules that
8092 are more suitable to your personal habits and preferences. These would
8093 be for narrowly defined situations like your ISP or your bank, and should
8097 >, which is parsed after all other
8098 actions files and hence has the last word, over-riding any previously
8099 defined actions. <TT
8109 > place for your personal settings, since
8113 > is actively maintained by the
8117 > developers and you'll probably want
8118 to install updated versions from time to time.</P
8120 > So let's look at a few examples of things that one might typically do in
8133 ># My user.action file. <fred@example.com></PRE
8139 HREF="actions-file.html#ALIASES"
8141 > are local to the actions
8142 file that they are defined in, you can't use the ones from
8146 >, unless you repeat them here:</P
8155 ># Aliases are local to the file they are defined in.
8156 # (Re-)define aliases for this file:
8160 # These aliases just save typing later, and the alias names should
8161 # be self explanatory.
8163 +crunch-all-cookies = +crunch-incoming-cookies +crunch-outgoing-cookies
8164 -crunch-all-cookies = -crunch-incoming-cookies -crunch-outgoing-cookies
8165 allow-all-cookies = -crunch-all-cookies -session-cookies-only
8166 allow-popups = -filter{all-popups}
8167 +block-as-image = +block{Blocked as image.} +handle-as-image
8168 -block-as-image = -block
8170 # These aliases define combinations of actions that are useful for
8171 # certain types of sites:
8173 fragile = -block -crunch-all-cookies -filter -fast-redirects -hide-referrer
8174 shop = -crunch-all-cookies allow-popups
8176 # Allow ads for selected useful free sites:
8178 allow-ads = -block -filter{banners-by-size} -filter{banners-by-link}
8180 # Alias for specific file types that are text, but might have conflicting
8181 # MIME types. We want the browser to force these to be text documents.
8182 handle-as-text = -<A
8183 HREF="actions-file.html#FILTER"
8186 HREF="actions-file.html#CONTENT-TYPE-OVERWRITE"
8187 >content-type-overwrite{text/plain}</A
8189 HREF="actions-file.html#FORCE-TEXT-MODE"
8192 HREF="actions-file.html#HIDE-CONTENT-DISPOSITION"
8193 >hide-content-disposition</A
8199 > Say you have accounts on some sites that you visit regularly, and
8200 you don't want to have to log in manually each time. So you'd like
8201 to allow persistent cookies for these sites. The
8204 >allow-all-cookies</TT
8205 > alias defined above does exactly
8206 that, i.e. it disables crunching of cookies in any direction, and the
8207 processing of cookies to make them only temporary.</P
8216 >{ allow-all-cookies }
8225 > Your bank is allergic to some filter, but you don't know which, so you disable them all:</P
8235 HREF="actions-file.html#FILTER"
8238 .your-home-banking-site.com</PRE
8243 > Some file types you may not want to filter for various reasons:</P
8252 ># Technical documentation is likely to contain strings that might
8253 # erroneously get altered by the JavaScript-oriented filters:
8258 # And this stupid host sends streaming video with a wrong MIME type,
8259 # so that Privoxy thinks it is getting HTML and starts filtering:
8261 stupid-server.example.com/</PRE
8266 > Example of a simple <A
8267 HREF="actions-file.html#BLOCK"
8269 > action. Say you've
8270 seen an ad on your favourite page on example.com that you want to get rid of.
8271 You have right-clicked the image, selected <SPAN
8273 >"copy image location"</SPAN
8275 and pasted the URL below while removing the leading http://, into a
8279 > section. Note that <TT
8283 > need not be specified, since all URLs ending in
8287 > will be tagged as images by the general rules as set
8288 in default.action anyway:</P
8298 HREF="actions-file.html#BLOCK"
8301 www.example.com/nasty-ads/sponsor\.gif
8302 another.example.net/more/junk/here/</PRE
8307 > The URLs of dynamically generated banners, especially from large banner
8308 farms, often don't use the well-known image file name extensions, which
8309 makes it impossible for <SPAN
8313 the file type just by looking at the URL.
8316 >+block-as-image</TT
8317 > alias defined above for
8319 Note that objects which match this rule but then turn out NOT to be an
8320 image are typically rendered as a <SPAN
8322 >"broken image"</SPAN
8324 browser. Use cautiously.</P
8333 >{ +block-as-image }
8342 > Now you noticed that the default configuration breaks Forbes Magazine,
8343 but you were too lazy to find out which action is the culprit, and you
8344 were again too lazy to give <A
8348 you just used the <TT
8351 > alias on the site, and
8358 > -- it worked. The <TT
8362 aliases disables those actions that are most likely to break a site. Also,
8363 good for testing purposes to see if it is <SPAN
8367 that is causing the problem or not. We later find other regular sites
8368 that misbehave, and add those to our personalized list of troublemakers:</P
8385 > You like the <SPAN
8388 > text replacements in <TT
8392 but it is disabled in the distributed actions file.
8393 So you'd like to turn it on in your private,
8394 update-safe config, once and for all:</P
8404 HREF="actions-file.html#FILTER-FUN"
8407 / # For ALL sites!</PRE
8412 > Note that the above is not really a good idea: There are exceptions
8413 to the filters in <TT
8417 really shouldn't be filtered, like code on CVS->Web interfaces. Since
8421 > has the last word, these exceptions
8422 won't be valid for the <SPAN
8425 > filtering specified here.</P
8427 > You might also worry about how your favourite free websites are
8428 funded, and find that they rely on displaying banner advertisements
8429 to survive. So you might want to specifically allow banners for those
8430 sites that you feel provide value to you:</P
8450 > has been aliased to
8454 HREF="actions-file.html#BLOCK"
8461 HREF="actions-file.html#FILTER-BANNERS-BY-SIZE"
8462 >filter{banners-by-size}</A
8468 HREF="actions-file.html#FILTER-BANNERS-BY-LINK"
8469 >filter{banners-by-link}</A
8473 > Invoke another alias here to force an over-ride of the MIME type <TT
8475 > application/x-sh</TT
8476 > which typically would open a download type
8477 dialog. In my case, I want to look at the shell script, and then I can save
8478 it should I choose to.</P
8496 > is generally the best place to define
8497 exceptions and additions to the default policies of
8501 >. Some actions are safe to have their
8502 default policies set here though. So let's set a default policy to have a
8506 > image as opposed to the checkerboard pattern for
8516 > of course matches all URL
8517 paths and patterns:</P
8527 HREF="actions-file.html#SET-IMAGE-BLOCKER"
8528 >set-image-blocker{blank}</A
8542 SUMMARY="Footer navigation table"
8571 HREF="filter-file.html"
8581 >The Main Configuration File</TD