7 CONTENT="Modular DocBook HTML Stylesheet Version 1.60"><LINK
9 TITLE="Privoxy User Manual"
10 HREF="index.html"><LINK
12 TITLE="The Main Configuration File"
13 HREF="config.html"><LINK
15 TITLE="The Filter File"
16 HREF="filter-file.html"><LINK
19 HREF="../p_doc.css"></HEAD
38 >Privoxy User Manual</TH
59 HREF="filter-file.html"
76 > The actions files are used to define what actions
80 > takes for which URLs, and thus determine
81 how ad images, cookies and various other aspects of HTTP content and
82 transactions are handled, and on which sites (or even parts thereof). There
83 are three such files included with <SPAN
87 version 2.9.15), with differing purposes:
98 > - is the primary action file
99 that sets the initial values for all actions. It is intended to
100 provide a base level of functionality for
104 > array of features. So it is
105 a set of broad rules that should work reasonably well for users everywhere.
106 This is the file that the developers are keeping updated, and making
115 > - is intended to be for local site
116 preferences and exceptions. As an example, if your ISP or your bank
117 has specific requirements, and need special handling, this kind of
118 thing should go here. This file will not be upgraded.
126 > - is used by the web based editor,
127 to set various pre-defined sets of rules for the default actions section
131 >. These have increasing levels of
134 >and have no influence on your browsing unless
135 you select them explicitly in the editor</I
136 >. It is not recommend
144 > The list of actions files to be used are defined in the main configuration
145 file, and are processed in the order they are defined. The content of these
146 can all be viewed and edited from <A
147 HREF="http://config.privoxy.org/show-status"
149 >http://config.privoxy.org/show-status</A
152 > An actions file typically has multiple sections. If you want to use
156 > in an actions file, you have to place the (optional)
158 HREF="actions-file.html#ALIASES"
160 > at the top of that file.
161 Then comes the default set of rules which will apply universally to all
162 sites and pages (be <I
169 > or any other actions file after
173 >, because it will override the result
174 from consulting any previous file). And then below that,
175 exceptions to the defined universal policies. You can regard
179 > as an appendix to <TT
183 with the advantage that is a separate file, which makes preserving your
184 personal settings across <SPAN
187 > upgrades easier.</P
190 Actions can be used to block anything you want, including ads, banners, or
191 just some obnoxious URL that you would rather not see. Cookies can be accepted
192 or rejected, or accepted only during the current browser session (i.e. not
193 written to disk), content can be modified, JavaScripts tamed, user-tracking
194 fooled, and much more. See below for a <A
195 HREF="actions-file.html#ACTIONS"
205 >8.1. Finding the Right Mix</A
209 HREF="actions-file.html#ACTIONS"
211 >, like cookie suppression
212 or script disabling, may render some sites unusable that rely on these
213 techniques to work properly. Finding the right mix of actions is not always easy and
214 certainly a matter of personal taste. In general, it can be said that the more
218 > your default settings (in the top section of the
219 actions file) are, the more exceptions for <SPAN
223 will have to make later. If, for example, you want to kill popup windows per
224 default, you'll have to make exceptions from that rule for sites that you
225 regularly use and that require popups for actually useful content, like maybe
226 your bank, favorite shop, or newspaper.</P
228 > We have tried to provide you with reasonable rules to start from in the
229 distribution actions files. But there is no general rule of thumb on these
230 things. There just are too many variables, and sites are constantly changing.
231 Sooner or later you will want to change the rules (and read this chapter again :).</P
242 > The easiest way to edit the actions files is with a browser by
243 using our browser-based editor, which can be reached from <A
244 HREF="http://config.privoxy.org/show-status"
246 >http://config.privoxy.org/show-status</A
248 The editor allows both fine-grained control over every single feature on a
249 per-URL basis, and easy choosing from wholesale sets of defaults like
261 > If you prefer plain text editing to GUIs, you can of course also directly edit the
262 the actions files. Look at <TT
274 >8.3. How Actions are Applied to URLs</A
277 > Actions files are divided into sections. There are special sections,
281 HREF="actions-file.html#ALIASES"
284 > sections which will
285 be discussed later. For now let's concentrate on regular sections: They have a
286 heading line (often split up to multiple lines for readability) which consist
287 of a list of actions, separated by whitespace and enclosed in curly braces.
288 Below that, there is a list of URL patterns, each on a separate line.</P
290 > To determine which actions apply to a request, the URL of the request is
291 compared to all patterns in each action file file. Every time it matches, the list of
292 applicable actions for the URL is incrementally updated, using the heading
293 of the section in which the pattern is located. If multiple matches for
294 the same URL set the same action differently, the last match wins. If not,
295 the effects are aggregated. E.g. a URL might match a regular section with
296 a heading line of <TT
300 HREF="actions-file.html#HANDLE-AS-IMAGE"
305 then later another one with just <TT
309 HREF="actions-file.html#BLOCK"
317 > actions to apply.</P
319 > You can trace this process for any given URL by visiting <A
320 HREF="http://config.privoxy.org/show-url-info"
322 >http://config.privoxy.org/show-url-info</A
325 > More detail on this is provided in the Appendix, <A
326 HREF="appendix.html#ACTIONSANAT"
327 > Anatomy of an Action</A
339 > Generally, a pattern has the form <TT
341 ><domain>/<path></TT
345 ><domain></TT
350 are optional. (This is why the pattern <TT
353 > matches all URLs).</P
362 >www.example.com/</TT
366 > is a domain-only pattern and will match any request to <TT
370 regardless of which document on that server is requested.
380 > means exactly the same. For domain-only patterns, the trailing <TT
390 >www.example.com/index.html</TT
394 > matches only the single document <TT
411 > matches the document <TT
414 >, regardless of the domain,
428 > matches nothing, since it would be interpreted as a domain name and
429 there is no top-level domain called <TT
443 >8.4.1. The Domain Pattern</A
446 > The matching of the domain part offers some flexible options: if the
447 domain starts or ends with a dot, it becomes unanchored at that end.
461 > matches any domain that <I
478 > matches any domain that <I
495 > matches any domain that <I
502 (Correctly speaking: It matches any FQDN that contains <TT
511 > Additionally, there are wild-cards that you can use in the domain names
512 themselves. They work pretty similar to shell wild-cards: <SPAN
516 stands for zero or more arbitrary characters, <SPAN
520 any single character, you can define character classes in square
521 brackets and all of that can be freely mixed:</P
536 >"adserver.example.com"</SPAN
540 >"ads.example.com"</SPAN
543 >"sfads.example.com"</SPAN
550 >*ad*.example.com</TT
554 > matches all of the above, and then some.
570 >pictures.epix.com</TT
573 >a.b.c.d.e.upix.com</TT
580 >www[1-9a-ez].example.c*</TT
586 >www1.example.com</TT
597 >wwwz.example.com</TT
604 >wwww.example.com</TT
617 >8.4.2. The Path Pattern</A
623 > uses Perl compatible regular expressions
625 HREF="http://www.pcre.org/"
629 matching the path.</P
632 HREF="appendix.html#REGEX"
634 > with a brief quick-start into regular
635 expressions, and full (very technical) documentation on PCRE regex syntax is available on-line
637 HREF="http://www.pcre.org/man.txt"
639 >http://www.pcre.org/man.txt</A
641 You might also find the Perl man page on regular expressions (<TT
645 useful, which is available on-line at <A
646 HREF="http://www.perldoc.com/perl5.6/pod/perlre.html"
648 >http://www.perldoc.com/perl5.6/pod/perlre.html</A
651 > Note that the path pattern is automatically left-anchored at the <SPAN
655 i.e. it matches as if it would start with a <SPAN
658 > (regular expression speak
659 for the beginning of a line).</P
661 > Please also note that matching in the path is <I
665 by default, but you can switch to case sensitive at any point in the pattern by using the
671 >www.example.com/(?-i)PaTtErN.*</TT
673 only documents whose path starts with <TT
680 > this capitalization.</P
692 > All actions are disabled by default, until they are explicitly enabled
693 somewhere in an actions file. Actions are turned on if preceded with a
697 >, and turned off if preceded with a <SPAN
706 >"do that action"</SPAN
713 >"please block URLs that match the
714 following patterns"</SPAN
721 block URLs that match the following patterns, even if <TT
725 previously applied."</SPAN
729 Again, actions are invoked by placing them on a line, enclosed in curly braces and
730 separated by whitespace, like in
733 >{+some-action -some-other-action{some-parameter}}</TT
735 followed by a list of URL patterns, one per line, to which they apply.
736 Together, the actions line and the following pattern lines make up a section
737 of the actions file. </P
740 There are three classes of actions:</P
748 Boolean, i.e the action can only be <SPAN
771 > # enable action <TT
782 > # disable action <TT
804 Parameterized, where some value is required in order to enable this type of action.
826 >} # enable action and set parameter to <TT
832 # overwriting parameter from previous match if necessary
838 > # disable action. The parameter can be omitted</PRE
845 > Note that if the URL matches multiple positive forms of a parameterized action,
846 the last match wins, i.e. the params from earlier matches are simply ignored.
852 >+hide-user-agent{ Mozilla 1.0 }</TT
859 Multi-value. These look exactly like parameterized actions,
860 but they behave differently: If the action applies multiple times to the
861 same URL, but with different parameters, <I
868 > matches are remembered. This is used for actions
869 that can be executed for the same request repeatedly, like adding multiple
870 headers, or filtering through multiple filters. Syntax:
891 >} # enable action and add <TT
896 > to the list of parameters
907 >} # remove the parameter <TT
912 > from the list of parameters
913 # If it was the last one left, disable the action.
919 > # disable this action completely and remove all parameters from the list</PRE
929 >+add-header{X-Fun-Header: Some text}</TT
933 >+filter{html-annoyances}</TT
940 > If nothing is specified in any actions file, no <SPAN
944 taken. So in this case <SPAN
948 normal, non-blocking, non-anonymizing proxy. You must specifically enable the
949 privacy and blocking features you need (although the provided default actions
950 files will give a good starting point).</P
952 > Later defined actions always over-ride earlier ones. So exceptions
953 to any rules you make, should come in the latter part of the file (or
954 in a file that is processed later when using multiple actions files). For
955 multi-valued actions, the actions are applied in the order they are specified.
956 Actions files are processed in the order they are defined in
960 > (the default installation has three actions
961 files). It also quite possible for any given URL pattern to match more than
962 one pattern and thus more than one set of actions!</P
964 > The list of valid <SPAN
974 >8.5.1. add-header</A
985 >Confuse log analysis, custom applications</P
991 > Sends a user defined HTTP header to the web server.
1004 > Any string value is possible. Validity of the defined HTTP headers is not checked.
1005 It is recommended that you use the <SPAN
1019 > This action may be specified multiple times, in order to define multiple
1020 headers. This is rarely needed for the typical user. If you don't know what
1023 >"HTTP headers"</SPAN
1024 > are, you definitely don't need to worry about this
1040 >+add-header{X-User-Tracking: sucks}</PRE
1061 CLASS="VARIABLELIST"
1067 >Block ads or other obnoxious content</P
1073 > Requests for URLs to which this action applies are blocked, i.e. the requests are not
1074 forwarded to the remote server, but answered locally with a substitute page or image,
1075 as determined by the <TT
1078 HREF="actions-file.html#HANDLE-AS-IMAGE"
1085 HREF="actions-file.html#SET-IMAGE-BLOCKER"
1086 >set-image-blocker</A
1110 > sends a special <SPAN
1114 for requests to blocked pages. This page contains links to find out why the request
1115 was blocked, and a click-through to the blocked content (the latter only if compiled with the
1116 force feature enabled). The <SPAN
1119 > page adapts to the available
1120 screen space -- it displays full-blown if space allows, or miniaturized and text-only
1121 if loaded into a small frame or window. If you are using <SPAN
1125 right now, you can take a look at the
1127 HREF="http://ads.bannerserver.example.com/nasty-ads/sponsor.html"
1138 A very important exception occurs if <I
1148 HREF="actions-file.html#HANDLE-AS-IMAGE"
1152 apply to the same request: it will then be replaced by an image. If
1156 HREF="actions-file.html#SET-IMAGE-BLOCKER"
1157 >set-image-blocker</A
1160 (see below) also applies, the type of image will be determined by its parameter,
1161 if not, the standard checkerboard pattern is sent.
1164 > It is important to understand this process, in order
1165 to understand how <SPAN
1169 ads and other unwanted content.
1175 HREF="actions-file.html#FILTER"
1179 action can perform a very similar task, by <SPAN
1183 banner images and other content through rewriting the relevant URLs in the
1184 document's HTML source, so they don't get requested in the first place.
1185 Note that this is a totally different technique, and it's easy to confuse the two.
1189 >Example usage (section):</DT
1200 >{+block} # Block and replace with "blocked" page
1201 .nasty-stuff.example.com
1203 {+block +handle-as-image} # Block and replace with image
1220 NAME="CRUNCH-INCOMING-COOKIES"
1221 >8.5.3. crunch-incoming-cookies</A
1226 CLASS="VARIABLELIST"
1232 > Prevent the web server from setting any cookies on your system
1241 >"Set-Cookie:"</SPAN
1242 > HTTP headers from server replies.
1262 > This action is only concerned with <I
1273 HREF="actions-file.html#CRUNCH-OUTGOING-COOKIES"
1274 >crunch-outgoing-cookies</A
1280 > to disable cookies completely.
1286 > to use this action in conjunction
1290 HREF="actions-file.html#SESSION-COOKIES-ONLY"
1291 >session-cookies-only</A
1294 since it would prevent the session cookies from being set.
1309 >+crunch-incoming-cookies</PRE
1324 NAME="CRUNCH-OUTGOING-COOKIES"
1325 >8.5.4. crunch-outgoing-cookies</A
1330 CLASS="VARIABLELIST"
1336 > Prevent the web server from reading any cookies from your system
1346 > HTTP headers from client requests.
1366 > This action is only concerned with <I
1377 HREF="actions-file.html#CRUNCH-INCOMING-COOKIES"
1378 >crunch-incoming-cookies</A
1384 > to disable cookies completely.
1390 > to use this action in conjunction
1394 HREF="actions-file.html#SESSION-COOKIES-ONLY"
1395 >session-cookies-only</A
1398 since it would prevent the session cookies from being read.
1413 >+crunch-outgoing-cookies</PRE
1428 NAME="DEANIMATE-GIFS"
1429 >8.5.5. deanimate-gifs</A
1434 CLASS="VARIABLELIST"
1440 >Stop those annoying, distracting animated GIF images.</P
1446 > De-animate GIF animations, i.e. reduce them to their first or last image.
1472 > This will also shrink the images considerably (in bytes, not pixels!). If
1476 > is given, the first frame of the animation
1477 is used as the replacement. If <SPAN
1480 > is given, the last
1481 frame of the animation is used instead, which probably makes more sense for
1482 most banner animations, but also has the risk of not showing the entire
1483 last frame (if it is only a delta to an earlier frame).
1486 > You can safely use this action with patterns that will also match non-GIF
1487 objects, because no attempt will be made at anything that doesn't look like
1503 >+deanimate-gifs{last}</PRE
1518 NAME="DOWNGRADE-HTTP-VERSION"
1519 >8.5.6. downgrade-http-version</A
1524 CLASS="VARIABLELIST"
1530 >Work around (very rare) problems with HTTP/1.1</P
1536 > Downgrades HTTP/1.1 client requests and server replies to HTTP/1.0.
1556 > This is a left-over from the time when <SPAN
1560 didn't support important HTTP/1.1 features well. It is left here for the
1561 unlikely case that you experience HTTP/1.1 related problems with some server
1562 out there. Not all (optional) HTTP/1.1 features are supported yet, so there
1563 is a chance you might need this action.
1567 >Example usage (section):</DT
1578 >{+downgrade-http-version}
1579 problem-host.example.com</PRE
1594 NAME="FAST-REDIRECTS"
1595 >8.5.7. fast-redirects</A
1600 CLASS="VARIABLELIST"
1606 >Fool some click-tracking scripts and speed up indirect links</P
1612 > Cut off all but the last valid URL from requests.
1633 Many sites, like yahoo.com, don't just link to other sites. Instead, they
1634 will link to some script on their own servers, giving the destination as a
1635 parameter, which will then redirect you to the final target. URLs
1636 resulting from this scheme typically look like:
1639 >http://some.place/click-tracker.cgi?target=http://some.where.else</I
1643 > Sometimes, there are even multiple consecutive redirects encoded in the
1644 URL. These redirections via scripts make your web browsing more traceable,
1645 since the server from which you follow such a link can see where you go
1646 to. Apart from that, valuable bandwidth and time is wasted, while your
1647 browser ask the server for one redirect after the other. Plus, it feeds
1651 > This feature is currently not very smart and is scheduled for improvement.
1652 It is likely to break some sites. You should expect to need possibly
1653 many exceptions to this action, if it is enabled by default in
1657 >. Some sites just don't work without
1673 >{+fast-redirects}</PRE
1694 CLASS="VARIABLELIST"
1700 >Get rid of HTML and JavaScript annoyances, banner advertisements (by size), do fun text replacements, etc.</P
1706 > Text documents, including HTML and JavaScript, to which this action applies, are filtered on-the-fly
1707 through the specified regular expression based substitutions.
1720 > The name of a filter, as defined in the <A
1721 HREF="filter-file.html"
1731 HREF="config.html#FILTERFILE"
1745 > For your convenience, there are a bunch of pre-defined filters available
1746 in the distribution filter file that you can use. See the example below for
1750 > This is potentially a very powerful feature! But <SPAN
1752 >"rolling your own"</SPAN
1754 filters requires a knowledge of regular expressions and HTML.
1757 > Filtering requires buffering the page content, which may appear to
1758 slow down page rendering since nothing is displayed until all content has
1759 passed the filters. (It does not really take longer, but seems that way
1760 since the page is not incrementally displayed.) This effect will be more
1761 noticeable on slower connections.
1764 > At this time, <SPAN
1767 > cannot (yet!) uncompress compressed
1768 documents. If you want filtering to work on all documents, even those that
1769 would normally be sent compressed, use the
1773 HREF="actions-file.html#PREVENT-COMPRESSION"
1774 >prevent-compression</A
1777 action in conjunction with <TT
1783 > Filtering can achieve some of the effects as the
1787 HREF="actions-file.html#BLOCK"
1791 action, i.e. it can be used to block ads and banners.
1797 > with suggestions for new or improved filters is particularly
1802 >Example usage (with filters from the distribution <TT
1809 NAME="FILTER-HTML-ANNOYANCES"
1820 >+filter{html-annoyances} # Get rid of particularly annoying HTML abuse.</PRE
1828 NAME="FILTER-JS-ANNOYANCES"
1839 >+filter{js-annoyances} # Get rid of particularly annoying JavaScript abuse</PRE
1847 NAME="FILTER-BANNERS-BY-SIZE"
1858 >+filter{banners-by-size} # Kill banners by size (<I
1869 NAME="FILTER-CONTENT-COOKIES"
1880 >+filter{content-cookies} # Kill cookies that come sneaking in the HTML or JS content</PRE
1888 NAME="FILTER-POPUPS"
1899 >+filter{popups} # Kill all popups in JS and HTML</PRE
1907 NAME="FILTER-WEBBUGS"
1918 >+filter{webbugs} # Squish WebBugs (1x1 invisible GIFs used for user tracking)</PRE
1937 >+filter{fun} # Text replacements for subversive browsing fun!</PRE
1945 NAME="FILTER-FRAMESET-BORDERS"
1956 >+filter{frameset-borders} # Give frames a border and make them resizeable</PRE
1964 NAME="FILTER-REFRESH-TAGS"
1975 >+filter{refresh-tags} # Kill automatic refresh tags (for dial-on-demand setups)</PRE
1994 >+filter{nimda} # Remove Nimda (virus) code.</PRE
2002 NAME="FILTER-SHOCKWAVE-FLASH"
2013 >+filter{shockwave-flash} # Kill embedded Shockwave Flash objects</PRE
2021 NAME="FILTER-CRUDE-PARENTAL"
2032 >+filter{crude-parental} # Kill all web pages that contain the words "sex" or "warez"</PRE
2047 NAME="HANDLE-AS-IMAGE"
2048 >8.5.9. handle-as-image</A
2053 CLASS="VARIABLELIST"
2059 >Mark URLs as belonging to images (so they'll be replaced by images <I
2061 >if they get blocked</I
2068 > This action alone doesn't do anything noticeable. It just marks URLs as images.
2072 HREF="actions-file.html#BLOCK"
2079 the presence or absence of this mark decides whether an HTML <SPAN
2083 page, or a replacement image (as determined by the <TT
2086 HREF="actions-file.html#SET-IMAGE-BLOCKER"
2087 >set-image-blocker</A
2089 > action) will be sent to the
2090 client as a substitute for the blocked content.
2110 > The below generic example section is actually part of <TT
2114 It marks all URLs with well-known image file name extensions as images and should
2118 > Users will probably only want to use the handle-as-image action in conjunction with
2122 HREF="actions-file.html#BLOCK"
2125 >, to block sources of banners, whose URLs don't
2126 reflect the file type, like in the second example section.
2129 > Note that you cannot treat HTML pages as images in most cases. For instance, (inline) ad
2130 frames require an HTML page to be sent, or they won't display properly.
2133 >handle-as-image</TT
2134 > in this situation will not replace the
2135 ad frame with an image, but lead to error messages.
2139 >Example usage (sections):</DT
2150 ># Generic image extensions:
2153 /.*\.(gif|jpg|jpeg|png|bmp|ico)$
2155 # These don't look like images, but they're banners and should be
2156 # blocked as images:
2158 {+block +handle-as-image}
2159 some.nasty-banner-server.com/junk.cgi?output=trash
2161 # Banner source! Who cares if they also have non-image content?
2162 ad.doubleclick.net </PRE
2177 NAME="HIDE-FORWARDED-FOR-HEADERS"
2178 >8.5.10. hide-forwarded-for-headers</A
2183 CLASS="VARIABLELIST"
2189 >Improve privacy by hiding the true source of the request</P
2195 > Deletes any existing <SPAN
2197 >"X-Forwarded-for:"</SPAN
2198 > HTTP header from client requests,
2199 and prevents adding a new one.
2219 > It is fairly safe to leave this on.
2222 > This action is scheduled for improvement: It should be able to generate forged
2225 >"X-Forwarded-for:"</SPAN
2226 > headers using random IP addresses from a specified network,
2227 to make successive requests from the same client look like requests from a pool of different
2228 users sharing the same proxy.
2243 >+hide-forwarded-for-headers</PRE
2258 NAME="HIDE-FROM-HEADER"
2259 >8.5.11. hide-from-header</A
2264 CLASS="VARIABLELIST"
2270 >Keep your (old and ill) browser from telling web servers your email address</P
2276 > Deletes any existing <SPAN
2279 > HTTP header, or replaces it with the
2296 >, or any user defined value.
2306 > will completely remove the header
2307 (not to be confused with the <TT
2310 HREF="actions-file.html#BLOCK"
2317 > Alternately, you can specify any value you prefer to be sent to the web
2318 server. If you do, it is a matter of fairness not to use any address that
2319 is actually used by a real person.
2322 > This action is rarely needed, as modern web browsers don't send
2341 >+hide-from-header{block}</PRE
2354 >+hide-from-header{spam-me-senseless@sittingduck.example.com}</PRE
2369 NAME="HIDE-REFERRER"
2370 >8.5.12. hide-referrer</A
2378 CLASS="VARIABLELIST"
2384 >Conceal which link you followed to get to a particular site</P
2393 > (sic) HTTP header from the client request,
2394 or replaces it with a forged one.
2414 > to delete the header completely.</P
2421 > to pretend to be coming from the homepage of the server we are talking to.</P
2425 >Any other string to set a user defined referrer.</P
2436 > is the preferred option here, since some servers will
2437 not send images back otherwise, in an attempt to prevent their valuable
2438 content from being embedded elsewhere (and hence, without being surrounded
2449 > is an alternate spelling of
2453 > and the two can be can be freely
2454 substituted with each other. (<SPAN
2458 correct English spelling, however the HTTP specification has a bug - it
2459 requires it to be spelled as <SPAN
2477 >+hide-referrer{forge}</PRE
2490 >+hide-referrer{http://www.yahoo.com/}</PRE
2505 NAME="HIDE-USER-AGENT"
2506 >8.5.13. hide-user-agent</A
2511 CLASS="VARIABLELIST"
2517 >Conceal your type of browser and client operating system</P
2523 > Replaces the value of the <SPAN
2525 >"User-Agent:"</SPAN
2527 in client requests with the specified value.
2540 > Any user-defined string.
2565 > This breaks many web sites that depend on looking at this header in order
2566 to customize their content for different browsers (which, by the
2571 HREF="http://www.javascriptkit.com/javaindex.shtml"
2582 > Using this action in multi-user setups or wherever different types of
2583 browsers will access the same <SPAN
2590 >. In single-user, single-browser
2591 setups, you might use it to delete your OS version information from
2592 the headers, because it is an invitation to exploit known bugs for your
2593 OS. It is also occasionally useful to forge this in order to access
2594 sites that won't let you in otherwise (though there may be a good
2595 reason in some cases). Example of this: some MSN sites will not
2599 > enter, yet forging to a
2603 > user-agent works just fine.
2604 (Must be just a silly MS goof, I'm sure :-).
2607 > This action is scheduled for improvement.
2622 >+hide-user-agent{Netscape 6.1 (X11; I; Linux 2.4.18 i686)}</PRE
2638 >8.5.14. kill-popups<A
2646 CLASS="VARIABLELIST"
2652 >Eliminate those annoying pop-up windows</P
2658 > While loading the document, replace JavaScript code that opens
2659 pop-up windows with (syntactically neutral) dummy code on the fly.
2679 > This action is easily confused with the built-in, hardwired <TT
2682 HREF="actions-file.html#FILTER"
2686 action, but there are important differences: For <TT
2690 the document need not be buffered, so it can be incrementally rendered while
2691 downloading. But <TT
2694 > doesn't catch as many pop-ups as
2698 HREF="actions-file.html#FILTER"
2710 > Think of it as a fast and efficient replacement for a filter that you
2711 can use if you don't want any filtering at all. Note that it doesn't make
2712 sense to combine it with any <TT
2715 HREF="actions-file.html#FILTER"
2719 since as soon as one <TT
2722 HREF="actions-file.html#FILTER"
2726 the whole document needs to be buffered anyway, which destroys the advantage of
2730 > action over its filter equivalent.
2733 > Killing all pop-ups is a dangerous business. Many shops and banks rely on
2734 pop-ups to display forms, shopping carts etc, and killing only the unwanted pop-ups
2735 would require artificial intelligence in <SPAN
2739 If the only kind of pop-ups that you want to kill are exit consoles (those
2743 > windows that appear when you close an other
2744 one), you might want to use
2748 HREF="actions-file.html#FILTER"
2786 NAME="LIMIT-CONNECT"
2787 >8.5.15. limit-connect</A
2792 CLASS="VARIABLELIST"
2798 >Prevent abuse of <SPAN
2801 > as a TCP proxy relay</P
2807 > Specifies to which ports HTTP CONNECT requests are allowable.
2820 > A comma-separated list of ports or port ranges (the latter using dashes, with the minimum
2821 defaulting to 0 and the maximum to 65K).
2828 > By default, i.e. if no <TT
2835 > only allows HTTP CONNECT
2836 requests to port 443 (the standard, secure HTTPS port). Use
2840 > if more fine-grained control is desired
2841 for some or all destinations.
2844 > The CONNECT methods exists in HTTP to allow access to secure websites
2848 > URLs) through proxies. It works very simply:
2849 the proxy connects to the server on the specified port, and then
2850 short-circuits its connections to the client and to the remote server.
2851 This can be a big security hole, since CONNECT-enabled proxies can be
2852 abused as TCP relays very easily.
2855 > If you don't know what any of this means, there probably is no reason to
2856 change this one, since the default is already very restrictive.
2860 >Example usages:</DT
2871 >+limit-connect{443} # This is the default and need not be specified.
2872 +limit-connect{80,443} # Ports 80 and 443 are OK.
2873 +limit-connect{-3, 7, 20-100, 500-} # Ports less than 3, 7, 20 to 100 and above 500 are OK.
2874 +limit-connect{-} # All ports are OK (gaping security hole!)</PRE
2889 NAME="PREVENT-COMPRESSION"
2890 >8.5.16. prevent-compression</A
2895 CLASS="VARIABLELIST"
2901 > Ensure that servers send the content uncompressed, so it can be
2905 HREF="actions-file.html#FILTER"
2915 > Adds a header to the request that asks for uncompressed transfer.
2935 > More and more websites send their content compressed by default, which
2936 is generally a good idea and saves bandwidth. But for the <TT
2939 HREF="actions-file.html#FILTER"
2945 HREF="actions-file.html#DEANIMATE-GIFS"
2952 HREF="actions-file.html#KILL-POPUPS"
2959 > needs access to the uncompressed data.
2960 Unfortunately, <SPAN
2963 > can't yet(!) uncompress, filter, and
2964 re-compress the content on the fly. So if you want to ensure that all websites, including
2965 those that normally compress, can be filtered, you need to use this action.
2968 > This will slow down transfers from those websites, though. If you use any of the above-mentioned
2969 actions, you will typically want to use <TT
2971 >prevent-compression</TT
2976 > Note that some (rare) ill-configured sites don't handle requests for uncompressed
2977 documents correctly (they send an empty document body). If you use <TT
2979 >prevent-compression</TT
2981 per default, you'll have to add exceptions for those sites. See the example for how to do that.
2985 >Example usage (sections):</DT
2998 {+prevent-compression}
3001 # Make exceptions for ill sites:
3003 {-prevent-compression}
3005 www.pclinuxonline.com</PRE
3020 NAME="SEND-VANILLA-WAFER"
3021 >8.5.17. send-vanilla-wafer</A
3026 CLASS="VARIABLELIST"
3032 > Feed log analysis scripts with useless data.
3039 > Sends a cookie with each request stating that you do not accept any copyright
3040 on cookies sent to you, and asking the site operator not to track you.
3060 > The vanilla wafer is a (relatively) unique header and could conceivably be used to track you.
3063 > This action is rarely used and not enabled in the default configuration.
3078 >+send-vanilla-wafer</PRE
3094 >8.5.18. send-wafer</A
3099 CLASS="VARIABLELIST"
3105 > Send custom cookies or feed log analysis scripts with even more useless data.
3112 > Sends a custom, user-defined cookie with each request.
3125 > A string of the form <SPAN
3145 > Being multi-valued, multiple instances of this action can apply to the same request,
3146 resulting in multiple cookies being sent.
3149 > This action is rarely used and not enabled in the default configuration.
3153 >Example usage (section):</DT
3164 >{+send-wafer{UsingPrivoxy=true}}
3165 my-internal-testing-server.void</PRE
3180 NAME="SESSION-COOKIES-ONLY"
3181 >8.5.19. session-cookies-only</A
3186 CLASS="VARIABLELIST"
3192 > Allow only temporary <SPAN
3195 > cookies (for the current browser session <I
3210 >"Set-Cookie:"</SPAN
3212 Most browsers will not store such cookies permanently and forget them in between sessions.
3232 > This is less strict than <TT
3235 HREF="actions-file.html#CRUNCH-INCOMING-COOKIES"
3236 >crunch-incoming-cookies</A
3242 HREF="actions-file.html#CRUNCH-OUTGOING-COOKIES"
3243 >crunch-outgoing-cookies</A
3245 > and allows you to browse
3246 websites that insist or rely on setting cookies, without compromising your privacy too badly.
3249 > Most browsers will not permanently store cookies that have been processed by
3252 >session-cookies-only</TT
3253 > and will forget about them between sessions.
3254 This makes profiling cookies useless, but won't break sites which require cookies so
3255 that you can log in for transactions. This is generally turned on for all
3256 sites, and is the recommended setting.
3264 >session-cookies-only</TT
3269 HREF="actions-file.html#CRUNCH-INCOMING-COOKIES"
3270 >crunch-incoming-cookies</A
3276 HREF="actions-file.html#CRUNCH-OUTGOING-COOKIES"
3277 >crunch-outgoing-cookies</A
3279 >. If you do, cookies
3280 will be plainly killed.
3283 > Note that it is up to the browser how it handles such cookies without an <SPAN
3287 field. If you use an exotic browser, you might want to try it out to be sure.
3302 >+session-cookies-only</PRE
3317 NAME="SET-IMAGE-BLOCKER"
3318 >8.5.20. set-image-blocker</A
3323 CLASS="VARIABLELIST"
3329 >Choose the replacement for blocked images</P
3335 > This action alone doesn't do anything noticeable. If <I
3342 HREF="actions-file.html#BLOCK"
3351 HREF="actions-file.html#HANDLE-AS-IMAGE"
3358 apply, i.e. if the request is to be blocked as an image,
3362 > the parameter of this action decides what will be
3363 sent as a replacement.
3383 > to send a built-in checkerboard pattern image. The image is visually
3384 decent, scales very well, and makes it obvious where banners were busted.
3392 > to send a built-in transparent image. This makes banners disappear
3393 completely, but makes it hard to detect where <SPAN
3397 images on a given page and complicates troubleshooting if <SPAN
3401 has blocked innocent images, like navigation icons.
3415 send a redirect to <TT
3421 to any image anywhere, even in your local filesystem (via <SPAN
3427 > A good application of redirects is to use special <SPAN
3431 URLs, which send the built-in images, as <TT
3437 This has the same visual effect as specifying <SPAN
3444 the first place, but enables your browser to cache the replacement image, instead of requesting
3445 it over and over again.
3454 > The URLs for the built-in images are <SPAN
3456 >"http://config.privoxy.org/send-banner?type=<TT
3477 > There is a third (advanced) type, called <SPAN
3486 >set-image-blocker</TT
3487 >, but meant for use from <A
3488 HREF="filter-file.html"
3491 Auto will select the type of image that would have applied to the referring page, had it been an image.
3509 >+set-image-blocker{pattern}</PRE
3516 > Redirect to the BSD devil:
3527 >+set-image-blocker{http://www.freebsd.org/gifs/dae_up3.gif}</PRE
3534 > Redirect to the built-in pattern for better caching:
3545 >+set-image-blocker{http://config.privoxy.org/send-banner?type=pattern}</PRE
3564 > Note that many of these actions have the potential to cause a page to
3565 misbehave, possibly even not to display at all. There are many ways
3566 a site designer may choose to design his site, and what HTTP header
3567 content, and other criteria, he may depend on. There is no way to have hard
3568 and fast rules for all sites. See the <A
3569 HREF="appendix.html#ACTIONSANAT"
3571 > for a brief example on troubleshooting
3594 >, can be defined by combining other actions.
3595 These can in turn be invoked just like the built-in actions.
3596 Currently, an alias name can contain any character except space, tab,
3611 > that you only use <SPAN
3631 Alias names are not case sensitive, and are not required to start with a
3638 > sign, since they are merely textually
3641 > Aliases can be used throughout the actions file, but they <I
3644 defined in a special section at the top of the file!</I
3646 And there can only be one such section per actions file. Each actions file may
3647 have its own alias section, and the aliases defined in it are only visible
3648 within that file.</P
3650 > There are two main reasons to use aliases: One is to save typing for frequently
3651 used combinations of actions, the other one is a gain in flexibility: If you
3652 decide once how you want to handle shops by defining an alias called
3656 >, you can later change your policy on shops in
3660 > place, and your changes will take effect everywhere
3661 in the actions file where the <SPAN
3664 > alias is used. Calling aliases
3665 by their purpose also makes your actions files more readable.</P
3667 > Currently, there is one big drawback to using aliases, though:
3671 >'s built-in web-based action file
3672 editor honors aliases when reading the actions files, but it expands
3673 them before writing. So the effects of your aliases are of course preserved,
3674 but the aliases themselves are lost when you edit sections that use aliases
3676 This is likely to change in future versions of <SPAN
3681 > Now let's define some aliases...</P
3691 > # Useful custom aliases we can use later.
3693 # Note the (required!) section header line and that this section
3694 # must be at the top of the actions file!
3698 # These aliases just save typing later:
3699 # (Note that some already use other aliases!)
3701 +crunch-all-cookies = +crunch-incoming-cookies +crunch-outgoing-cookies
3702 -crunch-all-cookies = -crunch-incoming-cookies -crunch-outgoing-cookies
3703 block-as-image = +block +handle-as-image
3704 mercy-for-cookies = -crunch-all-cookies -session-cookies-only
3706 # These aliases define combinations of actions
3707 # that are useful for certain types of sites:
3709 fragile = -block -crunch-all-cookies -filter -fast-redirects -hide-referer -kill-popups
3710 shop = -crunch-all-cookies -filter{popups} -kill-popups
3712 # Short names for other aliases, for really lazy people ;-)
3714 c0 = +crunch-all-cookies
3715 c1 = -crunch-all-cookies</PRE
3721 > ...and put them to use. These sections would appear in the lower part of an
3722 actions file and define exceptions to the default actions (as specified further
3736 > # These sites are either very complex or very keen on
3737 # user data and require minimal interference to work:
3740 .office.microsoft.com
3741 .windowsupdate.microsoft.com
3745 # Allow cookies (for setting and retrieving your customer data)
3749 .worldpay.com # for quietpc.com
3752 # These shops require pop-ups:
3754 {shop -kill-popups -filter{popups}}
3756 .overclockers.co.uk</PRE
3762 > Aliases like <SPAN
3768 > are often used for
3772 > sites that require some actions to be disabled
3773 in order to function properly.</P
3781 >8.7. Actions Files Tutorial</A
3784 > The above chapters have shown <A
3785 HREF="actions-file.html"
3786 >which actions files
3787 there are and how they are organized</A
3788 >, how actions are <A
3789 HREF="actions-file.html#ACTIONS"
3792 HREF="actions-file.html#ACTIONS-APPLY"
3796 HREF="actions-file.html#AF-PATTERNS"
3800 HREF="actions-file.html#ALIASES"
3802 >. Now, let's look at an
3810 file and see how all these pieces come together:</P
3817 >8.7.1. default.action</A
3820 >Every config file should start with a short comment stating its purpose:</P
3830 ># Sample default.action file <developers@privoxy.org></PRE
3836 >Then, since this is the <TT
3840 first section is a special section for internal use that you needn't
3841 change or worry about:</P
3851 >##########################################################################
3852 # Settings -- Don't change! For internal Privoxy use ONLY.
3853 ##########################################################################
3856 for-privoxy-version=3.0</PRE
3862 >After that comes the (optional) alias section. We'll use the example
3863 section from the above <A
3864 HREF="actions-file.html#ALIASES"
3865 >chapter on aliases</A
3867 that also explains why and how aliases are used:</P
3877 >##########################################################################
3879 ##########################################################################
3882 # These aliases just save typing later:
3883 # (Note that some already use other aliases!)
3885 +crunch-all-cookies = +crunch-incoming-cookies +crunch-outgoing-cookies
3886 -crunch-all-cookies = -crunch-incoming-cookies -crunch-outgoing-cookies
3887 block-as-image = +block +handle-as-image
3888 mercy-for-cookies = -crunch-all-cookies -session-cookies-only
3890 # These aliases define combinations of actions
3891 # that are useful for certain types of sites:
3893 fragile = -block -crunch-all-cookies -filter -fast-redirects -hide-referer -kill-popups
3894 shop = mercy-for-cookies -filter{popups} -kill-popups</PRE
3900 > Now come the regular sections, i.e. sets of actions, accompanied
3901 by URL patterns to which they apply. Remember <I
3904 are disabled when matching starts</I
3905 >, so we have to explicitly
3906 enable the ones we want.</P
3908 > The first regular section is probably the most important. It has only
3917 HREF="actions-file.html#AF-PATTERNS"
3918 >matches all URLs.</A
3920 set of actions used in this <SPAN
3926 be applied to all requests as a start</I
3927 >. It can be partly or
3928 wholly overridden by later matches further down this file, or in user.action,
3929 but it will still be largely responsible for your overall browsing
3932 > Again, at the start of matching, all actions are disabled, so there is
3933 no real need to disable any actions here, but we will do that nonetheless,
3934 to have a complete listing for your reference. (Remember: A <SPAN
3938 preceding the action name enables the action, a <SPAN
3942 Also note how this long line has been made more readable by splitting it into
3943 multiple lines with line continuation.</P
3953 >##########################################################################
3954 # "Defaults" section:
3955 ##########################################################################
3958 HREF="actions-file.html#ADD-HEADER"
3962 HREF="actions-file.html#BLOCK"
3966 HREF="actions-file.html#CRUNCH-INCOMING-COOKIES"
3967 >crunch-incoming-cookies</A
3970 HREF="actions-file.html#CRUNCH-OUTGOING-COOKIES"
3971 >crunch-outgoing-cookies</A
3974 HREF="actions-file.html#DEANIMATE-GIFS"
3978 HREF="actions-file.html#DOWNGRADE-HTTP-VERSION"
3979 >downgrade-http-version</A
3982 HREF="actions-file.html#FAST-REDIRECTS"
3986 HREF="actions-file.html#FILTER-HTML-ANNOYANCES"
3987 >filter{html-annoyances}</A
3990 HREF="actions-file.html#FILTER-JS-ANNOYANCES"
3991 >filter{js-annoyances}</A
3994 HREF="actions-file.html#FILTER-CONTENT-COOKIES"
3995 >filter{content-cookies}</A
3998 HREF="actions-file.html#FILTER-POPUPS"
4002 HREF="actions-file.html#FILTER-WEBBUGS"
4006 HREF="actions-file.html#FILTER-REFRESH-TAGS"
4007 >filter{refresh-tags}</A
4010 HREF="actions-file.html#FILTER-FUN"
4014 HREF="actions-file.html#FILTER-NIMDA"
4018 HREF="actions-file.html#FILTER-BANNERS-BY-SIZE"
4019 >filter{banners-by-size}</A
4022 HREF="actions-file.html#FILTER-SHOCKWAVE-FLASH"
4023 >filter{shockwave-flash}</A
4026 HREF="actions-file.html#FILTER-CRUDE-PARENTAL"
4027 >filter{crude-parental}</A
4030 HREF="actions-file.html#HANDLE-AS-IMAGE"
4034 HREF="actions-file.html#HIDE-FORWARDED-FOR-HEADERS"
4035 >hide-forwarded-for-headers</A
4038 HREF="actions-file.html#HIDE-FROM-HEADER"
4039 >hide-from-header{block}</A
4042 HREF="actions-file.html#HIDE-REFERER"
4043 >hide-referrer{forge}</A
4046 HREF="actions-file.html#HIDE-USER-AGENT"
4050 HREF="actions-file.html#KILL-POPUPS"
4054 HREF="actions-file.html#LIMIT-CONNECT"
4058 HREF="actions-file.html#PREVENT-COMPRESSION"
4059 >prevent-compression</A
4062 HREF="actions-file.html#SEND-VANILLA-WAFER"
4063 >send-vanilla-wafer</A
4066 HREF="actions-file.html#SEND-WAFER"
4070 HREF="actions-file.html#SESSION-COOKIES-ONLY"
4071 >session-cookies-only</A
4074 HREF="actions-file.html#SET-IMAGE-BLOCKER"
4075 >set-image-blocker{pattern}</A
4078 / # forward slash will match *all* potential URL patterns.</PRE
4084 > The default behavior is now set. Note that some actions, like not hiding
4085 the user agent, are part of a <SPAN
4087 >"general policy"</SPAN
4089 universally and won't get any exceptions defined later. Other choices,
4090 like not blocking (which is <I
4094 default!) need exceptions, i.e. we need to specify explicitly what we
4095 want to block in later sections.
4096 We will also want to make exceptions from our general pop-up-killing,
4097 and use our defined aliases for that.</P
4099 > The first of our specialized sections is concerned with <SPAN
4103 sites, i.e. sites that require minimum interference, because they are either
4104 very complex or very keen on tracking you (and have mechanisms in place that
4105 make them unusable for people who avoid being tracked). We will simply use
4109 > alias instead of stating the list
4110 of actions explicitly:</P
4120 >##########################################################################
4121 # Exceptions for sites that'll break under the default action set:
4122 ##########################################################################
4124 # "Fragile" Use a minimum set of actions for these sites (see alias above):
4127 .office.microsoft.com # surprise, surprise!
4128 .windowsupdate.microsoft.com</PRE
4134 > Shopping sites are not as fragile, but they typically
4135 require cookies to log in, and pop-up windows for shopping
4136 carts or item details. Again, we'll use a pre-defined alias:</P
4150 .worldpay.com # for quietpc.com
4158 > Then, there are sites which rely on pop-up windows (yuck!) to work.
4159 Since we made pop-up-killing our default above, we need to make exceptions
4161 HREF="http://www.mozilla.org/"
4165 can turn on smart handling of unwanted pop-ups in their browsers, can
4170 HREF="actions-file.html#FILTER-POPUPS"
4177 HREF="actions-file.html#KILL-POPUPS"
4181 and hence don't need this section. Anyway, disabling an already disabled
4182 action doesn't hurt, so we'll define our exceptions regardless of what was
4183 chosen in the defaults section:</P
4193 ># These sites require pop-ups too :(
4196 HREF="actions-file.html#KILL-POPUPS"
4199 HREF="actions-file.html#FILTER-POPUPS"
4204 .deutsche-bank-24.de</PRE
4213 HREF="actions-file.html#FAST-REDIRECTS"
4217 action, which we enabled per default above, breaks some sites. So disable
4218 it for popular sites where we know it misbehaves:</P
4229 HREF="actions-file.html#FAST-REDIRECTS"
4235 .altavista.com/.*(like|url|link):http
4236 .altavista.com/trans.*urltext=http
4243 > It is important that <SPAN
4247 URLs belong to images, so that <I
4251 be blocked, a substitute image can be sent, rather than an HTML page.
4252 Contacting the remote site to find out is not an option, since it
4253 would destroy the loading time advantage of banner blocking, and it
4254 would feed the advertisers (in terms of money <I
4258 information). We can mark any URL as an image with the <TT
4261 HREF="actions-file.html#HANDLE-AS-IMAGE"
4265 and marking all URLs that end in a known image file extension is a
4276 >##########################################################################
4278 ##########################################################################
4280 # Define which file types will be treated as images, in case they get
4281 # blocked further down this file:
4284 HREF="actions-file.html#HANDLE-AS-IMAGE"
4287 /.*\.(gif|jpe?g|png|bmp|ico)$</PRE
4293 > And then there are known banner sources. They often use scripts to
4294 generate the banners, so it won't be visible from the URL that the
4295 request is for an image. Hence we block them <I
4299 mark them as images in one go, with the help of our
4303 > alias defined above. (We could of
4304 course just as well use <TT
4307 HREF="actions-file.html#BLOCK"
4311 HREF="actions-file.html#HANDLE-AS-IMAGE"
4315 Remember that the type of the replacement image is chosen by the
4319 HREF="actions-file.html#SET-IMAGE-BLOCKER"
4320 >set-image-blocker</A
4323 action. Since all URLs have matched the default section with its
4327 HREF="actions-file.html#SET-IMAGE-BLOCKER"
4328 >set-image-blocker</A
4331 action before, it still applies and needn't be repeated:</P
4341 ># Known ad generators:
4346 .ad.*.doubleclick.net
4347 .a.yimg.com/(?:(?!/i/).)*$
4348 .a[0-9].yimg.com/(?:(?!/i/).)*$
4357 > One of the most important jobs of <SPAN
4361 is to block banners. A huge bunch of them are already <SPAN
4368 HREF="actions-file.html#FILTER"
4370 >{banners-by-size}</TT
4372 action, which we enabled above, and which deletes the references to banner
4373 images from the pages while they are loaded, so the browser doesn't request
4374 them anymore, and hence they don't need to be blocked here. But this naturally
4375 doesn't catch all banners, and some people choose not to use filters, so we
4376 need a comprehensive list of patterns for banner URLs here, and apply the
4380 HREF="actions-file.html#BLOCK"
4383 > action to them.</P
4385 > First comes a bunch of generic patterns, which do most of the work, by
4386 matching typical domain and path name components of banners. Then comes
4387 a list of individual patterns for specific sites, which is omitted here
4388 to keep the example short:</P
4398 >##########################################################################
4399 # Block these fine banners:
4400 ##########################################################################
4402 HREF="actions-file.html#BLOCK"
4412 /.*count(er)?\.(pl|cgi|exe|dll|asp|php[34]?)
4413 /(?:.*/)?(publicite|werbung|rekla(ma|me|am)|annonse|maino(kset|nta|s)?)/
4415 # Site-specific patterns (abbreviated):
4423 > You wouldn't believe how many advertisers actually call their banner
4429 >.com, or call the directory
4430 in which the banners are stored simply <SPAN
4434 generic patterns are surprisingly effective.</P
4436 > But being very generic, they necessarily also catch URLs that we don't want
4437 to block. The pattern <TT
4446 >.nasty-corp.com"</SPAN
4453 >.sourcefroge.net"</SPAN
4460 >l.some-provider.net."</SPAN
4462 well-known exceptions to the <TT
4465 HREF="actions-file.html#BLOCK"
4471 > Note that these are exceptions to exceptions from the default! Consider the URL
4474 >"downloads.sourcefroge.net"</SPAN
4475 >: Initially, all actions are deactivated,
4476 so it wouldn't get blocked. Then comes the defaults section, which matches the
4477 URL, but just deactivates the <TT
4480 HREF="actions-file.html#BLOCK"
4484 action once again. Then it matches <TT
4487 >, an exception to the
4488 general non-blocking policy, and suddenly
4492 HREF="actions-file.html#BLOCK"
4495 > applies. And now, it'll match
4502 HREF="actions-file.html#BLOCK"
4506 applies, so (unless it matches <I
4509 > further down) it ends up
4513 HREF="actions-file.html#BLOCK"
4516 > action applying.</P
4526 >##########################################################################
4527 # Save some innocent victims of the above generic block patterns:
4528 ##########################################################################
4533 HREF="actions-file.html#BLOCK"
4536 adv[io]*. # (for advogato.org and advice.*)
4537 adsl. # (has nothing to do with ads)
4538 ad[ud]*. # (adult.* and add.*)
4539 .edu # (universities don't host banners (yet!))
4540 .*loads. # (downloads, uploads etc)
4548 www.globalintersec.com/adv # (adv = advanced)
4549 www.ugu.com/sui/ugu/adv</PRE
4555 > Filtering source code can have nasty side effects,
4556 so make an exception for our friends at sourceforge.net,
4557 and all paths with <SPAN
4560 > in them. Note that
4564 HREF="actions-file.html#FILTER"
4571 > filters in one fell swoop!</P
4581 ># Don't filter code!
4584 HREF="actions-file.html#FILTER"
4588 .sourceforge.net</PRE
4598 comprehensive, but we hope this example made clear how it works.</P
4606 >8.7.2. user.action</A
4609 > So far we are painting with a broad brush by setting general policies,
4610 which would be a reasonable starting point for many people. Now,
4611 you'd maybe want to be more specific and have customized rules that
4612 are more suitable to your personal habits and preferences. These would
4613 be for narrowly defined situations like your ISP or your bank, and should
4617 >, which is parsed after all other
4618 actions files and hence has the last word, over-riding any previously
4619 defined actions. <TT
4626 > place for your personal settings, since
4630 > is actively maintained by the
4634 > developers and you'll probably want
4635 to install updated versions from time to time.</P
4637 > So let's look at a few examples of things that one might typically do in
4651 ># My user.action file. <fred@foobar.com></PRE
4658 HREF="actions-file.html#ALIASES"
4660 > are local to the actions
4661 file that they are defined in, you can't use the ones from
4665 >, unless you repeat them here:</P
4675 ># (Re-)define aliases for this file:
4678 -crunch-all-cookies = -crunch-incoming-cookies -crunch-outgoing-cookies
4679 mercy-for-cookies = -crunch-all-cookies -session-cookies-only
4680 fragile = -block -crunch-all-cookies -filter -fast-redirects -hide-referer -kill-popups
4681 shop = mercy-for-cookies -filter{popups} -kill-popups
4682 allow-ads = -block -filter{banners-by-size} # (see below)</PRE
4689 > Say you have accounts on some sites that you visit regularly, and
4690 you don't want to have to log in manually each time. So you'd like
4691 to allow persistent cookies for these sites. The
4694 >mercy-for-cookies</TT
4695 > alias defined above does exactly
4696 that, i.e. it disables crunching of cookies in any direction, and
4697 processing of cookies to make them temporary.</P
4707 >{ mercy-for-cookies }
4718 > Your bank needs popups and is allergic to some filter, but you don't
4719 know which, so you disable them all:</P
4730 HREF="actions-file.html#FILTER"
4733 HREF="actions-file.html#KILL-POPUPS"
4736 .your-home-banking-site.com</PRE
4742 > While browsing the web with <SPAN
4746 noticed some ads that sneaked through, but you were too lazy to
4747 report them through our fine and easy <A
4751 system, so you have added them here:</P
4762 HREF="actions-file.html#BLOCK"
4765 www.a-popular-site.com/some/unobvious/path
4766 another.popular.site.net/more/junk/here/</PRE
4772 > Note that, assuming the banners in the above example have regular image
4773 extensions (most do),
4777 HREF="actions-file.html#HANDLE-AS-IMAGE"
4781 need not be specified, since all URLs ending in these extensions will
4782 already have been tagged as images in the relevant section of
4788 > Then you noticed that the default configuration breaks Forbes Magazine,
4789 but you were too lazy to find out which action is the culprit, and you
4790 were again too lazy to give <A
4794 you just used the <TT
4797 > alias on the site, and
4798 -- whoa! -- it worked:</P
4815 > You like the <SPAN
4818 > text replacements in <TT
4822 but it is disabled in the distributed actions file. (My colleagues on the team just
4823 don't have a sense of humour, that's why! ;-). So you'd like to turn it on in your private,
4824 update-safe config, once and for all:</P
4835 HREF="actions-file.html#FILTER-FUN"
4838 / # For ALL sites!</PRE
4844 > Note that the above is not really a good idea: There are exceptions
4845 to the filters in <TT
4849 really shouldn't be filtered, like code on CVS->Web interfaces. Since
4853 > has the last word, these exceptions
4854 won't be valid for the <SPAN
4857 > filtering specified here.</P
4859 > Finally, you might think about how your favourite free websites are
4860 funded, and find that they rely on displaying banner advertisements
4861 to survive. So you might want to specifically allow banners for those
4862 sites that you feel provide value to you:</P
4884 > has been aliased to
4888 HREF="actions-file.html#BLOCK"
4895 HREF="actions-file.html#FILTER-BANNERS-BY-SIZE"
4896 >filter{banners-by-size}</A
4934 HREF="filter-file.html"
4943 >The Main Configuration File</TD
4953 >The Filter File</TD