7 CONTENT="Modular DocBook HTML Stylesheet Version 1.64
10 TITLE="Privoxy User Manual"
11 HREF="index.html"><LINK
13 TITLE="The Main Configuration File"
14 HREF="config.html"><LINK
16 TITLE="The Filter File"
17 HREF="filter-file.html"><LINK
20 HREF="../p_doc.css"></HEAD
39 >Privoxy User Manual</TH
60 HREF="filter-file.html"
77 > The actions files are used to define what actions
81 > takes for which URLs, and thus determine
82 how ad images, cookies and various other aspects of HTTP content and
83 transactions are handled, and on which sites (or even parts thereof). There
84 are three such files included with <SPAN
88 version 2.9.15), with differing purposes:
99 > - is the primary action file
100 that sets the initial values for all actions. It is intended to
101 provide a base level of functionality for
105 > array of features. So it is
106 a set of broad rules that should work reasonably well for users everywhere.
107 This is the file that the developers are keeping updated, and making
116 > - is intended to be for local site
117 preferences and exceptions. As an example, if your ISP or your bank
118 has specific requirements, and need special handling, this kind of
119 thing should go here. This file will not be upgraded.
127 > - is used by the web based editor,
128 to set various pre-defined sets of rules for the default actions section
132 >. These have increasing levels of
135 >and have no influence on your browsing unless
136 you select them explicitly in the editor</I
137 >. It is not recommend
145 > The list of actions files to be used are defined in the main configuration
146 file, and are processed in the order they are defined. The content of these
147 can all be viewed and edited from <A
148 HREF="http://config.privoxy.org/show-status"
150 >http://config.privoxy.org/show-status</A
153 > An actions file typically has multiple sections. If you want to use
157 > in an actions file, you have to place the (optional)
159 HREF="actions-file.html#ALIASES"
161 > at the top of that file.
162 Then comes the default set of rules which will apply universally to all
163 sites and pages (be <I
170 > or any other actions file after
174 >, because it will override the result
175 from consulting any previous file). And then below that,
176 exceptions to the defined universal policies. You can regard
180 > as an appendix to <TT
184 with the advantage that is a separate file, which makes preserving your
185 personal settings across <SPAN
188 > upgrades easier.</P
191 Actions can be used to block anything you want, including ads, banners, or
192 just some obnoxious URL that you would rather not see. Cookies can be accepted
193 or rejected, or accepted only during the current browser session (i.e. not
194 written to disk), content can be modified, JavaScripts tamed, user-tracking
195 fooled, and much more. See below for a <A
196 HREF="actions-file.html#ACTIONS"
206 >8.1. Finding the Right Mix</A
210 HREF="actions-file.html#ACTIONS"
212 >, like cookie suppression
213 or script disabling, may render some sites unusable that rely on these
214 techniques to work properly. Finding the right mix of actions is not always easy and
215 certainly a matter of personal taste. In general, it can be said that the more
219 > your default settings (in the top section of the
220 actions file) are, the more exceptions for <SPAN
224 will have to make later. If, for example, you want to kill popup windows per
225 default, you'll have to make exceptions from that rule for sites that you
226 regularly use and that require popups for actually useful content, like maybe
227 your bank, favorite shop, or newspaper.</P
229 > We have tried to provide you with reasonable rules to start from in the
230 distribution actions files. But there is no general rule of thumb on these
231 things. There just are too many variables, and sites are constantly changing.
232 Sooner or later you will want to change the rules (and read this chapter again :).</P
243 > The easiest way to edit the actions files is with a browser by
244 using our browser-based editor, which can be reached from <A
245 HREF="http://config.privoxy.org/show-status"
247 >http://config.privoxy.org/show-status</A
249 The editor allows both fine-grained control over every single feature on a
250 per-URL basis, and easy choosing from wholesale sets of defaults like
262 > If you prefer plain text editing to GUIs, you can of course also directly edit the
263 the actions files. Look at <TT
275 >8.3. How Actions are Applied to URLs</A
278 > Actions files are divided into sections. There are special sections,
282 HREF="actions-file.html#ALIASES"
285 > sections which will be discussed later. For now
286 let's concentrate on regular sections: They have a heading line (often split
287 up to multiple lines for readability) which consist of a list of actions,
288 separated by whitespace and enclosed in curly braces. Below that, there
289 is a list of URL patterns, each on a separate line.</P
291 > To determine which actions apply to a request, the URL of the request is
292 compared to all patterns in each action file file. Every time it matches, the list of
293 applicable actions for the URL is incrementally updated, using the heading
294 of the section in which the pattern is located. If multiple matches for
295 the same URL set the same action differently, the last match wins. If not,
296 the effects are aggregated (e.g. a URL might match both the
298 HREF="actions-file.html#HANDLE-AS-IMAGE"
302 >"+handle-as-image"</SPAN
306 HREF="actions-file.html#BLOCK"
315 > You can trace this process for any given URL by visiting <A
316 HREF="http://config.privoxy.org/show-url-info"
318 >http://config.privoxy.org/show-url-info</A
321 > More detail on this is provided in the Appendix, <A
322 HREF="appendix.html#ACTIONSANAT"
323 > Anatomy of an Action</A
335 > Generally, a pattern has the form <TT
337 ><domain>/<path></TT
341 ><domain></TT
346 are optional. (This is why the pattern <TT
349 > matches all URLs).</P
358 >www.example.com/</TT
362 > is a domain-only pattern and will match any request to <TT
366 regardless of which document on that server is requested.
376 > means exactly the same. For domain-only patterns, the trailing <TT
386 >www.example.com/index.html</TT
390 > matches only the single document <TT
407 > matches the document <TT
410 >, regardless of the domain,
424 > matches nothing, since it would be interpreted as a domain name and
425 there is no top-level domain called <TT
439 >8.4.1. The Domain Pattern</A
442 > The matching of the domain part offers some flexible options: if the
443 domain starts or ends with a dot, it becomes unanchored at that end.
457 > matches any domain that <I
474 > matches any domain that <I
491 > matches any domain that <I
498 (Correctly speaking: It matches any FQDN that contains <TT
507 > Additionally, there are wild-cards that you can use in the domain names
508 themselves. They work pretty similar to shell wild-cards: <SPAN
512 stands for zero or more arbitrary characters, <SPAN
516 any single character, you can define character classes in square
517 brackets and all of that can be freely mixed:</P
532 >"adserver.example.com"</SPAN
536 >"ads.example.com"</SPAN
539 >"sfads.example.com"</SPAN
546 >*ad*.example.com</TT
550 > matches all of the above, and then some.
566 >pictures.epix.com</TT
569 >a.b.c.d.e.upix.com</TT
576 >www[1-9a-ez].example.c*</TT
582 >www1.example.com</TT
593 >wwwz.example.com</TT
600 >wwww.example.com</TT
613 >8.4.2. The Path Pattern</A
619 > uses Perl compatible regular expressions
621 HREF="http://www.pcre.org/"
625 matching the path.</P
628 HREF="appendix.html#REGEX"
630 > with a brief quick-start into regular
631 expressions, and full (very technical) documentation on PCRE regex syntax is available on-line
633 HREF="http://www.pcre.org/man.txt"
635 >http://www.pcre.org/man.txt</A
637 You might also find the Perl man page on regular expressions (<TT
641 useful, which is available on-line at <A
642 HREF="http://www.perldoc.com/perl5.6/pod/perlre.html"
644 >http://www.perldoc.com/perl5.6/pod/perlre.html</A
647 > Note that the path pattern is automatically left-anchored at the <SPAN
651 i.e. it matches as if it would start with a <SPAN
654 > (regular expression speak
655 for the beginning of a line).</P
657 > Please also note that matching in the path is case
661 > by default, but you can switch to case
662 sensitive at any point in the pattern by using the
669 >www.example.com/(?-i)PaTtErN.*</TT
671 documents whose path starts with <TT
678 > this capitalization.</P
690 > All actions are disabled by default, until they are explicitly enabled
691 somewhere in an actions file. Actions are turned on if preceded with a
695 >, and turned off if preceded with a <SPAN
704 >"do that action"</SPAN
711 >"please block URLs that match the
712 following patterns"</SPAN
719 block URLs that match the following patterns, even if <TT
723 previously applied."</SPAN
727 Again, actions are invoked by placing them on a line, enclosed in curly braces and
728 separated by whitespace, like in
731 >{+some-action -some-other-action{some-parameter}}</TT
733 followed by a list of URL patterns, one per line, to which they apply.
734 Together, the actions line and the following pattern lines make up a section
735 of the actions file. </P
738 There are three classes of actions:</P
746 Boolean, i.e the action can only be <SPAN
769 > # enable action <TT
780 > # disable action <TT
802 Parameterized, where some value is required in order to enable this type of action.
824 >} # enable action and set parameter to <TT
830 # overwriting parameter from previous match if necessary
836 > # disable action. The parameter can be omitted</PRE
843 > Note that if the URL matches multiple positive forms of a parameterized action,
844 the last match wins, i.e. the params from earlier matches are simply ignored.
850 >+hide-user-agent{ Mozilla 1.0 }</TT
857 Multi-value. These look exactly like parameterized actions,
858 but they behave differently: If the action applies multiple times to the
859 same URL, but with different parameters, <I
866 > matches are remembered. This is used for actions
867 that can be executed for the same request repeatedly, like adding multiple
868 headers, or filtering through multiple filters. Syntax:
889 >} # enable action and add <TT
894 > to the list of parameters
905 >} # remove the parameter <TT
910 > from the list of parameters
911 # If it was the last one left, disable the action.
917 > # disable this action completely and remove all parameters from the list</PRE
927 >+add-header{X-Fun-Header: Some text}</TT
931 >+filter{html-annoyances}</TT
938 > If nothing is specified in any actions file, no <SPAN
942 taken. So in this case <SPAN
946 normal, non-blocking, non-anonymizing proxy. You must specifically enable the
947 privacy and blocking features you need (although the provided default actions
948 files will give a good starting point).</P
950 > Later defined actions always over-ride earlier ones. So exceptions
951 to any rules you make, should come in the latter part of the file (or
952 in a file that is processed later when using multiple actions files). For
953 multi-valued actions, the actions are applied in the order they are specified.
954 Actions files are processed in the order they are defined in
958 > (the default installation has three actions
959 files). It also quite possible for any given URL pattern to match more than
960 one pattern and thus more than one set of actions!</P
962 > The list of valid <SPAN
986 >Confuse log analysis, custom applications</P
992 > Sends a user defined HTTP header to the web server.
1005 > Any string value is possible. Validity of the defined HTTP headers is not checked.
1006 It is recommended that you use the <SPAN
1020 > This action may be specified multiple times, in order to define multiple
1021 headers. This is rarely needed for the typical user. If you don't know what
1024 >"HTTP headers"</SPAN
1025 > are, you definitely don't need to worry about this
1041 >+add-header{X-User-Tracking: sucks}</PRE
1065 CLASS="VARIABLELIST"
1071 >Block ads or other obnoxious content</P
1077 > Requests for URLs to which this action applies are blocked, i.e. the requests are not
1078 forwarded to the remote server, but answered locally with a substitute page or image,
1079 as determined by the <TT
1082 HREF="actions-file.html#HANDLE-AS-IMAGE"
1089 HREF="actions-file.html#SET-IMAGE-BLOCKER"
1090 >set-image-blocker</A
1114 > sends a special <SPAN
1118 for requests to blocked pages. This page contains links to find out why the request
1119 was blocked, and a click-through to the blocked content (the latter only if compiled with the
1120 force feature enabled). The <SPAN
1123 > page adapts to the available
1124 screen space -- it displays full-blown if space allows, or miniaturized and text-only
1125 if loaded into a small frame or window. If you are using <SPAN
1129 right now, you can take a look at the
1131 HREF="http://ads.bannerserver.example.com/nasty-ads/sponsor.html"
1142 A very important exception occurs if <I
1152 HREF="actions-file.html#HANDLE-AS-IMAGE"
1156 apply to the same request: it will then be replaced by an image. If
1160 HREF="actions-file.html#SET-IMAGE-BLOCKER"
1161 >set-image-blocker</A
1164 (see below) also applies, the type of image will be determined by its parameter,
1165 if not, the standard checkerboard pattern is sent.
1168 > It is important to understand this process, in order
1169 to understand how <SPAN
1173 ads and other unwanted content.
1179 HREF="actions-file.html#FILTER"
1183 action can perform a very similar task, by <SPAN
1187 banner images and other content through rewriting the relevant URLs in the
1188 document's HTML source, so they don't get requested in the first place.
1189 Note that this is a totally different technique, and it's easy to confuse the two.
1193 >Example usage (section):</DT
1204 >{+block} # Block and replace with "blocked" page
1205 .nasty-stuff.example.com
1207 {+block +handle-as-image} # Block and replace with image
1224 NAME="CRUNCH-INCOMING-COOKIES"
1227 >crunch-incoming-cookies</I
1233 CLASS="VARIABLELIST"
1239 > Prevent the web server from setting any cookies on your system
1248 >"Set-Cookie:"</SPAN
1249 > HTTP headers from server replies.
1269 > This action is only concerned with <I
1280 HREF="actions-file.html#CRUNCH-OUTGOING-COOKIES"
1281 >crunch-outgoing-cookies</A
1287 > to disable cookies completely.
1293 > to use this action in conjunction
1297 HREF="actions-file.html#SESSION-COOKIES-ONLY"
1298 >session-cookies-only</A
1301 since it would prevent the session cookies from being set.
1316 >+crunch-incoming-cookies</PRE
1331 NAME="CRUNCH-OUTGOING-COOKIES"
1334 >crunch-outgoing-cookies</I
1340 CLASS="VARIABLELIST"
1346 > Prevent the web server from reading any cookies from your system
1356 > HTTP headers from client requests.
1376 > This action is only concerned with <I
1387 HREF="actions-file.html#CRUNCH-INCOMING-COOKIES"
1388 >crunch-incoming-cookies</A
1394 > to disable cookies completely.
1400 > to use this action in conjunction
1404 HREF="actions-file.html#SESSION-COOKIES-ONLY"
1405 >session-cookies-only</A
1408 since it would prevent the session cookies from being read.
1423 >+crunch-outgoing-cookies</PRE
1438 NAME="DEANIMATE-GIFS"
1447 CLASS="VARIABLELIST"
1453 >Stop those annoying, distracting animated GIF images.</P
1459 > De-animate GIF animations, i.e. reduce them to their first or last image.
1485 > This will also shrink the images considerably (in bytes, not pixels!). If
1489 > is given, the first frame of the animation
1490 is used as the replacement. If <SPAN
1493 > is given, the last
1494 frame of the animation is used instead, which probably makes more sense for
1495 most banner animations, but also has the risk of not showing the entire
1496 last frame (if it is only a delta to an earlier frame).
1499 > You can safely use this action with patterns that will also match non-GIF
1500 objects, because no attempt will be made at anything that doesn't look like
1516 >+deanimate-gifs{last}</PRE
1531 NAME="DOWNGRADE-HTTP-VERSION"
1534 >downgrade-http-version</I
1540 CLASS="VARIABLELIST"
1546 >Work around (very rare) problems with HTTP/1.1</P
1552 > Downgrades HTTP/1.1 client requests and server replies to HTTP/1.0.
1572 > This is a left-over from the time when <SPAN
1576 didn't support important HTTP/1.1 features well. It is left here for the
1577 unlikely case that you experience HTTP/1.1 related problems with some server
1578 out there. Not all (optional) HTTP/1.1 features are supported yet, so there
1579 is a chance you might need this action.
1583 >Example usage (section):</DT
1594 >{+downgrade-http-version}
1595 problem-host.example.com</PRE
1610 NAME="FAST-REDIRECTS"
1619 CLASS="VARIABLELIST"
1625 >Fool some click-tracking scripts and speed up indirect links</P
1631 > Cut off all but the last valid URL from requests.
1652 Many sites, like yahoo.com, don't just link to other sites. Instead, they
1653 will link to some script on their own servers, giving the destination as a
1654 parameter, which will then redirect you to the final target. URLs
1655 resulting from this scheme typically look like:
1658 >http://some.place/click-tracker.cgi?target=http://some.where.else</I
1662 > Sometimes, there are even multiple consecutive redirects encoded in the
1663 URL. These redirections via scripts make your web browsing more traceable,
1664 since the server from which you follow such a link can see where you go
1665 to. Apart from that, valuable bandwidth and time is wasted, while your
1666 browser ask the server for one redirect after the other. Plus, it feeds
1670 > This feature is currently not very smart and is scheduled for improvement.
1671 It is likely to break some sites. You should expect to need possibly
1672 many exceptions to this action, if it is enabled by default in
1676 >. Some sites just don't work without
1692 >{+fast-redirects}</PRE
1716 CLASS="VARIABLELIST"
1722 >Get rid of HTML and JavaScript annoyances, banner advertisements (by size), do fun text replacements, etc.</P
1728 > Text documents, including HTML and JavaScript, to which this action applies, are filtered on-the-fly
1729 through the specified regular expression based substitutions.
1742 > The name of a filter, as defined in the <A
1743 HREF="filter-file.html"
1753 HREF="config.html#FILTERFILE"
1767 > For your convenience, there are a bunch of pre-defined filters available
1768 in the distribution filter file that you can use. See the example below for
1772 > This is potentially a very powerful feature! But <SPAN
1774 >"rolling your own"</SPAN
1776 filters requires a knowledge of regular expressions and HTML.
1779 > Filtering requires buffering the page content, which may appear to
1780 slow down page rendering since nothing is displayed until all content has
1781 passed the filters. (It does not really take longer, but seems that way
1782 since the page is not incrementally displayed.) This effect will be more
1783 noticeable on slower connections.
1786 > At this time, <SPAN
1789 > cannot (yet!) uncompress compressed
1790 documents. If you want filtering to work on all documents, even those that
1791 would normally be sent compressed, use the
1795 HREF="actions-file.html#PREVENT-COMPRESSION"
1796 >prevent-compression</A
1799 action in conjunction with <TT
1805 > Filtering can achieve some of the effects as the
1809 HREF="actions-file.html#BLOCK"
1813 action, i.e. it can be used to block ads and banners.
1819 > with suggestions for new or improved filters is particularly
1824 >Example usage (with filters from the distribution <TT
1831 NAME="FILTER-HTML-ANNOYANCES"
1842 >+filter{html-annoyances} # Get rid of particularly annoying HTML abuse.</PRE
1850 NAME="FILTER-JS-ANNOYANCES"
1861 >+filter{js-annoyances} # Get rid of particularly annoying JavaScript abuse</PRE
1869 NAME="FILTER-BANNERS-BY-SIZE"
1880 >+filter{banners-by-size} # Kill banners by size (<I
1891 NAME="FILTER-CONTENT-COOKIES"
1902 >+filter{content-cookies} # Kill cookies that come sneaking in the HTML or JS content</PRE
1910 NAME="FILTER-POPUPS"
1921 >+filter{popups} # Kill all popups in JS and HTML</PRE
1929 NAME="FILTER-WEBBUGS"
1940 >+filter{webbugs} # Squish WebBugs (1x1 invisible GIFs used for user tracking)</PRE
1959 >+filter{fun} # Text replacements for subversive browsing fun!</PRE
1967 NAME="FILTER-FRAMESET-BORDERS"
1978 >+filter{frameset-borders} # Give frames a border and make them resizeable</PRE
1986 NAME="FILTER-REFRESH-TAGS"
1997 >+filter{refresh-tags} # Kill automatic refresh tags (for dial-on-demand setups)</PRE
2016 >+filter{nimda} # Remove Nimda (virus) code.</PRE
2024 NAME="FILTER-SHOCKWAVE-FLASH"
2035 >+filter{shockwave-flash} # Kill embedded Shockwave Flash objects</PRE
2043 NAME="FILTER-CRUDE-PARENTAL"
2054 >+filter{crude-parental} # Kill all web pages that contain the words "sex" or "warez"</PRE
2069 NAME="HANDLE-AS-IMAGE"
2078 CLASS="VARIABLELIST"
2084 >Mark URLs as belonging to images (so they'll be replaced by images <I
2086 >if they get blocked</I
2093 > This action alone doesn't do anything noticeable. It just marks URLs as images.
2097 HREF="actions-file.html#BLOCK"
2104 the presence or absence of this mark decides whether an HTML <SPAN
2108 page, or a replacement image (as determined by the <TT
2111 HREF="actions-file.html#SET-IMAGE-BLOCKER"
2112 >set-image-blocker</A
2114 > action) will be sent to the
2115 client as a substitute for the blocked content.
2135 > The below generic example section is actually part of <TT
2139 It marks all URLs with well-known image file name extensions as images and should
2143 > Users will probably only want to use the handle-as-image action in conjunction with
2147 HREF="actions-file.html#BLOCK"
2150 >, to block sources of banners, whose URLs don't
2151 reflect the file type, like in the second example section.
2154 > Note that you cannot treat HTML pages as images in most cases. For instance, (inline) ad
2155 frames require an HTML page to be sent, or they won't display properly.
2158 >handle-as-image</TT
2159 > in this situation will not replace the
2160 ad frame with an image, but lead to error messages.
2164 >Example usage (sections):</DT
2175 ># Generic image extensions:
2178 /.*\.(gif|jpg|jpeg|png|bmp|ico)$
2180 # These don't look like images, but they're banners and should be
2181 # blocked as images:
2183 {+block +handle-as-image}
2184 some.nasty-banner-server.com/junk.cgi?output=trash
2186 # Banner source! Who cares if they also have non-image content?
2187 ad.doubleclick.net </PRE
2202 NAME="HIDE-FORWARDED-FOR-HEADERS"
2205 >hide-forwarded-for-headers</I
2211 CLASS="VARIABLELIST"
2217 >Improve privacy by hiding the true source of the request</P
2223 > Deletes any existing <SPAN
2225 >"X-Forwarded-for:"</SPAN
2226 > HTTP header from client requests,
2227 and prevents adding a new one.
2247 > It is fairly safe to leave this on.
2250 > This action is scheduled for improvement: It should be able to generate forged
2253 >"X-Forwarded-for:"</SPAN
2254 > headers using random IP addresses from a specified network,
2255 to make successive requests from the same client look like requests from a pool of different
2256 users sharing the same proxy.
2271 >+hide-forwarded-for-headers</PRE
2286 NAME="HIDE-FROM-HEADER"
2289 >hide-from-header</I
2295 CLASS="VARIABLELIST"
2301 >Keep your (old and ill) browser from telling web servers your email address</P
2307 > Deletes any existing <SPAN
2310 > HTTP header, or replaces it with the
2327 >, or any user defined value.
2337 > will completely remove the header
2338 (not to be confused with the <TT
2341 HREF="actions-file.html#BLOCK"
2348 > Alternately, you can specify any value you prefer to be sent to the web
2349 server. If you do, it is a matter of fairness not to use any address that
2350 is actually used by a real person.
2353 > This action is rarely needed, as modern web browsers don't send
2372 >+hide-from-header{block}</PRE
2385 >+hide-from-header{spam-me-senseless@sittingduck.example.com}</PRE
2400 NAME="HIDE-REFERRER"
2412 CLASS="VARIABLELIST"
2418 >Conceal which link you followed to get to a particular site</P
2427 > (sic) HTTP header from the client request,
2428 or replaces it with a forged one.
2448 > to delete the header completely.</P
2455 > to pretend to be coming from the homepage of the server we are talking to.</P
2459 >Any other string to set a user defined referrer.</P
2470 > is the preferred option here, since some servers will
2471 not send images back otherwise, in an attempt to prevent their valuable
2472 content from being embedded elsewhere (and hence, without being surrounded
2483 > is an alternate spelling of
2487 > and the two can be can be freely
2488 substituted with each other. (<SPAN
2492 correct English spelling, however the HTTP specification has a bug - it
2493 requires it to be spelled as <SPAN
2511 >+hide-referrer{forge}</PRE
2524 >+hide-referrer{http://www.yahoo.com/}</PRE
2539 NAME="HIDE-USER-AGENT"
2548 CLASS="VARIABLELIST"
2554 >Conceal your type of browser and client operating system</P
2560 > Replaces the value of the <SPAN
2562 >"User-Agent:"</SPAN
2564 in client requests with the specified value.
2577 > Any user-defined string.
2602 > This breaks many web sites that depend on looking at this header in order
2603 to customize their content for different browsers (which, by the
2608 HREF="http://www.javascriptkit.com/javaindex.shtml"
2619 > Using this action in multi-user setups or wherever different types of
2620 browsers will access the same <SPAN
2627 >. In single-user, single-browser
2628 setups, you might use it to delete your OS version information from
2629 the headers, because it is an invitation to exploit known bugs for your
2630 OS. It is also occasionally useful to forge this in order to access
2631 sites that won't let you in otherwise (though there may be a good
2632 reason in some cases). Example of this: some MSN sites will not
2636 > enter, yet forging to a
2640 > user-agent works just fine.
2641 (Must be just a silly MS goof, I'm sure :-).
2644 > This action is scheduled for improvement.
2659 >+hide-user-agent{Netscape 6.1 (X11; I; Linux 2.4.18 i686)}</PRE
2686 CLASS="VARIABLELIST"
2692 >Eliminate those annoying pop-up windows</P
2698 > While loading the document, replace JavaScript code that opens
2699 pop-up windows with (syntactically neutral) dummy code on the fly.
2719 > This action is easily confused with the built-in, hardwired <TT
2722 HREF="actions-file.html#FILTER"
2726 action, but there are important differences: For <TT
2730 the document need not be buffered, so it can be incrementally rendered while
2731 downloading. But <TT
2734 > doesn't catch as many pop-ups as
2738 HREF="actions-file.html#FILTER"
2750 > Think of it as a fast and efficient replacement for a filter that you
2751 can use if you don't want any filtering at all. Note that it doesn't make
2752 sense to combine it with any <TT
2755 HREF="actions-file.html#FILTER"
2759 since as soon as one <TT
2762 HREF="actions-file.html#FILTER"
2766 the whole document needs to be buffered anyway, which destroys the advantage of
2770 > action over its filter equivalent.
2773 > Killing all pop-ups is a dangerous business. Many shops and banks rely on
2774 pop-ups to display forms, shopping carts etc, and killing only the unwanted pop-ups
2775 would require artificial intelligence in <SPAN
2779 If the only kind of pop-ups that you want to kill are exit consoles (those
2783 > windows that appear when you close an other
2784 one), you might want to use
2788 HREF="actions-file.html#FILTER"
2826 NAME="LIMIT-CONNECT"
2835 CLASS="VARIABLELIST"
2841 >Prevent abuse of <SPAN
2844 > as a TCP proxy relay</P
2850 > Specifies to which ports HTTP CONNECT requests are allowable.
2863 > A comma-separated list of ports or port ranges (the latter using dashes, with the minimum
2864 defaulting to 0 and the maximum to 65K).
2871 > By default, i.e. if no <TT
2878 > only allows HTTP CONNECT
2879 requests to port 443 (the standard, secure HTTPS port). Use
2883 > if more fine-grained control is desired
2884 for some or all destinations.
2887 > The CONNECT methods exists in HTTP to allow access to secure websites
2891 > URLs) through proxies. It works very simply:
2892 the proxy connects to the server on the specified port, and then
2893 short-circuits its connections to the client and to the remote server.
2894 This can be a big security hole, since CONNECT-enabled proxies can be
2895 abused as TCP relays very easily.
2898 > If you don't know what any of this means, there probably is no reason to
2899 change this one, since the default is already very restrictive.
2903 >Example usages:</DT
2914 >+limit-connect{443} # This is the default and need not be specified.
2915 +limit-connect{80,443} # Ports 80 and 443 are OK.
2916 +limit-connect{-3, 7, 20-100, 500-} # Ports less than 3, 7, 20 to 100 and above 500 are OK.
2917 +limit-connect{-} # All ports are OK (gaping security hole!)</PRE
2932 NAME="PREVENT-COMPRESSION"
2935 >prevent-compression</I
2941 CLASS="VARIABLELIST"
2947 > Ensure that servers send the content uncompressed, so it can be
2951 HREF="actions-file.html#FILTER"
2961 > Adds a header to the request that asks for uncompressed transfer.
2981 > More and more websites send their content compressed by default, which
2982 is generally a good idea and saves bandwidth. But for the <TT
2985 HREF="actions-file.html#FILTER"
2991 HREF="actions-file.html#DEANIMATE-GIFS"
2998 HREF="actions-file.html#KILL-POPUPS"
3005 > needs access to the uncompressed data.
3006 Unfortunately, <SPAN
3009 > can't yet(!) uncompress, filter, and
3010 re-compress the content on the fly. So if you want to ensure that all websites, including
3011 those that normally compress, can be filtered, you need to use this action.
3014 > This will slow down transfers from those websites, though. If you use any of the above-mentioned
3015 actions, you will typically want to use <TT
3017 >prevent-compression</TT
3022 > Note that some (rare) ill-configured sites don't handle requests for uncompressed
3023 documents correctly (they send an empty document body). If you use <TT
3025 >prevent-compression</TT
3027 per default, you'll have to add exceptions for those sites. See the example for how to do that.
3031 >Example usage (sections):</DT
3044 {+prevent-compression}
3047 # Make exceptions for ill sites:
3049 {-prevent-compression}
3051 www.pclinuxonline.com</PRE
3066 NAME="SEND-VANILLA-WAFER"
3069 >send-vanilla-wafer</I
3075 CLASS="VARIABLELIST"
3081 > Feed log analysis scripts with useless data.
3088 > Sends a cookie with each request stating that you do not accept any copyright
3089 on cookies sent to you, and asking the site operator not to track you.
3109 > The vanilla wafer is a (relatively) unique header and could conceivably be used to track you.
3112 > This action is rarely used and not enabled in the default configuration.
3127 >+send-vanilla-wafer</PRE
3151 CLASS="VARIABLELIST"
3157 > Send custom cookies or feed log analysis scripts with even more useless data.
3164 > Sends a custom, user-defined cookie with each request.
3177 > A string of the form <SPAN
3197 > Being multi-valued, multiple instances of this action can apply to the same request,
3198 resulting in multiple cookies being sent.
3201 > This action is rarely used and not enabled in the default configuration.
3205 >Example usage (section):</DT
3216 >{+send-wafer{UsingPrivoxy=true}}
3217 my-internal-testing-server.void</PRE
3232 NAME="SESSION-COOKIES-ONLY"
3235 >session-cookies-only</I
3241 CLASS="VARIABLELIST"
3247 > Allow only temporary <SPAN
3250 > cookies (for the current browser session <I
3265 >"Set-Cookie:"</SPAN
3267 Most browsers will not store such cookies permanently and forget them in between sessions.
3287 > This is less strict than <TT
3290 HREF="actions-file.html#CRUNCH-INCOMING-COOKIES"
3291 >crunch-incoming-cookies</A
3297 HREF="actions-file.html#CRUNCH-OUTGOING-COOKIES"
3298 >crunch-outgoing-cookies</A
3300 > and allows you to browse
3301 websites that insist or rely on setting cookies, without compromising your privacy too badly.
3304 > Most browsers will not permanently store cookies that have been processed by
3307 >session-cookies-only</TT
3308 > and will forget about them between sessions.
3309 This makes profiling cookies useless, but won't break sites which require cookies so
3310 that you can log in for transactions. This is generally turned on for all
3311 sites, and is the recommended setting.
3319 >session-cookies-only</TT
3324 HREF="actions-file.html#CRUNCH-INCOMING-COOKIES"
3325 >crunch-incoming-cookies</A
3331 HREF="actions-file.html#CRUNCH-OUTGOING-COOKIES"
3332 >crunch-outgoing-cookies</A
3334 >. If you do, cookies
3335 will be plainly killed.
3338 > Note that it is up to the browser how it handles such cookies without an <SPAN
3342 field. If you use an exotic browser, you might want to try it out to be sure.
3357 >+session-cookies-only</PRE
3372 NAME="SET-IMAGE-BLOCKER"
3375 >set-image-blocker</I
3381 CLASS="VARIABLELIST"
3387 >Choose the replacement for blocked images</P
3393 > This action alone doesn't do anything noticeable. If <I
3400 HREF="actions-file.html#BLOCK"
3409 HREF="actions-file.html#HANDLE-AS-IMAGE"
3416 apply, i.e. if the request is to be blocked as an image,
3420 > the parameter of this action decides what will be
3421 sent as a replacement.
3441 > to send a built-in checkerboard pattern image. The image is visually
3442 decent, scales very well, and makes it obvious where banners were busted.
3450 > to send a built-in transparent image. This makes banners disappear
3451 completely, but makes it hard to detect where <SPAN
3455 images on a given page and complicates troubleshooting if <SPAN
3459 has blocked innocent images, like navigation icons.
3473 send a redirect to <TT
3479 to any image anywhere, even in your local filesystem (via <SPAN
3485 > A good application of redirects is to use special <SPAN
3489 URLs, which send the built-in images, as <TT
3495 This has the same visual effect as specifying <SPAN
3502 the first place, but enables your browser to cache the replacement image, instead of requesting
3503 it over and over again.
3512 > The URLs for the built-in images are <SPAN
3514 >"http://config.privoxy.org/send-banner?type=<TT
3535 > There is a third (advanced) type, called <SPAN
3544 >set-image-blocker</TT
3545 >, but meant for use from <A
3546 HREF="filter-file.html"
3549 Auto will select the type of image that would have applied to the referring page, had it been an image.
3567 >+set-image-blocker{pattern}</PRE
3574 > Redirect to the BSD devil:
3585 >+set-image-blocker{http://www.freebsd.org/gifs/dae_up3.gif}</PRE
3592 > Redirect to the built-in pattern for better caching:
3603 >+set-image-blocker{http://config.privoxy.org/send-banner?type=pattern}</PRE
3622 > Note that many of these actions have the potential to cause a page to
3623 misbehave, possibly even not to display at all. There are many ways
3624 a site designer may choose to design his site, and what HTTP header
3625 content, and other criteria, he may depend on. There is no way to have hard
3626 and fast rules for all sites. See the <A
3627 HREF="appendix.html#ACTIONSANAT"
3629 > for a brief example on troubleshooting
3652 >, can be defined by combining other actions.
3653 These can in turn be invoked just like the built-in actions.
3654 Currently, an alias name can contain any character except space, tab,
3669 > that you only use <SPAN
3689 Alias names are not case sensitive, and are not required to start with a
3696 > sign, since they are merely textually
3699 > Aliases can be used throughout the actions file, but they <I
3702 defined in a special section at the top of the file!</I
3704 And there can only be one such section per actions file. Each actions file may
3705 have its own alias section, and the aliases defined in it are only visible
3706 within that file.</P
3708 > There are two main reasons to use aliases: One is to save typing for frequently
3709 used combinations of actions, the other one is a gain in flexibility: If you
3710 decide once how you want to handle shops by defining an alias called
3714 >, you can later change your policy on shops in
3718 > place, and your changes will take effect everywhere
3719 in the actions file where the <SPAN
3722 > alias is used. Calling aliases
3723 by their purpose also makes your actions files more readable.</P
3725 > Currently, there is one big drawback to using aliases, though:
3729 >'s built-in web-based action file
3730 editor honors aliases when reading the actions files, but it expands
3731 them before writing. So the effects of your aliases are of course preserved,
3732 but the aliases themselves are lost when you edit sections that use aliases
3734 This is likely to change in future versions of <SPAN
3739 > Now let's define some aliases...</P
3749 > # Useful custom aliases we can use later.
3751 # Note the (required!) section header line and that this section
3752 # must be at the top of the actions file!
3756 # These aliases just save typing later:
3757 # (Note that some already use other aliases!)
3759 +crunch-all-cookies = +crunch-incoming-cookies +crunch-outgoing-cookies
3760 -crunch-all-cookies = -crunch-incoming-cookies -crunch-outgoing-cookies
3761 block-as-image = +block +handle-as-image
3762 mercy-for-cookies = -crunch-all-cookies -session-cookies-only
3764 # These aliases define combinations of actions
3765 # that are useful for certain types of sites:
3767 fragile = -block -crunch-all-cookies -filter -fast-redirects -hide-referer -kill-popups
3768 shop = -crunch-all-cookies -filter{popups} -kill-popups
3770 # Short names for other aliases, for really lazy people ;-)
3772 c0 = +crunch-all-cookies
3773 c1 = -crunch-all-cookies</PRE
3779 > ...and put them to use. These sections would appear in the lower part of an
3780 actions file and define exceptions to the default actions (as specified further
3794 > # These sites are either very complex or very keen on
3795 # user data and require minimal interference to work:
3798 .office.microsoft.com
3799 .windowsupdate.microsoft.com
3803 # Allow cookies (for setting and retrieving your customer data)
3807 .worldpay.com # for quietpc.com
3810 # These shops require pop-ups:
3812 {shop -kill-popups -filter{popups}}
3814 .overclockers.co.uk</PRE
3820 > Aliases like <SPAN
3826 > are often used for
3830 > sites that require some actions to be disabled
3831 in order to function properly.</P
3839 >8.7. Actions Files Tutorial</A
3842 > The above chapters have shown <A
3843 HREF="actions-file.html"
3844 >which actions files
3845 there are and how they are organized</A
3846 >, how actions are <A
3847 HREF="actions-file.html#ACTIONS"
3850 HREF="actions-file.html#ACTIONS-APPLY"
3854 HREF="actions-file.html#AF-PATTERNS"
3858 HREF="actions-file.html#ALIASES"
3860 >. Now, let's look at an
3868 file and see how all these pieces come together:</P
3875 >8.7.1. default.action</A
3878 >Every config file should start with a short comment stating its purpose:</P
3888 ># Sample default.action file <developers@privoxy.org></PRE
3894 >Then, since this is the <TT
3898 first section is a special section for internal use that you needn't
3899 change or worry about:</P
3909 >##########################################################################
3910 # Settings -- Don't change! For internal Privoxy use ONLY.
3911 ##########################################################################
3914 for-privoxy-version=3.0</PRE
3920 >After that comes the (optional) alias section. We'll use the example
3921 section from the above <A
3922 HREF="actions-file.html#ALIASES"
3923 >chapter on aliases</A
3925 that also explains why and how aliases are used:</P
3935 >##########################################################################
3937 ##########################################################################
3940 # These aliases just save typing later:
3941 # (Note that some already use other aliases!)
3943 +crunch-all-cookies = +crunch-incoming-cookies +crunch-outgoing-cookies
3944 -crunch-all-cookies = -crunch-incoming-cookies -crunch-outgoing-cookies
3945 block-as-image = +block +handle-as-image
3946 mercy-for-cookies = -crunch-all-cookies -session-cookies-only
3948 # These aliases define combinations of actions
3949 # that are useful for certain types of sites:
3951 fragile = -block -crunch-all-cookies -filter -fast-redirects -hide-referer -kill-popups
3952 shop = mercy-for-cookies -filter{popups} -kill-popups</PRE
3958 > Now come the regular sections, i.e. sets of actions, accompanied
3959 by URL patterns to which they apply. Remember <I
3962 are disabled when matching starts</I
3963 >, so we have to explicitly
3964 enable the ones we want.</P
3966 > The first regular section is probably the most important. It has only
3975 HREF="actions-file.html#AF-PATTERNS"
3976 >matches all URLs.</A
3978 set of actions used in this <SPAN
3984 be applied to all requests as a start</I
3985 >. It can be partly or
3986 wholly overridden by later matches further down this file, or in user.action,
3987 but it will still be largely responsible for your overall browsing
3990 > Again, at the start of matching, all actions are disabled, so there is
3991 no real need to disable any actions here, but we will do that nonetheless,
3992 to have a complete listing for your reference. (Remember: A <SPAN
3996 preceding the action name enables the action, a <SPAN
4000 Also note how this long line has been made more readable by splitting it into
4001 multiple lines with line continuation.</P
4011 >##########################################################################
4012 # "Defaults" section:
4013 ##########################################################################
4016 HREF="actions-file.html#ADD-HEADER"
4020 HREF="actions-file.html#BLOCK"
4024 HREF="actions-file.html#CRUNCH-INCOMING-COOKIES"
4025 >crunch-incoming-cookies</A
4028 HREF="actions-file.html#CRUNCH-OUTGOING-COOKIES"
4029 >crunch-outgoing-cookies</A
4032 HREF="actions-file.html#DEANIMATE-GIFS"
4036 HREF="actions-file.html#DOWNGRADE-HTTP-VERSION"
4037 >downgrade-http-version</A
4040 HREF="actions-file.html#FAST-REDIRECTS"
4044 HREF="actions-file.html#FILTER-HTML-ANNOYANCES"
4045 >filter{html-annoyances}</A
4048 HREF="actions-file.html#FILTER-JS-ANNOYANCES"
4049 >filter{js-annoyances}</A
4052 HREF="actions-file.html#FILTER-CONTENT-COOKIES"
4053 >filter{content-cookies}</A
4056 HREF="actions-file.html#FILTER-POPUPS"
4060 HREF="actions-file.html#FILTER-WEBBUGS"
4064 HREF="actions-file.html#FILTER-REFRESH-TAGS"
4065 >filter{refresh-tags}</A
4068 HREF="actions-file.html#FILTER-FUN"
4072 HREF="actions-file.html#FILTER-NIMDA"
4076 HREF="actions-file.html#FILTER-BANNERS-BY-SIZE"
4077 >filter{banners-by-size}</A
4080 HREF="actions-file.html#FILTER-SHOCKWAVE-FLASH"
4081 >filter{shockwave-flash}</A
4084 HREF="actions-file.html#FILTER-CRUDE-PARENTAL"
4085 >filter{crude-parental}</A
4088 HREF="actions-file.html#HANDLE-AS-IMAGE"
4092 HREF="actions-file.html#HIDE-FORWARDED-FOR-HEADERS"
4093 >hide-forwarded-for-headers</A
4096 HREF="actions-file.html#HIDE-FROM-HEADER"
4097 >hide-from-header{block}</A
4100 HREF="actions-file.html#HIDE-REFERER"
4101 >hide-referrer{forge}</A
4104 HREF="actions-file.html#HIDE-USER-AGENT"
4108 HREF="actions-file.html#KILL-POPUPS"
4112 HREF="actions-file.html#LIMIT-CONNECT"
4116 HREF="actions-file.html#PREVENT-COMPRESSION"
4117 >prevent-compression</A
4120 HREF="actions-file.html#SEND-VANILLA-WAFER"
4121 >send-vanilla-wafer</A
4124 HREF="actions-file.html#SEND-WAFER"
4128 HREF="actions-file.html#SESSION-COOKIES-ONLY"
4129 >session-cookies-only</A
4132 HREF="actions-file.html#SET-IMAGE-BLOCKER"
4133 >set-image-blocker{pattern}</A
4136 / # forward slash will match *all* potential URL patterns.</PRE
4142 > The default behavior is now set. Note that some actions, like not hiding
4143 the user agent, are part of a <SPAN
4145 >"general policy"</SPAN
4147 universally and won't get any exceptions defined later. Other choices,
4148 like not blocking (which is <I
4152 default!) need exceptions, i.e. we need to specify explicitly what we
4153 want to block in later sections.
4154 We will also want to make exceptions from our general pop-up-killing,
4155 and use our defined aliases for that.</P
4157 > The first of our specialized sections is concerned with <SPAN
4161 sites, i.e. sites that require minimum interference, because they are either
4162 very complex or very keen on tracking you (and have mechanisms in place that
4163 make them unusable for people who avoid being tracked). We will simply use
4167 > alias instead of stating the list
4168 of actions explicitly:</P
4178 >##########################################################################
4179 # Exceptions for sites that'll break under the default action set:
4180 ##########################################################################
4182 # "Fragile" Use a minimum set of actions for these sites (see alias above):
4185 .office.microsoft.com # surprise, surprise!
4186 .windowsupdate.microsoft.com</PRE
4192 > Shopping sites are not as fragile, but they typically
4193 require cookies to log in, and pop-up windows for shopping
4194 carts or item details. Again, we'll use a pre-defined alias:</P
4208 .worldpay.com # for quietpc.com
4216 > Then, there are sites which rely on pop-up windows (yuck!) to work.
4217 Since we made pop-up-killing our default above, we need to make exceptions
4219 HREF="http://www.mozilla.org/"
4223 can turn on smart handling of unwanted pop-ups in their browsers, can
4228 HREF="actions-file.html#FILTER-POPUPS"
4235 HREF="actions-file.html#KILL-POPUPS"
4239 and hence don't need this section. Anyway, disabling an already disabled
4240 action doesn't hurt, so we'll define our exceptions regardless of what was
4241 chosen in the defaults section:</P
4251 ># These sites require pop-ups too :(
4254 HREF="actions-file.html#KILL-POPUPS"
4257 HREF="actions-file.html#FILTER-POPUPS"
4262 .deutsche-bank-24.de</PRE
4271 HREF="actions-file.html#FAST-REDIRECTS"
4275 action, which we enabled per default above, breaks some sites. So disable
4276 it for popular sites where we know it misbehaves:</P
4287 HREF="actions-file.html#FAST-REDIRECTS"
4293 .altavista.com/.*(like|url|link):http
4294 .altavista.com/trans.*urltext=http
4301 > It is important that <SPAN
4305 URLs belong to images, so that <I
4309 be blocked, a substitute image can be sent, rather than an HTML page.
4310 Contacting the remote site to find out is not an option, since it
4311 would destroy the loading time advantage of banner blocking, and it
4312 would feed the advertisers (in terms of money <I
4316 information). We can mark any URL as an image with the <TT
4319 HREF="actions-file.html#HANDLE-AS-IMAGE"
4323 and marking all URLs that end in a known image file extension is a
4334 >##########################################################################
4336 ##########################################################################
4338 # Define which file types will be treated as images, in case they get
4339 # blocked further down this file:
4342 HREF="actions-file.html#HANDLE-AS-IMAGE"
4345 /.*\.(gif|jpe?g|png|bmp|ico)$</PRE
4351 > And then there are known banner sources. They often use scripts to
4352 generate the banners, so it won't be visible from the URL that the
4353 request is for an image. Hence we block them <I
4357 mark them as images in one go, with the help of our
4361 > alias defined above. (We could of
4362 course just as well use <TT
4365 HREF="actions-file.html#BLOCK"
4369 HREF="actions-file.html#HANDLE-AS-IMAGE"
4373 Remember that the type of the replacement image is chosen by the
4377 HREF="actions-file.html#SET-IMAGE-BLOCKER"
4378 >set-image-blocker</A
4381 action. Since all URLs have matched the default section with its
4385 HREF="actions-file.html#SET-IMAGE-BLOCKER"
4386 >set-image-blocker</A
4389 action before, it still applies and needn't be repeated:</P
4399 ># Known ad generators:
4404 .ad.*.doubleclick.net
4405 .a.yimg.com/(?:(?!/i/).)*$
4406 .a[0-9].yimg.com/(?:(?!/i/).)*$
4415 > One of the most important jobs of <SPAN
4419 is to block banners. A huge bunch of them are already <SPAN
4426 HREF="actions-file.html#FILTER"
4428 >{banners-by-size}</TT
4430 action, which we enabled above, and which deletes the references to banner
4431 images from the pages while they are loaded, so the browser doesn't request
4432 them anymore, and hence they don't need to be blocked here. But this naturally
4433 doesn't catch all banners, and some people choose not to use filters, so we
4434 need a comprehensive list of patterns for banner URLs here, and apply the
4438 HREF="actions-file.html#BLOCK"
4441 > action to them.</P
4443 > First comes a bunch of generic patterns, which do most of the work, by
4444 matching typical domain and path name components of banners. Then comes
4445 a list of individual patterns for specific sites, which is omitted here
4446 to keep the example short:</P
4456 >##########################################################################
4457 # Block these fine banners:
4458 ##########################################################################
4460 HREF="actions-file.html#BLOCK"
4470 /.*count(er)?\.(pl|cgi|exe|dll|asp|php[34]?)
4471 /(?:.*/)?(publicite|werbung|rekla(ma|me|am)|annonse|maino(kset|nta|s)?)/
4473 # Site-specific patterns (abbreviated):
4481 > You wouldn't believe how many advertisers actually call their banner
4487 >.com, or call the directory
4488 in which the banners are stored simply <SPAN
4492 generic patterns are surprisingly effective.</P
4494 > But being very generic, they necessarily also catch URLs that we don't want
4495 to block. The pattern <TT
4504 >.nasty-corp.com"</SPAN
4511 >.sourcefroge.net"</SPAN
4518 >l.some-provider.net."</SPAN
4520 well-known exceptions to the <TT
4523 HREF="actions-file.html#BLOCK"
4529 > Note that these are exceptions to exceptions from the default! Consider the URL
4532 >"downloads.sourcefroge.net"</SPAN
4533 >: Initially, all actions are deactivated,
4534 so it wouldn't get blocked. Then comes the defaults section, which matches the
4535 URL, but just deactivates the <TT
4538 HREF="actions-file.html#BLOCK"
4542 action once again. Then it matches <TT
4545 >, an exception to the
4546 general non-blocking policy, and suddenly
4550 HREF="actions-file.html#BLOCK"
4553 > applies. And now, it'll match
4560 HREF="actions-file.html#BLOCK"
4564 applies, so (unless it matches <I
4567 > further down) it ends up
4571 HREF="actions-file.html#BLOCK"
4574 > action applying.</P
4584 >##########################################################################
4585 # Save some innocent victims of the above generic block patterns:
4586 ##########################################################################
4591 HREF="actions-file.html#BLOCK"
4594 adv[io]*. # (for advogato.org and advice.*)
4595 adsl. # (has nothing to do with ads)
4596 ad[ud]*. # (adult.* and add.*)
4597 .edu # (universities don't host banners (yet!))
4598 .*loads. # (downloads, uploads etc)
4606 www.globalintersec.com/adv # (adv = advanced)
4607 www.ugu.com/sui/ugu/adv</PRE
4613 > Filtering source code can have nasty side effects,
4614 so make an exception for our friends at sourceforge.net,
4615 and all paths with <SPAN
4618 > in them. Note that
4622 HREF="actions-file.html#FILTER"
4629 > filters in one fell swoop!</P
4639 ># Don't filter code!
4642 HREF="actions-file.html#FILTER"
4646 .sourceforge.net</PRE
4656 comprehensive, but we hope this example made clear how it works.</P
4664 >8.7.2. user.action</A
4667 > So far we are painting with a broad brush by setting general policies,
4668 which would be a reasonable starting point for many people. Now,
4669 you'd maybe want to be more specific and have customized rules that
4670 are more suitable to your personal habits and preferences. These would
4671 be for narrowly defined situations like your ISP or your bank, and should
4675 >, which is parsed after all other
4676 actions files and hence has the last word, over-riding any previously
4677 defined actions. <TT
4684 > place for your personal settings, since
4688 > is actively maintained by the
4692 > developers and you'll probably want
4693 to install updated versions from time to time.</P
4695 > So let's look at a few examples of things that one might typically do in
4709 ># My user.action file. <fred@foobar.com></PRE
4716 HREF="actions-file.html#ALIASES"
4718 > are local to the actions
4719 file that they are defined in, you can't use the ones from
4723 >, unless you repeat them here:</P
4733 ># (Re-)define aliases for this file:
4736 -crunch-all-cookies = -crunch-incoming-cookies -crunch-outgoing-cookies
4737 mercy-for-cookies = -crunch-all-cookies -session-cookies-only
4738 fragile = -block -crunch-all-cookies -filter -fast-redirects -hide-referer -kill-popups
4739 shop = mercy-for-cookies -filter{popups} -kill-popups
4740 allow-ads = -block -filter{banners-by-size} # (see below)</PRE
4747 > Say you have accounts on some sites that you visit regularly, and
4748 you don't want to have to log in manually each time. So you'd like
4749 to allow persistent cookies for these sites. The
4752 >mercy-for-cookies</TT
4753 > alias defined above does exactly
4754 that, i.e. it disables crunching of cookies in any direction, and
4755 processing of cookies to make them temporary.</P
4765 >{ mercy-for-cookies }
4776 > Your bank needs popups and is allergic to some filter, but you don't
4777 know which, so you disable them all:</P
4788 HREF="actions-file.html#FILTER"
4791 HREF="actions-file.html#KILL-POPUPS"
4794 .your-home-banking-site.com</PRE
4800 > While browsing the web with <SPAN
4804 noticed some ads that sneaked through, but you were too lazy to
4805 report them through our fine and easy <A
4809 system, so you have added them here:</P
4820 HREF="actions-file.html#BLOCK"
4823 www.a-popular-site.com/some/unobvious/path
4824 another.popular.site.net/more/junk/here/</PRE
4830 > Note that, assuming the banners in the above example have regular image
4831 extensions (most do),
4835 HREF="actions-file.html#HANDLE-AS-IMAGE"
4839 need not be specified, since all URLs ending in these extensions will
4840 already have been tagged as images in the relevant section of
4846 > Then you noticed that the default configuration breaks Forbes Magazine,
4847 but you were too lazy to find out which action is the culprit, and you
4848 were again too lazy to give <A
4852 you just used the <TT
4855 > alias on the site, and
4856 -- whoa! -- it worked:</P
4873 > You like the <SPAN
4876 > text replacements in <TT
4880 but it is disabled in the distributed actions file. (My colleagues on the team just
4881 don't have a sense of humour, that's why! ;-). So you'd like to turn it on in your private,
4882 update-safe config, once and for all:</P
4893 HREF="actions-file.html#FILTER-FUN"
4896 / # For ALL sites!</PRE
4902 > Note that the above is not really a good idea: There are exceptions
4903 to the filters in <TT
4907 really shouldn't be filtered, like code on CVS->Web interfaces. Since
4911 > has the last word, these exceptions
4912 won't be valid for the <SPAN
4915 > filtering specified here.</P
4917 > Finally, you might think about how your favourite free websites are
4918 funded, and find that they rely on displaying banner advertisements
4919 to survive. So you might want to specifically allow banners for those
4920 sites that you feel provide value to you:</P
4942 > has been aliased to
4946 HREF="actions-file.html#BLOCK"
4953 HREF="actions-file.html#FILTER-BANNERS-BY-SIZE"
4954 >filter{banners-by-size}</A
4992 HREF="filter-file.html"
5001 >The Main Configuration File</TD
5011 >The Filter File</TD