X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=blobdiff_plain;f=doc%2Fsource%2Fuser-manual.sgml;h=ea67d35f29d4e7e6abf3b0b4ef598fb28b5713aa;hp=f50a10bfc073f719f43d79a5a483ca6d49d5805c;hb=b13c15a5b84e9ca8e1477b16951262fb6f4b36ac;hpb=9c113a4c0231441c0005cae73bc9e1cf32a71596 diff --git a/doc/source/user-manual.sgml b/doc/source/user-manual.sgml index f50a10bf..ea67d35f 100644 --- a/doc/source/user-manual.sgml +++ b/doc/source/user-manual.sgml @@ -11,11 +11,11 @@ - - + + - - + + @@ -24,6 +24,7 @@ + Privoxy"> ]> - Copyright &my-copy; 2001 - 2007 by + Copyright &my-copy; 2001-2010 by Privoxy Developers -$Id: user-manual.sgml,v 2.44 2007/11/15 03:30:20 hal9 Exp $ +$Id: user-manual.sgml,v 2.127 2010/11/10 21:48:54 fabiankeil Exp $ @@ -298,32 +299,24 @@ How to install the binary packages depends on your operating system: -Mac OSX - - Unzip the downloaded file (you can either double-click on the file - from the finder, or from the desktop if you downloaded it there). - Then, double-click on the package installer icon named - Privoxy.pkg - and follow the installation process. - Privoxy will be installed in the folder - /Library/Privoxy. - It will start automatically whenever you start up. To prevent it from - starting automatically, remove or rename the folder - /Library/StartupItems/Privoxy. - +Mac OS X - To start Privoxy by hand, double-click on - StartPrivoxy.command in the - /Library/Privoxy folder. - Or, type this command in the Terminal: + Unzip the downloaded file (you can either double-click on the zip file + icon from the Finder, or from the desktop if you downloaded it there). + Then, double-click on the package installer icon and follow the + installation process. - - /Library/Privoxy/StartPrivoxy.command - + The privoxy service will automatically start after a successful + installation (in addition to every time your computer starts up). To + prevent the privoxy service from automatically starting when your + computer starts up, remove or rename the folder named + /Library/StartupItems/Privoxy. - You will be prompted for the administrator password. + To manually start or stop the privoxy service, use the Privoxy Utility + for Mac OS X. This application controls the privoxy service (e.g. + starting and stopping the service as well as uninstalling the software). @@ -366,7 +359,7 @@ How to install the binary packages depends on your operating system: Before installing Privoxy under Gentoo just do - first emerge rsync to get the latest changes from the + first emerge --sync to get the latest changes from the Portage tree. With emerge privoxy you install the latest version. @@ -444,305 +437,487 @@ How to install the binary packages depends on your operating system: What's New in this Release - There are many improvements and new features since Privoxy 3.0.6, the last stable release: + Privoxy 3.0.17 is a stable release. + The changes since 3.0.16 stable are: - - - Two new actions server-header-tagger - and client-header-tagger - that can be used to create arbitrary tags - based on client and server headers. - These tags can then subsequently be used - to control the other actions used for the current request, - greatly increasing &my-app;'s flexibility and selectivity. See tag patterns for more information on tags. - - - - - - Header filtering is done with dedicated header filters now. As a result - the actions filter-client-headers and filter-server-headers - that were introduced with Privoxy 3.0.5 to apply - content filters to the headers have been removed. - See the new actions server-header-filter - and client-header-filter for details. - - - - - There are four new options for the main config file: - - - - - - allow-cgi-request-crunching - which allows requests for Privoxy's internal CGI pages to be - blocked, redirected or (un)trusted like ordinary requests. - - - - - split-large-forms - that will work around a browser bug that caused IE6 and IE7 to - ignore the Submit button on the Privoxy's edit-actions-for-url CGI - page. - - - - - accept-intercepted-requests - which allows to combine Privoxy with any packet filter to create an - intercepting proxy for HTTP/1.1 requests (and for HTTP/1.0 requests - with Host header set). This means clients can be forced to use - &my-app; even if their proxy settings are configured differently. - - - - - templdir - to designate an alternate location for &my-app;'s - locally customized CGI templates so that - these are not overwritten during upgrades. - - - - - - + - A new command line option --pre-chroot-nslookup hostname to - initialize the resolver library before chroot'ing. On some systems this - reduces the number of files that must be copied into the chroot tree. - (Patch provided by Stephen Gildea) + Fixed last-chunk-detection for responses where the content was small + enough to be read with the body, causing Privoxy to wait for the + end of the content until the server closed the connection. + Reported by "Karsten" in #3028326. - - The forward-override action - allows changing of the forwarding settings through the actions files. - Combined with tags, this allows to choose the forwarder based on - client headers like the User-Agent, or the request origin. - + Responses with status code 204 weren't properly detected as body-less + like RFC2616 mandates. Like the previous bug, this caused Privoxy + to wait for the end of the content until the server closed the connection. + Fixes #3022042 and #3025553, reported by a user with no visible name. + Most likely also fixes a bunch of other AJAX-related problem reports + that got closed in the past due to insufficient information and lack + of feedback. + - - The redirect action can now use regular - expression substitutions against the original URL. + Fixed an ACL bug that made it impossible to build a blacklist. + Usually the ACL directives are used in a whitelist, which worked + as expected, but blacklisting is still useful for public proxies + where one only needs to deny known abusers access. - - zlib support is now available as a compile - time option to filter compressed content. Patch provided by Wil Mahan. + Added LOG_LEVEL_RECEIVED to log the not-yet-parsed data read from the + network. This should make debugging various parsing issues a lot easier. - - - Improve various filters, and add new ones. + + + The IPv6 code is enabled by default on Windows versions that support it. + Patch submitted by oCameLo in #2942729. - - - Include support for RFC 3253 so that Subversion works - with &my-app;. Patch provided by Petr Kadlec. + In mingw32 versions, the user.filter file is reachable through the + GUI, just like default.filter is. Feature request 3040263. - - Logging can be completely turned off by not specifying a logfile directive. + Added the configure option --enable-large-file-support to set a few + defines that are required by platforms like GNU/Linux to support files + larger then 2GB. Mainly interesting for users without proper logfile + management. - - - A number of improvements to Privoxy's internal CGI pages, including the - use of favicons for error and control pages. + Logging with "debug 16" no longer stops at the first nul byte which is + pretty useless. Non-printable characters are replaced with their hex value + so the result can't span multiple lines making parsing them harder then + necessary. - - Many bugfixes, memory leaks addressed, code improvements, and logging - improvements. + Privoxy logs when reading an action, filter or trust file. - - - - - - For a more detailed list of changes please have a look at the ChangeLog. - + @@ -758,52 +933,48 @@ How to install the binary packages depends on your operating system: - - Some installers may remove earlier versions completely, including - configuration files. Save any important configuration files! + + The recommended way to upgrade &my-app; is to backup your old + configuration files, install the new ones, verify that &my-app; + is working correctly and finally merge back your changes using + diff and maybe patch. + + + There are a number of new features in each &my-app; release and + most of them have to be explicitly enabled in the configuration + files. Old configuration files obviously don't do that and due + to syntax changes using old configuration files with a new + &my-app; isn't always possible anyway. - On the other hand, other installers may not overwrite any existing configuration - files, thinking you will want to do that. You may want to manually check - your saved files against the newer versions to see if the improvements have - merit, or whether there are new options that you may want to consider. - There are a number of new features, but most won't be available unless - these features are incorporated into your configuration somehow. + Note that some installers remove earlier versions completely, + including configuration files, therefore you should really save + any important configuration files! - standard.action now only includes the enabled actions. - Not all actions as before. + On the other hand, other installers don't overwrite existing configuration + files, thinking you will want to do that yourself. - + + standard.action has been merged into + the default.action file. + + - - Logging is off by default now. If you need logging, it can be turned on - in the config file. - - + + In the default configuration only fatal errors are logged now. + You can change that in the debug section + of the configuration file. You may also want to enable more verbose + logging until you verified that the new &my-app; version is working + as expected. + + @@ -816,18 +987,6 @@ How to install the binary packages depends on your operating system: - - - The filter-client-headers and - filter-server-headers actions that were introduced with - Privoxy 3.0.5 to apply content filters to - the headers have been removed and replaced with new actions. - See the What's New section above. - - - - Windows @@ -1519,21 +1661,34 @@ Example Unix startup command: -Mac OSX +Mac OS X - During installation, Privoxy is configured to - start automatically when the system restarts. To start &my-app; manually, - double-click on the StartPrivoxy.command icon in the - /Library/Privoxy folder. Or, type this command - in the Terminal: + After downloading the privoxy software, unzip the downloaded file by + double-clicking on the zip file icon. Then, double-click on the + installer package icon and follow the installation process. - - /Library/Privoxy/StartPrivoxy.command - + The privoxy service will automatically start after a successful + installation. In addition, the privoxy service will automatically + start every time your computer starts up. - You will be prompted for the administrator password. + To prevent the privoxy service from automatically starting when your + computer starts up, remove or rename the folder named + /Library/StartupItems/Privoxy. + + + A simple application named Privoxy Utility has been created which + enables administrators to easily start and stop the privoxy service. + + + In addition, the Privoxy Utility presents a simple way for + administrators to edit the various privoxy config files. A method + to uninstall the software is also available. + + + An administrator username and password must be supplied in order for + the Privoxy Utility to perform any of the tasks. @@ -1606,11 +1761,9 @@ must find a better place for this paragraph Another feature where you will probably want to define exceptions for trusted - sites is the popup-killing (through the +kill-popups and - +filter{popups} - actions), because your favorite shopping, banking, or leisure site may need + sites is the popup-killing (through +filter{popups}), + because your favorite shopping, banking, or leisure site may need popups (explained below). @@ -1838,8 +1991,8 @@ for details.         ▪  Toggle Privoxy on or off -         ▪  Documentation +         ▪  Documentation @@ -1914,22 +2067,23 @@ for details. - default.action (the main actions file) - is used to define which actions relating to banner-blocking, images, pop-ups, - content modification, cookie handling etc should be applied by default. It also defines many - exceptions (both positive and negative) from this default set of actions that enable - Privoxy to selectively eliminate the junk, and only the junk, on - as many websites as possible. + match-all.action is used to define which actions + relating to banner-blocking, images, pop-ups, content modification, cookie handling + etc should be applied by default. It should be the first actions file loaded. + + + default.action defines many exceptions (both positive and negative) + from the default set of actions that's configured in match-all.action. + It should be the second actions file loaded and shouldn't be edited by the user. Multiple actions files may be defined in config. These are processed in the order they are defined. Local customizations and locally - preferred exceptions to the default policies as defined in - default.action (which you will most probably want - to define sooner or later) are probably best applied in - user.action, where you can preserve them across - upgrades. standard.action is only for - Privoxy's internal use. + preferred exceptions to the default policies as defined in + match-all.action (which you will most probably want + to define sooner or later) are best applied in user.action, + where you can preserve them across upgrades. The file isn't installed by all + installers, but you can easily create it yourself with a text editor. There is also a web based editor that can be accessed from @@ -2023,6 +2177,11 @@ for details. Actions Files + + The actions files are used to define what actions Privoxy takes for which URLs, and thus determines @@ -2038,77 +2197,71 @@ for details. There are three action files included with Privoxy with differing purposes: - - - - - - - default.action - is the primary action file - that sets the initial values for all actions. It is intended to - provide a base level of functionality for - Privoxy's array of features. So it is - a set of broad rules that should work reasonably well as-is for most users. - This is the file that the developers are keeping updated, and making available to users. - The user's preferences as set in standard.action, - e.g. either Cautious (the default), - Medium, or Advanced (see - below). - - - - - user.action - is intended to be for local site - preferences and exceptions. As an example, if your ISP or your bank - has specific requirements, and need special handling, this kind of - thing should go here. This file will not be upgraded. - + + + + + + match-all.action - is used to define which + actions relating to banner-blocking, images, pop-ups, + content modification, cookie handling etc should be applied by default. + It should be the first actions file loaded + - - - standard.action - is used only by the web based editor - at - http://config.privoxy.org/edit-actions-list?f=default, - to set various pre-defined sets of rules for the default actions section - in default.action. - - - Edit Set to Cautious Set to Medium Set to Advanced - - - These have increasing levels of aggressiveness and have no - influence on your browsing unless you select them explicitly in the - editor. A default installation should be pre-set to - Cautious (versions prior to 3.0.5 were set to - Medium). New users should try this for a while before - adjusting the settings to more aggressive levels. The more aggressive - the settings, then the more likelihood there is of problems such as sites - not working as they should. - - - The Edit button allows you to turn each - action on/off individually for fine-tuning. The Cautious - button changes the actions list to low/safe settings which will activate - ad blocking and a minimal set of &my-app;'s features, and subsequently - there will be less of a chance for accidental problems. The - Medium button sets the list to a medium level of - other features and a low level set of privacy features. The - Advanced button sets the list to a high level of - ad blocking and medium level of privacy. See the chart below. The latter - three buttons over-ride any changes via with the - Edit button. More fine-tuning can be done in the - lower sections of this internal page. - - - It is not recommend to edit the standard.action file - itself. - - - The default profiles, and their associated actions, as pre-defined in - standard.action are: - - + + + default.action - defines many exceptions (both + positive and negative) from the default set of actions that's configured + in match-all.action. It is a set of rules that should + work reasonably well as-is for most users. This file is only supposed to + be edited by the developers. It should be the second actions file loaded. + + + + + user.action - is intended to be for local site + preferences and exceptions. As an example, if your ISP or your bank + has specific requirements, and need special handling, this kind of + thing should go here. This file will not be upgraded. + + + + + Edit Set to Cautious Set to Medium Set to Advanced + + + These have increasing levels of aggressiveness and have no + influence on your browsing unless you select them explicitly in the + editor. A default installation should be pre-set to + Cautious. New users should try this for a while before + adjusting the settings to more aggressive levels. The more aggressive + the settings, then the more likelihood there is of problems such as sites + not working as they should. + + + The Edit button allows you to turn each + action on/off individually for fine-tuning. The Cautious + button changes the actions list to low/safe settings which will activate + ad blocking and a minimal set of &my-app;'s features, and subsequently + there will be less of a chance for accidental problems. The + Medium button sets the list to a medium level of + other features and a low level set of privacy features. The + Advanced button sets the list to a high level of + ad blocking and medium level of privacy. See the chart below. The latter + three buttons over-ride any changes via with the + Edit button. More fine-tuning can be done in the + lower sections of this internal page. + + + While the actions file editor allows to enable these settings in all + actions files, they are only supposed to be enabled in the first one + to make sure you don't unintentionally overrule earlier rules. + + + The default profiles, and their associated actions, as pre-defined in + default.action are: + + Default Configurations @@ -2181,7 +2334,6 @@ for details. yes - GIF de-animation no @@ -2189,7 +2341,6 @@ for details. yes - Fast redirects no @@ -2221,7 +2372,7 @@ for details. Image tag reordering no - no + yes yes @@ -2230,9 +2381,9 @@ for details.
-
-
-
+
+ + The list of actions files to be used are defined in the main configuration @@ -2358,7 +2509,7 @@ for details. - { +handle-as-image +block } + { +handle-as-image +block{Banner ads.} } # Block these as if they were images. Send no block page. banners.example.com media.example.com/.*banners @@ -2390,19 +2541,25 @@ for details. Generally, an URL pattern has the form - <domain>/<path>, where both the - <domain> and <path> are - optional. (This is why the special / pattern matches all - URLs). Note that the protocol portion of the URL pattern (e.g. - http://) should not be included in - the pattern. This is assumed already! + <domain><port>/<path>, where the + <domain>, the <port> + and the <path> are optional. (This is why the special + / pattern matches all URLs). Note that the protocol + portion of the URL pattern (e.g. http://) should + not be included in the pattern. This is assumed already! The pattern matching syntax is different for the domain and path parts of the URL. The domain part uses a simple globbing type matching technique, - while the path part uses a more flexible + while the path part uses more flexible Regular - Expressions (PCRE) based syntax. + Expressions (POSIX 1003.2). + + + The port part of a pattern is a decimal port number preceded by a colon + (:). If the domain part contains a numerical IPv6 address, + it has to be put into angle brackets + (<, >). @@ -2427,7 +2584,7 @@ for details. - www.example.com/index.html$ + www.example.com/index.html matches all the documents on www.example.com @@ -2453,6 +2610,32 @@ for details. + + / + + + Matches any URL because there's no requirement for either the + domain or the path to match anything. + + + + + :8000/ + + + Matches any URL pointing to TCP port 8000. + + + + + <2001:db8::1>/ + + + Matches any URL with the host address 2001:db8::1. + (Note that the real URL uses plain brackets, not angle brackets.) + + + index.html @@ -2480,8 +2663,11 @@ for details. .example.com - matches any domain that ENDS in - .example.com + matches any domain with first-level domain com + and second-level domain example. + For example www.example.com, + example.com and foo.bar.baz.example.com. + Note that it wouldn't match if the second-level domain was another-example. @@ -2490,7 +2676,8 @@ for details. matches any domain that STARTS with - www. + www. (It also matches the domain + www but most of the time that doesn't matter.) @@ -2577,20 +2764,16 @@ for details. The Path Pattern - Privoxy uses Perl compatible (PCRE) + Privoxy uses modern POSIX 1003.2 Regular - Expression based syntax - (through the PCRE library) for - matching the path portion (after the slash), and is thus more flexible. + Expressions for matching the path portion (after the slash), + and is thus more flexible. There is an Appendix with a brief quick-start into regular - expressions, and full (very technical) documentation on PCRE regex syntax is available on-line - at http://www.pcre.org/man.txt. - You might also find the Perl man page on regular expressions (man perlre) - useful, which is available on-line at http://perldoc.perl.org/perlre.html. + expressions, you also might want to have a look at your operating system's documentation + on regular expressions (try man re_format). @@ -2784,7 +2967,7 @@ for details. -name # disable action name - Example: +block + Example: +handle-as-image @@ -2918,6 +3101,9 @@ for details. HTTP headers are, you definitely don't need to worry about this one. + + Headers added by this action are not modified by other actions. + @@ -2967,14 +3153,14 @@ for details. Type: - Boolean. + Parameterized. Parameter: - N/A + A block reason that should be given to the user. @@ -2983,14 +3169,10 @@ for details. Privoxy sends a special BLOCKED page - for requests to blocked pages. This page contains links to find out why the request - was blocked, and a click-through to the blocked content (the latter only if compiled with the - force feature enabled). The BLOCKED page adapts to the available - screen space -- it displays full-blown if space allows, or miniaturized and text-only - if loaded into a small frame or window. If you are using Privoxy - right now, you can take a look at the - BLOCKED - page. + for requests to blocked pages. This page contains the block reason given as + parameter, a link to find out why the block action applies, and a click-through + to the blocked content (the latter only if the force feature is available and + enabled). A very important exception occurs if both @@ -3020,18 +3202,18 @@ for details. Example usage (section): - {+block} + {+block{No nasty stuff for you.}} # Block and replace with "blocked" page .nasty-stuff.example.com -{+block +handle-as-image} +{+block{Doubleclick banners.} +handle-as-image} # Block and replace with image .ad.doubleclick.net .ads.r.us/banners/ -{+block +handle-as-empty-document} +{+block{Layered ads.} +handle-as-empty-document} # Block and then ignore - adserver.exampleclick.net/.*\.js$ + adserver.example.net/.*\.js$ @@ -3041,6 +3223,76 @@ for details.
+ + +change-x-forwarded-for + + + + Typical use: + + Improve privacy by not forwarding the source of the request in the HTTP headers. + + + + + Effect: + + + Deletes the X-Forwarded-For: HTTP header from the client request, + or adds a new one. + + + + + + Type: + + + Parameterized. + + + + + Parameter: + + + + block to delete the header. + + + + add to create the header (or append + the client's IP address to an already existing one). + + + + + + + + Notes: + + + It is safe and recommended to use block. + + + Forwarding the source address of the request may make + sense in some multi-user setups but is also a privacy risk. + + + + + Example usage: + + + +change-x-forwarded-for{block} + + + + + + client-header-filter @@ -3096,6 +3348,11 @@ for details. Client-header filters are executed after the other header actions have finished and use their output as input. + + If the request URL gets changed, &my-app; will detect that and use the new + one. This can be used to rewrite the request destination behind the client's + back, for example to specify a Tor exit relay for certain requests. + Please refer to the filter file chapter to learn which client-header filters are available by default, and how to @@ -3110,8 +3367,9 @@ for details. +# Hide Tor exit notation in Host and Referer Headers {+client-header-filter{hide-tor-exit-notation}} -.exit/ +/ @@ -3187,6 +3445,25 @@ for details. # Tag every request with the User-Agent header {+client-header-tagger{user-agent}} / + +# Tagging itself doesn't change the action +# settings, sections with TAG patterns do: +# +# If it's a download agent, use a different forwarding proxy, +# show the real User-Agent and make sure resume works. +{+forward-override{forward-socks5 10.0.0.2:2222 .} \ + -hide-if-modified-since \ + -overwrite-last-modified \ + -hide-user-agent \ + -filter \ + -deanimate-gifs \ +} +TAG:^User-Agent: NetBSD-ftp/ +TAG:^User-Agent: Novell ZYPP Installer +TAG:^User-Agent: RPM APT-HTTP/ +TAG:^User-Agent: fetch libfetch/ +TAG:^User-Agent: Ubuntu APT-HTTP/ +TAG:^User-Agent: MPlayer/ @@ -4014,9 +4291,10 @@ problem-host.example.com Filtering requires buffering the page content, which may appear to slow down page rendering since nothing is displayed until all content has - passed the filters. (It does not really take longer, but seems that way - since the page is not incrementally displayed.) This effect will be more - noticeable on slower connections. + passed the filters. (The total time until the page is completely rendered + doesn't change much, but it may be perceived as slower since the page is + not incrementally displayed.) + This effect will be more noticeable on slower connections. Rolling your own @@ -4083,23 +4361,23 @@ problem-host.example.com - +filter{js-annoyances} # Get rid of particularly annoying JavaScript abuse + +filter{js-annoyances} # Get rid of particularly annoying JavaScript abuse. - +filter{js-events} # Kill all JS event bindings (Radically destructive! Only for extra nasty sites) + +filter{js-events} # Kill all JS event bindings and timers (Radically destructive! Only for extra nasty sites). - +filter{html-annoyances} # Get rid of particularly annoying HTML abuse + +filter{html-annoyances} # Get rid of particularly annoying HTML abuse. - +filter{content-cookies} # Kill cookies that come in the HTML or JS content + +filter{content-cookies} # Kill cookies that come in the HTML or JS content. - +filter{refresh-tags} # Kill automatic refresh tags (for dial-on-demand setups) + +filter{refresh-tags} # Kill automatic refresh tags (for dial-on-demand setups). @@ -4111,43 +4389,43 @@ problem-host.example.com - +filter{img-reorder} # Reorder attributes in <img> tags to make the banners-by-* filters more effective + +filter{img-reorder} # Reorder attributes in <img> tags to make the banners-by-* filters more effective. - +filter{banners-by-size} # Kill banners by size + +filter{banners-by-size} # Kill banners by size. - +filter{banners-by-link} # Kill banners by their links to known clicktrackers + +filter{banners-by-link} # Kill banners by their links to known clicktrackers. - +filter{webbugs} # Squish WebBugs (1x1 invisible GIFs used for user tracking) + +filter{webbugs} # Squish WebBugs (1x1 invisible GIFs used for user tracking). - +filter{tiny-textforms} # Extend those tiny textareas up to 40x80 and kill the hard wrap + +filter{tiny-textforms} # Extend those tiny textareas up to 40x80 and kill the hard wrap. - +filter{jumping-windows} # Prevent windows from resizing and moving themselves + +filter{jumping-windows} # Prevent windows from resizing and moving themselves. - +filter{frameset-borders} # Give frames a border and make them resizeable + +filter{frameset-borders} # Give frames a border and make them resizable. - +filter{demoronizer} # Fix MS's non-standard use of standard charsets + +filter{demoronizer} # Fix MS's non-standard use of standard charsets. - +filter{shockwave-flash} # Kill embedded Shockwave Flash objects + +filter{shockwave-flash} # Kill embedded Shockwave Flash objects. - +filter{quicktime-kioskmode} # Make Quicktime movies savable + +filter{quicktime-kioskmode} # Make Quicktime movies saveable. @@ -4155,35 +4433,35 @@ problem-host.example.com - +filter{crude-parental} # Crude parental filtering (demo only) + +filter{crude-parental} # Crude parental filtering. Note that this filter doesn't work reliably. - +filter{ie-exploits} # Disable a known Internet Explorer bug exploits + +filter{ie-exploits} # Disable some known Internet Explorer bug exploits. - +filter{site-specifics} # Custom filters for specific site related problems + +filter{site-specifics} # Cure for site-specific problems. Don't apply generally! + + + + +filter{no-ping} # Removes non-standard ping attributes in <a> and <area> tags. - +filter{google} # Removes text ads and other Google specific improvements + +filter{google} # CSS-based block for Google text ads. Also removes a width limitation and the toolbar advertisement. - +filter{yahoo} # Removes text ads and other Yahoo specific improvements + +filter{yahoo} # CSS-based block for Yahoo text ads. Also removes a width limitation. - +filter{msn} # Removes text ads and other MSN specific improvements + +filter{msn} # CSS-based block for MSN text ads. Also removes tracking URLs and a width limitation. - +filter{blogspot} # Cleans up Blogspot blogs - - - - +filter{no-ping} # Removes non-standard ping attributes from anchor and area tags + +filter{blogspot} # Cleans up some Blogspot blogs. Read the fine print before using this. @@ -4312,7 +4590,8 @@ new action forward-socks4a 127.0.0.1:9050 . to use the socks4a proxy listening at 127.0.0.1 port 9050. Replace forward-socks4a with forward-socks4 - to use a socks4 connection (with local DNS resolution) instead. + to use a socks4 connection (with local DNS resolution) instead, use forward-socks5 + for socks5 connections (with remote DNS resolution). @@ -4320,7 +4599,8 @@ new action forward-socks4a 127.0.0.1:9050 proxy.example.org:8000 to use the socks4a proxy listening at 127.0.0.1 port 9050 to reach the HTTP proxy listening at proxy.example.org port 8000. Replace forward-socks4a with forward-socks4 to use a socks4 connection - (with local DNS resolution) instead. + (with local DNS resolution) instead, use forward-socks5 + for socks5 connections (with remote DNS resolution). @@ -4331,7 +4611,7 @@ new action Notes: - This action takes parameters similar to the + This action takes parameters similar to the forward directives in the configuration file, but without the URL pattern. It can be used as replacement, but normally it's only used in cases where matching based on the request URL isn't sufficient. @@ -4366,6 +4646,8 @@ new action # This way you can continue to use Tor for your normal browsing, # without overloading the Tor network with your FreeBSD ports updates # or downloads of bigger files like ISOs. +# Note that HTTP headers are easy to fake and therefore their +# values are as (un)trustworthy as your clients and users. {+forward-override{forward .} \ -hide-if-modified-since \ -overwrite-last-modified \ @@ -4447,7 +4729,7 @@ new action # Block all documents on example.org that end with ".js", # but send an empty document instead of the usual HTML message. -{+block +handle-as-empty-document} +{+block{Blocked JavaScript} +handle-as-empty-document} example.org/.*\.js$ @@ -4534,11 +4816,8 @@ example.org/.*\.js$ # These don't look like images, but they're banners and should be # blocked as images: # -{+block +handle-as-image} -some.nasty-banner-server.com/junk.cgi\?output=trash - -# Banner source! Who cares if they also have non-image content? -ad.doubleclick.net +{+block{Nasty banners.} +handle-as-image} +nasty-banner-server.example.com/junk.cgi\?output=trash @@ -4780,8 +5059,8 @@ new action Randomizing the value of the If-Modified-Since: makes - sure it isn't used as a cookie replacement, but you will run into - caching problems if the random range is too high. + it less likely that the server can use the time as a cookie replacement, + but you will run into caching problems if the random range is too high. It is a good idea to only use a small negative value and let @@ -4790,7 +5069,8 @@ new action It is also recommended to use this action together with - crunch-if-none-match. + crunch-if-none-match, + otherwise it's more or less pointless. @@ -4799,8 +5079,8 @@ new action Example usage (section): - # Let the browser revalidate without being tracked across sessions -{ +hide-if-modified-since{-60} \ + # Let the browser revalidate but make tracking based on the time less likely. +{+hide-if-modified-since{-60} \ +overwrite-last-modified{randomize} \ +crunch-if-none-match} / @@ -4811,65 +5091,6 @@ new action - - -hide-forwarded-for-headers - - - Typical use: - - Improve privacy by not embedding the source of the request in the HTTP headers. - - - - - Effect: - - - Deletes any existing X-Forwarded-for: HTTP header from client requests, - and prevents adding a new one. - - - - - - Type: - - - Boolean. - - - - - Parameter: - - - N/A - - - - - - Notes: - - - It is safe to leave this on. - - - - - - Example usage: - - - +hide-forwarded-for-headers - - - - - - - hide-from-header @@ -4934,201 +5155,7 @@ new action +hide-from-header{block} or - +hide-from-header{spam-me-senseless@sittingduck.example.com} - - - - - - - - - -hide-referrer - - - - Typical use: - - Conceal which link you followed to get to a particular site - - - - - Effect: - - - Deletes the Referer: (sic) HTTP header from the client request, - or replaces it with a forged one. - - - - - - Type: - - - Parameterized. - - - - - Parameter: - - - - conditional-block to delete the header completely if the host has changed. - - - - block to delete the header unconditionally. - - - forge to pretend to be coming from the homepage of the server we are talking to. - - - Any other string to set a user defined referrer. - - - - - - - Notes: - - - conditional-block is the only parameter, - that isn't easily detected in the server's log file. If it blocks the - referrer, the request will look like the visitor used a bookmark or - typed in the address directly. - - - Leaving the referrer unmodified for requests on the same host - allows the server owner to see the visitor's click path, - but in most cases she could also get that information by comparing - other parts of the log file: for example the User-Agent if it isn't - a very common one, or the user's IP address if it doesn't change between - different requests. - - - Always blocking the referrer, or using a custom one, can lead to - failures on servers that check the referrer before they answer any - requests, in an attempt to prevent their valuable content from being - embedded or linked to elsewhere. - - - Both conditional-block and forge - will work with referrer checks, as long as content and valid referring page - are on the same host. Most of the time that's the case. - - - hide-referer is an alternate spelling of - hide-referrer and the two can be can be freely - substituted with each other. (referrer is the - correct English spelling, however the HTTP specification has a bug - it - requires it to be spelled as referer.) - - - - - - Example usage: - - - +hide-referrer{forge} or - +hide-referrer{http://www.yahoo.com/} - - - - - - - - - -hide-user-agent - - - - Typical use: - - Conceal your type of browser and client operating system - - - - - Effect: - - - Replaces the value of the User-Agent: HTTP header - in client requests with the specified value. - - - - - - Type: - - - Parameterized. - - - - - Parameter: - - - Any user-defined string. - - - - - - Notes: - - - - This can lead to problems on web sites that depend on looking at this header in - order to customize their content for different browsers (which, by the - way, is NOT the right thing to do: good web sites - work browser-independently). - - - - - Using this action in multi-user setups or wherever different types of - browsers will access the same Privoxy is - not recommended. In single-user, single-browser - setups, you might use it to delete your OS version information from - the headers, because it is an invitation to exploit known bugs for your - OS. It is also occasionally useful to forge this in order to access - sites that won't let you in otherwise (though there may be a good - reason in some cases). Example of this: some MSN sites will not - let Mozilla enter, yet forging to a - Netscape 6.1 user-agent works just fine. - (Must be just a silly MS goof, I'm sure :-). - - - More information on known user-agent strings can be found at - http://www.user-agents.org/ - and - http://en.wikipedia.org/wiki/User_agent. - - - - - - Example usage: - - - +hide-user-agent{Netscape 6.1 (X11; I; Linux 2.4.18 i686)} + +hide-from-header{spam-me-senseless@sittingduck.example.com} @@ -5137,16 +5164,14 @@ new action - -inspect-jpegs - + +hide-referrer + Typical use: - To protect against the MS buffer over-run in JPEG processing + Conceal which link you followed to get to a particular site @@ -5154,7 +5179,8 @@ new action Effect: - Protect against a known exploit + Deletes the Referer: (sic) HTTP header from the client request, + or replaces it with a forged one. @@ -5163,16 +5189,30 @@ new action Type: - Boolean. + Parameterized. Parameter: - - N/A - + + + conditional-block to delete the header completely if the host has changed. + + + conditional-forge to forge the header if the host has changed. + + + block to delete the header unconditionally. + + + forge to pretend to be coming from the homepage of the server we are talking to. + + + Any other string to set a user defined referrer. + + @@ -5180,26 +5220,47 @@ new action Notes: - See Microsoft Security Bulletin MS04-028. JPEG images are one of the most - common image types found across the Internet. The exploit as described can - allow execution of code on the target system, giving an attacker access - to the system in question by merely planting an altered JPEG image, which - would have no obvious indications of what lurks inside. This action - prevents this exploit. + conditional-block is the only parameter, + that isn't easily detected in the server's log file. If it blocks the + referrer, the request will look like the visitor used a bookmark or + typed in the address directly. + + + Leaving the referrer unmodified for requests on the same host + allows the server owner to see the visitor's click path, + but in most cases she could also get that information by comparing + other parts of the log file: for example the User-Agent if it isn't + a very common one, or the user's IP address if it doesn't change between + different requests. - Note that the described exploit is only one of many, - using this action does not mean that you no longer - have to patch the client. + Always blocking the referrer, or using a custom one, can lead to + failures on servers that check the referrer before they answer any + requests, in an attempt to prevent their content from being + embedded or linked to elsewhere. + + + Both conditional-block and forge + will work with referrer checks, as long as content and valid referring page + are on the same host. Most of the time that's the case. + + + hide-referer is an alternate spelling of + hide-referrer and the two can be can be freely + substituted with each other. (referrer is the + correct English spelling, however the HTTP specification has a bug - it + requires it to be spelled as referer.) - Example usage: - +inspect-jpegs + + +hide-referrer{forge} or + +hide-referrer{http://www.yahoo.com/} + @@ -5207,14 +5268,14 @@ new action - -kill-popups<anchor id="kill-popup"> + +hide-user-agent Typical use: - Eliminate those annoying pop-up windows (deprecated) + Try to conceal your type of browser and client operating system @@ -5222,8 +5283,8 @@ new action Effect: - While loading the document, replace JavaScript code that opens - pop-up windows with (syntactically neutral) dummy code on the fly. + Replaces the value of the User-Agent: HTTP header + in client requests with the specified value. @@ -5232,7 +5293,7 @@ new action Type: - Boolean. + Parameterized. @@ -5240,7 +5301,7 @@ new action Parameter: - N/A + Any user-defined string. @@ -5248,57 +5309,42 @@ new action Notes: + + + This can lead to problems on web sites that depend on looking at this header in + order to customize their content for different browsers (which, by the + way, is NOT the right thing to do: good web sites + work browser-independently). + + - This action is basically a built-in, hardwired special-purpose filter - action, but there are important differences: For kill-popups, - the document need not be buffered, so it can be incrementally rendered while - downloading. But kill-popups doesn't catch as many pop-ups as - filter{all-popups} - does and is not as smart as filter{unsolicited-popups} - is. - - - Think of it as a fast and efficient replacement for a filter that you - can use if you don't want any filtering at all. Note that it doesn't make - sense to combine it with any filter action, - since as soon as one filter applies, - the whole document needs to be buffered anyway, which destroys the advantage of - the kill-popups action over its filter equivalent. - - - Killing all pop-ups unconditionally is problematic. Many shops and banks rely on - pop-ups to display forms, shopping carts etc, and the filter{unsolicited-popups} - does a better job of catching only the unwanted ones. - - - If the only kind of pop-ups that you want to kill are exit consoles (those - really nasty windows that appear when you close an other - one), you might want to use - filter{js-annoyances} - instead. - - - This action is most appropriate for browsers that don't have any controls - for unwanted pop-ups. Not recommended for general usage. + Using this action in multi-user setups or wherever different types of + browsers will access the same Privoxy is + not recommended. In single-user, single-browser + setups, you might use it to delete your OS version information from + the headers, because it is an invitation to exploit known bugs for your + OS. It is also occasionally useful to forge this in order to access + sites that won't let you in otherwise (though there may be a good + reason in some cases). Example of this: some MSN sites will not + let Mozilla enter, yet forging to a + Netscape 6.1 user-agent works just fine. + (Must be just a silly MS goof, I'm sure :-). - - - + Example usage: - +kill-popups + + +hide-user-agent{Netscape 6.1 (X11; I; Linux 2.4.18 i686)} + @@ -5349,26 +5395,21 @@ new action By default, i.e. if no limit-connect action applies, - Privoxy only allows HTTP CONNECT - requests to port 443 (the standard, secure HTTPS port). Use - limit-connect if more fine-grained control is desired - for some or all destinations. + Privoxy allows HTTP CONNECT requests to all + ports. Use limit-connect if fine-grained control + is desired for some or all destinations. The CONNECT methods exists in HTTP to allow access to secure websites (https:// URLs) through proxies. It works very simply: the proxy connects to the server on the specified port, and then short-circuits its connections to the client and to the remote server. - This can be a big security hole, since CONNECT-enabled proxies can be - abused as TCP relays very easily. + This means CONNECT-enabled proxies can be used as TCP relays very easily. Privoxy relays HTTPS traffic without seeing the decoded content. Websites can leverage this limitation to circumvent &my-app;'s filters. By specifying an invalid port range you can disable HTTPS entirely. - If you plan to disable SSL by default, consider enabling - treat-forbidden-connects-like-blocks - as well, to be able to quickly create exceptions. @@ -5380,7 +5421,7 @@ new action - +limit-connect{443} # This is the default and need not be specified. + +limit-connect{443} # Port 443 is OK. +limit-connect{80,443} # Ports 80 and 443 are OK. +limit-connect{-3, 7, 20-100, 500-} # Ports less than 3, 7, 20 to 100 and above 500 are OK. +limit-connect{-} # All ports are OK @@ -5438,9 +5479,9 @@ new action More and more websites send their content compressed by default, which is generally a good idea and saves bandwidth. But the filter, deanimate-gifs - and kill-popups actions need - access to the uncompressed data. + linkend="filter">filter and + deanimate-gifs + actions need access to the uncompressed data. When compiled with zlib support (available since &my-app; 3.0.7), content that should be @@ -5560,7 +5601,7 @@ new action reset-to-request-time overwrites the value of the Last-Modified: header with the current time. You could use this option together with - hided-if-modified-since + hide-if-modified-since to further customize your random range. @@ -5625,163 +5666,7 @@ new action Type: - Parameterized - - - - - Parameter: - - - An absolute URL or a single pcrs command. - - - - - - Notes: - - - Requests to which this action applies are answered with a - HTTP redirect to URLs of your choosing. The new URL is - either provided as parameter, or derived by applying a - single pcrs command to the original URL. - - - This action will be ignored if you use it together with - block. - It can be combined with - fast-redirects{check-decoded-url} - to redirect to a decoded version of a rewritten URL. - - - Use this action carefully, make sure not to create redirection loops - and be aware that using your own redirects might make it - possible to fingerprint your requests. - - - - - - Example usages: - - - # Replace example.com's style sheet with another one -{ +redirect{http://localhost/css-replacements/example.com.css} } - example.com/stylesheet\.css - -# Create a short, easy to remember nickname for a favorite site -# (relies on the browser accept and forward invalid URLs to &my-app;) -{ +redirect{http://www.privoxy.org/user-manual/actions-file.html} } - a - -# Always use the expanded view for Undeadly.org articles -# (Note the $ at the end of the URL pattern to make sure -# the request for the rewritten URL isn't redirected as well) -{+redirect{s@$@&mode=expanded@}} -undeadly.org/cgi\?action=article&sid=\d*$ - - - - - - - - - - -send-vanilla-wafer - - - - Typical use: - - - Feed log analysis scripts with useless data. - - - - - - Effect: - - - Sends a cookie with each request stating that you do not accept any copyright - on cookies sent to you, and asking the site operator not to track you. - - - - - - Type: - - - Boolean. - - - - - Parameter: - - - N/A - - - - - - Notes: - - - The vanilla wafer is a (relatively) unique header and could conceivably be used to track you. - - - This action is rarely used and not enabled in the default configuration. - - - - - - Example usage: - - - +send-vanilla-wafer - - - - - - - - - - -send-wafer - - - - Typical use: - - - Send custom cookies or feed log analysis scripts with even more useless data. - - - - - - Effect: - - - Sends a custom, user-defined cookie with each request. - - - - - - Type: - - - Multi-value. + Parameterized @@ -5789,8 +5674,7 @@ undeadly.org/cgi\?action=article&sid=\d*$ Parameter: - A string of the form name=value. + An absolute URL or a single pcrs command. @@ -5799,23 +5683,65 @@ undeadly.org/cgi\?action=article&sid=\d*$ Notes: - Being multi-valued, multiple instances of this action can apply to the same request, - resulting in multiple cookies being sent. + Requests to which this action applies are answered with a + HTTP redirect to URLs of your choosing. The new URL is + either provided as parameter, or derived by applying a + single pcrs command to the original URL. + + + This action will be ignored if you use it together with + block. + It can be combined with + fast-redirects{check-decoded-url} + to redirect to a decoded version of a rewritten URL. + + + Use this action carefully, make sure not to create redirection loops + and be aware that using your own redirects might make it + possible to fingerprint your requests. - This action is rarely used and not enabled in the default configuration. + In case of problems with your redirects, or simply to watch + them working, enable debug 128. + - Example usage (section): + Example usages: - {+send-wafer{UsingPrivoxy=true}} -my-internal-testing-server.void + # Replace example.com's style sheet with another one +{ +redirect{http://localhost/css-replacements/example.com.css} } + example.com/stylesheet\.css + +# Create a short, easy to remember nickname for a favorite site +# (relies on the browser accept and forward invalid URLs to &my-app;) +{ +redirect{http://www.privoxy.org/user-manual/actions-file.html} } + a + +# Always use the expanded view for Undeadly.org articles +# (Note the $ at the end of the URL pattern to make sure +# the request for the rewritten URL isn't redirected as well) +{+redirect{s@$@&mode=expanded@}} +undeadly.org/cgi\?action=article&sid=\d*$ + +# Redirect Google search requests to MSN +{+redirect{s@^http://[^/]*/search\?q=([^&]*).*@http://search.msn.com/results.aspx?q=$1@}} +.google.com/search + +# Redirect MSN search requests to Yahoo +{+redirect{s@^http://[^/]*/results\.aspx\?q=([^&]*).*@http://search.yahoo.com/search?p=$1@}} +search.msn.com//results\.aspx\?q= + +# Redirect remote requests for this manual +# to the local version delivered by Privoxy +{+redirect{s@^http://www@http://config@}} +www.privoxy.org/user-manual/ + @@ -6193,81 +6119,6 @@ example.org/instance-that-is-delivered-as-xml-but-is-not - - -treat-forbidden-connects-like-blocks - - - - Typical use: - - Block forbidden connects with an easy to find error message. - - - - - Effect: - - - If this action is enabled, Privoxy no longer - makes a difference between forbidden connects and ordinary blocks. - - - - - - Type: - - - Boolean - - - - - Parameter: - - N/A - - - - - Notes: - - - By default Privoxy answers - forbidden Connect requests - with a short error message inside the headers. If the browser doesn't display - headers (most don't), you just see an empty page. - - - With this action enabled, Privoxy displays - the message that is used for ordinary blocks instead. If you decide - to make an exception for the page in question, you can do so by - following the See why link. - - - For Connect requests the clients tell - Privoxy which host they are interested - in, but not which document they plan to get later. As a result, the - Go there anyway wouldn't work and is therefore suppressed. - - - - - - Example usage: - - - +treat-forbidden-connects-like-blocks - - - - - - - Summary @@ -6342,15 +6193,15 @@ new action # +crunch-all-cookies = +crunch-incoming-cookies +crunch-outgoing-cookies -crunch-all-cookies = -crunch-incoming-cookies -crunch-outgoing-cookies - +block-as-image = +block +handle-as-image + +block-as-image = +block{Blocked image.} +handle-as-image allow-all-cookies = -crunch-all-cookies -session-cookies-only -filter{content-cookies} # These aliases define combinations of actions # that are useful for certain types of sites: # - fragile = -block -filter -crunch-all-cookies -fast-redirects -hide-referrer -kill-popups -prevent-compression + fragile = -block -filter -crunch-all-cookies -fast-redirects -hide-referrer -prevent-compression - shop = -crunch-all-cookies -filter{all-popups} -kill-popups + shop = -crunch-all-cookies -filter{all-popups} # Short names for other aliases, for really lazy people ;-) # @@ -6385,7 +6236,7 @@ new action # These shops require pop-ups: # - {-kill-popups -filter{all-popups} -filter{unsolicited-popups}} + {-filter{all-popups} -filter{unsolicited-popups}} .dabs.com .overclockers.co.uk @@ -6408,24 +6259,71 @@ hal stop here linkend="actions">specified and applied to URLs, how patterns work, and how to define and use aliases. Now, let's look at an - example default.action and user.action - file and see how all these pieces come together: + example match-all.action, default.action + and user.action file and see how all these pieces come together: + + + +match-all.action + + Remember all actions are disabled when matching starts, + so we have to explicitly enable the ones we want. + + + + While the match-all.action file only contains a + single section, it is probably the most important one. It has only one + pattern, /, but this pattern + matches all URLs. Therefore, the set of + actions used in this default section will + be applied to all requests as a start. It can be partly or + wholly overridden by other actions files like default.action + and user.action, but it will still be largely responsible + for your overall browsing experience. + + + + Again, at the start of matching, all actions are disabled, so there is + no need to disable any actions here. (Remember: a + + preceding the action name enables the action, a - disables!). + Also note how this long line has been made more readable by splitting it into + multiple lines with line continuation. + + + + +{ \ + +change-x-forwarded-for{block} \ + +hide-from-header{block} \ + +set-image-blocker{pattern} \ +} +/ # Match all URLs + + + + + The default behavior is now set. + -default.action + +default.action -Every config file should start with a short comment stating its purpose: + If you aren't a developer, there's no need for you to edit the + default.action file. It is maintained by + the &my-app; developers and if you disagree with some of the + sections, you should overrule them in your user.action. - # Sample default.action file <ijbswa-developers@lists.sourceforge.net> + Understanding the default.action file can + help you with your user.action, though. -Then, since this is the default.action file, the -first section is a special section for internal use that you needn't -change or worry about: + The first section in this file is a special section for internal use + that prevents older &my-app; versions from reading the file: @@ -6433,15 +6331,14 @@ change or worry about: ########################################################################## # Settings -- Don't change! For internal Privoxy use ONLY. ########################################################################## - {{settings}} -for-privoxy-version=3.0 +for-privoxy-version=3.0.11 -After that comes the (optional) alias section. We'll use the example -section from the above chapter on aliases, -that also explains why and how aliases are used: + After that comes the (optional) alias section. We'll use the example + section from the above chapter on aliases, + that also explains why and how aliases are used: @@ -6456,120 +6353,14 @@ that also explains why and how aliases are used: # +crunch-all-cookies = +crunch-incoming-cookies +crunch-outgoing-cookies -crunch-all-cookies = -crunch-incoming-cookies -crunch-outgoing-cookies - +block-as-image = +block +handle-as-image + +block-as-image = +block{Blocked image.} +handle-as-image mercy-for-cookies = -crunch-all-cookies -session-cookies-only -filter{content-cookies} # These aliases define combinations of actions # that are useful for certain types of sites: # - fragile = -block -filter -crunch-all-cookies -fast-redirects -hide-referrer -kill-popups - shop = -crunch-all-cookies -filter{all-popups} -kill-popups - - - - Now come the regular sections, i.e. sets of actions, accompanied - by URL patterns to which they apply. Remember all actions - are disabled when matching starts, so we have to explicitly - enable the ones we want. - - - - The first regular section is probably the most important. It has only - one pattern, /, but this pattern - matches all URLs. Therefore, the - set of actions used in this default section will - be applied to all requests as a start. It can be partly or - wholly overridden by later matches further down this file, or in user.action, - but it will still be largely responsible for your overall browsing - experience. - - - - Again, at the start of matching, all actions are disabled, so there is - no real need to disable any actions here, but we will do that nonetheless, - to have a complete listing for your reference. (Remember: a + - preceding the action name enables the action, a - disables!). - Also note how this long line has been made more readable by splitting it into - multiple lines with line continuation. - - - - -########################################################################## -# "Defaults" section: -########################################################################## - { \ - -add-header \ - -client-header-filter{hide-tor-exit-notation} \ - -block \ - -content-type-overwrite \ - -crunch-client-header \ - -crunch-if-none-match \ - -crunch-incoming-cookies \ - -crunch-server-header \ - -crunch-outgoing-cookies \ - +deanimate-gifs \ - -downgrade-http-version \ - -fast-redirects{check-decoded-url} \ - -filter{js-annoyances} \ - -filter{js-events} \ - +filter{html-annoyances} \ - -filter{content-cookies} \ - +filter{refresh-tags} \ - -filter{unsolicited-popups} \ - -filter{all-popups} \ - -filter{img-reorder} \ - -filter{banners-by-size} \ - -filter{banners-by-link} \ - +filter{webbugs} \ - -filter{tiny-textforms} \ - -filter{jumping-windows} \ - -filter{frameset-borders} \ - -filter{demoronizer} \ - -filter{shockwave-flash} \ - -filter{quicktime-kioskmode} \ - -filter{fun} \ - -filter{crude-parental} \ - +filter{ie-exploits} \ - -filter{google} \ - -filter{yahoo} \ - -filter{msn} \ - -filter{blogspot} \ - -filter{no-ping} \ - -force-text-mode \ - -handle-as-empty-document \ - -handle-as-image \ - -hide-accept-language \ - -hide-content-disposition \ - -hide-if-modified-since \ - +hide-forwarded-for-headers \ - +hide-from-header{block} \ - +hide-referrer{forge} \ - -hide-user-agent \ - -inspect-jpegs \ - -kill-popups \ - -limit-connect \ - +prevent-compression \ - -overwrite-last-modified \ - -redirect \ - -send-vanilla-wafer \ - -send-wafer \ - -server-header-filter{xml-to-html} \ - -server-header-filter{html-to-xml} \ - +session-cookies-only \ - +set-image-blocker{pattern} \ - -treat-forbidden-connects-like-blocks \ - } - / # forward slash will match *all* potential URL patterns. - - - - The default behavior is now set. Note that some actions, like not hiding - the user agent, are part of a general policy that applies - universally and won't get any exceptions defined later. Other choices, - like not blocking (which is understandably the - default!) need exceptions, i.e. we need to specify explicitly what we - want to block in later sections. + fragile = -block -filter -crunch-all-cookies -fast-redirects -hide-referrer + shop = -crunch-all-cookies -filter{all-popups} @@ -6612,37 +6403,10 @@ mail.google.com .scan.co.uk - - The fast-redirects - action, which we enabled per default above, breaks some sites. So disable - it for popular sites where we know it misbehaves: + action, which may have been enabled in match-all.action, + breaks some sites. So disable it for popular sites where we know it misbehaves: @@ -6662,8 +6426,8 @@ edit.*.yahoo.com be blocked, a substitute image can be sent, rather than an HTML page. Contacting the remote site to find out is not an option, since it would destroy the loading time advantage of banner blocking, and it - would feed the advertisers (in terms of money and - information). We can mark any URL as an image with the handle-as-image action, and marking all URLs that end in a known image file extension is a good start: @@ -6734,7 +6498,7 @@ bs*.gsanet.com ########################################################################## # Block these fine banners: ########################################################################## -{ +block } +{ +block{Banner ads.} } # Generic patterns: # @@ -6858,7 +6622,7 @@ wiki. -# My user.action file. <fred@foobar.com> +# My user.action file. <fred@example.com> @@ -6880,14 +6644,14 @@ wiki. +crunch-all-cookies = +crunch-incoming-cookies +crunch-outgoing-cookies -crunch-all-cookies = -crunch-incoming-cookies -crunch-outgoing-cookies allow-all-cookies = -crunch-all-cookies -session-cookies-only - allow-popups = -filter{all-popups} -kill-popups -+block-as-image = +block +handle-as-image + allow-popups = -filter{all-popups} ++block-as-image = +block{Blocked as image.} +handle-as-image -block-as-image = -block # These aliases define combinations of actions that are useful for # certain types of sites: # -fragile = -block -crunch-all-cookies -filter -fast-redirects -hide-referrer -kill-popups +fragile = -block -crunch-all-cookies -filter -fast-redirects -hide-referrer shop = -crunch-all-cookies allow-popups # Allow ads for selected useful free sites: @@ -6951,7 +6715,7 @@ stupid-server.example.com/ seen an ad on your favourite page on example.com that you want to get rid of. You have right-clicked the image, selected copy image location and pasted the URL below while removing the leading http://, into a - { +block } section. Note that { +handle-as-image + { +block{} } section. Note that { +handle-as-image } need not be specified, since all URLs ending in .gif will be tagged as images by the general rules as set in default.action anyway: @@ -6959,9 +6723,9 @@ stupid-server.example.com/ -{ +block } +{ +block{Nasty ads.} } www.example.com/nasty-ads/sponsor\.gif - another.popular.site.net/more/junk/here/ + another.example.net/more/junk/here/ @@ -7007,8 +6771,8 @@ stupid-server.example.com/ You like the fun text replacements in default.filter, - but it is disabled in the distributed actions file. (My colleagues on the team just - don't have a sense of humour, that's why! ;-). So you'd like to turn it on in your private, + but it is disabled in the distributed actions file. + So you'd like to turn it on in your private, update-safe config, once and for all: @@ -7104,7 +6868,7 @@ stupid-server.example.com/ client-header-filter to rewrite headers that are send by the client, and server-header-filter - to rewrite headers that are send by the server, and + to rewrite headers that are send by the server. @@ -7122,15 +6886,14 @@ stupid-server.example.com/ Multiple filter files can be defined through the filterfile config directive. The filters - as supplied by the developers will be found in + as supplied by the developers are located in default.filter. It is recommended that any locally defined or modified filters go in a separately defined file such as user.filter. - - + - Command tasks for content filters are to eliminate common annoyances in + Common tasks for content filters are to eliminate common annoyances in HTML and JavaScript, such as pop-up windows, exit consoles, crippled windows without navigation tools, the infamous <BLINK> tag etc, to suppress images with certain @@ -7139,9 +6902,14 @@ stupid-server.example.com/ - Content filtering works on any text-based document type, including - HTML, JavaScript, CSS etc. (all text/* - MIME types, except text/plain). + Enabled content filters are applied to any content whose + Content Type header is recognised as a sign + of text-based content, with the exception of text/plain. + Use the force-text-mode action + to also filter other content. + + + Substitutions are made at the source level, so if you want to roll your own filters, you should first be familiar with HTML syntax, and, of course, regular expressions. @@ -8576,13 +8344,6 @@ Requests actions. - - - If the +kill-popups - action applies, and it is an HTML or JavaScript document, the popup-code in the - response is filtered on-the-fly as it is received. - - If any +filter action @@ -8700,7 +8461,8 @@ Requests In file: default.action [ View ] [ Edit ] - {+deanimate-gifs {last} + {+change-x-forwarded-for{block} + +deanimate-gifs {last} +fast-redirects {check-decoded-url} +filter {refresh-tags} +filter {img-reorder} @@ -8708,7 +8470,6 @@ Requests +filter {webbugs} +filter {jumping-windows} +filter {ie-exploits} - +hide-forwarded-for-headers +hide-from-header {block} +hide-referrer {forge} +session-cookies-only @@ -8790,6 +8551,7 @@ In file: user.action [ View ] [ Edit ][ View ] [ Edit ] + +set-image-blocker {pattern} @@ -8865,21 +8621,21 @@ In file: user.action [ View ] [ Edit ] - { +block } + { +block{Domains starts with "ad"} } ad*. - { +block } + { +block{Domain contains "ad"} } .ad. - { +block +handle-as-image } + { +block{Doubleclick banner server} +handle-as-image } .[a-vx-z]*.doubleclick.net We'll just show the interesting part here - the explicit matches. It is - matched three different times. Two +block sections, - and a +block +handle-as-image, + matched three different times. Two +block{} sections, + and a +block{} +handle-as-image, which is the expanded form of one of our aliases that had been defined as: +block-as-image. (Aliases are defined in @@ -8894,7 +8650,7 @@ In file: user.action [ View ] [ Edit ]ad.doubleclick.net is done here -- as both a +block + linkend="BLOCK">+block{} and an +handle-as-image. The custom alias +block-as-image just @@ -8915,6 +8671,7 @@ In file: user.action [ View ] [ Edit ][ View ] [ Edit ] @@ -9016,7 +8767,7 @@ In file: user.action [ View ] [ Edit ] - { +block +handle-as-image } + { +block{Path starts with "ads".} +handle-as-image } /ads @@ -9132,6 +8883,273 @@ In file: user.action [ View ] [ Edit ][ View ] [ Edit ][ View ] [ Edit ][ View ] [ Edit ][ View ] [ Edit ]