7 CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
10 TITLE="Privoxy 3.0.5 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.5 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.
214 > button allows you to turn each
215 action on/off individually for fine-tuning. The <SPAN
219 button changes the actions list to low/safe settings which will activate
220 a minimal set of <SPAN
223 >'s features, and subsequently there will be
224 less of a chance for accidental problems. The <SPAN
228 button sets the list to a medium level of ad blocking and a low level set of
229 privacy features. The <SPAN
233 sets the list to a high level of ad blocking and medium level of
234 privacy. See the chart below. The latter three buttons over-ride
235 any changes via with the <SPAN
239 fine-tuning can be done in the lower sections of this internal page.
242 > It is not recommend to edit the <TT
249 > The default profiles, and their associated actions, as pre-defined in
263 >Table 1. Default Configurations</B
298 >Ad-blocking Aggressiveness</TD
320 >Ad-filtering by size</TD
342 >Ad-filtering by link</TD
386 >Privacy Features</TD
452 >GIF de-animation</TD
518 >JavaScript taming</TD
562 >Image tag reordering</TD
589 > The list of actions files to be used are defined in the main configuration
590 file, and are processed in the order they are defined (e.g.
594 > is typically process before
598 >). The content of these can all be viewed and
600 HREF="http://config.privoxy.org/show-status"
602 >http://config.privoxy.org/show-status</A
604 The over-riding principle when applying actions, is that the last action that
605 matches a given URL, wins. The broadest, most general rules go first
610 followed by any exceptions (typically also in
614 >), which are then followed lastly by any
615 local preferences (typically in <SPAN
631 > An actions file typically has multiple sections. If you want to use
635 > in an actions file, you have to place the (optional)
637 HREF="actions-file.html#ALIASES"
639 > at the top of that file.
640 Then comes the default set of rules which will apply universally to all
641 sites and pages (be <SPAN
651 > or any other actions file after
655 >, because it will override the result
656 from consulting any previous file). And then below that,
657 exceptions to the defined universal policies. You can regard
661 > as an appendix to <TT
665 with the advantage that is a separate file, which makes preserving your
666 personal settings across <SPAN
669 > upgrades easier.</P
672 Actions can be used to block anything you want, including ads, banners, or
673 just some obnoxious URL that you would rather not see. Cookies can be accepted
674 or rejected, or accepted only during the current browser session (i.e. not
675 written to disk), content can be modified, JavaScripts tamed, user-tracking
676 fooled, and much more. See below for a <A
677 HREF="actions-file.html#ACTIONS"
688 >8.1. Finding the Right Mix</H2
691 HREF="actions-file.html#ACTIONS"
693 >, like cookie suppression
694 or script disabling, may render some sites unusable that rely on these
695 techniques to work properly. Finding the right mix of actions is not always easy and
696 certainly a matter of personal taste. And, things can always change, requiring
697 refinements in the configuration. In general, it can be said that the more
701 > your default settings (in the top section of the
702 actions file) are, the more exceptions for <SPAN
706 will have to make later. If, for example, you want to crunch all cookies per
707 default, you'll have to make exceptions from that rule for sites that you
708 regularly use and that require cookies for actually useful purposes, like maybe
709 your bank, favorite shop, or newspaper. </P
711 > We have tried to provide you with reasonable rules to start from in the
712 distribution actions files. But there is no general rule of thumb on these
713 things. There just are too many variables, and sites are constantly changing.
714 Sooner or later you will want to change the rules (and read this chapter again :).</P
723 >8.2. How to Edit</H2
725 > The easiest way to edit the actions files is with a browser by
726 using our browser-based editor, which can be reached from <A
727 HREF="http://config.privoxy.org/show-status"
729 >http://config.privoxy.org/show-status</A
731 The editor allows both fine-grained control over every single feature on a
732 per-URL basis, and easy choosing from wholesale sets of defaults like
746 > setting is more aggressive, and
747 will be more likely to cause problems for some sites. Experienced users only!</P
749 > If you prefer plain text editing to GUIs, you can of course also directly edit the
750 the actions files with your favorite text editor. Look at
754 > which is richly commented with many
764 >8.3. How Actions are Applied to URLs</H2
766 > Actions files are divided into sections. There are special sections,
770 HREF="actions-file.html#ALIASES"
773 > sections which will
774 be discussed later. For now let's concentrate on regular sections: They have a
775 heading line (often split up to multiple lines for readability) which consist
776 of a list of actions, separated by whitespace and enclosed in curly braces.
777 Below that, there is a list of URL patterns, each on a separate line.</P
779 > To determine which actions apply to a request, the URL of the request is
780 compared to all patterns in each <SPAN
783 > file. Every time it matches, the list of
784 applicable actions for the URL is incrementally updated, using the heading
785 of the section in which the pattern is located. If multiple matches for
786 the same URL set the same action differently, the last match wins. If not,
787 the effects are aggregated. E.g. a URL might match a regular section with
788 a heading line of <TT
792 HREF="actions-file.html#HANDLE-AS-IMAGE"
796 then later another one with just <TT
800 HREF="actions-file.html#BLOCK"
810 > actions to apply. And there may well be
811 cases where you will want to combine actions together. Such a section then
829 # Block these as if they were images. Send no block page.
831 media.example.com/.*banners
832 .example.com/images/ads/</PRE
839 > You can trace this process for any given URL by visiting <A
840 HREF="http://config.privoxy.org/show-url-info"
842 >http://config.privoxy.org/show-url-info</A
845 > Examples and more detail on this is provided in the Appendix, <A
846 HREF="appendix.html#ACTIONSANAT"
847 > Troubleshooting: Anatomy of an Action</A
867 to determine what <SPAN
873 > might apply to which sites and
874 pages your browser attempts to access. These <SPAN
884 > matching to achieve a high degree of
885 flexibility. This allows one expression to be expanded and potentially match
886 against many similar patterns.</P
891 > pattern has the form
894 ><domain>/<path></TT
898 ><domain></TT
903 optional. (This is why the special <TT
906 > pattern matches all
907 URLs). Note that the protocol portion of the URL pattern (e.g.
918 the pattern. This is assumed already!</P
920 > The pattern matching syntax is different for the domain and path parts of
921 the URL. The domain part uses a simple globbing type matching technique,
922 while the path part uses a more flexible
924 HREF="http://en.wikipedia.org/wiki/Regular_expressions"
929 Expressions (PCRE)"</SPAN
940 >www.example.com/</TT
944 > is a domain-only pattern and will match any request to <TT
948 regardless of which document on that server is requested. So ALL pages in
949 this domain would be covered by the scope of this action. Note that a
953 > is different and would NOT match.
963 > means exactly the same. For domain-only patterns, the trailing <TT
973 >www.example.com/index.html</TT
977 > matches only the single document <TT
994 > matches the document <TT
997 >, regardless of the domain,
1004 > web server anywhere.
1014 > matches nothing, since it would be interpreted as a domain name and
1015 there is no top-level domain called <TT
1031 >8.4.1. The Domain Pattern</H3
1033 > The matching of the domain part offers some flexible options: if the
1034 domain starts or ends with a dot, it becomes unanchored at that end.
1039 CLASS="VARIABLELIST"
1048 > matches any domain that <SPAN
1068 > matches any domain that <SPAN
1088 > matches any domain that <SPAN
1098 And, by the way, also included would be any files or documents that exist
1099 within that domain since no path limitations are specified. (Correctly
1100 speaking: It matches any FQDN that contains <TT
1104 a domain.) This might be <TT
1106 >www.example.com</TT
1110 >news.example.de</TT
1114 >www.example.net/cgi/testing.pl</TT
1115 > for instance. All these
1122 > Additionally, there are wild-cards that you can use in the domain names
1123 themselves. These work similarly to shell globbing type wild-cards:
1127 > represents zero or more arbitrary characters (this is
1130 HREF="http://en.wikipedia.org/wiki/Regular_expressions"
1137 > based syntax of <SPAN
1144 > represents any single character (this is equivalent to the
1145 regular expression syntax of a simple <SPAN
1148 >), and you can define
1151 >"character classes"</SPAN
1152 > in square brackets which is similar to
1153 the same regular expression technique. All of this can be freely mixed:</P
1157 CLASS="VARIABLELIST"
1162 >ad*.example.com</TT
1168 >"adserver.example.com"</SPAN
1172 >"ads.example.com"</SPAN
1173 >, etc but not <SPAN
1175 >"sfads.example.com"</SPAN
1182 >*ad*.example.com</TT
1186 > matches all of the above, and then some.
1202 >pictures.epix.com</TT
1205 >a.b.c.d.e.upix.com</TT
1212 >www[1-9a-ez].example.c*</TT
1218 >www1.example.com</TT
1222 >www4.example.cc</TT
1225 >wwwd.example.cy</TT
1229 >wwwz.example.com</TT
1239 >wwww.example.com</TT
1246 > While flexibile, this is not the sophistication of full regular expression based syntax.</P
1255 >8.4.2. The Path Pattern</H3
1260 > uses Perl compatible (PCRE)
1262 HREF="http://en.wikipedia.org/wiki/Regular_expressions"
1271 HREF="http://www.pcre.org/"
1275 matching the path portion (after the slash), and is thus more flexible.</P
1278 HREF="appendix.html#REGEX"
1280 > with a brief quick-start into regular
1281 expressions, and full (very technical) documentation on PCRE regex syntax is available on-line
1283 HREF="http://www.pcre.org/man.txt"
1285 >http://www.pcre.org/man.txt</A
1287 You might also find the Perl man page on regular expressions (<TT
1291 useful, which is available on-line at <A
1292 HREF="http://perldoc.perl.org/perlre.html"
1294 >http://perldoc.perl.org/perlre.html</A
1297 > Note that the path pattern is automatically left-anchored at the <SPAN
1301 i.e. it matches as if it would start with a <SPAN
1304 > (regular expression speak
1305 for the beginning of a line).</P
1307 > Please also note that matching in the path is <SPAN
1311 >CASE INSENSITIVE</I
1314 by default, but you can switch to case sensitive at any point in the pattern by using the
1320 >www.example.com/(?-i)PaTtErN.*</TT
1322 only documents whose path starts with <TT
1332 > this capitalization.</P
1336 CLASS="VARIABLELIST"
1341 >.example.com/.*</TT
1345 > Is equivalent to just <SPAN
1347 >".example.com"</SPAN
1348 >, since any documents
1349 within that domain are matched with or without the <SPAN
1353 regular expression. This is redundant
1359 >.example.com/.*/index.html</TT
1363 > Will match any page in the domain of <SPAN
1365 >"example.com"</SPAN
1370 >, and that is part of some path. For
1371 example, it matches <SPAN
1373 >"www.example.com/testing/index.html"</SPAN
1377 >"www.example.com/index.html"</SPAN
1378 > because the regular
1379 expression called for at least two <SPAN
1383 requirement. It also would match
1386 >"www.example.com/testing/index_html"</SPAN
1388 special meta-character <SPAN
1397 >.example.com/(.*/)?index\.html</TT
1401 > This regular expression is conditional so it will match any page
1405 > regardless of path which in this case can
1406 have one or more <SPAN
1409 >. And this one must contain exactly
1413 > (but does not have to end with that!).
1419 >.example.com/(.*/)(ads|banners?|junk)</TT
1423 > This regular expression will match any path of <SPAN
1425 >"example.com"</SPAN
1427 that contains any of the words <SPAN
1437 > (because of the <SPAN
1444 The path does not have to end in these words, just contain them.
1450 >.example.com/(.*/)(ads|banners?|junk)/.*\.(jpe?g|gif|png)$</TT
1454 > This is very much the same as above, except now it must end in either
1468 one is limited to common image formats.
1474 > There are many, many good examples to be found in <TT
1478 and more tutorials below in <A
1479 HREF="appendix.html#REGEX"
1480 >Appendix on regular expressions</A
1493 > All actions are disabled by default, until they are explicitly enabled
1494 somewhere in an actions file. Actions are turned on if preceded with a
1498 >, and turned off if preceded with a <SPAN
1507 >"do that action"</SPAN
1514 >"please block URLs that match the
1515 following patterns"</SPAN
1522 block URLs that match the following patterns, even if <TT
1526 previously applied."</SPAN
1530 Again, actions are invoked by placing them on a line, enclosed in curly braces and
1531 separated by whitespace, like in
1534 >{+some-action -some-other-action{some-parameter}}</TT
1536 followed by a list of URL patterns, one per line, to which they apply.
1537 Together, the actions line and the following pattern lines make up a section
1538 of the actions file. </P
1541 Actions fall into three categories:</P
1549 Boolean, i.e the action can only be <SPAN
1572 > # enable action <TT
1583 > # disable action <TT
1605 Parameterized, where some value is required in order to enable this type of action.
1627 >} # enable action and set parameter to <TT
1633 # overwriting parameter from previous match if necessary
1639 > # disable action. The parameter can be omitted</PRE
1646 > Note that if the URL matches multiple positive forms of a parameterized action,
1647 the last match wins, i.e. the params from earlier matches are simply ignored.
1653 >+hide-user-agent{ Mozilla 1.0 }</TT
1660 Multi-value. These look exactly like parameterized actions,
1661 but they behave differently: If the action applies multiple times to the
1662 same URL, but with different parameters, <SPAN
1675 > matches are remembered. This is used for actions
1676 that can be executed for the same request repeatedly, like adding multiple
1677 headers, or filtering through multiple filters. Syntax:
1698 >} # enable action and add <TT
1703 > to the list of parameters
1714 >} # remove the parameter <TT
1719 > from the list of parameters
1720 # If it was the last one left, disable the action.
1726 > # disable this action completely and remove all parameters from the list</PRE
1736 >+add-header{X-Fun-Header: Some text}</TT
1740 >+filter{html-annoyances}</TT
1747 > If nothing is specified in any actions file, no <SPAN
1751 taken. So in this case <SPAN
1755 normal, non-blocking, non-anonymizing proxy. You must specifically enable the
1756 privacy and blocking features you need (although the provided default actions
1757 files will give a good starting point).</P
1759 > Later defined actions always over-ride earlier ones. So exceptions
1760 to any rules you make, should come in the latter part of the file (or
1761 in a file that is processed later when using multiple actions files such
1765 >). For multi-valued actions, the actions
1766 are applied in the order they are specified. Actions files are processed in
1767 the order they are defined in <TT
1771 installation has three actions files). It also quite possible for any given
1772 URL pattern to match more than one pattern and thus more than one set of
1773 actions! Last match wins.</P
1775 > The list of valid <SPAN
1786 >8.5.1. add-header</H4
1790 CLASS="VARIABLELIST"
1796 >Confuse log analysis, custom applications</P
1802 > Sends a user defined HTTP header to the web server.
1815 > Any string value is possible. Validity of the defined HTTP headers is not checked.
1816 It is recommended that you use the <SPAN
1830 > This action may be specified multiple times, in order to define multiple
1831 headers. This is rarely needed for the typical user. If you don't know what
1834 >"HTTP headers"</SPAN
1835 > are, you definitely don't need to worry about this
1851 >+add-header{X-User-Tracking: sucks}</PRE
1872 CLASS="VARIABLELIST"
1878 >Block ads or other unwanted content</P
1884 > Requests for URLs to which this action applies are blocked, i.e. the
1885 requests are trapped by <SPAN
1888 > and the requested URL is never retrieved,
1889 but is answered locally with a substitute page or image, as determined by
1893 HREF="actions-file.html#HANDLE-AS-IMAGE"
1900 HREF="actions-file.html#SET-IMAGE-BLOCKER"
1901 >set-image-blocker</A
1907 HREF="actions-file.html#HANDLE-AS-EMPTY-DOCUMENT"
1908 >handle-as-empty-document</A
1933 > sends a special <SPAN
1937 for requests to blocked pages. This page contains links to find out why the request
1938 was blocked, and a click-through to the blocked content (the latter only if compiled with the
1939 force feature enabled). The <SPAN
1942 > page adapts to the available
1943 screen space -- it displays full-blown if space allows, or miniaturized and text-only
1944 if loaded into a small frame or window. If you are using <SPAN
1948 right now, you can take a look at the
1950 HREF="http://ads.bannerserver.example.com/nasty-ads/sponsor.html"
1961 A very important exception occurs if <SPAN
1974 HREF="actions-file.html#HANDLE-AS-IMAGE"
1978 apply to the same request: it will then be replaced by an image. If
1982 HREF="actions-file.html#SET-IMAGE-BLOCKER"
1983 >set-image-blocker</A
1986 (see below) also applies, the type of image will be determined by its parameter,
1987 if not, the standard checkerboard pattern is sent.
1990 > It is important to understand this process, in order
1991 to understand how <SPAN
1995 ads and other unwanted content. Blocking is a core feature, and one
1996 upon which various other features depend.
2002 HREF="actions-file.html#FILTER"
2006 action can perform a very similar task, by <SPAN
2010 banner images and other content through rewriting the relevant URLs in the
2011 document's HTML source, so they don't get requested in the first place.
2012 Note that this is a totally different technique, and it's easy to confuse the two.
2016 >Example usage (section):</DT
2028 # Block and replace with "blocked" page
2029 .nasty-stuff.example.com
2031 {+block +handle-as-image}
2032 # Block and replace with image
2036 {+block +handle-as-empty-document}
2037 # Block and then ignore
2038 adserver.exampleclick.net/.*\.js$</PRE
2053 NAME="CONTENT-TYPE-OVERWRITE"
2055 >8.5.3. content-type-overwrite</H4
2059 CLASS="VARIABLELIST"
2065 >Stop useless download menus from popping up, or change the browser's rendering mode</P
2071 > Replaces the <SPAN
2073 >"Content-Type:"</SPAN
2074 > HTTP server header.
2096 >"Content-Type:"</SPAN
2097 > HTTP server header is used by the
2098 browser to decide what to do with the document. The value of this
2099 header can cause the browser to open a download menu instead of
2100 displaying the document by itself, even if the document's format is
2101 supported by the browser.
2104 > The declared content type can also affect which rendering mode
2105 the browser chooses. If XHTML is delivered as <SPAN
2109 many browsers treat it as yet another broken HTML document.
2110 If it is send as <SPAN
2112 >"application/xml"</SPAN
2114 XHTML support will only display it, if the syntax is correct.
2117 > If you see a web site that proudly uses XHTML buttons, but sets
2120 >"Content-Type: text/html"</SPAN
2121 >, you can use <SPAN
2125 to overwrite it with <SPAN
2127 >"application/xml"</SPAN
2129 the web master's claim inside your XHTML-supporting browser.
2130 If the syntax is incorrect, the browser will complain loudly.
2133 > You can also go the opposite direction: if your browser prints
2134 error messages instead of rendering a document falsely declared
2135 as XHTML, you can overwrite the content type with
2139 > and have it rendered as broken HTML document.
2144 >content-type-overwrite</TT
2148 >"Content-Type:"</SPAN
2149 > headers that look like some kind of text.
2150 If you want to overwrite it unconditionally, you have to combine it with
2154 HREF="actions-file.html#FORCE-TEXT-MODE"
2158 This limitation exists for a reason, think twice before circumventing it.
2161 > Most of the time it's easier to enable
2165 HREF="actions-file.html#FILTER-SERVER-HEADERS"
2166 >filter-server-headers</A
2169 and replace this action with a custom regular expression. It allows you
2170 to activate it for every document of a certain site and it will still
2171 only replace the content types you aimed at.
2174 > Of course you can apply <TT
2176 >content-type-overwrite</TT
2178 to a whole site and then make URL based exceptions, but it's a lot
2179 more work to get the same precision.
2183 >Example usage (sections):</DT
2194 ># Check if www.example.net/ really uses valid XHTML
2195 {+content-type-overwrite {application/xml}}
2198 # but leave the content type unmodified if the URL looks like a style sheet
2199 {-content-type-overwrite}
2200 www.example.net/*.\.css$
2201 www.example.net/*.style</PRE
2216 NAME="CRUNCH-CLIENT-HEADER"
2218 >8.5.4. crunch-client-header</H4
2222 CLASS="VARIABLELIST"
2228 >Remove a client header <SPAN
2231 > has no dedicated action for.</P
2237 > Deletes every header sent by the client that contains the string the user supplied as parameter.
2257 > This action allows you to block client headers for which no dedicated
2265 > will remove every client header that
2266 contains the string you supplied as parameter.
2269 > Regular expressions are <SPAN
2276 use this action to block different headers in the same request, unless
2277 they contain the same string.
2282 >crunch-client-header</TT
2283 > is only meant for quick tests.
2284 If you have to block several different headers, or only want to modify
2285 parts of them, you should enable
2289 HREF="actions-file.html#FILTER-CLIENT-HEADERS"
2290 >filter-client-headers</A
2293 and create your own filter.
2314 > Don't block any header without understanding the consequences.
2322 >Example usage (section):</DT
2333 ># Block the non-existent "Privacy-Violation:" client header
2334 {+crunch-client-header {Privacy-Violation:}}
2351 NAME="CRUNCH-IF-NONE-MATCH"
2353 >8.5.5. crunch-if-none-match</H4
2357 CLASS="VARIABLELIST"
2363 >Prevent yet another way to track the user's steps between sessions.</P
2371 >"If-None-Match:"</SPAN
2372 > HTTP client header.
2392 > Removing the <SPAN
2394 >"If-None-Match:"</SPAN
2395 > HTTP client header
2396 is useful for filter testing, where you want to force a real
2397 reload instead of getting status code <SPAN
2401 would cause the browser to use a cached copy of the page.
2404 > It is also useful to make sure the header isn't used as a cookie
2408 > Blocking the <SPAN
2410 >"If-None-Match:"</SPAN
2411 > header shouldn't cause any
2412 caching problems, as long as the <SPAN
2414 >"If-Modified-Since:"</SPAN
2416 isn't blocked as well.
2419 > It is recommended to use this action together with
2423 HREF="actions-file.html#HIDE-IF-MODIFIED-SINCE"
2424 >hide-if-modified-since</A
2431 HREF="actions-file.html#OVERWRITE-LAST-MODIFIED"
2432 >overwrite-last-modified</A
2438 >Example usage (section):</DT
2449 ># Let the browser revalidate cached documents without being tracked across sessions
2450 {+hide-if-modified-since {-60} \
2451 +overwrite-last-modified {randomize} \
2452 +crunch-if-none-match}
2468 NAME="CRUNCH-INCOMING-COOKIES"
2470 >8.5.6. crunch-incoming-cookies</H4
2474 CLASS="VARIABLELIST"
2480 > Prevent the web server from setting any cookies on your system
2489 >"Set-Cookie:"</SPAN
2490 > HTTP headers from server replies.
2510 > This action is only concerned with <SPAN
2527 HREF="actions-file.html#CRUNCH-OUTGOING-COOKIES"
2528 >crunch-outgoing-cookies</A
2537 > to disable cookies completely.
2546 > to use this action in conjunction
2550 HREF="actions-file.html#SESSION-COOKIES-ONLY"
2551 >session-cookies-only</A
2554 since it would prevent the session cookies from being set. See also
2558 HREF="actions-file.html#FILTER-CONTENT-COOKIES"
2559 >filter-content-cookies</A
2576 >+crunch-incoming-cookies</PRE
2591 NAME="CRUNCH-SERVER-HEADER"
2593 >8.5.7. crunch-server-header</H4
2597 CLASS="VARIABLELIST"
2603 >Remove a server header <SPAN
2606 > has no dedicated action for.</P
2612 > Deletes every header sent by the server that contains the string the user supplied as parameter.
2632 > This action allows you to block server headers for which no dedicated
2636 > action exists. <SPAN
2640 will remove every server header that contains the string you supplied as parameter.
2643 > Regular expressions are <SPAN
2650 use this action to block different headers in the same request, unless
2651 they contain the same string.
2656 >crunch-server-header</TT
2657 > is only meant for quick tests.
2658 If you have to block several different headers, or only want to modify
2659 parts of them, you should enable
2663 HREF="actions-file.html#FILTER-SERVER-HEADERS"
2664 >filter-server-headers</A
2667 and create your own filter.
2688 > Don't block any header without understanding the consequences.
2696 >Example usage (section):</DT
2707 ># Crunch server headers that try to prevent caching
2708 {+crunch-server-header {no-cache}}
2724 NAME="CRUNCH-OUTGOING-COOKIES"
2726 >8.5.8. crunch-outgoing-cookies</H4
2730 CLASS="VARIABLELIST"
2736 > Prevent the web server from reading any cookies from your system
2746 > HTTP headers from client requests.
2766 > This action is only concerned with <SPAN
2783 HREF="actions-file.html#CRUNCH-INCOMING-COOKIES"
2784 >crunch-incoming-cookies</A
2793 > to disable cookies completely.
2802 > to use this action in conjunction
2806 HREF="actions-file.html#SESSION-COOKIES-ONLY"
2807 >session-cookies-only</A
2810 since it would prevent the session cookies from being read.
2825 >+crunch-outgoing-cookies</PRE
2840 NAME="DEANIMATE-GIFS"
2842 >8.5.9. deanimate-gifs</H4
2846 CLASS="VARIABLELIST"
2852 >Stop those annoying, distracting animated GIF images.</P
2858 > De-animate GIF animations, i.e. reduce them to their first or last image.
2884 > This will also shrink the images considerably (in bytes, not pixels!). If
2888 > is given, the first frame of the animation
2889 is used as the replacement. If <SPAN
2892 > is given, the last
2893 frame of the animation is used instead, which probably makes more sense for
2894 most banner animations, but also has the risk of not showing the entire
2895 last frame (if it is only a delta to an earlier frame).
2898 > You can safely use this action with patterns that will also match non-GIF
2899 objects, because no attempt will be made at anything that doesn't look like
2915 >+deanimate-gifs{last}</PRE
2930 NAME="DOWNGRADE-HTTP-VERSION"
2932 >8.5.10. downgrade-http-version</H4
2936 CLASS="VARIABLELIST"
2942 >Work around (very rare) problems with HTTP/1.1</P
2948 > Downgrades HTTP/1.1 client requests and server replies to HTTP/1.0.
2968 > This is a left-over from the time when <SPAN
2972 didn't support important HTTP/1.1 features well. It is left here for the
2973 unlikely case that you experience HTTP/1.1 related problems with some server
2974 out there. Not all (optional) HTTP/1.1 features are supported yet, so there
2975 is a chance you might need this action.
2979 >Example usage (section):</DT
2990 >{+downgrade-http-version}
2991 problem-host.example.com</PRE
3006 NAME="FAST-REDIRECTS"
3008 >8.5.11. fast-redirects</H4
3012 CLASS="VARIABLELIST"
3018 >Fool some click-tracking scripts and speed up indirect links.</P
3024 > Detects redirection URLs and redirects the browser without contacting
3025 the redirection server first.
3044 >"simple-check"</SPAN
3045 > to just search for the string <SPAN
3049 to detect redirection URLs.
3056 >"check-decoded-url"</SPAN
3057 > to decode URLs (if necessary) before searching
3058 for redirection URLs.
3068 Many sites, like yahoo.com, don't just link to other sites. Instead, they
3069 will link to some script on their own servers, giving the destination as a
3070 parameter, which will then redirect you to the final target. URLs
3071 resulting from this scheme typically look like:
3074 >"http://www.example.org/click-tracker.cgi?target=http%3a//www.example.net/"</SPAN
3078 > Sometimes, there are even multiple consecutive redirects encoded in the
3079 URL. These redirections via scripts make your web browsing more traceable,
3080 since the server from which you follow such a link can see where you go
3081 to. Apart from that, valuable bandwidth and time is wasted, while your
3082 browser asks the server for one redirect after the other. Plus, it feeds
3086 > This feature is currently not very smart and is scheduled for improvement.
3087 If it is enabled by default, you will have to create some exceptions to
3088 this action. It can lead to failures in several ways:
3091 > Not every URLs with other URLs as parameters is evil.
3092 Some sites offer a real service that requires this information to work.
3093 For example a validation service needs to know, which document to validate.
3097 > assumes that every URL parameter that
3098 looks like another URL is a redirection target, and will always redirect to
3099 the last one. Most of the time the assumption is correct, but if it isn't,
3100 the user gets redirected anyway.
3103 > Another failure occurs if the URL contains other parameters after the URL parameter.
3107 >"http://www.example.org/?redirect=http%3a//www.example.net/&foo=bar"</SPAN
3109 contains the redirection URL <SPAN
3111 >"http://www.example.net/"</SPAN
3113 followed by another parameter. <TT
3117 and will cause a redirect to <SPAN
3119 >"http://www.example.net/&foo=bar"</SPAN
3121 Depending on the target server configuration, the parameter will be silently ignored
3124 >"page not found"</SPAN
3125 > error. It is possible to fix these redirected
3129 HREF="actions-file.html#FILTER-CLIENT-HEADERS"
3130 >filter-client-headers</A
3133 but it requires a little effort.
3136 > To detect a redirection URL, <TT
3140 looks for the string <SPAN
3143 >, either in plain text
3144 (invalid but often used) or encoded as <SPAN
3148 Some sites use their own URL encoding scheme, encrypt the address
3149 of the target server or replace it with a database id. In theses cases
3153 > is fooled and the request reaches the
3154 redirection server where it probably gets logged.
3169 > { +fast-redirects{simple-check} }
3172 { +fast-redirects{check-decoded-url} }
3173 another.example.com/testing</PRE
3194 CLASS="VARIABLELIST"
3200 >Get rid of HTML and JavaScript annoyances, banner advertisements (by size), do fun text replacements, etc.</P
3206 > All files of text-based type, most notably HTML and JavaScript, to which this
3207 action applies, are filtered on-the-fly through the specified regular expression
3208 based substitutions. (Note: as of version 3.0.3 plain text documents
3209 are exempted from filtering, because web servers often use the
3213 > MIME type for all files whose type they
3214 don't know.) By default, filtering works only on the raw document content
3215 itself (that which can be seen with <TT
3232 > The name of a filter, as defined in the <A
3233 HREF="filter-file.html"
3236 Filters can be defined in one or more files as defined by the
3240 HREF="config.html#FILTERFILE"
3251 > is the collection of filters
3252 supplied by the developers. Locally defined filters should go
3253 in their own file, such as <TT
3259 > When used in its negative form,
3260 and without parameters, <SPAN
3266 > filtering is completely disabled.
3273 > For your convenience, there are a number of pre-defined filters available
3274 in the distribution filter file that you can use. See the examples below for
3278 > Filtering requires buffering the page content, which may appear to
3279 slow down page rendering since nothing is displayed until all content has
3280 passed the filters. (It does not really take longer, but seems that way
3281 since the page is not incrementally displayed.) This effect will be more
3282 noticeable on slower connections.
3287 >"Rolling your own"</SPAN
3289 filters requires a knowledge of
3291 HREF="http://en.wikipedia.org/wiki/Regular_expressions"
3300 HREF="http://en.wikipedia.org/wiki/Html"
3307 This is very powerful feature, and potentially very intrusive. Use
3311 > The amount of data that can be filtered is limited to the
3315 HREF="config.html#BUFFER-LIMIT"
3319 option in the main <A
3323 default is 4096 KB (4 Megs). Once this limit is exceeded, the buffered
3324 data, and all pending data, is passed through unfiltered.
3327 > Inappropriate MIME types, such as zipped files, are not filtered at all.
3328 (Again, only text-based types except plain text). Encrypted SSL data
3329 (from HTTPS servers) cannot be filtered either, since this would violate
3330 the integrity of the secure transaction. In some situations it might
3331 be necessary to protect certain text, like source code, from filtering
3332 by defining appropriate <TT
3338 > At this time, <SPAN
3341 > cannot uncompress compressed
3342 documents. If you want filtering to work on all documents, even those that
3343 would normally be sent compressed, use the
3347 HREF="actions-file.html#PREVENT-COMPRESSION"
3348 >prevent-compression</A
3351 action in conjunction with <TT
3357 > Filtering can achieve some of the same effects as the
3361 HREF="actions-file.html#BLOCK"
3365 action, i.e. it can be used to block ads and banners. But the mechanism
3366 works quite differently. One effective use, is to block ad banners
3367 based on their size (see below), since many of these seem to be somewhat
3374 > with suggestions for new or
3375 improved filters is particularly welcome!
3378 > The below list has only the names and a one-line description of each
3379 predefined filter. There are <A
3380 HREF="filter-file.html#PREDEFINED-FILTERS"
3382 verbose explanations</A
3383 > of what these filters do in the <A
3384 HREF="filter-file.html"
3385 >filter file chapter</A
3390 >Example usage (with filters from the distribution <TT
3395 HREF="filter-file.html#PREDEFINED-FILTERS"
3396 >the Predefined Filters section</A
3398 more explanation on each:</DT
3402 NAME="FILTER-JS-ANNOYANCES"
3413 >+filter{js-annoyances} # Get rid of particularly annoying JavaScript abuse</PRE
3421 NAME="FILTER-JS-EVENTS"
3432 >+filter{js-events} # Kill all JS event bindings (Radically destructive! Only for extra nasty sites)</PRE
3440 NAME="FILTER-HTML-ANNOYANCES"
3451 >+filter{html-annoyances} # Get rid of particularly annoying HTML abuse</PRE
3459 NAME="FILTER-CONTENT-COOKIES"
3470 >+filter{content-cookies} # Kill cookies that come in the HTML or JS content</PRE
3478 NAME="FILTER-REFRESH-TAGS"
3489 >+filter{refresh-tags} # Kill automatic refresh tags (for dial-on-demand setups)</PRE
3497 NAME="FILTER-UNSOLICITED-POPUPS"
3508 >+filter{unsolicited-popups} # Disable only unsolicited pop-up windows</PRE
3516 NAME="FILTER-ALL-POPUPS"
3527 >+filter{all-popups} # Kill all popups in JavaScript and HTML</PRE
3535 NAME="FILTER-IMG-REORDER"
3546 >+filter{img-reorder} # Reorder attributes in <img> tags to make the banners-by-* filters more effective</PRE
3554 NAME="FILTER-BANNERS-BY-SIZE"
3565 >+filter{banners-by-size} # Kill banners by size</PRE
3573 NAME="FILTER-BANNERS-BY-LINK"
3584 >+filter{banners-by-link} # Kill banners by their links to known clicktrackers</PRE
3592 NAME="FILTER-WEBBUGS"
3603 >+filter{webbugs} # Squish WebBugs (1x1 invisible GIFs used for user tracking)</PRE
3611 NAME="FILTER-TINY-TEXTFORMS"
3622 >+filter{tiny-textforms} # Extend those tiny textareas up to 40x80 and kill the hard wrap</PRE
3630 NAME="FILTER-JUMPING-WINDOWS"
3641 >+filter{jumping-windows} # Prevent windows from resizing and moving themselves</PRE
3649 NAME="FILTER-FRAMESET-BORDERS"
3660 >+filter{frameset-borders} # Give frames a border and make them resizeable</PRE
3668 NAME="FILTER-DEMORONIZER"
3679 >+filter{demoronizer} # Fix MS's non-standard use of standard charsets</PRE
3687 NAME="FILTER-SHOCKWAVE-FLASH"
3698 >+filter{shockwave-flash} # Kill embedded Shockwave Flash objects</PRE
3706 NAME="FILTER-QUICKTIME-KIOSKMODE"
3717 >+filter{quicktime-kioskmode} # Make Quicktime movies savable</PRE
3736 >+filter{fun} # Text replacements for subversive browsing fun!</PRE
3744 NAME="FILTER-CRUDE-PARENTAL"
3755 >+filter{crude-parental} # Crude parental filtering (demo only)</PRE
3763 NAME="FILTER-IE-EXPLOITS"
3774 >+filter{ie-exploits} # Disable some known Internet Explorer bug exploits</PRE
3789 NAME="FILTER-CLIENT-HEADERS"
3791 >8.5.13. filter-client-headers</H4
3795 CLASS="VARIABLELIST"
3801 > To apply filtering to the client's (browser's) headers
3811 > filters only apply
3812 to the document content itself. This will extend those filters to
3813 include the client's headers as well.
3833 > Regular expressions can be used to filter headers as well. Check your
3834 filters closely before activating this action, as it can easily lead to broken
3839 These filters are applied to each header on its own, not to them
3840 all at once. This makes it easier to diagnose problems, but on the downside
3841 you can't write filters that only change header x if header y's value is
3845 > The filters are used after the other header actions have finished and can
3846 use their output as input.
3849 > Whenever possible one should specify <TT
3856 >, the whole header name and the colon, to make sure
3857 the filter doesn't cause havoc to other headers or the
3858 page itself. For example if you want to transform
3877 >s@Galeon/\d\.\d\.\d @@</PRE
3893 >s@^(User-Agent:.*) Galeon/\d\.\d\.\d (Firefox/\d\.\d\.\d\.\d)$@$1 $2@</PRE
3900 >Example usage (section):</DT
3911 >{+filter-client-headers +filter{test_filter}}
3912 problem-host.example.com
3928 NAME="FILTER-SERVER-HEADERS"
3930 >8.5.14. filter-server-headers</H4
3934 CLASS="VARIABLELIST"
3940 > To apply filtering to the server's headers
3950 > filters only apply
3951 to the document content itself. This will extend those filters to
3952 include the server's headers as well.
3974 >filter-client-headers</TT
3976 the server instead. To filter both server and client, use both.
3981 >filter-client-headers</TT
3983 filters before activating this action, as it can easily lead to broken
3988 These filters are applied to each header on its own, not to them
3989 all at once. This makes it easier to diagnose problems, but on the downside
3990 you can't write filters that only change header x if header y's value is
3994 > The filters are used after the other header actions have finished and can
3995 use their output as input.
3998 > Remember too, whenever possible one should specify <TT
4005 >, the whole header name and the colon, to make sure
4006 the filter doesn't cause havoc to other headers or the
4007 page itself. See above for example.
4011 >Example usage (section):</DT
4022 >{+filter-server-headers +filter{test_filter}}
4023 problem-host.example.com
4039 NAME="FORCE-TEXT-MODE"
4041 >8.5.15. force-text-mode</H4
4045 CLASS="VARIABLELIST"
4054 > to treat a document as if it was in some kind of <SPAN
4066 > Declares a document as text, even if the <SPAN
4068 >"Content-Type:"</SPAN
4069 > isn't detected as such.
4092 HREF="actions-file.html#FILTER"
4099 > tries to only filter files that are
4100 in some kind of text format. The same restrictions apply to
4104 HREF="actions-file.html#CONTENT-TYPE-OVERWRITE"
4105 >content-type-overwrite</A
4110 >force-text-mode</TT
4111 > declares a document as text,
4112 without looking at the <SPAN
4114 >"Content-Type:"</SPAN
4136 > Think twice before activating this action. Filtering binary data
4137 with regular expressions can cause file damage.
4172 NAME="HANDLE-AS-EMPTY-DOCUMENT"
4174 >8.5.16. handle-as-empty-document</H4
4178 CLASS="VARIABLELIST"
4184 >Mark URLs that should be replaced by empty documents <SPAN
4188 >if they get blocked</I
4196 > This action alone doesn't do anything noticeable. It just marks URLs.
4200 HREF="actions-file.html#BLOCK"
4210 the presence or absence of this mark decides whether an HTML <SPAN
4214 page, or an empty document will be sent to the client as a substitute for the blocked content.
4221 > document isn't literally empty, but actually contains a single space.
4241 > Some browsers complain about syntax errors if JavaScript documents
4242 are blocked with <SPAN
4246 default HTML page; this option can be used to silence them.
4249 > The content type for the empty document can be specified with
4253 HREF="actions-file.html#CONTENT-TYPE-OVERWRITE"
4254 >content-type-overwrite{}</A
4257 but usually this isn't necessary.
4272 ># Block all documents on example.org that end with ".js",
4273 # but send an empty document instead of the usual HTML message.
4274 {+block +handle-as-empty-document}
4291 NAME="HANDLE-AS-IMAGE"
4293 >8.5.17. handle-as-image</H4
4297 CLASS="VARIABLELIST"
4303 >Mark URLs as belonging to images (so they'll be replaced by images <SPAN
4307 >if they do get blocked</I
4309 >, rather than HTML pages)</P
4315 > This action alone doesn't do anything noticeable. It just marks URLs as images.
4319 HREF="actions-file.html#BLOCK"
4329 the presence or absence of this mark decides whether an HTML <SPAN
4333 page, or a replacement image (as determined by the <TT
4336 HREF="actions-file.html#SET-IMAGE-BLOCKER"
4337 >set-image-blocker</A
4339 > action) will be sent to the
4340 client as a substitute for the blocked content.
4360 > The below generic example section is actually part of <TT
4364 It marks all URLs with well-known image file name extensions as images and should
4368 > Users will probably only want to use the handle-as-image action in conjunction with
4372 HREF="actions-file.html#BLOCK"
4375 >, to block sources of banners, whose URLs don't
4376 reflect the file type, like in the second example section.
4379 > Note that you cannot treat HTML pages as images in most cases. For instance, (in-line) ad
4380 frames require an HTML page to be sent, or they won't display properly.
4383 >handle-as-image</TT
4384 > in this situation will not replace the
4385 ad frame with an image, but lead to error messages.
4389 >Example usage (sections):</DT
4400 ># Generic image extensions:
4403 /.*\.(gif|jpg|jpeg|png|bmp|ico)$
4405 # These don't look like images, but they're banners and should be
4406 # blocked as images:
4408 {+block +handle-as-image}
4409 some.nasty-banner-server.com/junk.cgi?output=trash
4411 # Banner source! Who cares if they also have non-image content?
4412 ad.doubleclick.net </PRE
4427 NAME="HIDE-ACCEPT-LANGUAGE"
4429 >8.5.18. hide-accept-language</H4
4433 CLASS="VARIABLELIST"
4439 >Pretend to use different language settings.</P
4445 > Deletes or replaces the <SPAN
4447 >"Accept-Language:"</SPAN
4448 > HTTP header in client requests.
4464 >, or any user defined value.
4471 > Faking the browser's language settings can be useful to make a
4472 foreign User-Agent set with
4476 HREF="actions-file.html#HIDE-USER-AGENT"
4483 > However some sites with content in different languages check the
4486 >"Accept-Language:"</SPAN
4487 > to decide which one to take by default.
4488 Sometimes it isn't possible to later switch to another language without
4491 >"Accept-Language:"</SPAN
4495 > Therefore it's a good idea to either only change the
4498 >"Accept-Language:"</SPAN
4499 > header to languages you understand,
4500 or to languages that aren't wide spread.
4503 > Before setting the <SPAN
4505 >"Accept-Language:"</SPAN
4507 to a rare language, you should consider that it helps to
4508 make your requests unique and thus easier to trace.
4509 If you don't plan to change this header frequently,
4510 you should stick to a common language.
4514 >Example usage (section):</DT
4525 ># Pretend to use Canadian language settings.
4526 {+hide-accept-language{en-ca} \
4527 +hide-user-agent{Mozilla/5.0 (X11; U; OpenBSD i386; en-CA; rv:1.8.0.4) Gecko/20060628 Firefox/1.5.0.4} \
4544 NAME="HIDE-CONTENT-DISPOSITION"
4546 >8.5.19. hide-content-disposition</H4
4550 CLASS="VARIABLELIST"
4556 >Prevent download menus for content you prefer to view inside the browser.</P
4562 > Deletes or replaces the <SPAN
4564 >"Content-Disposition:"</SPAN
4565 > HTTP header set by some servers.
4581 >, or any user defined value.
4588 > Some servers set the <SPAN
4590 >"Content-Disposition:"</SPAN
4592 documents they assume you want to save locally before viewing them.
4595 >"Content-Disposition:"</SPAN
4596 > header contains the file name
4597 the browser is supposed to use by default.
4600 > In most browsers that understand this header, it makes it impossible to
4607 > the document, without downloading it first,
4608 even if it's just a simple text file or an image.
4611 > Removing the <SPAN
4613 >"Content-Disposition:"</SPAN
4615 to prevent this annoyance, but some browsers additionally check the
4618 >"Content-Type:"</SPAN
4619 > header, before they decide if they can
4620 display a document without saving it first. In these cases, you have
4621 to change this header as well, before the browser stops displaying
4625 > It is also possible to change the server's file name suggestion
4626 to another one, but in most cases it isn't worth the time to set
4642 ># Disarm the download link in Sourceforge's patch tracker
4644 +content-type-overwrite {text/plain}\
4645 +hide-content-disposition {block} }
4646 .sourceforge.net/tracker/download.php</PRE
4661 NAME="HIDE-IF-MODIFIED-SINCE"
4663 >8.5.20. hide-if-modified-since</H4
4667 CLASS="VARIABLELIST"
4673 >Prevent yet another way to track the user's steps between sessions.</P
4681 >"If-Modified-Since:"</SPAN
4682 > HTTP client header or modifies its value.
4698 >, or a user defined value that specifies a range of hours.
4705 > Removing this header is useful for filter testing, where you want to force a real
4706 reload instead of getting status code <SPAN
4709 >, which would cause the
4710 browser to use a cached copy of the page.
4713 > Instead of removing the header, <TT
4715 >hide-if-modified-since</TT
4717 also add or subtract a random amount of time to/from the header's value.
4718 You specify a range of minutes where the random factor should be chosen from and
4722 > does the rest. A negative value means
4723 subtracting, a positive value adding.
4726 > Randomizing the value of the <SPAN
4728 >"If-Modified-Since:"</SPAN
4730 sure it isn't used as a cookie replacement, but you will run into
4731 caching problems if the random range is too high.
4734 > It is a good idea to only use a small negative value and let
4738 HREF="actions-file.html#OVERWRITE-LAST-MODIFIED"
4739 >overwrite-last-modified</A
4742 handle the greater changes.
4745 > It is also recommended to use this action together with
4749 HREF="actions-file.html#CRUNCH-IF-NONE-MATCH"
4750 >crunch-if-none-match</A
4756 >Example usage (section):</DT
4767 ># Let the browser revalidate without being tracked across sessions
4768 {+hide-if-modified-since {-60}\
4769 +overwrite-last-modified {randomize}\
4770 +crunch-if-none-match}
4786 NAME="HIDE-FORWARDED-FOR-HEADERS"
4788 >8.5.21. hide-forwarded-for-headers</H4
4792 CLASS="VARIABLELIST"
4798 >Improve privacy by hiding the true source of the request</P
4804 > Deletes any existing <SPAN
4806 >"X-Forwarded-for:"</SPAN
4807 > HTTP header from client requests,
4808 and prevents adding a new one.
4828 > It is fairly safe to leave this on.
4831 > This action is scheduled for improvement: It should be able to generate forged
4834 >"X-Forwarded-for:"</SPAN
4835 > headers using random IP addresses from a specified network,
4836 to make successive requests from the same client look like requests from a pool of different
4837 users sharing the same proxy.
4852 >+hide-forwarded-for-headers</PRE
4867 NAME="HIDE-FROM-HEADER"
4869 >8.5.22. hide-from-header</H4
4873 CLASS="VARIABLELIST"
4879 >Keep your (old and ill) browser from telling web servers your email address</P
4885 > Deletes any existing <SPAN
4888 > HTTP header, or replaces it with the
4905 >, or any user defined value.
4915 > will completely remove the header
4916 (not to be confused with the <TT
4919 HREF="actions-file.html#BLOCK"
4926 > Alternately, you can specify any value you prefer to be sent to the web
4927 server. If you do, it is a matter of fairness not to use any address that
4928 is actually used by a real person.
4931 > This action is rarely needed, as modern web browsers don't send
4950 >+hide-from-header{block}</PRE
4963 >+hide-from-header{spam-me-senseless@sittingduck.example.com}</PRE
4978 NAME="HIDE-REFERRER"
4980 >8.5.23. hide-referrer</H4
4987 CLASS="VARIABLELIST"
4993 >Conceal which link you followed to get to a particular site</P
5002 > (sic) HTTP header from the client request,
5003 or replaces it with a forged one.
5022 >"conditional-block"</SPAN
5023 > to delete the header completely if the host has changed.</P
5030 > to delete the header unconditionally.</P
5037 > to pretend to be coming from the homepage of the server we are talking to.</P
5041 >Any other string to set a user defined referrer.</P
5051 >conditional-block</TT
5052 > is the only parameter,
5053 that isn't easily detected in the server's log file. If it blocks the
5054 referrer, the request will look like the visitor used a bookmark or
5055 typed in the address directly.
5058 > Leaving the referrer unmodified for requests on the same host
5059 allows the server owner to see the visitor's <SPAN
5063 but in most cases she could also get that information by comparing
5064 other parts of the log file: for example the User-Agent if it isn't
5065 a very common one, or the user's IP address if it doesn't change between
5069 > Always blocking the referrer, or using a custom one, can lead to
5070 failures on servers that check the referrer before they answer any
5071 requests, in an attempt to prevent their valuable content from being
5072 embedded or linked to elsewhere.
5077 >conditional-block</TT
5082 will work with referrer checks, as long as content and valid referring page
5083 are on the same host. Most of the time that's the case.
5090 > is an alternate spelling of
5094 > and the two can be can be freely
5095 substituted with each other. (<SPAN
5099 correct English spelling, however the HTTP specification has a bug - it
5100 requires it to be spelled as <SPAN
5118 >+hide-referrer{forge}</PRE
5131 >+hide-referrer{http://www.yahoo.com/}</PRE
5146 NAME="HIDE-USER-AGENT"
5148 >8.5.24. hide-user-agent</H4
5152 CLASS="VARIABLELIST"
5158 >Conceal your type of browser and client operating system</P
5164 > Replaces the value of the <SPAN
5166 >"User-Agent:"</SPAN
5168 in client requests with the specified value.
5181 > Any user-defined string.
5206 > This can lead to problems on web sites that depend on looking at this header in
5207 order to customize their content for different browsers (which, by the
5214 > the right thing to do: good web sites
5215 work browser-independently).
5223 > Using this action in multi-user setups or wherever different types of
5224 browsers will access the same <SPAN
5234 >. In single-user, single-browser
5235 setups, you might use it to delete your OS version information from
5236 the headers, because it is an invitation to exploit known bugs for your
5237 OS. It is also occasionally useful to forge this in order to access
5238 sites that won't let you in otherwise (though there may be a good
5239 reason in some cases). Example of this: some MSN sites will not
5243 > enter, yet forging to a
5247 > user-agent works just fine.
5248 (Must be just a silly MS goof, I'm sure :-).
5251 > This action is scheduled for improvement.
5266 >+hide-user-agent{Netscape 6.1 (X11; I; Linux 2.4.18 i686)}</PRE
5281 NAME="INSPECT-JPEGS"
5283 >8.5.25. inspect-jpegs</H4
5287 CLASS="VARIABLELIST"
5293 >To protect against the MS buffer over-run in JPEG processing</P
5299 > Protect against a known exploit
5319 > See Microsoft Security Bulletin MS04-028. JPEG images are one of the most
5320 common image types found across the Internet. The exploit as described can
5321 allow execution of code on the target system, giving an attacker access
5322 to the system in question by merely planting an altered JPEG image, which
5323 would have no obvious indications of what lurks inside. This action
5324 prevents unwanted intrusion.
5339 >+inspect-jpegs</PRE
5355 >8.5.26. kill-popups<A
5362 CLASS="VARIABLELIST"
5368 >Eliminate those annoying pop-up windows (deprecated)</P
5374 > While loading the document, replace JavaScript code that opens
5375 pop-up windows with (syntactically neutral) dummy code on the fly.
5395 > This action is basically a built-in, hardwired special-purpose filter
5396 action, but there are important differences: For <TT
5400 the document need not be buffered, so it can be incrementally rendered while
5401 downloading. But <TT
5404 > doesn't catch as many pop-ups as
5408 HREF="actions-file.html#FILTER-ALL-POPUPS"
5417 does and is not as smart as <TT
5420 HREF="actions-file.html#FILTER-UNSOLICITED-POPUPS"
5424 >unsolicited-popups</I
5432 > Think of it as a fast and efficient replacement for a filter that you
5433 can use if you don't want any filtering at all. Note that it doesn't make
5434 sense to combine it with any <TT
5437 HREF="actions-file.html#FILTER"
5441 since as soon as one <TT
5444 HREF="actions-file.html#FILTER"
5448 the whole document needs to be buffered anyway, which destroys the advantage of
5452 > action over its filter equivalent.
5455 > Killing all pop-ups unconditionally is problematic. Many shops and banks rely on
5456 pop-ups to display forms, shopping carts etc, and the <TT
5459 HREF="actions-file.html#FILTER-UNSOLICITED-POPUPS"
5463 >unsolicited-popups</I
5468 > does a fairly good job of catching only the unwanted ones.
5471 > If the only kind of pop-ups that you want to kill are exit consoles (those
5478 > windows that appear when you close an other
5479 one), you might want to use
5483 HREF="actions-file.html#FILTER"
5521 NAME="LIMIT-CONNECT"
5523 >8.5.27. limit-connect</H4
5527 CLASS="VARIABLELIST"
5533 >Prevent abuse of <SPAN
5536 > as a TCP proxy relay or disable SSL for untrusted sites</P
5542 > Specifies to which ports HTTP CONNECT requests are allowable.
5555 > A comma-separated list of ports or port ranges (the latter using dashes, with the minimum
5556 defaulting to 0 and the maximum to 65K).
5563 > By default, i.e. if no <TT
5570 > only allows HTTP CONNECT
5571 requests to port 443 (the standard, secure HTTPS port). Use
5575 > if more fine-grained control is desired
5576 for some or all destinations.
5579 > The CONNECT methods exists in HTTP to allow access to secure websites
5583 > URLs) through proxies. It works very simply:
5584 the proxy connects to the server on the specified port, and then
5585 short-circuits its connections to the client and to the remote server.
5586 This can be a big security hole, since CONNECT-enabled proxies can be
5587 abused as TCP relays very easily.
5593 > relays HTTPS traffic without seeing
5594 the decoded content. Websites can leverage this limitation to circumvent <SPAN
5598 filters. By specifying an invalid port range you can disable HTTPS entirely.
5599 If you plan to disable SSL by default, consider enabling
5603 HREF="actions-file.html#TREAT-FORBIDDEN-CONNECTS-LIKE-BLOCKS"
5604 >treat-forbidden-connects-like-blocks</A
5607 as well, to be able to quickly create exceptions.
5611 >Example usages:</DT
5622 >+limit-connect{443} # This is the default and need not be specified.
5623 +limit-connect{80,443} # Ports 80 and 443 are OK.
5624 +limit-connect{-3, 7, 20-100, 500-} # Ports less than 3, 7, 20 to 100 and above 500 are OK.
5625 +limit-connect{-} # All ports are OK
5626 +limit-connect{,} # No HTTPS/SSL traffic is allowed</PRE
5641 NAME="PREVENT-COMPRESSION"
5643 >8.5.28. prevent-compression</H4
5647 CLASS="VARIABLELIST"
5653 > Ensure that servers send the content uncompressed, so it can be
5657 HREF="actions-file.html#FILTER"
5667 > Removes the Accept-Encoding header which can be used to ask for compressed transfer.
5687 > More and more websites send their content compressed by default, which
5688 is generally a good idea and saves bandwidth. But for the <TT
5691 HREF="actions-file.html#FILTER"
5697 HREF="actions-file.html#DEANIMATE-GIFS"
5704 HREF="actions-file.html#KILL-POPUPS"
5711 > needs access to the uncompressed data.
5712 Unfortunately, <SPAN
5715 > can't yet(!) uncompress, filter, and
5716 re-compress the content on the fly. So if you want to ensure that all websites, including
5717 those that normally compress, can be filtered, you need to use this action.
5720 > This will slow down transfers from those websites, though. If you use any of the above-mentioned
5721 actions, you will typically want to use <TT
5723 >prevent-compression</TT
5728 > Note that some (rare) ill-configured sites don't handle requests for uncompressed
5729 documents correctly (they send an empty document body). If you use <TT
5731 >prevent-compression</TT
5733 per default, you'll have to add exceptions for those sites. See the example for how to do that.
5737 >Example usage (sections):</DT
5750 {+prevent-compression}
5753 # Make exceptions for ill sites:
5755 {-prevent-compression}
5757 www.pclinuxonline.com</PRE
5772 NAME="OVERWRITE-LAST-MODIFIED"
5774 >8.5.29. overwrite-last-modified</H4
5778 CLASS="VARIABLELIST"
5784 >Prevent yet another way to track the user's steps between sessions.</P
5792 >"Last-Modified:"</SPAN
5793 > HTTP server header or modifies its value.
5806 > One of the keywords: <SPAN
5811 >"reset-to-request-time"</SPAN
5823 > Removing the <SPAN
5825 >"Last-Modified:"</SPAN
5826 > header is useful for filter
5827 testing, where you want to force a real reload instead of getting status
5831 >, which would cause the browser to reuse the old
5832 version of the page.
5838 > option overwrites the value of the
5841 >"Last-Modified:"</SPAN
5842 > header with a randomly chosen time
5843 between the original value and the current time. In theory the server
5844 could send each document with a different <SPAN
5846 >"Last-Modified:"</SPAN
5848 header to track visits without using cookies. <SPAN
5852 makes it impossible and the browser can still revalidate cached documents.
5857 >"reset-to-request-time"</SPAN
5858 > overwrites the value of the
5861 >"Last-Modified:"</SPAN
5862 > header with the current time. You could use
5863 this option together with
5867 HREF="actions-file.html#HIDE-IF-MODIFIED-SINCE"
5868 >hided-if-modified-since</A
5871 to further customize your random range.
5874 > The preferred parameter here is <SPAN
5878 to use, as long as the time settings are more or less correct.
5879 If the server sets the <SPAN
5881 >"Last-Modified:"</SPAN
5882 > header to the time
5883 of the request, the random range becomes zero and the value stays the same.
5884 Therefore you should later randomize it a second time with
5888 HREF="actions-file.html#HIDE-IF-MODIFIED-SINCE"
5889 >hided-if-modified-since</A
5895 > It is also recommended to use this action together with
5899 HREF="actions-file.html#CRUNCH-IF-NONE-MATCH"
5900 >crunch-if-none-match</A
5917 ># Let the browser revalidate without being tracked across sessions
5918 {+hide-if-modified-since {-60}\
5919 +overwrite-last-modified {randomize}\
5920 +crunch-if-none-match}
5938 >8.5.30. redirect</H4
5942 CLASS="VARIABLELIST"
5948 > Redirect requests to other sites.
5955 > Convinces the browser that the requested document has been moved
5956 to another location and the browser should get it from there.
5976 > This action is useful to replace whole documents with ones of your
5977 choosing. This can be used to enforce safe surfing, or just as a simple
5981 > You can do the same by combining the actions
5985 HREF="actions-file.html#BLOCK"
5992 HREF="actions-file.html#HANDLE-AS-IMAGE"
5999 HREF="actions-file.html#SET-IMAGE-BLOCKER"
6000 >set-image-blocker{URL}</A
6003 It doesn't sound right for non-image documents, and that's why this action
6007 > This action will be ignored if you use it together with
6011 HREF="actions-file.html#BLOCK"
6018 >Example usages:</DT
6029 ># Replace example.com's style sheet with another one
6030 { +redirect{http://localhost/css-replacements/example.com.css} }
6031 example.com/stylesheet.css
6033 # Create a short, easy to remember nickname for a favorite site
6034 { +redirect{http://www.privoxy.org/user-manual/actions-file.html} }
6050 NAME="SEND-VANILLA-WAFER"
6052 >8.5.31. send-vanilla-wafer</H4
6056 CLASS="VARIABLELIST"
6062 > Feed log analysis scripts with useless data.
6069 > Sends a cookie with each request stating that you do not accept any copyright
6070 on cookies sent to you, and asking the site operator not to track you.
6090 > The vanilla wafer is a (relatively) unique header and could conceivably be used to track you.
6093 > This action is rarely used and not enabled in the default configuration.
6108 >+send-vanilla-wafer</PRE
6125 >8.5.32. send-wafer</H4
6129 CLASS="VARIABLELIST"
6135 > Send custom cookies or feed log analysis scripts with even more useless data.
6142 > Sends a custom, user-defined cookie with each request.
6155 > A string of the form <SPAN
6175 > Being multi-valued, multiple instances of this action can apply to the same request,
6176 resulting in multiple cookies being sent.
6179 > This action is rarely used and not enabled in the default configuration.
6183 >Example usage (section):</DT
6194 >{+send-wafer{UsingPrivoxy=true}}
6195 my-internal-testing-server.void</PRE
6210 NAME="SESSION-COOKIES-ONLY"
6212 >8.5.33. session-cookies-only</H4
6216 CLASS="VARIABLELIST"
6222 > Allow only temporary <SPAN
6225 > cookies (for the current
6226 browser session <SPAN
6244 >"Set-Cookie:"</SPAN
6246 server headers. Most browsers will not store such cookies permanently and
6247 forget them in between sessions.
6267 > This is less strict than <TT
6270 HREF="actions-file.html#CRUNCH-INCOMING-COOKIES"
6271 >crunch-incoming-cookies</A
6277 HREF="actions-file.html#CRUNCH-OUTGOING-COOKIES"
6278 >crunch-outgoing-cookies</A
6280 > and allows you to browse
6281 websites that insist or rely on setting cookies, without compromising your privacy too badly.
6284 > Most browsers will not permanently store cookies that have been processed by
6287 >session-cookies-only</TT
6288 > and will forget about them between sessions.
6289 This makes profiling cookies useless, but won't break sites which require cookies so
6290 that you can log in for transactions. This is generally turned on for all
6291 sites, and is the recommended setting.
6302 >session-cookies-only</TT
6307 HREF="actions-file.html#CRUNCH-INCOMING-COOKIES"
6308 >crunch-incoming-cookies</A
6314 HREF="actions-file.html#CRUNCH-OUTGOING-COOKIES"
6315 >crunch-outgoing-cookies</A
6317 >. If you do, cookies
6318 will be plainly killed.
6321 > Note that it is up to the browser how it handles such cookies without an <SPAN
6325 field. If you use an exotic browser, you might want to try it out to be sure.
6328 > This setting also has no effect on cookies that may have been stored
6329 previously by the browser before starting <SPAN
6333 These would have to be removed manually.
6341 HREF="actions-file.html#FILTER-CONTENT-COOKIES"
6342 >content-cookies filter</A
6344 to block some types of cookies. Content cookies are not effected by
6347 >session-cookies-only</TT
6363 >+session-cookies-only</PRE
6378 NAME="SET-IMAGE-BLOCKER"
6380 >8.5.34. set-image-blocker</H4
6384 CLASS="VARIABLELIST"
6390 >Choose the replacement for blocked images</P
6396 > This action alone doesn't do anything noticeable. If <SPAN
6406 HREF="actions-file.html#BLOCK"
6418 HREF="actions-file.html#HANDLE-AS-IMAGE"
6428 apply, i.e. if the request is to be blocked as an image,
6435 > the parameter of this action decides what will be
6436 sent as a replacement.
6456 > to send a built-in checkerboard pattern image. The image is visually
6457 decent, scales very well, and makes it obvious where banners were busted.
6465 > to send a built-in transparent image. This makes banners disappear
6466 completely, but makes it hard to detect where <SPAN
6470 images on a given page and complicates troubleshooting if <SPAN
6474 has blocked innocent images, like navigation icons.
6488 send a redirect to <TT
6494 to any image anywhere, even in your local filesystem via <SPAN
6498 (But note that not all browsers support redirecting to a local file system).
6501 > A good application of redirects is to use special <SPAN
6505 URLs, which send the built-in images, as <TT
6511 This has the same visual effect as specifying <SPAN
6518 the first place, but enables your browser to cache the replacement image, instead of requesting
6519 it over and over again.
6528 > The URLs for the built-in images are <SPAN
6530 >"http://config.privoxy.org/send-banner?type=<TT
6551 > There is a third (advanced) type, called <SPAN
6563 >set-image-blocker</TT
6564 >, but meant for use from <A
6565 HREF="filter-file.html"
6568 Auto will select the type of image that would have applied to the referring page, had it been an image.
6586 >+set-image-blocker{pattern}</PRE
6593 > Redirect to the BSD devil:
6604 >+set-image-blocker{http://www.freebsd.org/gifs/dae_up3.gif}</PRE
6611 > Redirect to the built-in pattern for better caching:
6622 >+set-image-blocker{http://config.privoxy.org/send-banner?type=pattern}</PRE
6637 NAME="TREAT-FORBIDDEN-CONNECTS-LIKE-BLOCKS"
6639 >8.5.35. treat-forbidden-connects-like-blocks</H4
6643 CLASS="VARIABLELIST"
6649 >Block forbidden connects with an easy to find error message.</P
6655 > If this action is enabled, <SPAN
6659 makes a difference between forbidden connects and ordinary blocks.
6683 HREF="actions-file.html#LIMIT-CONNECT"
6689 with a short error message inside the headers. If the browser doesn't display
6690 headers (most don't), you just see an empty page.
6693 > With this action enabled, <SPAN
6697 the message that is used for ordinary blocks instead. If you decide
6698 to make an exception for the page in question, you can do so by
6708 > requests the clients tell
6712 > which host they are interested
6713 in, but not which document they plan to get later. As a result, the
6716 >"Go there anyway"</SPAN
6717 > link becomes rather useless:
6718 it lets the client request the home page of the forbidden host
6719 through unencrypted HTTP, still using the port of the last request.
6722 > If you previously configured <SPAN
6726 request through a SSL tunnel, everything will work. Most likely you haven't
6727 and the server will respond with an error message because it is expecting
6743 >+treat-forbidden-connects-like-blocks</PRE
6760 >8.5.36. Summary</H3
6762 > Note that many of these actions have the potential to cause a page to
6763 misbehave, possibly even not to display at all. There are many ways
6764 a site designer may choose to design his site, and what HTTP header
6765 content, and other criteria, he may depend on. There is no way to have hard
6766 and fast rules for all sites. See the <A
6767 HREF="appendix.html#ACTIONSANAT"
6769 > for a brief example on troubleshooting
6792 >, can be defined by combining other actions.
6793 These can in turn be invoked just like the built-in actions.
6794 Currently, an alias name can contain any character except space, tab,
6812 > that you only use <SPAN
6832 Alias names are not case sensitive, and are not required to start with a
6839 > sign, since they are merely textually
6842 > Aliases can be used throughout the actions file, but they <SPAN
6847 defined in a special section at the top of the file!</I
6850 And there can only be one such section per actions file. Each actions file may
6851 have its own alias section, and the aliases defined in it are only visible
6852 within that file.</P
6854 > There are two main reasons to use aliases: One is to save typing for frequently
6855 used combinations of actions, the other one is a gain in flexibility: If you
6856 decide once how you want to handle shops by defining an alias called
6860 >, you can later change your policy on shops in
6867 > place, and your changes will take effect everywhere
6868 in the actions file where the <SPAN
6871 > alias is used. Calling aliases
6872 by their purpose also makes your actions files more readable.</P
6874 > Currently, there is one big drawback to using aliases, though:
6878 >'s built-in web-based action file
6879 editor honors aliases when reading the actions files, but it expands
6880 them before writing. So the effects of your aliases are of course preserved,
6881 but the aliases themselves are lost when you edit sections that use aliases
6883 This is likely to change in future versions of <SPAN
6888 > Now let's define some aliases...</P
6898 > # Useful custom aliases we can use later.
6900 # Note the (required!) section header line and that this section
6901 # must be at the top of the actions file!
6905 # These aliases just save typing later:
6906 # (Note that some already use other aliases!)
6908 +crunch-all-cookies = +<A
6909 HREF="actions-file.html#CRUNCH-INCOMING-COOKIES"
6910 >crunch-incoming-cookies</A
6912 HREF="actions-file.html#CRUNCH-OUTGOING-COOKIES"
6913 >crunch-outgoing-cookies</A
6915 -crunch-all-cookies = -<A
6916 HREF="actions-file.html#CRUNCH-INCOMING-COOKIES"
6917 >crunch-incoming-cookies</A
6919 HREF="actions-file.html#CRUNCH-OUTGOING-COOKIES"
6920 >crunch-outgoing-cookies</A
6922 +block-as-image = +block +handle-as-image
6923 mercy-for-cookies = -crunch-all-cookies -<A
6924 HREF="actions-file.html#SESSION-COOKIES-ONLY"
6925 >session-cookies-only</A
6927 HREF="actions-file.html#FILTER-CONTENT-COOKIES"
6928 >filter{content-cookies}</A
6931 # These aliases define combinations of actions
6932 # that are useful for certain types of sites:
6935 HREF="actions-file.html#BLOCK"
6938 HREF="actions-file.html#FILTER"
6940 > -crunch-all-cookies -<A
6941 HREF="actions-file.html#FAST-REDIRECTS"
6944 HREF="actions-file.html#HIDE-REFERER"
6947 HREF="actions-file.html#KILL-POPUPS"
6950 shop = -crunch-all-cookies -<A
6951 HREF="actions-file.html#FILTER-ALL-POPUPS"
6952 >filter{all-popups}</A
6954 HREF="actions-file.html#KILL-POPUPS"
6958 # Short names for other aliases, for really lazy people ;-)
6960 c0 = +crunch-all-cookies
6961 c1 = -crunch-all-cookies</PRE
6967 > ...and put them to use. These sections would appear in the lower part of an
6968 actions file and define exceptions to the default actions (as specified further
6982 > # These sites are either very complex or very keen on
6983 # user data and require minimal interference to work:
6986 .office.microsoft.com
6987 .windowsupdate.microsoft.com
6991 # Allow cookies (for setting and retrieving your customer data)
6995 .worldpay.com # for quietpc.com
6998 # These shops require pop-ups:
7000 {shop -kill-popups -filter{all-popups}}
7002 .overclockers.co.uk</PRE
7008 > Aliases like <SPAN
7014 > are often used for
7018 > sites that require some actions to be disabled
7019 in order to function properly.</P
7028 >8.7. Actions Files Tutorial</H2
7030 > The above chapters have shown <A
7031 HREF="actions-file.html"
7032 >which actions files
7033 there are and how they are organized</A
7034 >, how actions are <A
7035 HREF="actions-file.html#ACTIONS"
7038 HREF="actions-file.html#ACTIONS-APPLY"
7042 HREF="actions-file.html#AF-PATTERNS"
7046 HREF="actions-file.html#ALIASES"
7048 >. Now, let's look at an
7056 file and see how all these pieces come together:</P
7064 >8.7.1. default.action</H3
7066 >Every config file should start with a short comment stating its purpose:</P
7076 ># Sample default.action file <ijbswa-developers@lists.sourceforge.net></PRE
7082 >Then, since this is the <TT
7086 first section is a special section for internal use that you needn't
7087 change or worry about:</P
7097 >##########################################################################
7098 # Settings -- Don't change! For internal Privoxy use ONLY.
7099 ##########################################################################
7102 for-privoxy-version=3.0</PRE
7108 >After that comes the (optional) alias section. We'll use the example
7109 section from the above <A
7110 HREF="actions-file.html#ALIASES"
7111 >chapter on aliases</A
7113 that also explains why and how aliases are used:</P
7123 >##########################################################################
7125 ##########################################################################
7128 # These aliases just save typing later:
7129 # (Note that some already use other aliases!)
7131 +crunch-all-cookies = +<A
7132 HREF="actions-file.html#CRUNCH-INCOMING-COOKIES"
7133 >crunch-incoming-cookies</A
7135 HREF="actions-file.html#CRUNCH-OUTGOING-COOKIES"
7136 >crunch-outgoing-cookies</A
7138 -crunch-all-cookies = -<A
7139 HREF="actions-file.html#CRUNCH-INCOMING-COOKIES"
7140 >crunch-incoming-cookies</A
7142 HREF="actions-file.html#CRUNCH-OUTGOING-COOKIES"
7143 >crunch-outgoing-cookies</A
7145 +block-as-image = +block +handle-as-image
7146 mercy-for-cookies = -crunch-all-cookies -<A
7147 HREF="actions-file.html#SESSION-COOKIES-ONLY"
7148 >session-cookies-only</A
7150 HREF="actions-file.html#FILTER-CONTENT-COOKIES"
7151 >filter{content-cookies}</A
7154 # These aliases define combinations of actions
7155 # that are useful for certain types of sites:
7158 HREF="actions-file.html#BLOCK"
7161 HREF="actions-file.html#FILTER"
7163 > -crunch-all-cookies -<A
7164 HREF="actions-file.html#FAST-REDIRECTS"
7167 HREF="actions-file.html#HIDE-REFERER"
7170 HREF="actions-file.html#KILL-POPUPS"
7173 shop = -crunch-all-cookies -<A
7174 HREF="actions-file.html#FILTER-ALL-POPUPS"
7175 >filter{all-popups}</A
7177 HREF="actions-file.html#KILL-POPUPS"
7185 > Now come the regular sections, i.e. sets of actions, accompanied
7186 by URL patterns to which they apply. Remember <SPAN
7191 are disabled when matching starts</I
7193 >, so we have to explicitly
7194 enable the ones we want.</P
7196 > The first regular section is probably the most important. It has only
7205 HREF="actions-file.html#AF-PATTERNS"
7206 >matches all URLs</A
7208 set of actions used in this <SPAN
7216 be applied to all requests as a start</I
7218 >. It can be partly or
7219 wholly overridden by later matches further down this file, or in user.action,
7220 but it will still be largely responsible for your overall browsing
7223 > Again, at the start of matching, all actions are disabled, so there is
7224 no real need to disable any actions here, but we will do that nonetheless,
7225 to have a complete listing for your reference. (Remember: a <SPAN
7229 preceding the action name enables the action, a <SPAN
7233 Also note how this long line has been made more readable by splitting it into
7234 multiple lines with line continuation.</P
7244 >##########################################################################
7245 # "Defaults" section:
7246 ##########################################################################
7249 HREF="actions-file.html#ADD-HEADER"
7253 HREF="actions-file.html#BLOCK"
7257 HREF="actions-file.html#CONTENT-TYPE-OVERWRITE"
7258 >content-type-overwrite</A
7261 HREF="actions-file.html#CRUNCH-CLIENT-HEADER"
7262 >crunch-client-header</A
7265 HREF="actions-file.html#CRUNCH-IF-NONE-MATCH"
7266 >crunch-if-none-match</A
7269 HREF="actions-file.html#CRUNCH-INCOMING-COOKIES"
7270 >crunch-incoming-cookies</A
7273 HREF="actions-file.html#CRUNCH-SERVER-HEADER"
7274 >crunch-server-header</A
7277 HREF="actions-file.html#CRUNCH-OUTGOING-COOKIES"
7278 >crunch-outgoing-cookies</A
7281 HREF="actions-file.html#DEANIMATE-GIFS"
7285 HREF="actions-file.html#DOWNGRADE-HTTP-VERSION"
7286 >downgrade-http-version</A
7289 HREF="actions-file.html#FAST-REDIRECTS"
7290 >fast-redirects{check-decoded-url}</A
7293 HREF="actions-file.html#FILTER-JS-ANNOYANCES"
7294 >filter{js-annoyances}</A
7297 HREF="actions-file.html#FILTER-JS-EVENTS"
7298 >filter{js-events}</A
7301 HREF="actions-file.html#FILTER-HTML-ANNOYANCES"
7302 >filter{html-annoyances}</A
7305 HREF="actions-file.html#FILTER-CONTENT-COOKIES"
7306 >filter{content-cookies}</A
7309 HREF="actions-file.html#FILTER-REFRESH-TAGS"
7310 >filter{refresh-tags}</A
7313 HREF="actions-file.html#FILTER-UNSOLICITED-POPUPS"
7314 >filter{unsolicited-popups}</A
7317 HREF="actions-file.html#FILTER-ALL-POPUPS"
7318 >filter{all-popups}</A
7321 HREF="actions-file.html#FILTER-IMG-REORDER"
7322 >filter{img-reorder}</A
7325 HREF="actions-file.html#FILTER-BANNERS-BY-SIZE"
7326 >filter{banners-by-size}</A
7329 HREF="actions-file.html#FILTER-BANNERS-BY-LINK"
7330 >filter{banners-by-link}</A
7333 HREF="actions-file.html#FILTER-WEBBUGS"
7337 HREF="actions-file.html#FILTER-TINY-TEXTFORMS"
7338 >filter{tiny-textforms}</A
7341 HREF="actions-file.html#FILTER-JUMPING-WINDOWS"
7342 >filter{jumping-windows}</A
7345 HREF="actions-file.html#FILTER-FRAMESET-BORDERS"
7346 >filter{frameset-borders}</A
7349 HREF="actions-file.html#FILTER-DEMORONIZER"
7350 >filter{demoronizer}</A
7353 HREF="actions-file.html#FILTER-SHOCKWAVE-FLASH"
7354 >filter{shockwave-flash}</A
7357 HREF="actions-file.html#FILTER-QUICKTIME-KIOSKMODE"
7358 >filter{quicktime-kioskmode}</A
7361 HREF="actions-file.html#FILTER-FUN"
7365 HREF="actions-file.html#FILTER-CRUDE-PARENTAL"
7366 >filter{crude-parental}</A
7369 HREF="actions-file.html#FILTER-IE-EXPLOITS"
7370 >filter{ie-exploits}</A
7373 HREF="actions-file.html#FILTER-CLIENT-HEADERS"
7374 >filter-client-headers</A
7377 HREF="actions-file.html#FILTER-SERVER-HEADERS"
7378 >filter-server-headers</A
7381 HREF="actions-file.html#FORCE-TEXT-MODE"
7385 HREF="actions-file.html#HANDLE-AS-EMPTY-DOCUMENT"
7386 >handle-as-empty-document</A
7389 HREF="actions-file.html#HANDLE-AS-IMAGE"
7393 HREF="actions-file.html#HIDE-ACCEPT-LANGUAGE"
7394 >hide-accept-language</A
7397 HREF="actions-file.html#HIDE-CONTENT-DISPOSITION"
7398 >hide-content-disposition</A
7401 HREF="actions-file.html#HIDE-IF-MODIFIED-SINCE"
7402 >hide-if-modified-since</A
7405 HREF="actions-file.html#HIDE-FORWARDED-FOR-HEADERS"
7406 >hide-forwarded-for-headers</A
7409 HREF="actions-file.html#HIDE-FROM-HEADER"
7410 >hide-from-header{block}</A
7413 HREF="actions-file.html#HIDE-REFERER"
7414 >hide-referrer{forge}</A
7417 HREF="actions-file.html#HIDE-USER-AGENT"
7421 HREF="actions-file.html#INSPECT-JPEGS"
7425 HREF="actions-file.html#KILL-POPUPS"
7429 HREF="actions-file.html#LIMIT-CONNECT"
7433 HREF="actions-file.html#PREVENT-COMPRESSION"
7434 >prevent-compression</A
7437 HREF="actions-file.html#OVERWRITE-LAST-MODIFIED"
7438 >overwrite-last-modified</A
7441 HREF="actions-file.html#REDIRECT"
7445 HREF="actions-file.html#SEND-VANILLA-WAFER"
7446 >send-vanilla-wafer</A
7449 HREF="actions-file.html#SEND-WAFER"
7453 HREF="actions-file.html#SESSION-COOKIES-ONLY"
7454 >session-cookies-only</A
7457 HREF="actions-file.html#SET-IMAGE-BLOCKER"
7458 >set-image-blocker{pattern}</A
7461 HREF="actions-file.html#TREAT-FORBIDDEN-CONNECTS-LIKE-BLOCKS"
7462 >treat-forbidden-connects-like-blocks</A
7465 / # forward slash will match *all* potential URL patterns.</PRE
7471 > The default behavior is now set. Note that some actions, like not hiding
7472 the user agent, are part of a <SPAN
7474 >"general policy"</SPAN
7476 universally and won't get any exceptions defined later. Other choices,
7477 like not blocking (which is <SPAN
7484 default!) need exceptions, i.e. we need to specify explicitly what we
7485 want to block in later sections.</P
7487 > The first of our specialized sections is concerned with <SPAN
7491 sites, i.e. sites that require minimum interference, because they are either
7492 very complex or very keen on tracking you (and have mechanisms in place that
7493 make them unusable for people who avoid being tracked). We will simply use
7497 > alias instead of stating the list
7498 of actions explicitly:</P
7508 >##########################################################################
7509 # Exceptions for sites that'll break under the default action set:
7510 ##########################################################################
7512 # "Fragile" Use a minimum set of actions for these sites (see alias above):
7515 .office.microsoft.com # surprise, surprise!
7516 .windowsupdate.microsoft.com</PRE
7522 > Shopping sites are not as fragile, but they typically
7523 require cookies to log in, and pop-up windows for shopping
7524 carts or item details. Again, we'll use a pre-defined alias:</P
7538 .worldpay.com # for quietpc.com
7549 HREF="actions-file.html#FAST-REDIRECTS"
7553 action, which we enabled per default above, breaks some sites. So disable
7554 it for popular sites where we know it misbehaves:</P
7565 HREF="actions-file.html#FAST-REDIRECTS"
7571 .altavista.com/.*(like|url|link):http
7572 .altavista.com/trans.*urltext=http
7579 > It is important that <SPAN
7583 URLs belong to images, so that <SPAN
7590 be blocked, a substitute image can be sent, rather than an HTML page.
7591 Contacting the remote site to find out is not an option, since it
7592 would destroy the loading time advantage of banner blocking, and it
7593 would feed the advertisers (in terms of money <SPAN
7600 information). We can mark any URL as an image with the <TT
7603 HREF="actions-file.html#HANDLE-AS-IMAGE"
7607 and marking all URLs that end in a known image file extension is a
7618 >##########################################################################
7620 ##########################################################################
7622 # Define which file types will be treated as images, in case they get
7623 # blocked further down this file:
7626 HREF="actions-file.html#HANDLE-AS-IMAGE"
7629 /.*\.(gif|jpe?g|png|bmp|ico)$</PRE
7635 > And then there are known banner sources. They often use scripts to
7636 generate the banners, so it won't be visible from the URL that the
7637 request is for an image. Hence we block them <SPAN
7644 mark them as images in one go, with the help of our
7647 >+block-as-image</TT
7648 > alias defined above. (We could of
7649 course just as well use <TT
7652 HREF="actions-file.html#BLOCK"
7656 HREF="actions-file.html#HANDLE-AS-IMAGE"
7660 Remember that the type of the replacement image is chosen by the
7664 HREF="actions-file.html#SET-IMAGE-BLOCKER"
7665 >set-image-blocker</A
7668 action. Since all URLs have matched the default section with its
7672 HREF="actions-file.html#SET-IMAGE-BLOCKER"
7673 >set-image-blocker</A
7676 action before, it still applies and needn't be repeated:</P
7686 ># Known ad generators:
7691 .ad.*.doubleclick.net
7692 .a.yimg.com/(?:(?!/i/).)*$
7693 .a[0-9].yimg.com/(?:(?!/i/).)*$
7702 > One of the most important jobs of <SPAN
7706 is to block banners. A huge bunch of them can be <SPAN
7713 HREF="actions-file.html#FILTER"
7715 >{banners-by-size}</TT
7717 action, which we enabled above, and which deletes the references to banner
7718 images from the pages while they are loaded, so the browser doesn't request
7719 them anymore, and hence they don't need to be blocked here. But this naturally
7720 doesn't catch all banners, and some people choose not to use filters, so we
7721 need a comprehensive list of patterns for banner URLs here, and apply the
7725 HREF="actions-file.html#BLOCK"
7728 > action to them.</P
7730 > First comes a bunch of generic patterns, which do most of the work, by
7731 matching typical domain and path name components of banners. Then comes
7732 a list of individual patterns for specific sites, which is omitted here
7733 to keep the example short:</P
7743 >##########################################################################
7744 # Block these fine banners:
7745 ##########################################################################
7747 HREF="actions-file.html#BLOCK"
7757 /.*count(er)?\.(pl|cgi|exe|dll|asp|php[34]?)
7758 /(?:.*/)?(publicite|werbung|rekla(ma|me|am)|annonse|maino(kset|nta|s)?)/
7760 # Site-specific patterns (abbreviated):
7768 > You wouldn't believe how many advertisers actually call their banner
7774 >.com, or call the directory
7775 in which the banners are stored simply <SPAN
7779 generic patterns are surprisingly effective.</P
7781 > But being very generic, they necessarily also catch URLs that we don't want
7782 to block. The pattern <TT
7794 >.nasty-corp.com"</SPAN
7804 >.sourcefroge.net"</SPAN
7814 >l.some-provider.net."</SPAN
7816 well-known exceptions to the <TT
7819 HREF="actions-file.html#BLOCK"
7825 > Note that these are exceptions to exceptions from the default! Consider the URL
7828 >"downloads.sourcefroge.net"</SPAN
7829 >: Initially, all actions are deactivated,
7830 so it wouldn't get blocked. Then comes the defaults section, which matches the
7831 URL, but just deactivates the <TT
7834 HREF="actions-file.html#BLOCK"
7838 action once again. Then it matches <TT
7841 >, an exception to the
7842 general non-blocking policy, and suddenly
7846 HREF="actions-file.html#BLOCK"
7849 > applies. And now, it'll match
7856 HREF="actions-file.html#BLOCK"
7860 applies, so (unless it matches <SPAN
7866 > further down) it ends up
7870 HREF="actions-file.html#BLOCK"
7873 > action applying.</P
7883 >##########################################################################
7884 # Save some innocent victims of the above generic block patterns:
7885 ##########################################################################
7890 HREF="actions-file.html#BLOCK"
7893 adv[io]*. # (for advogato.org and advice.*)
7894 adsl. # (has nothing to do with ads)
7895 ad[ud]*. # (adult.* and add.*)
7896 .edu # (universities don't host banners (yet!))
7897 .*loads. # (downloads, uploads etc)
7905 www.globalintersec.com/adv # (adv = advanced)
7906 www.ugu.com/sui/ugu/adv</PRE
7912 > Filtering source code can have nasty side effects,
7913 so make an exception for our friends at sourceforge.net,
7914 and all paths with <SPAN
7917 > in them. Note that
7921 HREF="actions-file.html#FILTER"
7931 > filters in one fell swoop!</P
7941 ># Don't filter code!
7944 HREF="actions-file.html#FILTER"
7948 .sourceforge.net</PRE
7957 > is of course much more
7958 comprehensive, but we hope this example made clear how it works.</P
7967 >8.7.2. user.action</H3
7969 > So far we are painting with a broad brush by setting general policies,
7970 which would be a reasonable starting point for many people. Now,
7971 you might want to be more specific and have customized rules that
7972 are more suitable to your personal habits and preferences. These would
7973 be for narrowly defined situations like your ISP or your bank, and should
7977 >, which is parsed after all other
7978 actions files and hence has the last word, over-riding any previously
7979 defined actions. <TT
7989 > place for your personal settings, since
7993 > is actively maintained by the
7997 > developers and you'll probably want
7998 to install updated versions from time to time.</P
8000 > So let's look at a few examples of things that one might typically do in
8014 ># My user.action file. <fred@foobar.com></PRE
8021 HREF="actions-file.html#ALIASES"
8023 > are local to the actions
8024 file that they are defined in, you can't use the ones from
8028 >, unless you repeat them here:</P
8038 ># Aliases are local to the file they are defined in.
8039 # (Re-)define aliases for this file:
8043 # These aliases just save typing later, and the alias names should
8044 # be self explanatory.
8046 +crunch-all-cookies = +crunch-incoming-cookies +crunch-outgoing-cookies
8047 -crunch-all-cookies = -crunch-incoming-cookies -crunch-outgoing-cookies
8048 allow-all-cookies = -crunch-all-cookies -session-cookies-only
8049 allow-popups = -filter{all-popups} -kill-popups
8050 +block-as-image = +block +handle-as-image
8051 -block-as-image = -block
8053 # These aliases define combinations of actions that are useful for
8054 # certain types of sites:
8056 fragile = -block -crunch-all-cookies -filter -fast-redirects -hide-referrer -kill-popups
8057 shop = -crunch-all-cookies allow-popups
8059 # Allow ads for selected useful free sites:
8061 allow-ads = -block -filter{banners-by-size} -filter{banners-by-link}
8063 # Alias for specific file types that are text, but might have conflicting
8064 # MIME types. We want the browser to force these to be text documents.
8065 handle-as-text = -<A
8066 HREF="actions-file.html#FILTER"
8069 HREF="actions-file.html#CONTENT-TYPE-OVERWRITE"
8070 >content-type-overwrite{text/plain}</A
8072 HREF="actions-file.html#FORCE-TEXT-MODE"
8075 HREF="actions-file.html#HIDE-CONTENT-DISPOSITION"
8076 >hide-content-disposition</A
8083 > Say you have accounts on some sites that you visit regularly, and
8084 you don't want to have to log in manually each time. So you'd like
8085 to allow persistent cookies for these sites. The
8088 >allow-all-cookies</TT
8089 > alias defined above does exactly
8090 that, i.e. it disables crunching of cookies in any direction, and the
8091 processing of cookies to make them only temporary.</P
8101 >{ allow-all-cookies }
8111 > Your bank is allergic to some filter, but you don't know which, so you disable them all:</P
8122 HREF="actions-file.html#FILTER"
8125 .your-home-banking-site.com</PRE
8131 > Some file types you may not want to filter for various reasons:</P
8141 ># Technical documentation is likely to contain strings that might
8142 # erroneously get altered by the JavaScript-oriented filters:
8147 # And this stupid host sends streaming video with a wrong MIME type,
8148 # so that Privoxy thinks it is getting HTML and starts filtering:
8150 stupid-server.example.com/</PRE
8156 > Example of a simple <A
8157 HREF="actions-file.html#BLOCK"
8159 > action. Say you've
8160 seen an ad on your favourite page on example.com that you want to get rid of.
8161 You have right-clicked the image, selected <SPAN
8163 >"copy image location"</SPAN
8165 and pasted the URL below while removing the leading http://, into a
8169 > section. Note that <TT
8173 > need not be specified, since all URLs ending in
8177 > will be tagged as images by the general rules as set
8178 in default.action anyway:</P
8189 HREF="actions-file.html#BLOCK"
8192 www.example.com/nasty-ads/sponsor.gif
8193 another.popular.site.net/more/junk/here/</PRE
8199 > The URLs of dynamically generated banners, especially from large banner
8200 farms, often don't use the well-known image file name extensions, which
8201 makes it impossible for <SPAN
8205 the file type just by looking at the URL.
8208 >+block-as-image</TT
8209 > alias defined above for
8211 Note that objects which match this rule but then turn out NOT to be an
8212 image are typically rendered as a <SPAN
8214 >"broken image"</SPAN
8216 browser. Use cautiously.</P
8226 >{ +block-as-image }
8236 > Now you noticed that the default configuration breaks Forbes Magazine,
8237 but you were too lazy to find out which action is the culprit, and you
8238 were again too lazy to give <A
8242 you just used the <TT
8245 > alias on the site, and
8252 > -- it worked. The <TT
8256 aliases disables those actions that are most likely to break a site. Also,
8257 good for testing purposes to see if it is <SPAN
8261 that is causing the problem or not. We later find other regular sites
8262 that misbehave, and add those to our personalized list of troublemakers:</P
8281 > You like the <SPAN
8284 > text replacements in <TT
8288 but it is disabled in the distributed actions file. (My colleagues on the team just
8289 don't have a sense of humour, that's why! ;-). So you'd like to turn it on in your private,
8290 update-safe config, once and for all:</P
8301 HREF="actions-file.html#FILTER-FUN"
8304 / # For ALL sites!</PRE
8310 > Note that the above is not really a good idea: There are exceptions
8311 to the filters in <TT
8315 really shouldn't be filtered, like code on CVS->Web interfaces. Since
8319 > has the last word, these exceptions
8320 won't be valid for the <SPAN
8323 > filtering specified here.</P
8325 > You might also worry about how your favourite free websites are
8326 funded, and find that they rely on displaying banner advertisements
8327 to survive. So you might want to specifically allow banners for those
8328 sites that you feel provide value to you:</P
8350 > has been aliased to
8354 HREF="actions-file.html#BLOCK"
8361 HREF="actions-file.html#FILTER-BANNERS-BY-SIZE"
8362 >filter{banners-by-size}</A
8368 HREF="actions-file.html#FILTER-BANNERS-BY-LINK"
8369 >filter{banners-by-link}</A
8373 > Invoke another alias here to force an over-ride of the MIME type <TT
8375 > application/x-sh</TT
8376 > which typically would open a download type
8377 dialog. In my case, I want to look at the shell script, and then I can save
8378 it should I choose to.</P
8398 > is generally the best place to define
8399 exceptions and additions to the default policies of
8403 >. Some actions are safe to have their
8404 default policies set here though. So let's set a default policy to have a
8408 > image as opposed to the checkerboard pattern for
8418 > of course matches all URL
8419 paths and patterns:</P
8430 HREF="actions-file.html#SET-IMAGE-BLOCKER"
8431 >set-image-blocker{blank}</A
8446 SUMMARY="Footer navigation table"
8475 HREF="filter-file.html"
8485 >The Main Configuration File</TD