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 Note: the config file option <A
577 HREF="config.html#ENABLE-EDIT-ACTIONS"
578 >enale-edit-actions</A
579 > must be enabled for
580 this to work. The editor allows both fine-grained control over every single
581 feature on a per-URL basis, and easy choosing from wholesale sets of defaults
592 >. Warning: the <SPAN
596 aggressive, and will be more likely to cause problems for some sites.
597 Experienced users only!
600 > If you prefer plain text editing to GUIs, you can of course also directly edit the
601 the actions files with your favorite text editor. Look at
605 > which is richly commented with many
614 >8.3. How Actions are Applied to Requests</A
617 > Actions files are divided into sections. There are special sections,
621 HREF="actions-file.html#ALIASES"
624 > sections which will
625 be discussed later. For now let's concentrate on regular sections: They have a
626 heading line (often split up to multiple lines for readability) which consist
627 of a list of actions, separated by whitespace and enclosed in curly braces.
628 Below that, there is a list of URL and tag patterns, each on a separate line.</P
630 > To determine which actions apply to a request, the URL of the request is
631 compared to all URL patterns in each <SPAN
635 Every time it matches, the list of applicable actions for the request is
636 incrementally updated, using the heading of the section in which the
637 pattern is located. The same is done again for tags and tag patterns later on.</P
639 > If multiple applying sections set the same action differently,
640 the last match wins. If not, the effects are aggregated.
641 E.g. a URL might match a regular section with a heading line of <TT
645 HREF="actions-file.html#HANDLE-AS-IMAGE"
649 then later another one with just <TT
653 HREF="actions-file.html#BLOCK"
663 > actions to apply. And there may well be
664 cases where you will want to combine actions together. Such a section then
682 # Block these as if they were images. Send no block page.
684 media.example.com/.*banners
685 .example.com/images/ads/</PRE
692 > You can trace this process for URL patterns and any given URL by visiting <A
693 HREF="http://config.privoxy.org/show-url-info"
695 >http://config.privoxy.org/show-url-info</A
698 > Examples and more detail on this is provided in the Appendix, <A
699 HREF="appendix.html#ACTIONSANAT"
700 > Troubleshooting: Anatomy of an Action</A
720 to determine what <SPAN
726 > might apply to which sites and
727 pages your browser attempts to access. These <SPAN
737 > matching to achieve a high degree of
738 flexibility. This allows one expression to be expanded and potentially match
739 against many similar patterns.</P
741 > Generally, an URL pattern has the form
744 ><domain>/<path></TT
748 ><domain></TT
753 optional. (This is why the special <TT
756 > pattern matches all
757 URLs). Note that the protocol portion of the URL pattern (e.g.
768 the pattern. This is assumed already!</P
770 > The pattern matching syntax is different for the domain and path parts of
771 the URL. The domain part uses a simple globbing type matching technique,
772 while the path part uses a more flexible
774 HREF="http://en.wikipedia.org/wiki/Regular_expressions"
779 Expressions (PCRE)"</SPAN
790 >www.example.com/</TT
794 > is a domain-only pattern and will match any request to <TT
798 regardless of which document on that server is requested. So ALL pages in
799 this domain would be covered by the scope of this action. Note that a
803 > is different and would NOT match.
813 > means exactly the same. For domain-only patterns, the trailing <TT
823 >www.example.com/index.html$</TT
827 > matches all the documents on <TT
831 whose name starts with <TT
840 >www.example.com/index.html$</TT
844 > matches only the single document <TT
861 > matches the document <TT
864 >, regardless of the domain,
871 > web server anywhere.
881 > matches nothing, since it would be interpreted as a domain name and
882 there is no top-level domain called <TT
897 >8.4.1. The Domain Pattern</A
900 > The matching of the domain part offers some flexible options: if the
901 domain starts or ends with a dot, it becomes unanchored at that end.
915 > matches any domain that <SPAN
935 > matches any domain that <SPAN
955 > matches any domain that <SPAN
965 And, by the way, also included would be any files or documents that exist
966 within that domain since no path limitations are specified. (Correctly
967 speaking: It matches any FQDN that contains <TT
971 a domain.) This might be <TT
981 >www.example.net/cgi/testing.pl</TT
982 > for instance. All these
989 > Additionally, there are wild-cards that you can use in the domain names
990 themselves. These work similarly to shell globbing type wild-cards:
994 > represents zero or more arbitrary characters (this is
997 HREF="http://en.wikipedia.org/wiki/Regular_expressions"
1004 > based syntax of <SPAN
1011 > represents any single character (this is equivalent to the
1012 regular expression syntax of a simple <SPAN
1015 >), and you can define
1018 >"character classes"</SPAN
1019 > in square brackets which is similar to
1020 the same regular expression technique. All of this can be freely mixed:</P
1024 CLASS="VARIABLELIST"
1029 >ad*.example.com</TT
1035 >"adserver.example.com"</SPAN
1039 >"ads.example.com"</SPAN
1040 >, etc but not <SPAN
1042 >"sfads.example.com"</SPAN
1049 >*ad*.example.com</TT
1053 > matches all of the above, and then some.
1069 >pictures.epix.com</TT
1072 >a.b.c.d.e.upix.com</TT
1079 >www[1-9a-ez].example.c*</TT
1085 >www1.example.com</TT
1089 >www4.example.cc</TT
1092 >wwwd.example.cy</TT
1096 >wwwz.example.com</TT
1106 >wwww.example.com</TT
1113 > While flexible, this is not the sophistication of full regular expression based syntax.</P
1121 >8.4.2. The Path Pattern</A
1127 > uses Perl compatible (PCRE)
1129 HREF="http://en.wikipedia.org/wiki/Regular_expressions"
1138 HREF="http://www.pcre.org/"
1142 matching the path portion (after the slash), and is thus more flexible.</P
1145 HREF="appendix.html#REGEX"
1147 > with a brief quick-start into regular
1148 expressions, and full (very technical) documentation on PCRE regex syntax is available on-line
1150 HREF="http://www.pcre.org/man.txt"
1152 >http://www.pcre.org/man.txt</A
1154 You might also find the Perl man page on regular expressions (<TT
1158 useful, which is available on-line at <A
1159 HREF="http://perldoc.perl.org/perlre.html"
1161 >http://perldoc.perl.org/perlre.html</A
1164 > Note that the path pattern is automatically left-anchored at the <SPAN
1168 i.e. it matches as if it would start with a <SPAN
1171 > (regular expression speak
1172 for the beginning of a line).</P
1174 > Please also note that matching in the path is <SPAN
1178 >CASE INSENSITIVE</I
1181 by default, but you can switch to case sensitive at any point in the pattern by using the
1187 >www.example.com/(?-i)PaTtErN.*</TT
1189 only documents whose path starts with <TT
1199 > this capitalization.</P
1203 CLASS="VARIABLELIST"
1208 >.example.com/.*</TT
1212 > Is equivalent to just <SPAN
1214 >".example.com"</SPAN
1215 >, since any documents
1216 within that domain are matched with or without the <SPAN
1220 regular expression. This is redundant
1226 >.example.com/.*/index.html$</TT
1230 > Will match any page in the domain of <SPAN
1232 >"example.com"</SPAN
1237 >, and that is part of some path. For
1238 example, it matches <SPAN
1240 >"www.example.com/testing/index.html"</SPAN
1244 >"www.example.com/index.html"</SPAN
1245 > because the regular
1246 expression called for at least two <SPAN
1250 requirement. It also would match
1253 >"www.example.com/testing/index_html"</SPAN
1255 special meta-character <SPAN
1264 >.example.com/(.*/)?index\.html$</TT
1268 > This regular expression is conditional so it will match any page
1272 > regardless of path which in this case can
1273 have one or more <SPAN
1276 >. And this one must contain exactly
1280 > (but does not have to end with that!).
1286 >.example.com/(.*/)(ads|banners?|junk)</TT
1290 > This regular expression will match any path of <SPAN
1292 >"example.com"</SPAN
1294 that contains any of the words <SPAN
1304 > (because of the <SPAN
1311 The path does not have to end in these words, just contain them.
1317 >.example.com/(.*/)(ads|banners?|junk)/.*\.(jpe?g|gif|png)$</TT
1321 > This is very much the same as above, except now it must end in either
1335 one is limited to common image formats.
1341 > There are many, many good examples to be found in <TT
1345 and more tutorials below in <A
1346 HREF="appendix.html#REGEX"
1347 >Appendix on regular expressions</A
1356 >8.4.3. The Tag Pattern</A
1359 > Tag patterns are used to change the applying actions based on the
1360 request's tags. Tags can be created with either the
1362 HREF="actions-file.html#CLIENT-HEADER-TAGGER"
1363 >client-header-tagger</A
1366 HREF="actions-file.html#SERVER-HEADER-TAGGER"
1367 >server-header-tagger</A
1370 > Tag patterns have to start with <SPAN
1377 can tell them apart from URL patterns. Everything after the colon
1378 including white space, is interpreted as a regular expression with
1379 path pattern syntax, except that tag patterns aren't left-anchored
1380 automatically (Privoxy doesn't silently add a <SPAN
1384 you have to do it yourself if you need it).</P
1386 > To match all requests that are tagged with <SPAN
1390 your pattern line should be <SPAN
1397 > would work as well, but it would also
1398 match requests whose tags contain <SPAN
1405 > wouldn't work as it requires white space.</P
1407 > Sections can contain URL and tag patterns at the same time,
1408 but tag patterns are checked after the URL patterns and thus
1409 always overrule them, even if they are located before the URL patterns.</P
1411 > Once a new tag is added, Privoxy checks right away if it's matched by one
1412 of the tag patterns and updates the action settings accordingly. As a result
1413 tags can be used to activate other tagger actions, as long as these other
1414 taggers look for headers that haven't already be parsed.</P
1416 > For example you could tag client requests which use the POST method,
1417 use this tag to activate another tagger that adds a tag if cookies
1418 are send, and then block based on the cookie tag. However if you'd
1419 reverse the position of the described taggers, and activated the method
1420 tagger based on the cookie tagger, no method tags would be created.
1421 The method tagger would look for the request line, but at the time
1422 the cookie tag is created the request line has already been parsed.</P
1424 > While this is a limitation you should be aware of, this kind of
1425 indirection is seldom needed anyway and even the example doesn't
1426 make too much sense.</P
1438 > All actions are disabled by default, until they are explicitly enabled
1439 somewhere in an actions file. Actions are turned on if preceded with a
1443 >, and turned off if preceded with a <SPAN
1452 >"do that action"</SPAN
1459 >"please block URLs that match the
1460 following patterns"</SPAN
1467 block URLs that match the following patterns, even if <TT
1471 previously applied."</SPAN
1475 Again, actions are invoked by placing them on a line, enclosed in curly braces and
1476 separated by whitespace, like in
1479 >{+some-action -some-other-action{some-parameter}}</TT
1481 followed by a list of URL patterns, one per line, to which they apply.
1482 Together, the actions line and the following pattern lines make up a section
1483 of the actions file. </P
1486 Actions fall into three categories:</P
1494 Boolean, i.e the action can only be <SPAN
1517 > # enable action <TT
1528 > # disable action <TT
1550 Parameterized, where some value is required in order to enable this type of action.
1572 >} # enable action and set parameter to <TT
1578 # overwriting parameter from previous match if necessary
1584 > # disable action. The parameter can be omitted</PRE
1591 > Note that if the URL matches multiple positive forms of a parameterized action,
1592 the last match wins, i.e. the params from earlier matches are simply ignored.
1598 >+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
1605 Multi-value. These look exactly like parameterized actions,
1606 but they behave differently: If the action applies multiple times to the
1607 same URL, but with different parameters, <SPAN
1620 > matches are remembered. This is used for actions
1621 that can be executed for the same request repeatedly, like adding multiple
1622 headers, or filtering through multiple filters. Syntax:
1643 >} # enable action and add <TT
1648 > to the list of parameters
1659 >} # remove the parameter <TT
1664 > from the list of parameters
1665 # If it was the last one left, disable the action.
1671 > # disable this action completely and remove all parameters from the list</PRE
1681 >+add-header{X-Fun-Header: Some text}</TT
1685 >+filter{html-annoyances}</TT
1692 > If nothing is specified in any actions file, no <SPAN
1696 taken. So in this case <SPAN
1700 normal, non-blocking, non-filtering proxy. You must specifically enable the
1701 privacy and blocking features you need (although the provided default actions
1702 files will give a good starting point).</P
1704 > Later defined action sections always over-ride earlier ones of the same type.
1705 So exceptions to any rules you make, should come in the latter part of the file (or
1706 in a file that is processed later when using multiple actions files such
1710 >). For multi-valued actions, the actions
1711 are applied in the order they are specified. Actions files are processed in
1712 the order they are defined in <TT
1716 installation has three actions files). It also quite possible for any given
1717 URL to match more than one <SPAN
1720 > (because of wildcards and
1721 regular expressions), and thus to trigger more than one set of actions! Last
1724 > The list of valid <SPAN
1734 >8.5.1. add-header</A
1739 CLASS="VARIABLELIST"
1745 >Confuse log analysis, custom applications</P
1751 > Sends a user defined HTTP header to the web server.
1764 > Any string value is possible. Validity of the defined HTTP headers is not checked.
1765 It is recommended that you use the <SPAN
1779 > This action may be specified multiple times, in order to define multiple
1780 headers. This is rarely needed for the typical user. If you don't know what
1783 >"HTTP headers"</SPAN
1784 > are, you definitely don't need to worry about this
1800 >+add-header{X-User-Tracking: sucks}</PRE
1821 CLASS="VARIABLELIST"
1827 >Block ads or other unwanted content</P
1833 > Requests for URLs to which this action applies are blocked, i.e. the
1834 requests are trapped by <SPAN
1837 > and the requested URL is never retrieved,
1838 but is answered locally with a substitute page or image, as determined by
1842 HREF="actions-file.html#HANDLE-AS-IMAGE"
1849 HREF="actions-file.html#SET-IMAGE-BLOCKER"
1850 >set-image-blocker</A
1856 HREF="actions-file.html#HANDLE-AS-EMPTY-DOCUMENT"
1857 >handle-as-empty-document</A
1882 > sends a special <SPAN
1886 for requests to blocked pages. This page contains links to find out why the request
1887 was blocked, and a click-through to the blocked content (the latter only if compiled with the
1888 force feature enabled). The <SPAN
1891 > page adapts to the available
1892 screen space -- it displays full-blown if space allows, or miniaturized and text-only
1893 if loaded into a small frame or window. If you are using <SPAN
1897 right now, you can take a look at the
1899 HREF="http://ads.bannerserver.example.com/nasty-ads/sponsor.html"
1910 A very important exception occurs if <SPAN
1923 HREF="actions-file.html#HANDLE-AS-IMAGE"
1927 apply to the same request: it will then be replaced by an image. If
1931 HREF="actions-file.html#SET-IMAGE-BLOCKER"
1932 >set-image-blocker</A
1935 (see below) also applies, the type of image will be determined by its parameter,
1936 if not, the standard checkerboard pattern is sent.
1939 > It is important to understand this process, in order
1940 to understand how <SPAN
1944 ads and other unwanted content. Blocking is a core feature, and one
1945 upon which various other features depend.
1951 HREF="actions-file.html#FILTER"
1955 action can perform a very similar task, by <SPAN
1959 banner images and other content through rewriting the relevant URLs in the
1960 document's HTML source, so they don't get requested in the first place.
1961 Note that this is a totally different technique, and it's easy to confuse the two.
1965 >Example usage (section):</DT
1977 # Block and replace with "blocked" page
1978 .nasty-stuff.example.com
1980 {+block +handle-as-image}
1981 # Block and replace with image
1985 {+block +handle-as-empty-document}
1986 # Block and then ignore
1987 adserver.exampleclick.net/.*\.js$</PRE
2002 NAME="CLIENT-HEADER-FILTER"
2003 >8.5.3. client-header-filter</A
2008 CLASS="VARIABLELIST"
2014 > Rewrite or remove single client headers.
2021 > All client headers to which this action applies are filtered on-the-fly through
2022 the specified regular expression based substitutions.
2035 > The name of a client-header filter, as defined in one of the
2037 HREF="filter-file.html"
2046 > Client-header filters are applied to each header on its own, not to
2047 all at once. This makes it easier to diagnose problems, but on the downside
2048 you can't write filters that only change header x if header y's value is z.
2049 You can do that by using tags though.
2052 > Client-header filters are executed after the other header actions have finished
2053 and use their output as input.
2056 > Please refer to the <A
2057 HREF="filter-file.html"
2058 >filter file chapter</A
2060 to learn which client-header filters are available by default, and how to
2065 >Example usage (section):</DT
2076 >{+client-header-filter{hide-tor-exit-notation}}
2093 NAME="CLIENT-HEADER-TAGGER"
2094 >8.5.4. client-header-tagger</A
2099 CLASS="VARIABLELIST"
2105 > Block requests based on their headers.
2112 > Client headers to which this action applies are filtered on-the-fly through
2113 the specified regular expression based substitutions, the result is used as
2127 > The name of a client-header tagger, as defined in one of the
2129 HREF="filter-file.html"
2138 > Client-header taggers are applied to each header on its own,
2139 and as the header isn't modified, each tagger <SPAN
2146 > Client-header taggers are the first actions that are executed
2147 and their tags can be used to control every other action.
2151 >Example usage (section):</DT
2162 ># Tag every request with the User-Agent header
2163 {+client-header-tagger{user-agent}}
2180 NAME="CONTENT-TYPE-OVERWRITE"
2181 >8.5.5. content-type-overwrite</A
2186 CLASS="VARIABLELIST"
2192 >Stop useless download menus from popping up, or change the browser's rendering mode</P
2198 > Replaces the <SPAN
2200 >"Content-Type:"</SPAN
2201 > HTTP server header.
2223 >"Content-Type:"</SPAN
2224 > HTTP server header is used by the
2225 browser to decide what to do with the document. The value of this
2226 header can cause the browser to open a download menu instead of
2227 displaying the document by itself, even if the document's format is
2228 supported by the browser.
2231 > The declared content type can also affect which rendering mode
2232 the browser chooses. If XHTML is delivered as <SPAN
2236 many browsers treat it as yet another broken HTML document.
2237 If it is send as <SPAN
2239 >"application/xml"</SPAN
2241 XHTML support will only display it, if the syntax is correct.
2244 > If you see a web site that proudly uses XHTML buttons, but sets
2247 >"Content-Type: text/html"</SPAN
2248 >, you can use <SPAN
2252 to overwrite it with <SPAN
2254 >"application/xml"</SPAN
2256 the web master's claim inside your XHTML-supporting browser.
2257 If the syntax is incorrect, the browser will complain loudly.
2260 > You can also go the opposite direction: if your browser prints
2261 error messages instead of rendering a document falsely declared
2262 as XHTML, you can overwrite the content type with
2266 > and have it rendered as broken HTML document.
2271 >content-type-overwrite</TT
2275 >"Content-Type:"</SPAN
2276 > headers that look like some kind of text.
2277 If you want to overwrite it unconditionally, you have to combine it with
2281 HREF="actions-file.html#FORCE-TEXT-MODE"
2285 This limitation exists for a reason, think twice before circumventing it.
2288 > Most of the time it's easier to replace this action with a custom
2292 HREF="actions-file.html#SERVER-HEADER-FILTER"
2293 >server-header filter</A
2296 It allows you to activate it for every document of a certain site and it will still
2297 only replace the content types you aimed at.
2300 > Of course you can apply <TT
2302 >content-type-overwrite</TT
2304 to a whole site and then make URL based exceptions, but it's a lot
2305 more work to get the same precision.
2309 >Example usage (sections):</DT
2320 ># Check if www.example.net/ really uses valid XHTML
2321 { +content-type-overwrite{application/xml} }
2324 # but leave the content type unmodified if the URL looks like a style sheet
2325 {-content-type-overwrite}
2326 www.example.net/.*\.css$
2327 www.example.net/.*style</PRE
2342 NAME="CRUNCH-CLIENT-HEADER"
2343 >8.5.6. crunch-client-header</A
2348 CLASS="VARIABLELIST"
2354 >Remove a client header <SPAN
2357 > has no dedicated action for.</P
2363 > Deletes every header sent by the client that contains the string the user supplied as parameter.
2383 > This action allows you to block client headers for which no dedicated
2391 > will remove every client header that
2392 contains the string you supplied as parameter.
2395 > Regular expressions are <SPAN
2402 use this action to block different headers in the same request, unless
2403 they contain the same string.
2408 >crunch-client-header</TT
2409 > is only meant for quick tests.
2410 If you have to block several different headers, or only want to modify
2411 parts of them, you should use a
2415 HREF="actions-file.html#CLIENT-HEADER-FILTER"
2416 >client-header filter</A
2439 > Don't block any header without understanding the consequences.
2447 >Example usage (section):</DT
2458 ># Block the non-existent "Privacy-Violation:" client header
2459 { +crunch-client-header{Privacy-Violation:} }
2476 NAME="CRUNCH-IF-NONE-MATCH"
2477 >8.5.7. crunch-if-none-match</A
2482 CLASS="VARIABLELIST"
2488 >Prevent yet another way to track the user's steps between sessions.</P
2496 >"If-None-Match:"</SPAN
2497 > HTTP client header.
2517 > Removing the <SPAN
2519 >"If-None-Match:"</SPAN
2520 > HTTP client header
2521 is useful for filter testing, where you want to force a real
2522 reload instead of getting status code <SPAN
2526 would cause the browser to use a cached copy of the page.
2529 > It is also useful to make sure the header isn't used as a cookie
2530 replacement (unlikely but possible).
2533 > Blocking the <SPAN
2535 >"If-None-Match:"</SPAN
2536 > header shouldn't cause any
2537 caching problems, as long as the <SPAN
2539 >"If-Modified-Since:"</SPAN
2541 isn't blocked or missing as well.
2544 > It is recommended to use this action together with
2548 HREF="actions-file.html#HIDE-IF-MODIFIED-SINCE"
2549 >hide-if-modified-since</A
2556 HREF="actions-file.html#OVERWRITE-LAST-MODIFIED"
2557 >overwrite-last-modified</A
2563 >Example usage (section):</DT
2574 ># Let the browser revalidate cached documents but don't
2575 # allow the server to use the revalidation headers for user tracking.
2576 {+hide-if-modified-since{-60} \
2577 +overwrite-last-modified{randomize} \
2578 +crunch-if-none-match}
2594 NAME="CRUNCH-INCOMING-COOKIES"
2595 >8.5.8. crunch-incoming-cookies</A
2600 CLASS="VARIABLELIST"
2606 > Prevent the web server from setting HTTP cookies on your system
2615 >"Set-Cookie:"</SPAN
2616 > HTTP headers from server replies.
2636 > This action is only concerned with <SPAN
2653 HREF="actions-file.html#CRUNCH-OUTGOING-COOKIES"
2654 >crunch-outgoing-cookies</A
2663 > to disable HTTP cookies completely.
2672 > to use this action in conjunction
2676 HREF="actions-file.html#SESSION-COOKIES-ONLY"
2677 >session-cookies-only</A
2680 since it would prevent the session cookies from being set. See also
2684 HREF="actions-file.html#FILTER-CONTENT-COOKIES"
2685 >filter-content-cookies</A
2702 >+crunch-incoming-cookies</PRE
2717 NAME="CRUNCH-SERVER-HEADER"
2718 >8.5.9. crunch-server-header</A
2723 CLASS="VARIABLELIST"
2729 >Remove a server header <SPAN
2732 > has no dedicated action for.</P
2738 > Deletes every header sent by the server that contains the string the user supplied as parameter.
2758 > This action allows you to block server headers for which no dedicated
2762 > action exists. <SPAN
2766 will remove every server header that contains the string you supplied as parameter.
2769 > Regular expressions are <SPAN
2776 use this action to block different headers in the same request, unless
2777 they contain the same string.
2782 >crunch-server-header</TT
2783 > is only meant for quick tests.
2784 If you have to block several different headers, or only want to modify
2785 parts of them, you should use a custom
2789 HREF="actions-file.html#SERVER-HEADER-FILTER"
2790 >server-header filter</A
2813 > Don't block any header without understanding the consequences.
2821 >Example usage (section):</DT
2832 ># Crunch server headers that try to prevent caching
2833 { +crunch-server-header{no-cache} }
2849 NAME="CRUNCH-OUTGOING-COOKIES"
2850 >8.5.10. crunch-outgoing-cookies</A
2855 CLASS="VARIABLELIST"
2861 > Prevent the web server from reading any HTTP cookies from your system
2871 > HTTP headers from client requests.
2891 > This action is only concerned with <SPAN
2908 HREF="actions-file.html#CRUNCH-INCOMING-COOKIES"
2909 >crunch-incoming-cookies</A
2918 > to disable HTTP cookies completely.
2927 > to use this action in conjunction
2931 HREF="actions-file.html#SESSION-COOKIES-ONLY"
2932 >session-cookies-only</A
2935 since it would prevent the session cookies from being read.
2950 >+crunch-outgoing-cookies</PRE
2965 NAME="DEANIMATE-GIFS"
2966 >8.5.11. deanimate-gifs</A
2971 CLASS="VARIABLELIST"
2977 >Stop those annoying, distracting animated GIF images.</P
2983 > De-animate GIF animations, i.e. reduce them to their first or last image.
3009 > This will also shrink the images considerably (in bytes, not pixels!). If
3013 > is given, the first frame of the animation
3014 is used as the replacement. If <SPAN
3017 > is given, the last
3018 frame of the animation is used instead, which probably makes more sense for
3019 most banner animations, but also has the risk of not showing the entire
3020 last frame (if it is only a delta to an earlier frame).
3023 > You can safely use this action with patterns that will also match non-GIF
3024 objects, because no attempt will be made at anything that doesn't look like
3040 >+deanimate-gifs{last}</PRE
3055 NAME="DOWNGRADE-HTTP-VERSION"
3056 >8.5.12. downgrade-http-version</A
3061 CLASS="VARIABLELIST"
3067 >Work around (very rare) problems with HTTP/1.1</P
3073 > Downgrades HTTP/1.1 client requests and server replies to HTTP/1.0.
3093 > This is a left-over from the time when <SPAN
3097 didn't support important HTTP/1.1 features well. It is left here for the
3098 unlikely case that you experience HTTP/1.1 related problems with some server
3099 out there. Not all HTTP/1.1 features and requirements are supported yet,
3100 so there is a chance you might need this action.
3104 >Example usage (section):</DT
3115 >{+downgrade-http-version}
3116 problem-host.example.com</PRE
3131 NAME="FAST-REDIRECTS"
3132 >8.5.13. fast-redirects</A
3137 CLASS="VARIABLELIST"
3143 >Fool some click-tracking scripts and speed up indirect links.</P
3149 > Detects redirection URLs and redirects the browser without contacting
3150 the redirection server first.
3169 >"simple-check"</SPAN
3170 > to just search for the string <SPAN
3174 to detect redirection URLs.
3181 >"check-decoded-url"</SPAN
3182 > to decode URLs (if necessary) before searching
3183 for redirection URLs.
3193 Many sites, like yahoo.com, don't just link to other sites. Instead, they
3194 will link to some script on their own servers, giving the destination as a
3195 parameter, which will then redirect you to the final target. URLs
3196 resulting from this scheme typically look like:
3199 >"http://www.example.org/click-tracker.cgi?target=http%3a//www.example.net/"</SPAN
3203 > Sometimes, there are even multiple consecutive redirects encoded in the
3204 URL. These redirections via scripts make your web browsing more traceable,
3205 since the server from which you follow such a link can see where you go
3206 to. Apart from that, valuable bandwidth and time is wasted, while your
3207 browser asks the server for one redirect after the other. Plus, it feeds
3211 > This feature is currently not very smart and is scheduled for improvement.
3212 If it is enabled by default, you will have to create some exceptions to
3213 this action. It can lead to failures in several ways:
3216 > Not every URLs with other URLs as parameters is evil.
3217 Some sites offer a real service that requires this information to work.
3218 For example a validation service needs to know, which document to validate.
3222 > assumes that every URL parameter that
3223 looks like another URL is a redirection target, and will always redirect to
3224 the last one. Most of the time the assumption is correct, but if it isn't,
3225 the user gets redirected anyway.
3228 > Another failure occurs if the URL contains other parameters after the URL parameter.
3232 >"http://www.example.org/?redirect=http%3a//www.example.net/&foo=bar"</SPAN
3234 contains the redirection URL <SPAN
3236 >"http://www.example.net/"</SPAN
3238 followed by another parameter. <TT
3242 and will cause a redirect to <SPAN
3244 >"http://www.example.net/&foo=bar"</SPAN
3246 Depending on the target server configuration, the parameter will be silently ignored
3249 >"page not found"</SPAN
3250 > error. You can prevent this problem by
3254 HREF="actions-file.html#REDIRECT"
3258 to remove the last part of the URL, but it requires a little effort.
3261 > To detect a redirection URL, <TT
3265 looks for the string <SPAN
3268 >, either in plain text
3269 (invalid but often used) or encoded as <SPAN
3273 Some sites use their own URL encoding scheme, encrypt the address
3274 of the target server or replace it with a database id. In theses cases
3278 > is fooled and the request reaches the
3279 redirection server where it probably gets logged.
3294 > { +fast-redirects{simple-check} }
3297 { +fast-redirects{check-decoded-url} }
3298 another.example.com/testing</PRE
3319 CLASS="VARIABLELIST"
3325 >Get rid of HTML and JavaScript annoyances, banner advertisements (by size),
3326 do fun text replacements, add personalized effects, etc.</P
3332 > All instances of text-based type, most notably HTML and JavaScript, to which
3333 this action applies, can be filtered on-the-fly through the specified regular
3334 expression based substitutions. (Note: as of version 3.0.3 plain text documents
3335 are exempted from filtering, because web servers often use the
3339 > MIME type for all files whose type they don't know.)
3352 > The name of a content filter, as defined in the <A
3353 HREF="filter-file.html"
3356 Filters can be defined in one or more files as defined by the
3360 HREF="config.html#FILTERFILE"
3371 > is the collection of filters
3372 supplied by the developers. Locally defined filters should go
3373 in their own file, such as <TT
3379 > When used in its negative form,
3380 and without parameters, <SPAN
3386 > filtering is completely disabled.
3393 > For your convenience, there are a number of pre-defined filters available
3394 in the distribution filter file that you can use. See the examples below for
3398 > Filtering requires buffering the page content, which may appear to
3399 slow down page rendering since nothing is displayed until all content has
3400 passed the filters. (It does not really take longer, but seems that way
3401 since the page is not incrementally displayed.) This effect will be more
3402 noticeable on slower connections.
3407 >"Rolling your own"</SPAN
3409 filters requires a knowledge of
3411 HREF="http://en.wikipedia.org/wiki/Regular_expressions"
3420 HREF="http://en.wikipedia.org/wiki/Html"
3427 This is very powerful feature, and potentially very intrusive.
3428 Filters should be used with caution, and where an equivalent
3435 > The amount of data that can be filtered is limited to the
3439 HREF="config.html#BUFFER-LIMIT"
3443 option in the main <A
3447 default is 4096 KB (4 Megs). Once this limit is exceeded, the buffered
3448 data, and all pending data, is passed through unfiltered.
3451 > Inappropriate MIME types, such as zipped files, are not filtered at all.
3452 (Again, only text-based types except plain text). Encrypted SSL data
3453 (from HTTPS servers) cannot be filtered either, since this would violate
3454 the integrity of the secure transaction. In some situations it might
3455 be necessary to protect certain text, like source code, from filtering
3456 by defining appropriate <TT
3462 > Compressed content can't be filtered either, unless <SPAN
3466 is compiled with zlib support (requires at least <SPAN
3473 > will decompress the content before filtering
3477 > If you use a <SPAN
3480 > version without zlib support, but want filtering to work on
3481 as much documents as possible, even those that would normally be sent compressed,
3482 you must use the <TT
3485 HREF="actions-file.html#PREVENT-COMPRESSION"
3486 >prevent-compression</A
3489 action in conjunction with <TT
3495 > Content filtering can achieve some of the same effects as the
3499 HREF="actions-file.html#BLOCK"
3503 action, i.e. it can be used to block ads and banners. But the mechanism
3504 works quite differently. One effective use, is to block ad banners
3505 based on their size (see below), since many of these seem to be somewhat
3512 > with suggestions for new or
3513 improved filters is particularly welcome!
3516 > The below list has only the names and a one-line description of each
3517 predefined filter. There are <A
3518 HREF="filter-file.html#PREDEFINED-FILTERS"
3520 verbose explanations</A
3521 > of what these filters do in the <A
3522 HREF="filter-file.html"
3523 >filter file chapter</A
3528 >Example usage (with filters from the distribution <TT
3533 HREF="filter-file.html#PREDEFINED-FILTERS"
3534 >the Predefined Filters section</A
3536 more explanation on each:</DT
3540 NAME="FILTER-JS-ANNOYANCES"
3551 >+filter{js-annoyances} # Get rid of particularly annoying JavaScript abuse</PRE
3559 NAME="FILTER-JS-EVENTS"
3570 >+filter{js-events} # Kill all JS event bindings (Radically destructive! Only for extra nasty sites)</PRE
3578 NAME="FILTER-HTML-ANNOYANCES"
3589 >+filter{html-annoyances} # Get rid of particularly annoying HTML abuse</PRE
3597 NAME="FILTER-CONTENT-COOKIES"
3608 >+filter{content-cookies} # Kill cookies that come in the HTML or JS content</PRE
3616 NAME="FILTER-REFRESH-TAGS"
3627 >+filter{refresh-tags} # Kill automatic refresh tags (for dial-on-demand setups)</PRE
3635 NAME="FILTER-UNSOLICITED-POPUPS"
3646 >+filter{unsolicited-popups} # Disable only unsolicited pop-up windows. Useful if your browser lacks this ability.</PRE
3654 NAME="FILTER-ALL-POPUPS"
3665 >+filter{all-popups} # Kill all popups in JavaScript and HTML. Useful if your browser lacks this ability.</PRE
3673 NAME="FILTER-IMG-REORDER"
3684 >+filter{img-reorder} # Reorder attributes in <img> tags to make the banners-by-* filters more effective</PRE
3692 NAME="FILTER-BANNERS-BY-SIZE"
3703 >+filter{banners-by-size} # Kill banners by size</PRE
3711 NAME="FILTER-BANNERS-BY-LINK"
3722 >+filter{banners-by-link} # Kill banners by their links to known clicktrackers</PRE
3730 NAME="FILTER-WEBBUGS"
3741 >+filter{webbugs} # Squish WebBugs (1x1 invisible GIFs used for user tracking)</PRE
3749 NAME="FILTER-TINY-TEXTFORMS"
3760 >+filter{tiny-textforms} # Extend those tiny textareas up to 40x80 and kill the hard wrap</PRE
3768 NAME="FILTER-JUMPING-WINDOWS"
3779 >+filter{jumping-windows} # Prevent windows from resizing and moving themselves</PRE
3787 NAME="FILTER-FRAMESET-BORDERS"
3798 >+filter{frameset-borders} # Give frames a border and make them resizeable</PRE
3806 NAME="FILTER-DEMORONIZER"
3817 >+filter{demoronizer} # Fix MS's non-standard use of standard charsets</PRE
3825 NAME="FILTER-SHOCKWAVE-FLASH"
3836 >+filter{shockwave-flash} # Kill embedded Shockwave Flash objects</PRE
3844 NAME="FILTER-QUICKTIME-KIOSKMODE"
3855 >+filter{quicktime-kioskmode} # Make Quicktime movies savable</PRE
3874 >+filter{fun} # Text replacements for subversive browsing fun!</PRE
3882 NAME="FILTER-CRUDE-PARENTAL"
3893 >+filter{crude-parental} # Crude parental filtering (demo only)</PRE
3901 NAME="FILTER-IE-EXPLOITS"
3912 >+filter{ie-exploits} # Disable a known Internet Explorer bug exploits</PRE
3920 NAME="FILTER-SITE-SPECIFICS"
3931 >+filter{site-specifics} # Custom filters for specific site related problems</PRE
3939 NAME="FILTER-GOOGLE"
3950 >+filter{google} # Removes text ads and other Google specific improvements</PRE
3969 >+filter{yahoo} # Removes text ads and other Yahoo specific improvements</PRE
3988 >+filter{msn} # Removes text ads and other MSN specific improvements</PRE
3996 NAME="FILTER-BLOGSPOT"
4007 >+filter{blogspot} # Cleans up Blogspot blogs</PRE
4015 NAME="FILTER-NO-PING"
4026 >+filter{no-ping} # Removes non-standard ping attributes from anchor and area tags</PRE
4041 NAME="FORCE-TEXT-MODE"
4042 >8.5.15. force-text-mode</A
4047 CLASS="VARIABLELIST"
4056 > to treat a document as if it was in some kind of <SPAN
4068 > Declares a document as text, even if the <SPAN
4070 >"Content-Type:"</SPAN
4071 > isn't detected as such.
4094 HREF="actions-file.html#FILTER"
4101 > tries to only filter files that are
4102 in some kind of text format. The same restrictions apply to
4106 HREF="actions-file.html#CONTENT-TYPE-OVERWRITE"
4107 >content-type-overwrite</A
4112 >force-text-mode</TT
4113 > declares a document as text,
4114 without looking at the <SPAN
4116 >"Content-Type:"</SPAN
4138 > Think twice before activating this action. Filtering binary data
4139 with regular expressions can cause file damage.
4174 NAME="FORWARD-OVERRIDE"
4175 >8.5.16. forward-override</A
4180 CLASS="VARIABLELIST"
4186 >Change the forwarding settings based on User-Agent or request origin</P
4192 > Overrules the forward directives in the configuration file.
4212 > to use a direct connection without any additional proxies.</P
4218 >"forward 127.0.0.1:8123"</SPAN
4219 > to use the HTTP proxy listening at 127.0.0.1 port 8123.
4226 >"forward-socks4a 127.0.0.1:9050 ."</SPAN
4227 > to use the socks4a proxy listening at
4228 127.0.0.1 port 9050. Replace <SPAN
4230 >"forward-socks4a"</SPAN
4233 >"forward-socks4"</SPAN
4235 to use a socks4 connection (with local DNS resolution) instead.
4242 >"forward-socks4a 127.0.0.1:9050 proxy.example.org:8000"</SPAN
4243 > to use the socks4a proxy
4244 listening at 127.0.0.1 port 9050 to reach the HTTP proxy listening at proxy.example.org port 8000.
4247 >"forward-socks4a"</SPAN
4250 >"forward-socks4"</SPAN
4251 > to use a socks4 connection
4252 (with local DNS resolution) instead.
4261 > This action takes parameters similar to the
4263 HREF="config.html#FORWARDING"
4265 > directives in the configuration
4266 file, but without the URL pattern. It can be used as replacement, but normally it's only
4267 used in cases where matching based on the request URL isn't sufficient.
4288 > Please read the description for the <A
4289 HREF="config.html#FORWARDING"
4292 using this action. Forwarding to the wrong people will reduce your privacy and increase the
4293 chances of man-in-the-middle attacks.
4296 > If the ports are missing or invalid, default values will be used. This might change
4297 in the future and you shouldn't rely on it. Otherwise incorrect syntax causes Privoxy
4302 HREF="http://config.privoxy.org/show-url-info"
4304 >show-url-info CGI page</A
4306 to verify that your forward settings do what you thought the do.
4325 ># Always use direct connections for requests previously tagged as
4328 >"User-Agent: fetch libfetch/2.0"</SPAN
4330 # resuming downloads continues to work.
4331 # This way you can continue to use Tor for your normal browsing,
4332 # without overloading the Tor network with your FreeBSD ports updates
4333 # or downloads of bigger files like ISOs.
4334 {+forward-override{forward .} \
4335 -hide-if-modified-since \
4336 -overwrite-last-modified \
4338 TAG:^User-Agent: fetch libfetch/2\.0$
4354 NAME="HANDLE-AS-EMPTY-DOCUMENT"
4355 >8.5.17. handle-as-empty-document</A
4360 CLASS="VARIABLELIST"
4366 >Mark URLs that should be replaced by empty documents <SPAN
4370 >if they get blocked</I
4378 > This action alone doesn't do anything noticeable. It just marks URLs.
4382 HREF="actions-file.html#BLOCK"
4392 the presence or absence of this mark decides whether an HTML <SPAN
4396 page, or an empty document will be sent to the client as a substitute for the blocked content.
4403 > document isn't literally empty, but actually contains a single space.
4423 > Some browsers complain about syntax errors if JavaScript documents
4424 are blocked with <SPAN
4428 default HTML page; this option can be used to silence them.
4429 And of course this action can also be used to eliminate the <SPAN
4433 BLOCKED message in frames.
4436 > The content type for the empty document can be specified with
4440 HREF="actions-file.html#CONTENT-TYPE-OVERWRITE"
4441 >content-type-overwrite{}</A
4444 but usually this isn't necessary.
4459 ># Block all documents on example.org that end with ".js",
4460 # but send an empty document instead of the usual HTML message.
4461 {+block +handle-as-empty-document}
4478 NAME="HANDLE-AS-IMAGE"
4479 >8.5.18. handle-as-image</A
4484 CLASS="VARIABLELIST"
4490 >Mark URLs as belonging to images (so they'll be replaced by images <SPAN
4494 >if they do get blocked</I
4496 >, rather than HTML pages)</P
4502 > This action alone doesn't do anything noticeable. It just marks URLs as images.
4506 HREF="actions-file.html#BLOCK"
4516 the presence or absence of this mark decides whether an HTML <SPAN
4520 page, or a replacement image (as determined by the <TT
4523 HREF="actions-file.html#SET-IMAGE-BLOCKER"
4524 >set-image-blocker</A
4526 > action) will be sent to the
4527 client as a substitute for the blocked content.
4547 > The below generic example section is actually part of <TT
4551 It marks all URLs with well-known image file name extensions as images and should
4555 > Users will probably only want to use the handle-as-image action in conjunction with
4559 HREF="actions-file.html#BLOCK"
4562 >, to block sources of banners, whose URLs don't
4563 reflect the file type, like in the second example section.
4566 > Note that you cannot treat HTML pages as images in most cases. For instance, (in-line) ad
4567 frames require an HTML page to be sent, or they won't display properly.
4570 >handle-as-image</TT
4571 > in this situation will not replace the
4572 ad frame with an image, but lead to error messages.
4576 >Example usage (sections):</DT
4587 ># Generic image extensions:
4590 /.*\.(gif|jpg|jpeg|png|bmp|ico)$
4592 # These don't look like images, but they're banners and should be
4593 # blocked as images:
4595 {+block +handle-as-image}
4596 some.nasty-banner-server.com/junk.cgi\?output=trash
4598 # Banner source! Who cares if they also have non-image content?
4599 ad.doubleclick.net </PRE
4614 NAME="HIDE-ACCEPT-LANGUAGE"
4615 >8.5.19. hide-accept-language</A
4620 CLASS="VARIABLELIST"
4626 >Pretend to use different language settings.</P
4632 > Deletes or replaces the <SPAN
4634 >"Accept-Language:"</SPAN
4635 > HTTP header in client requests.
4651 >, or any user defined value.
4658 > Faking the browser's language settings can be useful to make a
4659 foreign User-Agent set with
4663 HREF="actions-file.html#HIDE-USER-AGENT"
4670 > However some sites with content in different languages check the
4673 >"Accept-Language:"</SPAN
4674 > to decide which one to take by default.
4675 Sometimes it isn't possible to later switch to another language without
4678 >"Accept-Language:"</SPAN
4682 > Therefore it's a good idea to either only change the
4685 >"Accept-Language:"</SPAN
4686 > header to languages you understand,
4687 or to languages that aren't wide spread.
4690 > Before setting the <SPAN
4692 >"Accept-Language:"</SPAN
4694 to a rare language, you should consider that it helps to
4695 make your requests unique and thus easier to trace.
4696 If you don't plan to change this header frequently,
4697 you should stick to a common language.
4701 >Example usage (section):</DT
4712 ># Pretend to use Canadian language settings.
4713 {+hide-accept-language{en-ca} \
4714 +hide-user-agent{Mozilla/5.0 (X11; U; OpenBSD i386; en-CA; rv:1.8.0.4) Gecko/20060628 Firefox/1.5.0.4} \
4731 NAME="HIDE-CONTENT-DISPOSITION"
4732 >8.5.20. hide-content-disposition</A
4737 CLASS="VARIABLELIST"
4743 >Prevent download menus for content you prefer to view inside the browser.</P
4749 > Deletes or replaces the <SPAN
4751 >"Content-Disposition:"</SPAN
4752 > HTTP header set by some servers.
4768 >, or any user defined value.
4775 > Some servers set the <SPAN
4777 >"Content-Disposition:"</SPAN
4779 documents they assume you want to save locally before viewing them.
4782 >"Content-Disposition:"</SPAN
4783 > header contains the file name
4784 the browser is supposed to use by default.
4787 > In most browsers that understand this header, it makes it impossible to
4794 > the document, without downloading it first,
4795 even if it's just a simple text file or an image.
4798 > Removing the <SPAN
4800 >"Content-Disposition:"</SPAN
4802 to prevent this annoyance, but some browsers additionally check the
4805 >"Content-Type:"</SPAN
4806 > header, before they decide if they can
4807 display a document without saving it first. In these cases, you have
4808 to change this header as well, before the browser stops displaying
4812 > It is also possible to change the server's file name suggestion
4813 to another one, but in most cases it isn't worth the time to set
4817 > This action will probably be removed in the future,
4818 use server-header filters instead.
4833 ># Disarm the download link in Sourceforge's patch tracker
4835 +content-type-overwrite{text/plain}\
4836 +hide-content-disposition{block} }
4837 .sourceforge.net/tracker/download\.php</PRE
4852 NAME="HIDE-IF-MODIFIED-SINCE"
4853 >8.5.21. hide-if-modified-since</A
4858 CLASS="VARIABLELIST"
4864 >Prevent yet another way to track the user's steps between sessions.</P
4872 >"If-Modified-Since:"</SPAN
4873 > HTTP client header or modifies its value.
4889 >, or a user defined value that specifies a range of hours.
4896 > Removing this header is useful for filter testing, where you want to force a real
4897 reload instead of getting status code <SPAN
4900 >, which would cause the
4901 browser to use a cached copy of the page.
4904 > Instead of removing the header, <TT
4906 >hide-if-modified-since</TT
4908 also add or subtract a random amount of time to/from the header's value.
4909 You specify a range of minutes where the random factor should be chosen from and
4913 > does the rest. A negative value means
4914 subtracting, a positive value adding.
4917 > Randomizing the value of the <SPAN
4919 >"If-Modified-Since:"</SPAN
4921 sure it isn't used as a cookie replacement, but you will run into
4922 caching problems if the random range is too high.
4925 > It is a good idea to only use a small negative value and let
4929 HREF="actions-file.html#OVERWRITE-LAST-MODIFIED"
4930 >overwrite-last-modified</A
4933 handle the greater changes.
4936 > It is also recommended to use this action together with
4940 HREF="actions-file.html#CRUNCH-IF-NONE-MATCH"
4941 >crunch-if-none-match</A
4947 >Example usage (section):</DT
4958 ># Let the browser revalidate without being tracked across sessions
4959 { +hide-if-modified-since{-60} \
4960 +overwrite-last-modified{randomize} \
4961 +crunch-if-none-match}
4977 NAME="HIDE-FORWARDED-FOR-HEADERS"
4978 >8.5.22. hide-forwarded-for-headers</A
4983 CLASS="VARIABLELIST"
4989 >Improve privacy by not embedding the source of the request in the HTTP headers.</P
4995 > Deletes any existing <SPAN
4997 >"X-Forwarded-for:"</SPAN
4998 > HTTP header from client requests,
4999 and prevents adding a new one.
5019 > It is safe to leave this on.
5034 >+hide-forwarded-for-headers</PRE
5049 NAME="HIDE-FROM-HEADER"
5050 >8.5.23. hide-from-header</A
5055 CLASS="VARIABLELIST"
5061 >Keep your (old and ill) browser from telling web servers your email address</P
5067 > Deletes any existing <SPAN
5070 > HTTP header, or replaces it with the
5087 >, or any user defined value.
5097 > will completely remove the header
5098 (not to be confused with the <TT
5101 HREF="actions-file.html#BLOCK"
5108 > Alternately, you can specify any value you prefer to be sent to the web
5109 server. If you do, it is a matter of fairness not to use any address that
5110 is actually used by a real person.
5113 > This action is rarely needed, as modern web browsers don't send
5132 >+hide-from-header{block}</PRE
5145 >+hide-from-header{spam-me-senseless@sittingduck.example.com}</PRE
5160 NAME="HIDE-REFERRER"
5161 >8.5.24. hide-referrer</A
5169 CLASS="VARIABLELIST"
5175 >Conceal which link you followed to get to a particular site</P
5184 > (sic) HTTP header from the client request,
5185 or replaces it with a forged one.
5204 >"conditional-block"</SPAN
5205 > to delete the header completely if the host has changed.</P
5212 > to delete the header unconditionally.</P
5219 > to pretend to be coming from the homepage of the server we are talking to.</P
5223 >Any other string to set a user defined referrer.</P
5233 >conditional-block</TT
5234 > is the only parameter,
5235 that isn't easily detected in the server's log file. If it blocks the
5236 referrer, the request will look like the visitor used a bookmark or
5237 typed in the address directly.
5240 > Leaving the referrer unmodified for requests on the same host
5241 allows the server owner to see the visitor's <SPAN
5245 but in most cases she could also get that information by comparing
5246 other parts of the log file: for example the User-Agent if it isn't
5247 a very common one, or the user's IP address if it doesn't change between
5251 > Always blocking the referrer, or using a custom one, can lead to
5252 failures on servers that check the referrer before they answer any
5253 requests, in an attempt to prevent their valuable content from being
5254 embedded or linked to elsewhere.
5259 >conditional-block</TT
5264 will work with referrer checks, as long as content and valid referring page
5265 are on the same host. Most of the time that's the case.
5272 > is an alternate spelling of
5276 > and the two can be can be freely
5277 substituted with each other. (<SPAN
5281 correct English spelling, however the HTTP specification has a bug - it
5282 requires it to be spelled as <SPAN
5300 >+hide-referrer{forge}</PRE
5313 >+hide-referrer{http://www.yahoo.com/}</PRE
5328 NAME="HIDE-USER-AGENT"
5329 >8.5.25. hide-user-agent</A
5334 CLASS="VARIABLELIST"
5340 >Conceal your type of browser and client operating system</P
5346 > Replaces the value of the <SPAN
5348 >"User-Agent:"</SPAN
5350 in client requests with the specified value.
5363 > Any user-defined string.
5388 > This can lead to problems on web sites that depend on looking at this header in
5389 order to customize their content for different browsers (which, by the
5396 > the right thing to do: good web sites
5397 work browser-independently).
5405 > Using this action in multi-user setups or wherever different types of
5406 browsers will access the same <SPAN
5416 >. In single-user, single-browser
5417 setups, you might use it to delete your OS version information from
5418 the headers, because it is an invitation to exploit known bugs for your
5419 OS. It is also occasionally useful to forge this in order to access
5420 sites that won't let you in otherwise (though there may be a good
5421 reason in some cases). Example of this: some MSN sites will not
5425 > enter, yet forging to a
5429 > user-agent works just fine.
5430 (Must be just a silly MS goof, I'm sure :-).
5433 > More information on known user-agent strings can be found at
5435 HREF="http://www.user-agents.org/"
5437 >http://www.user-agents.org/</A
5441 HREF="http://en.wikipedia.org/wiki/User_agent"
5443 >http://en.wikipedia.org/wiki/User_agent</A
5459 >+hide-user-agent{Netscape 6.1 (X11; I; Linux 2.4.18 i686)}</PRE
5474 NAME="INSPECT-JPEGS"
5475 >8.5.26. inspect-jpegs</A
5480 CLASS="VARIABLELIST"
5486 >To protect against the MS buffer over-run in JPEG processing</P
5492 > Protect against a known exploit
5512 > See Microsoft Security Bulletin MS04-028. JPEG images are one of the most
5513 common image types found across the Internet. The exploit as described can
5514 allow execution of code on the target system, giving an attacker access
5515 to the system in question by merely planting an altered JPEG image, which
5516 would have no obvious indications of what lurks inside. This action
5517 prevents this exploit.
5520 > Note that the described exploit is only one of many,
5521 using this action does not mean that you no longer
5522 have to patch the client.
5537 >+inspect-jpegs</PRE
5552 >8.5.27. kill-popups<A
5560 CLASS="VARIABLELIST"
5566 >Eliminate those annoying pop-up windows (deprecated)</P
5572 > While loading the document, replace JavaScript code that opens
5573 pop-up windows with (syntactically neutral) dummy code on the fly.
5593 > This action is basically a built-in, hardwired special-purpose filter
5594 action, but there are important differences: For <TT
5598 the document need not be buffered, so it can be incrementally rendered while
5599 downloading. But <TT
5602 > doesn't catch as many pop-ups as
5606 HREF="actions-file.html#FILTER-ALL-POPUPS"
5615 does and is not as smart as <TT
5618 HREF="actions-file.html#FILTER-UNSOLICITED-POPUPS"
5622 >unsolicited-popups</I
5630 > Think of it as a fast and efficient replacement for a filter that you
5631 can use if you don't want any filtering at all. Note that it doesn't make
5632 sense to combine it with any <TT
5635 HREF="actions-file.html#FILTER"
5639 since as soon as one <TT
5642 HREF="actions-file.html#FILTER"
5646 the whole document needs to be buffered anyway, which destroys the advantage of
5650 > action over its filter equivalent.
5653 > Killing all pop-ups unconditionally is problematic. Many shops and banks rely on
5654 pop-ups to display forms, shopping carts etc, and the <TT
5657 HREF="actions-file.html#FILTER-UNSOLICITED-POPUPS"
5661 >unsolicited-popups</I
5666 > does a better job of catching only the unwanted ones.
5669 > If the only kind of pop-ups that you want to kill are exit consoles (those
5676 > windows that appear when you close an other
5677 one), you might want to use
5681 HREF="actions-file.html#FILTER"
5693 > This action is most appropriate for browsers that don't have any controls
5694 for unwanted pop-ups. Not recommended for general usage.
5723 NAME="LIMIT-CONNECT"
5724 >8.5.28. limit-connect</A
5729 CLASS="VARIABLELIST"
5735 >Prevent abuse of <SPAN
5738 > as a TCP proxy relay or disable SSL for untrusted sites</P
5744 > Specifies to which ports HTTP CONNECT requests are allowable.
5757 > A comma-separated list of ports or port ranges (the latter using dashes, with the minimum
5758 defaulting to 0 and the maximum to 65K).
5765 > By default, i.e. if no <TT
5772 > only allows HTTP CONNECT
5773 requests to port 443 (the standard, secure HTTPS port). Use
5777 > if more fine-grained control is desired
5778 for some or all destinations.
5781 > The CONNECT methods exists in HTTP to allow access to secure websites
5785 > URLs) through proxies. It works very simply:
5786 the proxy connects to the server on the specified port, and then
5787 short-circuits its connections to the client and to the remote server.
5788 This can be a big security hole, since CONNECT-enabled proxies can be
5789 abused as TCP relays very easily.
5795 > relays HTTPS traffic without seeing
5796 the decoded content. Websites can leverage this limitation to circumvent <SPAN
5800 filters. By specifying an invalid port range you can disable HTTPS entirely.
5801 If you plan to disable SSL by default, consider enabling
5805 HREF="actions-file.html#TREAT-FORBIDDEN-CONNECTS-LIKE-BLOCKS"
5806 >treat-forbidden-connects-like-blocks</A
5809 as well, to be able to quickly create exceptions.
5813 >Example usages:</DT
5824 >+limit-connect{443} # This is the default and need not be specified.
5825 +limit-connect{80,443} # Ports 80 and 443 are OK.
5826 +limit-connect{-3, 7, 20-100, 500-} # Ports less than 3, 7, 20 to 100 and above 500 are OK.
5827 +limit-connect{-} # All ports are OK
5828 +limit-connect{,} # No HTTPS/SSL traffic is allowed</PRE
5843 NAME="PREVENT-COMPRESSION"
5844 >8.5.29. prevent-compression</A
5849 CLASS="VARIABLELIST"
5855 > Ensure that servers send the content uncompressed, so it can be
5859 HREF="actions-file.html#FILTER"
5869 > Removes the Accept-Encoding header which can be used to ask for compressed transfer.
5889 > More and more websites send their content compressed by default, which
5890 is generally a good idea and saves bandwidth. But the <TT
5893 HREF="actions-file.html#FILTER"
5899 HREF="actions-file.html#DEANIMATE-GIFS"
5906 HREF="actions-file.html#KILL-POPUPS"
5910 access to the uncompressed data.
5913 > When compiled with zlib support (available since <SPAN
5916 > 3.0.7), content that should be
5917 filtered is decompressed on-the-fly and you don't have to worry about this action.
5918 If you are using an older <SPAN
5921 > version, or one that hasn't been compiled with zlib
5922 support, this action can be used to convince the server to send the content uncompressed.
5925 > Most text-based instances compress very well, the size is seldom decreased by less than 50%,
5926 for markup-heavy instances like news feeds saving more than 90% of the original size isn't
5930 > Not using compression will therefore slow down the transfer, and you should only
5931 enable this action if you really need it. As of <SPAN
5934 > 3.0.7 it's disabled in all
5935 predefined action settings.
5938 > Note that some (rare) ill-configured sites don't handle requests for uncompressed
5939 documents correctly. Broken PHP applications tend to send an empty document body,
5940 some IIS versions only send the beginning of the content. If you enable
5943 >prevent-compression</TT
5944 > per default, you might want to add
5945 exceptions for those sites. See the example for how to do that.
5949 >Example usage (sections):</DT
5960 ># Selectively turn off compression, and enable a filter
5962 { +filter{tiny-textforms} +prevent-compression }
5963 # Match only these sites
5968 # Or instead, we could set a universal default:
5970 { +prevent-compression }
5973 # Then maybe make exceptions for broken sites:
5975 { -prevent-compression }
5991 NAME="OVERWRITE-LAST-MODIFIED"
5992 >8.5.30. overwrite-last-modified</A
5997 CLASS="VARIABLELIST"
6003 >Prevent yet another way to track the user's steps between sessions.</P
6011 >"Last-Modified:"</SPAN
6012 > HTTP server header or modifies its value.
6025 > One of the keywords: <SPAN
6030 >"reset-to-request-time"</SPAN
6042 > Removing the <SPAN
6044 >"Last-Modified:"</SPAN
6045 > header is useful for filter
6046 testing, where you want to force a real reload instead of getting status
6050 >, which would cause the browser to reuse the old
6051 version of the page.
6057 > option overwrites the value of the
6060 >"Last-Modified:"</SPAN
6061 > header with a randomly chosen time
6062 between the original value and the current time. In theory the server
6063 could send each document with a different <SPAN
6065 >"Last-Modified:"</SPAN
6067 header to track visits without using cookies. <SPAN
6071 makes it impossible and the browser can still revalidate cached documents.
6076 >"reset-to-request-time"</SPAN
6077 > overwrites the value of the
6080 >"Last-Modified:"</SPAN
6081 > header with the current time. You could use
6082 this option together with
6086 HREF="actions-file.html#HIDE-IF-MODIFIED-SINCE"
6087 >hided-if-modified-since</A
6090 to further customize your random range.
6093 > The preferred parameter here is <SPAN
6097 to use, as long as the time settings are more or less correct.
6098 If the server sets the <SPAN
6100 >"Last-Modified:"</SPAN
6101 > header to the time
6102 of the request, the random range becomes zero and the value stays the same.
6103 Therefore you should later randomize it a second time with
6107 HREF="actions-file.html#HIDE-IF-MODIFIED-SINCE"
6108 >hided-if-modified-since</A
6114 > It is also recommended to use this action together with
6118 HREF="actions-file.html#CRUNCH-IF-NONE-MATCH"
6119 >crunch-if-none-match</A
6136 ># Let the browser revalidate without being tracked across sessions
6137 { +hide-if-modified-since{-60} \
6138 +overwrite-last-modified{randomize} \
6139 +crunch-if-none-match}
6156 >8.5.31. redirect</A
6161 CLASS="VARIABLELIST"
6167 > Redirect requests to other sites.
6174 > Convinces the browser that the requested document has been moved
6175 to another location and the browser should get it from there.
6188 > An absolute URL or a single pcrs command.
6195 > Requests to which this action applies are answered with a
6196 HTTP redirect to URLs of your choosing. The new URL is
6197 either provided as parameter, or derived by applying a
6198 single pcrs command to the original URL.
6201 > This action will be ignored if you use it together with
6205 HREF="actions-file.html#BLOCK"
6209 It can be combined with
6213 HREF="actions-file.html#FAST-REDIRECTS"
6214 >fast-redirects{check-decoded-url}</A
6217 to redirect to a decoded version of a rewritten URL.
6220 > Use this action carefully, make sure not to create redirection loops
6221 and be aware that using your own redirects might make it
6222 possible to fingerprint your requests.
6226 >Example usages:</DT
6237 ># Replace example.com's style sheet with another one
6238 { +redirect{http://localhost/css-replacements/example.com.css} }
6239 example.com/stylesheet\.css
6241 # Create a short, easy to remember nickname for a favorite site
6242 # (relies on the browser accept and forward invalid URLs to <SPAN
6246 { +redirect{http://www.privoxy.org/user-manual/actions-file.html} }
6249 # Always use the expanded view for Undeadly.org articles
6250 # (Note the $ at the end of the URL pattern to make sure
6251 # the request for the rewritten URL isn't redirected as well)
6252 {+redirect{s@$@&mode=expanded@}}
6253 undeadly.org/cgi\?action=article&sid=\d*$</PRE
6268 NAME="SEND-VANILLA-WAFER"
6269 >8.5.32. send-vanilla-wafer</A
6274 CLASS="VARIABLELIST"
6280 > Feed log analysis scripts with useless data.
6287 > Sends a cookie with each request stating that you do not accept any copyright
6288 on cookies sent to you, and asking the site operator not to track you.
6308 > The vanilla wafer is a (relatively) unique header and could conceivably be used to track you.
6311 > This action is rarely used and not enabled in the default configuration.
6326 >+send-vanilla-wafer</PRE
6342 >8.5.33. send-wafer</A
6347 CLASS="VARIABLELIST"
6353 > Send custom cookies or feed log analysis scripts with even more useless data.
6360 > Sends a custom, user-defined cookie with each request.
6373 > A string of the form <SPAN
6393 > Being multi-valued, multiple instances of this action can apply to the same request,
6394 resulting in multiple cookies being sent.
6397 > This action is rarely used and not enabled in the default configuration.
6401 >Example usage (section):</DT
6412 >{+send-wafer{UsingPrivoxy=true}}
6413 my-internal-testing-server.void</PRE
6428 NAME="SERVER-HEADER-FILTER"
6429 >8.5.34. server-header-filter</A
6434 CLASS="VARIABLELIST"
6440 > Rewrite or remove single server headers.
6447 > All server headers to which this action applies are filtered on-the-fly
6448 through the specified regular expression based substitutions.
6461 > The name of a server-header filter, as defined in one of the
6463 HREF="filter-file.html"
6472 > Server-header filters are applied to each header on its own, not to
6473 all at once. This makes it easier to diagnose problems, but on the downside
6474 you can't write filters that only change header x if header y's value is z.
6475 You can do that by using tags though.
6478 > Server-header filters are executed after the other header actions have finished
6479 and use their output as input.
6482 > Please refer to the <A
6483 HREF="filter-file.html"
6484 >filter file chapter</A
6486 to learn which server-header filters are available by default, and how to
6491 >Example usage (section):</DT
6502 >{+server-header-filter{html-to-xml}}
6503 example.org/xml-instance-that-is-delivered-as-html
6505 {+server-header-filter{xml-to-html}}
6506 example.org/instance-that-is-delivered-as-xml-but-is-not
6522 NAME="SERVER-HEADER-TAGGER"
6523 >8.5.35. server-header-tagger</A
6528 CLASS="VARIABLELIST"
6534 > Disable or disable filters based on the Content-Type header.
6541 > Server headers to which this action applies are filtered on-the-fly through
6542 the specified regular expression based substitutions, the result is used as
6556 > The name of a server-header tagger, as defined in one of the
6558 HREF="filter-file.html"
6567 > Server-header taggers are applied to each header on its own,
6568 and as the header isn't modified, each tagger <SPAN
6575 > Server-header taggers are executed before all other header actions
6576 that modify server headers. Their tags can be used to control
6577 all of the other server-header actions, the content filters
6578 and the crunch actions (<A
6579 HREF="actions-file.html#REDIRECT"
6583 HREF="actions-file.html#BLOCK"
6588 > Obviously crunching based on tags created by server-header taggers
6589 doesn't prevent the request from showing up in the server's log file.
6593 >Example usage (section):</DT
6604 ># Tag every request with the declared content type
6605 {+server-header-tagger{content-type}}
6622 NAME="SESSION-COOKIES-ONLY"
6623 >8.5.36. session-cookies-only</A
6628 CLASS="VARIABLELIST"
6634 > Allow only temporary <SPAN
6637 > cookies (for the current
6638 browser session <SPAN
6656 >"Set-Cookie:"</SPAN
6658 server headers. Most browsers will not store such cookies permanently and
6659 forget them in between sessions.
6679 > This is less strict than <TT
6682 HREF="actions-file.html#CRUNCH-INCOMING-COOKIES"
6683 >crunch-incoming-cookies</A
6689 HREF="actions-file.html#CRUNCH-OUTGOING-COOKIES"
6690 >crunch-outgoing-cookies</A
6692 > and allows you to browse
6693 websites that insist or rely on setting cookies, without compromising your privacy too badly.
6696 > Most browsers will not permanently store cookies that have been processed by
6699 >session-cookies-only</TT
6700 > and will forget about them between sessions.
6701 This makes profiling cookies useless, but won't break sites which require cookies so
6702 that you can log in for transactions. This is generally turned on for all
6703 sites, and is the recommended setting.
6714 >session-cookies-only</TT
6719 HREF="actions-file.html#CRUNCH-INCOMING-COOKIES"
6720 >crunch-incoming-cookies</A
6726 HREF="actions-file.html#CRUNCH-OUTGOING-COOKIES"
6727 >crunch-outgoing-cookies</A
6729 >. If you do, cookies
6730 will be plainly killed.
6733 > Note that it is up to the browser how it handles such cookies without an <SPAN
6737 field. If you use an exotic browser, you might want to try it out to be sure.
6740 > This setting also has no effect on cookies that may have been stored
6741 previously by the browser before starting <SPAN
6745 These would have to be removed manually.
6753 HREF="actions-file.html#FILTER-CONTENT-COOKIES"
6754 >content-cookies filter</A
6756 to block some types of cookies. Content cookies are not effected by
6759 >session-cookies-only</TT
6775 >+session-cookies-only</PRE
6790 NAME="SET-IMAGE-BLOCKER"
6791 >8.5.37. set-image-blocker</A
6796 CLASS="VARIABLELIST"
6802 >Choose the replacement for blocked images</P
6808 > This action alone doesn't do anything noticeable. If <SPAN
6818 HREF="actions-file.html#BLOCK"
6830 HREF="actions-file.html#HANDLE-AS-IMAGE"
6840 apply, i.e. if the request is to be blocked as an image,
6847 > the parameter of this action decides what will be
6848 sent as a replacement.
6868 > to send a built-in checkerboard pattern image. The image is visually
6869 decent, scales very well, and makes it obvious where banners were busted.
6877 > to send a built-in transparent image. This makes banners disappear
6878 completely, but makes it hard to detect where <SPAN
6882 images on a given page and complicates troubleshooting if <SPAN
6886 has blocked innocent images, like navigation icons.
6900 send a redirect to <TT
6906 to any image anywhere, even in your local filesystem via <SPAN
6910 (But note that not all browsers support redirecting to a local file system).
6913 > A good application of redirects is to use special <SPAN
6917 URLs, which send the built-in images, as <TT
6923 This has the same visual effect as specifying <SPAN
6930 the first place, but enables your browser to cache the replacement image, instead of requesting
6931 it over and over again.
6940 > The URLs for the built-in images are <SPAN
6942 >"http://config.privoxy.org/send-banner?type=<TT
6963 > There is a third (advanced) type, called <SPAN
6975 >set-image-blocker</TT
6976 >, but meant for use from <A
6977 HREF="filter-file.html"
6980 Auto will select the type of image that would have applied to the referring page, had it been an image.
6998 >+set-image-blocker{pattern}</PRE
7005 > Redirect to the BSD daemon:
7016 >+set-image-blocker{http://www.freebsd.org/gifs/dae_up3.gif}</PRE
7023 > Redirect to the built-in pattern for better caching:
7034 >+set-image-blocker{http://config.privoxy.org/send-banner?type=pattern}</PRE
7049 NAME="TREAT-FORBIDDEN-CONNECTS-LIKE-BLOCKS"
7050 >8.5.38. treat-forbidden-connects-like-blocks</A
7055 CLASS="VARIABLELIST"
7061 >Block forbidden connects with an easy to find error message.</P
7067 > If this action is enabled, <SPAN
7071 makes a difference between forbidden connects and ordinary blocks.
7095 HREF="actions-file.html#LIMIT-CONNECT"
7101 with a short error message inside the headers. If the browser doesn't display
7102 headers (most don't), you just see an empty page.
7105 > With this action enabled, <SPAN
7109 the message that is used for ordinary blocks instead. If you decide
7110 to make an exception for the page in question, you can do so by
7120 > requests the clients tell
7124 > which host they are interested
7125 in, but not which document they plan to get later. As a result, the
7128 >"Go there anyway"</SPAN
7129 > wouldn't work and is therefore suppressed.
7144 >+treat-forbidden-connects-like-blocks</PRE
7163 > Note that many of these actions have the potential to cause a page to
7164 misbehave, possibly even not to display at all. There are many ways
7165 a site designer may choose to design his site, and what HTTP header
7166 content, and other criteria, he may depend on. There is no way to have hard
7167 and fast rules for all sites. See the <A
7168 HREF="appendix.html#ACTIONSANAT"
7170 > for a brief example on troubleshooting
7193 >, can be defined by combining other actions.
7194 These can in turn be invoked just like the built-in actions.
7195 Currently, an alias name can contain any character except space, tab,
7213 > that you only use <SPAN
7233 Alias names are not case sensitive, and are not required to start with a
7240 > sign, since they are merely textually
7243 > Aliases can be used throughout the actions file, but they <SPAN
7248 defined in a special section at the top of the file!</I
7251 And there can only be one such section per actions file. Each actions file may
7252 have its own alias section, and the aliases defined in it are only visible
7253 within that file.</P
7255 > There are two main reasons to use aliases: One is to save typing for frequently
7256 used combinations of actions, the other one is a gain in flexibility: If you
7257 decide once how you want to handle shops by defining an alias called
7261 >, you can later change your policy on shops in
7268 > place, and your changes will take effect everywhere
7269 in the actions file where the <SPAN
7272 > alias is used. Calling aliases
7273 by their purpose also makes your actions files more readable.</P
7275 > Currently, there is one big drawback to using aliases, though:
7279 >'s built-in web-based action file
7280 editor honors aliases when reading the actions files, but it expands
7281 them before writing. So the effects of your aliases are of course preserved,
7282 but the aliases themselves are lost when you edit sections that use aliases
7285 > Now let's define some aliases...</P
7295 > # Useful custom aliases we can use later.
7297 # Note the (required!) section header line and that this section
7298 # must be at the top of the actions file!
7302 # These aliases just save typing later:
7303 # (Note that some already use other aliases!)
7305 +crunch-all-cookies = +<A
7306 HREF="actions-file.html#CRUNCH-INCOMING-COOKIES"
7307 >crunch-incoming-cookies</A
7309 HREF="actions-file.html#CRUNCH-OUTGOING-COOKIES"
7310 >crunch-outgoing-cookies</A
7312 -crunch-all-cookies = -<A
7313 HREF="actions-file.html#CRUNCH-INCOMING-COOKIES"
7314 >crunch-incoming-cookies</A
7316 HREF="actions-file.html#CRUNCH-OUTGOING-COOKIES"
7317 >crunch-outgoing-cookies</A
7319 +block-as-image = +block +handle-as-image
7320 allow-all-cookies = -crunch-all-cookies -<A
7321 HREF="actions-file.html#SESSION-COOKIES-ONLY"
7322 >session-cookies-only</A
7324 HREF="actions-file.html#FILTER-CONTENT-COOKIES"
7325 >filter{content-cookies}</A
7328 # These aliases define combinations of actions
7329 # that are useful for certain types of sites:
7332 HREF="actions-file.html#BLOCK"
7335 HREF="actions-file.html#FILTER"
7337 > -crunch-all-cookies -<A
7338 HREF="actions-file.html#FAST-REDIRECTS"
7341 HREF="actions-file.html#HIDE-REFERER"
7344 HREF="actions-file.html#KILL-POPUPS"
7347 HREF="actions-file.html#PREVENT-COMPRESSION"
7348 >prevent-compression</A
7351 shop = -crunch-all-cookies -<A
7352 HREF="actions-file.html#FILTER-ALL-POPUPS"
7353 >filter{all-popups}</A
7355 HREF="actions-file.html#KILL-POPUPS"
7359 # Short names for other aliases, for really lazy people ;-)
7361 c0 = +crunch-all-cookies
7362 c1 = -crunch-all-cookies</PRE
7368 > ...and put them to use. These sections would appear in the lower part of an
7369 actions file and define exceptions to the default actions (as specified further
7383 > # These sites are either very complex or very keen on
7384 # user data and require minimal interference to work:
7387 .office.microsoft.com
7388 .windowsupdate.microsoft.com
7389 # Gmail is really mail.google.com, not gmail.com
7393 # Allow cookies (for setting and retrieving your customer data)
7397 .worldpay.com # for quietpc.com
7400 # These shops require pop-ups:
7402 {-kill-popups -filter{all-popups} -filter{unsolicited-popups}}
7404 .overclockers.co.uk</PRE
7410 > Aliases like <SPAN
7416 > are typically used for
7420 > sites that require more than one action to be disabled
7421 in order to function properly.</P
7429 >8.7. Actions Files Tutorial</A
7432 > The above chapters have shown <A
7433 HREF="actions-file.html"
7434 >which actions files
7435 there are and how they are organized</A
7436 >, how actions are <A
7437 HREF="actions-file.html#ACTIONS"
7440 HREF="actions-file.html#ACTIONS-APPLY"
7444 HREF="actions-file.html#AF-PATTERNS"
7448 HREF="actions-file.html#ALIASES"
7450 >. Now, let's look at an
7458 file and see how all these pieces come together:</P
7465 >8.7.1. default.action</A
7468 >Every config file should start with a short comment stating its purpose:</P
7478 ># Sample default.action file <ijbswa-developers@lists.sourceforge.net></PRE
7484 >Then, since this is the <TT
7488 first section is a special section for internal use that you needn't
7489 change or worry about:</P
7499 >##########################################################################
7500 # Settings -- Don't change! For internal Privoxy use ONLY.
7501 ##########################################################################
7504 for-privoxy-version=3.0</PRE
7510 >After that comes the (optional) alias section. We'll use the example
7511 section from the above <A
7512 HREF="actions-file.html#ALIASES"
7513 >chapter on aliases</A
7515 that also explains why and how aliases are used:</P
7525 >##########################################################################
7527 ##########################################################################
7530 # These aliases just save typing later:
7531 # (Note that some already use other aliases!)
7533 +crunch-all-cookies = +<A
7534 HREF="actions-file.html#CRUNCH-INCOMING-COOKIES"
7535 >crunch-incoming-cookies</A
7537 HREF="actions-file.html#CRUNCH-OUTGOING-COOKIES"
7538 >crunch-outgoing-cookies</A
7540 -crunch-all-cookies = -<A
7541 HREF="actions-file.html#CRUNCH-INCOMING-COOKIES"
7542 >crunch-incoming-cookies</A
7544 HREF="actions-file.html#CRUNCH-OUTGOING-COOKIES"
7545 >crunch-outgoing-cookies</A
7547 +block-as-image = +block +handle-as-image
7548 mercy-for-cookies = -crunch-all-cookies -<A
7549 HREF="actions-file.html#SESSION-COOKIES-ONLY"
7550 >session-cookies-only</A
7552 HREF="actions-file.html#FILTER-CONTENT-COOKIES"
7553 >filter{content-cookies}</A
7556 # These aliases define combinations of actions
7557 # that are useful for certain types of sites:
7560 HREF="actions-file.html#BLOCK"
7563 HREF="actions-file.html#FILTER"
7565 > -crunch-all-cookies -<A
7566 HREF="actions-file.html#FAST-REDIRECTS"
7569 HREF="actions-file.html#HIDE-REFERER"
7572 HREF="actions-file.html#KILL-POPUPS"
7575 shop = -crunch-all-cookies -<A
7576 HREF="actions-file.html#FILTER-ALL-POPUPS"
7577 >filter{all-popups}</A
7579 HREF="actions-file.html#KILL-POPUPS"
7587 > Now come the regular sections, i.e. sets of actions, accompanied
7588 by URL patterns to which they apply. Remember <SPAN
7593 are disabled when matching starts</I
7595 >, so we have to explicitly
7596 enable the ones we want.</P
7598 > The first regular section is probably the most important. It has only
7607 HREF="actions-file.html#AF-PATTERNS"
7608 >matches all URLs</A
7610 set of actions used in this <SPAN
7618 be applied to all requests as a start</I
7620 >. It can be partly or
7621 wholly overridden by later matches further down this file, or in user.action,
7622 but it will still be largely responsible for your overall browsing
7625 > Again, at the start of matching, all actions are disabled, so there is
7626 no real need to disable any actions here, but we will do that nonetheless,
7627 to have a complete listing for your reference. (Remember: a <SPAN
7631 preceding the action name enables the action, a <SPAN
7635 Also note how this long line has been made more readable by splitting it into
7636 multiple lines with line continuation.</P
7646 >##########################################################################
7647 # "Defaults" section:
7648 ##########################################################################
7651 HREF="actions-file.html#ADD-HEADER"
7655 HREF="actions-file.html#CLIENT-HEADER-FILTER"
7656 >client-header-filter{hide-tor-exit-notation}</A
7659 HREF="actions-file.html#BLOCK"
7663 HREF="actions-file.html#CONTENT-TYPE-OVERWRITE"
7664 >content-type-overwrite</A
7667 HREF="actions-file.html#CRUNCH-CLIENT-HEADER"
7668 >crunch-client-header</A
7671 HREF="actions-file.html#CRUNCH-IF-NONE-MATCH"
7672 >crunch-if-none-match</A
7675 HREF="actions-file.html#CRUNCH-INCOMING-COOKIES"
7676 >crunch-incoming-cookies</A
7679 HREF="actions-file.html#CRUNCH-SERVER-HEADER"
7680 >crunch-server-header</A
7683 HREF="actions-file.html#CRUNCH-OUTGOING-COOKIES"
7684 >crunch-outgoing-cookies</A
7687 HREF="actions-file.html#DEANIMATE-GIFS"
7691 HREF="actions-file.html#DOWNGRADE-HTTP-VERSION"
7692 >downgrade-http-version</A
7695 HREF="actions-file.html#FAST-REDIRECTS"
7696 >fast-redirects{check-decoded-url}</A
7699 HREF="actions-file.html#FILTER-JS-ANNOYANCES"
7700 >filter{js-annoyances}</A
7703 HREF="actions-file.html#FILTER-JS-EVENTS"
7704 >filter{js-events}</A
7707 HREF="actions-file.html#FILTER-HTML-ANNOYANCES"
7708 >filter{html-annoyances}</A
7711 HREF="actions-file.html#FILTER-CONTENT-COOKIES"
7712 >filter{content-cookies}</A
7715 HREF="actions-file.html#FILTER-REFRESH-TAGS"
7716 >filter{refresh-tags}</A
7719 HREF="actions-file.html#FILTER-UNSOLICITED-POPUPS"
7720 >filter{unsolicited-popups}</A
7723 HREF="actions-file.html#FILTER-ALL-POPUPS"
7724 >filter{all-popups}</A
7727 HREF="actions-file.html#FILTER-IMG-REORDER"
7728 >filter{img-reorder}</A
7731 HREF="actions-file.html#FILTER-BANNERS-BY-SIZE"
7732 >filter{banners-by-size}</A
7735 HREF="actions-file.html#FILTER-BANNERS-BY-LINK"
7736 >filter{banners-by-link}</A
7739 HREF="actions-file.html#FILTER-WEBBUGS"
7743 HREF="actions-file.html#FILTER-TINY-TEXTFORMS"
7744 >filter{tiny-textforms}</A
7747 HREF="actions-file.html#FILTER-JUMPING-WINDOWS"
7748 >filter{jumping-windows}</A
7751 HREF="actions-file.html#FILTER-FRAMESET-BORDERS"
7752 >filter{frameset-borders}</A
7755 HREF="actions-file.html#FILTER-DEMORONIZER"
7756 >filter{demoronizer}</A
7759 HREF="actions-file.html#FILTER-SHOCKWAVE-FLASH"
7760 >filter{shockwave-flash}</A
7763 HREF="actions-file.html#FILTER-QUICKTIME-KIOSKMODE"
7764 >filter{quicktime-kioskmode}</A
7767 HREF="actions-file.html#FILTER-FUN"
7771 HREF="actions-file.html#FILTER-CRUDE-PARENTAL"
7772 >filter{crude-parental}</A
7775 HREF="actions-file.html#FILTER-IE-EXPLOITS"
7776 >filter{ie-exploits}</A
7779 HREF="actions-file.html#FILTER-GOOGLE"
7783 HREF="actions-file.html#FILTER-YAHOO"
7787 HREF="actions-file.html#FILTER-MSN"
7791 HREF="actions-file.html#FILTER-BLOGSPOT"
7792 >filter{blogspot}</A
7795 HREF="actions-file.html#FILTER-NO-PING"
7799 HREF="actions-file.html#FORCE-TEXT-MODE"
7803 HREF="actions-file.html#HANDLE-AS-EMPTY-DOCUMENT"
7804 >handle-as-empty-document</A
7807 HREF="actions-file.html#HANDLE-AS-IMAGE"
7811 HREF="actions-file.html#HIDE-ACCEPT-LANGUAGE"
7812 >hide-accept-language</A
7815 HREF="actions-file.html#HIDE-CONTENT-DISPOSITION"
7816 >hide-content-disposition</A
7819 HREF="actions-file.html#HIDE-IF-MODIFIED-SINCE"
7820 >hide-if-modified-since</A
7823 HREF="actions-file.html#HIDE-FORWARDED-FOR-HEADERS"
7824 >hide-forwarded-for-headers</A
7827 HREF="actions-file.html#HIDE-FROM-HEADER"
7828 >hide-from-header{block}</A
7831 HREF="actions-file.html#HIDE-REFERER"
7832 >hide-referrer{forge}</A
7835 HREF="actions-file.html#HIDE-USER-AGENT"
7839 HREF="actions-file.html#INSPECT-JPEGS"
7843 HREF="actions-file.html#KILL-POPUPS"
7847 HREF="actions-file.html#LIMIT-CONNECT"
7851 HREF="actions-file.html#PREVENT-COMPRESSION"
7852 >prevent-compression</A
7855 HREF="actions-file.html#OVERWRITE-LAST-MODIFIED"
7856 >overwrite-last-modified</A
7859 HREF="actions-file.html#REDIRECT"
7863 HREF="actions-file.html#SEND-VANILLA-WAFER"
7864 >send-vanilla-wafer</A
7867 HREF="actions-file.html#SEND-WAFER"
7871 HREF="actions-file.html#SERVER-HEADER-FILTER"
7872 >server-header-filter{xml-to-html}</A
7875 HREF="actions-file.html#SERVER-HEADER-FILTER"
7876 >server-header-filter{html-to-xml}</A
7879 HREF="actions-file.html#SESSION-COOKIES-ONLY"
7880 >session-cookies-only</A
7883 HREF="actions-file.html#SET-IMAGE-BLOCKER"
7884 >set-image-blocker{pattern}</A
7887 HREF="actions-file.html#TREAT-FORBIDDEN-CONNECTS-LIKE-BLOCKS"
7888 >treat-forbidden-connects-like-blocks</A
7891 / # forward slash will match *all* potential URL patterns.</PRE
7897 > The default behavior is now set. Note that some actions, like not hiding
7898 the user agent, are part of a <SPAN
7900 >"general policy"</SPAN
7902 universally and won't get any exceptions defined later. Other choices,
7903 like not blocking (which is <SPAN
7910 default!) need exceptions, i.e. we need to specify explicitly what we
7911 want to block in later sections.</P
7913 > The first of our specialized sections is concerned with <SPAN
7917 sites, i.e. sites that require minimum interference, because they are either
7918 very complex or very keen on tracking you (and have mechanisms in place that
7919 make them unusable for people who avoid being tracked). We will simply use
7923 > alias instead of stating the list
7924 of actions explicitly:</P
7934 >##########################################################################
7935 # Exceptions for sites that'll break under the default action set:
7936 ##########################################################################
7938 # "Fragile" Use a minimum set of actions for these sites (see alias above):
7941 .office.microsoft.com # surprise, surprise!
7942 .windowsupdate.microsoft.com
7943 mail.google.com</PRE
7949 > Shopping sites are not as fragile, but they typically
7950 require cookies to log in, and pop-up windows for shopping
7951 carts or item details. Again, we'll use a pre-defined alias:</P
7965 .worldpay.com # for quietpc.com
7976 HREF="actions-file.html#FAST-REDIRECTS"
7980 action, which we enabled per default above, breaks some sites. So disable
7981 it for popular sites where we know it misbehaves:</P
7992 HREF="actions-file.html#FAST-REDIRECTS"
7998 .altavista.com/.*(like|url|link):http
7999 .altavista.com/trans.*urltext=http
8006 > It is important that <SPAN
8010 URLs belong to images, so that <SPAN
8017 be blocked, a substitute image can be sent, rather than an HTML page.
8018 Contacting the remote site to find out is not an option, since it
8019 would destroy the loading time advantage of banner blocking, and it
8020 would feed the advertisers (in terms of money <SPAN
8027 information). We can mark any URL as an image with the <TT
8030 HREF="actions-file.html#HANDLE-AS-IMAGE"
8034 and marking all URLs that end in a known image file extension is a
8045 >##########################################################################
8047 ##########################################################################
8049 # Define which file types will be treated as images, in case they get
8050 # blocked further down this file:
8053 HREF="actions-file.html#HANDLE-AS-IMAGE"
8056 /.*\.(gif|jpe?g|png|bmp|ico)$</PRE
8062 > And then there are known banner sources. They often use scripts to
8063 generate the banners, so it won't be visible from the URL that the
8064 request is for an image. Hence we block them <SPAN
8071 mark them as images in one go, with the help of our
8074 >+block-as-image</TT
8075 > alias defined above. (We could of
8076 course just as well use <TT
8079 HREF="actions-file.html#BLOCK"
8083 HREF="actions-file.html#HANDLE-AS-IMAGE"
8087 Remember that the type of the replacement image is chosen by the
8091 HREF="actions-file.html#SET-IMAGE-BLOCKER"
8092 >set-image-blocker</A
8095 action. Since all URLs have matched the default section with its
8099 HREF="actions-file.html#SET-IMAGE-BLOCKER"
8100 >set-image-blocker</A
8103 action before, it still applies and needn't be repeated:</P
8113 ># Known ad generators:
8118 .ad.*.doubleclick.net
8119 .a.yimg.com/(?:(?!/i/).)*$
8120 .a[0-9].yimg.com/(?:(?!/i/).)*$
8128 > One of the most important jobs of <SPAN
8132 is to block banners. Many of these can be <SPAN
8139 HREF="actions-file.html#FILTER"
8141 >{banners-by-size}</TT
8143 action, which we enabled above, and which deletes the references to banner
8144 images from the pages while they are loaded, so the browser doesn't request
8145 them anymore, and hence they don't need to be blocked here. But this naturally
8146 doesn't catch all banners, and some people choose not to use filters, so we
8147 need a comprehensive list of patterns for banner URLs here, and apply the
8151 HREF="actions-file.html#BLOCK"
8154 > action to them.</P
8156 > First comes many generic patterns, which do most of the work, by
8157 matching typical domain and path name components of banners. Then comes
8158 a list of individual patterns for specific sites, which is omitted here
8159 to keep the example short:</P
8169 >##########################################################################
8170 # Block these fine banners:
8171 ##########################################################################
8173 HREF="actions-file.html#BLOCK"
8183 /.*count(er)?\.(pl|cgi|exe|dll|asp|php[34]?)
8184 /(?:.*/)?(publicite|werbung|rekla(ma|me|am)|annonse|maino(kset|nta|s)?)/
8186 # Site-specific patterns (abbreviated):
8194 > It's quite remarkable how many advertisers actually call their banner
8200 >.com, or call the directory
8201 in which the banners are stored simply <SPAN
8205 generic patterns are surprisingly effective.</P
8207 > But being very generic, they necessarily also catch URLs that we don't want
8208 to block. The pattern <TT
8220 >.nasty-corp.com"</SPAN
8230 >.sourcefroge.net"</SPAN
8240 >l.some-provider.net."</SPAN
8242 well-known exceptions to the <TT
8245 HREF="actions-file.html#BLOCK"
8251 > Note that these are exceptions to exceptions from the default! Consider the URL
8254 >"downloads.sourcefroge.net"</SPAN
8255 >: Initially, all actions are deactivated,
8256 so it wouldn't get blocked. Then comes the defaults section, which matches the
8257 URL, but just deactivates the <TT
8260 HREF="actions-file.html#BLOCK"
8264 action once again. Then it matches <TT
8267 >, an exception to the
8268 general non-blocking policy, and suddenly
8272 HREF="actions-file.html#BLOCK"
8275 > applies. And now, it'll match
8282 HREF="actions-file.html#BLOCK"
8286 applies, so (unless it matches <SPAN
8292 > further down) it ends up
8296 HREF="actions-file.html#BLOCK"
8299 > action applying.</P
8309 >##########################################################################
8310 # Save some innocent victims of the above generic block patterns:
8311 ##########################################################################
8316 HREF="actions-file.html#BLOCK"
8319 adv[io]*. # (for advogato.org and advice.*)
8320 adsl. # (has nothing to do with ads)
8321 adobe. # (has nothing to do with ads either)
8322 ad[ud]*. # (adult.* and add.*)
8323 .edu # (universities don't host banners (yet!))
8324 .*loads. # (downloads, uploads etc)
8332 www.globalintersec.com/adv # (adv = advanced)
8333 www.ugu.com/sui/ugu/adv</PRE
8339 > Filtering source code can have nasty side effects,
8340 so make an exception for our friends at sourceforge.net,
8341 and all paths with <SPAN
8344 > in them. Note that
8348 HREF="actions-file.html#FILTER"
8358 > filters in one fell swoop!</P
8368 ># Don't filter code!
8371 HREF="actions-file.html#FILTER"
8378 .sourceforge.net</PRE
8387 > is of course much more
8388 comprehensive, but we hope this example made clear how it works.</P
8396 >8.7.2. user.action</A
8399 > So far we are painting with a broad brush by setting general policies,
8400 which would be a reasonable starting point for many people. Now,
8401 you might want to be more specific and have customized rules that
8402 are more suitable to your personal habits and preferences. These would
8403 be for narrowly defined situations like your ISP or your bank, and should
8407 >, which is parsed after all other
8408 actions files and hence has the last word, over-riding any previously
8409 defined actions. <TT
8419 > place for your personal settings, since
8423 > is actively maintained by the
8427 > developers and you'll probably want
8428 to install updated versions from time to time.</P
8430 > So let's look at a few examples of things that one might typically do in
8444 ># My user.action file. <fred@foobar.com></PRE
8451 HREF="actions-file.html#ALIASES"
8453 > are local to the actions
8454 file that they are defined in, you can't use the ones from
8458 >, unless you repeat them here:</P
8468 ># Aliases are local to the file they are defined in.
8469 # (Re-)define aliases for this file:
8473 # These aliases just save typing later, and the alias names should
8474 # be self explanatory.
8476 +crunch-all-cookies = +crunch-incoming-cookies +crunch-outgoing-cookies
8477 -crunch-all-cookies = -crunch-incoming-cookies -crunch-outgoing-cookies
8478 allow-all-cookies = -crunch-all-cookies -session-cookies-only
8479 allow-popups = -filter{all-popups} -kill-popups
8480 +block-as-image = +block +handle-as-image
8481 -block-as-image = -block
8483 # These aliases define combinations of actions that are useful for
8484 # certain types of sites:
8486 fragile = -block -crunch-all-cookies -filter -fast-redirects -hide-referrer -kill-popups
8487 shop = -crunch-all-cookies allow-popups
8489 # Allow ads for selected useful free sites:
8491 allow-ads = -block -filter{banners-by-size} -filter{banners-by-link}
8493 # Alias for specific file types that are text, but might have conflicting
8494 # MIME types. We want the browser to force these to be text documents.
8495 handle-as-text = -<A
8496 HREF="actions-file.html#FILTER"
8499 HREF="actions-file.html#CONTENT-TYPE-OVERWRITE"
8500 >content-type-overwrite{text/plain}</A
8502 HREF="actions-file.html#FORCE-TEXT-MODE"
8505 HREF="actions-file.html#HIDE-CONTENT-DISPOSITION"
8506 >hide-content-disposition</A
8513 > Say you have accounts on some sites that you visit regularly, and
8514 you don't want to have to log in manually each time. So you'd like
8515 to allow persistent cookies for these sites. The
8518 >allow-all-cookies</TT
8519 > alias defined above does exactly
8520 that, i.e. it disables crunching of cookies in any direction, and the
8521 processing of cookies to make them only temporary.</P
8531 >{ allow-all-cookies }
8541 > Your bank is allergic to some filter, but you don't know which, so you disable them all:</P
8552 HREF="actions-file.html#FILTER"
8555 .your-home-banking-site.com</PRE
8561 > Some file types you may not want to filter for various reasons:</P
8571 ># Technical documentation is likely to contain strings that might
8572 # erroneously get altered by the JavaScript-oriented filters:
8577 # And this stupid host sends streaming video with a wrong MIME type,
8578 # so that Privoxy thinks it is getting HTML and starts filtering:
8580 stupid-server.example.com/</PRE
8586 > Example of a simple <A
8587 HREF="actions-file.html#BLOCK"
8589 > action. Say you've
8590 seen an ad on your favourite page on example.com that you want to get rid of.
8591 You have right-clicked the image, selected <SPAN
8593 >"copy image location"</SPAN
8595 and pasted the URL below while removing the leading http://, into a
8599 > section. Note that <TT
8603 > need not be specified, since all URLs ending in
8607 > will be tagged as images by the general rules as set
8608 in default.action anyway:</P
8619 HREF="actions-file.html#BLOCK"
8622 www.example.com/nasty-ads/sponsor\.gif
8623 another.popular.site.net/more/junk/here/</PRE
8629 > The URLs of dynamically generated banners, especially from large banner
8630 farms, often don't use the well-known image file name extensions, which
8631 makes it impossible for <SPAN
8635 the file type just by looking at the URL.
8638 >+block-as-image</TT
8639 > alias defined above for
8641 Note that objects which match this rule but then turn out NOT to be an
8642 image are typically rendered as a <SPAN
8644 >"broken image"</SPAN
8646 browser. Use cautiously.</P
8656 >{ +block-as-image }
8666 > Now you noticed that the default configuration breaks Forbes Magazine,
8667 but you were too lazy to find out which action is the culprit, and you
8668 were again too lazy to give <A
8672 you just used the <TT
8675 > alias on the site, and
8682 > -- it worked. The <TT
8686 aliases disables those actions that are most likely to break a site. Also,
8687 good for testing purposes to see if it is <SPAN
8691 that is causing the problem or not. We later find other regular sites
8692 that misbehave, and add those to our personalized list of troublemakers:</P
8711 > You like the <SPAN
8714 > text replacements in <TT
8718 but it is disabled in the distributed actions file. (My colleagues on the team just
8719 don't have a sense of humour, that's why! ;-). So you'd like to turn it on in your private,
8720 update-safe config, once and for all:</P
8731 HREF="actions-file.html#FILTER-FUN"
8734 / # For ALL sites!</PRE
8740 > Note that the above is not really a good idea: There are exceptions
8741 to the filters in <TT
8745 really shouldn't be filtered, like code on CVS->Web interfaces. Since
8749 > has the last word, these exceptions
8750 won't be valid for the <SPAN
8753 > filtering specified here.</P
8755 > You might also worry about how your favourite free websites are
8756 funded, and find that they rely on displaying banner advertisements
8757 to survive. So you might want to specifically allow banners for those
8758 sites that you feel provide value to you:</P
8780 > has been aliased to
8784 HREF="actions-file.html#BLOCK"
8791 HREF="actions-file.html#FILTER-BANNERS-BY-SIZE"
8792 >filter{banners-by-size}</A
8798 HREF="actions-file.html#FILTER-BANNERS-BY-LINK"
8799 >filter{banners-by-link}</A
8803 > Invoke another alias here to force an over-ride of the MIME type <TT
8805 > application/x-sh</TT
8806 > which typically would open a download type
8807 dialog. In my case, I want to look at the shell script, and then I can save
8808 it should I choose to.</P
8828 > is generally the best place to define
8829 exceptions and additions to the default policies of
8833 >. Some actions are safe to have their
8834 default policies set here though. So let's set a default policy to have a
8838 > image as opposed to the checkerboard pattern for
8848 > of course matches all URL
8849 paths and patterns:</P
8860 HREF="actions-file.html#SET-IMAGE-BLOCKER"
8861 >set-image-blocker{blank}</A
8876 SUMMARY="Footer navigation table"
8905 HREF="filter-file.html"
8915 >The Main Configuration File</TD