generated
[privoxy.git] / default.action
1 ######################################################################
2
3 #  File        :  $Source: /cvsroot/ijbswa/current/default.action,v $
4
5 #  $Id: default.action,v 1.27 2002/05/03 04:18:49 morcego Exp $
6 #
7 #  Purpose     :  Default actions file, see
8 #                 http://www.privoxy.org/faq/questions.html#CONFIGFILES
9 #
10 #  Copyright   :  Written by and Copyright
11 #                 Privoxy team. http://www.privoxy.org/
12 #
13 #                 Based on the Internet Junkbuster originally written
14 #                 by and Copyright (C) 1997 Anonymous Coders and
15 #                 Junkbusters Corporation.  http://www.junkbusters.com
16
17 # We value your feedback. However, to provide you with the best support,
18 # please note:
19 #  
20 #  * Use the support forum to get help:
21 #    http://sourceforge.net/tracker/?group_id=11118&atid=211118
22 #  * Submit feedback for this actions file only through our
23 #    actions file feedback script: http://www.privoxy.org/actions
24 #  * Submit bugs only through our bug forum:
25 #    http://sourceforge.net/tracker/?group_id=11118&atid=111118 
26 #    Make sure that the bug has not already been submitted. Please try
27 #    to verify that it is a Privoxy bug, and not a browser or site
28 #    bug first. If you are using your own custom configuration, please
29 #    try the stock configs to see if the problem is a configuration
30 #    related bug. And if not using the latest development snapshot,
31 #    please try the latest one. Or even better, CVS sources.
32 #  * Submit feature requests only through our feature request forum:
33 #    http://sourceforge.net/tracker/?atid=361118&group_id=11118&func=browse
34 #      
35 # For any other issues, feel free to use the mailing lists:
36 # http://sourceforge.net/mail/?group_id=11118
37 #    
38 # Anyone interested in actively participating in development and related
39 # discussions can join the appropriate mailing list here:
40 # http://sourceforge.net/mail/?group_id=11118. Archives are available
41 # here too.
42
43 #############################################################################
44 # Syntax
45 #############################################################################
46
47 # To determine which actions apply to a request, the URL of the request is
48 # compared to all patterns in this file. Every time it matches, the list of
49 # applicable actions for this URL is incrementally updated. You can trace
50 # this process by visiting http://i.j.b/show-url-info
51 #
52 # There are 4 types of lines in this file: comments (like this line),
53 # actions, aliases and patterns, all of which are explained below.
54 #
55 #############################################################################
56 # Pattern Syntax
57 #############################################################################
58
59 # 1. On Domains and Paths
60 # -----------------------
61 #
62 # Generally, a pattern has the form <domain>/<path>, where both the <domain>
63 # and <path> part are optional. If you only specify a domain part, the "/"
64 # can be left out:
65
66 # www.example.com 
67 #   is a domain-only pattern and will match any request to www.yahoo.com
68
69 # www.example.com/
70 #   means exactly the same (but is slightly less efficient)
71
72 # www.example.com/index.html
73 #   matches only the document /index.html on www.example.com
74
75 # /index.html
76 #   matches the document /index.html, regardless of the domain
77
78 # index.html
79 #   matches nothing, since it would be interpreted as a domain name and
80 #   there is no top-level domain called ".html".
81
82 # 2. Domain Syntax
83 # ----------------
84
85 # The matching of the domain part offers some flexible options: If the
86 # domain starts or ends with a dot, it becomes unanchored at that end:
87
88 # www.example.com
89 #   matches only www.example.com
90
91 # .example.com
92 #   matches any domain that ENDS in .example.com
93
94 # www.
95 #   matches any domain that STARTS with www.
96
97 # Additionally, there are wildcards that you can use in the domain names
98 # themselves. They work pretty similar to shell wildcards: "*" stands for
99 # zero or more arbitrary characters, "?" stands for one, and you can define
100 # charachter classes in square brackets and they can be freely mixed:
101
102 # ad*.example.com
103 #   matches adserver.example.com, ads.example.com, etc but not sfads.example.com
104
105 # *ad*.example.com
106 #   matches all of the above
107
108 # .?pix.com
109 #   matches www.ipix.com, pictures.epix.com, a.b.c.d.e.upix.com etc
110
111 # www[1-9a-ez].example.com
112 #   matches www1.example.com, www4.example.com, wwwd.example.com, 
113 #   wwwz.example.com etc, but not wwww.example.com
114
115 # You get the idea?
116
117 # 2. Path Syntax
118 # --------------
119
120 # Paths are specified as regular expressions. A comprehensive discussion of
121 # regular expressions wouldn't fit here, but (FIXME) someone should paste
122 # a concise intro to the regex language here.
123
124 # If Privoxy was compiled with pcre support (default), Perl compatible
125 # regular expressions are used. See the pcre/docs/ direcory or man perlre
126 # (also available on http://www.perldoc.com/perl5.6/pod/perlre.html) for
127 # details.
128
129 # Please note that matching in the path is CASE INSENSITIVE by default, but
130 # you can switch to case sensitive by starting the pattern with the "(?-i)"
131 # switch:
132
133 # www.example.com/(?-i)PaTtErN.*
134 #   will match only documents whose path starts with PaTtErN in exactly this
135 #   capitalization.
136 #
137 # Partially case-sensetive and partially case-insensitive patterns are
138 # possible, but the rules about splitting them up are extremely complex
139 # - see the PCRE documentation for more information.
140
141 #############################################################################
142 # Action Syntax
143 #############################################################################
144 #
145 # There are 3 kinds of action:
146 #
147 # Boolean (e.g. "block"):
148 #   +name  # enable
149 #   -name  # disable
150 #
151 # Parameterized (e.g. "hide-user-agent"):
152 #   +name{param}  # enable and set parameter to "param"
153 #   -name         # disable
154 #
155 # Multi-value (e.g. "add-header", "send-wafer"):
156 #   +name{param}  # enable and add parameter "param"
157 #   -name{param}  # remove the parameter "param"
158 #   -name         # disable totally
159 #
160 # The default (if you don't specify anything in this file) is not to take
161 # any actions - i.e completely disabled, so Privoxy will just be a
162 # normal, non-blocking, non-anonymizing proxy.  You must specifically
163 # enable the privacy and blocking features you need (although the 
164 # provided default actions file will do that for you).
165 #
166 # Later actions always override earlier ones.  For multi-valued actions,
167 # the actions are applied in the order they are specified.
168 #
169 #############################################################################
170 # Valid actions are:
171 #############################################################################
172 #
173 # +add-header{Name: value}
174 #    Adds the specified HTTP header, which is not checked for validity.
175 #    You may specify this many times to specify many headers.
176 #
177 # +block
178 #    Block this URL
179 #
180 # +deanimate-gifs{last}
181 # +deanimate-gifs{first}
182 #    Deanimate all animated GIF images, i.e. reduce them to their last
183 #    frame. This will also shrink the images considerably. (In bytes,
184 #    not pixels!) 
185 #    If the option "first" is given, the first frame of the animation
186 #    is used as the replacement. If "last" is given, the last frame of
187 #    the animation is used instead, which propably makes more sense for
188 #    most banner animations, but also has the risk of not showing the
189 #    entire last frame (if it is only a delta to an earlier frame).
190 #
191 # +downgrade-http-version
192 #    Downgrade HTTP/1.1 client requests to HTTP/1.0 and downgrade the
193 #    responses as well. Use this action for servers that use HTTP/1.1
194 #    protocol features that Privoxy currently can't handle yet.
195 #
196 # +fast-redirects
197 #    Many sites, like yahoo.com, don't just link to other sites.
198 #    Instead, they will link to some script on their own server,
199 #    giving the destination as a parameter, which will then redirect
200 #    you to the final target. 
201 #
202 #    URLs resulting from this scheme typically look like:
203 #    http://some.place/some_script?http://some.where-else
204 #
205 #    Sometimes, there are even multiple consecutive redirects encoded
206 #    in the URL. These redirections via scripts make your web browing
207 #    more traceable, since the server from which you follow such a link
208 #    can see where you go to. Apart from that, valuable bandwidth and
209 #    time is wasted, while your browser aks the server for one redirect
210 #    after the other. Plus, it feeds the advertisers.
211 #
212 #    The +fast-redirects option enables interception of these requests
213 #    by Privoxy, who will cut off all but the last valid URL in the
214 #    request and send a local redirect back to your browser without
215 #    contacting the intermediate sites.
216 #
217 # +filter{name}
218 #    Filter the website through one or more regular expression filters.
219 #    Repeat for multiple filters.
220 #   
221 #    Filters predefined in the supplied re_filterfile include:
222 #
223 #     html-annoyances:  Get rid of particularly annoying HTML abuse
224 #     js-annoyances:    Get rid of particularly annoying JavaScript abuse
225 #     content-cookies:  Kill cookies that come in the HTML or JS content
226 #     popups:           Kill all popups in JS and HTML
227 #     frameset-borders: Give frames a border
228 #     webbugs:          Squish WebBugs (1x1 invisible GIFs used for user tracking)
229 #     refresh-tags:     Kill automatic refresh tags (for dial-on-demand setups)
230 #     fun:              Text replacements  for subversive browsing fun!
231 #     nimda:            Remove Nimda (virus) code.
232 #     banners-by-size:  Kill banners by size (very efficient!)
233 #     shockwave-flash:  Kill embedded Shockwave Flash objects
234 #     crude-parental:   Kill all web pages that contain the words "sex" or "warez"
235 #
236 #
237 # +hide-forwarded-for-headers
238 #    Block any existing X-Forwarded-for header, and do not add a new one.
239 #
240 # +hide-from-header{block}
241 # +hide-from-header{spam@sittingduck.xqq}
242 #    If the browser sends a "From:" header containing your e-mail address, 
243 #    either completely removes the header ("block"), or change it to the
244 #    specified e-mail address.
245 #
246 # +hide-referer{block}
247 # +hide-referer{forge}
248 # +hide-referer{http://nowhere.com}
249 #    Don't send the "Referer:" (sic) header to the web site.  You can
250 #    block it, forge a URL to the same server as the request (which is
251 #    preferred because some sites will not send images otherwise) or
252 #    set it to a constant string.
253 #
254 # +hide-referrer{...}
255 #    Alternative spelling of +hide-referer.  Has the same parameters,
256 #    and can be freely mixed with, "+hide-referer".  ("referrer" is the 
257 #    correct English spelling, however the HTTP specification has a 
258 #    bug - it requires it to be spelt "referer").
259 #
260 # +hide-user-agent{browser-type}
261 #    Change the "User-Agent:" header so web servers can't tell your
262 #    browser type.  (Breaks many web sites).  Specify the user-agent
263 #    value you want - e.g., to pretend to be using Netscape on Linux:
264 #      +hide-user-agent{Mozilla (X11; I; Linux 2.0.32 i586)}
265 #    Or to identify yourself explicitly as a Privoxy user:
266 #      +hide-user-agent{Privoxy/1.0}
267 #    (Don't change the version number from 1.0 - after all, why tell them?)
268 #
269 # +handle-as-image
270 #    Treat this URL as an image.  This only matters if it's also "+block"ed,
271 #    in which case a "blocked" image can be sent rather than a HTML page.
272 #    See +set-image-blocker{} for the control over what is actually sent.
273 #
274 # +set-image-blocker{blank}
275 # +set-image-blocker{pattern}
276 # +set-image-blocker{<URL>} with <url> being any valid image URL
277 #    Decides what to do with URLs that end up tagged with {+block +handle-as-image}.
278 #    There are 4 options:
279 #      * "-set-image-blocker" will send a HTML "blocked" page, usually
280 #         resulting in a "broken image" icon.
281 #      * "+set-image-blocker{blank}" will send a 1x1 transparent image
282 #      * "+set-image-blocker{pattern}" will send a 4x4 grey/white pattern
283 #        which is less intrusive than the logo but easier to recognize
284 #        than the transparent one.
285 #      * "+set-image-blocker{<URL>}" will send a HTTP temporary redirect
286 #        to the specified image URL.
287 #
288 #
289 # +limit-connect{portlist}
290 #   The CONNECT methods exists in HTTP to allow access to secure websites
291 #   (https:// URLs) through proxies. It works very simply: The proxy
292 #   connects to the server on the specified port, and then short-circuits
293 #   its connections to the cliant and to the remote proxy.
294 #   This can be a big security hole, since CONNECT-enabled proxies can
295 #   be abused as TCP relays very easily.
296 #   By default, i.e. in the absence of a +limit-connect action, Privoxy
297 #   will only allow CONNECT requests to port 443, which is the standard port
298 #   for https.
299 #   If you want to allow CONNECT for more ports than that, or want to forbid
300 #   CONNECT altogether, you can specify a comma separated list of ports and port
301 #   ranges (the latter using dashes, with the minimum defaulting to 0 and max to 65K):
302 #
303 #   +limit-connect{443} # This is the default and need no be specified.
304 #   +limit-connect{80,443} # Ports 80 and 443 are OK.
305 #   +limit-connect{-3, 7, 20-100, 500-} # Port less than 3, 7, 20 to 100, and above 500 are OK.
306 #
307 # +prevent-compression
308 #    Prevent the website from compressing the data. Some websites do
309 #    that, which is a problem for Privoxy, since +filter, +kill-popups
310 #    and +gif-deanimate will not work on compressed data. Will slow down
311 #    connections to those websites, though.
312 #
313 # +prevent-keeping-cookies
314 # +session-cookies-only
315 #    If the website sets cookies, make sure they are erased when you exit
316 #    and restart your web browser.  This makes profiling cookies useless,
317 #    but won't break sites which require cookies so that you can log in
318 #    or for transactions.
319 #
320 # +crunch-outgoing-cookies
321 #    Prevent the website from reading cookies
322 #
323 # +crunch-incoming-cookies
324 #    Prevent the website from setting cookies
325 #
326 # +kill-popups
327 #    Filter the website through a built-in filter to disable
328 #    1;''.concat() etc.  The two alternative spellings are
329 #    equivalent.
330 #
331 # +send-vanilla-wafer
332 #    This action only applies if you are using a jarfile.  It sends a
333 #    cookie to every site stating that you do not accept any copyright
334 #    on cookies sent to you, and asking them not to track you.  Of
335 #    course, this is a (relatively) unique header they could use to 
336 #    track you.
337 #
338 # +send-wafer{name=value}
339 #    This allows you to add an arbitrary cookie.  Specify it multiple
340 #    times in order to add several cookies.
341 #
342 #############################################################################
343
344 #############################################################################
345 # Settings -- Don't change.
346 #############################################################################
347 {{settings}}
348 #############################################################################
349 for-privoxy-version=3.0
350
351 #############################################################################
352 # Aliases
353 #############################################################################
354 {{alias}}
355 #############################################################################
356 #
357 # You can define a short form for a list of permissions - e.g., instead
358 # of "-crunch-incoming-cookies -crunch-outgoing-cookies -filter -fast-redirects",
359 # you can just write "shop". This is called an alias.
360 #
361 # Currently, an alias can contain any character except space, tab, '=', '{'
362 # or '}'.
363 # But please use only 'a'-'z', '0'-'9', '+', and '-'.
364 #
365 # Alias names are not case sensitive.
366 #
367 # Aliases beginning with '+' or '-' may be used for system permission names 
368 # in future releases - so try to avoid alias names like this.  (e.g. 
369 # "+crunch-all-cookies" below is not a good name)
370 #
371 # Aliases must be defined before they are used.
372
373
374 # Useful aliases
375 +crunch-all-cookies = +crunch-incoming-cookies +crunch-outgoing-cookies
376 -crunch-all-cookies = -crunch-incoming-cookies -crunch-outgoing-cookies
377 +imageblock      = +block +handle-as-image
378
379 # Fragile sites should have the minimum changes
380 fragile     = -block -deanimate-gifs -fast-redirects -filter -hide-referer -crunch-all-cookies -kill-popups
381
382 # Shops should be allowed to set persistent cookies
383 shop        = -filter -crunch-all-cookies -prevent-keeping-cookies
384
385 # Your favourite blend of filters:
386 #
387 myfilters   = +filter{html-annoyances} +filter{js-annoyances} +filter{popups}\
388               +filter{webbugs} +filter{nimda} +filter{banners-by-size} #+filter{fun}
389 #... etc.  Customize to your heart's content.
390 #############################################################################
391 # Defaults
392 #############################################################################
393 {-add-header \
394  -block \
395  -crunch-incoming-cookies \
396  -crunch-outgoing-cookies \
397  +deanimate-gifs{last} \
398  -downgrade-http-version \
399  -fast-redirects \
400  -filter{popups} \
401  -filter{fun} \
402  -filter{shockwave-flash} \
403  -filter{crude-prental} \
404  +filter{html-annoyances} \
405  +filter{js-annoyances} \
406  +filter{content-cookies} \
407  +filter{webbugs} \
408  +filter{refresh-tags} \
409  +filter{nimda} \
410  +filter{banners-by-size} \
411  -handle-as-image \
412  +hide-forwarded-for-headers \
413  +hide-from-header{block} \
414  +hide-referer{forge} \
415  -hide-user-agent \
416  -kill-popups \
417  -limit-connect \
418  +prevent-compression \
419  -send-vanilla-wafer \
420  -send-wafer \
421  +session-cookies-only \
422  +set-image-blocker{pattern} \
423 }
424 / # Match all URLs
425
426
427 #############################################################################
428 # Needed for automatic feedback evaluation; Please don't delete!
429 #############################################################################
430 {+add-header{X-Actions-File-Version: 1.2} -filter -kill-popups}
431 .privoxy.org
432 .oesterhelt.org/actions
433
434
435 #############################################################################
436 # These sites are very complex and require
437 # minimal interference.
438 #############################################################################
439 {fragile}
440 .office.microsoft.com
441 .windowsupdate.microsoft.com
442
443 #############################################################################
444 # Shopping sites - still want to block ads.
445 #############################################################################
446 {shop}
447 .quietpc.com
448 .worldpay.com   # for quietpc.com
449 .jungle.com
450 .scan.co.uk
451
452 #############################################################################
453 # These shops require pop-ups
454 #############################################################################
455 {shop -no-popups -filter{popups}}
456 .dabs.com
457 .overclockers.co.uk
458
459 #############################################################################
460 # Sometimes fast-redirects catches things by mistake
461 #############################################################################
462 {-fast-redirects}
463 www.ukc.ac.uk/cgi-bin/wac\.cgi\?
464 login.yahoo.com
465 edit.europe.yahoo.com
466 .google.com
467 .altavista.com/.*(like|url|link):http
468 .altavista.com/trans.*urltext=http
469 .speedfind.de
470 .nytimes.com
471
472 #############################################################################
473 # Don't filter code!
474 #############################################################################
475 {-filter}
476 .cvs.sourceforge.net
477
478 #############################################################################
479 # These are images:
480 #############################################################################
481 {+handle-as-image}
482 #############################################################################
483 /.*\.(gif|jpe?g|png|bmp|ico)$
484
485 #############################################################################
486 {+imageblock}
487 #############################################################################
488 #BLOCK-REFERRER: http://www.cnn.com/
489 #BLOCK-REFERRER: http://www.aol.com/
490 ar.atwola.com 
491
492 #BLOCK-REFERRER: http://www.altavista.com/
493 .ad.doubleclick.net
494
495 .a.yimg.com/(?:(?!/i/).)*$
496 .a[0-9].yimg.com/(?:(?!/i/).)*$
497
498 #BLOCK-REFERRER: 
499 bs*.gsanet.com
500 bs*.einets.com
501
502 #BLOCK-REFERRER: Opera browser built-in
503 .qkimg.net
504
505 #BLOCK-REFERRER: http://www.tecchannel.de/index.html
506 #BLOCK-REFERRER: and thousands more
507 ad.*.doubleclick.net
508
509 #############################################################################
510 # Blocklist:
511 #############################################################################
512 {+block}
513 #############################################################################
514 #BLOCK-GENERIC:
515 ad*.
516 .*ads.
517 banner?.
518 count*.
519
520 /(?:.*/)?(ads(erver?|tream)?|.*?ads|adv(ert(s|enties|is(ing|e?ments)?)?)?|(ad)?[-_]?banner(s|ads?|farm)?)/
521 /.*count(er)?\.(pl|cgi|exe|dll|asp|php[34]?)
522 /(?:.*/)?(publicite|werbung|rekla(ma|me|am)|annonse|maino(kset|nta|s)?)/
523
524 #BLOCK-REFERRER: http://www.brooksbrothers.com
525 #BLOCK-REFERRER: http://www.autodesk.com
526 .hitbox.com 
527
528 #############################################################################
529 {-block}
530 #############################################################################
531 include.ebay.com
532 advogato.org
533 adsl.
534 ad[ud]*.
535 advice.
536 .edu
537 .ac.uk
538 .uni-*.de
539 www.ugu.com/sui/ugu/adv
540 .*downloads.
541 # So many download pages being blocked
542 /downloads/
543 # adv for globalintersec means advanced, not advertisement
544 www.globalintersec.com/adv
545 # We all want weather forecast to work
546 banners.wunderground.com/banner/gizmotemp/
547