7 CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
10 TITLE="Privoxy 3.0.6 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.6 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 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 a minimal set of <SPAN
225 >'s features, and subsequently there will be
226 less of a chance for accidental problems. The <SPAN
230 button sets the list to a medium level of ad blocking and a low level set of
231 privacy features. The <SPAN
235 sets the list to a high level of ad blocking and medium level of
236 privacy. See the chart below. The latter three buttons over-ride
237 any changes via with the <SPAN
241 fine-tuning can be done in the lower sections of this internal page.
244 > It is not recommend to edit the <TT
251 > The default profiles, and their associated actions, as pre-defined in
265 >Table 1. Default Configurations</B
300 >Ad-blocking Aggressiveness</TD
322 >Ad-filtering by size</TD
344 >Ad-filtering by link</TD
388 >Privacy Features</TD
454 >GIF de-animation</TD
520 >JavaScript taming</TD
564 >Image tag reordering</TD
591 > The list of actions files to be used are defined in the main configuration
592 file, and are processed in the order they are defined (e.g.
596 > is typically process before
600 >). The content of these can all be viewed and
602 HREF="http://config.privoxy.org/show-status"
604 >http://config.privoxy.org/show-status</A
606 The over-riding principle when applying actions, is that the last action that
607 matches a given URL, wins. The broadest, most general rules go first
612 followed by any exceptions (typically also in
616 >), which are then followed lastly by any
617 local preferences (typically in <SPAN
633 > An actions file typically has multiple sections. If you want to use
637 > in an actions file, you have to place the (optional)
639 HREF="actions-file.html#ALIASES"
641 > at the top of that file.
642 Then comes the default set of rules which will apply universally to all
643 sites and pages (be <SPAN
653 > or any other actions file after
657 >, because it will override the result
658 from consulting any previous file). And then below that,
659 exceptions to the defined universal policies. You can regard
663 > as an appendix to <TT
667 with the advantage that is a separate file, which makes preserving your
668 personal settings across <SPAN
671 > upgrades easier.</P
674 Actions can be used to block anything you want, including ads, banners, or
675 just some obnoxious URL that you would rather not see. Cookies can be accepted
676 or rejected, or accepted only during the current browser session (i.e. not
677 written to disk), content can be modified, JavaScripts tamed, user-tracking
678 fooled, and much more. See below for a <A
679 HREF="actions-file.html#ACTIONS"
690 >8.1. Finding the Right Mix</H2
693 HREF="actions-file.html#ACTIONS"
695 >, like cookie suppression
696 or script disabling, may render some sites unusable that rely on these
697 techniques to work properly. Finding the right mix of actions is not always easy and
698 certainly a matter of personal taste. And, things can always change, requiring
699 refinements in the configuration. In general, it can be said that the more
703 > your default settings (in the top section of the
704 actions file) are, the more exceptions for <SPAN
708 will have to make later. If, for example, you want to crunch all cookies per
709 default, you'll have to make exceptions from that rule for sites that you
710 regularly use and that require cookies for actually useful purposes, like maybe
711 your bank, favorite shop, or newspaper. </P
713 > We have tried to provide you with reasonable rules to start from in the
714 distribution actions files. But there is no general rule of thumb on these
715 things. There just are too many variables, and sites are constantly changing.
716 Sooner or later you will want to change the rules (and read this chapter again :).</P
725 >8.2. How to Edit</H2
727 > The easiest way to edit the actions files is with a browser by
728 using our browser-based editor, which can be reached from <A
729 HREF="http://config.privoxy.org/show-status"
731 >http://config.privoxy.org/show-status</A
733 The editor allows both fine-grained control over every single feature on a
734 per-URL basis, and easy choosing from wholesale sets of defaults like
748 > setting is more aggressive, and
749 will be more likely to cause problems for some sites. Experienced users only!</P
751 > If you prefer plain text editing to GUIs, you can of course also directly edit the
752 the actions files with your favorite text editor. Look at
756 > which is richly commented with many
766 >8.3. How Actions are Applied to URLs</H2
768 > Actions files are divided into sections. There are special sections,
772 HREF="actions-file.html#ALIASES"
775 > sections which will
776 be discussed later. For now let's concentrate on regular sections: They have a
777 heading line (often split up to multiple lines for readability) which consist
778 of a list of actions, separated by whitespace and enclosed in curly braces.
779 Below that, there is a list of URL patterns, each on a separate line.</P
781 > To determine which actions apply to a request, the URL of the request is
782 compared to all patterns in each <SPAN
785 > file. Every time it matches, the list of
786 applicable actions for the URL is incrementally updated, using the heading
787 of the section in which the pattern is located. If multiple matches for
788 the same URL set the same action differently, the last match wins. If not,
789 the effects are aggregated. E.g. a URL might match a regular section with
790 a heading line of <TT
794 HREF="actions-file.html#HANDLE-AS-IMAGE"
798 then later another one with just <TT
802 HREF="actions-file.html#BLOCK"
812 > actions to apply. And there may well be
813 cases where you will want to combine actions together. Such a section then
831 # Block these as if they were images. Send no block page.
833 media.example.com/.*banners
834 .example.com/images/ads/</PRE
841 > You can trace this process for any given URL by visiting <A
842 HREF="http://config.privoxy.org/show-url-info"
844 >http://config.privoxy.org/show-url-info</A
847 > Examples and more detail on this is provided in the Appendix, <A
848 HREF="appendix.html#ACTIONSANAT"
849 > Troubleshooting: Anatomy of an Action</A
869 to determine what <SPAN
875 > might apply to which sites and
876 pages your browser attempts to access. These <SPAN
886 > matching to achieve a high degree of
887 flexibility. This allows one expression to be expanded and potentially match
888 against many similar patterns.</P
893 > pattern has the form
896 ><domain>/<path></TT
900 ><domain></TT
905 optional. (This is why the special <TT
908 > pattern matches all
909 URLs). Note that the protocol portion of the URL pattern (e.g.
920 the pattern. This is assumed already!</P
922 > The pattern matching syntax is different for the domain and path parts of
923 the URL. The domain part uses a simple globbing type matching technique,
924 while the path part uses a more flexible
926 HREF="http://en.wikipedia.org/wiki/Regular_expressions"
931 Expressions (PCRE)"</SPAN
942 >www.example.com/</TT
946 > is a domain-only pattern and will match any request to <TT
950 regardless of which document on that server is requested. So ALL pages in
951 this domain would be covered by the scope of this action. Note that a
955 > is different and would NOT match.
965 > means exactly the same. For domain-only patterns, the trailing <TT
975 >www.example.com/index.html</TT
979 > matches only the single document <TT
996 > matches the document <TT
999 >, regardless of the domain,
1006 > web server anywhere.
1016 > matches nothing, since it would be interpreted as a domain name and
1017 there is no top-level domain called <TT
1033 >8.4.1. The Domain Pattern</H3
1035 > The matching of the domain part offers some flexible options: if the
1036 domain starts or ends with a dot, it becomes unanchored at that end.
1041 CLASS="VARIABLELIST"
1050 > matches any domain that <SPAN
1070 > matches any domain that <SPAN
1090 > matches any domain that <SPAN
1100 And, by the way, also included would be any files or documents that exist
1101 within that domain since no path limitations are specified. (Correctly
1102 speaking: It matches any FQDN that contains <TT
1106 a domain.) This might be <TT
1108 >www.example.com</TT
1112 >news.example.de</TT
1116 >www.example.net/cgi/testing.pl</TT
1117 > for instance. All these
1124 > Additionally, there are wild-cards that you can use in the domain names
1125 themselves. These work similarly to shell globbing type wild-cards:
1129 > represents zero or more arbitrary characters (this is
1132 HREF="http://en.wikipedia.org/wiki/Regular_expressions"
1139 > based syntax of <SPAN
1146 > represents any single character (this is equivalent to the
1147 regular expression syntax of a simple <SPAN
1150 >), and you can define
1153 >"character classes"</SPAN
1154 > in square brackets which is similar to
1155 the same regular expression technique. All of this can be freely mixed:</P
1159 CLASS="VARIABLELIST"
1164 >ad*.example.com</TT
1170 >"adserver.example.com"</SPAN
1174 >"ads.example.com"</SPAN
1175 >, etc but not <SPAN
1177 >"sfads.example.com"</SPAN
1184 >*ad*.example.com</TT
1188 > matches all of the above, and then some.
1204 >pictures.epix.com</TT
1207 >a.b.c.d.e.upix.com</TT
1214 >www[1-9a-ez].example.c*</TT
1220 >www1.example.com</TT
1224 >www4.example.cc</TT
1227 >wwwd.example.cy</TT
1231 >wwwz.example.com</TT
1241 >wwww.example.com</TT
1248 > While flexibile, this is not the sophistication of full regular expression based syntax.</P
1257 >8.4.2. The Path Pattern</H3
1262 > uses Perl compatible (PCRE)
1264 HREF="http://en.wikipedia.org/wiki/Regular_expressions"
1273 HREF="http://www.pcre.org/"
1277 matching the path portion (after the slash), and is thus more flexible.</P
1280 HREF="appendix.html#REGEX"
1282 > with a brief quick-start into regular
1283 expressions, and full (very technical) documentation on PCRE regex syntax is available on-line
1285 HREF="http://www.pcre.org/man.txt"
1287 >http://www.pcre.org/man.txt</A
1289 You might also find the Perl man page on regular expressions (<TT
1293 useful, which is available on-line at <A
1294 HREF="http://perldoc.perl.org/perlre.html"
1296 >http://perldoc.perl.org/perlre.html</A
1299 > Note that the path pattern is automatically left-anchored at the <SPAN
1303 i.e. it matches as if it would start with a <SPAN
1306 > (regular expression speak
1307 for the beginning of a line).</P
1309 > Please also note that matching in the path is <SPAN
1313 >CASE INSENSITIVE</I
1316 by default, but you can switch to case sensitive at any point in the pattern by using the
1322 >www.example.com/(?-i)PaTtErN.*</TT
1324 only documents whose path starts with <TT
1334 > this capitalization.</P
1338 CLASS="VARIABLELIST"
1343 >.example.com/.*</TT
1347 > Is equivalent to just <SPAN
1349 >".example.com"</SPAN
1350 >, since any documents
1351 within that domain are matched with or without the <SPAN
1355 regular expression. This is redundant
1361 >.example.com/.*/index.html</TT
1365 > Will match any page in the domain of <SPAN
1367 >"example.com"</SPAN
1372 >, and that is part of some path. For
1373 example, it matches <SPAN
1375 >"www.example.com/testing/index.html"</SPAN
1379 >"www.example.com/index.html"</SPAN
1380 > because the regular
1381 expression called for at least two <SPAN
1385 requirement. It also would match
1388 >"www.example.com/testing/index_html"</SPAN
1390 special meta-character <SPAN
1399 >.example.com/(.*/)?index\.html</TT
1403 > This regular expression is conditional so it will match any page
1407 > regardless of path which in this case can
1408 have one or more <SPAN
1411 >. And this one must contain exactly
1415 > (but does not have to end with that!).
1421 >.example.com/(.*/)(ads|banners?|junk)</TT
1425 > This regular expression will match any path of <SPAN
1427 >"example.com"</SPAN
1429 that contains any of the words <SPAN
1439 > (because of the <SPAN
1446 The path does not have to end in these words, just contain them.
1452 >.example.com/(.*/)(ads|banners?|junk)/.*\.(jpe?g|gif|png)$</TT
1456 > This is very much the same as above, except now it must end in either
1470 one is limited to common image formats.
1476 > There are many, many good examples to be found in <TT
1480 and more tutorials below in <A
1481 HREF="appendix.html#REGEX"
1482 >Appendix on regular expressions</A
1495 > All actions are disabled by default, until they are explicitly enabled
1496 somewhere in an actions file. Actions are turned on if preceded with a
1500 >, and turned off if preceded with a <SPAN
1509 >"do that action"</SPAN
1516 >"please block URLs that match the
1517 following patterns"</SPAN
1524 block URLs that match the following patterns, even if <TT
1528 previously applied."</SPAN
1532 Again, actions are invoked by placing them on a line, enclosed in curly braces and
1533 separated by whitespace, like in
1536 >{+some-action -some-other-action{some-parameter}}</TT
1538 followed by a list of URL patterns, one per line, to which they apply.
1539 Together, the actions line and the following pattern lines make up a section
1540 of the actions file. </P
1543 Actions fall into three categories:</P
1551 Boolean, i.e the action can only be <SPAN
1574 > # enable action <TT
1585 > # disable action <TT
1607 Parameterized, where some value is required in order to enable this type of action.
1629 >} # enable action and set parameter to <TT
1635 # overwriting parameter from previous match if necessary
1641 > # disable action. The parameter can be omitted</PRE
1648 > Note that if the URL matches multiple positive forms of a parameterized action,
1649 the last match wins, i.e. the params from earlier matches are simply ignored.
1655 >+hide-user-agent{ Mozilla 1.0 }</TT
1662 Multi-value. These look exactly like parameterized actions,
1663 but they behave differently: If the action applies multiple times to the
1664 same URL, but with different parameters, <SPAN
1677 > matches are remembered. This is used for actions
1678 that can be executed for the same request repeatedly, like adding multiple
1679 headers, or filtering through multiple filters. Syntax:
1700 >} # enable action and add <TT
1705 > to the list of parameters
1716 >} # remove the parameter <TT
1721 > from the list of parameters
1722 # If it was the last one left, disable the action.
1728 > # disable this action completely and remove all parameters from the list</PRE
1738 >+add-header{X-Fun-Header: Some text}</TT
1742 >+filter{html-annoyances}</TT
1749 > If nothing is specified in any actions file, no <SPAN
1753 taken. So in this case <SPAN
1757 normal, non-blocking, non-anonymizing proxy. You must specifically enable the
1758 privacy and blocking features you need (although the provided default actions
1759 files will give a good starting point).</P
1761 > Later defined actions always over-ride earlier ones. So exceptions
1762 to any rules you make, should come in the latter part of the file (or
1763 in a file that is processed later when using multiple actions files such
1767 >). For multi-valued actions, the actions
1768 are applied in the order they are specified. Actions files are processed in
1769 the order they are defined in <TT
1773 installation has three actions files). It also quite possible for any given
1774 URL to match more than one <SPAN
1777 > (because of wildcards and
1778 regular expressions), and thus to trigger more than one set of actions! Last
1781 > The list of valid <SPAN
1792 >8.5.1. add-header</H4
1796 CLASS="VARIABLELIST"
1802 >Confuse log analysis, custom applications</P
1808 > Sends a user defined HTTP header to the web server.
1821 > Any string value is possible. Validity of the defined HTTP headers is not checked.
1822 It is recommended that you use the <SPAN
1836 > This action may be specified multiple times, in order to define multiple
1837 headers. This is rarely needed for the typical user. If you don't know what
1840 >"HTTP headers"</SPAN
1841 > are, you definitely don't need to worry about this
1857 >+add-header{X-User-Tracking: sucks}</PRE
1878 CLASS="VARIABLELIST"
1884 >Block ads or other unwanted content</P
1890 > Requests for URLs to which this action applies are blocked, i.e. the
1891 requests are trapped by <SPAN
1894 > and the requested URL is never retrieved,
1895 but is answered locally with a substitute page or image, as determined by
1899 HREF="actions-file.html#HANDLE-AS-IMAGE"
1906 HREF="actions-file.html#SET-IMAGE-BLOCKER"
1907 >set-image-blocker</A
1913 HREF="actions-file.html#HANDLE-AS-EMPTY-DOCUMENT"
1914 >handle-as-empty-document</A
1939 > sends a special <SPAN
1943 for requests to blocked pages. This page contains links to find out why the request
1944 was blocked, and a click-through to the blocked content (the latter only if compiled with the
1945 force feature enabled). The <SPAN
1948 > page adapts to the available
1949 screen space -- it displays full-blown if space allows, or miniaturized and text-only
1950 if loaded into a small frame or window. If you are using <SPAN
1954 right now, you can take a look at the
1956 HREF="http://ads.bannerserver.example.com/nasty-ads/sponsor.html"
1967 A very important exception occurs if <SPAN
1980 HREF="actions-file.html#HANDLE-AS-IMAGE"
1984 apply to the same request: it will then be replaced by an image. If
1988 HREF="actions-file.html#SET-IMAGE-BLOCKER"
1989 >set-image-blocker</A
1992 (see below) also applies, the type of image will be determined by its parameter,
1993 if not, the standard checkerboard pattern is sent.
1996 > It is important to understand this process, in order
1997 to understand how <SPAN
2001 ads and other unwanted content. Blocking is a core feature, and one
2002 upon which various other features depend.
2008 HREF="actions-file.html#FILTER"
2012 action can perform a very similar task, by <SPAN
2016 banner images and other content through rewriting the relevant URLs in the
2017 document's HTML source, so they don't get requested in the first place.
2018 Note that this is a totally different technique, and it's easy to confuse the two.
2022 >Example usage (section):</DT
2034 # Block and replace with "blocked" page
2035 .nasty-stuff.example.com
2037 {+block +handle-as-image}
2038 # Block and replace with image
2042 {+block +handle-as-empty-document}
2043 # Block and then ignore
2044 adserver.exampleclick.net/.*\.js$</PRE
2059 NAME="CONTENT-TYPE-OVERWRITE"
2061 >8.5.3. content-type-overwrite</H4
2065 CLASS="VARIABLELIST"
2071 >Stop useless download menus from popping up, or change the browser's rendering mode</P
2077 > Replaces the <SPAN
2079 >"Content-Type:"</SPAN
2080 > HTTP server header.
2102 >"Content-Type:"</SPAN
2103 > HTTP server header is used by the
2104 browser to decide what to do with the document. The value of this
2105 header can cause the browser to open a download menu instead of
2106 displaying the document by itself, even if the document's format is
2107 supported by the browser.
2110 > The declared content type can also affect which rendering mode
2111 the browser chooses. If XHTML is delivered as <SPAN
2115 many browsers treat it as yet another broken HTML document.
2116 If it is send as <SPAN
2118 >"application/xml"</SPAN
2120 XHTML support will only display it, if the syntax is correct.
2123 > If you see a web site that proudly uses XHTML buttons, but sets
2126 >"Content-Type: text/html"</SPAN
2127 >, you can use <SPAN
2131 to overwrite it with <SPAN
2133 >"application/xml"</SPAN
2135 the web master's claim inside your XHTML-supporting browser.
2136 If the syntax is incorrect, the browser will complain loudly.
2139 > You can also go the opposite direction: if your browser prints
2140 error messages instead of rendering a document falsely declared
2141 as XHTML, you can overwrite the content type with
2145 > and have it rendered as broken HTML document.
2150 >content-type-overwrite</TT
2154 >"Content-Type:"</SPAN
2155 > headers that look like some kind of text.
2156 If you want to overwrite it unconditionally, you have to combine it with
2160 HREF="actions-file.html#FORCE-TEXT-MODE"
2164 This limitation exists for a reason, think twice before circumventing it.
2167 > Most of the time it's easier to enable
2171 HREF="actions-file.html#FILTER-SERVER-HEADERS"
2172 >filter-server-headers</A
2175 and replace this action with a custom regular expression. It allows you
2176 to activate it for every document of a certain site and it will still
2177 only replace the content types you aimed at.
2180 > Of course you can apply <TT
2182 >content-type-overwrite</TT
2184 to a whole site and then make URL based exceptions, but it's a lot
2185 more work to get the same precision.
2189 >Example usage (sections):</DT
2200 ># Check if www.example.net/ really uses valid XHTML
2201 {+content-type-overwrite {application/xml}}
2204 # but leave the content type unmodified if the URL looks like a style sheet
2205 {-content-type-overwrite}
2206 www.example.net/*.\.css$
2207 www.example.net/*.style</PRE
2222 NAME="CRUNCH-CLIENT-HEADER"
2224 >8.5.4. crunch-client-header</H4
2228 CLASS="VARIABLELIST"
2234 >Remove a client header <SPAN
2237 > has no dedicated action for.</P
2243 > Deletes every header sent by the client that contains the string the user supplied as parameter.
2263 > This action allows you to block client headers for which no dedicated
2271 > will remove every client header that
2272 contains the string you supplied as parameter.
2275 > Regular expressions are <SPAN
2282 use this action to block different headers in the same request, unless
2283 they contain the same string.
2288 >crunch-client-header</TT
2289 > is only meant for quick tests.
2290 If you have to block several different headers, or only want to modify
2291 parts of them, you should enable
2295 HREF="actions-file.html#FILTER-CLIENT-HEADERS"
2296 >filter-client-headers</A
2299 and create your own filter.
2320 > Don't block any header without understanding the consequences.
2328 >Example usage (section):</DT
2339 ># Block the non-existent "Privacy-Violation:" client header
2340 {+crunch-client-header {Privacy-Violation:}}
2357 NAME="CRUNCH-IF-NONE-MATCH"
2359 >8.5.5. crunch-if-none-match</H4
2363 CLASS="VARIABLELIST"
2369 >Prevent yet another way to track the user's steps between sessions.</P
2377 >"If-None-Match:"</SPAN
2378 > HTTP client header.
2398 > Removing the <SPAN
2400 >"If-None-Match:"</SPAN
2401 > HTTP client header
2402 is useful for filter testing, where you want to force a real
2403 reload instead of getting status code <SPAN
2407 would cause the browser to use a cached copy of the page.
2410 > It is also useful to make sure the header isn't used as a cookie
2414 > Blocking the <SPAN
2416 >"If-None-Match:"</SPAN
2417 > header shouldn't cause any
2418 caching problems, as long as the <SPAN
2420 >"If-Modified-Since:"</SPAN
2422 isn't blocked as well.
2425 > It is recommended to use this action together with
2429 HREF="actions-file.html#HIDE-IF-MODIFIED-SINCE"
2430 >hide-if-modified-since</A
2437 HREF="actions-file.html#OVERWRITE-LAST-MODIFIED"
2438 >overwrite-last-modified</A
2444 >Example usage (section):</DT
2455 ># Let the browser revalidate cached documents without being tracked across sessions
2456 {+hide-if-modified-since {-60} \
2457 +overwrite-last-modified {randomize} \
2458 +crunch-if-none-match}
2474 NAME="CRUNCH-INCOMING-COOKIES"
2476 >8.5.6. crunch-incoming-cookies</H4
2480 CLASS="VARIABLELIST"
2486 > Prevent the web server from setting any cookies on your system
2495 >"Set-Cookie:"</SPAN
2496 > HTTP headers from server replies.
2516 > This action is only concerned with <SPAN
2533 HREF="actions-file.html#CRUNCH-OUTGOING-COOKIES"
2534 >crunch-outgoing-cookies</A
2543 > to disable cookies completely.
2552 > to use this action in conjunction
2556 HREF="actions-file.html#SESSION-COOKIES-ONLY"
2557 >session-cookies-only</A
2560 since it would prevent the session cookies from being set. See also
2564 HREF="actions-file.html#FILTER-CONTENT-COOKIES"
2565 >filter-content-cookies</A
2582 >+crunch-incoming-cookies</PRE
2597 NAME="CRUNCH-SERVER-HEADER"
2599 >8.5.7. crunch-server-header</H4
2603 CLASS="VARIABLELIST"
2609 >Remove a server header <SPAN
2612 > has no dedicated action for.</P
2618 > Deletes every header sent by the server that contains the string the user supplied as parameter.
2638 > This action allows you to block server headers for which no dedicated
2642 > action exists. <SPAN
2646 will remove every server header that contains the string you supplied as parameter.
2649 > Regular expressions are <SPAN
2656 use this action to block different headers in the same request, unless
2657 they contain the same string.
2662 >crunch-server-header</TT
2663 > is only meant for quick tests.
2664 If you have to block several different headers, or only want to modify
2665 parts of them, you should enable
2669 HREF="actions-file.html#FILTER-SERVER-HEADERS"
2670 >filter-server-headers</A
2673 and create your own filter.
2694 > Don't block any header without understanding the consequences.
2702 >Example usage (section):</DT
2713 ># Crunch server headers that try to prevent caching
2714 {+crunch-server-header {no-cache}}
2730 NAME="CRUNCH-OUTGOING-COOKIES"
2732 >8.5.8. crunch-outgoing-cookies</H4
2736 CLASS="VARIABLELIST"
2742 > Prevent the web server from reading any cookies from your system
2752 > HTTP headers from client requests.
2772 > This action is only concerned with <SPAN
2789 HREF="actions-file.html#CRUNCH-INCOMING-COOKIES"
2790 >crunch-incoming-cookies</A
2799 > to disable cookies completely.
2808 > to use this action in conjunction
2812 HREF="actions-file.html#SESSION-COOKIES-ONLY"
2813 >session-cookies-only</A
2816 since it would prevent the session cookies from being read.
2831 >+crunch-outgoing-cookies</PRE
2846 NAME="DEANIMATE-GIFS"
2848 >8.5.9. deanimate-gifs</H4
2852 CLASS="VARIABLELIST"
2858 >Stop those annoying, distracting animated GIF images.</P
2864 > De-animate GIF animations, i.e. reduce them to their first or last image.
2890 > This will also shrink the images considerably (in bytes, not pixels!). If
2894 > is given, the first frame of the animation
2895 is used as the replacement. If <SPAN
2898 > is given, the last
2899 frame of the animation is used instead, which probably makes more sense for
2900 most banner animations, but also has the risk of not showing the entire
2901 last frame (if it is only a delta to an earlier frame).
2904 > You can safely use this action with patterns that will also match non-GIF
2905 objects, because no attempt will be made at anything that doesn't look like
2921 >+deanimate-gifs{last}</PRE
2936 NAME="DOWNGRADE-HTTP-VERSION"
2938 >8.5.10. downgrade-http-version</H4
2942 CLASS="VARIABLELIST"
2948 >Work around (very rare) problems with HTTP/1.1</P
2954 > Downgrades HTTP/1.1 client requests and server replies to HTTP/1.0.
2974 > This is a left-over from the time when <SPAN
2978 didn't support important HTTP/1.1 features well. It is left here for the
2979 unlikely case that you experience HTTP/1.1 related problems with some server
2980 out there. Not all (optional) HTTP/1.1 features are supported yet, so there
2981 is a chance you might need this action.
2985 >Example usage (section):</DT
2996 >{+downgrade-http-version}
2997 problem-host.example.com</PRE
3012 NAME="FAST-REDIRECTS"
3014 >8.5.11. fast-redirects</H4
3018 CLASS="VARIABLELIST"
3024 >Fool some click-tracking scripts and speed up indirect links.</P
3030 > Detects redirection URLs and redirects the browser without contacting
3031 the redirection server first.
3050 >"simple-check"</SPAN
3051 > to just search for the string <SPAN
3055 to detect redirection URLs.
3062 >"check-decoded-url"</SPAN
3063 > to decode URLs (if necessary) before searching
3064 for redirection URLs.
3074 Many sites, like yahoo.com, don't just link to other sites. Instead, they
3075 will link to some script on their own servers, giving the destination as a
3076 parameter, which will then redirect you to the final target. URLs
3077 resulting from this scheme typically look like:
3080 >"http://www.example.org/click-tracker.cgi?target=http%3a//www.example.net/"</SPAN
3084 > Sometimes, there are even multiple consecutive redirects encoded in the
3085 URL. These redirections via scripts make your web browsing more traceable,
3086 since the server from which you follow such a link can see where you go
3087 to. Apart from that, valuable bandwidth and time is wasted, while your
3088 browser asks the server for one redirect after the other. Plus, it feeds
3092 > This feature is currently not very smart and is scheduled for improvement.
3093 If it is enabled by default, you will have to create some exceptions to
3094 this action. It can lead to failures in several ways:
3097 > Not every URLs with other URLs as parameters is evil.
3098 Some sites offer a real service that requires this information to work.
3099 For example a validation service needs to know, which document to validate.
3103 > assumes that every URL parameter that
3104 looks like another URL is a redirection target, and will always redirect to
3105 the last one. Most of the time the assumption is correct, but if it isn't,
3106 the user gets redirected anyway.
3109 > Another failure occurs if the URL contains other parameters after the URL parameter.
3113 >"http://www.example.org/?redirect=http%3a//www.example.net/&foo=bar"</SPAN
3115 contains the redirection URL <SPAN
3117 >"http://www.example.net/"</SPAN
3119 followed by another parameter. <TT
3123 and will cause a redirect to <SPAN
3125 >"http://www.example.net/&foo=bar"</SPAN
3127 Depending on the target server configuration, the parameter will be silently ignored
3130 >"page not found"</SPAN
3131 > error. It is possible to fix these redirected
3135 HREF="actions-file.html#FILTER-CLIENT-HEADERS"
3136 >filter-client-headers</A
3139 but it requires a little effort.
3142 > To detect a redirection URL, <TT
3146 looks for the string <SPAN
3149 >, either in plain text
3150 (invalid but often used) or encoded as <SPAN
3154 Some sites use their own URL encoding scheme, encrypt the address
3155 of the target server or replace it with a database id. In theses cases
3159 > is fooled and the request reaches the
3160 redirection server where it probably gets logged.
3175 > { +fast-redirects{simple-check} }
3178 { +fast-redirects{check-decoded-url} }
3179 another.example.com/testing</PRE
3200 CLASS="VARIABLELIST"
3206 >Get rid of HTML and JavaScript annoyances, banner advertisements (by size),
3207 do fun text replacements, add personalized effects, etc.</P
3213 > All files of text-based type, most notably HTML and
3214 JavaScript, to which this action applies, can be filtered on-the-fly
3215 through the specified regular expression based substitutions. (Note: as of
3216 version 3.0.3 plain text documents are exempted from filtering, because
3217 web servers often use the <TT
3221 files whose type they don't know.) By default, filtering works only on the
3222 raw document content itself (that which can be seen with <TT
3240 > The name of a filter, as defined in the <A
3241 HREF="filter-file.html"
3244 Filters can be defined in one or more files as defined by the
3248 HREF="config.html#FILTERFILE"
3259 > is the collection of filters
3260 supplied by the developers. Locally defined filters should go
3261 in their own file, such as <TT
3267 > When used in its negative form,
3268 and without parameters, <SPAN
3274 > filtering is completely disabled.
3281 > For your convenience, there are a number of pre-defined filters available
3282 in the distribution filter file that you can use. See the examples below for
3286 > Filtering requires buffering the page content, which may appear to
3287 slow down page rendering since nothing is displayed until all content has
3288 passed the filters. (It does not really take longer, but seems that way
3289 since the page is not incrementally displayed.) This effect will be more
3290 noticeable on slower connections.
3295 >"Rolling your own"</SPAN
3297 filters requires a knowledge of
3299 HREF="http://en.wikipedia.org/wiki/Regular_expressions"
3308 HREF="http://en.wikipedia.org/wiki/Html"
3315 This is very powerful feature, and potentially very intrusive.
3316 Filters should be used with caution, and where an equivalent
3323 > The amount of data that can be filtered is limited to the
3327 HREF="config.html#BUFFER-LIMIT"
3331 option in the main <A
3335 default is 4096 KB (4 Megs). Once this limit is exceeded, the buffered
3336 data, and all pending data, is passed through unfiltered.
3339 > Inappropriate MIME types, such as zipped files, are not filtered at all.
3340 (Again, only text-based types except plain text). Encrypted SSL data
3341 (from HTTPS servers) cannot be filtered either, since this would violate
3342 the integrity of the secure transaction. In some situations it might
3343 be necessary to protect certain text, like source code, from filtering
3344 by defining appropriate <TT
3350 > At this time, <SPAN
3353 > cannot uncompress compressed
3354 documents. If you want filtering to work on all documents, even those that
3355 would normally be sent compressed, you must use the
3359 HREF="actions-file.html#PREVENT-COMPRESSION"
3360 >prevent-compression</A
3363 action in conjunction with <TT
3369 > Filtering can achieve some of the same effects as the
3373 HREF="actions-file.html#BLOCK"
3377 action, i.e. it can be used to block ads and banners. But the mechanism
3378 works quite differently. One effective use, is to block ad banners
3379 based on their size (see below), since many of these seem to be somewhat
3386 > with suggestions for new or
3387 improved filters is particularly welcome!
3390 > The below list has only the names and a one-line description of each
3391 predefined filter. There are <A
3392 HREF="filter-file.html#PREDEFINED-FILTERS"
3394 verbose explanations</A
3395 > of what these filters do in the <A
3396 HREF="filter-file.html"
3397 >filter file chapter</A
3402 >Example usage (with filters from the distribution <TT
3407 HREF="filter-file.html#PREDEFINED-FILTERS"
3408 >the Predefined Filters section</A
3410 more explanation on each:</DT
3414 NAME="FILTER-JS-ANNOYANCES"
3425 >+filter{js-annoyances} # Get rid of particularly annoying JavaScript abuse</PRE
3433 NAME="FILTER-JS-EVENTS"
3444 >+filter{js-events} # Kill all JS event bindings (Radically destructive! Only for extra nasty sites)</PRE
3452 NAME="FILTER-HTML-ANNOYANCES"
3463 >+filter{html-annoyances} # Get rid of particularly annoying HTML abuse</PRE
3471 NAME="FILTER-CONTENT-COOKIES"
3482 >+filter{content-cookies} # Kill cookies that come in the HTML or JS content</PRE
3490 NAME="FILTER-REFRESH-TAGS"
3501 >+filter{refresh-tags} # Kill automatic refresh tags (for dial-on-demand setups)</PRE
3509 NAME="FILTER-UNSOLICITED-POPUPS"
3520 >+filter{unsolicited-popups} # Disable only unsolicited pop-up windows. Useful if your browser lacks this ability.</PRE
3528 NAME="FILTER-ALL-POPUPS"
3539 >+filter{all-popups} # Kill all popups in JavaScript and HTML. Useful if your browser lacks this ability.</PRE
3547 NAME="FILTER-IMG-REORDER"
3558 >+filter{img-reorder} # Reorder attributes in <img> tags to make the banners-by-* filters more effective</PRE
3566 NAME="FILTER-BANNERS-BY-SIZE"
3577 >+filter{banners-by-size} # Kill banners by size</PRE
3585 NAME="FILTER-BANNERS-BY-LINK"
3596 >+filter{banners-by-link} # Kill banners by their links to known clicktrackers</PRE
3604 NAME="FILTER-WEBBUGS"
3615 >+filter{webbugs} # Squish WebBugs (1x1 invisible GIFs used for user tracking)</PRE
3623 NAME="FILTER-TINY-TEXTFORMS"
3634 >+filter{tiny-textforms} # Extend those tiny textareas up to 40x80 and kill the hard wrap</PRE
3642 NAME="FILTER-JUMPING-WINDOWS"
3653 >+filter{jumping-windows} # Prevent windows from resizing and moving themselves</PRE
3661 NAME="FILTER-FRAMESET-BORDERS"
3672 >+filter{frameset-borders} # Give frames a border and make them resizeable</PRE
3680 NAME="FILTER-DEMORONIZER"
3691 >+filter{demoronizer} # Fix MS's non-standard use of standard charsets</PRE
3699 NAME="FILTER-SHOCKWAVE-FLASH"
3710 >+filter{shockwave-flash} # Kill embedded Shockwave Flash objects</PRE
3718 NAME="FILTER-QUICKTIME-KIOSKMODE"
3729 >+filter{quicktime-kioskmode} # Make Quicktime movies savable</PRE
3748 >+filter{fun} # Text replacements for subversive browsing fun!</PRE
3756 NAME="FILTER-CRUDE-PARENTAL"
3767 >+filter{crude-parental} # Crude parental filtering (demo only)</PRE
3775 NAME="FILTER-IE-EXPLOITS"
3786 >+filter{ie-exploits} # Disable some known Internet Explorer bug exploits</PRE
3794 NAME="FILTER-SITE-SPECIFICS"
3805 >+filter{site-specifics} # Custom filters for specific site related problems</PRE
3813 NAME="FILTER-GOOGLE"
3824 >+filter{google} # Removes text ads and other Google specific improvements</PRE
3843 >+filter{yahoo} # Removes text ads and other Yahoo specific improvements</PRE
3862 >+filter{msn} # Removes text ads and other MSN specific improvements</PRE
3870 NAME="FILTER-BLOGSPOT"
3881 >+filter{blogspot} # Cleans up Blogspot blogs</PRE
3889 NAME="FILTER-HTML-TO-XML"
3900 >+filter{html-to-xml} # Header filter to change the Content-Type from html to xml</PRE
3908 NAME="FILTER-XML-TO-HTML"
3919 >+filter{xml-to-html} # Header filter to change the Content-Type from xml to html</PRE
3934 NAME="FILTER-CLIENT-HEADERS"
3936 >8.5.13. filter-client-headers</H4
3940 CLASS="VARIABLELIST"
3946 > To apply filtering to the client's (browser's) headers
3956 > filters only apply
3957 to the document content itself. This will extend those filters to
3958 include the client's headers as well.
3978 > Regular expressions can be used to filter headers as well. Check your
3979 filters closely before activating this action, as it can easily lead to broken
3984 These filters are applied to each header on its own, not to them
3985 all at once. This makes it easier to diagnose problems, but on the downside
3986 you can't write filters that only change header x if header y's value is
3990 > The filters are used after the other header actions have finished and can
3991 use their output as input.
3994 > Whenever possible one should specify <TT
4001 >, the whole header name and the colon, to make sure
4002 the filter doesn't cause havoc to other headers or the
4003 page itself. For example if you want to transform
4022 >s@Galeon/\d\.\d\.\d @@</PRE
4038 >s@^(User-Agent:.*) Galeon/\d\.\d\.\d (Firefox/\d\.\d\.\d\.\d)$@$1 $2@</PRE
4045 >Example usage (section):</DT
4056 >{+filter-client-headers +filter{test_filter}}
4057 problem-host.example.com
4073 NAME="FILTER-SERVER-HEADERS"
4075 >8.5.14. filter-server-headers</H4
4079 CLASS="VARIABLELIST"
4085 > To apply filtering to the server's headers
4095 > filters only apply
4096 to the document content itself. This will extend those filters to
4097 include the server's headers as well.
4119 >filter-client-headers</TT
4121 the server instead. To filter both server and client, use both.
4126 >filter-client-headers</TT
4128 filters before activating this action, as it can easily lead to broken
4133 These filters are applied to each header on its own, not to them
4134 all at once. This makes it easier to diagnose problems, but on the downside
4135 you can't write filters that only change header x if header y's value is
4139 > The filters are used after the other header actions have finished and can
4140 use their output as input.
4143 > Remember too, whenever possible one should specify <TT
4150 >, the whole header name and the colon, to make sure
4151 the filter doesn't cause havoc to other headers or the
4152 page itself. See above for example.
4156 >Example usage (section):</DT
4167 >{+filter-server-headers +filter{test_filter}}
4168 problem-host.example.com
4184 NAME="FORCE-TEXT-MODE"
4186 >8.5.15. force-text-mode</H4
4190 CLASS="VARIABLELIST"
4199 > to treat a document as if it was in some kind of <SPAN
4211 > Declares a document as text, even if the <SPAN
4213 >"Content-Type:"</SPAN
4214 > isn't detected as such.
4237 HREF="actions-file.html#FILTER"
4244 > tries to only filter files that are
4245 in some kind of text format. The same restrictions apply to
4249 HREF="actions-file.html#CONTENT-TYPE-OVERWRITE"
4250 >content-type-overwrite</A
4255 >force-text-mode</TT
4256 > declares a document as text,
4257 without looking at the <SPAN
4259 >"Content-Type:"</SPAN
4281 > Think twice before activating this action. Filtering binary data
4282 with regular expressions can cause file damage.
4317 NAME="HANDLE-AS-EMPTY-DOCUMENT"
4319 >8.5.16. handle-as-empty-document</H4
4323 CLASS="VARIABLELIST"
4329 >Mark URLs that should be replaced by empty documents <SPAN
4333 >if they get blocked</I
4341 > This action alone doesn't do anything noticeable. It just marks URLs.
4345 HREF="actions-file.html#BLOCK"
4355 the presence or absence of this mark decides whether an HTML <SPAN
4359 page, or an empty document will be sent to the client as a substitute for the blocked content.
4366 > document isn't literally empty, but actually contains a single space.
4386 > Some browsers complain about syntax errors if JavaScript documents
4387 are blocked with <SPAN
4391 default HTML page; this option can be used to silence them.
4394 > The content type for the empty document can be specified with
4398 HREF="actions-file.html#CONTENT-TYPE-OVERWRITE"
4399 >content-type-overwrite{}</A
4402 but usually this isn't necessary.
4417 ># Block all documents on example.org that end with ".js",
4418 # but send an empty document instead of the usual HTML message.
4419 {+block +handle-as-empty-document}
4436 NAME="HANDLE-AS-IMAGE"
4438 >8.5.17. handle-as-image</H4
4442 CLASS="VARIABLELIST"
4448 >Mark URLs as belonging to images (so they'll be replaced by images <SPAN
4452 >if they do get blocked</I
4454 >, rather than HTML pages)</P
4460 > This action alone doesn't do anything noticeable. It just marks URLs as images.
4464 HREF="actions-file.html#BLOCK"
4474 the presence or absence of this mark decides whether an HTML <SPAN
4478 page, or a replacement image (as determined by the <TT
4481 HREF="actions-file.html#SET-IMAGE-BLOCKER"
4482 >set-image-blocker</A
4484 > action) will be sent to the
4485 client as a substitute for the blocked content.
4505 > The below generic example section is actually part of <TT
4509 It marks all URLs with well-known image file name extensions as images and should
4513 > Users will probably only want to use the handle-as-image action in conjunction with
4517 HREF="actions-file.html#BLOCK"
4520 >, to block sources of banners, whose URLs don't
4521 reflect the file type, like in the second example section.
4524 > Note that you cannot treat HTML pages as images in most cases. For instance, (in-line) ad
4525 frames require an HTML page to be sent, or they won't display properly.
4528 >handle-as-image</TT
4529 > in this situation will not replace the
4530 ad frame with an image, but lead to error messages.
4534 >Example usage (sections):</DT
4545 ># Generic image extensions:
4548 /.*\.(gif|jpg|jpeg|png|bmp|ico)$
4550 # These don't look like images, but they're banners and should be
4551 # blocked as images:
4553 {+block +handle-as-image}
4554 some.nasty-banner-server.com/junk.cgi?output=trash
4556 # Banner source! Who cares if they also have non-image content?
4557 ad.doubleclick.net </PRE
4572 NAME="HIDE-ACCEPT-LANGUAGE"
4574 >8.5.18. hide-accept-language</H4
4578 CLASS="VARIABLELIST"
4584 >Pretend to use different language settings.</P
4590 > Deletes or replaces the <SPAN
4592 >"Accept-Language:"</SPAN
4593 > HTTP header in client requests.
4609 >, or any user defined value.
4616 > Faking the browser's language settings can be useful to make a
4617 foreign User-Agent set with
4621 HREF="actions-file.html#HIDE-USER-AGENT"
4628 > However some sites with content in different languages check the
4631 >"Accept-Language:"</SPAN
4632 > to decide which one to take by default.
4633 Sometimes it isn't possible to later switch to another language without
4636 >"Accept-Language:"</SPAN
4640 > Therefore it's a good idea to either only change the
4643 >"Accept-Language:"</SPAN
4644 > header to languages you understand,
4645 or to languages that aren't wide spread.
4648 > Before setting the <SPAN
4650 >"Accept-Language:"</SPAN
4652 to a rare language, you should consider that it helps to
4653 make your requests unique and thus easier to trace.
4654 If you don't plan to change this header frequently,
4655 you should stick to a common language.
4659 >Example usage (section):</DT
4670 ># Pretend to use Canadian language settings.
4671 {+hide-accept-language{en-ca} \
4672 +hide-user-agent{Mozilla/5.0 (X11; U; OpenBSD i386; en-CA; rv:1.8.0.4) Gecko/20060628 Firefox/1.5.0.4} \
4689 NAME="HIDE-CONTENT-DISPOSITION"
4691 >8.5.19. hide-content-disposition</H4
4695 CLASS="VARIABLELIST"
4701 >Prevent download menus for content you prefer to view inside the browser.</P
4707 > Deletes or replaces the <SPAN
4709 >"Content-Disposition:"</SPAN
4710 > HTTP header set by some servers.
4726 >, or any user defined value.
4733 > Some servers set the <SPAN
4735 >"Content-Disposition:"</SPAN
4737 documents they assume you want to save locally before viewing them.
4740 >"Content-Disposition:"</SPAN
4741 > header contains the file name
4742 the browser is supposed to use by default.
4745 > In most browsers that understand this header, it makes it impossible to
4752 > the document, without downloading it first,
4753 even if it's just a simple text file or an image.
4756 > Removing the <SPAN
4758 >"Content-Disposition:"</SPAN
4760 to prevent this annoyance, but some browsers additionally check the
4763 >"Content-Type:"</SPAN
4764 > header, before they decide if they can
4765 display a document without saving it first. In these cases, you have
4766 to change this header as well, before the browser stops displaying
4770 > It is also possible to change the server's file name suggestion
4771 to another one, but in most cases it isn't worth the time to set
4787 ># Disarm the download link in Sourceforge's patch tracker
4789 +content-type-overwrite {text/plain}\
4790 +hide-content-disposition {block} }
4791 .sourceforge.net/tracker/download.php</PRE
4806 NAME="HIDE-IF-MODIFIED-SINCE"
4808 >8.5.20. hide-if-modified-since</H4
4812 CLASS="VARIABLELIST"
4818 >Prevent yet another way to track the user's steps between sessions.</P
4826 >"If-Modified-Since:"</SPAN
4827 > HTTP client header or modifies its value.
4843 >, or a user defined value that specifies a range of hours.
4850 > Removing this header is useful for filter testing, where you want to force a real
4851 reload instead of getting status code <SPAN
4854 >, which would cause the
4855 browser to use a cached copy of the page.
4858 > Instead of removing the header, <TT
4860 >hide-if-modified-since</TT
4862 also add or subtract a random amount of time to/from the header's value.
4863 You specify a range of minutes where the random factor should be chosen from and
4867 > does the rest. A negative value means
4868 subtracting, a positive value adding.
4871 > Randomizing the value of the <SPAN
4873 >"If-Modified-Since:"</SPAN
4875 sure it isn't used as a cookie replacement, but you will run into
4876 caching problems if the random range is too high.
4879 > It is a good idea to only use a small negative value and let
4883 HREF="actions-file.html#OVERWRITE-LAST-MODIFIED"
4884 >overwrite-last-modified</A
4887 handle the greater changes.
4890 > It is also recommended to use this action together with
4894 HREF="actions-file.html#CRUNCH-IF-NONE-MATCH"
4895 >crunch-if-none-match</A
4901 >Example usage (section):</DT
4912 ># Let the browser revalidate without being tracked across sessions
4913 {+hide-if-modified-since {-60}\
4914 +overwrite-last-modified {randomize}\
4915 +crunch-if-none-match}
4931 NAME="HIDE-FORWARDED-FOR-HEADERS"
4933 >8.5.21. hide-forwarded-for-headers</H4
4937 CLASS="VARIABLELIST"
4943 >Improve privacy by hiding the true source of the request</P
4949 > Deletes any existing <SPAN
4951 >"X-Forwarded-for:"</SPAN
4952 > HTTP header from client requests,
4953 and prevents adding a new one.
4973 > It is fairly safe to leave this on.
4976 > This action is scheduled for improvement: It should be able to generate forged
4979 >"X-Forwarded-for:"</SPAN
4980 > headers using random IP addresses from a specified network,
4981 to make successive requests from the same client look like requests from a pool of different
4982 users sharing the same proxy.
4997 >+hide-forwarded-for-headers</PRE
5012 NAME="HIDE-FROM-HEADER"
5014 >8.5.22. hide-from-header</H4
5018 CLASS="VARIABLELIST"
5024 >Keep your (old and ill) browser from telling web servers your email address</P
5030 > Deletes any existing <SPAN
5033 > HTTP header, or replaces it with the
5050 >, or any user defined value.
5060 > will completely remove the header
5061 (not to be confused with the <TT
5064 HREF="actions-file.html#BLOCK"
5071 > Alternately, you can specify any value you prefer to be sent to the web
5072 server. If you do, it is a matter of fairness not to use any address that
5073 is actually used by a real person.
5076 > This action is rarely needed, as modern web browsers don't send
5095 >+hide-from-header{block}</PRE
5108 >+hide-from-header{spam-me-senseless@sittingduck.example.com}</PRE
5123 NAME="HIDE-REFERRER"
5125 >8.5.23. hide-referrer</H4
5132 CLASS="VARIABLELIST"
5138 >Conceal which link you followed to get to a particular site</P
5147 > (sic) HTTP header from the client request,
5148 or replaces it with a forged one.
5167 >"conditional-block"</SPAN
5168 > to delete the header completely if the host has changed.</P
5175 > to delete the header unconditionally.</P
5182 > to pretend to be coming from the homepage of the server we are talking to.</P
5186 >Any other string to set a user defined referrer.</P
5196 >conditional-block</TT
5197 > is the only parameter,
5198 that isn't easily detected in the server's log file. If it blocks the
5199 referrer, the request will look like the visitor used a bookmark or
5200 typed in the address directly.
5203 > Leaving the referrer unmodified for requests on the same host
5204 allows the server owner to see the visitor's <SPAN
5208 but in most cases she could also get that information by comparing
5209 other parts of the log file: for example the User-Agent if it isn't
5210 a very common one, or the user's IP address if it doesn't change between
5214 > Always blocking the referrer, or using a custom one, can lead to
5215 failures on servers that check the referrer before they answer any
5216 requests, in an attempt to prevent their valuable content from being
5217 embedded or linked to elsewhere.
5222 >conditional-block</TT
5227 will work with referrer checks, as long as content and valid referring page
5228 are on the same host. Most of the time that's the case.
5235 > is an alternate spelling of
5239 > and the two can be can be freely
5240 substituted with each other. (<SPAN
5244 correct English spelling, however the HTTP specification has a bug - it
5245 requires it to be spelled as <SPAN
5263 >+hide-referrer{forge}</PRE
5276 >+hide-referrer{http://www.yahoo.com/}</PRE
5291 NAME="HIDE-USER-AGENT"
5293 >8.5.24. hide-user-agent</H4
5297 CLASS="VARIABLELIST"
5303 >Conceal your type of browser and client operating system</P
5309 > Replaces the value of the <SPAN
5311 >"User-Agent:"</SPAN
5313 in client requests with the specified value.
5326 > Any user-defined string.
5351 > This can lead to problems on web sites that depend on looking at this header in
5352 order to customize their content for different browsers (which, by the
5359 > the right thing to do: good web sites
5360 work browser-independently).
5368 > Using this action in multi-user setups or wherever different types of
5369 browsers will access the same <SPAN
5379 >. In single-user, single-browser
5380 setups, you might use it to delete your OS version information from
5381 the headers, because it is an invitation to exploit known bugs for your
5382 OS. It is also occasionally useful to forge this in order to access
5383 sites that won't let you in otherwise (though there may be a good
5384 reason in some cases). Example of this: some MSN sites will not
5388 > enter, yet forging to a
5392 > user-agent works just fine.
5393 (Must be just a silly MS goof, I'm sure :-).
5396 > This action is scheduled for improvement.
5411 >+hide-user-agent{Netscape 6.1 (X11; I; Linux 2.4.18 i686)}</PRE
5426 NAME="INSPECT-JPEGS"
5428 >8.5.25. inspect-jpegs</H4
5432 CLASS="VARIABLELIST"
5438 >To protect against the MS buffer over-run in JPEG processing</P
5444 > Protect against a known exploit
5464 > See Microsoft Security Bulletin MS04-028. JPEG images are one of the most
5465 common image types found across the Internet. The exploit as described can
5466 allow execution of code on the target system, giving an attacker access
5467 to the system in question by merely planting an altered JPEG image, which
5468 would have no obvious indications of what lurks inside. This action
5469 prevents unwanted intrusion.
5484 >+inspect-jpegs</PRE
5500 >8.5.26. kill-popups<A
5507 CLASS="VARIABLELIST"
5513 >Eliminate those annoying pop-up windows (deprecated)</P
5519 > While loading the document, replace JavaScript code that opens
5520 pop-up windows with (syntactically neutral) dummy code on the fly.
5540 > This action is basically a built-in, hardwired special-purpose filter
5541 action, but there are important differences: For <TT
5545 the document need not be buffered, so it can be incrementally rendered while
5546 downloading. But <TT
5549 > doesn't catch as many pop-ups as
5553 HREF="actions-file.html#FILTER-ALL-POPUPS"
5562 does and is not as smart as <TT
5565 HREF="actions-file.html#FILTER-UNSOLICITED-POPUPS"
5569 >unsolicited-popups</I
5577 > Think of it as a fast and efficient replacement for a filter that you
5578 can use if you don't want any filtering at all. Note that it doesn't make
5579 sense to combine it with any <TT
5582 HREF="actions-file.html#FILTER"
5586 since as soon as one <TT
5589 HREF="actions-file.html#FILTER"
5593 the whole document needs to be buffered anyway, which destroys the advantage of
5597 > action over its filter equivalent.
5600 > Killing all pop-ups unconditionally is problematic. Many shops and banks rely on
5601 pop-ups to display forms, shopping carts etc, and the <TT
5604 HREF="actions-file.html#FILTER-UNSOLICITED-POPUPS"
5608 >unsolicited-popups</I
5613 > does a better job of catching only the unwanted ones.
5616 > If the only kind of pop-ups that you want to kill are exit consoles (those
5623 > windows that appear when you close an other
5624 one), you might want to use
5628 HREF="actions-file.html#FILTER"
5640 > This action is most appropriate for browsers that don't have any controls
5641 for unwanted pop-ups. Not recommended for general usage.
5670 NAME="LIMIT-CONNECT"
5672 >8.5.27. limit-connect</H4
5676 CLASS="VARIABLELIST"
5682 >Prevent abuse of <SPAN
5685 > as a TCP proxy relay or disable SSL for untrusted sites</P
5691 > Specifies to which ports HTTP CONNECT requests are allowable.
5704 > A comma-separated list of ports or port ranges (the latter using dashes, with the minimum
5705 defaulting to 0 and the maximum to 65K).
5712 > By default, i.e. if no <TT
5719 > only allows HTTP CONNECT
5720 requests to port 443 (the standard, secure HTTPS port). Use
5724 > if more fine-grained control is desired
5725 for some or all destinations.
5728 > The CONNECT methods exists in HTTP to allow access to secure websites
5732 > URLs) through proxies. It works very simply:
5733 the proxy connects to the server on the specified port, and then
5734 short-circuits its connections to the client and to the remote server.
5735 This can be a big security hole, since CONNECT-enabled proxies can be
5736 abused as TCP relays very easily.
5742 > relays HTTPS traffic without seeing
5743 the decoded content. Websites can leverage this limitation to circumvent <SPAN
5747 filters. By specifying an invalid port range you can disable HTTPS entirely.
5748 If you plan to disable SSL by default, consider enabling
5752 HREF="actions-file.html#TREAT-FORBIDDEN-CONNECTS-LIKE-BLOCKS"
5753 >treat-forbidden-connects-like-blocks</A
5756 as well, to be able to quickly create exceptions.
5760 >Example usages:</DT
5771 >+limit-connect{443} # This is the default and need not be specified.
5772 +limit-connect{80,443} # Ports 80 and 443 are OK.
5773 +limit-connect{-3, 7, 20-100, 500-} # Ports less than 3, 7, 20 to 100 and above 500 are OK.
5774 +limit-connect{-} # All ports are OK
5775 +limit-connect{,} # No HTTPS/SSL traffic is allowed</PRE
5790 NAME="PREVENT-COMPRESSION"
5792 >8.5.28. prevent-compression</H4
5796 CLASS="VARIABLELIST"
5802 > Ensure that servers send the content uncompressed, so it can be
5806 HREF="actions-file.html#FILTER"
5816 > Removes the Accept-Encoding header which can be used to ask for compressed transfer.
5836 > More and more websites send their content compressed by default, which
5837 is generally a good idea and saves bandwidth. But for the <TT
5840 HREF="actions-file.html#FILTER"
5846 HREF="actions-file.html#DEANIMATE-GIFS"
5853 HREF="actions-file.html#KILL-POPUPS"
5860 > needs access to the uncompressed data.
5861 Unfortunately, <SPAN
5864 > can't yet(!) uncompress, filter, and
5865 re-compress the content on the fly. So if you want to ensure that all websites, including
5866 those that normally compress, can be filtered, you need to use this action.
5869 > This will slow down transfers from those websites, though. If you use any of the above-mentioned
5870 actions, you will typically want to use <TT
5872 >prevent-compression</TT
5877 > Note that some (rare) ill-configured sites don't handle requests for uncompressed
5878 documents correctly (they send an empty document body). If you use <TT
5880 >prevent-compression</TT
5882 per default, you'll have to add exceptions for those sites. See the example for how to do that.
5886 >Example usage (sections):</DT
5899 {+prevent-compression}
5902 # Make exceptions for ill sites:
5904 {-prevent-compression}
5906 www.pclinuxonline.com</PRE
5921 NAME="OVERWRITE-LAST-MODIFIED"
5923 >8.5.29. overwrite-last-modified</H4
5927 CLASS="VARIABLELIST"
5933 >Prevent yet another way to track the user's steps between sessions.</P
5941 >"Last-Modified:"</SPAN
5942 > HTTP server header or modifies its value.
5955 > One of the keywords: <SPAN
5960 >"reset-to-request-time"</SPAN
5972 > Removing the <SPAN
5974 >"Last-Modified:"</SPAN
5975 > header is useful for filter
5976 testing, where you want to force a real reload instead of getting status
5980 >, which would cause the browser to reuse the old
5981 version of the page.
5987 > option overwrites the value of the
5990 >"Last-Modified:"</SPAN
5991 > header with a randomly chosen time
5992 between the original value and the current time. In theory the server
5993 could send each document with a different <SPAN
5995 >"Last-Modified:"</SPAN
5997 header to track visits without using cookies. <SPAN
6001 makes it impossible and the browser can still revalidate cached documents.
6006 >"reset-to-request-time"</SPAN
6007 > overwrites the value of the
6010 >"Last-Modified:"</SPAN
6011 > header with the current time. You could use
6012 this option together with
6016 HREF="actions-file.html#HIDE-IF-MODIFIED-SINCE"
6017 >hided-if-modified-since</A
6020 to further customize your random range.
6023 > The preferred parameter here is <SPAN
6027 to use, as long as the time settings are more or less correct.
6028 If the server sets the <SPAN
6030 >"Last-Modified:"</SPAN
6031 > header to the time
6032 of the request, the random range becomes zero and the value stays the same.
6033 Therefore you should later randomize it a second time with
6037 HREF="actions-file.html#HIDE-IF-MODIFIED-SINCE"
6038 >hided-if-modified-since</A
6044 > It is also recommended to use this action together with
6048 HREF="actions-file.html#CRUNCH-IF-NONE-MATCH"
6049 >crunch-if-none-match</A
6066 ># Let the browser revalidate without being tracked across sessions
6067 {+hide-if-modified-since {-60}\
6068 +overwrite-last-modified {randomize}\
6069 +crunch-if-none-match}
6087 >8.5.30. redirect</H4
6091 CLASS="VARIABLELIST"
6097 > Redirect requests to other sites.
6104 > Convinces the browser that the requested document has been moved
6105 to another location and the browser should get it from there.
6125 > This action is useful to replace whole documents with ones of your
6126 choosing. This can be used to enforce safe surfing, or just as a simple
6130 > You can do the same by combining the actions
6134 HREF="actions-file.html#BLOCK"
6141 HREF="actions-file.html#HANDLE-AS-IMAGE"
6148 HREF="actions-file.html#SET-IMAGE-BLOCKER"
6149 >set-image-blocker{URL}</A
6152 It doesn't sound right for non-image documents, and that's why this action
6156 > This action will be ignored if you use it together with
6160 HREF="actions-file.html#BLOCK"
6167 >Example usages:</DT
6178 ># Replace example.com's style sheet with another one
6179 { +redirect{http://localhost/css-replacements/example.com.css} }
6180 example.com/stylesheet.css
6182 # Create a short, easy to remember nickname for a favorite site
6183 { +redirect{http://www.privoxy.org/user-manual/actions-file.html} }
6199 NAME="SEND-VANILLA-WAFER"
6201 >8.5.31. send-vanilla-wafer</H4
6205 CLASS="VARIABLELIST"
6211 > Feed log analysis scripts with useless data.
6218 > Sends a cookie with each request stating that you do not accept any copyright
6219 on cookies sent to you, and asking the site operator not to track you.
6239 > The vanilla wafer is a (relatively) unique header and could conceivably be used to track you.
6242 > This action is rarely used and not enabled in the default configuration.
6257 >+send-vanilla-wafer</PRE
6274 >8.5.32. send-wafer</H4
6278 CLASS="VARIABLELIST"
6284 > Send custom cookies or feed log analysis scripts with even more useless data.
6291 > Sends a custom, user-defined cookie with each request.
6304 > A string of the form <SPAN
6324 > Being multi-valued, multiple instances of this action can apply to the same request,
6325 resulting in multiple cookies being sent.
6328 > This action is rarely used and not enabled in the default configuration.
6332 >Example usage (section):</DT
6343 >{+send-wafer{UsingPrivoxy=true}}
6344 my-internal-testing-server.void</PRE
6359 NAME="SESSION-COOKIES-ONLY"
6361 >8.5.33. session-cookies-only</H4
6365 CLASS="VARIABLELIST"
6371 > Allow only temporary <SPAN
6374 > cookies (for the current
6375 browser session <SPAN
6393 >"Set-Cookie:"</SPAN
6395 server headers. Most browsers will not store such cookies permanently and
6396 forget them in between sessions.
6416 > This is less strict than <TT
6419 HREF="actions-file.html#CRUNCH-INCOMING-COOKIES"
6420 >crunch-incoming-cookies</A
6426 HREF="actions-file.html#CRUNCH-OUTGOING-COOKIES"
6427 >crunch-outgoing-cookies</A
6429 > and allows you to browse
6430 websites that insist or rely on setting cookies, without compromising your privacy too badly.
6433 > Most browsers will not permanently store cookies that have been processed by
6436 >session-cookies-only</TT
6437 > and will forget about them between sessions.
6438 This makes profiling cookies useless, but won't break sites which require cookies so
6439 that you can log in for transactions. This is generally turned on for all
6440 sites, and is the recommended setting.
6451 >session-cookies-only</TT
6456 HREF="actions-file.html#CRUNCH-INCOMING-COOKIES"
6457 >crunch-incoming-cookies</A
6463 HREF="actions-file.html#CRUNCH-OUTGOING-COOKIES"
6464 >crunch-outgoing-cookies</A
6466 >. If you do, cookies
6467 will be plainly killed.
6470 > Note that it is up to the browser how it handles such cookies without an <SPAN
6474 field. If you use an exotic browser, you might want to try it out to be sure.
6477 > This setting also has no effect on cookies that may have been stored
6478 previously by the browser before starting <SPAN
6482 These would have to be removed manually.
6490 HREF="actions-file.html#FILTER-CONTENT-COOKIES"
6491 >content-cookies filter</A
6493 to block some types of cookies. Content cookies are not effected by
6496 >session-cookies-only</TT
6512 >+session-cookies-only</PRE
6527 NAME="SET-IMAGE-BLOCKER"
6529 >8.5.34. set-image-blocker</H4
6533 CLASS="VARIABLELIST"
6539 >Choose the replacement for blocked images</P
6545 > This action alone doesn't do anything noticeable. If <SPAN
6555 HREF="actions-file.html#BLOCK"
6567 HREF="actions-file.html#HANDLE-AS-IMAGE"
6577 apply, i.e. if the request is to be blocked as an image,
6584 > the parameter of this action decides what will be
6585 sent as a replacement.
6605 > to send a built-in checkerboard pattern image. The image is visually
6606 decent, scales very well, and makes it obvious where banners were busted.
6614 > to send a built-in transparent image. This makes banners disappear
6615 completely, but makes it hard to detect where <SPAN
6619 images on a given page and complicates troubleshooting if <SPAN
6623 has blocked innocent images, like navigation icons.
6637 send a redirect to <TT
6643 to any image anywhere, even in your local filesystem via <SPAN
6647 (But note that not all browsers support redirecting to a local file system).
6650 > A good application of redirects is to use special <SPAN
6654 URLs, which send the built-in images, as <TT
6660 This has the same visual effect as specifying <SPAN
6667 the first place, but enables your browser to cache the replacement image, instead of requesting
6668 it over and over again.
6677 > The URLs for the built-in images are <SPAN
6679 >"http://config.privoxy.org/send-banner?type=<TT
6700 > There is a third (advanced) type, called <SPAN
6712 >set-image-blocker</TT
6713 >, but meant for use from <A
6714 HREF="filter-file.html"
6717 Auto will select the type of image that would have applied to the referring page, had it been an image.
6735 >+set-image-blocker{pattern}</PRE
6742 > Redirect to the BSD devil:
6753 >+set-image-blocker{http://www.freebsd.org/gifs/dae_up3.gif}</PRE
6760 > Redirect to the built-in pattern for better caching:
6771 >+set-image-blocker{http://config.privoxy.org/send-banner?type=pattern}</PRE
6786 NAME="TREAT-FORBIDDEN-CONNECTS-LIKE-BLOCKS"
6788 >8.5.35. treat-forbidden-connects-like-blocks</H4
6792 CLASS="VARIABLELIST"
6798 >Block forbidden connects with an easy to find error message.</P
6804 > If this action is enabled, <SPAN
6808 makes a difference between forbidden connects and ordinary blocks.
6832 HREF="actions-file.html#LIMIT-CONNECT"
6838 with a short error message inside the headers. If the browser doesn't display
6839 headers (most don't), you just see an empty page.
6842 > With this action enabled, <SPAN
6846 the message that is used for ordinary blocks instead. If you decide
6847 to make an exception for the page in question, you can do so by
6857 > requests the clients tell
6861 > which host they are interested
6862 in, but not which document they plan to get later. As a result, the
6865 >"Go there anyway"</SPAN
6866 > link becomes rather useless:
6867 it lets the client request the home page of the forbidden host
6868 through unencrypted HTTP, still using the port of the last request.
6871 > If you previously configured <SPAN
6875 request through a SSL tunnel, everything will work. Most likely you haven't
6876 and the server will respond with an error message because it is expecting
6892 >+treat-forbidden-connects-like-blocks</PRE
6909 >8.5.36. Summary</H3
6911 > Note that many of these actions have the potential to cause a page to
6912 misbehave, possibly even not to display at all. There are many ways
6913 a site designer may choose to design his site, and what HTTP header
6914 content, and other criteria, he may depend on. There is no way to have hard
6915 and fast rules for all sites. See the <A
6916 HREF="appendix.html#ACTIONSANAT"
6918 > for a brief example on troubleshooting
6941 >, can be defined by combining other actions.
6942 These can in turn be invoked just like the built-in actions.
6943 Currently, an alias name can contain any character except space, tab,
6961 > that you only use <SPAN
6981 Alias names are not case sensitive, and are not required to start with a
6988 > sign, since they are merely textually
6991 > Aliases can be used throughout the actions file, but they <SPAN
6996 defined in a special section at the top of the file!</I
6999 And there can only be one such section per actions file. Each actions file may
7000 have its own alias section, and the aliases defined in it are only visible
7001 within that file.</P
7003 > There are two main reasons to use aliases: One is to save typing for frequently
7004 used combinations of actions, the other one is a gain in flexibility: If you
7005 decide once how you want to handle shops by defining an alias called
7009 >, you can later change your policy on shops in
7016 > place, and your changes will take effect everywhere
7017 in the actions file where the <SPAN
7020 > alias is used. Calling aliases
7021 by their purpose also makes your actions files more readable.</P
7023 > Currently, there is one big drawback to using aliases, though:
7027 >'s built-in web-based action file
7028 editor honors aliases when reading the actions files, but it expands
7029 them before writing. So the effects of your aliases are of course preserved,
7030 but the aliases themselves are lost when you edit sections that use aliases
7032 This is likely to change in future versions of <SPAN
7037 > Now let's define some aliases...</P
7047 > # Useful custom aliases we can use later.
7049 # Note the (required!) section header line and that this section
7050 # must be at the top of the actions file!
7054 # These aliases just save typing later:
7055 # (Note that some already use other aliases!)
7057 +crunch-all-cookies = +<A
7058 HREF="actions-file.html#CRUNCH-INCOMING-COOKIES"
7059 >crunch-incoming-cookies</A
7061 HREF="actions-file.html#CRUNCH-OUTGOING-COOKIES"
7062 >crunch-outgoing-cookies</A
7064 -crunch-all-cookies = -<A
7065 HREF="actions-file.html#CRUNCH-INCOMING-COOKIES"
7066 >crunch-incoming-cookies</A
7068 HREF="actions-file.html#CRUNCH-OUTGOING-COOKIES"
7069 >crunch-outgoing-cookies</A
7071 +block-as-image = +block +handle-as-image
7072 mercy-for-cookies = -crunch-all-cookies -<A
7073 HREF="actions-file.html#SESSION-COOKIES-ONLY"
7074 >session-cookies-only</A
7076 HREF="actions-file.html#FILTER-CONTENT-COOKIES"
7077 >filter{content-cookies}</A
7080 # These aliases define combinations of actions
7081 # that are useful for certain types of sites:
7084 HREF="actions-file.html#BLOCK"
7087 HREF="actions-file.html#FILTER"
7089 > -crunch-all-cookies -<A
7090 HREF="actions-file.html#FAST-REDIRECTS"
7093 HREF="actions-file.html#HIDE-REFERER"
7096 HREF="actions-file.html#KILL-POPUPS"
7099 shop = -crunch-all-cookies -<A
7100 HREF="actions-file.html#FILTER-ALL-POPUPS"
7101 >filter{all-popups}</A
7103 HREF="actions-file.html#KILL-POPUPS"
7107 # Short names for other aliases, for really lazy people ;-)
7109 c0 = +crunch-all-cookies
7110 c1 = -crunch-all-cookies</PRE
7116 > ...and put them to use. These sections would appear in the lower part of an
7117 actions file and define exceptions to the default actions (as specified further
7131 > # These sites are either very complex or very keen on
7132 # user data and require minimal interference to work:
7135 .office.microsoft.com
7136 .windowsupdate.microsoft.com
7140 # Allow cookies (for setting and retrieving your customer data)
7144 .worldpay.com # for quietpc.com
7147 # These shops require pop-ups:
7149 {shop -kill-popups -filter{all-popups}}
7151 .overclockers.co.uk</PRE
7157 > Aliases like <SPAN
7163 > are often used for
7167 > sites that require some actions to be disabled
7168 in order to function properly.</P
7177 >8.7. Actions Files Tutorial</H2
7179 > The above chapters have shown <A
7180 HREF="actions-file.html"
7181 >which actions files
7182 there are and how they are organized</A
7183 >, how actions are <A
7184 HREF="actions-file.html#ACTIONS"
7187 HREF="actions-file.html#ACTIONS-APPLY"
7191 HREF="actions-file.html#AF-PATTERNS"
7195 HREF="actions-file.html#ALIASES"
7197 >. Now, let's look at an
7205 file and see how all these pieces come together:</P
7213 >8.7.1. default.action</H3
7215 >Every config file should start with a short comment stating its purpose:</P
7225 ># Sample default.action file <ijbswa-developers@lists.sourceforge.net></PRE
7231 >Then, since this is the <TT
7235 first section is a special section for internal use that you needn't
7236 change or worry about:</P
7246 >##########################################################################
7247 # Settings -- Don't change! For internal Privoxy use ONLY.
7248 ##########################################################################
7251 for-privoxy-version=3.0</PRE
7257 >After that comes the (optional) alias section. We'll use the example
7258 section from the above <A
7259 HREF="actions-file.html#ALIASES"
7260 >chapter on aliases</A
7262 that also explains why and how aliases are used:</P
7272 >##########################################################################
7274 ##########################################################################
7277 # These aliases just save typing later:
7278 # (Note that some already use other aliases!)
7280 +crunch-all-cookies = +<A
7281 HREF="actions-file.html#CRUNCH-INCOMING-COOKIES"
7282 >crunch-incoming-cookies</A
7284 HREF="actions-file.html#CRUNCH-OUTGOING-COOKIES"
7285 >crunch-outgoing-cookies</A
7287 -crunch-all-cookies = -<A
7288 HREF="actions-file.html#CRUNCH-INCOMING-COOKIES"
7289 >crunch-incoming-cookies</A
7291 HREF="actions-file.html#CRUNCH-OUTGOING-COOKIES"
7292 >crunch-outgoing-cookies</A
7294 +block-as-image = +block +handle-as-image
7295 mercy-for-cookies = -crunch-all-cookies -<A
7296 HREF="actions-file.html#SESSION-COOKIES-ONLY"
7297 >session-cookies-only</A
7299 HREF="actions-file.html#FILTER-CONTENT-COOKIES"
7300 >filter{content-cookies}</A
7303 # These aliases define combinations of actions
7304 # that are useful for certain types of sites:
7307 HREF="actions-file.html#BLOCK"
7310 HREF="actions-file.html#FILTER"
7312 > -crunch-all-cookies -<A
7313 HREF="actions-file.html#FAST-REDIRECTS"
7316 HREF="actions-file.html#HIDE-REFERER"
7319 HREF="actions-file.html#KILL-POPUPS"
7322 shop = -crunch-all-cookies -<A
7323 HREF="actions-file.html#FILTER-ALL-POPUPS"
7324 >filter{all-popups}</A
7326 HREF="actions-file.html#KILL-POPUPS"
7334 > Now come the regular sections, i.e. sets of actions, accompanied
7335 by URL patterns to which they apply. Remember <SPAN
7340 are disabled when matching starts</I
7342 >, so we have to explicitly
7343 enable the ones we want.</P
7345 > The first regular section is probably the most important. It has only
7354 HREF="actions-file.html#AF-PATTERNS"
7355 >matches all URLs</A
7357 set of actions used in this <SPAN
7365 be applied to all requests as a start</I
7367 >. It can be partly or
7368 wholly overridden by later matches further down this file, or in user.action,
7369 but it will still be largely responsible for your overall browsing
7372 > Again, at the start of matching, all actions are disabled, so there is
7373 no real need to disable any actions here, but we will do that nonetheless,
7374 to have a complete listing for your reference. (Remember: a <SPAN
7378 preceding the action name enables the action, a <SPAN
7382 Also note how this long line has been made more readable by splitting it into
7383 multiple lines with line continuation.</P
7393 >##########################################################################
7394 # "Defaults" section:
7395 ##########################################################################
7398 HREF="actions-file.html#ADD-HEADER"
7402 HREF="actions-file.html#BLOCK"
7406 HREF="actions-file.html#CONTENT-TYPE-OVERWRITE"
7407 >content-type-overwrite</A
7410 HREF="actions-file.html#CRUNCH-CLIENT-HEADER"
7411 >crunch-client-header</A
7414 HREF="actions-file.html#CRUNCH-IF-NONE-MATCH"
7415 >crunch-if-none-match</A
7418 HREF="actions-file.html#CRUNCH-INCOMING-COOKIES"
7419 >crunch-incoming-cookies</A
7422 HREF="actions-file.html#CRUNCH-SERVER-HEADER"
7423 >crunch-server-header</A
7426 HREF="actions-file.html#CRUNCH-OUTGOING-COOKIES"
7427 >crunch-outgoing-cookies</A
7430 HREF="actions-file.html#DEANIMATE-GIFS"
7434 HREF="actions-file.html#DOWNGRADE-HTTP-VERSION"
7435 >downgrade-http-version</A
7438 HREF="actions-file.html#FAST-REDIRECTS"
7439 >fast-redirects{check-decoded-url}</A
7442 HREF="actions-file.html#FILTER-JS-ANNOYANCES"
7443 >filter{js-annoyances}</A
7446 HREF="actions-file.html#FILTER-JS-EVENTS"
7447 >filter{js-events}</A
7450 HREF="actions-file.html#FILTER-HTML-ANNOYANCES"
7451 >filter{html-annoyances}</A
7454 HREF="actions-file.html#FILTER-CONTENT-COOKIES"
7455 >filter{content-cookies}</A
7458 HREF="actions-file.html#FILTER-REFRESH-TAGS"
7459 >filter{refresh-tags}</A
7462 HREF="actions-file.html#FILTER-UNSOLICITED-POPUPS"
7463 >filter{unsolicited-popups}</A
7466 HREF="actions-file.html#FILTER-ALL-POPUPS"
7467 >filter{all-popups}</A
7470 HREF="actions-file.html#FILTER-IMG-REORDER"
7471 >filter{img-reorder}</A
7474 HREF="actions-file.html#FILTER-BANNERS-BY-SIZE"
7475 >filter{banners-by-size}</A
7478 HREF="actions-file.html#FILTER-BANNERS-BY-LINK"
7479 >filter{banners-by-link}</A
7482 HREF="actions-file.html#FILTER-WEBBUGS"
7486 HREF="actions-file.html#FILTER-TINY-TEXTFORMS"
7487 >filter{tiny-textforms}</A
7490 HREF="actions-file.html#FILTER-JUMPING-WINDOWS"
7491 >filter{jumping-windows}</A
7494 HREF="actions-file.html#FILTER-FRAMESET-BORDERS"
7495 >filter{frameset-borders}</A
7498 HREF="actions-file.html#FILTER-DEMORONIZER"
7499 >filter{demoronizer}</A
7502 HREF="actions-file.html#FILTER-SHOCKWAVE-FLASH"
7503 >filter{shockwave-flash}</A
7506 HREF="actions-file.html#FILTER-QUICKTIME-KIOSKMODE"
7507 >filter{quicktime-kioskmode}</A
7510 HREF="actions-file.html#FILTER-FUN"
7514 HREF="actions-file.html#FILTER-CRUDE-PARENTAL"
7515 >filter{crude-parental}</A
7518 HREF="actions-file.html#FILTER-IE-EXPLOITS"
7519 >filter{ie-exploits}</A
7522 HREF="actions-file.html#FILTER-CLIENT-HEADERS"
7523 >filter-client-headers</A
7526 HREF="actions-file.html#FILTER-SERVER-HEADERS"
7527 >filter-server-headers</A
7530 HREF="actions-file.html#FILTER-GOOGLE"
7534 HREF="actions-file.html#FILTER-YAHOO"
7538 HREF="actions-file.html#FILTER-MSN"
7542 HREF="actions-file.html#FILTER-BLOGSPOT"
7546 HREF="actions-file.html#FILTER-XML-TO-HTML"
7547 >filter-xml-to-html</A
7550 HREF="actions-file.html#FILTER-HTML-TO-XML"
7551 >filter-html-to-xml</A
7554 HREF="actions-file.html#FORCE-TEXT-MODE"
7558 HREF="actions-file.html#HANDLE-AS-EMPTY-DOCUMENT"
7559 >handle-as-empty-document</A
7562 HREF="actions-file.html#HANDLE-AS-IMAGE"
7566 HREF="actions-file.html#HIDE-ACCEPT-LANGUAGE"
7567 >hide-accept-language</A
7570 HREF="actions-file.html#HIDE-CONTENT-DISPOSITION"
7571 >hide-content-disposition</A
7574 HREF="actions-file.html#HIDE-IF-MODIFIED-SINCE"
7575 >hide-if-modified-since</A
7578 HREF="actions-file.html#HIDE-FORWARDED-FOR-HEADERS"
7579 >hide-forwarded-for-headers</A
7582 HREF="actions-file.html#HIDE-FROM-HEADER"
7583 >hide-from-header{block}</A
7586 HREF="actions-file.html#HIDE-REFERER"
7587 >hide-referrer{forge}</A
7590 HREF="actions-file.html#HIDE-USER-AGENT"
7594 HREF="actions-file.html#INSPECT-JPEGS"
7598 HREF="actions-file.html#KILL-POPUPS"
7602 HREF="actions-file.html#LIMIT-CONNECT"
7606 HREF="actions-file.html#PREVENT-COMPRESSION"
7607 >prevent-compression</A
7610 HREF="actions-file.html#OVERWRITE-LAST-MODIFIED"
7611 >overwrite-last-modified</A
7614 HREF="actions-file.html#REDIRECT"
7618 HREF="actions-file.html#SEND-VANILLA-WAFER"
7619 >send-vanilla-wafer</A
7622 HREF="actions-file.html#SEND-WAFER"
7626 HREF="actions-file.html#SESSION-COOKIES-ONLY"
7627 >session-cookies-only</A
7630 HREF="actions-file.html#SET-IMAGE-BLOCKER"
7631 >set-image-blocker{pattern}</A
7634 HREF="actions-file.html#TREAT-FORBIDDEN-CONNECTS-LIKE-BLOCKS"
7635 >treat-forbidden-connects-like-blocks</A
7638 / # forward slash will match *all* potential URL patterns.</PRE
7644 > The default behavior is now set. Note that some actions, like not hiding
7645 the user agent, are part of a <SPAN
7647 >"general policy"</SPAN
7649 universally and won't get any exceptions defined later. Other choices,
7650 like not blocking (which is <SPAN
7657 default!) need exceptions, i.e. we need to specify explicitly what we
7658 want to block in later sections.</P
7660 > The first of our specialized sections is concerned with <SPAN
7664 sites, i.e. sites that require minimum interference, because they are either
7665 very complex or very keen on tracking you (and have mechanisms in place that
7666 make them unusable for people who avoid being tracked). We will simply use
7670 > alias instead of stating the list
7671 of actions explicitly:</P
7681 >##########################################################################
7682 # Exceptions for sites that'll break under the default action set:
7683 ##########################################################################
7685 # "Fragile" Use a minimum set of actions for these sites (see alias above):
7688 .office.microsoft.com # surprise, surprise!
7689 .windowsupdate.microsoft.com
7690 mail.google.com</PRE
7696 > Shopping sites are not as fragile, but they typically
7697 require cookies to log in, and pop-up windows for shopping
7698 carts or item details. Again, we'll use a pre-defined alias:</P
7712 .worldpay.com # for quietpc.com
7723 HREF="actions-file.html#FAST-REDIRECTS"
7727 action, which we enabled per default above, breaks some sites. So disable
7728 it for popular sites where we know it misbehaves:</P
7739 HREF="actions-file.html#FAST-REDIRECTS"
7745 .altavista.com/.*(like|url|link):http
7746 .altavista.com/trans.*urltext=http
7753 > It is important that <SPAN
7757 URLs belong to images, so that <SPAN
7764 be blocked, a substitute image can be sent, rather than an HTML page.
7765 Contacting the remote site to find out is not an option, since it
7766 would destroy the loading time advantage of banner blocking, and it
7767 would feed the advertisers (in terms of money <SPAN
7774 information). We can mark any URL as an image with the <TT
7777 HREF="actions-file.html#HANDLE-AS-IMAGE"
7781 and marking all URLs that end in a known image file extension is a
7792 >##########################################################################
7794 ##########################################################################
7796 # Define which file types will be treated as images, in case they get
7797 # blocked further down this file:
7800 HREF="actions-file.html#HANDLE-AS-IMAGE"
7803 /.*\.(gif|jpe?g|png|bmp|ico)$</PRE
7809 > And then there are known banner sources. They often use scripts to
7810 generate the banners, so it won't be visible from the URL that the
7811 request is for an image. Hence we block them <SPAN
7818 mark them as images in one go, with the help of our
7821 >+block-as-image</TT
7822 > alias defined above. (We could of
7823 course just as well use <TT
7826 HREF="actions-file.html#BLOCK"
7830 HREF="actions-file.html#HANDLE-AS-IMAGE"
7834 Remember that the type of the replacement image is chosen by the
7838 HREF="actions-file.html#SET-IMAGE-BLOCKER"
7839 >set-image-blocker</A
7842 action. Since all URLs have matched the default section with its
7846 HREF="actions-file.html#SET-IMAGE-BLOCKER"
7847 >set-image-blocker</A
7850 action before, it still applies and needn't be repeated:</P
7860 ># Known ad generators:
7865 .ad.*.doubleclick.net
7866 .a.yimg.com/(?:(?!/i/).)*$
7867 .a[0-9].yimg.com/(?:(?!/i/).)*$
7875 > One of the most important jobs of <SPAN
7879 is to block banners. Many of these can be <SPAN
7886 HREF="actions-file.html#FILTER"
7888 >{banners-by-size}</TT
7890 action, which we enabled above, and which deletes the references to banner
7891 images from the pages while they are loaded, so the browser doesn't request
7892 them anymore, and hence they don't need to be blocked here. But this naturally
7893 doesn't catch all banners, and some people choose not to use filters, so we
7894 need a comprehensive list of patterns for banner URLs here, and apply the
7898 HREF="actions-file.html#BLOCK"
7901 > action to them.</P
7903 > First comes many generic patterns, which do most of the work, by
7904 matching typical domain and path name components of banners. Then comes
7905 a list of individual patterns for specific sites, which is omitted here
7906 to keep the example short:</P
7916 >##########################################################################
7917 # Block these fine banners:
7918 ##########################################################################
7920 HREF="actions-file.html#BLOCK"
7930 /.*count(er)?\.(pl|cgi|exe|dll|asp|php[34]?)
7931 /(?:.*/)?(publicite|werbung|rekla(ma|me|am)|annonse|maino(kset|nta|s)?)/
7933 # Site-specific patterns (abbreviated):
7941 > It's quite remarkable how many advertisers actually call their banner
7947 >.com, or call the directory
7948 in which the banners are stored simply <SPAN
7952 generic patterns are surprisingly effective.</P
7954 > But being very generic, they necessarily also catch URLs that we don't want
7955 to block. The pattern <TT
7967 >.nasty-corp.com"</SPAN
7977 >.sourcefroge.net"</SPAN
7987 >l.some-provider.net."</SPAN
7989 well-known exceptions to the <TT
7992 HREF="actions-file.html#BLOCK"
7998 > Note that these are exceptions to exceptions from the default! Consider the URL
8001 >"downloads.sourcefroge.net"</SPAN
8002 >: Initially, all actions are deactivated,
8003 so it wouldn't get blocked. Then comes the defaults section, which matches the
8004 URL, but just deactivates the <TT
8007 HREF="actions-file.html#BLOCK"
8011 action once again. Then it matches <TT
8014 >, an exception to the
8015 general non-blocking policy, and suddenly
8019 HREF="actions-file.html#BLOCK"
8022 > applies. And now, it'll match
8029 HREF="actions-file.html#BLOCK"
8033 applies, so (unless it matches <SPAN
8039 > further down) it ends up
8043 HREF="actions-file.html#BLOCK"
8046 > action applying.</P
8056 >##########################################################################
8057 # Save some innocent victims of the above generic block patterns:
8058 ##########################################################################
8063 HREF="actions-file.html#BLOCK"
8066 adv[io]*. # (for advogato.org and advice.*)
8067 adsl. # (has nothing to do with ads)
8068 adobe. # (has nothing to do with ads either)
8069 ad[ud]*. # (adult.* and add.*)
8070 .edu # (universities don't host banners (yet!))
8071 .*loads. # (downloads, uploads etc)
8079 www.globalintersec.com/adv # (adv = advanced)
8080 www.ugu.com/sui/ugu/adv</PRE
8086 > Filtering source code can have nasty side effects,
8087 so make an exception for our friends at sourceforge.net,
8088 and all paths with <SPAN
8091 > in them. Note that
8095 HREF="actions-file.html#FILTER"
8105 > filters in one fell swoop!</P
8115 ># Don't filter code!
8118 HREF="actions-file.html#FILTER"
8125 .sourceforge.net</PRE
8134 > is of course much more
8135 comprehensive, but we hope this example made clear how it works.</P
8144 >8.7.2. user.action</H3
8146 > So far we are painting with a broad brush by setting general policies,
8147 which would be a reasonable starting point for many people. Now,
8148 you might want to be more specific and have customized rules that
8149 are more suitable to your personal habits and preferences. These would
8150 be for narrowly defined situations like your ISP or your bank, and should
8154 >, which is parsed after all other
8155 actions files and hence has the last word, over-riding any previously
8156 defined actions. <TT
8166 > place for your personal settings, since
8170 > is actively maintained by the
8174 > developers and you'll probably want
8175 to install updated versions from time to time.</P
8177 > So let's look at a few examples of things that one might typically do in
8191 ># My user.action file. <fred@foobar.com></PRE
8198 HREF="actions-file.html#ALIASES"
8200 > are local to the actions
8201 file that they are defined in, you can't use the ones from
8205 >, unless you repeat them here:</P
8215 ># Aliases are local to the file they are defined in.
8216 # (Re-)define aliases for this file:
8220 # These aliases just save typing later, and the alias names should
8221 # be self explanatory.
8223 +crunch-all-cookies = +crunch-incoming-cookies +crunch-outgoing-cookies
8224 -crunch-all-cookies = -crunch-incoming-cookies -crunch-outgoing-cookies
8225 allow-all-cookies = -crunch-all-cookies -session-cookies-only
8226 allow-popups = -filter{all-popups} -kill-popups
8227 +block-as-image = +block +handle-as-image
8228 -block-as-image = -block
8230 # These aliases define combinations of actions that are useful for
8231 # certain types of sites:
8233 fragile = -block -crunch-all-cookies -filter -fast-redirects -hide-referrer -kill-popups
8234 shop = -crunch-all-cookies allow-popups
8236 # Allow ads for selected useful free sites:
8238 allow-ads = -block -filter{banners-by-size} -filter{banners-by-link}
8240 # Alias for specific file types that are text, but might have conflicting
8241 # MIME types. We want the browser to force these to be text documents.
8242 handle-as-text = -<A
8243 HREF="actions-file.html#FILTER"
8246 HREF="actions-file.html#CONTENT-TYPE-OVERWRITE"
8247 >content-type-overwrite{text/plain}</A
8249 HREF="actions-file.html#FORCE-TEXT-MODE"
8252 HREF="actions-file.html#HIDE-CONTENT-DISPOSITION"
8253 >hide-content-disposition</A
8260 > Say you have accounts on some sites that you visit regularly, and
8261 you don't want to have to log in manually each time. So you'd like
8262 to allow persistent cookies for these sites. The
8265 >allow-all-cookies</TT
8266 > alias defined above does exactly
8267 that, i.e. it disables crunching of cookies in any direction, and the
8268 processing of cookies to make them only temporary.</P
8278 >{ allow-all-cookies }
8288 > Your bank is allergic to some filter, but you don't know which, so you disable them all:</P
8299 HREF="actions-file.html#FILTER"
8302 .your-home-banking-site.com</PRE
8308 > Some file types you may not want to filter for various reasons:</P
8318 ># Technical documentation is likely to contain strings that might
8319 # erroneously get altered by the JavaScript-oriented filters:
8324 # And this stupid host sends streaming video with a wrong MIME type,
8325 # so that Privoxy thinks it is getting HTML and starts filtering:
8327 stupid-server.example.com/</PRE
8333 > Example of a simple <A
8334 HREF="actions-file.html#BLOCK"
8336 > action. Say you've
8337 seen an ad on your favourite page on example.com that you want to get rid of.
8338 You have right-clicked the image, selected <SPAN
8340 >"copy image location"</SPAN
8342 and pasted the URL below while removing the leading http://, into a
8346 > section. Note that <TT
8350 > need not be specified, since all URLs ending in
8354 > will be tagged as images by the general rules as set
8355 in default.action anyway:</P
8366 HREF="actions-file.html#BLOCK"
8369 www.example.com/nasty-ads/sponsor.gif
8370 another.popular.site.net/more/junk/here/</PRE
8376 > The URLs of dynamically generated banners, especially from large banner
8377 farms, often don't use the well-known image file name extensions, which
8378 makes it impossible for <SPAN
8382 the file type just by looking at the URL.
8385 >+block-as-image</TT
8386 > alias defined above for
8388 Note that objects which match this rule but then turn out NOT to be an
8389 image are typically rendered as a <SPAN
8391 >"broken image"</SPAN
8393 browser. Use cautiously.</P
8403 >{ +block-as-image }
8413 > Now you noticed that the default configuration breaks Forbes Magazine,
8414 but you were too lazy to find out which action is the culprit, and you
8415 were again too lazy to give <A
8419 you just used the <TT
8422 > alias on the site, and
8429 > -- it worked. The <TT
8433 aliases disables those actions that are most likely to break a site. Also,
8434 good for testing purposes to see if it is <SPAN
8438 that is causing the problem or not. We later find other regular sites
8439 that misbehave, and add those to our personalized list of troublemakers:</P
8458 > You like the <SPAN
8461 > text replacements in <TT
8465 but it is disabled in the distributed actions file. (My colleagues on the team just
8466 don't have a sense of humour, that's why! ;-). So you'd like to turn it on in your private,
8467 update-safe config, once and for all:</P
8478 HREF="actions-file.html#FILTER-FUN"
8481 / # For ALL sites!</PRE
8487 > Note that the above is not really a good idea: There are exceptions
8488 to the filters in <TT
8492 really shouldn't be filtered, like code on CVS->Web interfaces. Since
8496 > has the last word, these exceptions
8497 won't be valid for the <SPAN
8500 > filtering specified here.</P
8502 > You might also worry about how your favourite free websites are
8503 funded, and find that they rely on displaying banner advertisements
8504 to survive. So you might want to specifically allow banners for those
8505 sites that you feel provide value to you:</P
8527 > has been aliased to
8531 HREF="actions-file.html#BLOCK"
8538 HREF="actions-file.html#FILTER-BANNERS-BY-SIZE"
8539 >filter{banners-by-size}</A
8545 HREF="actions-file.html#FILTER-BANNERS-BY-LINK"
8546 >filter{banners-by-link}</A
8550 > Invoke another alias here to force an over-ride of the MIME type <TT
8552 > application/x-sh</TT
8553 > which typically would open a download type
8554 dialog. In my case, I want to look at the shell script, and then I can save
8555 it should I choose to.</P
8575 > is generally the best place to define
8576 exceptions and additions to the default policies of
8580 >. Some actions are safe to have their
8581 default policies set here though. So let's set a default policy to have a
8585 > image as opposed to the checkerboard pattern for
8595 > of course matches all URL
8596 paths and patterns:</P
8607 HREF="actions-file.html#SET-IMAGE-BLOCKER"
8608 >set-image-blocker{blank}</A
8623 SUMMARY="Footer navigation table"
8652 HREF="filter-file.html"
8662 >The Main Configuration File</TD