X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=blobdiff_plain;f=doc%2Fsource%2Fuser-manual.sgml;h=818cc42e6e6f9babf4ddf5ffa90f39f2d88d0daf;hp=30d3b3ec5b28a99538422ec2bacb9308360ac3dc;hb=49c572318ab271afcab1c50b8c6340fc260cf0b5;hpb=37db7e929d9268dcdbe34c6ce87d674e866f8d4e diff --git a/doc/source/user-manual.sgml b/doc/source/user-manual.sgml index 30d3b3ec..818cc42e 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 - 2006 by + Copyright &my-copy; 2001-2009 by Privoxy Developers -$Id: user-manual.sgml,v 2.24 2006/10/03 11:13:54 hal9 Exp $ +$Id: user-manual.sgml,v 2.100 2009/02/19 17:14:11 fabiankeil Exp $ + -Red Hat, SuSE and Conectiva RPMs +Red Hat and Fedora RPMs RPMs can be installed with rpm -Uvh privoxy-&p-version;-1.rpm, @@ -208,7 +211,7 @@ How to install the binary packages depends on your operating system: -Debian +Debian and Ubuntu DEBs can be installed with apt-get install privoxy, and will use /etc/privoxy for the location of @@ -225,7 +228,7 @@ How to install the binary packages depends on your operating system: in the same directory as you installed Privoxy in. - Version 3.0.4 introduced full Windows service + Version 3.0.5 beta introduced full Windows service functionality. On Windows only, the Privoxy program has two new command line arguments to install and uninstall Privoxy as a service. @@ -260,7 +263,7 @@ How to install the binary packages depends on your operating system: -Solaris, NetBSD, FreeBSD, HP-UX +Solaris <!--, NetBSD, HP-UX--> Create a new directory, cd to it, then unzip and @@ -296,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). @@ -335,6 +330,25 @@ How to install the binary packages depends on your operating system: + +FreeBSD + + + Privoxy is part of FreeBSD's Ports Collection, you can build and install + it with cd /usr/ports/www/privoxy; make install clean. + + + If you don't use the ports, you can fetch and install + the package with pkg_add -r privoxy. + + + The port skeleton and the package can also be downloaded from the + File Release + Page, but there's no reason to use them unless you're interested in the + beta releases which are only available there. + + + Gentoo @@ -345,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. @@ -363,7 +377,8 @@ How to install the binary packages depends on your operating system: The most convenient way to obtain the Privoxy sources - is to download the source tarball from our project + is to download the source tarball from our + project download page. @@ -422,197 +437,154 @@ 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 the last Privoxy stable release: + There are only a few improvements and new features since + Privoxy 3.0.10, the last stable release: - Multiple filter files can now be specified in config. This allows for - locally defined filters that can be maintained separately from the filters as - supplied by the developers, i.e. default.filter. + On most platforms, outgoing connections can be kept alive and + reused if the server supports it. Whether or not this improves + things depends on the connection. - - - - There are a number of new actions: - - - - - - - - content-type-overwrite - - - - - crunch-client-header - - - - - crunch-if-none-match - - - - - crunch-server-header - - - - - filter-client-headers - - - - - filter-server-headers - - - - - force-text-mode - - - - - handle-as-empty-document - - - - - hide-accept-language - - - - - hide-content-disposition - - - - - hide-if-modified-since - - - - - inspect-jpegs - - - - - overwrite-last-modified - - - - - redirect - - - - - treat-forbidden-connects-like-blocks - - - - - - - In addition, fast-redirects - has been significantly improved with enhanced syntax. - + - And hide-referrer - has a new option, conditional block. + When dropping privileges, membership in supplementary groups + is given up as well. Not doing that can lead to Privoxy running + with more rights than necessary and violates the principle of + least privilege. Users of the --user option are advised to update. + Thanks to Matthias Drochner for reporting the problem, + providing the initial patch and testing the final version. - - - + - MS-Windows versions can now be - installed and - started as a Windows service. + Passing invalid users or groups with the --user option + didn't lead to program exit. Regression introduced in 3.0.7. - - config has two new options: - enable-remote-http-toggle, - and forwarded-connect-retries. + The match all section has been moved from default.action + to a new file called match-all.action. As a result the + default.action no longer needs to be touched by the user + and can be safely overwritten by updates. + + - And there is improved handling of the user-manual - option, for placing documentation and help files on the local system. + The standard.action file has been removed. Its content + is now part of the default.action file. - - There are six new filters. + In some situations the logged content length was slightly too low. - - Actions files problems and suggestions are now being directed to: - http://sourceforge.net/tracker/?group_id=11118&atid=460288. - Please use this to report such configuration related problems as missed - ads, sites that don't function properly due to one action or another, - innocent images being blocked, etc. + Crunched requests are logged with their own log level. + If you used "debug 1" in the past, you'll probably want + to additionally enable "debug 1024", otherwise only passed + requests will be logged. If you only care about crunched + requests, simply replace "debug 1" with "debug 1024". - - In addition, there are numerous bug fixes and significant enhancements, - including error pages should no longer be cached if the problem is fixed, - much better DNS error handling, and various logging improvements. + The crunch reason has been moved to the beginning of the + crunch message. For HTTP URLs, the protocol is logged as well. - - The default actions setting is now Cautious. Previous - releases had a default setting of Medium. Experienced - users may want to adjust this, as it is fairly conservative by &my-app; - standards and past practices. See - http://config.privoxy.org/edit-actions-list?f=default. New users - should try the default settings for a while before turning up the volume. + Log messages are shortened by printing the thread id on its + own (as opposed to putting it inside the string "Privoxy()"). + + - The default setting has filtering turned off, which - subsequently means that compression is on. Remember - that filtering does not work on compressed pages, so if you use, or want to - use, filtering, you will need to force compression off. Example: + The config option socket-timeout has been added to control + the time Privoxy waits for data to arrive on a socket. + + - - { +filter{google} +prevent-compression } - .google. + Support for remote toggling is controlled by the configure + option --disable-toggle only. In previous versions it also + depended on the action editor and thus configuring with the + --disable-editor option would disable remote toggling support + as well. + + - Or if you use a number of filters, or filter many sites, you may just want - to turn off compression for all sites in - default.action (or - user.action). + Requests with invalid HTTP versions are rejected. + + + + + The template symbol @date@ can be used to include a date(1)-like + time string. Initial patch submitted by Endre Szabo. + + + + + Responses from shoutcast servers are accepted again. + Problem reported and fix suggested by Stefan. + + + + + The hide-forwarded-for-headers action has been replaced with + the change-x-forwarded-for{} action which can also be used to + add X-Forwarded-For headers. The latter functionality already + existed in Privoxy versions prior to 3.0.7 but has been removed + as it was often used unintentionally (by not using the + hide-forwarded-for-headers action). + + + + + A "clear log" view option was added to the mingw32 version + to clear out all of the lines in the Privoxy log window. + Based on a patch submitted by T Ford. + + + + + The mingw32 version uses "critical sections" now, which prevents + log message corruption under load. As a side effect, the + "no thread-safe PRNG" warning could be removed as well. + + + + + The mingw32 version's task bar icon is crossed out and + the color changed to gray if Privoxy is toggled off. - - + + This release marks a departure for Privoxy development. + + + Previously, odd numbered releases were considered beta versions and + were only released at the end of the development cycle when the code + was already believed to be stable. Usually it was, so the stable release + contained pretty much the same code, but got a higher version number. + In the future we intend to release several snapshots between stable releases. + There will probably still be about two stable releases per year, + but hopefully about six snapshots instead of the two betas we have now. + The intentions is to make testing without CVS access easier. + + @@ -626,46 +598,62 @@ How to install the binary packages depends on your operating system: + + + 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. + + - Some installers may remove earlier versions completely, including - configuration files. Save any important configuration files! + Note that some installers remove earlier versions completely, + including configuration files, therefore you should really save + any important configuration files! - 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. + On the other hand, other installers don't overwrite existing configuration + files, thinking you will want to do that yourself. - - See the full documentation on - fast-redirects - which has changed syntax, and will require adjustments to local configs, - such as user.action. You must reference the new - syntax: - - - - { +fast-redirects{check-decoded-url} } - .example.com - mybank.com - .google. - + + standard.action has been merged into + the default.action 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. + + - - The jarfile, - cookie logger, is off by default now. + Three other config file settings are now off by default: + enable-remote-toggle, + enable-remote-http-toggle, + and enable-edit-actions. + If you use or want these, you will need to explicitly enable them, and + be aware of the security issues involved. + + - Some installers may not automatically start Privoxy after installation. +--> + @@ -730,7 +761,8 @@ How to install the binary packages depends on your operating system: by setting the proxy configuration for address of 127.0.0.1 and port 8118. DO NOT activate proxying for FTP or - any protocols besides HTTP and HTTPS (SSL)! It won't work! + any protocols besides HTTP and HTTPS (SSL) unless you intend to prevent your + browser from using these protocols. @@ -748,7 +780,10 @@ How to install the binary packages depends on your operating system: A default installation should provide a reasonable starting point for most. There will undoubtedly be occasions where you will want to adjust the configuration, but that can be dealt with as the need arises. Little - to no initial configuration is required in most cases. + to no initial configuration is required in most cases, you may want + to enable the + web-based action editor though. + Be sure to read the warnings first. See the Configuration section for more @@ -775,6 +810,9 @@ How to install the binary packages depends on your operating system: + @@ -796,7 +835,7 @@ How to install the binary packages depends on your operating system: Now enjoy surfing with enhanced control, comfort and privacy! - + @@ -822,7 +861,8 @@ How to install the binary packages depends on your operating system: First a bit of a warning ... blocking ads is much like blocking SPAM: the more aggressive you are about it, the more likely you are to block - things that were not intended. So there is a trade off here. If you want + things that were not intended. And the more likely that some things + may not work as intended. So there is a trade off here. If you want extreme ad free browsing, be prepared to deal with more problem sites, and to spend more time adjusting the configuration to solve these unintended consequences. In short, there is @@ -860,13 +900,17 @@ How to install the binary packages depends on your operating system: original page's HTML content. An ad image for instance, is just an URL embedded in the page somewhere. The image itself may be on the same server, or a server somewhere else on the Internet. Complex web pages will have many - such embedded URLs. + such embedded URLs. &my-app; can deal with each URL individually, so, for + instance, the main page text is not touched, but images from such-and-such + server are blocked. - The actions we need to know about for ad blocking are: block, handle-as-image, and + linkend="handle-as-image">handle-as-image, + handle-as-empty-document,and set-image-blocker: @@ -875,12 +919,14 @@ How to install the binary packages depends on your operating system: - block - this action stops - any contact between your browser and any URL patterns that match this - action's configuration. It can be used for blocking ads, but also anything - that is determined to be unwanted. By itself, it simply stops any - communication with the remote server and sends Privoxy's - own built-in BLOCKED page instead to let you now what has happened. + block - this is perhaps + the single most used action, and is particularly important for ad blocking. + This action stops any contact between your browser and any URL patterns + that match this action's configuration. It can be used for blocking ads, + but also anything that is determined to be unwanted. By itself, it simply + stops any communication with the remote server and sends + Privoxy's own built-in BLOCKED page instead to + let you now what has happened (with some exceptions, see below). @@ -900,6 +946,15 @@ How to install the binary packages depends on your operating system: + + + handle-as-empty-document - + sends an empty document instead of Privoxy's + normal BLOCKED HTML page. This is useful for file types that are neither + HTML nor images, such as blocking JavaScript files. + + + + + Advanced users will eventually want to explore &my-app; + filters as well. Filters + are very different from blocks. + A block blocks a site, page, or unwanted contented. Filters + are a way of filtering or modifying what is actually on the page. An example + filter usage: a text replacement of no-no for + nasty-word. That is a very simple example. This process can be + used for ad blocking, but it is more in the realm of advanced usage and has + some pitfalls to be wary off. + + The quickest way to adjust any of these settings is with your browser through the special Privoxy editor at http://config.privoxy.org/show-status (shortcut: http://p.p/show-status). This - is an internal page, and does not require Internet access. Select the - appropriate actions file, and click + is an internal page, and does not require Internet access. + + + + Note that as of Privoxy 3.0.7 beta the + action editor is disabled by default. Check the + enable-edit-actions + section in the configuration file to learn why and in which + cases it's safe to enable again. + + + + If you decided to enable the action editor, select the appropriate + actions file, and click Edit. It is best to put personal or local preferences in user.action since this is not meant to be overwritten during upgrades, and will over-ride the settings in @@ -1040,6 +1120,13 @@ How to install the binary packages depends on your operating system: to now go to the Actions Files Tutorial. The ideas explained therein also apply to the web-based editor. + + There are also various + filters that can be used for ad blocking + (filters are a special subset of actions). These + fall into the advanced usage category, and are explained in + depth in later sections. + @@ -1082,11 +1169,20 @@ How to install the binary packages depends on your operating system: - With Firefox, this can be set under: + With Firefox, this is typically set under: - Tools -> Options -> General -> Connection Settings -> Manual Proxy Configuration + Tools -> Options -> Advanced -> Network ->Connection -> Settings + + + + + Or optionally on some platforms: + + + + Edit -> Preferences -> General -> Connection Settings -> Manual Proxy Configuration @@ -1105,7 +1201,7 @@ How to install the binary packages depends on your operating system: - For Internet Explorer v.5-6: + For Internet Explorer v.5-7: @@ -1154,7 +1250,7 @@ How to install the binary packages depends on your operating system: -Red Hat, Fedora and Conectiva +Red Hat and Fedora A default Red Hat installation may not start &my-app; upon boot. It will use the file /etc/privoxy/config as its main configuration @@ -1190,20 +1286,6 @@ How to install the binary packages depends on your operating system: - -SuSE - -We use a script. It will use the file /etc/privoxy/config -as its main configuration file. Note that SuSE starts Privoxy upon booting -your PC. - - - - # rcprivoxy start - - - - Windows @@ -1245,21 +1327,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. @@ -1332,18 +1427,16 @@ 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). - Privoxy is HTTP/1.1 compliant, but not all of - the optional 1.1 features are as yet supported. In the unlikely event that - you experience inexplicable problems with browsers that use HTTP/1.1 per default + Privoxy does not support all of the optional HTTP/1.1 + features yet. In the unlikely event that you experience inexplicable problems + with browsers that use HTTP/1.1 per default (like Mozilla or recent versions of I.E.), you might try to force HTTP/1.0 compatibility. For Mozilla, look under Edit -> Preferences -> Debug -> Networking. @@ -1439,7 +1532,6 @@ must find a better place for this paragraph --pidfile FILE - On startup, write the process ID to FILE. Delete the @@ -1451,7 +1543,6 @@ must find a better place for this paragraph --user USER[.GROUP] - After (optionally) writing the PID file, assume the user ID of @@ -1459,10 +1550,9 @@ must find a better place for this paragraph privileges are not sufficient to do so. Unix only. - + --chroot - Before changing to the user ID given in the --user option, @@ -1472,6 +1562,24 @@ must find a better place for this paragraph Unix only. + + + --pre-chroot-nslookup hostname + + + Specifies a hostname to look up before doing a chroot. On some systems, initializing the + resolver library involves reading config files from /etc and/or loading additional shared + libraries from /lib. On these systems, doing a hostname lookup before the chroot reduces + the number of files that must be copied into the chroot tree. + + + For fastest startup speed, a good value is a hostname that is not in /etc/hosts but that + your local name server (listed in /etc/resolv.conf) can resolve without recursion + (that is, without having to ask any other name servers). The hostname need not exist, + but if it doesn't, an error message (which can be ignored) will be output. + + + configfile @@ -1549,8 +1657,8 @@ for details.         ▪  Toggle Privoxy on or off -         ▪  Documentation +         ▪  Documentation @@ -1578,6 +1686,14 @@ for details. your browser. + + Note that several of the features described above are disabled by default + in Privoxy 3.0.7 beta and later. + Check the + configuration file to learn why + and in which cases it's safe to enable them again. + + @@ -1617,22 +1733,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 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 @@ -1664,12 +1781,9 @@ for details. - The syntax of all configuration files has remained the same throughout the - 3.x series. There have been enhancements, but no changes that would preclude - the use of any configuration file from one version to the next. (There is - one exception: +fast-redirects which - has enhanced syntax and will require updating any local configs from earlier - versions.) + The syntax of the configuration and filter files may change between different + Privoxy versions, unfortunately some enhancements cost backwards compatibility. + @@ -1729,6 +1843,11 @@ for details. Actions Files + + The actions files are used to define what actions Privoxy takes for which URLs, and thus determines @@ -1744,84 +1863,78 @@ 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 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 Configurations - - - - - - + + + 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 + + + + + + Feature Cautious @@ -1887,7 +2000,6 @@ for details. yes - GIF de-animation no @@ -1895,7 +2007,6 @@ for details. yes - Fast redirects no @@ -1927,7 +2038,7 @@ for details. Image tag reordering no - no + yes yes @@ -1936,19 +2047,19 @@ for details.
-
-
-
+
+ +
The list of actions files to be used are defined in the main configuration file, and are processed in the order they are defined (e.g. - default.action is typically process before + default.action is typically processed before user.action). The content of these can all be viewed and edited from http://config.privoxy.org/show-status. The over-riding principle when applying actions, is that the last action that - matches a given URL, wins. The broadest, most general rules go first + matches a given URL wins. The broadest, most general rules go first (defined in default.action), followed by any exceptions (typically also in default.action), which are then followed lastly by any @@ -1967,15 +2078,15 @@ for details. from consulting any previous file). And then below that, exceptions to the defined universal policies. You can regard user.action as an appendix to default.action, - with the advantage that is a separate file, which makes preserving your + with the advantage that it is a separate file, which makes preserving your personal settings across Privoxy upgrades easier. Actions can be used to block anything you want, including ads, banners, or - just some obnoxious URL that you would rather not see. Cookies can be accepted + just some obnoxious URL whose content you would rather not see. Cookies can be accepted or rejected, or accepted only during the current browser session (i.e. not - written to disk), content can be modified, JavaScripts tamed, user-tracking + written to disk), content can be modified, some JavaScripts tamed, user-tracking fooled, and much more. See below for a complete list of actions. @@ -1994,7 +2105,7 @@ for details. will have to make later. If, for example, you want to crunch all cookies per default, you'll have to make exceptions from that rule for sites that you regularly use and that require cookies for actually useful purposes, like maybe - your bank, favorite shop, or newspaper. + your bank, favorite shop, or newspaper.
@@ -2012,12 +2123,15 @@ for details. The easiest way to edit the actions files is with a browser by using our browser-based editor, which can be reached from http://config.privoxy.org/show-status. - The editor allows both fine-grained control over every single feature on a - per-URL basis, and easy choosing from wholesale sets of defaults like - Cautious, Medium or Advanced. - Warning: the Advanced setting is more aggressive, and - will be more likely to cause problems for some sites. Experienced users only! - + Note: the config file option enable-edit-actions must be enabled for + this to work. The editor allows both fine-grained control over every single + feature on a per-URL basis, and easy choosing from wholesale sets of defaults + like Cautious, Medium or + Advanced. Warning: the Advanced setting is more + aggressive, and will be more likely to cause problems for some sites. + Experienced users only! + If you prefer plain text editing to GUIs, you can of course also directly edit the @@ -2029,24 +2143,28 @@ for details. -How Actions are Applied to URLs +How Actions are Applied to Requests Actions files are divided into sections. There are special sections, like the alias sections which will be discussed later. For now let's concentrate on regular sections: They have a heading line (often split up to multiple lines for readability) which consist of a list of actions, separated by whitespace and enclosed in curly braces. - Below that, there is a list of URL patterns, each on a separate line. + Below that, there is a list of URL and tag patterns, each on a separate line. To determine which actions apply to a request, the URL of the request is - compared to all patterns in each action file file. Every time it matches, the list of - applicable actions for the URL is incrementally updated, using the heading - of the section in which the pattern is located. If multiple matches for - the same URL set the same action differently, the last match wins. If not, - the effects are aggregated. E.g. a URL might match a regular section with - a heading line of { + compared to all URL patterns in each action file. + Every time it matches, the list of applicable actions for the request is + incrementally updated, using the heading of the section in which the + pattern is located. The same is done again for tags and tag patterns later on. + + + + If multiple applying sections set the same action differently, + the last match wins. If not, the effects are aggregated. + E.g. a URL might match a regular section with a heading line of { +handle-as-image }, then later another one with just { +block }, resulting @@ -2057,7 +2175,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 @@ -2065,7 +2183,7 @@ for details. - You can trace this process for any given URL by visiting http://config.privoxy.org/show-url-info. @@ -2088,7 +2206,7 @@ for details. - Generally, a Privoxy pattern has the form + 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 @@ -2099,9 +2217,9 @@ for details. 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). @@ -2127,6 +2245,15 @@ for details. www.example.com/index.html + + + matches all the documents on www.example.com + whose name starts with /index.html. + + + + + www.example.com/index.html$ matches only the single document /index.html @@ -2135,7 +2262,7 @@ for details. - /index.html + /index.html$ matches the document /index.html, regardless of the domain, @@ -2147,7 +2274,7 @@ for details. index.html - matches nothing, since it would be interpreted as a domain name and + matches nothing, since it would be interpreted as a domain name and there is no top-level domain called .html. So its a mistake. @@ -2170,8 +2297,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. @@ -2180,7 +2310,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.) @@ -2255,7 +2386,7 @@ for details. - While flexibile, this is not the sophistication of full regular expression based syntax. + While flexible, this is not the sophistication of full regular expression based syntax.
@@ -2267,20 +2398,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). @@ -2309,7 +2436,7 @@ for details. - .example.com/.*/index.html + .example.com/.*/index.html$ Will match any page in the domain of example.com that is @@ -2324,7 +2451,7 @@ for details. - .example.com/(.*/)?index\.html + .example.com/(.*/)?index\.html$ This regular expression is conditional so it will match any page @@ -2364,6 +2491,69 @@ for details. + + + + +The Tag Pattern + + + Tag patterns are used to change the applying actions based on the + request's tags. Tags can be created with either the + client-header-tagger + or the server-header-tagger action. + + + + Tag patterns have to start with TAG:, so &my-app; + can tell them apart from URL patterns. Everything after the colon + including white space, is interpreted as a regular expression with + path pattern syntax, except that tag patterns aren't left-anchored + automatically (&my-app; doesn't silently add a ^, + you have to do it yourself if you need it). + + + + To match all requests that are tagged with foo + your pattern line should be TAG:^foo$, + TAG:foo would work as well, but it would also + match requests whose tags contain foo somewhere. + TAG: foo wouldn't work as it requires white space. + + + + Sections can contain URL and tag patterns at the same time, + but tag patterns are checked after the URL patterns and thus + always overrule them, even if they are located before the URL patterns. + + + + Once a new tag is added, Privoxy checks right away if it's matched by one + of the tag patterns and updates the action settings accordingly. As a result + tags can be used to activate other tagger actions, as long as these other + taggers look for headers that haven't already be parsed. + + + + For example you could tag client requests which use the + POST method, + then use this tag to activate another tagger that adds a tag if cookies + are sent, and then use a block action based on the cookie tag. This allows + the outcome of one action, to be input into a subsequent action. However if + you'd reverse the position of the described taggers, and activated the + method tagger based on the cookie tagger, no method tags would be created. + The method tagger would look for the request line, but at the time + the cookie tag is created, the request line has already been parsed. + + + + While this is a limitation you should be aware of, this kind of + indirection is seldom needed anyway and even the example doesn't + make too much sense. + + + + @@ -2411,7 +2601,7 @@ for details. -name # disable action name - Example: +block + Example: +handle-as-image @@ -2432,7 +2622,7 @@ for details. the last match wins, i.e. the params from earlier matches are simply ignored. - Example: +hide-user-agent{ Mozilla 1.0 } + Example: +hide-user-agent{Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.8.1.4) Gecko/20070602 Firefox/2.0.0.4} @@ -2464,14 +2654,14 @@ for details. If nothing is specified in any actions file, no actions are taken. So in this case Privoxy would just be a - normal, non-blocking, non-anonymizing proxy. You must specifically enable the + normal, non-blocking, non-filtering proxy. You must specifically enable the privacy and blocking features you need (although the provided default actions files will give a good starting point). - Later defined actions always over-ride earlier ones. So exceptions - to any rules you make, should come in the latter part of the file (or + Later defined action sections always over-ride earlier ones of the same type. + So exceptions to any rules you make, should come in the latter part of the file (or in a file that is processed later when using multiple actions files such as user.action). For multi-valued actions, the actions are applied in the order they are specified. Actions files are processed in @@ -2594,14 +2784,14 @@ for details. Type: - Boolean. + Parameterized. Parameter: - N/A + A block reason that should be given to the user. @@ -2610,14 +2800,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 @@ -2647,18 +2833,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$ @@ -2669,17 +2855,14 @@ for details. - - -content-type-overwrite + +change-x-forwarded-for Typical use: - Stop useless download menus from popping up, or change the browser's rendering mode + Improve privacy by not forwarding the source of the request in the HTTP headers. @@ -2687,7 +2870,8 @@ new action Effect: - Replaces the Content-Type: HTTP server header. + Deletes the X-Forwarded-For: HTTP header from the client request, + or adds a new one. @@ -2703,9 +2887,17 @@ new action Parameter: - - Any string. - + + + block to delete the header. + + + + add to create the header (or append + the client's IP address to an already existing one). + + + @@ -2713,86 +2905,36 @@ new action Notes: - The Content-Type: HTTP server header is used by the - browser to decide what to do with the document. The value of this - header can cause the browser to open a download menu instead of - displaying the document by itself, even if the document's format is - supported by the browser. - - - The declared content type can also affect which rendering mode - the browser chooses. If XHTML is delivered as text/html, - many browsers treat it as yet another broken HTML document. - If it is send as application/xml, browsers with - XHTML support will only display it, if the syntax is correct. - - - If you see a web site that proudly uses XHTML buttons, but sets - Content-Type: text/html, you can use &my-app; - to overwrite it with application/xml and validate - the web master's claim inside your XHTML-supporting browser. - If the syntax is incorrect, the browser will complain loudly. - - - You can also go the opposite direction: if your browser prints - error messages instead of rendering a document falsely declared - as XHTML, you can overwrite the content type with - text/html and have it rendered as broken HTML document. - - - By default content-type-overwrite only replaces - Content-Type: headers that look like some kind of text. - If you want to overwrite it unconditionally, you have to combine it with - force-text-mode. - This limitation exists for a reason, think twice before circumventing it. - - - Most of the time it's easier to enable - filter-server-headers - and replace this action with a custom regular expression. It allows you - to activate it for every document of a certain site and it will still - only replace the content types you aimed at. + It is safe and recommended to use block. - Of course you can apply content-type-overwrite - to a whole site and then make URL based exceptions, but it's a lot - more work to get the same precision. + Forwarding the source address of the request may make + sense in some multi-user setups but is also a privacy risk. - - Example usage (sections): + Example usage: - # Check if www.example.net/ really uses valid XHTML -{+content-type-overwrite {application/xml}} -www.example.net/ - -# but leave the content type unmodified if the URL looks like a style sheet -{-content-type-overwrite} -www.example.net/*.\.css$ -www.example.net/*.style - + +change-x-forwarded-for{block} - - - -crunch-client-header + +client-header-filter Typical use: - Remove a client header Privoxy has no dedicated action for. + + Rewrite or remove single client headers. + @@ -2800,14 +2942,15 @@ new action Effect: - Deletes every header sent by the client that contains the string the user supplied as parameter. + All client headers to which this action applies are filtered on-the-fly through + the specified regular expression based substitutions. Type: - + Parameterized. @@ -2817,8 +2960,9 @@ new action Parameter: - Any string. - + The name of a client-header filter, as defined in one of the + filter files. + @@ -2826,28 +2970,26 @@ new action Notes: - This action allows you to block client headers for which no dedicated - Privoxy action exists. - Privoxy will remove every client header that - contains the string you supplied as parameter. + Client-header filters are applied to each header on its own, not to + all at once. This makes it easier to diagnose problems, but on the downside + you can't write filters that only change header x if header y's value is z. + You can do that by using tags though. - Regular expressions are not supported and you can't - use this action to block different headers in the same request, unless - they contain the same string. + Client-header filters are executed after the other header actions have finished + and use their output as input. - crunch-client-header is only meant for quick tests. - If you have to block several different headers, or only want to modify - parts of them, you should enable - filter-client-headers - and create your own filter. + 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. - - - Don't block any header without understanding the consequences. - - + + Please refer to the filter file chapter + to learn which client-header filters are available by default, and how to + create your own. + + @@ -2855,28 +2997,30 @@ new action Example usage (section): - # Block the non-existent "Privacy-Violation:" client header -{+crunch-client-header {Privacy-Violation:}} + +# Hide Tor exit notation in Host and Referer Headers +{+client-header-filter{hide-tor-exit-notation}} / - + +
- -crunch-if-none-match - + +client-header-tagger + Typical use: - Prevent yet another way to track the user's steps between sessions. + + Block requests based on their headers. + @@ -2884,16 +3028,18 @@ new action Effect: - Deletes the If-None-Match: HTTP client header. + Client headers to which this action applies are filtered on-the-fly through + the specified regular expression based substitutions, the result is used as + tag. Type: - + - Boolean. + Parameterized. @@ -2901,8 +3047,9 @@ new action Parameter: - N/A - + The name of a client-header tagger, as defined in one of the + filter files. + @@ -2910,56 +3057,62 @@ new action Notes: - Removing the If-None-Match: HTTP client header - is useful for filter testing, where you want to force a real - reload instead of getting status code 304 which - would cause the browser to use a cached copy of the page. - - - It is also useful to make sure the header isn't used as a cookie - replacement. - - - Blocking the If-None-Match: header shouldn't cause any - caching problems, as long as the If-Modified-Since: header - isn't blocked as well. + Client-header taggers are applied to each header on its own, + and as the header isn't modified, each tagger sees + the original. - It is recommended to use this action together with - hide-if-modified-since - and - overwrite-last-modified. + Client-header taggers are the first actions that are executed + and their tags can be used to control every other action. - + Example usage (section): - # Let the browser revalidate cached documents without being tracked across sessions -{+hide-if-modified-since {-60} \ -+overwrite-last-modified {randomize} \ -+crunch-if-none-match} -/ - + +# 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/ + + + - -crunch-incoming-cookies + +content-type-overwrite Typical use: - - Prevent the web server from setting any cookies on your system - + Stop useless download menus from popping up, or change the browser's rendering mode @@ -2967,7 +3120,7 @@ new action Effect: - Deletes any Set-Cookie: HTTP headers from server replies. + Replaces the Content-Type: HTTP server header. @@ -2976,7 +3129,7 @@ new action Type: - Boolean. + Parameterized. @@ -2984,8 +3137,8 @@ new action Parameter: - N/A - + Any string. + @@ -2993,22 +3146,301 @@ new action Notes: - This action is only concerned with incoming cookies. For - outgoing cookies, use - crunch-outgoing-cookies. - Use both to disable cookies completely. + The Content-Type: HTTP server header is used by the + browser to decide what to do with the document. The value of this + header can cause the browser to open a download menu instead of + displaying the document by itself, even if the document's format is + supported by the browser. - It makes no sense at all to use this action in conjunction - with the session-cookies-only action, - since it would prevent the session cookies from being set. See also - filter-content-cookies. + The declared content type can also affect which rendering mode + the browser chooses. If XHTML is delivered as text/html, + many browsers treat it as yet another broken HTML document. + If it is send as application/xml, browsers with + XHTML support will only display it, if the syntax is correct. - - - - - Example usage: + + If you see a web site that proudly uses XHTML buttons, but sets + Content-Type: text/html, you can use &my-app; + to overwrite it with application/xml and validate + the web master's claim inside your XHTML-supporting browser. + If the syntax is incorrect, the browser will complain loudly. + + + You can also go the opposite direction: if your browser prints + error messages instead of rendering a document falsely declared + as XHTML, you can overwrite the content type with + text/html and have it rendered as broken HTML document. + + + By default content-type-overwrite only replaces + Content-Type: headers that look like some kind of text. + If you want to overwrite it unconditionally, you have to combine it with + force-text-mode. + This limitation exists for a reason, think twice before circumventing it. + + + Most of the time it's easier to replace this action with a custom + server-header filter. + It allows you to activate it for every document of a certain site and it will still + only replace the content types you aimed at. + + + Of course you can apply content-type-overwrite + to a whole site and then make URL based exceptions, but it's a lot + more work to get the same precision. + + + + + + Example usage (sections): + + + # Check if www.example.net/ really uses valid XHTML +{ +content-type-overwrite{application/xml} } +www.example.net/ + +# but leave the content type unmodified if the URL looks like a style sheet +{-content-type-overwrite} +www.example.net/.*\.css$ +www.example.net/.*style + + + + + + + + + + + +crunch-client-header + + + + Typical use: + + Remove a client header Privoxy has no dedicated action for. + + + + + Effect: + + + Deletes every header sent by the client that contains the string the user supplied as parameter. + + + + + + Type: + + + Parameterized. + + + + + Parameter: + + + Any string. + + + + + + Notes: + + + This action allows you to block client headers for which no dedicated + Privoxy action exists. + Privoxy will remove every client header that + contains the string you supplied as parameter. + + + Regular expressions are not supported and you can't + use this action to block different headers in the same request, unless + they contain the same string. + + + crunch-client-header is only meant for quick tests. + If you have to block several different headers, or only want to modify + parts of them, you should use a + client-header filter. + + + + Don't block any header without understanding the consequences. + + + + + + + Example usage (section): + + + # Block the non-existent "Privacy-Violation:" client header +{ +crunch-client-header{Privacy-Violation:} } +/ + + + + + + + + + + +crunch-if-none-match + + + + Typical use: + + Prevent yet another way to track the user's steps between sessions. + + + + + Effect: + + + Deletes the If-None-Match: HTTP client header. + + + + + + Type: + + + Boolean. + + + + + Parameter: + + + N/A + + + + + + Notes: + + + Removing the If-None-Match: HTTP client header + is useful for filter testing, where you want to force a real + reload instead of getting status code 304 which + would cause the browser to use a cached copy of the page. + + + It is also useful to make sure the header isn't used as a cookie + replacement (unlikely but possible). + + + Blocking the If-None-Match: header shouldn't cause any + caching problems, as long as the If-Modified-Since: header + isn't blocked or missing as well. + + + It is recommended to use this action together with + hide-if-modified-since + and + overwrite-last-modified. + + + + + + Example usage (section): + + + # Let the browser revalidate cached documents but don't +# allow the server to use the revalidation headers for user tracking. +{+hide-if-modified-since{-60} \ + +overwrite-last-modified{randomize} \ + +crunch-if-none-match} +/ + + + + + + + + + +crunch-incoming-cookies + + + + Typical use: + + + Prevent the web server from setting HTTP cookies on your system + + + + + + Effect: + + + Deletes any Set-Cookie: HTTP headers from server replies. + + + + + + Type: + + + Boolean. + + + + + Parameter: + + + N/A + + + + + + Notes: + + + This action is only concerned with incoming HTTP cookies. For + outgoing HTTP cookies, use + crunch-outgoing-cookies. + Use both to disable HTTP cookies completely. + + + It makes no sense at all to use this action in conjunction + with the session-cookies-only action, + since it would prevent the session cookies from being set. See also + filter-content-cookies. + + + + + + Example usage: +crunch-incoming-cookies @@ -3075,9 +3507,8 @@ new action crunch-server-header is only meant for quick tests. If you have to block several different headers, or only want to modify - parts of them, you should enable - filter-server-headers - and create your own filter. + parts of them, you should use a custom + server-header filter. @@ -3092,7 +3523,7 @@ new action # Crunch server headers that try to prevent caching -{+crunch-server-header {no-cache}} +{ +crunch-server-header{no-cache} } / @@ -3110,7 +3541,7 @@ new action Typical use: - Prevent the web server from reading any cookies from your system + Prevent the web server from reading any HTTP cookies from your system @@ -3145,10 +3576,10 @@ new action Notes: - This action is only concerned with outgoing cookies. For - incoming cookies, use + This action is only concerned with outgoing HTTP cookies. For + incoming HTTP cookies, use crunch-incoming-cookies. - Use both to disable cookies completely. + Use both to disable HTTP cookies completely. It makes no sense at all to use this action in conjunction @@ -3284,8 +3715,8 @@ new action This is a left-over from the time when Privoxy didn't support important HTTP/1.1 features well. It is left here for the unlikely case that you experience HTTP/1.1 related problems with some server - out there. Not all (optional) HTTP/1.1 features are supported yet, so there - is a chance you might need this action. + out there. Not all HTTP/1.1 features and requirements are supported yet, + so there is a chance you might need this action. @@ -3393,9 +3824,9 @@ problem-host.example.com followed by another parameter. fast-redirects doesn't know that and will cause a redirect to http://www.example.net/&foo=bar. Depending on the target server configuration, the parameter will be silently ignored - or lead to a page not found error. It is possible to fix these redirected - requests with filter-client-headers - but it requires a little effort. + or lead to a page not found error. You can prevent this problem by + first using the redirect action + to remove the last part of the URL, but it requires a little effort. To detect a redirection URL, fast-redirects only @@ -3415,7 +3846,7 @@ problem-host.example.com { +fast-redirects{simple-check} } - .example.com + one.example.com { +fast-redirects{check-decoded-url} } another.example.com/testing @@ -3444,15 +3875,11 @@ problem-host.example.com Effect: - All files of text-based type, most notably HTML and - JavaScript, to which this action applies, can be filtered on-the-fly - through the specified regular expression based substitutions. (Note: as of - version 3.0.3 plain text documents are exempted from filtering, because - web servers often use the text/plain MIME type for all - files whose type they don't know.) By default, filtering works only on the - raw document content itself (that which can be seen with View - Source), - not the headers. + All instances of text-based type, most notably HTML and JavaScript, to which + this action applies, can be filtered on-the-fly through the specified regular + expression based substitutions. (Note: as of version 3.0.3 plain text documents + are exempted from filtering, because web servers often use the + text/plain MIME type for all files whose type they don't know.) @@ -3469,7 +3896,7 @@ problem-host.example.com Parameter: - The name of a filter, as defined in the filter file. + The name of a content filter, as defined in the filter file. Filters can be defined in one or more files as defined by the filterfile option in the config file. @@ -3525,14 +3952,19 @@ problem-host.example.com by defining appropriate -filter exceptions. - At this time, Privoxy cannot uncompress compressed - documents. If you want filtering to work on all documents, even those that - would normally be sent compressed, you must use the - prevent-compression + Compressed content can't be filtered either, unless &my-app; + is compiled with zlib support (requires at least &my-app; 3.0.7), + in which case &my-app; will decompress the content before filtering + it. + + + If you use a &my-app; version without zlib support, but want filtering to work on + as much documents as possible, even those that would normally be sent compressed, + you must use the prevent-compression action in conjunction with filter. - Filtering can achieve some of the same effects as the + Content filtering can achieve some of the same effects as the block action, i.e. it can be used to block ads and banners. But the mechanism works quite differently. One effective use, is to block ad banners @@ -3559,23 +3991,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). @@ -3587,43 +4019,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. @@ -3631,39 +4063,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 some 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{html-to-xml} # Header filter to change the Content-Type from html to xml - - - - +filter{xml-to-html} # Header filter to change the Content-Type from xml to html + +filter{blogspot} # Cleans up some Blogspot blogs. Read the fine print before using this. @@ -3672,16 +4100,16 @@ problem-host.example.com - -filter-client-headers - + +force-text-mode + Typical use: - - To apply filtering to the client's (browser's) headers - + Force Privoxy to treat a document as if it was in some kind of text format. @@ -3689,16 +4117,14 @@ problem-host.example.com Effect: - By default, Privoxy's filters only apply - to the document content itself. This will extend those filters to - include the client's headers as well. - + Declares a document as text, even if the Content-Type: isn't detected as such. + Type: - + Boolean. @@ -3712,158 +4138,44 @@ problem-host.example.com - - + + Notes: - Regular expressions can be used to filter headers as well. Check your - filters closely before activating this action, as it can easily lead to broken - requests. - - - These filters are applied to each header on its own, not to them - all at once. This makes it easier to diagnose problems, but on the downside - you can't write filters that only change header x if header y's value is - z. - - - The filters are used after the other header actions have finished and can - use their output as input. + As explained above, + Privoxy tries to only filter files that are + in some kind of text format. The same restrictions apply to + content-type-overwrite. + force-text-mode declares a document as text, + without looking at the Content-Type: first. - - - Whenever possible one should specify ^, - $, the whole header name and the colon, to make sure - the filter doesn't cause havoc to other headers or the - page itself. For example if you want to transform - Galeon User-Agents to - Firefox User-Agents you - shouldn't use: - - - -s@Galeon/\d\.\d\.\d @@ - - - but: - - -s@^(User-Agent:.*) Galeon/\d\.\d\.\d (Firefox/\d\.\d\.\d\.\d)$@$1 $2@ - - - - - - - Example usage (section): - + - -{+filter-client-headers +filter{test_filter}} -problem-host.example.com - + Think twice before activating this action. Filtering binary data + with regular expressions can cause file damage. - - - - - - - - - -filter-server-headers - - - - Typical use: - - - To apply filtering to the server's headers - - - - - - Effect: - - - By default, Privoxy's filters only apply - to the document content itself. This will extend those filters to - include the server's headers as well. - - - - - - Type: - - - Boolean. - - - - - Parameter: - - - N/A - + - - Notes: - - - Similar to filter-client-headers, but works on - the server instead. To filter both server and client, use both. - - - As with filter-client-headers, check your - filters before activating this action, as it can easily lead to broken - requests. - - - These filters are applied to each header on its own, not to them - all at once. This makes it easier to diagnose problems, but on the downside - you can't write filters that only change header x if header y's value is - z. - - - The filters are used after the other header actions have finished and can - use their output as input. - - - Remember too, whenever possible one should specify ^, - $, the whole header name and the colon, to make sure - the filter doesn't cause havoc to other headers or the - page itself. See above for example. - - - - - - Example usage (section): + Example usage: - + -{+filter-server-headers +filter{test_filter}} -problem-host.example.com - - ++force-text-mode + + - - -force-text-mode + +forward-override @@ -3871,7 +4183,7 @@ new action Typical use: - Force Privoxy to treat a document as if it was in some kind of text format. + Change the forwarding settings based on User-Agent or request origin @@ -3879,7 +4191,7 @@ new action Effect: - Declares a document as text, even if the Content-Type: isn't detected as such. + Overrules the forward directives in the configuration file. @@ -3888,16 +4200,40 @@ new action Type: - Boolean. + Multi-value. Parameter: - - N/A - + + + forward . to use a direct connection without any additional proxies. + + + + forward 127.0.0.1:8123 to use the HTTP proxy listening at 127.0.0.1 port 8123. + + + + + 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, use forward-socks5 + for socks5 connections (with remote DNS resolution). + + + + + 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, use forward-socks5 + for socks5 connections (with remote DNS resolution). + + + @@ -3905,17 +4241,25 @@ new action Notes: - As explained above, - Privoxy tries to only filter files that are - in some kind of text format. The same restrictions apply to - content-type-overwrite. - force-text-mode declares a document as text, - without looking at the Content-Type: first. + 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. - Think twice before activating this action. Filtering binary data - with regular expressions can cause file damage. + Please read the description for the forward directives before + using this action. Forwarding to the wrong people will reduce your privacy and increase the + chances of man-in-the-middle attacks. + + + If the ports are missing or invalid, default values will be used. This might change + in the future and you shouldn't rely on it. Otherwise incorrect syntax causes Privoxy + to exit. + + + Use the show-url-info CGI page + to verify that your forward settings do what you thought the do. @@ -3926,7 +4270,19 @@ new action -+force-text-mode +# Always use direct connections for requests previously tagged as +# User-Agent: fetch libfetch/2.0 and make sure +# resuming downloads continues to work. +# 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 \ +} +TAG:^User-Agent: fetch libfetch/2\.0$ @@ -3955,7 +4311,7 @@ new action This action alone doesn't do anything noticeable. It just marks URLs. If the block action also applies, - the presence or absence of this mark decides whether an HTML blocked + the presence or absence of this mark decides whether an HTML BLOCKED page, or an empty document will be sent to the client as a substitute for the blocked content. The empty document isn't literally empty, but actually contains a single space. @@ -3986,6 +4342,8 @@ new action Some browsers complain about syntax errors if JavaScript documents are blocked with Privoxy's default HTML page; this option can be used to silence them. + And of course this action can also be used to eliminate the &my-app; + BLOCKED message in frames. The content type for the empty document can be specified with @@ -4001,7 +4359,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$ @@ -4088,11 +4446,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 @@ -4254,6 +4609,10 @@ new action to another one, but in most cases it isn't worth the time to set it up. + + This action will probably be removed in the future, + use server-header filters instead. + @@ -4262,10 +4621,10 @@ new action # Disarm the download link in Sourceforge's patch tracker -{-filter\ -+content-type-overwrite {text/plain}\ -+hide-content-disposition {block} } -.sourceforge.net/tracker/download.php +{ -filter \ + +content-type-overwrite{text/plain}\ + +hide-content-disposition{block} } + .sourceforge.net/tracker/download\.php @@ -4330,8 +4689,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 @@ -4340,88 +4699,21 @@ new action It is also recommended to use this action together with - crunch-if-none-match. - - - - - - Example usage (section): - - - # Let the browser revalidate without being tracked across sessions -{+hide-if-modified-since {-60}\ -+overwrite-last-modified {randomize}\ -+crunch-if-none-match} -/ - - - - - - - - - -hide-forwarded-for-headers - - - - Typical use: - - Improve privacy by hiding the true source of the request - - - - - 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 fairly safe to leave this on. - - - This action is scheduled for improvement: It should be able to generate forged - X-Forwarded-for: headers using random IP addresses from a specified network, - to make successive requests from the same client look like requests from a pool of different - users sharing the same proxy. + crunch-if-none-match, + otherwise it's more or less pointless. - Example usage: + Example usage (section): - +hide-forwarded-for-headers + # 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} +/ @@ -4538,6 +4830,9 @@ new action 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. @@ -4571,7 +4866,7 @@ new action 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 + requests, in an attempt to prevent their content from being embedded or linked to elsewhere. @@ -4610,7 +4905,7 @@ new action Typical use: - Conceal your type of browser and client operating system + Try to conceal your type of browser and client operating system @@ -4650,10 +4945,6 @@ new action 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). - @@ -4670,7 +4961,10 @@ new action (Must be just a silly MS goof, I'm sure :-). - This action is scheduled for improvement. + More information on known user-agent strings can be found at + http://www.user-agents.org/ + and + http://en.wikipedia.org/wiki/User_agent. @@ -4687,172 +4981,6 @@ new action - - -inspect-jpegs - - - - Typical use: - - To protect against the MS buffer over-run in JPEG processing - - - - - Effect: - - - Protect against a known exploit - - - - - - Type: - - - Boolean. - - - - - Parameter: - - - N/A - - - - - - 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 unwanted intrusion. - - - - - - - Example usage: - - +inspect-jpegs - - - - - - - - - - -kill-popups<anchor id="kill-popup"> - - - - Typical use: - - Eliminate those annoying pop-up windows (deprecated) - - - - - Effect: - - - While loading the document, replace JavaScript code that opens - pop-up windows with (syntactically neutral) dummy code on the fly. - - - - - - Type: - - - Boolean. - - - - - Parameter: - - - N/A - - - - - - Notes: - - - 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. - - - - - - - - Example usage: - - +kill-popups - - - - - - limit-connect @@ -4897,26 +5025,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. @@ -4928,7 +5051,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 @@ -4985,23 +5108,33 @@ new action More and more websites send their content compressed by default, which - is generally a good idea and saves bandwidth. But for the filter, deanimate-gifs - and kill-popups actions to work, - Privoxy needs access to the uncompressed data. - Unfortunately, Privoxy can't yet(!) uncompress, filter, and - re-compress the content on the fly. So if you want to ensure that all websites, including - those that normally compress, can be filtered, you need to use this action. + is generally a good idea and saves bandwidth. But the 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 + filtered is decompressed on-the-fly and you don't have to worry about this action. + If you are using an older &my-app; version, or one that hasn't been compiled with zlib + support, this action can be used to convince the server to send the content uncompressed. - This will slow down transfers from those websites, though. If you use any of the above-mentioned - actions, you will typically want to use prevent-compression in conjunction - with them. + Most text-based instances compress very well, the size is seldom decreased by less than 50%, + for markup-heavy instances like news feeds saving more than 90% of the original size isn't + unusual. + + + Not using compression will therefore slow down the transfer, and you should only + enable this action if you really need it. As of &my-app; 3.0.7 it's disabled in all + predefined action settings. Note that some (rare) ill-configured sites don't handle requests for uncompressed - documents correctly (they send an empty document body). If you use prevent-compression - per default, you'll have to add exceptions for those sites. See the example for how to do that. + documents correctly. Broken PHP applications tend to send an empty document body, + some IIS versions only send the beginning of the content. If you enable + prevent-compression per default, you might want to add + exceptions for those sites. See the example for how to do that. @@ -5010,16 +5143,24 @@ new action Example usage (sections): - # Set default: + +# Selectively turn off compression, and enable a filter +# +{ +filter{tiny-textforms} +prevent-compression } +# Match only these sites + .google. + sourceforge.net + sf.net + +# Or instead, we could set a universal default: # -{+prevent-compression} -/ # Match all sites +{ +prevent-compression } + / # Match all sites -# Make exceptions for ill sites: +# Then maybe make exceptions for broken sites: # -{-prevent-compression} -www.debianhelp.org -www.pclinuxonline.com +{ -prevent-compression } +.compusa.com/ @@ -5090,7 +5231,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. @@ -5114,9 +5255,9 @@ new action # Let the browser revalidate without being tracked across sessions -{+hide-if-modified-since {-60}\ -+overwrite-last-modified {randomize}\ -+crunch-if-none-match} +{ +hide-if-modified-since{-60} \ + +overwrite-last-modified{randomize} \ + +crunch-if-none-match} / @@ -5163,7 +5304,7 @@ new action Parameter: - Any URL. + An absolute URL or a single pcrs command. @@ -5172,21 +5313,26 @@ new action Notes: - This action is useful to replace whole documents with ones of your - choosing. This can be used to enforce safe surfing, or just as a simple - convenience. - - - You can do the same by combining the actions - block, - handle-as-image and - set-image-blocker{URL}. - It doesn't sound right for non-image documents, and that's why this action - was created. + 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. + + + In case of problems with your redirects, or simply to watch + them working, enable debug 128. @@ -5197,11 +5343,31 @@ new action # Replace example.com's style sheet with another one { +redirect{http://localhost/css-replacements/example.com.css} } - example.com/stylesheet.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 + 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/ @@ -5211,15 +5377,15 @@ new action - -send-vanilla-wafer + +server-header-filter Typical use: - Feed log analysis scripts with useless data. + Rewrite or remove single server headers. @@ -5228,17 +5394,17 @@ new action 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. + All server headers to which this action applies are filtered on-the-fly + through the specified regular expression based substitutions. Type: - + - Boolean. + Parameterized. @@ -5246,7 +5412,8 @@ new action Parameter: - N/A + The name of a server-header filter, as defined in one of the + filter files. @@ -5255,20 +5422,35 @@ new action Notes: - The vanilla wafer is a (relatively) unique header and could conceivably be used to track you. + Server-header filters are applied to each header on its own, not to + all at once. This makes it easier to diagnose problems, but on the downside + you can't write filters that only change header x if header y's value is z. + You can do that by using tags though. - This action is rarely used and not enabled in the default configuration. + Server-header filters are executed after the other header actions have finished + and use their output as input. - + + Please refer to the filter file chapter + to learn which server-header filters are available by default, and how to + create your own. + + - Example usage: + Example usage (section): - - +send-vanilla-wafer - + + +{+server-header-filter{html-to-xml}} +example.org/xml-instance-that-is-delivered-as-html + +{+server-header-filter{xml-to-html}} +example.org/instance-that-is-delivered-as-xml-but-is-not + + @@ -5277,15 +5459,15 @@ new action - -send-wafer + +server-header-tagger Typical use: - Send custom cookies or feed log analysis scripts with even more useless data. + Enable or disable filters based on the Content-Type header. @@ -5294,16 +5476,18 @@ new action Effect: - Sends a custom, user-defined cookie with each request. + Server headers to which this action applies are filtered on-the-fly through + the specified regular expression based substitutions, the result is used as + tag. Type: - + - Multi-value. + Parameterized. @@ -5311,8 +5495,8 @@ new action Parameter: - A string of the form name=value. + The name of a server-header tagger, as defined in one of the + filter files. @@ -5321,23 +5505,38 @@ new action Notes: - Being multi-valued, multiple instances of this action can apply to the same request, - resulting in multiple cookies being sent. + Server-header taggers are applied to each header on its own, + and as the header isn't modified, each tagger sees + the original. - This action is rarely used and not enabled in the default configuration. + Server-header taggers are executed before all other header actions + that modify server headers. Their tags can be used to control + all of the other server-header actions, the content filters + and the crunch actions (redirect + and block). - + + Obviously crunching based on tags created by server-header taggers + doesn't prevent the request from showing up in the server's log file. + + + + Example usage (section): - - {+send-wafer{UsingPrivoxy=true}} -my-internal-testing-server.void - + + +# Tag every request with the content type declared by the server +{+server-header-tagger{content-type}} +/ + + + @@ -5503,89 +5702,7 @@ my-internal-testing-server.void it over and over again. - - - - - - Notes: - - - The URLs for the built-in images are http://config.privoxy.org/send-banner?type=type, where type is - either blank or pattern. - - - There is a third (advanced) type, called auto. It is NOT to be - used in set-image-blocker, but meant for use from filters. - Auto will select the type of image that would have applied to the referring page, had it been an image. - - - - - - Example usage: - - - Built-in pattern: - - - +set-image-blocker{pattern} - - - Redirect to the BSD devil: - - - +set-image-blocker{http://www.freebsd.org/gifs/dae_up3.gif} - - - Redirect to the built-in pattern for better caching: - - - +set-image-blocker{http://config.privoxy.org/send-banner?type=pattern} - - - - - - - - - -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 + @@ -5593,30 +5710,14 @@ new action 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 link becomes rather useless: - it lets the client request the home page of the forbidden host - through unencrypted HTTP, still using the port of the last request. + The URLs for the built-in images are http://config.privoxy.org/send-banner?type=type, where type is + either blank or pattern. - If you previously configured Privoxy to do the - request through a SSL tunnel, everything will work. Most likely you haven't - and the server will respond with an error message because it is expecting - HTTPS (SSL). + There is a third (advanced) type, called auto. It is NOT to be + used in set-image-blocker, but meant for use from filters. + Auto will select the type of image that would have applied to the referring page, had it been an image. @@ -5625,7 +5726,22 @@ new action Example usage: - +treat-forbidden-connects-like-blocks + Built-in pattern: + + + +set-image-blocker{pattern} + + + Redirect to the BSD daemon: + + + +set-image-blocker{http://www.freebsd.org/gifs/dae_up3.gif} + + + Redirect to the built-in pattern for better caching: + + + +set-image-blocker{http://config.privoxy.org/send-banner?type=pattern} @@ -5687,7 +5803,6 @@ new action them before writing. So the effects of your aliases are of course preserved, but the aliases themselves are lost when you edit sections that use aliases with it. - This is likely to change in future versions of Privoxy. @@ -5708,14 +5823,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 - mercy-for-cookies = -crunch-all-cookies -session-cookies-only -filter{content-cookies} + +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 - shop = -crunch-all-cookies -filter{all-popups} -kill-popups + fragile = -block -filter -crunch-all-cookies -fast-redirects -hide-referrer -prevent-compression + + shop = -crunch-all-cookies -filter{all-popups} # Short names for other aliases, for really lazy people ;-) # @@ -5737,7 +5853,8 @@ new action {fragile} .office.microsoft.com .windowsupdate.microsoft.com - .nytimes.com + # Gmail is really mail.google.com, not gmail.com + mail.google.com # Shopping sites: # Allow cookies (for setting and retrieving your customer data) @@ -5745,18 +5862,18 @@ new action {shop} .quietpc.com .worldpay.com # for quietpc.com - .scan.co.uk + mybank.example.com # These shops require pop-ups: # - {shop -kill-popups -filter{all-popups}} + {-filter{all-popups} -filter{unsolicited-popups}} .dabs.com .overclockers.co.uk - Aliases like shop and fragile are often used for - problem sites that require some actions to be disabled + Aliases like shop and fragile are typically used for + problem sites that require more than one action to be disabled in order to function properly. @@ -5772,24 +5889,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 + -default.action + + The default behavior is now set. + + + + +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: @@ -5797,15 +5961,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: @@ -5820,120 +5983,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 \ - -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-client-headers \ - -filter-server-headers \ - -filter-google \ - -filter-yahoo \ - -filter-msn \ - -filter-blogspot \ - -filter-xml-to-html \ - -filter-html-to-xml \ - -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 \ - +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} @@ -5976,37 +6033,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: @@ -6026,8 +6056,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: @@ -6098,7 +6128,7 @@ bs*.gsanet.com ########################################################################## # Block these fine banners: ########################################################################## -{ +block } +{ +block{Banner ads.} } # Generic patterns: # @@ -6222,7 +6252,7 @@ wiki. -# My user.action file. <fred@foobar.com> +# My user.action file. <fred@example.com> @@ -6244,14 +6274,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: @@ -6315,7 +6345,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: @@ -6323,9 +6353,9 @@ stupid-server.example.com/ -{ +block } - www.example.com/nasty-ads/sponsor.gif - another.popular.site.net/more/junk/here/ +{ +block{Nasty ads.} } + www.example.com/nasty-ads/sponsor\.gif + another.example.net/more/junk/here/ @@ -6371,8 +6401,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: @@ -6456,47 +6486,72 @@ stupid-server.example.com/ Filter Files - On-the-fly text substitutions that can be invoked through the - filter action need + On-the-fly text substitutions need to be defined in a filter file. Once defined, they - can then be invoked as an action. Multiple filter files can be - defined through the action. + + + + &my-app; supports three different filter actions: + filter to + rewrite the content that is send to the client, + 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. + + + + &my-app; also supports two tagger actions: + client-header-tagger + and + server-header-tagger. + Taggers and filters use the same syntax in the filter files, the difference + is that taggers don't modify the text they are filtering, but use a rewritten + version of the filtered text as tag. The tags can then be used to change the + applying actions through sections with tag-patterns. + + + + + 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. - - + - Typical reasons for doing these kinds of substitutions are to eliminate - common annoyances in HTML and JavaScript, such as pop-up windows, + 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 width and height attributes (standard banner sizes or web-bugs), - or just to have fun. The possibilities are endless. + or just to have fun. + + + + 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. - Filtering works on any text-based document type, including - HTML, JavaScript, CSS etc. (all text/* - MIME types, except text/plain). 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. By default, filters are only applied - to the raw document content, but can be extended to the HTTP headers with - the supplemental actions: - filter-client-headers and - filter-server-headers. + and, of course, regular expressions. Just like the actions files, the filter file is organized in sections, which are called filters - here. Each filter consists of a heading line, that starts with the - keyword FILTER:, followed by - the filter's name, and a short (one line) + here. Each filter consists of a heading line, that starts with one of the + keywords FILTER:, + CLIENT-HEADER-FILTER: or SERVER-HEADER-FILTER: + followed by the filter's name, and a short (one line) description of what it does. Below that line come the jobs, i.e. lines that define the actual text substitutions. By convention, the name of a filter @@ -6513,7 +6568,9 @@ stupid-server.example.com/ - A filter header line for a filter called foo could look + Filter definitions start with a header line that contains the filter + type, the filter name and the filter description. + A content filter header line for a filter called foo could look like this: @@ -6551,7 +6608,7 @@ stupid-server.example.com/ Filter File Tutorial - Now, let's complete our foo filter. We have already defined + Now, let's complete our foo content filter. We have already defined the heading, but the jobs are still missing. Since all it does is to replace foo with bar, there is only one (trivial) job needed: @@ -7174,15 +7231,60 @@ pre-defined filters for your convenience: xml-to-html - Header filter to change the Content-Type from xml to html. + Server-header filter to change the Content-Type from xml to html. + html-to-xml - Header filter to change the Content-Type from html to xml. + Server-header filter to change the Content-Type from html to xml. + + + + + + no-ping + + + Removes the non-standard ping attribute from + anchor and area HTML tags. + + + + + + hide-tor-exit-notation + + + Client-header filter to remove the Tor exit node notation + found in Host and Referer headers. + + + If &my-app; and Tor are chained and &my-app; + is configured to use socks4a, one can use http://www.example.org.foobar.exit/ + to access the host www.example.org through the + Tor exit node foobar. + + + As the HTTP client isn't aware of this notation, it treats the + whole string www.example.org.foobar.exit as host and uses it + for the Host and Referer headers. From the + server's point of view the resulting headers are invalid and can cause problems. + + + An invalid Referer header can trigger hot-linking + protections, an invalid Host header will make it impossible for + the server to find the right vhost (several domains hosted on the same IP address). + + + This client-header filter removes the foo.exit part in those headers + to prevent the mentioned problems. Note that it only modifies + the HTTP headers, it doesn't make it impossible for the server + to detect your Tor exit node based on the IP address + the request is coming from. @@ -7232,11 +7334,17 @@ pre-defined filters for your convenience: The templates are basically normal HTML files, but with place-holders (called symbols - or exports), which Privoxy fills at run time. You can - edit the templates with a normal text editor, should you want to customize them. - (Not recommended for the casual user). Note that - just like in configuration files, lines starting with # are - ignored when the templates are filled in. + or exports), which Privoxy fills at run time. It + is possible to edit the templates with a normal text editor, should you want + to customize them. (Not recommended for the casual + user). Should you create your own custom templates, you should use + the config setting templdir + to specify an alternate location, so your templates do not get overwritten + during upgrades. + + + Note that just like in configuration files, lines starting + with # are ignored when the templates are filled in. @@ -7676,8 +7784,10 @@ Requests - Toggle Privoxy on or off. In this case, Privoxy continues - to run, but only as a pass-through proxy, with no actions taking place: + Toggle Privoxy on or off. This feature can be turned off/on in the main + config file. When toggled off, Privoxy + continues to run, but only as a pass-through proxy, with no actions taking + place:
@@ -7787,8 +7897,9 @@ Requests Chain of Events - Let's take a quick look at the basic sequence of events when a web page is - requested by your browser and Privoxy is on duty: + Let's take a quick look at how some of Privoxy's + core features are triggered, and the ensuing sequence of events when a web + page is requested by your browser: @@ -7814,10 +7925,13 @@ Requests linkend="BLOCK">+block patterns. If so, the URL is then blocked, and the remote web server will not be contacted. +handle-as-image - is then checked and if it does not match, an - HTML BLOCKED page is sent back. Otherwise, if it does match, - an image is returned. The type of image depends on the setting of +set-image-blocker + and + +handle-as-empty-document + are then checked, and if there is no match, an + HTML BLOCKED page is sent back to the browser. Otherwise, if + it does match, an image is returned for the former, and an empty text + document for the latter. The type of image would depend on the setting of + +set-image-blocker (blank, checkerboard pattern, or an HTTP redirect to an image elsewhere). @@ -7845,8 +7959,8 @@ Requests - Now the web server starts sending its response back (i.e. typically a web page and related - data). + Now the web server starts sending its response back (i.e. typically a web + page). @@ -7862,14 +7976,7 @@ Requests - 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 a +filter + If any +filter action or +deanimate-gifs action applies (and the document type fits the action), the rest of the page is @@ -7882,7 +7989,7 @@ Requests Privoxy back to your browser. - If neither +filter + If neither a +filter action or +deanimate-gifs matches, then Privoxy passes the raw data through @@ -7894,14 +8001,22 @@ Requests As the browser receives the now (possibly filtered) page content, it reads and then requests any URLs that may be embedded within the page source, e.g. ad images, stylesheets, JavaScript, other HTML documents (e.g. - frames), sounds, etc. For each of these objects, the browser issues a new - request. And each such request is in turn processed as above. Note that a - complex web page may have many such embedded URLs. + frames), sounds, etc. For each of these objects, the browser issues a + separate request (this is easily viewable in Privoxy's + logs). And each such request is in turn processed just as above. Note that a + complex web page will have many, many such embedded URLs. If these + secondary requests are to a different server, then quite possibly a very + differing set of actions is triggered. + + NOTE: This is somewhat of a simplistic overview of what happens with each URL + request. For the sake of brevity and simplicity, we have focused on + Privoxy's core features only. + @@ -7928,7 +8043,9 @@ Requests or not, is to disable it temporarily. This should be the first troubleshooting step. See the Bookmarklets section on a quick and easy way to do this (be sure to flush caches afterward!). Looking at the - logs is a good idea too. + logs is a good idea too. (Note that both the toggle feature and logging are + enabled via config file settings, and may need to be + turned on.) Another easy troubleshooting step to try is if you have done any @@ -7970,71 +8087,23 @@ Requests - Matches for http://google.com: + Matches for http://www.google.com: In file: default.action [ View ] [ Edit ] - {-add-header - -block - -content-type-overwrite - -crunch-client-header - -crunch-if-none-match - -crunch-incoming-cookies - -crunch-outgoing-cookies - -crunch-server-header + {+change-x-forwarded-for{block} +deanimate-gifs {last} - -downgrade-http-version +fast-redirects {check-decoded-url} - -filter {js-events} - -filter {content-cookies} - -filter {all-popups} - -filter {banners-by-link} - -filter {tiny-textforms} - -filter {frameset-borders} - -filter {demoronizer} - -filter {shockwave-flash} - -filter {quicktime-kioskmode} - -filter {fun} - -filter {crude-parental} - -filter {site-specifics} - -filter {js-annoyances} - -filter {html-annoyances} +filter {refresh-tags} - -filter {unsolicited-popups} +filter {img-reorder} +filter {banners-by-size} +filter {webbugs} +filter {jumping-windows} +filter {ie-exploits} - -filter {google} - -filter {yahoo} - -filter {msn} - -filter {blogspot} - -filter {xml-to-html} - -filter {html-to-xml} - -filter-client-headers - -filter-server-headers - -force-text-mode - -handle-as-empty-document - -handle-as-image - -hide-accept-language - -hide-content-disposition - +hide-forwarded-for-headers +hide-from-header {block} - -hide-if-modified-since +hide-referrer {forge} - -hide-user-agent - -inspect-jpegs - -kill-popups - -limit-connect - -overwrite-last-modified - +prevent-compression - -redirect - -send-vanilla-wafer - -send-wafer +session-cookies-only +set-image-blocker {pattern} - -treat-forbidden-connects-like-blocks } / { -session-cookies-only } @@ -8112,6 +8181,8 @@ In file: user.action [ View ] [ Edit ][ View ] [ Edit ][ View ] [ Edit ] + +set-image-blocker {pattern} @@ -8187,21 +8251,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 @@ -8216,7 +8280,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 @@ -8237,6 +8301,8 @@ In file: user.action [ View ] [ Edit ][ View ] [ Edit ] @@ -8338,7 +8397,7 @@ In file: user.action [ View ] [ Edit ] - { +block +handle-as-image } + { +block{Path starts with "ads".} +handle-as-image } /ads @@ -8390,7 +8449,7 @@ In file: user.action [ View ] [ Edit ]user.action, for local site exceptions. Note that when a simple domain pattern is used by itself (without the subsequent path portion), all sub-pages within that domain are included - automatcially in the scope of the action. + automatically in the scope of the action. @@ -8419,8 +8478,8 @@ In file: user.action [ View ] [ Edit ] Remember to flush caches! Note that the mail.google reference lacks the TLD portion (e.g. - .com. This will effectively match any TLD with - google in it, such as mail.google.de, + .com). This will effectively match any TLD with + google in it, such as mail.google.de., just as an example. @@ -8454,6 +8513,273 @@ In file: user.action [ View ] [ Edit ][ View ] [ Edit ][ View ] [ Edit ][ View ] [ Edit ][ View ] [ Edit ]