7 CONTENT="Modular DocBook HTML Stylesheet Version 1.60"><LINK
9 TITLE="Privoxy 2.9.16 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 2.9.16 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 <A
107 HREF="installation.html#INSTALLATION-KEEPUPDATED"
108 >making available to users</A
117 > - is intended to be for local site
118 preferences and exceptions. As an example, if your ISP or your bank
119 has specific requirements, and need special handling, this kind of
120 thing should go here. This file will not be upgraded.
128 > - is used by the web based editor,
129 to set various pre-defined sets of rules for the default actions section
133 >. These have increasing levels of
136 >and have no influence on your browsing unless
137 you select them explicitly in the editor</I
138 >. It is not recommend
146 > The list of actions files to be used are defined in the main configuration
147 file, and are processed in the order they are defined. The content of these
148 can all be viewed and edited from <A
149 HREF="http://config.privoxy.org/show-status"
151 >http://config.privoxy.org/show-status</A
154 > An actions file typically has multiple sections. If you want to use
158 > in an actions file, you have to place the (optional)
160 HREF="actions-file.html#ALIASES"
162 > at the top of that file.
163 Then comes the default set of rules which will apply universally to all
164 sites and pages (be <I
171 > or any other actions file after
175 >, because it will override the result
176 from consulting any previous file). And then below that,
177 exceptions to the defined universal policies. You can regard
181 > as an appendix to <TT
185 with the advantage that is a separate file, which makes preserving your
186 personal settings across <SPAN
189 > upgrades easier.</P
192 Actions can be used to block anything you want, including ads, banners, or
193 just some obnoxious URL that you would rather not see. Cookies can be accepted
194 or rejected, or accepted only during the current browser session (i.e. not
195 written to disk), content can be modified, JavaScripts tamed, user-tracking
196 fooled, and much more. See below for a <A
197 HREF="actions-file.html#ACTIONS"
207 >8.1. Finding the Right Mix</A
211 HREF="actions-file.html#ACTIONS"
213 >, like cookie suppression
214 or script disabling, may render some sites unusable that rely on these
215 techniques to work properly. Finding the right mix of actions is not always easy and
216 certainly a matter of personal taste. In general, it can be said that the more
220 > your default settings (in the top section of the
221 actions file) are, the more exceptions for <SPAN
225 will have to make later. If, for example, you want to kill popup windows per
226 default, you'll have to make exceptions from that rule for sites that you
227 regularly use and that require popups for actually useful content, like maybe
228 your bank, favorite shop, or newspaper.</P
230 > We have tried to provide you with reasonable rules to start from in the
231 distribution actions files. But there is no general rule of thumb on these
232 things. There just are too many variables, and sites are constantly changing.
233 Sooner or later you will want to change the rules (and read this chapter again :).</P
244 > The easiest way to edit the actions files is with a browser by
245 using our browser-based editor, which can be reached from <A
246 HREF="http://config.privoxy.org/show-status"
248 >http://config.privoxy.org/show-status</A
250 The editor allows both fine-grained control over every single feature on a
251 per-URL basis, and easy choosing from wholesale sets of defaults like
263 > If you prefer plain text editing to GUIs, you can of course also directly edit the
264 the actions files. Look at <TT
276 >8.3. How Actions are Applied to URLs</A
279 > Actions files are divided into sections. There are special sections,
283 HREF="actions-file.html#ALIASES"
286 > sections which will
287 be discussed later. For now let's concentrate on regular sections: They have a
288 heading line (often split up to multiple lines for readability) which consist
289 of a list of actions, separated by whitespace and enclosed in curly braces.
290 Below that, there is a list of URL patterns, each on a separate line.</P
292 > To determine which actions apply to a request, the URL of the request is
293 compared to all patterns in each action file file. Every time it matches, the list of
294 applicable actions for the URL is incrementally updated, using the heading
295 of the section in which the pattern is located. If multiple matches for
296 the same URL set the same action differently, the last match wins. If not,
297 the effects are aggregated. E.g. a URL might match a regular section with
298 a heading line of <TT
302 HREF="actions-file.html#HANDLE-AS-IMAGE"
307 then later another one with just <TT
311 HREF="actions-file.html#BLOCK"
319 > actions to apply.</P
321 > You can trace this process for any given URL by visiting <A
322 HREF="http://config.privoxy.org/show-url-info"
324 >http://config.privoxy.org/show-url-info</A
327 > More detail on this is provided in the Appendix, <A
328 HREF="appendix.html#ACTIONSANAT"
329 > Anatomy of an Action</A
341 > Generally, a pattern has the form <TT
343 ><domain>/<path></TT
347 ><domain></TT
352 are optional. (This is why the pattern <TT
355 > matches all URLs).</P
364 >www.example.com/</TT
368 > is a domain-only pattern and will match any request to <TT
372 regardless of which document on that server is requested.
382 > means exactly the same. For domain-only patterns, the trailing <TT
392 >www.example.com/index.html</TT
396 > matches only the single document <TT
413 > matches the document <TT
416 >, regardless of the domain,
430 > matches nothing, since it would be interpreted as a domain name and
431 there is no top-level domain called <TT
445 >8.4.1. The Domain Pattern</A
448 > The matching of the domain part offers some flexible options: if the
449 domain starts or ends with a dot, it becomes unanchored at that end.
463 > matches any domain that <I
480 > matches any domain that <I
497 > matches any domain that <I
504 (Correctly speaking: It matches any FQDN that contains <TT
513 > Additionally, there are wild-cards that you can use in the domain names
514 themselves. They work pretty similar to shell wild-cards: <SPAN
518 stands for zero or more arbitrary characters, <SPAN
522 any single character, you can define character classes in square
523 brackets and all of that can be freely mixed:</P
538 >"adserver.example.com"</SPAN
542 >"ads.example.com"</SPAN
545 >"sfads.example.com"</SPAN
552 >*ad*.example.com</TT
556 > matches all of the above, and then some.
572 >pictures.epix.com</TT
575 >a.b.c.d.e.upix.com</TT
582 >www[1-9a-ez].example.c*</TT
588 >www1.example.com</TT
599 >wwwz.example.com</TT
606 >wwww.example.com</TT
619 >8.4.2. The Path Pattern</A
625 > uses Perl compatible regular expressions
627 HREF="http://www.pcre.org/"
631 matching the path.</P
634 HREF="appendix.html#REGEX"
636 > with a brief quick-start into regular
637 expressions, and full (very technical) documentation on PCRE regex syntax is available on-line
639 HREF="http://www.pcre.org/man.txt"
641 >http://www.pcre.org/man.txt</A
643 You might also find the Perl man page on regular expressions (<TT
647 useful, which is available on-line at <A
648 HREF="http://www.perldoc.com/perl5.6/pod/perlre.html"
650 >http://www.perldoc.com/perl5.6/pod/perlre.html</A
653 > Note that the path pattern is automatically left-anchored at the <SPAN
657 i.e. it matches as if it would start with a <SPAN
660 > (regular expression speak
661 for the beginning of a line).</P
663 > Please also note that matching in the path is <I
667 by default, but you can switch to case sensitive at any point in the pattern by using the
673 >www.example.com/(?-i)PaTtErN.*</TT
675 only documents whose path starts with <TT
682 > this capitalization.</P
694 > All actions are disabled by default, until they are explicitly enabled
695 somewhere in an actions file. Actions are turned on if preceded with a
699 >, and turned off if preceded with a <SPAN
708 >"do that action"</SPAN
715 >"please block URLs that match the
716 following patterns"</SPAN
723 block URLs that match the following patterns, even if <TT
727 previously applied."</SPAN
731 Again, actions are invoked by placing them on a line, enclosed in curly braces and
732 separated by whitespace, like in
735 >{+some-action -some-other-action{some-parameter}}</TT
737 followed by a list of URL patterns, one per line, to which they apply.
738 Together, the actions line and the following pattern lines make up a section
739 of the actions file. </P
742 There are three classes of actions:</P
750 Boolean, i.e the action can only be <SPAN
773 > # enable action <TT
784 > # disable action <TT
806 Parameterized, where some value is required in order to enable this type of action.
828 >} # enable action and set parameter to <TT
834 # overwriting parameter from previous match if necessary
840 > # disable action. The parameter can be omitted</PRE
847 > Note that if the URL matches multiple positive forms of a parameterized action,
848 the last match wins, i.e. the params from earlier matches are simply ignored.
854 >+hide-user-agent{ Mozilla 1.0 }</TT
861 Multi-value. These look exactly like parameterized actions,
862 but they behave differently: If the action applies multiple times to the
863 same URL, but with different parameters, <I
870 > matches are remembered. This is used for actions
871 that can be executed for the same request repeatedly, like adding multiple
872 headers, or filtering through multiple filters. Syntax:
893 >} # enable action and add <TT
898 > to the list of parameters
909 >} # remove the parameter <TT
914 > from the list of parameters
915 # If it was the last one left, disable the action.
921 > # disable this action completely and remove all parameters from the list</PRE
931 >+add-header{X-Fun-Header: Some text}</TT
935 >+filter{html-annoyances}</TT
942 > If nothing is specified in any actions file, no <SPAN
946 taken. So in this case <SPAN
950 normal, non-blocking, non-anonymizing proxy. You must specifically enable the
951 privacy and blocking features you need (although the provided default actions
952 files will give a good starting point).</P
954 > Later defined actions always over-ride earlier ones. So exceptions
955 to any rules you make, should come in the latter part of the file (or
956 in a file that is processed later when using multiple actions files). For
957 multi-valued actions, the actions are applied in the order they are specified.
958 Actions files are processed in the order they are defined in
962 > (the default installation has three actions
963 files). It also quite possible for any given URL pattern to match more than
964 one pattern and thus more than one set of actions!</P
966 > The list of valid <SPAN
976 >8.5.1. add-header</A
987 >Confuse log analysis, custom applications</P
993 > Sends a user defined HTTP header to the web server.
1006 > Any string value is possible. Validity of the defined HTTP headers is not checked.
1007 It is recommended that you use the <SPAN
1021 > This action may be specified multiple times, in order to define multiple
1022 headers. This is rarely needed for the typical user. If you don't know what
1025 >"HTTP headers"</SPAN
1026 > are, you definitely don't need to worry about this
1042 >+add-header{X-User-Tracking: sucks}</PRE
1063 CLASS="VARIABLELIST"
1069 >Block ads or other obnoxious content</P
1075 > Requests for URLs to which this action applies are blocked, i.e. the requests are not
1076 forwarded to the remote server, but answered locally with a substitute page or image,
1077 as determined by the <TT
1080 HREF="actions-file.html#HANDLE-AS-IMAGE"
1087 HREF="actions-file.html#SET-IMAGE-BLOCKER"
1088 >set-image-blocker</A
1112 > sends a special <SPAN
1116 for requests to blocked pages. This page contains links to find out why the request
1117 was blocked, and a click-through to the blocked content (the latter only if compiled with the
1118 force feature enabled). The <SPAN
1121 > page adapts to the available
1122 screen space -- it displays full-blown if space allows, or miniaturized and text-only
1123 if loaded into a small frame or window. If you are using <SPAN
1127 right now, you can take a look at the
1129 HREF="http://ads.bannerserver.example.com/nasty-ads/sponsor.html"
1140 A very important exception occurs if <I
1150 HREF="actions-file.html#HANDLE-AS-IMAGE"
1154 apply to the same request: it will then be replaced by an image. If
1158 HREF="actions-file.html#SET-IMAGE-BLOCKER"
1159 >set-image-blocker</A
1162 (see below) also applies, the type of image will be determined by its parameter,
1163 if not, the standard checkerboard pattern is sent.
1166 > It is important to understand this process, in order
1167 to understand how <SPAN
1171 ads and other unwanted content.
1177 HREF="actions-file.html#FILTER"
1181 action can perform a very similar task, by <SPAN
1185 banner images and other content through rewriting the relevant URLs in the
1186 document's HTML source, so they don't get requested in the first place.
1187 Note that this is a totally different technique, and it's easy to confuse the two.
1191 >Example usage (section):</DT
1202 >{+block} # Block and replace with "blocked" page
1203 .nasty-stuff.example.com
1205 {+block +handle-as-image} # Block and replace with image
1222 NAME="CRUNCH-INCOMING-COOKIES"
1223 >8.5.3. crunch-incoming-cookies</A
1228 CLASS="VARIABLELIST"
1234 > Prevent the web server from setting any cookies on your system
1243 >"Set-Cookie:"</SPAN
1244 > HTTP headers from server replies.
1264 > This action is only concerned with <I
1275 HREF="actions-file.html#CRUNCH-OUTGOING-COOKIES"
1276 >crunch-outgoing-cookies</A
1282 > to disable cookies completely.
1288 > to use this action in conjunction
1292 HREF="actions-file.html#SESSION-COOKIES-ONLY"
1293 >session-cookies-only</A
1296 since it would prevent the session cookies from being set.
1311 >+crunch-incoming-cookies</PRE
1326 NAME="CRUNCH-OUTGOING-COOKIES"
1327 >8.5.4. crunch-outgoing-cookies</A
1332 CLASS="VARIABLELIST"
1338 > Prevent the web server from reading any cookies from your system
1348 > HTTP headers from client requests.
1368 > This action is only concerned with <I
1379 HREF="actions-file.html#CRUNCH-INCOMING-COOKIES"
1380 >crunch-incoming-cookies</A
1386 > to disable cookies completely.
1392 > to use this action in conjunction
1396 HREF="actions-file.html#SESSION-COOKIES-ONLY"
1397 >session-cookies-only</A
1400 since it would prevent the session cookies from being read.
1415 >+crunch-outgoing-cookies</PRE
1430 NAME="DEANIMATE-GIFS"
1431 >8.5.5. deanimate-gifs</A
1436 CLASS="VARIABLELIST"
1442 >Stop those annoying, distracting animated GIF images.</P
1448 > De-animate GIF animations, i.e. reduce them to their first or last image.
1474 > This will also shrink the images considerably (in bytes, not pixels!). If
1478 > is given, the first frame of the animation
1479 is used as the replacement. If <SPAN
1482 > is given, the last
1483 frame of the animation is used instead, which probably makes more sense for
1484 most banner animations, but also has the risk of not showing the entire
1485 last frame (if it is only a delta to an earlier frame).
1488 > You can safely use this action with patterns that will also match non-GIF
1489 objects, because no attempt will be made at anything that doesn't look like
1505 >+deanimate-gifs{last}</PRE
1520 NAME="DOWNGRADE-HTTP-VERSION"
1521 >8.5.6. downgrade-http-version</A
1526 CLASS="VARIABLELIST"
1532 >Work around (very rare) problems with HTTP/1.1</P
1538 > Downgrades HTTP/1.1 client requests and server replies to HTTP/1.0.
1558 > This is a left-over from the time when <SPAN
1562 didn't support important HTTP/1.1 features well. It is left here for the
1563 unlikely case that you experience HTTP/1.1 related problems with some server
1564 out there. Not all (optional) HTTP/1.1 features are supported yet, so there
1565 is a chance you might need this action.
1569 >Example usage (section):</DT
1580 >{+downgrade-http-version}
1581 problem-host.example.com</PRE
1596 NAME="FAST-REDIRECTS"
1597 >8.5.7. fast-redirects</A
1602 CLASS="VARIABLELIST"
1608 >Fool some click-tracking scripts and speed up indirect links</P
1614 > Cut off all but the last valid URL from requests.
1635 Many sites, like yahoo.com, don't just link to other sites. Instead, they
1636 will link to some script on their own servers, giving the destination as a
1637 parameter, which will then redirect you to the final target. URLs
1638 resulting from this scheme typically look like:
1641 >http://some.place/click-tracker.cgi?target=http://some.where.else</I
1645 > Sometimes, there are even multiple consecutive redirects encoded in the
1646 URL. These redirections via scripts make your web browsing more traceable,
1647 since the server from which you follow such a link can see where you go
1648 to. Apart from that, valuable bandwidth and time is wasted, while your
1649 browser ask the server for one redirect after the other. Plus, it feeds
1653 > This feature is currently not very smart and is scheduled for improvement.
1654 It is likely to break some sites. You should expect to need possibly
1655 many exceptions to this action, if it is enabled by default in
1659 >. Some sites just don't work without
1675 >{+fast-redirects}</PRE
1696 CLASS="VARIABLELIST"
1702 >Get rid of HTML and JavaScript annoyances, banner advertisements (by size), do fun text replacements, etc.</P
1708 > Text documents, including HTML and JavaScript, to which this action
1709 applies, are filtered on-the-fly through the specified regular expression
1710 based substitutions.
1723 > The name of a filter, as defined in the <A
1724 HREF="filter-file.html"
1734 HREF="config.html#FILTERFILE"
1742 can be completely disabled without the use of parameters.
1749 > For your convenience, there are a number of pre-defined filters available
1750 in the distribution filter file that you can use. See the examples below for
1754 > This is potentially a very powerful feature! But <SPAN
1756 >"rolling your own"</SPAN
1758 filters requires a knowledge of regular expressions and HTML.
1761 > Filtering requires buffering the page content, which may appear to
1762 slow down page rendering since nothing is displayed until all content has
1763 passed the filters. (It does not really take longer, but seems that way
1764 since the page is not incrementally displayed.) This effect will be more
1765 noticeable on slower connections.
1768 > The amount of data that can be filtered is limited to the
1772 HREF="config.html#BUFFER-LIMIT"
1776 option in the main <A
1780 default is 4096 KB (4 Megs). Once this limit is exceeded, the buffered
1781 data, and all pending data, is passed through unfiltered. Inappropriate
1782 MIME types are not filtered.
1785 > At this time, <SPAN
1788 > cannot (yet!) uncompress compressed
1789 documents. If you want filtering to work on all documents, even those that
1790 would normally be sent compressed, use the
1794 HREF="actions-file.html#PREVENT-COMPRESSION"
1795 >prevent-compression</A
1798 action in conjunction with <TT
1804 > Filtering can achieve some of the same effects as the
1808 HREF="actions-file.html#BLOCK"
1812 action, i.e. it can be used to block ads and banners. But the mechanism
1813 works quite differently. One effective use, is to block ad banners
1814 based on their size (see below), since many of these seem to be somewhat
1821 > with suggestions for new or
1822 improved filters is particularly welcome!
1826 >Example usage (with filters from the distribution <TT
1833 NAME="FILTER-HTML-ANNOYANCES"
1844 >+filter{html-annoyances} # Get rid of particularly annoying HTML abuse.</PRE
1852 NAME="FILTER-JS-ANNOYANCES"
1863 >+filter{js-annoyances} # Get rid of particularly annoying JavaScript abuse</PRE
1871 NAME="FILTER-BANNERS-BY-SIZE"
1882 >+filter{banners-by-size} # Kill banners based on their size for this page (<I
1893 NAME="FILTER-BANNERS-BY-LINK"
1904 >+filter{banners-by-link} # Kill banners based on the link they are contained in (experimental)</PRE
1912 NAME="FILTER-IMG-REORDER"
1923 >+filter{img-reorder} # Reorder attributes in <img> tags to make the banners-by-* filters more effective</PRE
1931 NAME="FILTER-CONTENT-COOKIES"
1942 >+filter{content-cookies} # Kill cookies that come sneaking in the HTML or JS content</PRE
1950 NAME="FILTER-POPUPS"
1961 >+filter{popups} # Kill all popups in JS and HTML</PRE
1969 NAME="FILTER-WEBBUGS"
1980 >+filter{webbugs} # Squish WebBugs (1x1 invisible GIFs used for user tracking)</PRE
1999 >+filter{fun} # Text replacements for subversive browsing fun!</PRE
2007 NAME="FILTER-FRAMESET-BORDERS"
2018 >+filter{frameset-borders} # Give frames a border and make them resizeable</PRE
2026 NAME="FILTER-REFRESH-TAGS"
2037 >+filter{refresh-tags} # Kill automatic refresh tags (for dial-on-demand setups)</PRE
2056 >+filter{nimda} # Remove Nimda (virus) code.</PRE
2064 NAME="FILTER-SHOCKWAVE-FLASH"
2075 >+filter{shockwave-flash} # Kill embedded Shockwave Flash objects</PRE
2083 NAME="FILTER-CRUDE-PARENTAL"
2094 >+filter{crude-parental} # Kill all web pages that contain the words "sex" or "warez"</PRE
2102 NAME="FILTER-JS-EVENTS"
2113 >+filter{js-events} # Kill all JS event bindings (<I
2115 >Radically destructive!</I
2116 > Only for extra nasty sites) </PRE
2131 NAME="HANDLE-AS-IMAGE"
2132 >8.5.9. handle-as-image</A
2137 CLASS="VARIABLELIST"
2143 >Mark URLs as belonging to images (so they'll be replaced by images <I
2145 >if they get blocked</I
2152 > This action alone doesn't do anything noticeable. It just marks URLs as images.
2156 HREF="actions-file.html#BLOCK"
2163 the presence or absence of this mark decides whether an HTML <SPAN
2167 page, or a replacement image (as determined by the <TT
2170 HREF="actions-file.html#SET-IMAGE-BLOCKER"
2171 >set-image-blocker</A
2173 > action) will be sent to the
2174 client as a substitute for the blocked content.
2194 > The below generic example section is actually part of <TT
2198 It marks all URLs with well-known image file name extensions as images and should
2202 > Users will probably only want to use the handle-as-image action in conjunction with
2206 HREF="actions-file.html#BLOCK"
2209 >, to block sources of banners, whose URLs don't
2210 reflect the file type, like in the second example section.
2213 > Note that you cannot treat HTML pages as images in most cases. For instance, (in-line) ad
2214 frames require an HTML page to be sent, or they won't display properly.
2217 >handle-as-image</TT
2218 > in this situation will not replace the
2219 ad frame with an image, but lead to error messages.
2223 >Example usage (sections):</DT
2234 ># Generic image extensions:
2237 /.*\.(gif|jpg|jpeg|png|bmp|ico)$
2239 # These don't look like images, but they're banners and should be
2240 # blocked as images:
2242 {+block +handle-as-image}
2243 some.nasty-banner-server.com/junk.cgi?output=trash
2245 # Banner source! Who cares if they also have non-image content?
2246 ad.doubleclick.net </PRE
2261 NAME="HIDE-FORWARDED-FOR-HEADERS"
2262 >8.5.10. hide-forwarded-for-headers</A
2267 CLASS="VARIABLELIST"
2273 >Improve privacy by hiding the true source of the request</P
2279 > Deletes any existing <SPAN
2281 >"X-Forwarded-for:"</SPAN
2282 > HTTP header from client requests,
2283 and prevents adding a new one.
2303 > It is fairly safe to leave this on.
2306 > This action is scheduled for improvement: It should be able to generate forged
2309 >"X-Forwarded-for:"</SPAN
2310 > headers using random IP addresses from a specified network,
2311 to make successive requests from the same client look like requests from a pool of different
2312 users sharing the same proxy.
2327 >+hide-forwarded-for-headers</PRE
2342 NAME="HIDE-FROM-HEADER"
2343 >8.5.11. hide-from-header</A
2348 CLASS="VARIABLELIST"
2354 >Keep your (old and ill) browser from telling web servers your email address</P
2360 > Deletes any existing <SPAN
2363 > HTTP header, or replaces it with the
2380 >, or any user defined value.
2390 > will completely remove the header
2391 (not to be confused with the <TT
2394 HREF="actions-file.html#BLOCK"
2401 > Alternately, you can specify any value you prefer to be sent to the web
2402 server. If you do, it is a matter of fairness not to use any address that
2403 is actually used by a real person.
2406 > This action is rarely needed, as modern web browsers don't send
2425 >+hide-from-header{block}</PRE
2438 >+hide-from-header{spam-me-senseless@sittingduck.example.com}</PRE
2453 NAME="HIDE-REFERRER"
2454 >8.5.12. hide-referrer</A
2462 CLASS="VARIABLELIST"
2468 >Conceal which link you followed to get to a particular site</P
2477 > (sic) HTTP header from the client request,
2478 or replaces it with a forged one.
2498 > to delete the header completely.</P
2505 > to pretend to be coming from the homepage of the server we are talking to.</P
2509 >Any other string to set a user defined referrer.</P
2520 > is the preferred option here, since some servers will
2521 not send images back otherwise, in an attempt to prevent their valuable
2522 content from being embedded elsewhere (and hence, without being surrounded
2533 > is an alternate spelling of
2537 > and the two can be can be freely
2538 substituted with each other. (<SPAN
2542 correct English spelling, however the HTTP specification has a bug - it
2543 requires it to be spelled as <SPAN
2561 >+hide-referrer{forge}</PRE
2574 >+hide-referrer{http://www.yahoo.com/}</PRE
2589 NAME="HIDE-USER-AGENT"
2590 >8.5.13. hide-user-agent</A
2595 CLASS="VARIABLELIST"
2601 >Conceal your type of browser and client operating system</P
2607 > Replaces the value of the <SPAN
2609 >"User-Agent:"</SPAN
2611 in client requests with the specified value.
2624 > Any user-defined string.
2649 > This breaks many web sites that depend on looking at this header in order
2650 to customize their content for different browsers (which, by the
2655 HREF="http://www.javascriptkit.com/javaindex.shtml"
2666 > Using this action in multi-user setups or wherever different types of
2667 browsers will access the same <SPAN
2674 >. In single-user, single-browser
2675 setups, you might use it to delete your OS version information from
2676 the headers, because it is an invitation to exploit known bugs for your
2677 OS. It is also occasionally useful to forge this in order to access
2678 sites that won't let you in otherwise (though there may be a good
2679 reason in some cases). Example of this: some MSN sites will not
2683 > enter, yet forging to a
2687 > user-agent works just fine.
2688 (Must be just a silly MS goof, I'm sure :-).
2691 > This action is scheduled for improvement.
2706 >+hide-user-agent{Netscape 6.1 (X11; I; Linux 2.4.18 i686)}</PRE
2722 >8.5.14. kill-popups<A
2730 CLASS="VARIABLELIST"
2736 >Eliminate those annoying pop-up windows</P
2742 > While loading the document, replace JavaScript code that opens
2743 pop-up windows with (syntactically neutral) dummy code on the fly.
2763 > This action is easily confused with the built-in, hardwired <TT
2766 HREF="actions-file.html#FILTER"
2770 action, but there are important differences: For <TT
2774 the document need not be buffered, so it can be incrementally rendered while
2775 downloading. But <TT
2778 > doesn't catch as many pop-ups as
2782 HREF="actions-file.html#FILTER"
2794 > Think of it as a fast and efficient replacement for a filter that you
2795 can use if you don't want any filtering at all. Note that it doesn't make
2796 sense to combine it with any <TT
2799 HREF="actions-file.html#FILTER"
2803 since as soon as one <TT
2806 HREF="actions-file.html#FILTER"
2810 the whole document needs to be buffered anyway, which destroys the advantage of
2814 > action over its filter equivalent.
2817 > Killing all pop-ups is a dangerous business. Many shops and banks rely on
2818 pop-ups to display forms, shopping carts etc, and killing only the unwanted pop-ups
2819 would require artificial intelligence in <SPAN
2823 If the only kind of pop-ups that you want to kill are exit consoles (those
2827 > windows that appear when you close an other
2828 one), you might want to use
2832 HREF="actions-file.html#FILTER"
2870 NAME="LIMIT-CONNECT"
2871 >8.5.15. limit-connect</A
2876 CLASS="VARIABLELIST"
2882 >Prevent abuse of <SPAN
2885 > as a TCP proxy relay</P
2891 > Specifies to which ports HTTP CONNECT requests are allowable.
2904 > A comma-separated list of ports or port ranges (the latter using dashes, with the minimum
2905 defaulting to 0 and the maximum to 65K).
2912 > By default, i.e. if no <TT
2919 > only allows HTTP CONNECT
2920 requests to port 443 (the standard, secure HTTPS port). Use
2924 > if more fine-grained control is desired
2925 for some or all destinations.
2928 > The CONNECT methods exists in HTTP to allow access to secure websites
2932 > URLs) through proxies. It works very simply:
2933 the proxy connects to the server on the specified port, and then
2934 short-circuits its connections to the client and to the remote server.
2935 This can be a big security hole, since CONNECT-enabled proxies can be
2936 abused as TCP relays very easily.
2939 > If you don't know what any of this means, there probably is no reason to
2940 change this one, since the default is already very restrictive.
2944 >Example usages:</DT
2955 >+limit-connect{443} # This is the default and need not be specified.
2956 +limit-connect{80,443} # Ports 80 and 443 are OK.
2957 +limit-connect{-3, 7, 20-100, 500-} # Ports less than 3, 7, 20 to 100 and above 500 are OK.
2958 +limit-connect{-} # All ports are OK (gaping security hole!)</PRE
2973 NAME="PREVENT-COMPRESSION"
2974 >8.5.16. prevent-compression</A
2979 CLASS="VARIABLELIST"
2985 > Ensure that servers send the content uncompressed, so it can be
2989 HREF="actions-file.html#FILTER"
2999 > Adds a header to the request that asks for uncompressed transfer.
3019 > More and more websites send their content compressed by default, which
3020 is generally a good idea and saves bandwidth. But for the <TT
3023 HREF="actions-file.html#FILTER"
3029 HREF="actions-file.html#DEANIMATE-GIFS"
3036 HREF="actions-file.html#KILL-POPUPS"
3043 > needs access to the uncompressed data.
3044 Unfortunately, <SPAN
3047 > can't yet(!) uncompress, filter, and
3048 re-compress the content on the fly. So if you want to ensure that all websites, including
3049 those that normally compress, can be filtered, you need to use this action.
3052 > This will slow down transfers from those websites, though. If you use any of the above-mentioned
3053 actions, you will typically want to use <TT
3055 >prevent-compression</TT
3060 > Note that some (rare) ill-configured sites don't handle requests for uncompressed
3061 documents correctly (they send an empty document body). If you use <TT
3063 >prevent-compression</TT
3065 per default, you'll have to add exceptions for those sites. See the example for how to do that.
3069 >Example usage (sections):</DT
3082 {+prevent-compression}
3085 # Make exceptions for ill sites:
3087 {-prevent-compression}
3089 www.pclinuxonline.com</PRE
3104 NAME="SEND-VANILLA-WAFER"
3105 >8.5.17. send-vanilla-wafer</A
3110 CLASS="VARIABLELIST"
3116 > Feed log analysis scripts with useless data.
3123 > Sends a cookie with each request stating that you do not accept any copyright
3124 on cookies sent to you, and asking the site operator not to track you.
3144 > The vanilla wafer is a (relatively) unique header and could conceivably be used to track you.
3147 > This action is rarely used and not enabled in the default configuration.
3162 >+send-vanilla-wafer</PRE
3178 >8.5.18. send-wafer</A
3183 CLASS="VARIABLELIST"
3189 > Send custom cookies or feed log analysis scripts with even more useless data.
3196 > Sends a custom, user-defined cookie with each request.
3209 > A string of the form <SPAN
3229 > Being multi-valued, multiple instances of this action can apply to the same request,
3230 resulting in multiple cookies being sent.
3233 > This action is rarely used and not enabled in the default configuration.
3237 >Example usage (section):</DT
3248 >{+send-wafer{UsingPrivoxy=true}}
3249 my-internal-testing-server.void</PRE
3264 NAME="SESSION-COOKIES-ONLY"
3265 >8.5.19. session-cookies-only</A
3270 CLASS="VARIABLELIST"
3276 > Allow only temporary <SPAN
3279 > cookies (for the current browser session <I
3294 >"Set-Cookie:"</SPAN
3296 Most browsers will not store such cookies permanently and forget them in between sessions.
3316 > This is less strict than <TT
3319 HREF="actions-file.html#CRUNCH-INCOMING-COOKIES"
3320 >crunch-incoming-cookies</A
3326 HREF="actions-file.html#CRUNCH-OUTGOING-COOKIES"
3327 >crunch-outgoing-cookies</A
3329 > and allows you to browse
3330 websites that insist or rely on setting cookies, without compromising your privacy too badly.
3333 > Most browsers will not permanently store cookies that have been processed by
3336 >session-cookies-only</TT
3337 > and will forget about them between sessions.
3338 This makes profiling cookies useless, but won't break sites which require cookies so
3339 that you can log in for transactions. This is generally turned on for all
3340 sites, and is the recommended setting.
3348 >session-cookies-only</TT
3353 HREF="actions-file.html#CRUNCH-INCOMING-COOKIES"
3354 >crunch-incoming-cookies</A
3360 HREF="actions-file.html#CRUNCH-OUTGOING-COOKIES"
3361 >crunch-outgoing-cookies</A
3363 >. If you do, cookies
3364 will be plainly killed.
3367 > Note that it is up to the browser how it handles such cookies without an <SPAN
3371 field. If you use an exotic browser, you might want to try it out to be sure.
3386 >+session-cookies-only</PRE
3401 NAME="SET-IMAGE-BLOCKER"
3402 >8.5.20. set-image-blocker</A
3407 CLASS="VARIABLELIST"
3413 >Choose the replacement for blocked images</P
3419 > This action alone doesn't do anything noticeable. If <I
3426 HREF="actions-file.html#BLOCK"
3435 HREF="actions-file.html#HANDLE-AS-IMAGE"
3442 apply, i.e. if the request is to be blocked as an image,
3446 > the parameter of this action decides what will be
3447 sent as a replacement.
3467 > to send a built-in checkerboard pattern image. The image is visually
3468 decent, scales very well, and makes it obvious where banners were busted.
3476 > to send a built-in transparent image. This makes banners disappear
3477 completely, but makes it hard to detect where <SPAN
3481 images on a given page and complicates troubleshooting if <SPAN
3485 has blocked innocent images, like navigation icons.
3499 send a redirect to <TT
3505 to any image anywhere, even in your local filesystem (via <SPAN
3511 > A good application of redirects is to use special <SPAN
3515 URLs, which send the built-in images, as <TT
3521 This has the same visual effect as specifying <SPAN
3528 the first place, but enables your browser to cache the replacement image, instead of requesting
3529 it over and over again.
3538 > The URLs for the built-in images are <SPAN
3540 >"http://config.privoxy.org/send-banner?type=<TT
3561 > There is a third (advanced) type, called <SPAN
3570 >set-image-blocker</TT
3571 >, but meant for use from <A
3572 HREF="filter-file.html"
3575 Auto will select the type of image that would have applied to the referring page, had it been an image.
3593 >+set-image-blocker{pattern}</PRE
3600 > Redirect to the BSD devil:
3611 >+set-image-blocker{http://www.freebsd.org/gifs/dae_up3.gif}</PRE
3618 > Redirect to the built-in pattern for better caching:
3629 >+set-image-blocker{http://config.privoxy.org/send-banner?type=pattern}</PRE
3648 > Note that many of these actions have the potential to cause a page to
3649 misbehave, possibly even not to display at all. There are many ways
3650 a site designer may choose to design his site, and what HTTP header
3651 content, and other criteria, he may depend on. There is no way to have hard
3652 and fast rules for all sites. See the <A
3653 HREF="appendix.html#ACTIONSANAT"
3655 > for a brief example on troubleshooting
3678 >, can be defined by combining other actions.
3679 These can in turn be invoked just like the built-in actions.
3680 Currently, an alias name can contain any character except space, tab,
3695 > that you only use <SPAN
3715 Alias names are not case sensitive, and are not required to start with a
3722 > sign, since they are merely textually
3725 > Aliases can be used throughout the actions file, but they <I
3728 defined in a special section at the top of the file!</I
3730 And there can only be one such section per actions file. Each actions file may
3731 have its own alias section, and the aliases defined in it are only visible
3732 within that file.</P
3734 > There are two main reasons to use aliases: One is to save typing for frequently
3735 used combinations of actions, the other one is a gain in flexibility: If you
3736 decide once how you want to handle shops by defining an alias called
3740 >, you can later change your policy on shops in
3744 > place, and your changes will take effect everywhere
3745 in the actions file where the <SPAN
3748 > alias is used. Calling aliases
3749 by their purpose also makes your actions files more readable.</P
3751 > Currently, there is one big drawback to using aliases, though:
3755 >'s built-in web-based action file
3756 editor honors aliases when reading the actions files, but it expands
3757 them before writing. So the effects of your aliases are of course preserved,
3758 but the aliases themselves are lost when you edit sections that use aliases
3760 This is likely to change in future versions of <SPAN
3765 > Now let's define some aliases...</P
3775 > # Useful custom aliases we can use later.
3777 # Note the (required!) section header line and that this section
3778 # must be at the top of the actions file!
3782 # These aliases just save typing later:
3783 # (Note that some already use other aliases!)
3785 +crunch-all-cookies = +crunch-incoming-cookies +crunch-outgoing-cookies
3786 -crunch-all-cookies = -crunch-incoming-cookies -crunch-outgoing-cookies
3787 block-as-image = +block +handle-as-image
3788 mercy-for-cookies = -crunch-all-cookies -session-cookies-only
3790 # These aliases define combinations of actions
3791 # that are useful for certain types of sites:
3793 fragile = -block -crunch-all-cookies -filter -fast-redirects -hide-referer -kill-popups
3794 shop = -crunch-all-cookies -filter{popups} -kill-popups
3796 # Short names for other aliases, for really lazy people ;-)
3798 c0 = +crunch-all-cookies
3799 c1 = -crunch-all-cookies</PRE
3805 > ...and put them to use. These sections would appear in the lower part of an
3806 actions file and define exceptions to the default actions (as specified further
3820 > # These sites are either very complex or very keen on
3821 # user data and require minimal interference to work:
3824 .office.microsoft.com
3825 .windowsupdate.microsoft.com
3829 # Allow cookies (for setting and retrieving your customer data)
3833 .worldpay.com # for quietpc.com
3836 # These shops require pop-ups:
3838 {shop -kill-popups -filter{popups}}
3840 .overclockers.co.uk</PRE
3846 > Aliases like <SPAN
3852 > are often used for
3856 > sites that require some actions to be disabled
3857 in order to function properly.</P
3865 >8.7. Actions Files Tutorial</A
3868 > The above chapters have shown <A
3869 HREF="actions-file.html"
3870 >which actions files
3871 there are and how they are organized</A
3872 >, how actions are <A
3873 HREF="actions-file.html#ACTIONS"
3876 HREF="actions-file.html#ACTIONS-APPLY"
3880 HREF="actions-file.html#AF-PATTERNS"
3884 HREF="actions-file.html#ALIASES"
3886 >. Now, let's look at an
3894 file and see how all these pieces come together:</P
3901 >8.7.1. default.action</A
3904 >Every config file should start with a short comment stating its purpose:</P
3914 ># Sample default.action file <developers@privoxy.org></PRE
3920 >Then, since this is the <TT
3924 first section is a special section for internal use that you needn't
3925 change or worry about:</P
3935 >##########################################################################
3936 # Settings -- Don't change! For internal Privoxy use ONLY.
3937 ##########################################################################
3940 for-privoxy-version=3.0</PRE
3946 >After that comes the (optional) alias section. We'll use the example
3947 section from the above <A
3948 HREF="actions-file.html#ALIASES"
3949 >chapter on aliases</A
3951 that also explains why and how aliases are used:</P
3961 >##########################################################################
3963 ##########################################################################
3966 # These aliases just save typing later:
3967 # (Note that some already use other aliases!)
3969 +crunch-all-cookies = +crunch-incoming-cookies +crunch-outgoing-cookies
3970 -crunch-all-cookies = -crunch-incoming-cookies -crunch-outgoing-cookies
3971 block-as-image = +block +handle-as-image
3972 mercy-for-cookies = -crunch-all-cookies -session-cookies-only
3974 # These aliases define combinations of actions
3975 # that are useful for certain types of sites:
3977 fragile = -block -crunch-all-cookies -filter -fast-redirects -hide-referer -kill-popups
3978 shop = mercy-for-cookies -filter{popups} -kill-popups</PRE
3984 > Now come the regular sections, i.e. sets of actions, accompanied
3985 by URL patterns to which they apply. Remember <I
3988 are disabled when matching starts</I
3989 >, so we have to explicitly
3990 enable the ones we want.</P
3992 > The first regular section is probably the most important. It has only
4001 HREF="actions-file.html#AF-PATTERNS"
4002 >matches all URLs</A
4004 set of actions used in this <SPAN
4010 be applied to all requests as a start</I
4011 >. It can be partly or
4012 wholly overridden by later matches further down this file, or in user.action,
4013 but it will still be largely responsible for your overall browsing
4016 > Again, at the start of matching, all actions are disabled, so there is
4017 no real need to disable any actions here, but we will do that nonetheless,
4018 to have a complete listing for your reference. (Remember: a <SPAN
4022 preceding the action name enables the action, a <SPAN
4026 Also note how this long line has been made more readable by splitting it into
4027 multiple lines with line continuation.</P
4037 >##########################################################################
4038 # "Defaults" section:
4039 ##########################################################################
4042 HREF="actions-file.html#ADD-HEADER"
4046 HREF="actions-file.html#BLOCK"
4050 HREF="actions-file.html#CRUNCH-INCOMING-COOKIES"
4051 >crunch-incoming-cookies</A
4054 HREF="actions-file.html#CRUNCH-OUTGOING-COOKIES"
4055 >crunch-outgoing-cookies</A
4058 HREF="actions-file.html#DEANIMATE-GIFS"
4062 HREF="actions-file.html#DOWNGRADE-HTTP-VERSION"
4063 >downgrade-http-version</A
4066 HREF="actions-file.html#FAST-REDIRECTS"
4070 HREF="actions-file.html#FILTER-HTML-ANNOYANCES"
4071 >filter{html-annoyances}</A
4074 HREF="actions-file.html#FILTER-JS-ANNOYANCES"
4075 >filter{js-annoyances}</A
4078 HREF="actions-file.html#FILTER-CONTENT-COOKIES"
4079 >filter{content-cookies}</A
4082 HREF="actions-file.html#FILTER-POPUPS"
4086 HREF="actions-file.html#FILTER-WEBBUGS"
4090 HREF="actions-file.html#FILTER-REFRESH-TAGS"
4091 >filter{refresh-tags}</A
4094 HREF="actions-file.html#FILTER-FUN"
4098 HREF="actions-file.html#FILTER-NIMDA"
4102 HREF="actions-file.html#FILTER-BANNERS-BY-SIZE"
4103 >filter{banners-by-size}</A
4106 HREF="actions-file.html#FILTER-BANNERS-BY-LINK"
4107 >filter{banners-by-link}</A
4110 HREF="actions-file.html#FILTER-IMG-REORDER"
4111 >filter{img-reorder}</A
4114 HREF="actions-file.html#FILTER-SHOCKWAVE-FLASH"
4115 >filter{shockwave-flash}</A
4118 HREF="actions-file.html#FILTER-CRUDE-PARENTAL"
4119 >filter{crude-parental}</A
4122 HREF="actions-file.html#FILTER-JS-EVENTS"
4123 >filter{js-events}</A
4126 HREF="actions-file.html#HANDLE-AS-IMAGE"
4130 HREF="actions-file.html#HIDE-FORWARDED-FOR-HEADERS"
4131 >hide-forwarded-for-headers</A
4134 HREF="actions-file.html#HIDE-FROM-HEADER"
4135 >hide-from-header{block}</A
4138 HREF="actions-file.html#HIDE-REFERER"
4139 >hide-referrer{forge}</A
4142 HREF="actions-file.html#HIDE-USER-AGENT"
4146 HREF="actions-file.html#KILL-POPUPS"
4150 HREF="actions-file.html#LIMIT-CONNECT"
4154 HREF="actions-file.html#PREVENT-COMPRESSION"
4155 >prevent-compression</A
4158 HREF="actions-file.html#SEND-VANILLA-WAFER"
4159 >send-vanilla-wafer</A
4162 HREF="actions-file.html#SEND-WAFER"
4166 HREF="actions-file.html#SESSION-COOKIES-ONLY"
4167 >session-cookies-only</A
4170 HREF="actions-file.html#SET-IMAGE-BLOCKER"
4171 >set-image-blocker{pattern}</A
4174 / # forward slash will match *all* potential URL patterns.</PRE
4180 > The default behavior is now set. Note that some actions, like not hiding
4181 the user agent, are part of a <SPAN
4183 >"general policy"</SPAN
4185 universally and won't get any exceptions defined later. Other choices,
4186 like not blocking (which is <I
4190 default!) need exceptions, i.e. we need to specify explicitly what we
4191 want to block in later sections.
4192 We will also want to make exceptions from our general pop-up-killing,
4193 and use our defined aliases for that.</P
4195 > The first of our specialized sections is concerned with <SPAN
4199 sites, i.e. sites that require minimum interference, because they are either
4200 very complex or very keen on tracking you (and have mechanisms in place that
4201 make them unusable for people who avoid being tracked). We will simply use
4205 > alias instead of stating the list
4206 of actions explicitly:</P
4216 >##########################################################################
4217 # Exceptions for sites that'll break under the default action set:
4218 ##########################################################################
4220 # "Fragile" Use a minimum set of actions for these sites (see alias above):
4223 .office.microsoft.com # surprise, surprise!
4224 .windowsupdate.microsoft.com</PRE
4230 > Shopping sites are not as fragile, but they typically
4231 require cookies to log in, and pop-up windows for shopping
4232 carts or item details. Again, we'll use a pre-defined alias:</P
4246 .worldpay.com # for quietpc.com
4254 > Then, there are sites which rely on pop-up windows (yuck!) to work.
4255 Since we made pop-up-killing our default above, we need to make exceptions
4257 HREF="http://www.mozilla.org/"
4261 can turn on smart handling of unwanted pop-ups in their browsers, can
4266 HREF="actions-file.html#FILTER-POPUPS"
4273 HREF="actions-file.html#KILL-POPUPS"
4277 and hence don't need this section. Anyway, disabling an already disabled
4278 action doesn't hurt, so we'll define our exceptions regardless of what was
4279 chosen in the defaults section:</P
4289 ># These sites require pop-ups too :(
4292 HREF="actions-file.html#KILL-POPUPS"
4295 HREF="actions-file.html#FILTER-POPUPS"
4300 .deutsche-bank-24.de</PRE
4309 HREF="actions-file.html#FAST-REDIRECTS"
4313 action, which we enabled per default above, breaks some sites. So disable
4314 it for popular sites where we know it misbehaves:</P
4325 HREF="actions-file.html#FAST-REDIRECTS"
4331 .altavista.com/.*(like|url|link):http
4332 .altavista.com/trans.*urltext=http
4339 > It is important that <SPAN
4343 URLs belong to images, so that <I
4347 be blocked, a substitute image can be sent, rather than an HTML page.
4348 Contacting the remote site to find out is not an option, since it
4349 would destroy the loading time advantage of banner blocking, and it
4350 would feed the advertisers (in terms of money <I
4354 information). We can mark any URL as an image with the <TT
4357 HREF="actions-file.html#HANDLE-AS-IMAGE"
4361 and marking all URLs that end in a known image file extension is a
4372 >##########################################################################
4374 ##########################################################################
4376 # Define which file types will be treated as images, in case they get
4377 # blocked further down this file:
4380 HREF="actions-file.html#HANDLE-AS-IMAGE"
4383 /.*\.(gif|jpe?g|png|bmp|ico)$</PRE
4389 > And then there are known banner sources. They often use scripts to
4390 generate the banners, so it won't be visible from the URL that the
4391 request is for an image. Hence we block them <I
4395 mark them as images in one go, with the help of our
4399 > alias defined above. (We could of
4400 course just as well use <TT
4403 HREF="actions-file.html#BLOCK"
4407 HREF="actions-file.html#HANDLE-AS-IMAGE"
4411 Remember that the type of the replacement image is chosen by the
4415 HREF="actions-file.html#SET-IMAGE-BLOCKER"
4416 >set-image-blocker</A
4419 action. Since all URLs have matched the default section with its
4423 HREF="actions-file.html#SET-IMAGE-BLOCKER"
4424 >set-image-blocker</A
4427 action before, it still applies and needn't be repeated:</P
4437 ># Known ad generators:
4442 .ad.*.doubleclick.net
4443 .a.yimg.com/(?:(?!/i/).)*$
4444 .a[0-9].yimg.com/(?:(?!/i/).)*$
4453 > One of the most important jobs of <SPAN
4457 is to block banners. A huge bunch of them are already <SPAN
4464 HREF="actions-file.html#FILTER"
4466 >{banners-by-size}</TT
4468 action, which we enabled above, and which deletes the references to banner
4469 images from the pages while they are loaded, so the browser doesn't request
4470 them anymore, and hence they don't need to be blocked here. But this naturally
4471 doesn't catch all banners, and some people choose not to use filters, so we
4472 need a comprehensive list of patterns for banner URLs here, and apply the
4476 HREF="actions-file.html#BLOCK"
4479 > action to them.</P
4481 > First comes a bunch of generic patterns, which do most of the work, by
4482 matching typical domain and path name components of banners. Then comes
4483 a list of individual patterns for specific sites, which is omitted here
4484 to keep the example short:</P
4494 >##########################################################################
4495 # Block these fine banners:
4496 ##########################################################################
4498 HREF="actions-file.html#BLOCK"
4508 /.*count(er)?\.(pl|cgi|exe|dll|asp|php[34]?)
4509 /(?:.*/)?(publicite|werbung|rekla(ma|me|am)|annonse|maino(kset|nta|s)?)/
4511 # Site-specific patterns (abbreviated):
4519 > You wouldn't believe how many advertisers actually call their banner
4525 >.com, or call the directory
4526 in which the banners are stored simply <SPAN
4530 generic patterns are surprisingly effective.</P
4532 > But being very generic, they necessarily also catch URLs that we don't want
4533 to block. The pattern <TT
4542 >.nasty-corp.com"</SPAN
4549 >.sourcefroge.net"</SPAN
4556 >l.some-provider.net."</SPAN
4558 well-known exceptions to the <TT
4561 HREF="actions-file.html#BLOCK"
4567 > Note that these are exceptions to exceptions from the default! Consider the URL
4570 >"downloads.sourcefroge.net"</SPAN
4571 >: Initially, all actions are deactivated,
4572 so it wouldn't get blocked. Then comes the defaults section, which matches the
4573 URL, but just deactivates the <TT
4576 HREF="actions-file.html#BLOCK"
4580 action once again. Then it matches <TT
4583 >, an exception to the
4584 general non-blocking policy, and suddenly
4588 HREF="actions-file.html#BLOCK"
4591 > applies. And now, it'll match
4598 HREF="actions-file.html#BLOCK"
4602 applies, so (unless it matches <I
4605 > further down) it ends up
4609 HREF="actions-file.html#BLOCK"
4612 > action applying.</P
4622 >##########################################################################
4623 # Save some innocent victims of the above generic block patterns:
4624 ##########################################################################
4629 HREF="actions-file.html#BLOCK"
4632 adv[io]*. # (for advogato.org and advice.*)
4633 adsl. # (has nothing to do with ads)
4634 ad[ud]*. # (adult.* and add.*)
4635 .edu # (universities don't host banners (yet!))
4636 .*loads. # (downloads, uploads etc)
4644 www.globalintersec.com/adv # (adv = advanced)
4645 www.ugu.com/sui/ugu/adv</PRE
4651 > Filtering source code can have nasty side effects,
4652 so make an exception for our friends at sourceforge.net,
4653 and all paths with <SPAN
4656 > in them. Note that
4660 HREF="actions-file.html#FILTER"
4667 > filters in one fell swoop!</P
4677 ># Don't filter code!
4680 HREF="actions-file.html#FILTER"
4684 .sourceforge.net</PRE
4694 comprehensive, but we hope this example made clear how it works.</P
4702 >8.7.2. user.action</A
4705 > So far we are painting with a broad brush by setting general policies,
4706 which would be a reasonable starting point for many people. Now,
4707 you might want to be more specific and have customized rules that
4708 are more suitable to your personal habits and preferences. These would
4709 be for narrowly defined situations like your ISP or your bank, and should
4713 >, which is parsed after all other
4714 actions files and hence has the last word, over-riding any previously
4715 defined actions. <TT
4722 > place for your personal settings, since
4726 > is actively maintained by the
4730 > developers and you'll probably want
4731 to install updated versions from time to time.</P
4733 > So let's look at a few examples of things that one might typically do in
4747 ># My user.action file. <fred@foobar.com></PRE
4754 HREF="actions-file.html#ALIASES"
4756 > are local to the actions
4757 file that they are defined in, you can't use the ones from
4761 >, unless you repeat them here:</P
4771 ># (Re-)define aliases for this file:
4774 -crunch-all-cookies = -crunch-incoming-cookies -crunch-outgoing-cookies
4775 mercy-for-cookies = -crunch-all-cookies -session-cookies-only
4776 fragile = -block -crunch-all-cookies -filter -fast-redirects -hide-referer -kill-popups
4777 shop = mercy-for-cookies -filter{popups} -kill-popups
4778 allow-ads = -block -filter{banners-by-size} # (see below)</PRE
4785 > Say you have accounts on some sites that you visit regularly, and
4786 you don't want to have to log in manually each time. So you'd like
4787 to allow persistent cookies for these sites. The
4790 >mercy-for-cookies</TT
4791 > alias defined above does exactly
4792 that, i.e. it disables crunching of cookies in any direction, and
4793 processing of cookies to make them temporary.</P
4803 >{ mercy-for-cookies }
4814 > Your bank needs popups and is allergic to some filter, but you don't
4815 know which, so you disable them all:</P
4826 HREF="actions-file.html#FILTER"
4829 HREF="actions-file.html#KILL-POPUPS"
4832 .your-home-banking-site.com</PRE
4838 > While browsing the web with <SPAN
4842 noticed some ads that sneaked through, but you were too lazy to
4843 report them through our fine and easy <A
4847 system, so you have added them here:</P
4858 HREF="actions-file.html#BLOCK"
4861 www.a-popular-site.com/some/unobvious/path
4862 another.popular.site.net/more/junk/here/</PRE
4868 > Note that, assuming the banners in the above example have regular image
4869 extensions (most do),
4873 HREF="actions-file.html#HANDLE-AS-IMAGE"
4877 need not be specified, since all URLs ending in these extensions will
4878 already have been tagged as images in the relevant section of
4884 > Then you noticed that the default configuration breaks Forbes Magazine,
4885 but you were too lazy to find out which action is the culprit, and you
4886 were again too lazy to give <A
4890 you just used the <TT
4893 > alias on the site, and
4894 -- whoa! -- it worked:</P
4911 > You like the <SPAN
4914 > text replacements in <TT
4918 but it is disabled in the distributed actions file. (My colleagues on the team just
4919 don't have a sense of humour, that's why! ;-). So you'd like to turn it on in your private,
4920 update-safe config, once and for all:</P
4931 HREF="actions-file.html#FILTER-FUN"
4934 / # For ALL sites!</PRE
4940 > Note that the above is not really a good idea: There are exceptions
4941 to the filters in <TT
4945 really shouldn't be filtered, like code on CVS->Web interfaces. Since
4949 > has the last word, these exceptions
4950 won't be valid for the <SPAN
4953 > filtering specified here.</P
4955 > Finally, you might think about how your favourite free websites are
4956 funded, and find that they rely on displaying banner advertisements
4957 to survive. So you might want to specifically allow banners for those
4958 sites that you feel provide value to you:</P
4980 > has been aliased to
4984 HREF="actions-file.html#BLOCK"
4991 HREF="actions-file.html#FILTER-BANNERS-BY-SIZE"
4992 >filter{banners-by-size}</A
5030 HREF="filter-file.html"
5039 >The Main Configuration File</TD
5049 >The Filter File</TD