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.7 User Manual"
11 HREF="index.html"><LINK
13 TITLE="The Main Configuration File"
14 HREF="config.html"><LINK
17 HREF="filter-file.html"><LINK
21 <LINK REL="STYLESHEET" TYPE="text/css" HREF="p_doc.css">
33 SUMMARY="Header navigation table"
42 >Privoxy 3.0.7 User Manual</TH
64 HREF="filter-file.html"
82 > The actions files are used to define what <SPAN
92 > takes for which URLs, and thus determines
93 how ad images, cookies and various other aspects of HTTP content and
94 transactions are handled, and on which sites (or even parts thereof).
95 There are a number of such actions, with a wide range of functionality.
96 Each action does something a little different.
97 These actions give us a veritable arsenal of tools with which to exert
98 our control, preferences and independence. Actions can be combined so that
99 their effects are aggregated when applied against a given set of URLs.</P
102 are three action files included with <SPAN
117 > - is the primary action file
118 that sets the initial values for all actions. It is intended to
119 provide a base level of functionality for
123 > array of features. So it is
124 a set of broad rules that should work reasonably well as-is for most users.
125 This is the file that the developers are keeping updated, and <A
126 HREF="installation.html#INSTALLATION-KEEPUPDATED"
127 >making available to users</A
129 The user's preferences as set in <TT
152 > - is intended to be for local site
153 preferences and exceptions. As an example, if your ISP or your bank
154 has specific requirements, and need special handling, this kind of
155 thing should go here. This file will not be upgraded.
163 > - is used only by the web based editor
165 HREF="http://config.privoxy.org/edit-actions-list?f=default"
167 > http://config.privoxy.org/edit-actions-list?f=default</A
169 to set various pre-defined sets of rules for the default actions section
181 >Set to Cautious</SPAN
187 >Set to Advanced</SPAN
191 > These have increasing levels of aggressiveness <SPAN
196 influence on your browsing unless you select them explicitly in the
199 >. A default installation should be pre-set to
203 > (versions prior to 3.0.5 were set to
207 >). New users should try this for a while before
208 adjusting the settings to more aggressive levels. The more aggressive
209 the settings, then the more likelihood there is of problems such as sites
210 not working as they should.
216 > button allows you to turn each
217 action on/off individually for fine-tuning. The <SPAN
221 button changes the actions list to low/safe settings which will activate
222 ad blocking and a minimal set of <SPAN
225 >'s features, and subsequently
226 there will be less of a chance for accidental problems. The
230 > button sets the list to a medium level of
231 other features and a low level set of privacy features. The
235 > button sets the list to a high level of
236 ad blocking and medium level of privacy. See the chart below. The latter
237 three buttons over-ride any changes via with the
241 > button. More fine-tuning can be done in the
242 lower sections of this internal page.
245 > It is not recommend to edit the <TT
252 > The default profiles, and their associated actions, as pre-defined in
266 >Table 1. Default Configurations</B
296 >Ad-blocking Aggressiveness</TD
306 >Ad-filtering by size</TD
316 >Ad-filtering by link</TD
336 >Privacy Features</TD
366 >GIF de-animation</TD
396 >JavaScript taming</TD
416 >Image tag reordering</TD
434 > The list of actions files to be used are defined in the main configuration
435 file, and are processed in the order they are defined (e.g.
439 > is typically processed before
443 >). The content of these can all be viewed and
445 HREF="http://config.privoxy.org/show-status"
447 >http://config.privoxy.org/show-status</A
449 The over-riding principle when applying actions, is that the last action that
450 matches a given URL wins. The broadest, most general rules go first
455 followed by any exceptions (typically also in
459 >), which are then followed lastly by any
460 local preferences (typically in <SPAN
476 > An actions file typically has multiple sections. If you want to use
480 > in an actions file, you have to place the (optional)
482 HREF="actions-file.html#ALIASES"
484 > at the top of that file.
485 Then comes the default set of rules which will apply universally to all
486 sites and pages (be <SPAN
496 > or any other actions file after
500 >, because it will override the result
501 from consulting any previous file). And then below that,
502 exceptions to the defined universal policies. You can regard
506 > as an appendix to <TT
510 with the advantage that it is a separate file, which makes preserving your
511 personal settings across <SPAN
514 > upgrades easier.</P
517 Actions can be used to block anything you want, including ads, banners, or
518 just some obnoxious URL whose content you would rather not see. Cookies can be accepted
519 or rejected, or accepted only during the current browser session (i.e. not
520 written to disk), content can be modified, some JavaScripts tamed, user-tracking
521 fooled, and much more. See below for a <A
522 HREF="actions-file.html#ACTIONS"
532 >8.1. Finding the Right Mix</A
536 HREF="actions-file.html#ACTIONS"
538 >, like cookie suppression
539 or script disabling, may render some sites unusable that rely on these
540 techniques to work properly. Finding the right mix of actions is not always easy and
541 certainly a matter of personal taste. And, things can always change, requiring
542 refinements in the configuration. In general, it can be said that the more
546 > your default settings (in the top section of the
547 actions file) are, the more exceptions for <SPAN
551 will have to make later. If, for example, you want to crunch all cookies per
552 default, you'll have to make exceptions from that rule for sites that you
553 regularly use and that require cookies for actually useful purposes, like maybe
554 your bank, favorite shop, or newspaper.</P
556 > We have tried to provide you with reasonable rules to start from in the
557 distribution actions files. But there is no general rule of thumb on these
558 things. There just are too many variables, and sites are constantly changing.
559 Sooner or later you will want to change the rules (and read this chapter again :).</P
570 > The easiest way to edit the actions files is with a browser by
571 using our browser-based editor, which can be reached from <A
572 HREF="http://config.privoxy.org/show-status"
574 >http://config.privoxy.org/show-status</A
576 The editor allows both fine-grained control over every single feature on a
577 per-URL basis, and easy choosing from wholesale sets of defaults like
591 > setting is more aggressive, and
592 will be more likely to cause problems for some sites. Experienced users only!</P
594 > If you prefer plain text editing to GUIs, you can of course also directly edit the
595 the actions files with your favorite text editor. Look at
599 > which is richly commented with many
608 >8.3. How Actions are Applied to Requests</A
611 > Actions files are divided into sections. There are special sections,
615 HREF="actions-file.html#ALIASES"
618 > sections which will
619 be discussed later. For now let's concentrate on regular sections: They have a
620 heading line (often split up to multiple lines for readability) which consist
621 of a list of actions, separated by whitespace and enclosed in curly braces.
622 Below that, there is a list of URL and tag patterns, each on a separate line.</P
624 > To determine which actions apply to a request, the URL of the request is
625 compared to all URL patterns in each <SPAN
629 Every time it matches, the list of applicable actions for the request is
630 incrementally updated, using the heading of the section in which the
631 pattern is located. The same is done again for tags and tag patterns later on.</P
633 > If multiple applying sections set the same action differently,
634 the last match wins. If not, the effects are aggregated.
635 E.g. a URL might match a regular section with a heading line of <TT
639 HREF="actions-file.html#HANDLE-AS-IMAGE"
643 then later another one with just <TT
647 HREF="actions-file.html#BLOCK"
657 > actions to apply. And there may well be
658 cases where you will want to combine actions together. Such a section then
676 # Block these as if they were images. Send no block page.
678 media.example.com/.*banners
679 .example.com/images/ads/</PRE
686 > You can trace this process for URL patterns and any given URL by visiting <A
687 HREF="http://config.privoxy.org/show-url-info"
689 >http://config.privoxy.org/show-url-info</A
692 > Examples and more detail on this is provided in the Appendix, <A
693 HREF="appendix.html#ACTIONSANAT"
694 > Troubleshooting: Anatomy of an Action</A
714 to determine what <SPAN
720 > might apply to which sites and
721 pages your browser attempts to access. These <SPAN
731 > matching to achieve a high degree of
732 flexibility. This allows one expression to be expanded and potentially match
733 against many similar patterns.</P
735 > Generally, an URL pattern has the form
738 ><domain>/<path></TT
742 ><domain></TT
747 optional. (This is why the special <TT
750 > pattern matches all
751 URLs). Note that the protocol portion of the URL pattern (e.g.
762 the pattern. This is assumed already!</P
764 > The pattern matching syntax is different for the domain and path parts of
765 the URL. The domain part uses a simple globbing type matching technique,
766 while the path part uses a more flexible
768 HREF="http://en.wikipedia.org/wiki/Regular_expressions"
773 Expressions (PCRE)"</SPAN
784 >www.example.com/</TT
788 > is a domain-only pattern and will match any request to <TT
792 regardless of which document on that server is requested. So ALL pages in
793 this domain would be covered by the scope of this action. Note that a
797 > is different and would NOT match.
807 > means exactly the same. For domain-only patterns, the trailing <TT
817 >www.example.com/index.html$</TT
821 > matches all the documents on <TT
825 whose name starts with <TT
834 >www.example.com/index.html$</TT
838 > matches only the single document <TT
855 > matches the document <TT
858 >, regardless of the domain,
865 > web server anywhere.
875 > matches nothing, since it would be interpreted as a domain name and
876 there is no top-level domain called <TT
891 >8.4.1. The Domain Pattern</A
894 > The matching of the domain part offers some flexible options: if the
895 domain starts or ends with a dot, it becomes unanchored at that end.
909 > matches any domain that <SPAN
929 > matches any domain that <SPAN
949 > matches any domain that <SPAN
959 And, by the way, also included would be any files or documents that exist
960 within that domain since no path limitations are specified. (Correctly
961 speaking: It matches any FQDN that contains <TT
965 a domain.) This might be <TT
975 >www.example.net/cgi/testing.pl</TT
976 > for instance. All these
983 > Additionally, there are wild-cards that you can use in the domain names
984 themselves. These work similarly to shell globbing type wild-cards:
988 > represents zero or more arbitrary characters (this is
991 HREF="http://en.wikipedia.org/wiki/Regular_expressions"
998 > based syntax of <SPAN
1005 > represents any single character (this is equivalent to the
1006 regular expression syntax of a simple <SPAN
1009 >), and you can define
1012 >"character classes"</SPAN
1013 > in square brackets which is similar to
1014 the same regular expression technique. All of this can be freely mixed:</P
1018 CLASS="VARIABLELIST"
1023 >ad*.example.com</TT
1029 >"adserver.example.com"</SPAN
1033 >"ads.example.com"</SPAN
1034 >, etc but not <SPAN
1036 >"sfads.example.com"</SPAN
1043 >*ad*.example.com</TT
1047 > matches all of the above, and then some.
1063 >pictures.epix.com</TT
1066 >a.b.c.d.e.upix.com</TT
1073 >www[1-9a-ez].example.c*</TT
1079 >www1.example.com</TT
1083 >www4.example.cc</TT
1086 >wwwd.example.cy</TT
1090 >wwwz.example.com</TT
1100 >wwww.example.com</TT
1107 > While flexible, this is not the sophistication of full regular expression based syntax.</P
1115 >8.4.2. The Path Pattern</A
1121 > uses Perl compatible (PCRE)
1123 HREF="http://en.wikipedia.org/wiki/Regular_expressions"
1132 HREF="http://www.pcre.org/"
1136 matching the path portion (after the slash), and is thus more flexible.</P
1139 HREF="appendix.html#REGEX"
1141 > with a brief quick-start into regular
1142 expressions, and full (very technical) documentation on PCRE regex syntax is available on-line
1144 HREF="http://www.pcre.org/man.txt"
1146 >http://www.pcre.org/man.txt</A
1148 You might also find the Perl man page on regular expressions (<TT
1152 useful, which is available on-line at <A
1153 HREF="http://perldoc.perl.org/perlre.html"
1155 >http://perldoc.perl.org/perlre.html</A
1158 > Note that the path pattern is automatically left-anchored at the <SPAN
1162 i.e. it matches as if it would start with a <SPAN
1165 > (regular expression speak
1166 for the beginning of a line).</P
1168 > Please also note that matching in the path is <SPAN
1172 >CASE INSENSITIVE</I
1175 by default, but you can switch to case sensitive at any point in the pattern by using the
1181 >www.example.com/(?-i)PaTtErN.*</TT
1183 only documents whose path starts with <TT
1193 > this capitalization.</P
1197 CLASS="VARIABLELIST"
1202 >.example.com/.*</TT
1206 > Is equivalent to just <SPAN
1208 >".example.com"</SPAN
1209 >, since any documents
1210 within that domain are matched with or without the <SPAN
1214 regular expression. This is redundant
1220 >.example.com/.*/index.html$</TT
1224 > Will match any page in the domain of <SPAN
1226 >"example.com"</SPAN
1231 >, and that is part of some path. For
1232 example, it matches <SPAN
1234 >"www.example.com/testing/index.html"</SPAN
1238 >"www.example.com/index.html"</SPAN
1239 > because the regular
1240 expression called for at least two <SPAN
1244 requirement. It also would match
1247 >"www.example.com/testing/index_html"</SPAN
1249 special meta-character <SPAN
1258 >.example.com/(.*/)?index\.html$</TT
1262 > This regular expression is conditional so it will match any page
1266 > regardless of path which in this case can
1267 have one or more <SPAN
1270 >. And this one must contain exactly
1274 > (but does not have to end with that!).
1280 >.example.com/(.*/)(ads|banners?|junk)</TT
1284 > This regular expression will match any path of <SPAN
1286 >"example.com"</SPAN
1288 that contains any of the words <SPAN
1298 > (because of the <SPAN
1305 The path does not have to end in these words, just contain them.
1311 >.example.com/(.*/)(ads|banners?|junk)/.*\.(jpe?g|gif|png)$</TT
1315 > This is very much the same as above, except now it must end in either
1329 one is limited to common image formats.
1335 > There are many, many good examples to be found in <TT
1339 and more tutorials below in <A
1340 HREF="appendix.html#REGEX"
1341 >Appendix on regular expressions</A
1350 >8.4.3. The Tag Pattern</A
1353 > Tag patterns are used to change the applying actions based on the
1354 request's tags. Tags can be created with either the
1356 HREF="actions-file.html#CLIENT-HEADER-TAGGER"
1357 >client-header-tagger</A
1360 HREF="actions-file.html#SERVER-HEADER-TAGGER"
1361 >server-header-tagger</A
1364 > Tag patterns have to start with <SPAN
1371 can tell them apart from URL patterns. Everything after the colon
1372 including white space, is interpreted as a regular expression with
1373 path pattern syntax, except that tag patterns aren't left-anchored
1374 automatically (Privoxy doesn't silently add a <SPAN
1378 you have to do it yourself if you need it).</P
1380 > To match all requests that are tagged with <SPAN
1384 your pattern line should be <SPAN
1391 > would work as well, but it would also
1392 match requests whose tags contain <SPAN
1399 > wouldn't work as it requires white space.</P
1401 > Sections can contain URL and tag patterns at the same time,
1402 but tag patterns are checked after the URL patterns and thus
1403 always overrule them, even if they are located before the URL patterns.</P
1405 > Once a new tag is added, Privoxy checks right away if it's matched by one
1406 of the tag patterns and updates the action settings accordingly. As a result
1407 tags can be used to activate other tagger actions, as long as these other
1408 taggers look for headers that haven't already be parsed.</P
1410 > For example you could tag client requests which use the POST method,
1411 use this tag to activate another tagger that adds a tag if cookies
1412 are send, and then block based on the cookie tag. However if you'd
1413 reverse the position of the described taggers, and activated the method
1414 tagger based on the cookie tagger, no method tags would be created.
1415 The method tagger would look for the request line, but at the time
1416 the cookie tag is created the request line has already been parsed.</P
1418 > While this is a limitation you should be aware of, this kind of
1419 indirection is seldom needed anyway and even the example doesn't
1420 make too much sense.</P
1432 > All actions are disabled by default, until they are explicitly enabled
1433 somewhere in an actions file. Actions are turned on if preceded with a
1437 >, and turned off if preceded with a <SPAN
1446 >"do that action"</SPAN
1453 >"please block URLs that match the
1454 following patterns"</SPAN
1461 block URLs that match the following patterns, even if <TT
1465 previously applied."</SPAN
1469 Again, actions are invoked by placing them on a line, enclosed in curly braces and
1470 separated by whitespace, like in
1473 >{+some-action -some-other-action{some-parameter}}</TT
1475 followed by a list of URL patterns, one per line, to which they apply.
1476 Together, the actions line and the following pattern lines make up a section
1477 of the actions file. </P
1480 Actions fall into three categories:</P
1488 Boolean, i.e the action can only be <SPAN
1511 > # enable action <TT
1522 > # disable action <TT
1544 Parameterized, where some value is required in order to enable this type of action.
1566 >} # enable action and set parameter to <TT
1572 # overwriting parameter from previous match if necessary
1578 > # disable action. The parameter can be omitted</PRE
1585 > Note that if the URL matches multiple positive forms of a parameterized action,
1586 the last match wins, i.e. the params from earlier matches are simply ignored.
1592 >+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
1599 Multi-value. These look exactly like parameterized actions,
1600 but they behave differently: If the action applies multiple times to the
1601 same URL, but with different parameters, <SPAN
1614 > matches are remembered. This is used for actions
1615 that can be executed for the same request repeatedly, like adding multiple
1616 headers, or filtering through multiple filters. Syntax:
1637 >} # enable action and add <TT
1642 > to the list of parameters
1653 >} # remove the parameter <TT
1658 > from the list of parameters
1659 # If it was the last one left, disable the action.
1665 > # disable this action completely and remove all parameters from the list</PRE
1675 >+add-header{X-Fun-Header: Some text}</TT
1679 >+filter{html-annoyances}</TT
1686 > If nothing is specified in any actions file, no <SPAN
1690 taken. So in this case <SPAN
1694 normal, non-blocking, non-filtering proxy. You must specifically enable the
1695 privacy and blocking features you need (although the provided default actions
1696 files will give a good starting point).</P
1698 > Later defined action sections always over-ride earlier ones of the same type.
1699 So exceptions to any rules you make, should come in the latter part of the file (or
1700 in a file that is processed later when using multiple actions files such
1704 >). For multi-valued actions, the actions
1705 are applied in the order they are specified. Actions files are processed in
1706 the order they are defined in <TT
1710 installation has three actions files). It also quite possible for any given
1711 URL to match more than one <SPAN
1714 > (because of wildcards and
1715 regular expressions), and thus to trigger more than one set of actions! Last
1718 > The list of valid <SPAN
1728 >8.5.1. add-header</A
1733 CLASS="VARIABLELIST"
1739 >Confuse log analysis, custom applications</P
1745 > Sends a user defined HTTP header to the web server.
1758 > Any string value is possible. Validity of the defined HTTP headers is not checked.
1759 It is recommended that you use the <SPAN
1773 > This action may be specified multiple times, in order to define multiple
1774 headers. This is rarely needed for the typical user. If you don't know what
1777 >"HTTP headers"</SPAN
1778 > are, you definitely don't need to worry about this
1794 >+add-header{X-User-Tracking: sucks}</PRE
1815 CLASS="VARIABLELIST"
1821 >Block ads or other unwanted content</P
1827 > Requests for URLs to which this action applies are blocked, i.e. the
1828 requests are trapped by <SPAN
1831 > and the requested URL is never retrieved,
1832 but is answered locally with a substitute page or image, as determined by
1836 HREF="actions-file.html#HANDLE-AS-IMAGE"
1843 HREF="actions-file.html#SET-IMAGE-BLOCKER"
1844 >set-image-blocker</A
1850 HREF="actions-file.html#HANDLE-AS-EMPTY-DOCUMENT"
1851 >handle-as-empty-document</A
1876 > sends a special <SPAN
1880 for requests to blocked pages. This page contains links to find out why the request
1881 was blocked, and a click-through to the blocked content (the latter only if compiled with the
1882 force feature enabled). The <SPAN
1885 > page adapts to the available
1886 screen space -- it displays full-blown if space allows, or miniaturized and text-only
1887 if loaded into a small frame or window. If you are using <SPAN
1891 right now, you can take a look at the
1893 HREF="http://ads.bannerserver.example.com/nasty-ads/sponsor.html"
1904 A very important exception occurs if <SPAN
1917 HREF="actions-file.html#HANDLE-AS-IMAGE"
1921 apply to the same request: it will then be replaced by an image. If
1925 HREF="actions-file.html#SET-IMAGE-BLOCKER"
1926 >set-image-blocker</A
1929 (see below) also applies, the type of image will be determined by its parameter,
1930 if not, the standard checkerboard pattern is sent.
1933 > It is important to understand this process, in order
1934 to understand how <SPAN
1938 ads and other unwanted content. Blocking is a core feature, and one
1939 upon which various other features depend.
1945 HREF="actions-file.html#FILTER"
1949 action can perform a very similar task, by <SPAN
1953 banner images and other content through rewriting the relevant URLs in the
1954 document's HTML source, so they don't get requested in the first place.
1955 Note that this is a totally different technique, and it's easy to confuse the two.
1959 >Example usage (section):</DT
1971 # Block and replace with "blocked" page
1972 .nasty-stuff.example.com
1974 {+block +handle-as-image}
1975 # Block and replace with image
1979 {+block +handle-as-empty-document}
1980 # Block and then ignore
1981 adserver.exampleclick.net/.*\.js$</PRE
1996 NAME="CLIENT-HEADER-FILTER"
1997 >8.5.3. client-header-filter</A
2002 CLASS="VARIABLELIST"
2008 > Rewrite or remove single client headers.
2015 > All client headers to which this action applies are filtered on-the-fly through
2016 the specified regular expression based substitutions.
2029 > The name of a client-header filter, as defined in one of the
2031 HREF="filter-file.html"
2040 > Client-header filters are applied to each header on its own, not to
2041 all at once. This makes it easier to diagnose problems, but on the downside
2042 you can't write filters that only change header x if header y's value is z.
2043 You can do that by using tags though.
2046 > Client-header filters are executed after the other header actions have finished
2047 and use their output as input.
2050 > Please refer to the <A
2051 HREF="filter-file.html"
2052 >filter file chapter</A
2054 to learn which client-header filters are available by default, and how to
2059 >Example usage (section):</DT
2070 >{+client-header-filter{hide-tor-exit-notation}}
2087 NAME="CLIENT-HEADER-TAGGER"
2088 >8.5.4. client-header-tagger</A
2093 CLASS="VARIABLELIST"
2099 > Block requests based on their headers.
2106 > Client headers to which this action applies are filtered on-the-fly through
2107 the specified regular expression based substitutions, the result is used as
2121 > The name of a client-header tagger, as defined in one of the
2123 HREF="filter-file.html"
2132 > Client-header taggers are applied to each header on its own,
2133 and as the header isn't modified, each tagger <SPAN
2140 > Client-header taggers are the first actions that are executed
2141 and their tags can be used to control every other action.
2145 >Example usage (section):</DT
2156 ># Tag every request with the User-Agent header
2157 {+client-header-filter{user-agent}}
2174 NAME="CONTENT-TYPE-OVERWRITE"
2175 >8.5.5. content-type-overwrite</A
2180 CLASS="VARIABLELIST"
2186 >Stop useless download menus from popping up, or change the browser's rendering mode</P
2192 > Replaces the <SPAN
2194 >"Content-Type:"</SPAN
2195 > HTTP server header.
2217 >"Content-Type:"</SPAN
2218 > HTTP server header is used by the
2219 browser to decide what to do with the document. The value of this
2220 header can cause the browser to open a download menu instead of
2221 displaying the document by itself, even if the document's format is
2222 supported by the browser.
2225 > The declared content type can also affect which rendering mode
2226 the browser chooses. If XHTML is delivered as <SPAN
2230 many browsers treat it as yet another broken HTML document.
2231 If it is send as <SPAN
2233 >"application/xml"</SPAN
2235 XHTML support will only display it, if the syntax is correct.
2238 > If you see a web site that proudly uses XHTML buttons, but sets
2241 >"Content-Type: text/html"</SPAN
2242 >, you can use <SPAN
2246 to overwrite it with <SPAN
2248 >"application/xml"</SPAN
2250 the web master's claim inside your XHTML-supporting browser.
2251 If the syntax is incorrect, the browser will complain loudly.
2254 > You can also go the opposite direction: if your browser prints
2255 error messages instead of rendering a document falsely declared
2256 as XHTML, you can overwrite the content type with
2260 > and have it rendered as broken HTML document.
2265 >content-type-overwrite</TT
2269 >"Content-Type:"</SPAN
2270 > headers that look like some kind of text.
2271 If you want to overwrite it unconditionally, you have to combine it with
2275 HREF="actions-file.html#FORCE-TEXT-MODE"
2279 This limitation exists for a reason, think twice before circumventing it.
2282 > Most of the time it's easier to replace this action with a custom
2286 HREF="actions-file.html#SERVER-HEADER-FILTER"
2287 >server-header filter</A
2290 It allows you to activate it for every document of a certain site and it will still
2291 only replace the content types you aimed at.
2294 > Of course you can apply <TT
2296 >content-type-overwrite</TT
2298 to a whole site and then make URL based exceptions, but it's a lot
2299 more work to get the same precision.
2303 >Example usage (sections):</DT
2314 ># Check if www.example.net/ really uses valid XHTML
2315 { +content-type-overwrite{application/xml} }
2318 # but leave the content type unmodified if the URL looks like a style sheet
2319 {-content-type-overwrite}
2320 www.example.net/.*\.css$
2321 www.example.net/.*style</PRE
2336 NAME="CRUNCH-CLIENT-HEADER"
2337 >8.5.6. crunch-client-header</A
2342 CLASS="VARIABLELIST"
2348 >Remove a client header <SPAN
2351 > has no dedicated action for.</P
2357 > Deletes every header sent by the client that contains the string the user supplied as parameter.
2377 > This action allows you to block client headers for which no dedicated
2385 > will remove every client header that
2386 contains the string you supplied as parameter.
2389 > Regular expressions are <SPAN
2396 use this action to block different headers in the same request, unless
2397 they contain the same string.
2402 >crunch-client-header</TT
2403 > is only meant for quick tests.
2404 If you have to block several different headers, or only want to modify
2405 parts of them, you should use a
2409 HREF="actions-file.html#CLIENT-HEADER-FILTER"
2410 >client-header filter</A
2433 > Don't block any header without understanding the consequences.
2441 >Example usage (section):</DT
2452 ># Block the non-existent "Privacy-Violation:" client header
2453 { +crunch-client-header{Privacy-Violation:} }
2470 NAME="CRUNCH-IF-NONE-MATCH"
2471 >8.5.7. crunch-if-none-match</A
2476 CLASS="VARIABLELIST"
2482 >Prevent yet another way to track the user's steps between sessions.</P
2490 >"If-None-Match:"</SPAN
2491 > HTTP client header.
2511 > Removing the <SPAN
2513 >"If-None-Match:"</SPAN
2514 > HTTP client header
2515 is useful for filter testing, where you want to force a real
2516 reload instead of getting status code <SPAN
2520 would cause the browser to use a cached copy of the page.
2523 > It is also useful to make sure the header isn't used as a cookie
2524 replacement (unlikely but possible).
2527 > Blocking the <SPAN
2529 >"If-None-Match:"</SPAN
2530 > header shouldn't cause any
2531 caching problems, as long as the <SPAN
2533 >"If-Modified-Since:"</SPAN
2535 isn't blocked or missing as well.
2538 > It is recommended to use this action together with
2542 HREF="actions-file.html#HIDE-IF-MODIFIED-SINCE"
2543 >hide-if-modified-since</A
2550 HREF="actions-file.html#OVERWRITE-LAST-MODIFIED"
2551 >overwrite-last-modified</A
2557 >Example usage (section):</DT
2568 ># Let the browser revalidate cached documents but don't
2569 # allow the server to use the revalidation headers for user tracking.
2570 {+hide-if-modified-since{-60} \
2571 +overwrite-last-modified{randomize} \
2572 +crunch-if-none-match}
2588 NAME="CRUNCH-INCOMING-COOKIES"
2589 >8.5.8. crunch-incoming-cookies</A
2594 CLASS="VARIABLELIST"
2600 > Prevent the web server from setting HTTP cookies on your system
2609 >"Set-Cookie:"</SPAN
2610 > HTTP headers from server replies.
2630 > This action is only concerned with <SPAN
2647 HREF="actions-file.html#CRUNCH-OUTGOING-COOKIES"
2648 >crunch-outgoing-cookies</A
2657 > to disable HTTP cookies completely.
2666 > to use this action in conjunction
2670 HREF="actions-file.html#SESSION-COOKIES-ONLY"
2671 >session-cookies-only</A
2674 since it would prevent the session cookies from being set. See also
2678 HREF="actions-file.html#FILTER-CONTENT-COOKIES"
2679 >filter-content-cookies</A
2696 >+crunch-incoming-cookies</PRE
2711 NAME="CRUNCH-SERVER-HEADER"
2712 >8.5.9. crunch-server-header</A
2717 CLASS="VARIABLELIST"
2723 >Remove a server header <SPAN
2726 > has no dedicated action for.</P
2732 > Deletes every header sent by the server that contains the string the user supplied as parameter.
2752 > This action allows you to block server headers for which no dedicated
2756 > action exists. <SPAN
2760 will remove every server header that contains the string you supplied as parameter.
2763 > Regular expressions are <SPAN
2770 use this action to block different headers in the same request, unless
2771 they contain the same string.
2776 >crunch-server-header</TT
2777 > is only meant for quick tests.
2778 If you have to block several different headers, or only want to modify
2779 parts of them, you should use a custom
2783 HREF="actions-file.html#SERVER-HEADER-FILTER"
2784 >server-header filter</A
2807 > Don't block any header without understanding the consequences.
2815 >Example usage (section):</DT
2826 ># Crunch server headers that try to prevent caching
2827 { +crunch-server-header{no-cache} }
2843 NAME="CRUNCH-OUTGOING-COOKIES"
2844 >8.5.10. crunch-outgoing-cookies</A
2849 CLASS="VARIABLELIST"
2855 > Prevent the web server from reading any HTTP cookies from your system
2865 > HTTP headers from client requests.
2885 > This action is only concerned with <SPAN
2902 HREF="actions-file.html#CRUNCH-INCOMING-COOKIES"
2903 >crunch-incoming-cookies</A
2912 > to disable HTTP cookies completely.
2921 > to use this action in conjunction
2925 HREF="actions-file.html#SESSION-COOKIES-ONLY"
2926 >session-cookies-only</A
2929 since it would prevent the session cookies from being read.
2944 >+crunch-outgoing-cookies</PRE
2959 NAME="DEANIMATE-GIFS"
2960 >8.5.11. deanimate-gifs</A
2965 CLASS="VARIABLELIST"
2971 >Stop those annoying, distracting animated GIF images.</P
2977 > De-animate GIF animations, i.e. reduce them to their first or last image.
3003 > This will also shrink the images considerably (in bytes, not pixels!). If
3007 > is given, the first frame of the animation
3008 is used as the replacement. If <SPAN
3011 > is given, the last
3012 frame of the animation is used instead, which probably makes more sense for
3013 most banner animations, but also has the risk of not showing the entire
3014 last frame (if it is only a delta to an earlier frame).
3017 > You can safely use this action with patterns that will also match non-GIF
3018 objects, because no attempt will be made at anything that doesn't look like
3034 >+deanimate-gifs{last}</PRE
3049 NAME="DOWNGRADE-HTTP-VERSION"
3050 >8.5.12. downgrade-http-version</A
3055 CLASS="VARIABLELIST"
3061 >Work around (very rare) problems with HTTP/1.1</P
3067 > Downgrades HTTP/1.1 client requests and server replies to HTTP/1.0.
3087 > This is a left-over from the time when <SPAN
3091 didn't support important HTTP/1.1 features well. It is left here for the
3092 unlikely case that you experience HTTP/1.1 related problems with some server
3093 out there. Not all HTTP/1.1 features and requirements are supported yet,
3094 so there is a chance you might need this action.
3098 >Example usage (section):</DT
3109 >{+downgrade-http-version}
3110 problem-host.example.com</PRE
3125 NAME="FAST-REDIRECTS"
3126 >8.5.13. fast-redirects</A
3131 CLASS="VARIABLELIST"
3137 >Fool some click-tracking scripts and speed up indirect links.</P
3143 > Detects redirection URLs and redirects the browser without contacting
3144 the redirection server first.
3163 >"simple-check"</SPAN
3164 > to just search for the string <SPAN
3168 to detect redirection URLs.
3175 >"check-decoded-url"</SPAN
3176 > to decode URLs (if necessary) before searching
3177 for redirection URLs.
3187 Many sites, like yahoo.com, don't just link to other sites. Instead, they
3188 will link to some script on their own servers, giving the destination as a
3189 parameter, which will then redirect you to the final target. URLs
3190 resulting from this scheme typically look like:
3193 >"http://www.example.org/click-tracker.cgi?target=http%3a//www.example.net/"</SPAN
3197 > Sometimes, there are even multiple consecutive redirects encoded in the
3198 URL. These redirections via scripts make your web browsing more traceable,
3199 since the server from which you follow such a link can see where you go
3200 to. Apart from that, valuable bandwidth and time is wasted, while your
3201 browser asks the server for one redirect after the other. Plus, it feeds
3205 > This feature is currently not very smart and is scheduled for improvement.
3206 If it is enabled by default, you will have to create some exceptions to
3207 this action. It can lead to failures in several ways:
3210 > Not every URLs with other URLs as parameters is evil.
3211 Some sites offer a real service that requires this information to work.
3212 For example a validation service needs to know, which document to validate.
3216 > assumes that every URL parameter that
3217 looks like another URL is a redirection target, and will always redirect to
3218 the last one. Most of the time the assumption is correct, but if it isn't,
3219 the user gets redirected anyway.
3222 > Another failure occurs if the URL contains other parameters after the URL parameter.
3226 >"http://www.example.org/?redirect=http%3a//www.example.net/&foo=bar"</SPAN
3228 contains the redirection URL <SPAN
3230 >"http://www.example.net/"</SPAN
3232 followed by another parameter. <TT
3236 and will cause a redirect to <SPAN
3238 >"http://www.example.net/&foo=bar"</SPAN
3240 Depending on the target server configuration, the parameter will be silently ignored
3243 >"page not found"</SPAN
3244 > error. You can prevent this problem by
3248 HREF="actions-file.html#REDIRECT"
3252 to remove the last part of the URL, but it requires a little effort.
3255 > To detect a redirection URL, <TT
3259 looks for the string <SPAN
3262 >, either in plain text
3263 (invalid but often used) or encoded as <SPAN
3267 Some sites use their own URL encoding scheme, encrypt the address
3268 of the target server or replace it with a database id. In theses cases
3272 > is fooled and the request reaches the
3273 redirection server where it probably gets logged.
3288 > { +fast-redirects{simple-check} }
3291 { +fast-redirects{check-decoded-url} }
3292 another.example.com/testing</PRE
3313 CLASS="VARIABLELIST"
3319 >Get rid of HTML and JavaScript annoyances, banner advertisements (by size),
3320 do fun text replacements, add personalized effects, etc.</P
3326 > All instances of text-based type, most notably HTML and JavaScript, to which
3327 this action applies, can be filtered on-the-fly through the specified regular
3328 expression based substitutions. (Note: as of version 3.0.3 plain text documents
3329 are exempted from filtering, because web servers often use the
3333 > MIME type for all files whose type they don't know.)
3346 > The name of a content filter, as defined in the <A
3347 HREF="filter-file.html"
3350 Filters can be defined in one or more files as defined by the
3354 HREF="config.html#FILTERFILE"
3365 > is the collection of filters
3366 supplied by the developers. Locally defined filters should go
3367 in their own file, such as <TT
3373 > When used in its negative form,
3374 and without parameters, <SPAN
3380 > filtering is completely disabled.
3387 > For your convenience, there are a number of pre-defined filters available
3388 in the distribution filter file that you can use. See the examples below for
3392 > Filtering requires buffering the page content, which may appear to
3393 slow down page rendering since nothing is displayed until all content has
3394 passed the filters. (It does not really take longer, but seems that way
3395 since the page is not incrementally displayed.) This effect will be more
3396 noticeable on slower connections.
3401 >"Rolling your own"</SPAN
3403 filters requires a knowledge of
3405 HREF="http://en.wikipedia.org/wiki/Regular_expressions"
3414 HREF="http://en.wikipedia.org/wiki/Html"
3421 This is very powerful feature, and potentially very intrusive.
3422 Filters should be used with caution, and where an equivalent
3429 > The amount of data that can be filtered is limited to the
3433 HREF="config.html#BUFFER-LIMIT"
3437 option in the main <A
3441 default is 4096 KB (4 Megs). Once this limit is exceeded, the buffered
3442 data, and all pending data, is passed through unfiltered.
3445 > Inappropriate MIME types, such as zipped files, are not filtered at all.
3446 (Again, only text-based types except plain text). Encrypted SSL data
3447 (from HTTPS servers) cannot be filtered either, since this would violate
3448 the integrity of the secure transaction. In some situations it might
3449 be necessary to protect certain text, like source code, from filtering
3450 by defining appropriate <TT
3456 > Compressed content can't be filtered either, unless <SPAN
3460 is compiled with zlib support (requires at least <SPAN
3467 > will decompress the content before filtering
3471 > If you use a <SPAN
3474 > version without zlib support, but want filtering to work on
3475 as much documents as possible, even those that would normally be sent compressed,
3476 you must use the <TT
3479 HREF="actions-file.html#PREVENT-COMPRESSION"
3480 >prevent-compression</A
3483 action in conjunction with <TT
3489 > Content filtering can achieve some of the same effects as the
3493 HREF="actions-file.html#BLOCK"
3497 action, i.e. it can be used to block ads and banners. But the mechanism
3498 works quite differently. One effective use, is to block ad banners
3499 based on their size (see below), since many of these seem to be somewhat
3506 > with suggestions for new or
3507 improved filters is particularly welcome!
3510 > The below list has only the names and a one-line description of each
3511 predefined filter. There are <A
3512 HREF="filter-file.html#PREDEFINED-FILTERS"
3514 verbose explanations</A
3515 > of what these filters do in the <A
3516 HREF="filter-file.html"
3517 >filter file chapter</A
3522 >Example usage (with filters from the distribution <TT
3527 HREF="filter-file.html#PREDEFINED-FILTERS"
3528 >the Predefined Filters section</A
3530 more explanation on each:</DT
3534 NAME="FILTER-JS-ANNOYANCES"
3545 >+filter{js-annoyances} # Get rid of particularly annoying JavaScript abuse</PRE
3553 NAME="FILTER-JS-EVENTS"
3564 >+filter{js-events} # Kill all JS event bindings (Radically destructive! Only for extra nasty sites)</PRE
3572 NAME="FILTER-HTML-ANNOYANCES"
3583 >+filter{html-annoyances} # Get rid of particularly annoying HTML abuse</PRE
3591 NAME="FILTER-CONTENT-COOKIES"
3602 >+filter{content-cookies} # Kill cookies that come in the HTML or JS content</PRE
3610 NAME="FILTER-REFRESH-TAGS"
3621 >+filter{refresh-tags} # Kill automatic refresh tags (for dial-on-demand setups)</PRE
3629 NAME="FILTER-UNSOLICITED-POPUPS"
3640 >+filter{unsolicited-popups} # Disable only unsolicited pop-up windows. Useful if your browser lacks this ability.</PRE
3648 NAME="FILTER-ALL-POPUPS"
3659 >+filter{all-popups} # Kill all popups in JavaScript and HTML. Useful if your browser lacks this ability.</PRE
3667 NAME="FILTER-IMG-REORDER"
3678 >+filter{img-reorder} # Reorder attributes in <img> tags to make the banners-by-* filters more effective</PRE
3686 NAME="FILTER-BANNERS-BY-SIZE"
3697 >+filter{banners-by-size} # Kill banners by size</PRE
3705 NAME="FILTER-BANNERS-BY-LINK"
3716 >+filter{banners-by-link} # Kill banners by their links to known clicktrackers</PRE
3724 NAME="FILTER-WEBBUGS"
3735 >+filter{webbugs} # Squish WebBugs (1x1 invisible GIFs used for user tracking)</PRE
3743 NAME="FILTER-TINY-TEXTFORMS"
3754 >+filter{tiny-textforms} # Extend those tiny textareas up to 40x80 and kill the hard wrap</PRE
3762 NAME="FILTER-JUMPING-WINDOWS"
3773 >+filter{jumping-windows} # Prevent windows from resizing and moving themselves</PRE
3781 NAME="FILTER-FRAMESET-BORDERS"
3792 >+filter{frameset-borders} # Give frames a border and make them resizeable</PRE
3800 NAME="FILTER-DEMORONIZER"
3811 >+filter{demoronizer} # Fix MS's non-standard use of standard charsets</PRE
3819 NAME="FILTER-SHOCKWAVE-FLASH"
3830 >+filter{shockwave-flash} # Kill embedded Shockwave Flash objects</PRE
3838 NAME="FILTER-QUICKTIME-KIOSKMODE"
3849 >+filter{quicktime-kioskmode} # Make Quicktime movies savable</PRE
3868 >+filter{fun} # Text replacements for subversive browsing fun!</PRE
3876 NAME="FILTER-CRUDE-PARENTAL"
3887 >+filter{crude-parental} # Crude parental filtering (demo only)</PRE
3895 NAME="FILTER-IE-EXPLOITS"
3906 >+filter{ie-exploits} # Disable a known Internet Explorer bug exploits</PRE
3914 NAME="FILTER-SITE-SPECIFICS"
3925 >+filter{site-specifics} # Custom filters for specific site related problems</PRE
3933 NAME="FILTER-GOOGLE"
3944 >+filter{google} # Removes text ads and other Google specific improvements</PRE
3963 >+filter{yahoo} # Removes text ads and other Yahoo specific improvements</PRE
3982 >+filter{msn} # Removes text ads and other MSN specific improvements</PRE
3990 NAME="FILTER-BLOGSPOT"
4001 >+filter{blogspot} # Cleans up Blogspot blogs</PRE
4009 NAME="FILTER-NO-PING"
4020 >+filter{no-ping} # Removes non-standard ping attributes from anchor and area tags</PRE
4035 NAME="FORCE-TEXT-MODE"
4036 >8.5.15. force-text-mode</A
4041 CLASS="VARIABLELIST"
4050 > to treat a document as if it was in some kind of <SPAN
4062 > Declares a document as text, even if the <SPAN
4064 >"Content-Type:"</SPAN
4065 > isn't detected as such.
4088 HREF="actions-file.html#FILTER"
4095 > tries to only filter files that are
4096 in some kind of text format. The same restrictions apply to
4100 HREF="actions-file.html#CONTENT-TYPE-OVERWRITE"
4101 >content-type-overwrite</A
4106 >force-text-mode</TT
4107 > declares a document as text,
4108 without looking at the <SPAN
4110 >"Content-Type:"</SPAN
4132 > Think twice before activating this action. Filtering binary data
4133 with regular expressions can cause file damage.
4168 NAME="FORWARD-OVERRIDE"
4169 >8.5.16. forward-override</A
4174 CLASS="VARIABLELIST"
4180 >Change the forwarding settings based on User-Agent or request origin</P
4186 > Overrules the forward directives in the configuration file.
4206 > to use a direct connection without any additional proxies.</P
4212 >"forward 127.0.0.1:8123"</SPAN
4213 > to use the HTTP proxy listening at 127.0.0.1 port 8123.
4220 >"forward-socks4a 127.0.0.1:9050 ."</SPAN
4221 > to use the socks4a proxy listening at
4222 127.0.0.1 port 9050. Replace <SPAN
4224 >"forward-socks4a"</SPAN
4227 >"forward-socks4"</SPAN
4229 to use a socks4 connection (with local DNS resolution) instead.
4236 >"forward-socks4a 127.0.0.1:9050 proxy.example.org:8000"</SPAN
4237 > to use the socks4a proxy
4238 listening at 127.0.0.1 port 9050 to reach the HTTP proxy listening at proxy.example.org port 8000.
4241 >"forward-socks4a"</SPAN
4244 >"forward-socks4"</SPAN
4245 > to use a socks4 connection
4246 (with local DNS resolution) instead.
4255 > This action takes parameters similar to the
4257 HREF="config.html#FORWARDING"
4259 > directives in the configuration
4260 file, but without the URL pattern. It can be used as replacement, but normally it's only
4261 used in cases where matching based on the request URL isn't sufficient.
4282 > Please read the description for the <A
4283 HREF="config.html#FORWARDING"
4286 using this action. Forwarding to the wrong people will reduce your privacy and increase the
4287 chances of man-in-the-middle attacks.
4290 > If the ports are missing or invalid, default values will be used. This might change
4291 in the future and you shouldn't rely on it. Otherwise incorrect syntax causes Privoxy
4296 HREF="http://config.privoxy.org/show-url-info"
4298 >show-url-info CGI page</A
4300 to verify that your forward settings do what you thought the do.
4319 ># Always use direct connections for requests previously tagged as
4322 >"User-Agent: fetch libfetch/2.0"</SPAN
4324 # resuming downloads continues to work.
4325 # This way you can continue to use Tor for your normal browsing,
4326 # without overloading the Tor network with your FreeBSD ports updates
4327 # or downloads of bigger files like ISOs.
4328 {+forward-override{forward .} \
4329 -hide-if-modified-since \
4330 -overwrite-last-modified \
4332 TAG:^User-Agent: fetch libfetch/2\.0$
4348 NAME="HANDLE-AS-EMPTY-DOCUMENT"
4349 >8.5.17. handle-as-empty-document</A
4354 CLASS="VARIABLELIST"
4360 >Mark URLs that should be replaced by empty documents <SPAN
4364 >if they get blocked</I
4372 > This action alone doesn't do anything noticeable. It just marks URLs.
4376 HREF="actions-file.html#BLOCK"
4386 the presence or absence of this mark decides whether an HTML <SPAN
4390 page, or an empty document will be sent to the client as a substitute for the blocked content.
4397 > document isn't literally empty, but actually contains a single space.
4417 > Some browsers complain about syntax errors if JavaScript documents
4418 are blocked with <SPAN
4422 default HTML page; this option can be used to silence them.
4423 And of course this action can also be used to eliminate the <SPAN
4427 BLOCKED message in frames.
4430 > The content type for the empty document can be specified with
4434 HREF="actions-file.html#CONTENT-TYPE-OVERWRITE"
4435 >content-type-overwrite{}</A
4438 but usually this isn't necessary.
4453 ># Block all documents on example.org that end with ".js",
4454 # but send an empty document instead of the usual HTML message.
4455 {+block +handle-as-empty-document}
4472 NAME="HANDLE-AS-IMAGE"
4473 >8.5.18. handle-as-image</A
4478 CLASS="VARIABLELIST"
4484 >Mark URLs as belonging to images (so they'll be replaced by images <SPAN
4488 >if they do get blocked</I
4490 >, rather than HTML pages)</P
4496 > This action alone doesn't do anything noticeable. It just marks URLs as images.
4500 HREF="actions-file.html#BLOCK"
4510 the presence or absence of this mark decides whether an HTML <SPAN
4514 page, or a replacement image (as determined by the <TT
4517 HREF="actions-file.html#SET-IMAGE-BLOCKER"
4518 >set-image-blocker</A
4520 > action) will be sent to the
4521 client as a substitute for the blocked content.
4541 > The below generic example section is actually part of <TT
4545 It marks all URLs with well-known image file name extensions as images and should
4549 > Users will probably only want to use the handle-as-image action in conjunction with
4553 HREF="actions-file.html#BLOCK"
4556 >, to block sources of banners, whose URLs don't
4557 reflect the file type, like in the second example section.
4560 > Note that you cannot treat HTML pages as images in most cases. For instance, (in-line) ad
4561 frames require an HTML page to be sent, or they won't display properly.
4564 >handle-as-image</TT
4565 > in this situation will not replace the
4566 ad frame with an image, but lead to error messages.
4570 >Example usage (sections):</DT
4581 ># Generic image extensions:
4584 /.*\.(gif|jpg|jpeg|png|bmp|ico)$
4586 # These don't look like images, but they're banners and should be
4587 # blocked as images:
4589 {+block +handle-as-image}
4590 some.nasty-banner-server.com/junk.cgi\?output=trash
4592 # Banner source! Who cares if they also have non-image content?
4593 ad.doubleclick.net </PRE
4608 NAME="HIDE-ACCEPT-LANGUAGE"
4609 >8.5.19. hide-accept-language</A
4614 CLASS="VARIABLELIST"
4620 >Pretend to use different language settings.</P
4626 > Deletes or replaces the <SPAN
4628 >"Accept-Language:"</SPAN
4629 > HTTP header in client requests.
4645 >, or any user defined value.
4652 > Faking the browser's language settings can be useful to make a
4653 foreign User-Agent set with
4657 HREF="actions-file.html#HIDE-USER-AGENT"
4664 > However some sites with content in different languages check the
4667 >"Accept-Language:"</SPAN
4668 > to decide which one to take by default.
4669 Sometimes it isn't possible to later switch to another language without
4672 >"Accept-Language:"</SPAN
4676 > Therefore it's a good idea to either only change the
4679 >"Accept-Language:"</SPAN
4680 > header to languages you understand,
4681 or to languages that aren't wide spread.
4684 > Before setting the <SPAN
4686 >"Accept-Language:"</SPAN
4688 to a rare language, you should consider that it helps to
4689 make your requests unique and thus easier to trace.
4690 If you don't plan to change this header frequently,
4691 you should stick to a common language.
4695 >Example usage (section):</DT
4706 ># Pretend to use Canadian language settings.
4707 {+hide-accept-language{en-ca} \
4708 +hide-user-agent{Mozilla/5.0 (X11; U; OpenBSD i386; en-CA; rv:1.8.0.4) Gecko/20060628 Firefox/1.5.0.4} \
4725 NAME="HIDE-CONTENT-DISPOSITION"
4726 >8.5.20. hide-content-disposition</A
4731 CLASS="VARIABLELIST"
4737 >Prevent download menus for content you prefer to view inside the browser.</P
4743 > Deletes or replaces the <SPAN
4745 >"Content-Disposition:"</SPAN
4746 > HTTP header set by some servers.
4762 >, or any user defined value.
4769 > Some servers set the <SPAN
4771 >"Content-Disposition:"</SPAN
4773 documents they assume you want to save locally before viewing them.
4776 >"Content-Disposition:"</SPAN
4777 > header contains the file name
4778 the browser is supposed to use by default.
4781 > In most browsers that understand this header, it makes it impossible to
4788 > the document, without downloading it first,
4789 even if it's just a simple text file or an image.
4792 > Removing the <SPAN
4794 >"Content-Disposition:"</SPAN
4796 to prevent this annoyance, but some browsers additionally check the
4799 >"Content-Type:"</SPAN
4800 > header, before they decide if they can
4801 display a document without saving it first. In these cases, you have
4802 to change this header as well, before the browser stops displaying
4806 > It is also possible to change the server's file name suggestion
4807 to another one, but in most cases it isn't worth the time to set
4811 > This action will probably be removed in the future,
4812 use server-header filters instead.
4827 ># Disarm the download link in Sourceforge's patch tracker
4829 +content-type-overwrite{text/plain}\
4830 +hide-content-disposition{block} }
4831 .sourceforge.net/tracker/download\.php</PRE
4846 NAME="HIDE-IF-MODIFIED-SINCE"
4847 >8.5.21. hide-if-modified-since</A
4852 CLASS="VARIABLELIST"
4858 >Prevent yet another way to track the user's steps between sessions.</P
4866 >"If-Modified-Since:"</SPAN
4867 > HTTP client header or modifies its value.
4883 >, or a user defined value that specifies a range of hours.
4890 > Removing this header is useful for filter testing, where you want to force a real
4891 reload instead of getting status code <SPAN
4894 >, which would cause the
4895 browser to use a cached copy of the page.
4898 > Instead of removing the header, <TT
4900 >hide-if-modified-since</TT
4902 also add or subtract a random amount of time to/from the header's value.
4903 You specify a range of minutes where the random factor should be chosen from and
4907 > does the rest. A negative value means
4908 subtracting, a positive value adding.
4911 > Randomizing the value of the <SPAN
4913 >"If-Modified-Since:"</SPAN
4915 sure it isn't used as a cookie replacement, but you will run into
4916 caching problems if the random range is too high.
4919 > It is a good idea to only use a small negative value and let
4923 HREF="actions-file.html#OVERWRITE-LAST-MODIFIED"
4924 >overwrite-last-modified</A
4927 handle the greater changes.
4930 > It is also recommended to use this action together with
4934 HREF="actions-file.html#CRUNCH-IF-NONE-MATCH"
4935 >crunch-if-none-match</A
4941 >Example usage (section):</DT
4952 ># Let the browser revalidate without being tracked across sessions
4953 { +hide-if-modified-since{-60} \
4954 +overwrite-last-modified{randomize} \
4955 +crunch-if-none-match}
4971 NAME="HIDE-FORWARDED-FOR-HEADERS"
4972 >8.5.22. hide-forwarded-for-headers</A
4977 CLASS="VARIABLELIST"
4983 >Improve privacy by not embedding the source of the request in the HTTP headers.</P
4989 > Deletes any existing <SPAN
4991 >"X-Forwarded-for:"</SPAN
4992 > HTTP header from client requests,
4993 and prevents adding a new one.
5013 > It is safe to leave this on.
5028 >+hide-forwarded-for-headers</PRE
5043 NAME="HIDE-FROM-HEADER"
5044 >8.5.23. hide-from-header</A
5049 CLASS="VARIABLELIST"
5055 >Keep your (old and ill) browser from telling web servers your email address</P
5061 > Deletes any existing <SPAN
5064 > HTTP header, or replaces it with the
5081 >, or any user defined value.
5091 > will completely remove the header
5092 (not to be confused with the <TT
5095 HREF="actions-file.html#BLOCK"
5102 > Alternately, you can specify any value you prefer to be sent to the web
5103 server. If you do, it is a matter of fairness not to use any address that
5104 is actually used by a real person.
5107 > This action is rarely needed, as modern web browsers don't send
5126 >+hide-from-header{block}</PRE
5139 >+hide-from-header{spam-me-senseless@sittingduck.example.com}</PRE
5154 NAME="HIDE-REFERRER"
5155 >8.5.24. hide-referrer</A
5163 CLASS="VARIABLELIST"
5169 >Conceal which link you followed to get to a particular site</P
5178 > (sic) HTTP header from the client request,
5179 or replaces it with a forged one.
5198 >"conditional-block"</SPAN
5199 > to delete the header completely if the host has changed.</P
5206 > to delete the header unconditionally.</P
5213 > to pretend to be coming from the homepage of the server we are talking to.</P
5217 >Any other string to set a user defined referrer.</P
5227 >conditional-block</TT
5228 > is the only parameter,
5229 that isn't easily detected in the server's log file. If it blocks the
5230 referrer, the request will look like the visitor used a bookmark or
5231 typed in the address directly.
5234 > Leaving the referrer unmodified for requests on the same host
5235 allows the server owner to see the visitor's <SPAN
5239 but in most cases she could also get that information by comparing
5240 other parts of the log file: for example the User-Agent if it isn't
5241 a very common one, or the user's IP address if it doesn't change between
5245 > Always blocking the referrer, or using a custom one, can lead to
5246 failures on servers that check the referrer before they answer any
5247 requests, in an attempt to prevent their valuable content from being
5248 embedded or linked to elsewhere.
5253 >conditional-block</TT
5258 will work with referrer checks, as long as content and valid referring page
5259 are on the same host. Most of the time that's the case.
5266 > is an alternate spelling of
5270 > and the two can be can be freely
5271 substituted with each other. (<SPAN
5275 correct English spelling, however the HTTP specification has a bug - it
5276 requires it to be spelled as <SPAN
5294 >+hide-referrer{forge}</PRE
5307 >+hide-referrer{http://www.yahoo.com/}</PRE
5322 NAME="HIDE-USER-AGENT"
5323 >8.5.25. hide-user-agent</A
5328 CLASS="VARIABLELIST"
5334 >Conceal your type of browser and client operating system</P
5340 > Replaces the value of the <SPAN
5342 >"User-Agent:"</SPAN
5344 in client requests with the specified value.
5357 > Any user-defined string.
5382 > This can lead to problems on web sites that depend on looking at this header in
5383 order to customize their content for different browsers (which, by the
5390 > the right thing to do: good web sites
5391 work browser-independently).
5399 > Using this action in multi-user setups or wherever different types of
5400 browsers will access the same <SPAN
5410 >. In single-user, single-browser
5411 setups, you might use it to delete your OS version information from
5412 the headers, because it is an invitation to exploit known bugs for your
5413 OS. It is also occasionally useful to forge this in order to access
5414 sites that won't let you in otherwise (though there may be a good
5415 reason in some cases). Example of this: some MSN sites will not
5419 > enter, yet forging to a
5423 > user-agent works just fine.
5424 (Must be just a silly MS goof, I'm sure :-).
5427 > More information on known user-agent strings can be found at
5429 HREF="http://www.user-agents.org/"
5431 >http://www.user-agents.org/</A
5435 HREF="http://en.wikipedia.org/wiki/User_agent"
5437 >http://en.wikipedia.org/wiki/User_agent</A
5453 >+hide-user-agent{Netscape 6.1 (X11; I; Linux 2.4.18 i686)}</PRE
5468 NAME="INSPECT-JPEGS"
5469 >8.5.26. inspect-jpegs</A
5474 CLASS="VARIABLELIST"
5480 >To protect against the MS buffer over-run in JPEG processing</P
5486 > Protect against a known exploit
5506 > See Microsoft Security Bulletin MS04-028. JPEG images are one of the most
5507 common image types found across the Internet. The exploit as described can
5508 allow execution of code on the target system, giving an attacker access
5509 to the system in question by merely planting an altered JPEG image, which
5510 would have no obvious indications of what lurks inside. This action
5511 prevents this exploit.
5514 > Note that the described exploit is only one of many,
5515 using this action does not mean that you no longer
5516 have to patch the client.
5531 >+inspect-jpegs</PRE
5546 >8.5.27. kill-popups<A
5554 CLASS="VARIABLELIST"
5560 >Eliminate those annoying pop-up windows (deprecated)</P
5566 > While loading the document, replace JavaScript code that opens
5567 pop-up windows with (syntactically neutral) dummy code on the fly.
5587 > This action is basically a built-in, hardwired special-purpose filter
5588 action, but there are important differences: For <TT
5592 the document need not be buffered, so it can be incrementally rendered while
5593 downloading. But <TT
5596 > doesn't catch as many pop-ups as
5600 HREF="actions-file.html#FILTER-ALL-POPUPS"
5609 does and is not as smart as <TT
5612 HREF="actions-file.html#FILTER-UNSOLICITED-POPUPS"
5616 >unsolicited-popups</I
5624 > Think of it as a fast and efficient replacement for a filter that you
5625 can use if you don't want any filtering at all. Note that it doesn't make
5626 sense to combine it with any <TT
5629 HREF="actions-file.html#FILTER"
5633 since as soon as one <TT
5636 HREF="actions-file.html#FILTER"
5640 the whole document needs to be buffered anyway, which destroys the advantage of
5644 > action over its filter equivalent.
5647 > Killing all pop-ups unconditionally is problematic. Many shops and banks rely on
5648 pop-ups to display forms, shopping carts etc, and the <TT
5651 HREF="actions-file.html#FILTER-UNSOLICITED-POPUPS"
5655 >unsolicited-popups</I
5660 > does a better job of catching only the unwanted ones.
5663 > If the only kind of pop-ups that you want to kill are exit consoles (those
5670 > windows that appear when you close an other
5671 one), you might want to use
5675 HREF="actions-file.html#FILTER"
5687 > This action is most appropriate for browsers that don't have any controls
5688 for unwanted pop-ups. Not recommended for general usage.
5717 NAME="LIMIT-CONNECT"
5718 >8.5.28. limit-connect</A
5723 CLASS="VARIABLELIST"
5729 >Prevent abuse of <SPAN
5732 > as a TCP proxy relay or disable SSL for untrusted sites</P
5738 > Specifies to which ports HTTP CONNECT requests are allowable.
5751 > A comma-separated list of ports or port ranges (the latter using dashes, with the minimum
5752 defaulting to 0 and the maximum to 65K).
5759 > By default, i.e. if no <TT
5766 > only allows HTTP CONNECT
5767 requests to port 443 (the standard, secure HTTPS port). Use
5771 > if more fine-grained control is desired
5772 for some or all destinations.
5775 > The CONNECT methods exists in HTTP to allow access to secure websites
5779 > URLs) through proxies. It works very simply:
5780 the proxy connects to the server on the specified port, and then
5781 short-circuits its connections to the client and to the remote server.
5782 This can be a big security hole, since CONNECT-enabled proxies can be
5783 abused as TCP relays very easily.
5789 > relays HTTPS traffic without seeing
5790 the decoded content. Websites can leverage this limitation to circumvent <SPAN
5794 filters. By specifying an invalid port range you can disable HTTPS entirely.
5795 If you plan to disable SSL by default, consider enabling
5799 HREF="actions-file.html#TREAT-FORBIDDEN-CONNECTS-LIKE-BLOCKS"
5800 >treat-forbidden-connects-like-blocks</A
5803 as well, to be able to quickly create exceptions.
5807 >Example usages:</DT
5818 >+limit-connect{443} # This is the default and need not be specified.
5819 +limit-connect{80,443} # Ports 80 and 443 are OK.
5820 +limit-connect{-3, 7, 20-100, 500-} # Ports less than 3, 7, 20 to 100 and above 500 are OK.
5821 +limit-connect{-} # All ports are OK
5822 +limit-connect{,} # No HTTPS/SSL traffic is allowed</PRE
5837 NAME="PREVENT-COMPRESSION"
5838 >8.5.29. prevent-compression</A
5843 CLASS="VARIABLELIST"
5849 > Ensure that servers send the content uncompressed, so it can be
5853 HREF="actions-file.html#FILTER"
5863 > Removes the Accept-Encoding header which can be used to ask for compressed transfer.
5883 > More and more websites send their content compressed by default, which
5884 is generally a good idea and saves bandwidth. But the <TT
5887 HREF="actions-file.html#FILTER"
5893 HREF="actions-file.html#DEANIMATE-GIFS"
5900 HREF="actions-file.html#KILL-POPUPS"
5904 access to the uncompressed data.
5907 > When compiled with zlib support (available since <SPAN
5910 > 3.0.7), content that should be
5911 filtered is decompressed on-the-fly and you don't have to worry about this action.
5912 If you are using an older <SPAN
5915 > version, or one that hasn't been compiled with zlib
5916 support, this action can be used to convince the server to send the content uncompressed.
5919 > Most text-based instances compress very well, the size is seldom decreased by less than 50%,
5920 for markup-heavy instances like news feeds saving more than 90% of the original size isn't
5924 > Not using compression will therefore slow down the transfer, and you should only
5925 enable this action if you really need it. As of <SPAN
5928 > 3.0.7 it's disabled in all
5929 predefined action settings.
5932 > Note that some (rare) ill-configured sites don't handle requests for uncompressed
5933 documents correctly. Broken PHP applications tend to send an empty document body,
5934 some IIS versions only send the beginning of the content. If you enable
5937 >prevent-compression</TT
5938 > per default, you might want to add
5939 exceptions for those sites. See the example for how to do that.
5943 >Example usage (sections):</DT
5954 ># Selectively turn off compression, and enable a filter
5956 { +filter{tiny-textforms} +prevent-compression }
5957 # Match only these sites
5962 # Or instead, we could set a universal default:
5964 { +prevent-compression }
5967 # Then maybe make exceptions for broken sites:
5969 { -prevent-compression }
5985 NAME="OVERWRITE-LAST-MODIFIED"
5986 >8.5.30. overwrite-last-modified</A
5991 CLASS="VARIABLELIST"
5997 >Prevent yet another way to track the user's steps between sessions.</P
6005 >"Last-Modified:"</SPAN
6006 > HTTP server header or modifies its value.
6019 > One of the keywords: <SPAN
6024 >"reset-to-request-time"</SPAN
6036 > Removing the <SPAN
6038 >"Last-Modified:"</SPAN
6039 > header is useful for filter
6040 testing, where you want to force a real reload instead of getting status
6044 >, which would cause the browser to reuse the old
6045 version of the page.
6051 > option overwrites the value of the
6054 >"Last-Modified:"</SPAN
6055 > header with a randomly chosen time
6056 between the original value and the current time. In theory the server
6057 could send each document with a different <SPAN
6059 >"Last-Modified:"</SPAN
6061 header to track visits without using cookies. <SPAN
6065 makes it impossible and the browser can still revalidate cached documents.
6070 >"reset-to-request-time"</SPAN
6071 > overwrites the value of the
6074 >"Last-Modified:"</SPAN
6075 > header with the current time. You could use
6076 this option together with
6080 HREF="actions-file.html#HIDE-IF-MODIFIED-SINCE"
6081 >hided-if-modified-since</A
6084 to further customize your random range.
6087 > The preferred parameter here is <SPAN
6091 to use, as long as the time settings are more or less correct.
6092 If the server sets the <SPAN
6094 >"Last-Modified:"</SPAN
6095 > header to the time
6096 of the request, the random range becomes zero and the value stays the same.
6097 Therefore you should later randomize it a second time with
6101 HREF="actions-file.html#HIDE-IF-MODIFIED-SINCE"
6102 >hided-if-modified-since</A
6108 > It is also recommended to use this action together with
6112 HREF="actions-file.html#CRUNCH-IF-NONE-MATCH"
6113 >crunch-if-none-match</A
6130 ># Let the browser revalidate without being tracked across sessions
6131 { +hide-if-modified-since{-60} \
6132 +overwrite-last-modified{randomize} \
6133 +crunch-if-none-match}
6150 >8.5.31. redirect</A
6155 CLASS="VARIABLELIST"
6161 > Redirect requests to other sites.
6168 > Convinces the browser that the requested document has been moved
6169 to another location and the browser should get it from there.
6182 > An absolute URL or a single pcrs command.
6189 > Requests to which this action applies are answered with a
6190 HTTP redirect to URLs of your choosing. The new URL is
6191 either provided as parameter, or derived by applying a
6192 single pcrs command to the original URL.
6195 > This action will be ignored if you use it together with
6199 HREF="actions-file.html#BLOCK"
6203 It can be combined with
6207 HREF="actions-file.html#FAST-REDIRECTS"
6208 >fast-redirects{check-decoded-url}</A
6211 to redirect to a decoded version of a rewritten URL.
6214 > Use this action carefully, make sure not to create redirection loops
6215 and be aware that using your own redirects might make it
6216 possible to fingerprint your requests.
6220 >Example usages:</DT
6231 ># Replace example.com's style sheet with another one
6232 { +redirect{http://localhost/css-replacements/example.com.css} }
6233 example.com/stylesheet\.css
6235 # Create a short, easy to remember nickname for a favorite site
6236 # (relies on the browser accept and forward invalid URLs to <SPAN
6240 { +redirect{http://www.privoxy.org/user-manual/actions-file.html} }
6243 # Always use the expanded view for Undeadly.org articles
6244 # (Note the $ at the end of the URL pattern to make sure
6245 # the request for the rewritten URL isn't redirected as well)
6246 {+redirect{s@$@&mode=expanded@}}
6247 undeadly.org/cgi\?action=article&sid=\d*$</PRE
6262 NAME="SEND-VANILLA-WAFER"
6263 >8.5.32. send-vanilla-wafer</A
6268 CLASS="VARIABLELIST"
6274 > Feed log analysis scripts with useless data.
6281 > Sends a cookie with each request stating that you do not accept any copyright
6282 on cookies sent to you, and asking the site operator not to track you.
6302 > The vanilla wafer is a (relatively) unique header and could conceivably be used to track you.
6305 > This action is rarely used and not enabled in the default configuration.
6320 >+send-vanilla-wafer</PRE
6336 >8.5.33. send-wafer</A
6341 CLASS="VARIABLELIST"
6347 > Send custom cookies or feed log analysis scripts with even more useless data.
6354 > Sends a custom, user-defined cookie with each request.
6367 > A string of the form <SPAN
6387 > Being multi-valued, multiple instances of this action can apply to the same request,
6388 resulting in multiple cookies being sent.
6391 > This action is rarely used and not enabled in the default configuration.
6395 >Example usage (section):</DT
6406 >{+send-wafer{UsingPrivoxy=true}}
6407 my-internal-testing-server.void</PRE
6422 NAME="SERVER-HEADER-FILTER"
6423 >8.5.34. server-header-filter</A
6428 CLASS="VARIABLELIST"
6434 > Rewrite or remove single server headers.
6441 > All server headers to which this action applies are filtered on-the-fly
6442 through the specified regular expression based substitutions.
6455 > The name of a server-header filter, as defined in one of the
6457 HREF="filter-file.html"
6466 > Server-header filters are applied to each header on its own, not to
6467 all at once. This makes it easier to diagnose problems, but on the downside
6468 you can't write filters that only change header x if header y's value is z.
6469 You can do that by using tags though.
6472 > Server-header filters are executed after the other header actions have finished
6473 and use their output as input.
6476 > Please refer to the <A
6477 HREF="filter-file.html"
6478 >filter file chapter</A
6480 to learn which server-header filters are available by default, and how to
6485 >Example usage (section):</DT
6496 >{+server-header-filter{html-to-xml}}
6497 example.org/xml-instance-that-is-delivered-as-html
6499 {+server-header-filter{xml-to-html}}
6500 example.org/instance-that-is-delivered-as-xml-but-is-not
6516 NAME="SERVER-HEADER-TAGGER"
6517 >8.5.35. server-header-tagger</A
6522 CLASS="VARIABLELIST"
6528 > Disable or disable filters based on the Content-Type header.
6535 > Server headers to which this action applies are filtered on-the-fly through
6536 the specified regular expression based substitutions, the result is used as
6550 > The name of a server-header tagger, as defined in one of the
6552 HREF="filter-file.html"
6561 > Server-header taggers are applied to each header on its own,
6562 and as the header isn't modified, each tagger <SPAN
6569 > Server-header taggers are executed before all other header actions
6570 that modify server headers. Their tags can be used to control
6571 all of the other server-header actions, the content filters
6572 and the crunch actions (<A
6573 HREF="actions-file.html#REDIRECT"
6577 HREF="actions-file.html#BLOCK"
6582 > Obviously crunching based on tags created by server-header taggers
6583 doesn't prevent the request from showing up in the server's log file.
6587 >Example usage (section):</DT
6598 ># Tag every request with the declared content type
6599 {+client-header-filter{content-type}}
6616 NAME="SESSION-COOKIES-ONLY"
6617 >8.5.36. session-cookies-only</A
6622 CLASS="VARIABLELIST"
6628 > Allow only temporary <SPAN
6631 > cookies (for the current
6632 browser session <SPAN
6650 >"Set-Cookie:"</SPAN
6652 server headers. Most browsers will not store such cookies permanently and
6653 forget them in between sessions.
6673 > This is less strict than <TT
6676 HREF="actions-file.html#CRUNCH-INCOMING-COOKIES"
6677 >crunch-incoming-cookies</A
6683 HREF="actions-file.html#CRUNCH-OUTGOING-COOKIES"
6684 >crunch-outgoing-cookies</A
6686 > and allows you to browse
6687 websites that insist or rely on setting cookies, without compromising your privacy too badly.
6690 > Most browsers will not permanently store cookies that have been processed by
6693 >session-cookies-only</TT
6694 > and will forget about them between sessions.
6695 This makes profiling cookies useless, but won't break sites which require cookies so
6696 that you can log in for transactions. This is generally turned on for all
6697 sites, and is the recommended setting.
6708 >session-cookies-only</TT
6713 HREF="actions-file.html#CRUNCH-INCOMING-COOKIES"
6714 >crunch-incoming-cookies</A
6720 HREF="actions-file.html#CRUNCH-OUTGOING-COOKIES"
6721 >crunch-outgoing-cookies</A
6723 >. If you do, cookies
6724 will be plainly killed.
6727 > Note that it is up to the browser how it handles such cookies without an <SPAN
6731 field. If you use an exotic browser, you might want to try it out to be sure.
6734 > This setting also has no effect on cookies that may have been stored
6735 previously by the browser before starting <SPAN
6739 These would have to be removed manually.
6747 HREF="actions-file.html#FILTER-CONTENT-COOKIES"
6748 >content-cookies filter</A
6750 to block some types of cookies. Content cookies are not effected by
6753 >session-cookies-only</TT
6769 >+session-cookies-only</PRE
6784 NAME="SET-IMAGE-BLOCKER"
6785 >8.5.37. set-image-blocker</A
6790 CLASS="VARIABLELIST"
6796 >Choose the replacement for blocked images</P
6802 > This action alone doesn't do anything noticeable. If <SPAN
6812 HREF="actions-file.html#BLOCK"
6824 HREF="actions-file.html#HANDLE-AS-IMAGE"
6834 apply, i.e. if the request is to be blocked as an image,
6841 > the parameter of this action decides what will be
6842 sent as a replacement.
6862 > to send a built-in checkerboard pattern image. The image is visually
6863 decent, scales very well, and makes it obvious where banners were busted.
6871 > to send a built-in transparent image. This makes banners disappear
6872 completely, but makes it hard to detect where <SPAN
6876 images on a given page and complicates troubleshooting if <SPAN
6880 has blocked innocent images, like navigation icons.
6894 send a redirect to <TT
6900 to any image anywhere, even in your local filesystem via <SPAN
6904 (But note that not all browsers support redirecting to a local file system).
6907 > A good application of redirects is to use special <SPAN
6911 URLs, which send the built-in images, as <TT
6917 This has the same visual effect as specifying <SPAN
6924 the first place, but enables your browser to cache the replacement image, instead of requesting
6925 it over and over again.
6934 > The URLs for the built-in images are <SPAN
6936 >"http://config.privoxy.org/send-banner?type=<TT
6957 > There is a third (advanced) type, called <SPAN
6969 >set-image-blocker</TT
6970 >, but meant for use from <A
6971 HREF="filter-file.html"
6974 Auto will select the type of image that would have applied to the referring page, had it been an image.
6992 >+set-image-blocker{pattern}</PRE
6999 > Redirect to the BSD daemon:
7010 >+set-image-blocker{http://www.freebsd.org/gifs/dae_up3.gif}</PRE
7017 > Redirect to the built-in pattern for better caching:
7028 >+set-image-blocker{http://config.privoxy.org/send-banner?type=pattern}</PRE
7043 NAME="TREAT-FORBIDDEN-CONNECTS-LIKE-BLOCKS"
7044 >8.5.38. treat-forbidden-connects-like-blocks</A
7049 CLASS="VARIABLELIST"
7055 >Block forbidden connects with an easy to find error message.</P
7061 > If this action is enabled, <SPAN
7065 makes a difference between forbidden connects and ordinary blocks.
7089 HREF="actions-file.html#LIMIT-CONNECT"
7095 with a short error message inside the headers. If the browser doesn't display
7096 headers (most don't), you just see an empty page.
7099 > With this action enabled, <SPAN
7103 the message that is used for ordinary blocks instead. If you decide
7104 to make an exception for the page in question, you can do so by
7114 > requests the clients tell
7118 > which host they are interested
7119 in, but not which document they plan to get later. As a result, the
7122 >"Go there anyway"</SPAN
7123 > wouldn't work and is therefore suppressed.
7138 >+treat-forbidden-connects-like-blocks</PRE
7157 > Note that many of these actions have the potential to cause a page to
7158 misbehave, possibly even not to display at all. There are many ways
7159 a site designer may choose to design his site, and what HTTP header
7160 content, and other criteria, he may depend on. There is no way to have hard
7161 and fast rules for all sites. See the <A
7162 HREF="appendix.html#ACTIONSANAT"
7164 > for a brief example on troubleshooting
7187 >, can be defined by combining other actions.
7188 These can in turn be invoked just like the built-in actions.
7189 Currently, an alias name can contain any character except space, tab,
7207 > that you only use <SPAN
7227 Alias names are not case sensitive, and are not required to start with a
7234 > sign, since they are merely textually
7237 > Aliases can be used throughout the actions file, but they <SPAN
7242 defined in a special section at the top of the file!</I
7245 And there can only be one such section per actions file. Each actions file may
7246 have its own alias section, and the aliases defined in it are only visible
7247 within that file.</P
7249 > There are two main reasons to use aliases: One is to save typing for frequently
7250 used combinations of actions, the other one is a gain in flexibility: If you
7251 decide once how you want to handle shops by defining an alias called
7255 >, you can later change your policy on shops in
7262 > place, and your changes will take effect everywhere
7263 in the actions file where the <SPAN
7266 > alias is used. Calling aliases
7267 by their purpose also makes your actions files more readable.</P
7269 > Currently, there is one big drawback to using aliases, though:
7273 >'s built-in web-based action file
7274 editor honors aliases when reading the actions files, but it expands
7275 them before writing. So the effects of your aliases are of course preserved,
7276 but the aliases themselves are lost when you edit sections that use aliases
7279 > Now let's define some aliases...</P
7289 > # Useful custom aliases we can use later.
7291 # Note the (required!) section header line and that this section
7292 # must be at the top of the actions file!
7296 # These aliases just save typing later:
7297 # (Note that some already use other aliases!)
7299 +crunch-all-cookies = +<A
7300 HREF="actions-file.html#CRUNCH-INCOMING-COOKIES"
7301 >crunch-incoming-cookies</A
7303 HREF="actions-file.html#CRUNCH-OUTGOING-COOKIES"
7304 >crunch-outgoing-cookies</A
7306 -crunch-all-cookies = -<A
7307 HREF="actions-file.html#CRUNCH-INCOMING-COOKIES"
7308 >crunch-incoming-cookies</A
7310 HREF="actions-file.html#CRUNCH-OUTGOING-COOKIES"
7311 >crunch-outgoing-cookies</A
7313 +block-as-image = +block +handle-as-image
7314 allow-all-cookies = -crunch-all-cookies -<A
7315 HREF="actions-file.html#SESSION-COOKIES-ONLY"
7316 >session-cookies-only</A
7318 HREF="actions-file.html#FILTER-CONTENT-COOKIES"
7319 >filter{content-cookies}</A
7322 # These aliases define combinations of actions
7323 # that are useful for certain types of sites:
7326 HREF="actions-file.html#BLOCK"
7329 HREF="actions-file.html#FILTER"
7331 > -crunch-all-cookies -<A
7332 HREF="actions-file.html#FAST-REDIRECTS"
7335 HREF="actions-file.html#HIDE-REFERER"
7338 HREF="actions-file.html#KILL-POPUPS"
7341 HREF="actions-file.html#PREVENT-COMPRESSION"
7342 >prevent-compression</A
7345 shop = -crunch-all-cookies -<A
7346 HREF="actions-file.html#FILTER-ALL-POPUPS"
7347 >filter{all-popups}</A
7349 HREF="actions-file.html#KILL-POPUPS"
7353 # Short names for other aliases, for really lazy people ;-)
7355 c0 = +crunch-all-cookies
7356 c1 = -crunch-all-cookies</PRE
7362 > ...and put them to use. These sections would appear in the lower part of an
7363 actions file and define exceptions to the default actions (as specified further
7377 > # These sites are either very complex or very keen on
7378 # user data and require minimal interference to work:
7381 .office.microsoft.com
7382 .windowsupdate.microsoft.com
7383 # Gmail is really mail.google.com, not gmail.com
7387 # Allow cookies (for setting and retrieving your customer data)
7391 .worldpay.com # for quietpc.com
7394 # These shops require pop-ups:
7396 {-kill-popups -filter{all-popups} -filter{unsolicited-popups}}
7398 .overclockers.co.uk</PRE
7404 > Aliases like <SPAN
7410 > are typically used for
7414 > sites that require more than one action to be disabled
7415 in order to function properly.</P
7423 >8.7. Actions Files Tutorial</A
7426 > The above chapters have shown <A
7427 HREF="actions-file.html"
7428 >which actions files
7429 there are and how they are organized</A
7430 >, how actions are <A
7431 HREF="actions-file.html#ACTIONS"
7434 HREF="actions-file.html#ACTIONS-APPLY"
7438 HREF="actions-file.html#AF-PATTERNS"
7442 HREF="actions-file.html#ALIASES"
7444 >. Now, let's look at an
7452 file and see how all these pieces come together:</P
7459 >8.7.1. default.action</A
7462 >Every config file should start with a short comment stating its purpose:</P
7472 ># Sample default.action file <ijbswa-developers@lists.sourceforge.net></PRE
7478 >Then, since this is the <TT
7482 first section is a special section for internal use that you needn't
7483 change or worry about:</P
7493 >##########################################################################
7494 # Settings -- Don't change! For internal Privoxy use ONLY.
7495 ##########################################################################
7498 for-privoxy-version=3.0</PRE
7504 >After that comes the (optional) alias section. We'll use the example
7505 section from the above <A
7506 HREF="actions-file.html#ALIASES"
7507 >chapter on aliases</A
7509 that also explains why and how aliases are used:</P
7519 >##########################################################################
7521 ##########################################################################
7524 # These aliases just save typing later:
7525 # (Note that some already use other aliases!)
7527 +crunch-all-cookies = +<A
7528 HREF="actions-file.html#CRUNCH-INCOMING-COOKIES"
7529 >crunch-incoming-cookies</A
7531 HREF="actions-file.html#CRUNCH-OUTGOING-COOKIES"
7532 >crunch-outgoing-cookies</A
7534 -crunch-all-cookies = -<A
7535 HREF="actions-file.html#CRUNCH-INCOMING-COOKIES"
7536 >crunch-incoming-cookies</A
7538 HREF="actions-file.html#CRUNCH-OUTGOING-COOKIES"
7539 >crunch-outgoing-cookies</A
7541 +block-as-image = +block +handle-as-image
7542 mercy-for-cookies = -crunch-all-cookies -<A
7543 HREF="actions-file.html#SESSION-COOKIES-ONLY"
7544 >session-cookies-only</A
7546 HREF="actions-file.html#FILTER-CONTENT-COOKIES"
7547 >filter{content-cookies}</A
7550 # These aliases define combinations of actions
7551 # that are useful for certain types of sites:
7554 HREF="actions-file.html#BLOCK"
7557 HREF="actions-file.html#FILTER"
7559 > -crunch-all-cookies -<A
7560 HREF="actions-file.html#FAST-REDIRECTS"
7563 HREF="actions-file.html#HIDE-REFERER"
7566 HREF="actions-file.html#KILL-POPUPS"
7569 shop = -crunch-all-cookies -<A
7570 HREF="actions-file.html#FILTER-ALL-POPUPS"
7571 >filter{all-popups}</A
7573 HREF="actions-file.html#KILL-POPUPS"
7581 > Now come the regular sections, i.e. sets of actions, accompanied
7582 by URL patterns to which they apply. Remember <SPAN
7587 are disabled when matching starts</I
7589 >, so we have to explicitly
7590 enable the ones we want.</P
7592 > The first regular section is probably the most important. It has only
7601 HREF="actions-file.html#AF-PATTERNS"
7602 >matches all URLs</A
7604 set of actions used in this <SPAN
7612 be applied to all requests as a start</I
7614 >. It can be partly or
7615 wholly overridden by later matches further down this file, or in user.action,
7616 but it will still be largely responsible for your overall browsing
7619 > Again, at the start of matching, all actions are disabled, so there is
7620 no real need to disable any actions here, but we will do that nonetheless,
7621 to have a complete listing for your reference. (Remember: a <SPAN
7625 preceding the action name enables the action, a <SPAN
7629 Also note how this long line has been made more readable by splitting it into
7630 multiple lines with line continuation.</P
7640 >##########################################################################
7641 # "Defaults" section:
7642 ##########################################################################
7645 HREF="actions-file.html#ADD-HEADER"
7649 HREF="actions-file.html#CLIENT-HEADER-FILTER"
7650 >client-header-filter{hide-tor-exit-notation}</A
7653 HREF="actions-file.html#BLOCK"
7657 HREF="actions-file.html#CONTENT-TYPE-OVERWRITE"
7658 >content-type-overwrite</A
7661 HREF="actions-file.html#CRUNCH-CLIENT-HEADER"
7662 >crunch-client-header</A
7665 HREF="actions-file.html#CRUNCH-IF-NONE-MATCH"
7666 >crunch-if-none-match</A
7669 HREF="actions-file.html#CRUNCH-INCOMING-COOKIES"
7670 >crunch-incoming-cookies</A
7673 HREF="actions-file.html#CRUNCH-SERVER-HEADER"
7674 >crunch-server-header</A
7677 HREF="actions-file.html#CRUNCH-OUTGOING-COOKIES"
7678 >crunch-outgoing-cookies</A
7681 HREF="actions-file.html#DEANIMATE-GIFS"
7685 HREF="actions-file.html#DOWNGRADE-HTTP-VERSION"
7686 >downgrade-http-version</A
7689 HREF="actions-file.html#FAST-REDIRECTS"
7690 >fast-redirects{check-decoded-url}</A
7693 HREF="actions-file.html#FILTER-JS-ANNOYANCES"
7694 >filter{js-annoyances}</A
7697 HREF="actions-file.html#FILTER-JS-EVENTS"
7698 >filter{js-events}</A
7701 HREF="actions-file.html#FILTER-HTML-ANNOYANCES"
7702 >filter{html-annoyances}</A
7705 HREF="actions-file.html#FILTER-CONTENT-COOKIES"
7706 >filter{content-cookies}</A
7709 HREF="actions-file.html#FILTER-REFRESH-TAGS"
7710 >filter{refresh-tags}</A
7713 HREF="actions-file.html#FILTER-UNSOLICITED-POPUPS"
7714 >filter{unsolicited-popups}</A
7717 HREF="actions-file.html#FILTER-ALL-POPUPS"
7718 >filter{all-popups}</A
7721 HREF="actions-file.html#FILTER-IMG-REORDER"
7722 >filter{img-reorder}</A
7725 HREF="actions-file.html#FILTER-BANNERS-BY-SIZE"
7726 >filter{banners-by-size}</A
7729 HREF="actions-file.html#FILTER-BANNERS-BY-LINK"
7730 >filter{banners-by-link}</A
7733 HREF="actions-file.html#FILTER-WEBBUGS"
7737 HREF="actions-file.html#FILTER-TINY-TEXTFORMS"
7738 >filter{tiny-textforms}</A
7741 HREF="actions-file.html#FILTER-JUMPING-WINDOWS"
7742 >filter{jumping-windows}</A
7745 HREF="actions-file.html#FILTER-FRAMESET-BORDERS"
7746 >filter{frameset-borders}</A
7749 HREF="actions-file.html#FILTER-DEMORONIZER"
7750 >filter{demoronizer}</A
7753 HREF="actions-file.html#FILTER-SHOCKWAVE-FLASH"
7754 >filter{shockwave-flash}</A
7757 HREF="actions-file.html#FILTER-QUICKTIME-KIOSKMODE"
7758 >filter{quicktime-kioskmode}</A
7761 HREF="actions-file.html#FILTER-FUN"
7765 HREF="actions-file.html#FILTER-CRUDE-PARENTAL"
7766 >filter{crude-parental}</A
7769 HREF="actions-file.html#FILTER-IE-EXPLOITS"
7770 >filter{ie-exploits}</A
7773 HREF="actions-file.html#FILTER-GOOGLE"
7777 HREF="actions-file.html#FILTER-YAHOO"
7781 HREF="actions-file.html#FILTER-MSN"
7785 HREF="actions-file.html#FILTER-BLOGSPOT"
7786 >filter{blogspot}</A
7789 HREF="actions-file.html#FILTER-NO-PING"
7793 HREF="actions-file.html#FORCE-TEXT-MODE"
7797 HREF="actions-file.html#HANDLE-AS-EMPTY-DOCUMENT"
7798 >handle-as-empty-document</A
7801 HREF="actions-file.html#HANDLE-AS-IMAGE"
7805 HREF="actions-file.html#HIDE-ACCEPT-LANGUAGE"
7806 >hide-accept-language</A
7809 HREF="actions-file.html#HIDE-CONTENT-DISPOSITION"
7810 >hide-content-disposition</A
7813 HREF="actions-file.html#HIDE-IF-MODIFIED-SINCE"
7814 >hide-if-modified-since</A
7817 HREF="actions-file.html#HIDE-FORWARDED-FOR-HEADERS"
7818 >hide-forwarded-for-headers</A
7821 HREF="actions-file.html#HIDE-FROM-HEADER"
7822 >hide-from-header{block}</A
7825 HREF="actions-file.html#HIDE-REFERER"
7826 >hide-referrer{forge}</A
7829 HREF="actions-file.html#HIDE-USER-AGENT"
7833 HREF="actions-file.html#INSPECT-JPEGS"
7837 HREF="actions-file.html#KILL-POPUPS"
7841 HREF="actions-file.html#LIMIT-CONNECT"
7845 HREF="actions-file.html#PREVENT-COMPRESSION"
7846 >prevent-compression</A
7849 HREF="actions-file.html#OVERWRITE-LAST-MODIFIED"
7850 >overwrite-last-modified</A
7853 HREF="actions-file.html#REDIRECT"
7857 HREF="actions-file.html#SEND-VANILLA-WAFER"
7858 >send-vanilla-wafer</A
7861 HREF="actions-file.html#SEND-WAFER"
7865 HREF="actions-file.html#SERVER-HEADER-FILTER"
7866 >server-header-filter{xml-to-html}</A
7869 HREF="actions-file.html#SERVER-HEADER-FILTER"
7870 >server-header-filter{html-to-xml}</A
7873 HREF="actions-file.html#SESSION-COOKIES-ONLY"
7874 >session-cookies-only</A
7877 HREF="actions-file.html#SET-IMAGE-BLOCKER"
7878 >set-image-blocker{pattern}</A
7881 HREF="actions-file.html#TREAT-FORBIDDEN-CONNECTS-LIKE-BLOCKS"
7882 >treat-forbidden-connects-like-blocks</A
7885 / # forward slash will match *all* potential URL patterns.</PRE
7891 > The default behavior is now set. Note that some actions, like not hiding
7892 the user agent, are part of a <SPAN
7894 >"general policy"</SPAN
7896 universally and won't get any exceptions defined later. Other choices,
7897 like not blocking (which is <SPAN
7904 default!) need exceptions, i.e. we need to specify explicitly what we
7905 want to block in later sections.</P
7907 > The first of our specialized sections is concerned with <SPAN
7911 sites, i.e. sites that require minimum interference, because they are either
7912 very complex or very keen on tracking you (and have mechanisms in place that
7913 make them unusable for people who avoid being tracked). We will simply use
7917 > alias instead of stating the list
7918 of actions explicitly:</P
7928 >##########################################################################
7929 # Exceptions for sites that'll break under the default action set:
7930 ##########################################################################
7932 # "Fragile" Use a minimum set of actions for these sites (see alias above):
7935 .office.microsoft.com # surprise, surprise!
7936 .windowsupdate.microsoft.com
7937 mail.google.com</PRE
7943 > Shopping sites are not as fragile, but they typically
7944 require cookies to log in, and pop-up windows for shopping
7945 carts or item details. Again, we'll use a pre-defined alias:</P
7959 .worldpay.com # for quietpc.com
7970 HREF="actions-file.html#FAST-REDIRECTS"
7974 action, which we enabled per default above, breaks some sites. So disable
7975 it for popular sites where we know it misbehaves:</P
7986 HREF="actions-file.html#FAST-REDIRECTS"
7992 .altavista.com/.*(like|url|link):http
7993 .altavista.com/trans.*urltext=http
8000 > It is important that <SPAN
8004 URLs belong to images, so that <SPAN
8011 be blocked, a substitute image can be sent, rather than an HTML page.
8012 Contacting the remote site to find out is not an option, since it
8013 would destroy the loading time advantage of banner blocking, and it
8014 would feed the advertisers (in terms of money <SPAN
8021 information). We can mark any URL as an image with the <TT
8024 HREF="actions-file.html#HANDLE-AS-IMAGE"
8028 and marking all URLs that end in a known image file extension is a
8039 >##########################################################################
8041 ##########################################################################
8043 # Define which file types will be treated as images, in case they get
8044 # blocked further down this file:
8047 HREF="actions-file.html#HANDLE-AS-IMAGE"
8050 /.*\.(gif|jpe?g|png|bmp|ico)$</PRE
8056 > And then there are known banner sources. They often use scripts to
8057 generate the banners, so it won't be visible from the URL that the
8058 request is for an image. Hence we block them <SPAN
8065 mark them as images in one go, with the help of our
8068 >+block-as-image</TT
8069 > alias defined above. (We could of
8070 course just as well use <TT
8073 HREF="actions-file.html#BLOCK"
8077 HREF="actions-file.html#HANDLE-AS-IMAGE"
8081 Remember that the type of the replacement image is chosen by the
8085 HREF="actions-file.html#SET-IMAGE-BLOCKER"
8086 >set-image-blocker</A
8089 action. Since all URLs have matched the default section with its
8093 HREF="actions-file.html#SET-IMAGE-BLOCKER"
8094 >set-image-blocker</A
8097 action before, it still applies and needn't be repeated:</P
8107 ># Known ad generators:
8112 .ad.*.doubleclick.net
8113 .a.yimg.com/(?:(?!/i/).)*$
8114 .a[0-9].yimg.com/(?:(?!/i/).)*$
8122 > One of the most important jobs of <SPAN
8126 is to block banners. Many of these can be <SPAN
8133 HREF="actions-file.html#FILTER"
8135 >{banners-by-size}</TT
8137 action, which we enabled above, and which deletes the references to banner
8138 images from the pages while they are loaded, so the browser doesn't request
8139 them anymore, and hence they don't need to be blocked here. But this naturally
8140 doesn't catch all banners, and some people choose not to use filters, so we
8141 need a comprehensive list of patterns for banner URLs here, and apply the
8145 HREF="actions-file.html#BLOCK"
8148 > action to them.</P
8150 > First comes many generic patterns, which do most of the work, by
8151 matching typical domain and path name components of banners. Then comes
8152 a list of individual patterns for specific sites, which is omitted here
8153 to keep the example short:</P
8163 >##########################################################################
8164 # Block these fine banners:
8165 ##########################################################################
8167 HREF="actions-file.html#BLOCK"
8177 /.*count(er)?\.(pl|cgi|exe|dll|asp|php[34]?)
8178 /(?:.*/)?(publicite|werbung|rekla(ma|me|am)|annonse|maino(kset|nta|s)?)/
8180 # Site-specific patterns (abbreviated):
8188 > It's quite remarkable how many advertisers actually call their banner
8194 >.com, or call the directory
8195 in which the banners are stored simply <SPAN
8199 generic patterns are surprisingly effective.</P
8201 > But being very generic, they necessarily also catch URLs that we don't want
8202 to block. The pattern <TT
8214 >.nasty-corp.com"</SPAN
8224 >.sourcefroge.net"</SPAN
8234 >l.some-provider.net."</SPAN
8236 well-known exceptions to the <TT
8239 HREF="actions-file.html#BLOCK"
8245 > Note that these are exceptions to exceptions from the default! Consider the URL
8248 >"downloads.sourcefroge.net"</SPAN
8249 >: Initially, all actions are deactivated,
8250 so it wouldn't get blocked. Then comes the defaults section, which matches the
8251 URL, but just deactivates the <TT
8254 HREF="actions-file.html#BLOCK"
8258 action once again. Then it matches <TT
8261 >, an exception to the
8262 general non-blocking policy, and suddenly
8266 HREF="actions-file.html#BLOCK"
8269 > applies. And now, it'll match
8276 HREF="actions-file.html#BLOCK"
8280 applies, so (unless it matches <SPAN
8286 > further down) it ends up
8290 HREF="actions-file.html#BLOCK"
8293 > action applying.</P
8303 >##########################################################################
8304 # Save some innocent victims of the above generic block patterns:
8305 ##########################################################################
8310 HREF="actions-file.html#BLOCK"
8313 adv[io]*. # (for advogato.org and advice.*)
8314 adsl. # (has nothing to do with ads)
8315 adobe. # (has nothing to do with ads either)
8316 ad[ud]*. # (adult.* and add.*)
8317 .edu # (universities don't host banners (yet!))
8318 .*loads. # (downloads, uploads etc)
8326 www.globalintersec.com/adv # (adv = advanced)
8327 www.ugu.com/sui/ugu/adv</PRE
8333 > Filtering source code can have nasty side effects,
8334 so make an exception for our friends at sourceforge.net,
8335 and all paths with <SPAN
8338 > in them. Note that
8342 HREF="actions-file.html#FILTER"
8352 > filters in one fell swoop!</P
8362 ># Don't filter code!
8365 HREF="actions-file.html#FILTER"
8372 .sourceforge.net</PRE
8381 > is of course much more
8382 comprehensive, but we hope this example made clear how it works.</P
8390 >8.7.2. user.action</A
8393 > So far we are painting with a broad brush by setting general policies,
8394 which would be a reasonable starting point for many people. Now,
8395 you might want to be more specific and have customized rules that
8396 are more suitable to your personal habits and preferences. These would
8397 be for narrowly defined situations like your ISP or your bank, and should
8401 >, which is parsed after all other
8402 actions files and hence has the last word, over-riding any previously
8403 defined actions. <TT
8413 > place for your personal settings, since
8417 > is actively maintained by the
8421 > developers and you'll probably want
8422 to install updated versions from time to time.</P
8424 > So let's look at a few examples of things that one might typically do in
8438 ># My user.action file. <fred@foobar.com></PRE
8445 HREF="actions-file.html#ALIASES"
8447 > are local to the actions
8448 file that they are defined in, you can't use the ones from
8452 >, unless you repeat them here:</P
8462 ># Aliases are local to the file they are defined in.
8463 # (Re-)define aliases for this file:
8467 # These aliases just save typing later, and the alias names should
8468 # be self explanatory.
8470 +crunch-all-cookies = +crunch-incoming-cookies +crunch-outgoing-cookies
8471 -crunch-all-cookies = -crunch-incoming-cookies -crunch-outgoing-cookies
8472 allow-all-cookies = -crunch-all-cookies -session-cookies-only
8473 allow-popups = -filter{all-popups} -kill-popups
8474 +block-as-image = +block +handle-as-image
8475 -block-as-image = -block
8477 # These aliases define combinations of actions that are useful for
8478 # certain types of sites:
8480 fragile = -block -crunch-all-cookies -filter -fast-redirects -hide-referrer -kill-popups
8481 shop = -crunch-all-cookies allow-popups
8483 # Allow ads for selected useful free sites:
8485 allow-ads = -block -filter{banners-by-size} -filter{banners-by-link}
8487 # Alias for specific file types that are text, but might have conflicting
8488 # MIME types. We want the browser to force these to be text documents.
8489 handle-as-text = -<A
8490 HREF="actions-file.html#FILTER"
8493 HREF="actions-file.html#CONTENT-TYPE-OVERWRITE"
8494 >content-type-overwrite{text/plain}</A
8496 HREF="actions-file.html#FORCE-TEXT-MODE"
8499 HREF="actions-file.html#HIDE-CONTENT-DISPOSITION"
8500 >hide-content-disposition</A
8507 > Say you have accounts on some sites that you visit regularly, and
8508 you don't want to have to log in manually each time. So you'd like
8509 to allow persistent cookies for these sites. The
8512 >allow-all-cookies</TT
8513 > alias defined above does exactly
8514 that, i.e. it disables crunching of cookies in any direction, and the
8515 processing of cookies to make them only temporary.</P
8525 >{ allow-all-cookies }
8535 > Your bank is allergic to some filter, but you don't know which, so you disable them all:</P
8546 HREF="actions-file.html#FILTER"
8549 .your-home-banking-site.com</PRE
8555 > Some file types you may not want to filter for various reasons:</P
8565 ># Technical documentation is likely to contain strings that might
8566 # erroneously get altered by the JavaScript-oriented filters:
8571 # And this stupid host sends streaming video with a wrong MIME type,
8572 # so that Privoxy thinks it is getting HTML and starts filtering:
8574 stupid-server.example.com/</PRE
8580 > Example of a simple <A
8581 HREF="actions-file.html#BLOCK"
8583 > action. Say you've
8584 seen an ad on your favourite page on example.com that you want to get rid of.
8585 You have right-clicked the image, selected <SPAN
8587 >"copy image location"</SPAN
8589 and pasted the URL below while removing the leading http://, into a
8593 > section. Note that <TT
8597 > need not be specified, since all URLs ending in
8601 > will be tagged as images by the general rules as set
8602 in default.action anyway:</P
8613 HREF="actions-file.html#BLOCK"
8616 www.example.com/nasty-ads/sponsor\.gif
8617 another.popular.site.net/more/junk/here/</PRE
8623 > The URLs of dynamically generated banners, especially from large banner
8624 farms, often don't use the well-known image file name extensions, which
8625 makes it impossible for <SPAN
8629 the file type just by looking at the URL.
8632 >+block-as-image</TT
8633 > alias defined above for
8635 Note that objects which match this rule but then turn out NOT to be an
8636 image are typically rendered as a <SPAN
8638 >"broken image"</SPAN
8640 browser. Use cautiously.</P
8650 >{ +block-as-image }
8660 > Now you noticed that the default configuration breaks Forbes Magazine,
8661 but you were too lazy to find out which action is the culprit, and you
8662 were again too lazy to give <A
8666 you just used the <TT
8669 > alias on the site, and
8676 > -- it worked. The <TT
8680 aliases disables those actions that are most likely to break a site. Also,
8681 good for testing purposes to see if it is <SPAN
8685 that is causing the problem or not. We later find other regular sites
8686 that misbehave, and add those to our personalized list of troublemakers:</P
8705 > You like the <SPAN
8708 > text replacements in <TT
8712 but it is disabled in the distributed actions file. (My colleagues on the team just
8713 don't have a sense of humour, that's why! ;-). So you'd like to turn it on in your private,
8714 update-safe config, once and for all:</P
8725 HREF="actions-file.html#FILTER-FUN"
8728 / # For ALL sites!</PRE
8734 > Note that the above is not really a good idea: There are exceptions
8735 to the filters in <TT
8739 really shouldn't be filtered, like code on CVS->Web interfaces. Since
8743 > has the last word, these exceptions
8744 won't be valid for the <SPAN
8747 > filtering specified here.</P
8749 > You might also worry about how your favourite free websites are
8750 funded, and find that they rely on displaying banner advertisements
8751 to survive. So you might want to specifically allow banners for those
8752 sites that you feel provide value to you:</P
8774 > has been aliased to
8778 HREF="actions-file.html#BLOCK"
8785 HREF="actions-file.html#FILTER-BANNERS-BY-SIZE"
8786 >filter{banners-by-size}</A
8792 HREF="actions-file.html#FILTER-BANNERS-BY-LINK"
8793 >filter{banners-by-link}</A
8797 > Invoke another alias here to force an over-ride of the MIME type <TT
8799 > application/x-sh</TT
8800 > which typically would open a download type
8801 dialog. In my case, I want to look at the shell script, and then I can save
8802 it should I choose to.</P
8822 > is generally the best place to define
8823 exceptions and additions to the default policies of
8827 >. Some actions are safe to have their
8828 default policies set here though. So let's set a default policy to have a
8832 > image as opposed to the checkerboard pattern for
8842 > of course matches all URL
8843 paths and patterns:</P
8854 HREF="actions-file.html#SET-IMAGE-BLOCKER"
8855 >set-image-blocker{blank}</A
8870 SUMMARY="Footer navigation table"
8899 HREF="filter-file.html"
8909 >The Main Configuration File</TD