X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=blobdiff_plain;f=doc%2Fsource%2Fuser-manual.sgml;h=a94d1d29988dde207849f9c629c6f11a4e73e9f1;hp=d687a86217d45394a313cd9aaa7d9c99f52029c5;hb=f4107f65b676b63a199fe4230e58695757f9f199;hpb=d4ccfd16880085fa15ed74f77a0e65636707c4c0 diff --git a/doc/source/user-manual.sgml b/doc/source/user-manual.sgml index d687a862..a94d1d29 100644 --- a/doc/source/user-manual.sgml +++ b/doc/source/user-manual.sgml @@ -11,7 +11,7 @@ - + @@ -33,9 +33,9 @@ This file belongs into ijbswa.sourceforge.net:/home/groups/i/ij/ijbswa/htdocs/ - $Id: user-manual.sgml,v 2.25 2006/10/18 10:50:33 hal9 Exp $ + $Id: user-manual.sgml,v 2.66 2008/03/06 16:33:47 fabiankeil Exp $ - Copyright (C) 2001- 2006 Privoxy Developers http://www.privoxy.org + Copyright (C) 2001-2008 Privoxy Developers http://www.privoxy.org/ See LICENSE. ======================================================================== @@ -54,12 +54,12 @@ - Copyright &my-copy; 2001 - 2006 by + Copyright &my-copy; 2001 - 2008 by Privoxy Developers -$Id: user-manual.sgml,v 2.25 2006/10/18 10:50:33 hal9 Exp $ +$Id: user-manual.sgml,v 2.66 2008/03/06 16:33:47 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 +210,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 +227,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 +262,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 +298,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 +329,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 @@ -363,7 +376,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,196 +436,156 @@ 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 many improvements and new features since Privoxy 3.0.6, 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. + Two new actions server-header-tagger + and client-header-tagger + that can be used to create arbitrary tags + based on client and server headers. + These tags can then subsequently be used + to control the other actions used for the current request, + greatly increasing &my-app;'s flexibility and selectivity. See tag patterns for more information on tags. + + + + + + Header filtering is done with dedicated header filters now. As a result + the actions filter-client-headers and filter-server-headers + that were introduced with Privoxy 3.0.5 to apply + content filters to the headers have been removed. + See the new actions server-header-filter + and client-header-filter for details. + + + + + There are four new options for the main config file: + + + + + + allow-cgi-request-crunching + which allows requests for Privoxy's internal CGI pages to be + blocked, redirected or (un)trusted like ordinary requests. + + + + + split-large-forms + that will work around a browser bug that caused IE6 and IE7 to + ignore the Submit button on the Privoxy's edit-actions-for-url CGI + page. + + + + + accept-intercepted-requests + which allows to combine Privoxy with any packet filter to create an + intercepting proxy for HTTP/1.1 requests (and for HTTP/1.0 requests + with Host header set). This means clients can be forced to use + &my-app; even if their proxy settings are configured differently. + + + + + templdir + to designate an alternate location for &my-app;'s + locally customized CGI templates so that + these are not overwritten during upgrades. + + + + + + + + A new command line option --pre-chroot-nslookup hostname to + initialize the resolver library before chroot'ing. On some systems this + reduces the number of files that must be copied into the chroot tree. + (Patch provided by Stephen Gildea) - - - - 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. - - - + The forward-override action + allows changing of the forwarding settings through the actions files. + Combined with tags, this allows to choose the forwarder based on + client headers like the User-Agent, or the request origin. + + - MS-Windows versions can now be - installed and - started as a Windows service. + The redirect action can now use regular + expression substitutions against the original URL. - config has two new options: - enable-remote-http-toggle, - and forwarded-connect-retries. + zlib support is now available as a compile + time option to filter compressed content. Patch provided by Wil Mahan. - - And there is improved handling of the user-manual - option, for placing documentation and help files on the local system. + + + + Improve various filters, and add new ones. - + + - There are six new filters. + Include support for RFC 3253 so that Subversion works + with &my-app;. Patch provided by Petr Kadlec. - 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. + Logging can be completely turned off by not specifying a logfile directive. - + + - 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. + A number of improvements to Privoxy's internal CGI pages, including the + use of favicons for error and control pages. - 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. - - - 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: - - - - { +filter{google} +prevent-compression } - .google. - - - 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). + Many bugfixes, memory leaks addressed, code improvements, and logging + improvements. - + + For a more detailed list of changes please have a look at the ChangeLog. + @@ -626,46 +600,74 @@ 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 now only includes the enabled actions. + Not all actions as before. + + + + + 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. + + + The filter-client-headers and + filter-server-headers actions that were introduced with + Privoxy 3.0.5 to apply content filters to + the headers have been removed and replaced with new actions. + See the What's New section above. + + + + + + - Some installers may not automatically start Privoxy after installation. +--> + @@ -730,7 +775,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 +794,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 +824,9 @@ How to install the binary packages depends on your operating system: + @@ -796,7 +849,7 @@ How to install the binary packages depends on your operating system: Now enjoy surfing with enhanced control, comfort and privacy! - + @@ -822,7 +875,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 +914,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 +933,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 +960,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 +1134,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 +1183,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 +1215,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 +1264,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 +1300,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,7 +1341,35 @@ Example Unix startup command: -Mac OSX +Mac OS X + + 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. + + + The privoxy service will automatically start after a successful + installation. In addition, the privoxy service will automatically + start 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. + + + 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. + During installation, Privoxy is configured to start automatically when the system restarts. To start &my-app; manually, @@ -1332,18 +1456,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 +1561,6 @@ must find a better place for this paragraph --pidfile FILE - On startup, write the process ID to FILE. Delete the @@ -1451,7 +1572,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 +1579,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 +1591,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 @@ -1578,6 +1715,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. + + @@ -1631,7 +1776,7 @@ for details. 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 + upgrades. standard.action is only for Privoxy's internal use. @@ -1664,12 +1809,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. + @@ -1773,7 +1915,7 @@ for details. - standard.action - is used by the web based editor + standard.action - is used only by the web based editor at http://config.privoxy.org/edit-actions-list?f=default, to set various pre-defined sets of rules for the default actions section @@ -1812,7 +1954,7 @@ for details. The default profiles, and their associated actions, as pre-defined in - standard.action are: + standard.action are: Default Configurations @@ -1943,12 +2085,12 @@ 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 +2109,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 +2136,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 +2154,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 +2174,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 +2206,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 +2214,7 @@ for details. - You can trace this process for any given URL by visiting http://config.privoxy.org/show-url-info. @@ -2088,7 +2237,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 @@ -2126,7 +2275,16 @@ for details. - www.example.com/index.html + 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 +2293,7 @@ for details. - /index.html + /index.html$ matches the document /index.html, regardless of the domain, @@ -2147,7 +2305,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 +2328,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 +2341,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 +2417,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. @@ -2309,7 +2471,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 +2486,7 @@ for details. - .example.com/(.*/)?index\.html + .example.com/(.*/)?index\.html$ This regular expression is conditional so it will match any page @@ -2364,6 +2526,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 +2636,7 @@ for details. -name # disable action name - Example: +block + Example: +handle-as-image @@ -2432,7 +2657,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 +2689,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 +2819,14 @@ for details. Type: - Boolean. + Parameterized. Parameter: - N/A + A block reason that should be given to the user. @@ -2610,15 +2835,22 @@ 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 + 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 block and handle-as-image, @@ -2647,18 +2879,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$ @@ -2668,11 +2900,169 @@ for details. + + +client-header-filter + + + + Typical use: + + + Rewrite or remove single client headers. + + + + + + Effect: + + + All client headers to which this action applies are filtered on-the-fly through + the specified regular expression based substitutions. + + + + + + Type: + + + Parameterized. + + + + + Parameter: + + + The name of a client-header filter, as defined in one of the + filter files. + + + + + + Notes: + + + 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. + + + Client-header filters are executed after the other header actions have finished + and use their output as input. + + + If the request URL gets changed, &my-app; will detect that and use the new + one. This can be used to rewrite the request destination behind the client's + back, for example to specify a Tor exit relay for certain requests. + + + Please refer to the filter file chapter + to learn which client-header filters are available by default, and how to + create your own. + + + + + + + Example usage (section): + + + +# Hide Tor exit notation in Host and Referer Headers +{+client-header-filter{hide-tor-exit-notation}} +/ + + + + + + + + + + + +client-header-tagger + + + + Typical use: + + + Block requests based on their headers. + + + + + + Effect: + + + 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: + + + Parameterized. + + + + + Parameter: + + + The name of a client-header tagger, as defined in one of the + filter files. + + + + + + Notes: + + + Client-header taggers are applied to each header on its own, + and as the header isn't modified, each tagger sees + the original. + + + Client-header taggers are the first actions that are executed + and their tags can be used to control every other action. + + + + + + Example usage (section): + + + +# Tag every request with the User-Agent header +{+client-header-tagger{user-agent}} +/ + + + + + + + + + - content-type-overwrite @@ -2747,10 +3137,9 @@ new action 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 + 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. @@ -2766,13 +3155,13 @@ new action # Check if www.example.net/ really uses valid XHTML -{+content-type-overwrite {application/xml}} +{ +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 +www.example.net/.*\.css$ +www.example.net/.*style @@ -2839,9 +3228,8 @@ new action 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. + parts of them, you should use a + client-header filter. @@ -2856,7 +3244,7 @@ new action # Block the non-existent "Privacy-Violation:" client header -{+crunch-client-header {Privacy-Violation:}} +{ +crunch-client-header{Privacy-Violation:} } / @@ -2917,12 +3305,12 @@ new action It is also useful to make sure the header isn't used as a cookie - replacement. + 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 as well. + isn't blocked or missing as well. It is recommended to use this action together with @@ -2937,10 +3325,11 @@ new 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} + # 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} / @@ -2958,7 +3347,7 @@ new action Typical use: - Prevent the web server from setting any cookies on your system + Prevent the web server from setting HTTP cookies on your system @@ -2993,10 +3382,10 @@ new action Notes: - This action is only concerned with incoming cookies. For - outgoing cookies, use + This action is only concerned with incoming HTTP cookies. For + outgoing HTTP cookies, use crunch-outgoing-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 @@ -3075,9 +3464,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 +3480,7 @@ new action # Crunch server headers that try to prevent caching -{+crunch-server-header {no-cache}} +{ +crunch-server-header{no-cache} } / @@ -3110,7 +3498,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 +3533,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 +3672,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 +3781,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 +3803,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 +3832,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 +3853,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 +3909,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 @@ -3635,7 +4024,7 @@ problem-host.example.com - +filter{ie-exploits} # Disable some known Internet Explorer bug exploits + +filter{ie-exploits} # Disable a known Internet Explorer bug exploits @@ -3657,22 +4046,10 @@ problem-host.example.com +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{no-ping} # Removes non-standard ping attributes from anchor and area tags - - - +filter{hide-tor-exit-notation} # Header filter to remove the Tor exit node notation in Host and Referer headers - @@ -3680,16 +4057,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. @@ -3697,16 +4074,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. @@ -3720,158 +4095,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 @@ -3879,7 +4140,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 @@ -3887,7 +4148,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. @@ -3896,16 +4157,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). + + + @@ -3913,17 +4198,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. @@ -3934,7 +4227,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$ @@ -3963,7 +4268,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. @@ -3994,6 +4299,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 @@ -4009,7 +4316,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$ @@ -4096,11 +4403,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 @@ -4262,6 +4566,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. + @@ -4270,10 +4578,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 @@ -4338,8 +4646,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 @@ -4348,7 +4656,8 @@ new action It is also recommended to use this action together with - crunch-if-none-match. + crunch-if-none-match, + otherwise it's more or less pointless. @@ -4357,10 +4666,10 @@ new action 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} + # 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} / @@ -4372,14 +4681,11 @@ new action hide-forwarded-for-headers - Typical use: - Improve privacy by hiding the true source of the request + Improve privacy by not forwarding the source of the request in the HTTP headers. @@ -4387,8 +4693,7 @@ new action Effect: - Deletes any existing X-Forwarded-for: HTTP header from client requests, - and prevents adding a new one. + Deletes any existing X-Forwarded-for: HTTP header from client requests. @@ -4414,13 +4719,7 @@ new action 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. + It is safe and recommended to leave this on. @@ -4546,6 +4845,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. @@ -4579,7 +4881,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. @@ -4618,7 +4920,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 @@ -4658,10 +4960,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). - @@ -4678,7 +4976,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. @@ -4698,14 +4999,11 @@ new action inspect-jpegs - Typical use: - To protect against the MS buffer over-run in JPEG processing + Try to protect against a MS buffer over-run in JPEG processing @@ -4744,117 +5042,22 @@ new action 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. + tries to prevent this exploit if delivered through unencrypted HTTP. - - + Example usage: - +kill-popups + +inspect-jpegs @@ -4905,26 +5108,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. @@ -4936,7 +5134,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 @@ -4993,23 +5191,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. + + + 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. - 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. + 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. @@ -5032,11 +5240,10 @@ new action { +prevent-compression } / # Match all sites -# Then maybe make exceptions for ill-behaved sites: +# Then maybe make exceptions for broken sites: # { -prevent-compression } - .debianhelp.org - www.pclinuxonline.com +.compusa.com/ @@ -5131,9 +5338,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} / @@ -5172,7 +5379,163 @@ new action Type: - Parameterized + Parameterized + + + + + Parameter: + + + An absolute URL or a single pcrs command. + + + + + + Notes: + + + Requests to which this action applies are answered with a + HTTP redirect to URLs of your choosing. The new URL is + either provided as parameter, or derived by applying a + single pcrs command to the original URL. + + + This action will be ignored if you use it together with + block. + It can be combined with + fast-redirects{check-decoded-url} + to redirect to a decoded version of a rewritten URL. + + + Use this action carefully, make sure not to create redirection loops + and be aware that using your own redirects might make it + possible to fingerprint your requests. + + + + + + Example usages: + + + # Replace example.com's style sheet with another one +{ +redirect{http://localhost/css-replacements/example.com.css} } + example.com/stylesheet\.css + +# Create a short, easy to remember nickname for a favorite site +# (relies on the browser accept and forward invalid URLs to &my-app;) +{ +redirect{http://www.privoxy.org/user-manual/actions-file.html} } + a + +# Always use the expanded view for Undeadly.org articles +# (Note the $ at the end of the URL pattern to make sure +# the request for the rewritten URL isn't redirected as well) +{+redirect{s@$@&mode=expanded@}} +undeadly.org/cgi\?action=article&sid=\d*$ + + + + + + + + + + +send-vanilla-wafer + + + + Typical use: + + + Feed log analysis scripts with useless data. + + + + + + Effect: + + + Sends a cookie with each request stating that you do not accept any copyright + on cookies sent to you, and asking the site operator not to track you. + + + + + + Type: + + + Boolean. + + + + + Parameter: + + + N/A + + + + + + Notes: + + + The vanilla wafer is a (relatively) unique header and could conceivably be used to track you. + + + This action is rarely used and not enabled in the default configuration. + + + + + + Example usage: + + + +send-vanilla-wafer + + + + + + + + + + +send-wafer + + + + Typical use: + + + Send custom cookies or feed log analysis scripts with even more useless data. + + + + + + Effect: + + + Sends a custom, user-defined cookie with each request. + + + + + + Type: + + + Multi-value. @@ -5180,7 +5543,8 @@ new action Parameter: - Any URL. + A string of the form name=value. @@ -5189,54 +5553,37 @@ 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. + Being multi-valued, multiple instances of this action can apply to the same request, + resulting in multiple cookies being sent. - This action will be ignored if you use it together with - block. + This action is rarely used and not enabled in the default configuration. - - Example usages: + Example usage (section): - # Replace example.com's style sheet with another one -{ +redirect{http://localhost/css-replacements/example.com.css} } - example.com/stylesheet.css - -# Create a short, easy to remember nickname for a favorite site -{ +redirect{http://www.privoxy.org/user-manual/actions-file.html} } - a + {+send-wafer{UsingPrivoxy=true}} +my-internal-testing-server.void - - -send-vanilla-wafer + +server-header-filter Typical use: - Feed log analysis scripts with useless data. + Rewrite or remove single server headers. @@ -5245,17 +5592,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. @@ -5263,7 +5610,8 @@ new action Parameter: - N/A + The name of a server-header filter, as defined in one of the + filter files. @@ -5272,20 +5620,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 + + @@ -5294,15 +5657,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. @@ -5311,16 +5674,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. @@ -5328,8 +5693,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. @@ -5338,23 +5703,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}} +/ + + + @@ -5550,7 +5930,7 @@ my-internal-testing-server.void +set-image-blocker{pattern} - Redirect to the BSD devil: + Redirect to the BSD daemon: +set-image-blocker{http://www.freebsd.org/gifs/dae_up3.gif} @@ -5567,89 +5947,6 @@ my-internal-testing-server.void - - -treat-forbidden-connects-like-blocks - - - - Typical use: - - Block forbidden connects with an easy to find error message. - - - - - Effect: - - - If this action is enabled, Privoxy no longer - makes a difference between forbidden connects and ordinary blocks. - - - - - - Type: - - - Boolean - - - - - Parameter: - - N/A - - - - - Notes: - - - By default Privoxy answers - forbidden Connect requests - with a short error message inside the headers. If the browser doesn't display - headers (most don't), you just see an empty page. - - - With this action enabled, Privoxy displays - the message that is used for ordinary blocks instead. If you decide - to make an exception for the page in question, you can do so by - following the See why link. - - - For Connect requests the clients tell - Privoxy which host they are interested - in, but not which document they plan to get later. As a result, the - Go there anyway 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. - - - 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). - - - - - - Example usage: - - - +treat-forbidden-connects-like-blocks - - - - - - - Summary @@ -5724,15 +6021,15 @@ new action # +crunch-all-cookies = +crunch-incoming-cookies +crunch-outgoing-cookies -crunch-all-cookies = -crunch-incoming-cookies -crunch-outgoing-cookies - +block-as-image = +block +handle-as-image + +block-as-image = +block{Blocked image.} +handle-as-image allow-all-cookies = -crunch-all-cookies -session-cookies-only -filter{content-cookies} # These aliases define combinations of actions # that are useful for certain types of sites: # - fragile = -block -filter -crunch-all-cookies -fast-redirects -hide-referrer -kill-popups -prevent-compression + fragile = -block -filter -crunch-all-cookies -fast-redirects -hide-referrer -prevent-compression - shop = -crunch-all-cookies -filter{all-popups} -kill-popups + shop = -crunch-all-cookies -filter{all-popups} # Short names for other aliases, for really lazy people ;-) # @@ -5767,7 +6064,7 @@ new action # These shops require pop-ups: # - {-kill-popups -filter{all-popups} -filter{unsolicted-popups}} + {-filter{all-popups} -filter{unsolicited-popups}} .dabs.com .overclockers.co.uk @@ -5838,14 +6135,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 + fragile = -block -filter -crunch-all-cookies -fast-redirects -hide-referrer + shop = -crunch-all-cookies -filter{all-popups} @@ -5868,8 +6165,7 @@ that also explains why and how aliases are used: 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 + + 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. @@ -5881,79 +6177,34 @@ that also explains why and how aliases are used: # "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 \ - -filter-no-ping \ - -filter-hide-tor-exit-notation \ - -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 default behavior is now set. + @@ -6004,8 +6255,7 @@ mail.google.com now. Mozilla users, who can turn on smart handling of unwanted pop-ups in their browsers, can safely choose - -filter{popups} (and - -kill-popups) above + -filter{popups} above and hence don't need this section. Anyway, disabling an already disabled action doesn't hurt, so we'll define our exceptions regardless of what was chosen in the defaults section: @@ -6015,7 +6265,7 @@ mail.google.com # These sites require pop-ups too :( # -{ -kill-popups -filter{popups} } +{ -filter{popups} } .dabs.com .overclockers.co.uk .deutsche-bank-24.de @@ -6118,7 +6368,7 @@ bs*.gsanet.com ########################################################################## # Block these fine banners: ########################################################################## -{ +block } +{ +block{Banner ads.} } # Generic patterns: # @@ -6242,7 +6492,7 @@ wiki. -# My user.action file. <fred@foobar.com> +# My user.action file. <fred@example.com> @@ -6264,14 +6514,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: @@ -6335,7 +6585,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: @@ -6343,9 +6593,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/ @@ -6391,8 +6641,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: @@ -6476,47 +6726,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 @@ -6533,7 +6808,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: @@ -6571,7 +6848,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: @@ -7194,7 +7471,7 @@ 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. @@ -7203,7 +7480,7 @@ pre-defined filters for your convenience: 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. @@ -7222,9 +7499,33 @@ pre-defined filters for your convenience: hide-tor-exit-notation - Header filter to remove the Tor exit node 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. + @@ -7273,11 +7574,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. @@ -7717,8 +8024,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:
@@ -7828,8 +8137,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: @@ -7855,10 +8165,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). @@ -7886,8 +8199,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). @@ -7903,14 +8216,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 @@ -7923,7 +8229,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 @@ -7935,14 +8241,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. + @@ -7969,7 +8283,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 @@ -8011,73 +8327,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 - +deanimate-gifs {last} - -downgrade-http-version + {+deanimate-gifs {last} +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 {no-ping} - -filter{hide-tor-exit-notation} - -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 } @@ -8155,6 +8421,7 @@ In file: user.action [ View ] [ Edit ][ View ] [ Edit ][ View ] [ Edit ][ View ] [ Edit ] + +set-image-blocker {pattern} @@ -8232,21 +8494,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 @@ -8261,7 +8523,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 @@ -8282,6 +8544,7 @@ In file: user.action [ View ] [ Edit ][ View ] [ Edit ][ View ] [ Edit ] @@ -8385,7 +8643,7 @@ In file: user.action [ View ] [ Edit ] - { +block +handle-as-image } + { +block{Path starts with "ads".} +handle-as-image } /ads @@ -8437,7 +8695,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. @@ -8466,8 +8724,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. @@ -8501,6 +8759,156 @@ In file: user.action [ View ] [ Edit ][ View ] [ Edit ][ View ] [ Edit ][ View ] [ Edit ][ View ] [ Edit ]