X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=blobdiff_plain;f=doc%2Fsource%2Fuser-manual.sgml;h=4dbeddadb6c4acb6eadd1594a1d836aa1cb7ff91;hp=ecd6a88277ca313e90c21324972948c017f429e1;hb=07cf496b6edcbd3cf315ec7c48f2c94be27357b1;hpb=485d3cf97bd4f0aeb155827fe41a6d7aea1833a4 diff --git a/doc/source/user-manual.sgml b/doc/source/user-manual.sgml index ecd6a882..4dbeddad 100644 --- a/doc/source/user-manual.sgml +++ b/doc/source/user-manual.sgml @@ -1,5 +1,5 @@ + @@ -11,11 +11,11 @@ - - + + - - + + @@ -24,6 +24,7 @@ + Privoxy"> ]> - Copyright &my-copy; 2001 - 2007 by + Copyright &my-copy; 2001-2011 by Privoxy Developers -$Id: user-manual.sgml,v 2.40 2007/11/10 17:10:59 fabiankeil Exp $ +$Id: user-manual.sgml,v 2.137 2011/11/13 17:02:59 fabiankeil Exp $ Since this is a &p-status; version, not all new features are well tested. This - documentation may be slightly out of sync as a result (especially with + documentation may be slightly out of sync as a result (especially with CVS sources). And there may be bugs, though hopefully - not many! + not many! ]]> Features - In addition to the core - features of ad blocking and + In addition to the core + features of ad blocking and cookie management, Privoxy provides many supplemental - features, + features, that give the end-user more control, more privacy and more freedom: @@ -164,14 +165,14 @@ Hal. - Note: - On some platforms, the installer may remove previously installed versions, if + Note: + On some platforms, the installer may remove previously installed versions, if found. (See below for your platform). In any case be sure to backup your old configuration if it is valuable to you. See the note to upgraders section below. - + Binary Packages How to install the binary packages depends on your operating system: @@ -184,7 +185,7 @@ How to install the binary packages depends on your operating system: RPMs can be installed with rpm -Uvh privoxy-&p-version;-1.rpm, - and will use /etc/privoxy for the location + and will use /etc/privoxy for the location of configuration files. @@ -192,13 +193,13 @@ How to install the binary packages depends on your operating system: Note that on Red Hat, Privoxy will not be automatically started on system boot. You will need to enable that using chkconfig, - ntsysv, or similar methods. + ntsysv, or similar methods. - If you have problems with failed dependencies, try rebuilding the SRC RPM: - rpm --rebuild privoxy-&p-version;-1.src.rpm. This - will use your locally installed libraries and RPM version. + If you have problems with failed dependencies, try rebuilding the SRC RPM: + rpm --rebuild privoxy-&p-version;-1.src.rpm. This + will use your locally installed libraries and RPM version. @@ -210,10 +211,10 @@ 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 + and will use /etc/privoxy for the location of configuration files. @@ -224,7 +225,7 @@ How to install the binary packages depends on your operating system: Just double-click the installer, which will guide you through the installation process. You will find the configuration files - in the same directory as you installed Privoxy in. + in the same directory as you installed Privoxy in. Version 3.0.5 beta introduced full Windows service @@ -255,7 +256,7 @@ How to install the binary packages depends on your operating system: command: services.msc. If you do not take the manual step of modifying Privoxy's service settings, it will not start. Note too that you will need to give Privoxy a user account that - actually exists, or it will not be permitted to + actually exists, or it will not be permitted to write to its log and configuration files. @@ -276,7 +277,7 @@ How to install the binary packages depends on your operating system: First, make sure that no previous installations of - Junkbuster and / or + Junkbuster and / or Privoxy are left on your system. Check that no Junkbuster or Privoxy objects are in @@ -298,41 +299,33 @@ 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). AmigaOS - Copy and then unpack the lha archive to a suitable location. + Copy and then unpack the lha archive to a suitable location. All necessary files will be installed into Privoxy - directory, including all configuration and log files. To uninstall, just + directory, including all configuration and log files. To uninstall, just remove this directory. @@ -359,19 +352,19 @@ How to install the binary packages depends on your operating system: Gentoo - Gentoo source packages (Ebuilds) for Privoxy are - contained in the Gentoo Portage Tree (they are not on the download page, - but there is a Gentoo section, where you can see when a new + Gentoo source packages (Ebuilds) for Privoxy are + contained in the Gentoo Portage Tree (they are not on the download page, + but there is a Gentoo section, where you can see when a new Privoxy Version is added to the Portage Tree). - Before installing Privoxy under Gentoo just do - first emerge rsync to get the latest changes from the - Portage tree. With emerge privoxy you install the latest + Before installing Privoxy under Gentoo just do + first emerge --sync to get the latest changes from the + Portage tree. With emerge privoxy you install the latest version. - Configuration files are in /etc/privoxy, the + Configuration files are in /etc/privoxy, the documentation is in /usr/share/doc/privoxy-&p-version; and the Log directory is in /var/log/privoxy. @@ -384,7 +377,7 @@ 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 + is to download the source tarball from our project download page. @@ -393,8 +386,8 @@ How to install the binary packages depends on your operating system: If you like to live on the bleeding edge and are not afraid of using possibly unstable development versions, you can check out the up-to-the-minute version directly from the - CVS repository. - - + Keeping your Installation Up-to-Date As user feedback comes in and development continues, we will make updated versions @@ -427,7 +420,7 @@ How to install the binary packages depends on your operating system: In order not to lose your personal changes and adjustments when updating to the latest default.action file we strongly - recommend that you use user.action and + recommend that you use user.action and user.filter for your local customizations of Privoxy. See the Chapter on actions files for details. @@ -444,309 +437,989 @@ How to install the binary packages depends on your operating system: What's New in this Release - There are many improvements and new features since Privoxy 3.0.6, the last stable release: + Privoxy 3.0.18 is a stable release. + The changes since 3.0.17 stable are: - - - Two new actions server-header-tagger - and client-header-tagger - that can be used to apply arbitrary tags to - each request's headers. These tags can then - subsequently be used by other actions, greatly increasing - &my-app;'s flexibity and selectivity. See tag patterns for more on tags. - - - - - - - Header filtering can be 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 - the content filters to the headers as, well have been removed again. - See the new actions server-header-filter - and client-header-filter. - - - + - 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 will 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) so that explicitly setting the browser's proxy settings - is not necessary. - - - - - templdir - to designate an alternate location for Privoxy's own CGI templates - to make sure any locally customized templates aren't overwritten - during upgrades. - - - + Bug fixes: + + + + Fix a logic bug that could cause Privoxy to reuse a tainted + server socket. + It could happen for server sockets that got tainted by a + server-header-tagger-induced block, in which case Privoxy + doesn't necessarily read the whole server response. + If keep-alive was enabled and the request following the + blocked one was to the same host and using the same + forwarding settings, Privoxy would send it on the tainted + server socket. + While the server would simply treat it as a pipelined request, + Privoxy would later on fail to properly parse the server's + response as it would try to parse the unread data from the + first response as server headers for the second one. + Regression introduced in 3.0.17. + - - - - A new command line option --pre-chroot-nslookup hostname to - intialize 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) - - - - - - The forward-override action - allows changing of the forwarding settings based on client headers like the - User-Agent, or the request origin. - - - - - - The redirect action can now use regular - expression substitutions against the original URL. - - - - - - zlib support is now available as a compile - time option for compressed documents. - - - - Improve various filters, and add new ones. + + When implying keep-alive in client_connection(), remember that the client didn't + Fixes a regression introduced in 3.0.13 that would cause + Privoxy to wait for additional client requests after + receiving a HTTP/1.1 request with "Connection: close" set + and connection sharing enabled. + With clients like curl which terminates the client connection + after detecting that the whole body has been received it doesn't + really matter, but with clients like FreeBSD's fetch the client + connection would be kept open until it timed out. + + + + + Fix a subtle race condition between prepare_csp_for_next_request() and sweep() + A thread preparing itself for the next client request + could briefly appear to be inactive. + If all other threads were already using more recent files, + the thread could get its files swept away under its feet. + I've only seen it while stress testing in valgrind while + touching action files in a loop. It's unlikely to have + caused any actual problems in the real world. + + + - - - Include support for RFC 3253 so that Subversion works - with &my-app;. + General improvements: + + + + Privoxy can (re)compress buffered content before delivering + it to the client. Disabled by default as most users wouldn't + benefit from it. + + + + + The +fast-redirects{check-decoded-url} action checks URL + segments separately. + If there are other parameters behind the redirect URL, + this makes it unnecessary to cut them of by additionally + using a +redirect{} pcrs command. + Initial patch submitted by Jamie Zawinski in #3429848. + + + + + Properly deal with FEATURE_TOGGLE being disabled + + + + + Adjust url_code_map[] so spaces are replaced with %20 instead of '+' + While '+' can be used by client's submitting form data, this is not + actually what Privoxy is using the lookups for. This is more of a + cosmetic issue and doesn't fix any actual problems I'm aware of. + + + + + When compiled without FEATURE_FAST_REDIRECTS, do not silently + ignore +fast-redirect{} directives + + + + + Added a workaround for GNU libc's strptime() reporting negative + year values when the parsed year is only specified with two digits. + On affected systems cookies with such a date would not be turned + into session cookies by the +session-cookies-only action. + Reported by Vaeinoe in #3403560 + + + + + When loading action sections, verify that the referenced filters exist + Currently missing filters only result in an error message, + but eventually the severity will be upgraded to fatal. + + + + + Allow to bind to multiple separate addresses. + Patch set submitted by Petr Pisar in #3354485. + + + + + Set socket_error to errno if connecting fails in rfc2553_connect_to() + Previously rejected direct connections could be incorrectly reported as DNS issues. + + + + + Fixed bind failures with certain GNU libc versions if no non-loopback + IP address has been configured on the system. This is mainly an issue + if the system is using DHCP and Privoxy is started before the network + is completely configured. + Reported by Raphael Marichez in #3349356. + Additional insight from Petr Pisar. + + + + + Disable filters if SDCH compression is used unless filtering is forced. + If SDCH was combined with a supported compression algorithm, + we'd previously try to decompress it, when successful apply + the enabled filters and ditch the Content-Encoding header + even though the SDCH compression wasn't removed. + Reported by zebul666 in #3225863. + + + + + Privoxy log messages now use the ISO 8601 date format %Y-%m-%d. + It's only slightly longer than the old format, but contains + the full date including the year and allows sorting by date + (when grepping in multiple log files) without hassle. + + + + + Make a copy of the --user value and only mess with that when splitting user and group. + On some operating systems modifying the value directly + is reflected in the output of ps and friends and can + be misleading. + Reported by zepard in #3292710. + + + + + If forwarded-connect-retries is set, only retry if the we are actually + forwarding the request. Previously direct connections would be retried + as well. + + + + + Fixed a small memory leak when retrying connection + + + + + Remove an incorrect assertion in compile_dynamic_pcrs_job_list() + It could be triggered by a pcrs job with an invalid pcre + pattern (for example one that contains a lone quantifier). + + + - - Logging can be turned on or off. + Action file improvements: + + + + Moved the site-specific block pattern section below the one for the + generic patterns so for requests that are matched in both, the block + reason for the domain is shown which is usually more useful than showing + the one for the generic pattern. + + + + + Add a (disabled) section to block various Facebook tracking URLs + Reported by Dan Stahlke in #3421764. + + + + + Add a (disabled) section to rewrite and redirect click-tracking URLs used on news.google.com + Reported by Dan Stahlke in #3421755. + + + + + Unblock linuxcounter.net/ + Reported by Dan Stahlke in #3422612. + + + + + Block 'www91.intel.com/' which is used by Omniture. + Reported by Adam Piggott in #3167370. + + + + + Disable the handle-as-empty-doc-returns-ok option and mark it as deprecated. + Reminded by tceverling in #2790091. + + + + + Add ".ivwbox.de/" to the "Cross-site user tracking" section. + Reported by Nettozahler in #3172525. + + + + + Unblock and fast-redirect ".awin1.com/.*=http://" + Reported by Adam Piggott in #3170921. + + + + + Block "b.collective-media.net/". + + + + + Widen the Debian popcon exception to "qa.debian.org/popcon". + Seen in Debian's 05_default_action.dpatch by Roland Rosenfeld. + + + + + Block ".gemius.pl/" which only seems to be used for user tracking. + Reported by johnd16 in #3002731. Additional input from Lee and movax. + + + + + Disable banners-by-size filters for '.thinkgeek.com/' + The filter only seems to catch pictures of the inventory. + + + + + Block requests for 'go.idmnet.bbelements.com/please/showit/' + Reported by kacperdominik in #3372959. + + + + + Unblock adainitiative.org/ + + + + + Add a fast-redirects exception for '.googleusercontent.com/.*=cache' + + + + + Add a fast-redirects exception for webcache.googleusercontent.com/ + + + + + Remove -prevent-compression from the fragile alias + It's no longer used anywhere by default and isn't + known to break stuff anyway. + + + + + Unblock http://adassier.wordpress.com/ and http://adassier.files.wordpress.com/ + + + - - - A number of improvements to Privoxy's internal CGI pages, including the - use of favicons for error and control pages. + Filter file improvements: + + + + Let the yahoo filter hide '.ads' + + + + + Let the msn filter hide overlay ads for Facebook 'likes' in search results. + + + + + Let the msn filter hide elements with the id 's_notf_div'. + They only seem to be used to advertise site 'enhancements'. + + + + + Let the js-events filter additionally disarm setInterval() + Suggested by dg1727 in #3423775. + + + - - Many bugfixes, memory leaks addressed, code improvements, and logging - improvments. - - - - - - + Note to Upgraders - A quick list of things to be aware of before upgrading from earlier + A quick list of things to be aware of before upgrading from earlier versions of Privoxy: @@ -754,82 +1427,66 @@ How to install the binary packages depends on your operating system: - - Some installers may remove earlier versions completely, including - configuration files. Save any important configuration files! + + The recommended way to upgrade &my-app; is to backup your old + configuration files, install the new ones, verify that &my-app; + is working correctly and finally merge back your changes using + diff and maybe patch. + + + There are a number of new features in each &my-app; release and + most of them have to be explicitly enabled in the configuration + files. Old configuration files obviously don't do that and due + to syntax changes using old configuration files with a new + &my-app; isn't always possible anyway. - - On the other hand, other installers may not overwrite any existing configuration - files, thinking you will want to do that. You may want to manually check - your saved files against the newer versions to see if the improvements have - merit, or whether there are new options that you may want to consider. - There are a number of new features, but most won't be available unless - these features are incorporated into your configuration somehow. + + Note that some installers remove earlier versions completely, + including configuration files, therefore you should really save + any important configuration files! - - standard.action now only includes the enabled actions. - Not all actions as before. + + On the other hand, other installers don't overwrite existing configuration + files, thinking you will want to do that yourself. - + + standard.action has been merged into + the default.action file. + + - - Logging is off by default now. If you need logging, it can be turned on - in the config file. - - + + In the default configuration only fatal errors are logged now. + You can change that in the debug section + of the configuration file. You may also want to enable more verbose + logging until you verified that the new &my-app; version is working + as expected. + + - Three other config file settings are now off by default: + Three other config file settings are now off by default: enable-remote-toggle, enable-remote-http-toggle, - and enable-edit-actions. + 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. + 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 the content filters to - the headers as, well have been removed and replaced with new actions. - See the What's New section above. - - - - @@ -903,19 +1560,19 @@ How to install the binary packages depends on your operating system: Install Privoxy. See the Installation Section below for platform specific - information. + information. - + Advanced users and those who want to offer Privoxy service to more than just their local machine should check the main config file, especially the security-relevant options. These are + linkend="access-control">security-relevant options. These are off by default. - + @@ -931,26 +1588,26 @@ How to install the binary packages depends on your operating system: HTTPS (SSL) proxy by setting the proxy configuration for address of 127.0.0.1 and port 8118. - DO NOT activate proxying for FTP or + DO NOT activate proxying for FTP or any protocols besides HTTP and HTTPS (SSL) unless you intend to prevent your browser from using these protocols. - + Flush your browser's disk and memory caches, to remove any cached ad images. - If using Privoxy to manage + If using Privoxy to manage cookies, you should remove any currently stored cookies too. - + - A default installation should provide a reasonable starting point for + 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 + configuration, but that can be dealt with as the need arises. Little to no initial configuration is required in most cases, you may want to enable the web-based action editor though. @@ -964,7 +1621,7 @@ How to install the binary packages depends on your operating system: introduction to how Privoxy blocks ads and banners. - + @@ -979,7 +1636,7 @@ How to install the binary packages depends on your operating system: Action has hints on how to understand and debug actions that misbehave. - + Please see the section Contacting the Developers on how to report bugs, problems with websites or to get - help. + help. - + Now enjoy surfing with enhanced control, comfort and privacy! - + @@ -1016,35 +1673,35 @@ How to install the binary packages depends on your operating system: Quickstart to Ad Blocking Ad blocking is but one of Privoxy's - array of features. Many of these features are for the technically minded advanced + array of features. Many of these features are for the technically minded advanced user. But, ad and banner blocking is surely common ground for everybody. - - This section will provide a quick summary of ad blocking so + + This section will provide a quick summary of ad blocking so you can get up to speed quickly without having to read the more extensive information provided below, though this is highly recommended. 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. And the more likely that some things + more aggressive you are about it, the more likely you are to block + 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 - not an easy way to eliminate all ads. Either take + configuration to solve these unintended consequences. In short, there is + not an easy way to eliminate all ads. Either take the easy way and settle for most ads blocked with the default configuration, or jump in and tweak it for your personal surfing habits and preferences. Secondly, a brief explanation of Privoxy's - actions. Actions in this context, are + actions. Actions in this context, are the directives we use to tell Privoxy to perform some task relating to HTTP transactions (i.e. web browsing). We tell Privoxy to take some action. Each @@ -1056,7 +1713,7 @@ How to install the binary packages depends on your operating system: Actions are specified in Privoxy's configuration, - followed by one or more URLs to which the action should apply. URLs + followed by one or more URLs to which the action should apply. URLs can actually be URL type patterns that use wildcards so they can apply potentially to a range of similar URLs. The actions, together with the URL patterns are called a section. @@ -1079,7 +1736,7 @@ How to install the binary packages depends on your operating system: The most important actions for basic ad blocking are: block, handle-as-image, + linkend="handle-as-image">handle-as-image, handle-as-empty-document,and set-image-blocker: @@ -1087,10 +1744,10 @@ How to install the binary packages depends on your operating system: - + - block - this is perhaps + 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, @@ -1099,32 +1756,32 @@ How to install the binary packages depends on your operating system: Privoxy's own built-in BLOCKED page instead to let you now what has happened (with some exceptions, see below). - + - handle-as-image - + handle-as-image - tells Privoxy to treat this URL as an image. Privoxy's default configuration already does this for all common image types (e.g. GIF), but there are many situations where this is not so easy to determine. So we'll force it in these cases. This is particularly important for ad blocking, since only if we know that it's an image of - some kind, can we replace it with an image of our choosing, instead of the + some kind, can we replace it with an image of our choosing, instead of the Privoxy BLOCKED page (which would only result in a broken image icon). There are some limitations to this though. For instance, you can't just brute-force an image substitution for an entire HTML page in most situations. - + - 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 + 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. - + @@ -1141,7 +1798,7 @@ How to install the binary packages depends on your operating system: -    pattern - a checkerboard pattern, so that an ad +    pattern - a checkerboard pattern, so that an ad replacement is obvious. This is the default. @@ -1157,16 +1814,29 @@ How to install the binary packages depends on your operating system: of the user's choosing (advanced usage). - + + + 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 + (shortcut: http://p.p/show-status). This is an internal page, and does not require Internet access. @@ -1198,21 +1868,21 @@ How to install the binary packages depends on your operating system: - Right click on the ad image to be blocked, then select + Right click on the ad image to be blocked, then select Copy Link Location from the - pop-up menu. + pop-up menu. - + - Set your browser to + Set your browser to http://config.privoxy.org/show-status - + - Find user.action in the top section, and click + Find user.action in the top section, and click on Edit: @@ -1222,29 +1892,29 @@ How to install the binary packages depends on your operating system: - + [ Screenshot of Actions Files in Use ] - - + + You should have a section with only - block listed under + block listed under Actions:. If not, click a Insert new section below - button, and in the new section that just appeared, click the + button, and in the new section that just appeared, click the Edit button right under the word Actions:. This will bring up a list of all actions. Find block near the top, and click in the Enabled column, then Submit just below the list. - + Now, in the block actions section, @@ -1254,21 +1924,21 @@ How to install the binary packages depends on your operating system: Submit (or OK if in a pop-up window). - + Now go back to the original page, and press SHIFT-Reload (or flush all browser caches). The image should be gone now. - - + + - This is a very crude and simple example. There might be good reasons to use a + This is a very crude and simple example. There might be good reasons to use a wildcard pattern match to include potentially similar images from the same - site. For a more extensive explanation of patterns, and + site. For a more extensive explanation of patterns, and the entire actions concept, see the Actions section. @@ -1279,11 +1949,11 @@ How to install the binary packages depends on your operating system: 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 + 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. + depth in later sections. @@ -1299,14 +1969,14 @@ How to install the binary packages depends on your operating system: Before launching Privoxy for the first time, you will want to configure your browser(s) to use - Privoxy as a HTTP and HTTPS (SSL) + Privoxy as a HTTP and HTTPS (SSL) proxy. The default is 127.0.0.1 (or localhost) for the proxy address, and port 8118 (earlier versions used port 8000). This is the one configuration step that must be done ! - Please note that Privoxy can only proxy HTTP and + Please note that Privoxy can only proxy HTTP and HTTPS traffic. It will not work with FTP or other protocols. @@ -1317,35 +1987,35 @@ How to install the binary packages depends on your operating system: - + [ Screenshot of Mozilla Proxy Configuration ] - - + + 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 - + With Netscape (and Mozilla), this can be set under: @@ -1359,7 +2029,7 @@ How to install the binary packages depends on your operating system: - For Internet Explorer v.5-6: + For Internet Explorer v.5-7: @@ -1381,7 +2051,7 @@ How to install the binary packages depends on your operating system: - + [ Screenshot of IE Proxy Configuration ] @@ -1392,7 +2062,7 @@ How to install the binary packages depends on your operating system: After doing this, flush your browser's disk and memory caches to force a - re-reading of all pages and to get rid of any ads that may be cached. Remove + re-reading of all pages and to get rid of any ads that may be cached. Remove any cookies, if you want Privoxy to manage that. You are now ready to start enjoying the benefits of using @@ -1444,23 +2114,6 @@ How to install the binary packages depends on your operating system: - Windows @@ -1473,7 +2126,7 @@ Click on the &my-app; Icon to start Privoxy. If no co Privoxy can run with full Windows service functionality. On Windows only, the &my-app; program has two new command line arguments - to install and uninstall &my-app; as a service. See the + to install and uninstall &my-app; as a service. See the Windows Installation instructions for details. @@ -1502,21 +2155,34 @@ Example Unix startup command: -Mac OSX +Mac OS X - During installation, Privoxy is configured to - start automatically when the system restarts. To start &my-app; manually, - double-click on the StartPrivoxy.command icon in the - /Library/Privoxy folder. Or, type this command - in the Terminal: + After downloading the privoxy software, unzip the downloaded file by + double-clicking on the zip file icon. Then, double-click on the + installer package icon and follow the installation process. + + + 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. - - /Library/Privoxy/StartPrivoxy.command - + 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. - You will be prompted for the administrator password. + An administrator username and password must be supplied in order for + the Privoxy Utility to perform any of the tasks. @@ -1527,7 +2193,7 @@ Example Unix startup command: Start Privoxy (with RUN <>NIL:) in your startnet script (AmiTCP), in s:user-startup (RoadShow), as startup program in your - startup script (Genesis), or as startup action (Miami and MiamiDx). + startup script (Genesis), or as startup action (Miami and MiamiDx). Privoxy will automatically quit when you quit your TCP/IP stack (just ignore the harmless warning your TCP/IP stack may display that Privoxy is still running). @@ -1537,7 +2203,7 @@ Example Unix startup command: Gentoo - A script is again used. It will use the file /etc/privoxy/config + A script is again used. It will use the file /etc/privoxy/config as its main configuration file. @@ -1546,11 +2212,11 @@ Example Unix startup command: - Note that Privoxy is not automatically started at - boot time by default. You can change this with the rc-update + Note that Privoxy is not automatically started at + boot time by default. You can change this with the rc-update command. - + rc-update add privoxy default @@ -1572,7 +2238,7 @@ must find a better place for this paragraph actions files. These are where various cookie actions are defined, ad and banner blocking, and other aspects of Privoxy configuration. There are several - such files included, with varying levels of aggressiveness. + such files included, with varying levels of aggressiveness. @@ -1589,12 +2255,10 @@ 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 - popups (explained below). + sites is the popup-killing (through +filter{popups}), + because your favorite shopping, banking, or leisure site may need + popups (explained below). @@ -1610,24 +2274,24 @@ must find a better place for this paragraph - After running Privoxy for a while, you can - start to fine tune the configuration to suit your personal, or site, - preferences and requirements. There are many, many aspects that can - be customized. Actions - can be adjusted by pointing your browser to + After running Privoxy for a while, you can + start to fine tune the configuration to suit your personal, or site, + preferences and requirements. There are many, many aspects that can + be customized. Actions + can be adjusted by pointing your browser to http://config.privoxy.org/ - (shortcut: http://p.p/), - and then follow the link to View & Change the Current Configuration. + (shortcut: http://p.p/), + and then follow the link to View & Change the Current Configuration. (This is an internal page and does not require Internet access.) In fact, various aspects of Privoxy - configuration can be viewed from this page, including - current configuration parameters, source code version numbers, - the browser's request headers, and actions that apply - to a given URL. In addition to the actions file - editor mentioned above, Privoxy can also + configuration can be viewed from this page, including + current configuration parameters, source code version numbers, + the browser's request headers, and actions that apply + to a given URL. In addition to the actions file + editor mentioned above, Privoxy can also be turned on and off (toggled) from this page. @@ -1650,9 +2314,9 @@ must find a better place for this paragraph If you can't get rid of the problem at all, think you've found a bug in - Privoxy, want to propose a new feature or smarter rules, please see the + Privoxy, want to propose a new feature or smarter rules, please see the section Contacting the - Developers below. + Developers below. --> @@ -1675,7 +2339,7 @@ must find a better place for this paragraph Print version info and exit. Unix only. - + --help @@ -1683,7 +2347,7 @@ must find a better place for this paragraph Print short usage info and exit. Unix only. - + --no-daemon @@ -1692,7 +2356,7 @@ must find a better place for this paragraph Don't become a daemon, i.e. don't fork and become process group leader, and don't detach from controlling tty. Unix only. - + --pidfile FILE @@ -1703,7 +2367,7 @@ must find a better place for this paragraph FILE is non-fatal. If no FILE option is given, no PID file will be used. Unix only. - + --user USER[.GROUP] @@ -1719,9 +2383,9 @@ must find a better place for this paragraph --chroot - Before changing to the user ID given in the --user option, + Before changing to the user ID given in the --user option, chroot to that user's home directory, i.e. make the kernel pretend to the &my-app; - process that the directory tree starts there. If set up carefully, this can limit + process that the directory tree starts there. If set up carefully, this can limit the impact of possible vulnerabilities in &my-app; to the files contained in that hierarchy. Unix only. @@ -1749,23 +2413,23 @@ must find a better place for this paragraph configfile - If no configfile is included on the command line, - Privoxy will look for a file named - config in the current directory (except on Win32 - where it will look for config.txt instead). Specify - full path to avoid confusion. If no config file is found, + If no configfile is included on the command line, + Privoxy will look for a file named + config in the current directory (except on Win32 + where it will look for config.txt instead). Specify + full path to avoid confusion. If no config file is found, Privoxy will fail to start. - + - On MS Windows only there are two additional - command-line options to allow Privoxy to install and - run as a service. See the -Window Installation section + On MS Windows only there are two additional + command-line options to allow Privoxy to install and + run as a service. See the +Window Installation section for details. @@ -1779,9 +2443,9 @@ for details. Privoxy Configuration - All Privoxy configuration is stored + All Privoxy configuration is stored in text files. These files can be edited with a text editor. - Many important aspects of Privoxy can + Many important aspects of Privoxy can also be controlled easily with a web browser. @@ -1791,9 +2455,9 @@ for details. Controlling Privoxy with Your Web Browser - Privoxy's user interface can be reached through the special + Privoxy's user interface can be reached through the special URL http://config.privoxy.org/ - (shortcut: http://p.p/), + (shortcut: http://p.p/), which is a built-in page and works without Internet access. You will see the following section: @@ -1821,8 +2485,8 @@ for details.         ▪  Toggle Privoxy on or off -         ▪  Documentation +         ▪  Documentation @@ -1835,14 +2499,14 @@ for details. cookie, and URL blocking magic is configured as well as other advanced features of Privoxy. This is an easy way to adjust various aspects of Privoxy configuration. The actions - file, and other configuration files, are explained in detail below. + file, and other configuration files, are explained in detail below. - Toggle Privoxy On or Off is handy for sites that might + Toggle Privoxy On or Off is handy for sites that might have problems with your current actions and filters. You can in fact use - it as a test to see whether it is Privoxy - causing the problem or not. Privoxy continues + it as a test to see whether it is Privoxy + causing the problem or not. Privoxy continues to run as a proxy in this case, but all manipulation is disabled, i.e. Privoxy acts like a normal forwarding proxy. There is even a toggle Bookmarklet offered, so @@ -1872,14 +2536,14 @@ for details. For Unix, *BSD and Linux, all configuration files are located in /etc/privoxy/ by default. For MS Windows, OS/2, and - AmigaOS these are all in the same directory as the + AmigaOS these are all in the same directory as the Privoxy executable. - The installed defaults provide a reasonable starting point, though + The installed defaults provide a reasonable starting point, though some settings may be aggressive by some standards. For the time being, the principle configuration files are: @@ -1893,36 +2557,37 @@ for details. on Linux, Unix, BSD, OS/2, and AmigaOS and config.txt on Windows. This is a required file. - + - default.action (the main actions file) - is used to define which actions relating to banner-blocking, images, pop-ups, - content modification, cookie handling etc should be applied by default. It also defines many - exceptions (both positive and negative) from this default set of actions that enable - Privoxy to selectively eliminate the junk, and only the junk, on - as many websites as possible. + match-all.action is used to define which actions + relating to banner-blocking, images, pop-ups, content modification, cookie handling + etc should be applied by default. It should be the first actions file loaded. + + + default.action defines many exceptions (both positive and negative) + from the default set of actions that's configured in match-all.action. + It should be the second actions file loaded and shouldn't be edited by the user. - Multiple actions files may be defined in config. These - are processed in the order they are defined. Local customizations and locally - preferred exceptions to the default policies as defined in - default.action (which you will most probably want - to define sooner or later) are probably best applied in - user.action, where you can preserve them across - upgrades. standard.action is only for - Privoxy's internal use. + Multiple actions files may be defined in config. These + are processed in the order they are defined. Local customizations and locally + preferred exceptions to the default policies as defined in + match-all.action (which you will most probably want + to define sooner or later) are best applied in user.action, + where you can preserve them across upgrades. The file isn't installed by all + installers, but you can easily create it yourself with a text editor. - + There is also a web based editor that can be accessed from http://config.privoxy.org/show-status (Shortcut: http://p.p/show-status) for the - various actions files. + various actions files. - + @@ -1930,15 +2595,15 @@ for details. file) can be used to re-write the raw page content, including viewable text as well as embedded HTML and JavaScript, and whatever else lurks on any given web page. The filtering jobs are only pre-defined here; - whether to apply them or not is up to the actions files. - default.filter includes various filters made - available for use by the developers. Some are much more intrusive than - others, and all should be used with caution. You may define additional - filter files in config as you can with - actions files. We suggest user.filter for any + whether to apply them or not is up to the actions files. + default.filter includes various filters made + available for use by the developers. Some are much more intrusive than + others, and all should be used with caution. You may define additional + filter files in config as you can with + actions files. We suggest user.filter for any locally defined filters or customizations. - + @@ -1960,15 +2625,15 @@ for details. - The actions files and filter files + The actions files and filter files can use Perl style regular expressions for - maximum flexibility. + maximum flexibility. After making any changes, there is no need to restart Privoxy in order for the changes to take - effect. Privoxy detects such changes + effect. Privoxy detects such changes automatically. Note, however, that it may take one or two additional requests for the change to take effect. When changing the listening address of Privoxy, these wake up requests @@ -1977,9 +2642,9 @@ for details. - While under development, the configuration content is subject to change. - The below documentation may not be accurate by the time you read this. - Also, what constitutes a default setting, may change, so + While under development, the configuration content is subject to change. + The below documentation may not be accurate by the time you read this. + Also, what constitutes a default setting, may change, so please check all your configuration files on important issues. ]]> @@ -2006,92 +2671,91 @@ for details. Actions Files + + The actions files are used to define what actions Privoxy takes for which URLs, and thus determines how ad images, cookies and various other aspects of HTTP content and - transactions are handled, and on which sites (or even parts thereof). + transactions are handled, and on which sites (or even parts thereof). There are a number of such actions, with a wide range of functionality. Each action does something a little different. - These actions give us a veritable arsenal of tools with which to exert - our control, preferences and independence. Actions can be combined so that + These actions give us a veritable arsenal of tools with which to exert + our control, preferences and independence. Actions can be combined so that their effects are aggregated when applied against a given set of URLs. - + - There + There are three action files included with Privoxy with differing purposes: - - - - - - - default.action - is the primary action file - that sets the initial values for all actions. It is intended to - provide a base level of functionality for - Privoxy's array of features. So it is - a set of broad rules that should work reasonably well as-is for most users. - This is the file that the developers are keeping updated, and making available to users. - The user's preferences as set in standard.action, - e.g. either Cautious (the default), - Medium, or Advanced (see - below). - - - - - user.action - is intended to be for local site - preferences and exceptions. As an example, if your ISP or your bank - has specific requirements, and need special handling, this kind of - thing should go here. This file will not be upgraded. - - - - - standard.action - is used only by the web based editor - at - http://config.privoxy.org/edit-actions-list?f=default, - to set various pre-defined sets of rules for the default actions section - in default.action. - - - Edit Set to Cautious Set to Medium Set to Advanced - - - These have increasing levels of aggressiveness and have no - influence on your browsing unless you select them explicitly in the - editor. A default installation should be pre-set to - Cautious (versions prior to 3.0.5 were set to - Medium). New users should try this for a while before - adjusting the settings to more aggressive levels. The more aggressive - the settings, then the more likelihood there is of problems such as sites - not working as they should. - - - The Edit button allows you to turn each - action on/off individually for fine-tuning. The Cautious - button changes the actions list to low/safe settings which will activate - ad blocking and a minimal set of &my-app;'s features, and subsequently - there will be less of a chance for accidental problems. The - Medium button sets the list to a medium level of - other features and a low level set of privacy features. The - Advanced button sets the list to a high level of - ad blocking and medium level of privacy. See the chart below. The latter - three buttons over-ride any changes via with the - Edit button. More fine-tuning can be done in the - lower sections of this internal page. - - - It is not recommend to edit the standard.action file - itself. - - - The default profiles, and their associated actions, as pre-defined in - standard.action are: - - + + + + + + match-all.action - is used to define which + actions relating to banner-blocking, images, pop-ups, + content modification, cookie handling etc should be applied by default. + It should be the first actions file loaded + + + + + default.action - defines many exceptions (both + positive and negative) from the default set of actions that's configured + in match-all.action. It is a set of rules that should + work reasonably well as-is for most users. This file is only supposed to + be edited by the developers. It should be the second actions file loaded. + + + + + user.action - is intended to be for local site + preferences and exceptions. As an example, if your ISP or your bank + has specific requirements, and need special handling, this kind of + thing should go here. This file will not be upgraded. + + + + + Edit Set to Cautious Set to Medium Set to Advanced + + + These have increasing levels of aggressiveness and have no + influence on your browsing unless you select them explicitly in the + editor. A default installation should be pre-set to + Cautious. New users should try this for a while before + adjusting the settings to more aggressive levels. The more aggressive + the settings, then the more likelihood there is of problems such as sites + not working as they should. + + + The Edit button allows you to turn each + action on/off individually for fine-tuning. The Cautious + button changes the actions list to low/safe settings which will activate + ad blocking and a minimal set of &my-app;'s features, and subsequently + there will be less of a chance for accidental problems. The + Medium button sets the list to a medium level of + other features and a low level set of privacy features. The + Advanced button sets the list to a high level of + ad blocking and medium level of privacy. See the chart below. The latter + three buttons over-ride any changes via with the + Edit button. More fine-tuning can be done in the + lower sections of this internal page. + + + While the actions file editor allows to enable these settings in all + actions files, they are only supposed to be enabled in the first one + to make sure you don't unintentionally overrule earlier rules. + + + The default profiles, and their associated actions, as pre-defined in + default.action are: + + Default Configurations @@ -2142,7 +2806,7 @@ for details. blocks only blocks only - + Privacy Features low @@ -2164,7 +2828,6 @@ for details. yes - GIF de-animation no @@ -2172,7 +2835,6 @@ for details. yes - Fast redirects no @@ -2204,7 +2866,7 @@ for details. Image tag reordering no - no + yes yes @@ -2213,12 +2875,12 @@ for details.
-
-
-
+
+
+
- The list of actions files to be used are defined in the main configuration + 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 processed before user.action). The content of these can all be viewed and @@ -2229,7 +2891,7 @@ for details. (defined in default.action), followed by any exceptions (typically also in default.action), which are then followed lastly by any - local preferences (typically in user.action). + local preferences (typically in user.action). Generally, user.action has the last word. @@ -2239,7 +2901,7 @@ for details. alias section at the top of that file. Then comes the default set of rules which will apply universally to all sites and pages (be very careful with using such a - universal set in user.action or any other actions file after + universal set in user.action or any other actions file after default.action, because it will override the result from consulting any previous file). And then below that, exceptions to the defined universal policies. You can regard @@ -2248,7 +2910,7 @@ for details. personal settings across Privoxy upgrades easier. - + Actions can be used to block anything you want, including ads, banners, or 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 @@ -2264,7 +2926,7 @@ for details. Note that some actions, like cookie suppression or script disabling, may render some sites unusable that rely on these techniques to work properly. Finding the right mix of actions is not always easy and - certainly a matter of personal taste. And, things can always change, requiring + certainly a matter of personal taste. And, things can always change, requiring refinements in the configuration. In general, it can be said that the more aggressive your default settings (in the top section of the actions file) are, the more exceptions for trusted sites you @@ -2290,19 +2952,19 @@ for details. using our browser-based editor, which can be reached from http://config.privoxy.org/show-status. Note: the config file option enale-edit-actions must be enabled for + linkend="enable-edit-actions">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! + Experienced users only! If you prefer plain text editing to GUIs, you can of course also directly edit the the actions files with your favorite text editor. Look at - default.action which is richly commented with many + default.action which is richly commented with many good examples.
@@ -2330,18 +2992,18 @@ for details. 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 { + 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 - in both actions to apply. And there may well be - cases where you will want to combine actions together. Such a section then + in both actions to apply. And there may well be + cases where you will want to combine actions together. Such a section then might look like: - { +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 @@ -2362,7 +3024,7 @@ for details. Patterns - + As mentioned, Privoxy uses patterns to determine what actions might apply to which sites and pages your browser attempts to access. These patterns use wild @@ -2370,22 +3032,28 @@ for details. flexibility. This allows one expression to be expanded and potentially match against many similar patterns. - + Generally, an URL pattern has the form - <domain>/<path>, where both the - <domain> and <path> are - optional. (This is why the special / pattern matches all - URLs). Note that the protocol portion of the URL pattern (e.g. - http://) should not be included in - the pattern. This is assumed already! + <domain><port>/<path>, where the + <domain>, the <port> + and the <path> are optional. (This is why the special + / pattern matches all URLs). Note that the protocol + portion of the URL pattern (e.g. http://) should + not be included in the pattern. This is assumed already! The pattern matching syntax is different for the domain and path parts of - the URL. The domain part uses a simple globbing type matching technique, - while the path part uses a more flexible + the URL. The domain part uses a simple globbing type matching technique, + while the path part uses more flexible Regular - Expressions (PCRE) based syntax. + Expressions (POSIX 1003.2). + + + The port part of a pattern is a decimal port number preceded by a colon + (:). If the domain part contains a numerical IPv6 address, + it has to be put into angle brackets + (<, >). @@ -2395,7 +3063,7 @@ for details. is a domain-only pattern and will match any request to www.example.com, regardless of which document on that server is requested. So ALL pages in - this domain would be covered by the scope of this action. Note that a + this domain would be covered by the scope of this action. Note that a simple example.com is different and would NOT match. @@ -2410,7 +3078,7 @@ for details. - www.example.com/index.html$ + www.example.com/index.html matches all the documents on www.example.com @@ -2436,12 +3104,38 @@ for details. + + / + + + Matches any URL because there's no requirement for either the + domain or the path to match anything. + + + + + :8000/ + + + Matches any URL pointing to TCP port 8000. + + + + + <2001:db8::1>/ + + + Matches any URL with the host address 2001:db8::1. + (Note that the real URL uses plain brackets, not angle brackets.) + + + index.html matches nothing, since it would be interpreted as a domain name and - there is no top-level domain called .html. So its + there is no top-level domain called .html. So its a mistake. @@ -2454,7 +3148,7 @@ for details. The matching of the domain part offers some flexible options: if the - domain starts or ends with a dot, it becomes unanchored at that end. + domain starts or ends with a dot, it becomes unanchored at that end. For example: @@ -2463,8 +3157,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. @@ -2473,7 +3170,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.) @@ -2488,7 +3186,7 @@ for details. a domain.) This might be www.example.com, news.example.de, or www.example.net/cgi/testing.pl for instance. All these - cases are matched. + cases are matched. @@ -2498,12 +3196,12 @@ for details. Additionally, there are wild-cards that you can use in the domain names themselves. These work similarly to shell globbing type wild-cards: * represents zero or more arbitrary characters (this is - equivalent to the + equivalent to the Regular Expression based syntax of .*), ? represents any single character (this is equivalent to the regular expression syntax of a simple .), and you can define - character classes in square brackets which is similar to + character classes in square brackets which is similar to the same regular expression technique. All of this can be freely mixed: @@ -2512,7 +3210,7 @@ for details. ad*.example.com - matches adserver.example.com, + matches adserver.example.com, ads.example.com, etc but not sfads.example.com @@ -2530,7 +3228,7 @@ for details. matches www.ipix.com, - pictures.epix.com, a.b.c.d.e.upix.com etc. + pictures.epix.com, a.b.c.d.e.upix.com etc. @@ -2538,9 +3236,9 @@ for details. www[1-9a-ez].example.c* - matches www1.example.com, - www4.example.cc, wwwd.example.cy, - wwwz.example.com etc., but not + matches www1.example.com, + www4.example.cc, wwwd.example.cy, + wwwz.example.com etc., but not wwww.example.com. @@ -2560,31 +3258,27 @@ for details. The Path Pattern - Privoxy uses Perl compatible (PCRE) + Privoxy uses modern POSIX 1003.2 Regular - Expression based syntax - (through the PCRE library) for - matching the path portion (after the slash), and is thus more flexible. + Expressions for matching the path portion (after the slash), + and is thus more flexible. There is an Appendix with a brief quick-start into regular - expressions, and full (very technical) documentation on PCRE regex syntax is available on-line - at http://www.pcre.org/man.txt. - You might also find the Perl man page on regular expressions (man perlre) - useful, which is available on-line at http://perldoc.perl.org/perlre.html. + expressions, you also might want to have a look at your operating system's documentation + on regular expressions (try man re_format). Note that the path pattern is automatically left-anchored at the /, - i.e. it matches as if it would start with a ^ (regular expression speak + i.e. it matches as if it would start with a ^ (regular expression speak for the beginning of a line). Please also note that matching in the path is CASE INSENSITIVE - by default, but you can switch to case sensitive at any point in the pattern by using the + by default, but you can switch to case sensitive at any point in the pattern by using the (?-i) switch: www.example.com/(?-i)PaTtErN.* will match only documents whose path starts with PaTtErN in exactly this capitalization. @@ -2595,7 +3289,7 @@ for details. .example.com/.* - Is equivalent to just .example.com, since any documents + Is equivalent to just .example.com, since any documents within that domain are matched with or without the .* regular expression. This is redundant @@ -2609,9 +3303,9 @@ for details. named index.html, and that is part of some path. For example, it matches www.example.com/testing/index.html but NOT www.example.com/index.html because the regular - expression called for at least two /'s, thus the path - requirement. It also would match - www.example.com/testing/index_html, because of the + expression called for at least two /'s, thus the path + requirement. It also would match + www.example.com/testing/index_html, because of the special meta-character .. @@ -2620,9 +3314,9 @@ for details. .example.com/(.*/)?index\.html$ - This regular expression is conditional so it will match any page - named index.html regardless of path which in this case can - have one or more /'s. And this one must contain exactly + This regular expression is conditional so it will match any page + named index.html regardless of path which in this case can + have one or more /'s. And this one must contain exactly .html (but does not have to end with that!). @@ -2632,7 +3326,7 @@ for details. This regular expression will match any path of example.com - that contains any of the words ads, banner, + that contains any of the words ads, banner, banners (because of the ?) or junk. The path does not have to end in these words, just contain them. @@ -2642,8 +3336,8 @@ for details. .example.com/(.*/)(ads|banners?|junk)/.*\.(jpe?g|gif|png)$ - This is very much the same as above, except now it must end in either - .jpg, .jpeg, .gif or .png. So this + This is very much the same as above, except now it must end in either + .jpg, .jpeg, .gif or .png. So this one is limited to common image formats. @@ -2651,7 +3345,7 @@ for details. - There are many, many good examples to be found in default.action, + There are many, many good examples to be found in default.action, and more tutorials below in Appendix on regular expressions. @@ -2675,7 +3369,7 @@ for details. 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 (Privoxy doesn't silently add a ^, + automatically (&my-app; doesn't silently add a ^, you have to do it yourself if you need it). @@ -2701,13 +3395,15 @@ for details. - For example you could tag client requests which use the POST method, - use this tag to activate another tagger that adds a tag if cookies - are send, and then block based on the cookie tag. 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. + 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. + the cookie tag is created, the request line has already been parsed. @@ -2739,23 +3435,23 @@ for details. - + Again, actions are invoked by placing them on a line, enclosed in curly braces and - separated by whitespace, like in + separated by whitespace, like in {+some-action -some-other-action{some-parameter}}, followed by a list of URL patterns, one per line, to which they apply. Together, the actions line and the following pattern lines make up a section - of the actions file. + of the actions file. - + Actions fall into three categories: - + Boolean, i.e the action can only be enabled or disabled. Syntax: @@ -2764,14 +3460,14 @@ for details. +name # enable action name -name # disable action name - - Example: +block + + Example: +handle-as-image - + Parameterized, where some value is required in order to enable this type of action. Syntax: @@ -2785,13 +3481,13 @@ for details. Note that if the URL matches multiple positive forms of a parameterized action, the last match wins, i.e. the params from earlier matches are simply ignored. - + 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} - + - + Multi-value. These look exactly like parameterized actions, but they behave differently: If the action applies multiple times to the same URL, but with different parameters, all the parameters @@ -2806,7 +3502,7 @@ for details. # If it was the last one left, disable the action. -name # disable this action completely and remove all parameters from the list - + Examples: +add-header{X-Fun-Header: Some text} and +filter{html-annoyances} @@ -2825,8 +3521,8 @@ for details. 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 + 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 the order they are defined in config (the default @@ -2878,7 +3574,7 @@ for details. Multi-value. - + Parameter: @@ -2889,16 +3585,19 @@ for details. - + Notes: - This action may be specified multiple times, in order to define multiple - headers. This is rarely needed for the typical user. If you don't know what - HTTP headers are, you definitely don't need to worry about this + This action may be specified multiple times, in order to define multiple + headers. This is rarely needed for the typical user. If you don't know what + HTTP headers are, you definitely don't need to worry about this one. + + Headers added by this action are not modified by other actions. + @@ -2936,10 +3635,10 @@ for details. the handle-as-image, set-image-blocker, and + linkend="set-image-blocker">set-image-blocker, and handle-as-empty-document actions. - + @@ -2948,43 +3647,39 @@ for details. Type: - Boolean. + Parameterized. Parameter: - N/A + A block reason that should be given to the user. - + Notes: Privoxy sends a special BLOCKED page - for requests to blocked pages. This page contains links to find out why the request - was blocked, and a click-through to the blocked content (the latter only if compiled with the - force feature enabled). The BLOCKED page adapts to the available - screen space -- it displays full-blown if space allows, or miniaturized and text-only - if loaded into a small frame or window. If you are using Privoxy - right now, you can take a look at the - BLOCKED - page. - - - A very important exception occurs if both + 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, - apply to the same request: it will then be replaced by an image. If + apply to the same request: it will then be replaced by an image. If set-image-blocker (see below) also applies, the type of image will be determined by its parameter, if not, the standard checkerboard pattern is sent. - It is important to understand this process, in order - to understand how Privoxy deals with - ads and other unwanted content. Blocking is a core feature, and one + It is important to understand this process, in order + to understand how Privoxy deals with + ads and other unwanted content. Blocking is a core feature, and one upon which various other features depend. @@ -2998,30 +3693,100 @@ for details. - Example usage (section): + Example usage (section): + + + {+block{No nasty stuff for you.}} +# Block and replace with "blocked" page + .nasty-stuff.example.com + +{+block{Doubleclick banners.} +handle-as-image} +# Block and replace with image + .ad.doubleclick.net + .ads.r.us/banners/ + +{+block{Layered ads.} +handle-as-empty-document} +# Block and then ignore + adserver.example.net/.*\.js$ + + + + + + + + + + + +change-x-forwarded-for + + + + Typical use: + + Improve privacy by not forwarding the source of the request in the HTTP headers. + + + + + Effect: + + + Deletes the X-Forwarded-For: HTTP header from the client request, + or adds a new one. + + + + + + Type: + + + Parameterized. + + + + + Parameter: + + + + block to delete the header. + + + + add to create the header (or append + the client's IP address to an already existing one). + + + + + + + + Notes: + + + It is safe and recommended to use block. + + + Forwarding the source address of the request may make + sense in some multi-user setups but is also a privacy risk. + + + + + Example usage: - {+block} -# Block and replace with "blocked" page - .nasty-stuff.example.com - -{+block +handle-as-image} -# Block and replace with image - .ad.doubleclick.net - .ads.r.us/banners/ - -{+block +handle-as-empty-document} -# Block and then ignore - adserver.exampleclick.net/.*\.js$ - + +change-x-forwarded-for{block} + - - - client-header-filter @@ -3063,7 +3828,7 @@ for details. - + Notes: @@ -3077,6 +3842,11 @@ for details. Client-header filters are executed after the other header actions have finished and use their output as input. + + If the request URL gets changed, &my-app; will detect that and use the new + one. This can be used to rewrite the request destination behind the client's + back, for example to specify a Tor exit relay for certain requests. + Please refer to the filter file chapter to learn which client-header filters are available by default, and how to @@ -3091,8 +3861,9 @@ for details. +# Hide Tor exit notation in Host and Referer Headers {+client-header-filter{hide-tor-exit-notation}} -.exit/ +/ @@ -3122,7 +3893,7 @@ for details. 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. + tag. @@ -3144,7 +3915,7 @@ for details. - + Notes: @@ -3168,6 +3939,25 @@ for details. # Tag every request with the User-Agent header {+client-header-tagger{user-agent}} / + +# Tagging itself doesn't change the action +# settings, sections with TAG patterns do: +# +# If it's a download agent, use a different forwarding proxy, +# show the real User-Agent and make sure resume works. +{+forward-override{forward-socks5 10.0.0.2:2222 .} \ + -hide-if-modified-since \ + -overwrite-last-modified \ + -hide-user-agent \ + -filter \ + -deanimate-gifs \ +} +TAG:^User-Agent: NetBSD-ftp/ +TAG:^User-Agent: Novell ZYPP Installer +TAG:^User-Agent: RPM APT-HTTP/ +TAG:^User-Agent: fetch libfetch/ +TAG:^User-Agent: Ubuntu APT-HTTP/ +TAG:^User-Agent: MPlayer/ @@ -3210,11 +4000,11 @@ for details. Parameter: - Any string. - + Any string. + - + Notes: @@ -3223,7 +4013,7 @@ for details. browser to decide what to do with the document. The value of this header can cause the browser to open a download menu instead of displaying the document by itself, even if the document's format is - supported by the browser. + supported by the browser. The declared content type can also affect which rendering mode @@ -3237,13 +4027,13 @@ for details. Content-Type: text/html, you can use &my-app; to overwrite it with application/xml and validate the web master's claim inside your XHTML-supporting browser. - If the syntax is incorrect, the browser will complain loudly. + If the syntax is incorrect, the browser will complain loudly. You can also go the opposite direction: if your browser prints error messages instead of rendering a document falsely declared as XHTML, you can overwrite the content type with - text/html and have it rendered as broken HTML document. + text/html and have it rendered as broken HTML document. By default content-type-overwrite only replaces @@ -3261,7 +4051,7 @@ for details. Of course you can apply content-type-overwrite to a whole site and then make URL based exceptions, but it's a lot - more work to get the same precision. + more work to get the same precision. @@ -3323,10 +4113,10 @@ new action Any string. - + - + Notes: @@ -3359,7 +4149,7 @@ new action Example usage (section): - # Block the non-existent "Privacy-Violation:" client header + # Block the non-existent "Privacy-Violation:" client header { +crunch-client-header{Privacy-Violation:} } / @@ -3406,10 +4196,10 @@ new action N/A - + - + Notes: @@ -3493,7 +4283,7 @@ new action - + Notes: @@ -3506,7 +4296,7 @@ new action It makes no sense at all to use this action in conjunction with the session-cookies-only action, - since it would prevent the session cookies from being set. See also + since it would prevent the session cookies from being set. See also filter-content-cookies. @@ -3560,10 +4350,10 @@ new action Any string. - + - + Notes: @@ -3644,7 +4434,7 @@ new action - + Notes: @@ -3712,7 +4502,7 @@ new action - + Notes: @@ -3780,7 +4570,7 @@ new action - + Notes: @@ -3860,7 +4650,7 @@ problem-host.example.com Notes: - + Many sites, like yahoo.com, don't just link to other sites. Instead, they will link to some script on their own servers, giving the destination as a parameter, which will then redirect you to the final target. URLs @@ -3878,7 +4668,7 @@ problem-host.example.com This feature is currently not very smart and is scheduled for improvement. If it is enabled by default, you will have to create some exceptions to - this action. It can lead to failures in several ways: + this action. It can lead to failures in several ways: Not every URLs with other URLs as parameters is evil. @@ -3919,7 +4709,7 @@ problem-host.example.com { +fast-redirects{simple-check} } - one.example.com + one.example.com { +fast-redirects{check-decoded-url} } another.example.com/testing @@ -3939,7 +4729,7 @@ problem-host.example.com Typical use: - Get rid of HTML and JavaScript annoyances, banner advertisements (by size), + Get rid of HTML and JavaScript annoyances, banner advertisements (by size), do fun text replacements, add personalized effects, etc. @@ -3964,17 +4754,17 @@ problem-host.example.com Parameterized. - + Parameter: 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 + Filters can be defined in one or more files as defined by the filterfile - option in the config file. - default.filter is the collection of filters - supplied by the developers. Locally defined filters should go + option in the config file. + default.filter is the collection of filters + supplied by the developers. Locally defined filters should go in their own file, such as user.filter. @@ -3983,38 +4773,39 @@ problem-host.example.com - + Notes: - For your convenience, there are a number of pre-defined filters available + For your convenience, there are a number of pre-defined filters available in the distribution filter file that you can use. See the examples below for a list. Filtering requires buffering the page content, which may appear to slow down page rendering since nothing is displayed until all content has - passed the filters. (It does not really take longer, but seems that way - since the page is not incrementally displayed.) This effect will be more - noticeable on slower connections. + passed the filters. (The total time until the page is completely rendered + doesn't change much, but it may be perceived as slower since the page is + not incrementally displayed.) + This effect will be more noticeable on slower connections. Rolling your own - filters requires a knowledge of + filters requires a knowledge of Regular - Expressions and + Expressions and HTML. - This is very powerful feature, and potentially very intrusive. + This is very powerful feature, and potentially very intrusive. Filters should be used with caution, and where an equivalent action is not available. - The amount of data that can be filtered is limited to the + The amount of data that can be filtered is limited to the buffer-limit - option in the main config file. The + option in the main config file. The default is 4096 KB (4 Megs). Once this limit is exceeded, the buffered - data, and all pending data, is passed through unfiltered. + data, and all pending data, is passed through unfiltered. Inappropriate MIME types, such as zipped files, are not filtered at all. @@ -4025,10 +4816,10 @@ problem-host.example.com by defining appropriate -filter exceptions. - 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. + Compressed content can't be filtered either, but if &my-app; + is compiled with zlib support and a supported compression algorithm + is used (gzip or deflate), &my-app; can first decompress the content + and then filter it. If you use a &my-app; version without zlib support, but want filtering to work on @@ -4037,11 +4828,11 @@ problem-host.example.com action in conjunction with filter. - Content 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 - based on their size (see below), since many of these seem to be somewhat + 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 + based on their size (see below), since many of these seem to be somewhat standardized. @@ -4059,28 +4850,28 @@ problem-host.example.com Example usage (with filters from the distribution default.filter file). - See the Predefined Filters section for + See the Predefined Filters section for more explanation on each: - +filter{js-annoyances} # Get rid of particularly annoying JavaScript abuse + +filter{js-annoyances} # Get rid of particularly annoying JavaScript abuse. - +filter{js-events} # Kill all JS event bindings (Radically destructive! Only for extra nasty sites) + +filter{js-events} # Kill all JS event bindings and timers (Radically destructive! Only for extra nasty sites). - +filter{html-annoyances} # Get rid of particularly annoying HTML abuse + +filter{html-annoyances} # Get rid of particularly annoying HTML abuse. - +filter{content-cookies} # Kill cookies that come in the HTML or JS content + +filter{content-cookies} # Kill cookies that come in the HTML or JS content. - +filter{refresh-tags} # Kill automatic refresh tags (for dial-on-demand setups) + +filter{refresh-tags} # Kill automatic refresh tags (for dial-on-demand setups). @@ -4092,43 +4883,43 @@ problem-host.example.com - +filter{img-reorder} # Reorder attributes in <img> tags to make the banners-by-* filters more effective + +filter{img-reorder} # Reorder attributes in <img> tags to make the banners-by-* filters more effective. - +filter{banners-by-size} # Kill banners by size + +filter{banners-by-size} # Kill banners by size. - +filter{banners-by-link} # Kill banners by their links to known clicktrackers + +filter{banners-by-link} # Kill banners by their links to known clicktrackers. - +filter{webbugs} # Squish WebBugs (1x1 invisible GIFs used for user tracking) + +filter{webbugs} # Squish WebBugs (1x1 invisible GIFs used for user tracking). - +filter{tiny-textforms} # Extend those tiny textareas up to 40x80 and kill the hard wrap + +filter{tiny-textforms} # Extend those tiny textareas up to 40x80 and kill the hard wrap. - +filter{jumping-windows} # Prevent windows from resizing and moving themselves + +filter{jumping-windows} # Prevent windows from resizing and moving themselves. - +filter{frameset-borders} # Give frames a border and make them resizeable + +filter{frameset-borders} # Give frames a border and make them resizable. - +filter{demoronizer} # Fix MS's non-standard use of standard charsets + +filter{demoronizer} # Fix MS's non-standard use of standard charsets. - +filter{shockwave-flash} # Kill embedded Shockwave Flash objects + +filter{shockwave-flash} # Kill embedded Shockwave Flash objects. - +filter{quicktime-kioskmode} # Make Quicktime movies savable + +filter{quicktime-kioskmode} # Make Quicktime movies saveable. @@ -4136,35 +4927,35 @@ problem-host.example.com - +filter{crude-parental} # Crude parental filtering (demo only) + +filter{crude-parental} # Crude parental filtering. Note that this filter doesn't work reliably. - +filter{ie-exploits} # Disable a known Internet Explorer bug exploits + +filter{ie-exploits} # Disable some known Internet Explorer bug exploits. - +filter{site-specifics} # Custom filters for specific site related problems + +filter{site-specifics} # Cure for site-specific problems. Don't apply generally! + + + + +filter{no-ping} # Removes non-standard ping attributes in <a> and <area> tags. - +filter{google} # Removes text ads and other Google specific improvements + +filter{google} # CSS-based block for Google text ads. Also removes a width limitation and the toolbar advertisement. - +filter{yahoo} # Removes text ads and other Yahoo specific improvements + +filter{yahoo} # CSS-based block for Yahoo text ads. Also removes a width limitation. - +filter{msn} # Removes text ads and other MSN specific improvements + +filter{msn} # CSS-based block for MSN text ads. Also removes tracking URLs and a width limitation. - +filter{blogspot} # Cleans up Blogspot blogs - - - - +filter{no-ping} # Removes non-standard ping attributes from anchor and area tags + +filter{blogspot} # Cleans up some Blogspot blogs. Read the fine print before using this. @@ -4191,7 +4982,7 @@ new action Declares a document as text, even if the Content-Type: isn't detected as such. - + @@ -4223,7 +5014,7 @@ new action force-text-mode declares a document as text, without looking at the Content-Type: first. - + Think twice before activating this action. Filtering binary data with regular expressions can cause file damage. @@ -4231,7 +5022,7 @@ new action - + Example usage: @@ -4265,7 +5056,7 @@ new action Overrules the forward directives in the configuration file. - + @@ -4293,7 +5084,8 @@ new action forward-socks4a 127.0.0.1:9050 . to use the socks4a proxy listening at 127.0.0.1 port 9050. Replace forward-socks4a with forward-socks4 - to use a socks4 connection (with local DNS resolution) instead. + to use a socks4 connection (with local DNS resolution) instead, use forward-socks5 + for socks5 connections (with remote DNS resolution). @@ -4301,7 +5093,8 @@ new action forward-socks4a 127.0.0.1:9050 proxy.example.org:8000 to use the socks4a proxy listening at 127.0.0.1 port 9050 to reach the HTTP proxy listening at proxy.example.org port 8000. Replace forward-socks4a with forward-socks4 to use a socks4 connection - (with local DNS resolution) instead. + (with local DNS resolution) instead, use forward-socks5 + for socks5 connections (with remote DNS resolution). @@ -4312,12 +5105,12 @@ new action Notes: - This action takes parameters similar to the + This action takes parameters similar to the forward directives in the configuration file, but without the URL pattern. It can be used as replacement, but normally it's only used in cases where matching based on the request URL isn't sufficient. - + Please read the description for the forward directives before using this action. Forwarding to the wrong people will reduce your privacy and increase the @@ -4335,7 +5128,7 @@ new action - + Example usage: @@ -4347,6 +5140,8 @@ new action # This way you can continue to use Tor for your normal browsing, # without overloading the Tor network with your FreeBSD ports updates # or downloads of bigger files like ISOs. +# Note that HTTP headers are easy to fake and therefore their +# values are as (un)trustworthy as your clients and users. {+forward-override{forward .} \ -hide-if-modified-since \ -overwrite-last-modified \ @@ -4427,8 +5222,8 @@ 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} +# but send an empty document instead of the usual HTML message. +{+block{Blocked JavaScript} +handle-as-empty-document} example.org/.*\.js$ @@ -4480,14 +5275,14 @@ example.org/.*\.js$ - + Notes: The below generic example section is actually part of default.action. It marks all URLs with well-known image file name extensions as images and should - be left intact. + be left intact. Users will probably only want to use the handle-as-image action in conjunction with @@ -4515,11 +5310,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 @@ -4564,10 +5356,10 @@ new action Keyword: block, or any user defined value. - + - + Notes: @@ -4593,7 +5385,7 @@ new action to a rare language, you should consider that it helps to make your requests unique and thus easier to trace. If you don't plan to change this header frequently, - you should stick to a common language. + you should stick to a common language. @@ -4650,10 +5442,10 @@ new action Keyword: block, or any user defined value. - + - + Notes: @@ -4722,7 +5514,7 @@ new action Effect: - Deletes the If-Modified-Since: HTTP client header or modifies its value. + Deletes the If-Modified-Since: HTTP client header or modifies its value. @@ -4740,10 +5532,10 @@ new action Keyword: block, or a user defined value that specifies a range of hours. - + - + Notes: @@ -4761,8 +5553,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 @@ -4771,7 +5563,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. @@ -4780,8 +5573,8 @@ new action Example usage (section): - # Let the browser revalidate without being tracked across sessions -{ +hide-if-modified-since{-60} \ + # Let the browser revalidate but make tracking based on the time less likely. +{+hide-if-modified-since{-60} \ +overwrite-last-modified{randomize} \ +crunch-if-none-match} / @@ -4792,65 +5585,6 @@ new action - - -hide-forwarded-for-headers - - - Typical use: - - Improve privacy by not embedding the source of the request in the HTTP headers. - - - - - Effect: - - - Deletes any existing X-Forwarded-for: HTTP header from client requests, - and prevents adding a new one. - - - - - - Type: - - - Boolean. - - - - - Parameter: - - - N/A - - - - - - Notes: - - - It is safe to leave this on. - - - - - - Example usage: - - - +hide-forwarded-for-headers - - - - - - - hide-from-header @@ -4889,12 +5623,12 @@ new action - + Notes: - The keyword block will completely remove the header + The keyword block will completely remove the header (not to be confused with the block action). @@ -4960,11 +5694,9 @@ new action conditional-block to delete the header completely if the host has changed. - block to delete the header unconditionally. @@ -4977,7 +5709,7 @@ new action - + Notes: @@ -4991,196 +5723,38 @@ new action Leaving the referrer unmodified for requests on the same host allows the server owner to see the visitor's click path, but in most cases she could also get that information by comparing - other parts of the log file: for example the User-Agent if it isn't - a very common one, or the user's IP address if it doesn't change between - different requests. - - - Always blocking the referrer, or using a custom one, can lead to - failures on servers that check the referrer before they answer any - requests, in an attempt to prevent their valuable content from being - embedded or linked to elsewhere. - - - Both conditional-block and forge - will work with referrer checks, as long as content and valid referring page - are on the same host. Most of the time that's the case. - - - hide-referer is an alternate spelling of - hide-referrer and the two can be can be freely - substituted with each other. (referrer is the - correct English spelling, however the HTTP specification has a bug - it - requires it to be spelled as referer.) - - - - - - Example usage: - - - +hide-referrer{forge} or - +hide-referrer{http://www.yahoo.com/} - - - - - - - - - -hide-user-agent - - - - Typical use: - - Conceal your type of browser and client operating system - - - - - Effect: - - - Replaces the value of the User-Agent: HTTP header - in client requests with the specified value. - - - - - - Type: - - - Parameterized. - - - - - Parameter: - - - Any user-defined string. - - - - - - Notes: - - - - This can lead to problems on web sites that depend on looking at this header in - order to customize their content for different browsers (which, by the - way, is NOT the right thing to do: good web sites - work browser-independently). - - - - - Using this action in multi-user setups or wherever different types of - browsers will access the same Privoxy is - not recommended. In single-user, single-browser - setups, you might use it to delete your OS version information from - the headers, because it is an invitation to exploit known bugs for your - OS. It is also occasionally useful to forge this in order to access - sites that won't let you in otherwise (though there may be a good - reason in some cases). Example of this: some MSN sites will not - let Mozilla enter, yet forging to a - Netscape 6.1 user-agent works just fine. - (Must be just a silly MS goof, I'm sure :-). - - - More information on known user-agent strings can be found at - http://www.user-agents.org/ - and - http://en.wikipedia.org/wiki/User_agent. - - - - - - Example usage: - - - +hide-user-agent{Netscape 6.1 (X11; I; Linux 2.4.18 i686)} - - - - - - - - - -inspect-jpegs - - - - Typical use: - - To protect against the MS buffer over-run in JPEG processing - - - - - Effect: - - - Protect against a known exploit - - - - - - Type: - - - Boolean. - - - - - Parameter: - + other parts of the log file: for example the User-Agent if it isn't + a very common one, or the user's IP address if it doesn't change between + different requests. + - N/A + Always blocking the referrer, or using a custom one, can lead to + failures on servers that check the referrer before they answer any + requests, in an attempt to prevent their content from being + embedded or linked to elsewhere. - - - - - Notes: - - See Microsoft Security Bulletin MS04-028. JPEG images are one of the most - common image types found across the Internet. The exploit as described can - allow execution of code on the target system, giving an attacker access - to the system in question by merely planting an altered JPEG image, which - would have no obvious indications of what lurks inside. This action - prevents this exploit. + Both conditional-block and forge + will work with referrer checks, as long as content and valid referring page + are on the same host. Most of the time that's the case. - Note that the described exploit is only one of many, - using this action does not mean that you no longer - have to patch the client. + hide-referer is an alternate spelling of + hide-referrer and the two can be can be freely + substituted with each other. (referrer is the + correct English spelling, however the HTTP specification has a bug - it + requires it to be spelled as referer.) - Example usage: - +inspect-jpegs + + +hide-referrer{forge} or + +hide-referrer{http://www.yahoo.com/} + @@ -5188,14 +5762,14 @@ new action - -kill-popups<anchor id="kill-popup"> + +hide-user-agent Typical use: - Eliminate those annoying pop-up windows (deprecated) + Try to conceal your type of browser and client operating system @@ -5203,8 +5777,8 @@ new action Effect: - While loading the document, replace JavaScript code that opens - pop-up windows with (syntactically neutral) dummy code on the fly. + Replaces the value of the User-Agent: HTTP header + in client requests with the specified value. @@ -5213,7 +5787,7 @@ new action Type: - Boolean. + Parameterized. @@ -5221,65 +5795,47 @@ new action Parameter: - N/A + Any user-defined string. - + Notes: + + + This can lead to problems on web sites that depend on looking at this header in + order to customize their content for different browsers (which, by the + way, is NOT the right thing to do: good web sites + work browser-independently). + + - This action is basically a built-in, hardwired special-purpose filter - action, but there are important differences: For kill-popups, - the document need not be buffered, so it can be incrementally rendered while - downloading. But kill-popups doesn't catch as many pop-ups as - filter{all-popups} - does and is not as smart as filter{unsolicited-popups} - is. - - - Think of it as a fast and efficient replacement for a filter that you - can use if you don't want any filtering at all. Note that it doesn't make - sense to combine it with any filter action, - since as soon as one filter applies, - the whole document needs to be buffered anyway, which destroys the advantage of - the kill-popups action over its filter equivalent. - - - Killing all pop-ups unconditionally is problematic. Many shops and banks rely on - pop-ups to display forms, shopping carts etc, and the filter{unsolicited-popups} - does a better job of catching only the unwanted ones. - - - If the only kind of pop-ups that you want to kill are exit consoles (those - really nasty windows that appear when you close an other - one), you might want to use - filter{js-annoyances} - instead. - - - This action is most appropriate for browsers that don't have any controls - for unwanted pop-ups. Not recommended for general usage. + Using this action in multi-user setups or wherever different types of + browsers will access the same Privoxy is + not recommended. In single-user, single-browser + setups, you might use it to delete your OS version information from + the headers, because it is an invitation to exploit known bugs for your + OS. It is also occasionally useful to forge this in order to access + sites that won't let you in otherwise (though there may be a good + reason in some cases). - - - + Example usage: - +kill-popups + + +hide-user-agent{Netscape 6.1 (X11; I; Linux 2.4.18 i686)} + @@ -5324,32 +5880,27 @@ new action - + Notes: 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. @@ -5361,7 +5912,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 @@ -5412,16 +5963,16 @@ new action - + Notes: More and more websites send their content compressed by default, which is generally a good idea and saves bandwidth. But the filter, deanimate-gifs - and kill-popups actions need - access to the uncompressed data. + linkend="filter">filter and + deanimate-gifs + actions need access to the uncompressed data. When compiled with zlib support (available since &my-app; 3.0.7), content that should be @@ -5432,7 +5983,7 @@ new action 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. + unusual. Not using compression will therefore slow down the transfer, and you should only @@ -5497,7 +6048,7 @@ new action Effect: - Deletes the Last-Modified: HTTP server header or modifies its value. + Deletes the Last-Modified: HTTP server header or modifies its value. @@ -5516,10 +6067,10 @@ new action One of the keywords: block, reset-to-request-time and randomize - + - + Notes: @@ -5535,13 +6086,13 @@ new action between the original value and the current time. In theory the server could send each document with a different Last-Modified: header to track visits without using cookies. Randomize - makes it impossible and the browser can still revalidate cached documents. + makes it impossible and the browser can still revalidate cached documents. reset-to-request-time overwrites the value of the Last-Modified: header with the current time. You could use this option together with - hided-if-modified-since + hide-if-modified-since to further customize your random range. @@ -5551,7 +6102,7 @@ new action of the request, the random range becomes zero and the value stays the same. Therefore you should later randomize it a second time with hided-if-modified-since, - just to be sure. + just to be sure. It is also recommended to use this action together with @@ -5618,7 +6169,7 @@ new action - + Notes: @@ -5640,6 +6191,10 @@ new action and be aware that using your own redirects might make it possible to fingerprint your requests. + + In case of problems with your redirects, or simply to watch + them working, enable debug 128. + @@ -5660,143 +6215,24 @@ new action # (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 - - - - - - - +undeadly.org/cgi\?action=article&sid=\d*$ - - -send-wafer +# Redirect Google search requests to MSN +{+redirect{s@^http://[^/]*/search\?q=([^&]*).*@http://search.msn.com/results.aspx?q=$1@}} +.google.com/search - - - Typical use: - - - Send custom cookies or feed log analysis scripts with even more useless data. - - - +# Redirect MSN search requests to Yahoo +{+redirect{s@^http://[^/]*/results\.aspx\?q=([^&]*).*@http://search.yahoo.com/search?p=$1@}} +search.msn.com//results\.aspx\?q= - - Effect: - - - Sends a custom, user-defined cookie with each request. +# Redirect remote requests for this manual +# to the local version delivered by Privoxy +{+redirect{s@^http://www@http://config@}} +www.privoxy.org/user-manual/ - - Type: - - - Multi-value. - - - - - Parameter: - - - A string of the form name=value. - - - - - - Notes: - - - Being multi-valued, multiple instances of this action can apply to the same request, - resulting in multiple cookies being sent. - - - This action is rarely used and not enabled in the default configuration. - - - - - Example usage (section): - - - {+send-wafer{UsingPrivoxy=true}} -my-internal-testing-server.void - - - @@ -5842,7 +6278,7 @@ my-internal-testing-server.void - + Notes: @@ -5892,7 +6328,7 @@ example.org/instance-that-is-delivered-as-xml-but-is-not Typical use: - Disable or disable filters based on the Content-Type header. + Enable or disable filters based on the Content-Type header. @@ -5925,7 +6361,7 @@ example.org/instance-that-is-delivered-as-xml-but-is-not - + Notes: @@ -5954,7 +6390,7 @@ example.org/instance-that-is-delivered-as-xml-but-is-not -# Tag every request with the declared content type +# Tag every request with the content type declared by the server {+server-header-tagger{content-type}} / @@ -5976,7 +6412,7 @@ example.org/instance-that-is-delivered-as-xml-but-is-not Allow only temporary session cookies (for the current - browser session only). + browser session only). @@ -6008,12 +6444,12 @@ example.org/instance-that-is-delivered-as-xml-but-is-not - + Notes: - This is less strict than crunch-incoming-cookies / + This is less strict than crunch-incoming-cookies / crunch-outgoing-cookies and allows you to browse websites that insist or rely on setting cookies, without compromising your privacy too badly. @@ -6021,7 +6457,7 @@ example.org/instance-that-is-delivered-as-xml-but-is-not Most browsers will not permanently store cookies that have been processed by session-cookies-only and will forget about them between sessions. This makes profiling cookies useless, but won't break sites which require cookies so - that you can log in for transactions. This is generally turned on for all + that you can log in for transactions. This is generally turned on for all sites, and is the recommended setting. @@ -6040,9 +6476,9 @@ example.org/instance-that-is-delivered-as-xml-but-is-not These would have to be removed manually. - Privoxy also uses - the content-cookies filter - to block some types of cookies. Content cookies are not effected by + Privoxy also uses + the content-cookies filter + to block some types of cookies. Content cookies are not effected by session-cookies-only. @@ -6116,7 +6552,7 @@ example.org/instance-that-is-delivered-as-xml-but-is-not target-url to send a redirect to target-url. You can redirect - to any image anywhere, even in your local filesystem via file:/// URL. + to any image anywhere, even in your local filesystem via file:/// URL. (But note that not all browsers support redirecting to a local file system). @@ -6135,104 +6571,14 @@ example.org/instance-that-is-delivered-as-xml-but-is-not Notes: - The URLs for the built-in images are http://config.privoxy.org/send-banner?type=type, where type is - either blank or pattern. - - - There is a third (advanced) type, called auto. It is NOT to be - used in set-image-blocker, but meant for use from filters. - Auto will select the type of image that would have applied to the referring page, had it been an image. - - - - - - Example usage: - - - Built-in pattern: - - - +set-image-blocker{pattern} - - - Redirect to the BSD daemon: - - - +set-image-blocker{http://www.freebsd.org/gifs/dae_up3.gif} - - - Redirect to the built-in pattern for better caching: - - - +set-image-blocker{http://config.privoxy.org/send-banner?type=pattern} - - - - - - - - - -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. + The URLs for the built-in images are http://config.privoxy.org/send-banner?type=type, where type is + either blank or pattern. - For Connect requests the clients tell - Privoxy which host they are interested - in, but not which document they plan to get later. As a result, the - Go there anyway wouldn't work and is therefore suppressed. + There is a third (advanced) type, called auto. It is NOT to be + used in set-image-blocker, but meant for use from filters. + Auto will select the type of image that would have applied to the referring page, had it been an image. @@ -6241,7 +6587,22 @@ new action Example usage: - +treat-forbidden-connects-like-blocks + Built-in pattern: + + + +set-image-blocker{pattern} + + + Redirect to the BSD daemon: + + + +set-image-blocker{http://www.freebsd.org/gifs/dae_up3.gif} + + + Redirect to the built-in pattern for better caching: + + + +set-image-blocker{http://config.privoxy.org/send-banner?type=pattern} @@ -6254,8 +6615,8 @@ new action Summary Note that many of these actions have the potential to cause a page to - misbehave, possibly even not to display at all. There are many ways - a site designer may choose to design his site, and what HTTP header + misbehave, possibly even not to display at all. There are many ways + a site designer may choose to design his site, and what HTTP header content, and other criteria, he may depend on. There is no way to have hard and fast rules for all sites. See the Appendix for a brief example on troubleshooting @@ -6273,7 +6634,7 @@ new action These can in turn be invoked just like the built-in actions. Currently, an alias name can contain any character except space, tab, =, - { and }, but we strongly + { and }, but we strongly recommend that you only use a to z, 0 to 9, +, and -. Alias names are not case sensitive, and are not required to start with a @@ -6323,15 +6684,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 ;-) # @@ -6340,7 +6701,7 @@ new action - ...and put them to use. These sections would appear in the lower part of an + ...and put them to use. These sections would appear in the lower part of an actions file and define exceptions to the default actions (as specified further up for the / pattern): @@ -6358,7 +6719,7 @@ new action # Shopping sites: # Allow cookies (for setting and retrieving your customer data) - # + # {shop} .quietpc.com .worldpay.com # for quietpc.com @@ -6366,14 +6727,14 @@ new action # These shops require pop-ups: # - {-kill-popups -filter{all-popups} -filter{unsolicited-popups}} + {-filter{all-popups} -filter{unsolicited-popups}} .dabs.com .overclockers.co.uk - Aliases like shop and fragile are typically used for - problem sites that require more than one action to be disabled + Aliases like shop and fragile are typically used for + problem sites that require more than one action to be disabled in order to function properly.
@@ -6389,24 +6750,71 @@ hal stop here linkend="actions">specified and applied to URLs, how patterns work, and how to define and use aliases. Now, let's look at an - example default.action and user.action - file and see how all these pieces come together: + example match-all.action, default.action + and user.action file and see how all these pieces come together: + + + +match-all.action + + Remember all actions are disabled when matching starts, + so we have to explicitly enable the ones we want. + + + + While the match-all.action file only contains a + single section, it is probably the most important one. It has only one + pattern, /, but this pattern + matches all URLs. Therefore, the set of + actions used in this default section will + be applied to all requests as a start. It can be partly or + wholly overridden by other actions files like default.action + and user.action, but it will still be largely responsible + for your overall browsing experience. + + + + Again, at the start of matching, all actions are disabled, so there is + no need to disable any actions here. (Remember: a + + preceding the action name enables the action, a - disables!). + Also note how this long line has been made more readable by splitting it into + multiple lines with line continuation. + + + + +{ \ + +change-x-forwarded-for{block} \ + +hide-from-header{block} \ + +set-image-blocker{pattern} \ +} +/ # Match all URLs + -default.action + + The default behavior is now set. + + + + +default.action -Every config file should start with a short comment stating its purpose: + If you aren't a developer, there's no need for you to edit the + default.action file. It is maintained by + the &my-app; developers and if you disagree with some of the + sections, you should overrule them in your user.action. - # Sample default.action file <ijbswa-developers@lists.sourceforge.net> + Understanding the default.action file can + help you with your user.action, though. -Then, since this is the default.action file, the -first section is a special section for internal use that you needn't -change or worry about: + The first section in this file is a special section for internal use + that prevents older &my-app; versions from reading the file: @@ -6414,15 +6822,14 @@ change or worry about: ########################################################################## # Settings -- Don't change! For internal Privoxy use ONLY. ########################################################################## - {{settings}} -for-privoxy-version=3.0 +for-privoxy-version=3.0.11 -After that comes the (optional) alias section. We'll use the example -section from the above chapter on aliases, -that also explains why and how aliases are used: + After that comes the (optional) alias section. We'll use the example + section from the above chapter on aliases, + that also explains why and how aliases are used: @@ -6437,120 +6844,14 @@ that also explains why and how aliases are used: # +crunch-all-cookies = +crunch-incoming-cookies +crunch-outgoing-cookies -crunch-all-cookies = -crunch-incoming-cookies -crunch-outgoing-cookies - +block-as-image = +block +handle-as-image + +block-as-image = +block{Blocked image.} +handle-as-image mercy-for-cookies = -crunch-all-cookies -session-cookies-only -filter{content-cookies} # These aliases define combinations of actions # that are useful for certain types of sites: # - fragile = -block -filter -crunch-all-cookies -fast-redirects -hide-referrer -kill-popups - shop = -crunch-all-cookies -filter{all-popups} -kill-popups - - - - Now come the regular sections, i.e. sets of actions, accompanied - by URL patterns to which they apply. Remember all actions - are disabled when matching starts, so we have to explicitly - enable the ones we want. - - - - The first regular section is probably the most important. It has only - one pattern, /, but this pattern - matches all URLs. Therefore, the - set of actions used in this default section will - be applied to all requests as a start. It can be partly or - wholly overridden by later matches further down this file, or in user.action, - but it will still be largely responsible for your overall browsing - experience. - - - - Again, at the start of matching, all actions are disabled, so there is - no real need to disable any actions here, but we will do that nonetheless, - to have a complete listing for your reference. (Remember: a + - preceding the action name enables the action, a - disables!). - Also note how this long line has been made more readable by splitting it into - multiple lines with line continuation. - - - - -########################################################################## -# "Defaults" section: -########################################################################## - { \ - -add-header \ - -client-header-filter{hide-tor-exit-notation} \ - -block \ - -content-type-overwrite \ - -crunch-client-header \ - -crunch-if-none-match \ - -crunch-incoming-cookies \ - -crunch-server-header \ - -crunch-outgoing-cookies \ - +deanimate-gifs \ - -downgrade-http-version \ - -fast-redirects{check-decoded-url} \ - -filter{js-annoyances} \ - -filter{js-events} \ - +filter{html-annoyances} \ - -filter{content-cookies} \ - +filter{refresh-tags} \ - -filter{unsolicited-popups} \ - -filter{all-popups} \ - -filter{img-reorder} \ - -filter{banners-by-size} \ - -filter{banners-by-link} \ - +filter{webbugs} \ - -filter{tiny-textforms} \ - -filter{jumping-windows} \ - -filter{frameset-borders} \ - -filter{demoronizer} \ - -filter{shockwave-flash} \ - -filter{quicktime-kioskmode} \ - -filter{fun} \ - -filter{crude-parental} \ - +filter{ie-exploits} \ - -filter{google} \ - -filter{yahoo} \ - -filter{msn} \ - -filter{blogspot} \ - -filter{no-ping} \ - -force-text-mode \ - -handle-as-empty-document \ - -handle-as-image \ - -hide-accept-language \ - -hide-content-disposition \ - -hide-if-modified-since \ - +hide-forwarded-for-headers \ - +hide-from-header{block} \ - +hide-referrer{forge} \ - -hide-user-agent \ - -inspect-jpegs \ - -kill-popups \ - -limit-connect \ - +prevent-compression \ - -overwrite-last-modified \ - -redirect \ - -send-vanilla-wafer \ - -send-wafer \ - -server-header-filter{xml-to-html} \ - -server-header-filter{html-to-xml} \ - +session-cookies-only \ - +set-image-blocker{pattern} \ - -treat-forbidden-connects-like-blocks \ - } - / # forward slash will match *all* potential URL patterns. - - - - The default behavior is now set. Note that some actions, like not hiding - the user agent, are part of a general policy that applies - universally and won't get any exceptions defined later. Other choices, - like not blocking (which is understandably the - default!) need exceptions, i.e. we need to specify explicitly what we - want to block in later sections. + fragile = -block -filter -crunch-all-cookies -fast-redirects -hide-referrer + shop = -crunch-all-cookies -filter{all-popups} @@ -6581,49 +6882,22 @@ mail.google.com require cookies to log in, and pop-up windows for shopping carts or item details. Again, we'll use a pre-defined alias: - + # Shopping sites: # { shop } -.quietpc.com +.quietpc.com .worldpay.com # for quietpc.com .jungle.com .scan.co.uk - - The fast-redirects - action, which we enabled per default above, breaks some sites. So disable - it for popular sites where we know it misbehaves: + action, which may have been enabled in match-all.action, + breaks some sites. So disable it for popular sites where we know it misbehaves: @@ -6643,8 +6917,8 @@ edit.*.yahoo.com be blocked, a substitute image can be sent, rather than an HTML page. Contacting the remote site to find out is not an option, since it would destroy the loading time advantage of banner blocking, and it - would feed the advertisers (in terms of money and - information). We can mark any URL as an image with the handle-as-image action, and marking all URLs that end in a known image file extension is a good start: @@ -6683,7 +6957,7 @@ edit.*.yahoo.com # Known ad generators: # { +block-as-image } -ar.atwola.com +ar.atwola.com .ad.doubleclick.net .ad.*.doubleclick.net .a.yimg.com/(?:(?!/i/).)*$ @@ -6715,10 +6989,10 @@ bs*.gsanet.com ########################################################################## # Block these fine banners: ########################################################################## -{ +block } +{ +block{Banner ads.} } # Generic patterns: -# +# ad*. .*ads. banner?. @@ -6739,7 +7013,7 @@ count*. But being very generic, they necessarily also catch URLs that we don't want - to block. The pattern .*ads. e.g. catches + to block. The pattern .*ads. e.g. catches nasty-ads.nasty-corp.com as intended, but also downloads.sourcefroge.net or adsl.some-provider.net. So here come some @@ -6766,7 +7040,7 @@ count*. ########################################################################## # By domain: -# +# { -block } adv[io]*. # (for advogato.org and advice.*) adsl. # (has nothing to do with ads) @@ -6816,13 +7090,13 @@ wiki. So far we are painting with a broad brush by setting general policies, - which would be a reasonable starting point for many people. Now, + which would be a reasonable starting point for many people. Now, you might want to be more specific and have customized rules that are more suitable to your personal habits and preferences. These would be for narrowly defined situations like your ISP or your bank, and should - be placed in user.action, which is parsed after all other + be placed in user.action, which is parsed after all other actions files and hence has the last word, over-riding any previously - defined actions. user.action is also a + defined actions. user.action is also a safe place for your personal settings, since default.action is actively maintained by the Privoxy developers and you'll probably want @@ -6831,7 +7105,7 @@ wiki. So let's look at a few examples of things that one might typically do in - user.action: + user.action: @@ -6839,7 +7113,7 @@ wiki. -# My user.action file. <fred@foobar.com> +# My user.action file. <fred@example.com> @@ -6854,21 +7128,21 @@ wiki. # (Re-)define aliases for this file: # {{alias}} -# -# These aliases just save typing later, and the alias names should +# +# These aliases just save typing later, and the alias names should # be self explanatory. # +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: @@ -6886,7 +7160,7 @@ handle-as-text = -filter +-block action. Say you've 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 + and pasted the URL below while removing the leading http://, into a + { +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: @@ -6940,16 +7214,16 @@ stupid-server.example.com/ -{ +block } +{ +block{Nasty ads.} } www.example.com/nasty-ads/sponsor\.gif - another.popular.site.net/more/junk/here/ + another.example.net/more/junk/here/ The URLs of dynamically generated banners, especially from large banner farms, often don't use the well-known image file name extensions, which makes it impossible for Privoxy to guess - the file type just by looking at the URL. + the file type just by looking at the URL. You can use the +block-as-image alias defined above for these cases. Note that objects which match this rule but then turn out NOT to be an @@ -6974,7 +7248,7 @@ stupid-server.example.com/ -- whoa! -- it worked. The fragile aliases disables those actions that are most likely to break a site. Also, good for testing purposes to see if it is Privoxy - that is causing the problem or not. We later find other regular sites + that is causing the problem or not. We later find other regular sites that misbehave, and add those to our personalized list of troublemakers: @@ -6988,8 +7262,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: @@ -7019,19 +7293,19 @@ stupid-server.example.com/ { allow-ads } .sourceforge.net .slashdot.org - .osdn.net + .osdn.net - Note that allow-ads has been aliased to - -block, - -filter{banners-by-size}, and + Note that allow-ads has been aliased to + -block, + -filter{banners-by-size}, and -filter{banners-by-link} above. Invoke another alias here to force an over-ride of the MIME type - application/x-sh which typically would open a download type + application/x-sh which typically would open a download type dialog. In my case, I want to look at the shell script, and then I can save it should I choose to. @@ -7039,7 +7313,7 @@ stupid-server.example.com/ { handle-as-text } - /.*\.sh$ + /.*\.sh$ @@ -7074,7 +7348,7 @@ stupid-server.example.com/ On-the-fly text substitutions need - to be defined in a filter file. Once defined, they + to be defined in a filter file. Once defined, they can then be invoked as an action. @@ -7085,7 +7359,7 @@ stupid-server.example.com/ client-header-filter to rewrite headers that are send by the client, and server-header-filter - to rewrite headers that are send by the server, and + to rewrite headers that are send by the server. @@ -7093,7 +7367,7 @@ stupid-server.example.com/ client-header-tagger and server-header-tagger. - Taggers and filters use the same syntax in the filter files, the differnce + 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. @@ -7103,15 +7377,14 @@ stupid-server.example.com/ Multiple filter files can be defined through the filterfile config directive. The filters - as supplied by the developers will be found in + as supplied by the developers are located in default.filter. It is recommended that any locally defined or modified filters go in a separately defined file such as user.filter. - - + - Command tasks for content filters are to eliminate common annoyances in + Common tasks for content filters are to eliminate common annoyances in HTML and JavaScript, such as pop-up windows, exit consoles, crippled windows without navigation tools, the infamous <BLINK> tag etc, to suppress images with certain @@ -7120,11 +7393,16 @@ stupid-server.example.com/ - Content filtering works on any text-based document type, including - HTML, JavaScript, CSS etc. (all text/* - MIME types, except text/plain). + Enabled content filters are applied to any content whose + Content Type header is recognised as a sign + of text-based content, with the exception of text/plain. + Use the force-text-mode action + to also filter other content. + + + Substitutions are made at the source level, so if you want to roll - your own filters, you should first be familiar with HTML syntax, + your own filters, you should first be familiar with HTML syntax, and, of course, regular expressions. @@ -7134,7 +7412,7 @@ stupid-server.example.com/ 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) + 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 @@ -7149,7 +7427,7 @@ stupid-server.example.com/ +filter{name} in any actions file. - + Filter definitions start with a header line that contains the filter type, the filter name and the filter description. @@ -7173,13 +7451,13 @@ stupid-server.example.com/ - If you are new to + If you are new to Regular Expressions, you might want to take a look at the Appendix on regular expressions, and see the Perl manual for - the + the s/// operator's syntax and Perl-style regular expressions in general. @@ -7294,7 +7572,7 @@ s|(<script.*)document\.referrer(.*</script>)|$1"Not Your Business!"$2|U Now the pattern is deciphered, but wasn't this about substituting things? So lets look at the substitute: $1"Not Your Business!"$2 is - easy to read: The text remembered as $1, followed by + easy to read: The text remembered as $1, followed by "Not Your Business!" (including the quotation marks!), followed by the text remembered as $2. This produces an exact copy of the original string, with the middle part @@ -7361,7 +7639,7 @@ s/(<body [^>]*)onunload(.*>)/$1never$2/iU Note that the i option makes the pattern matching case-insensitive. Also note that ungreedy matching alone doesn't always guarantee a minimal match: In the first parenthesis, we had to use [^>]* - instead of .* to prevent the match from exceeding the + instead of .* to prevent the match from exceeding the <body> tag if it doesn't contain OnUnload, but the page's content does. @@ -7381,7 +7659,7 @@ s/microsoft(?!\.com)/MicroSuck/ig Note the (?!\.com) part (a so-called negative lookahead) - in the job's pattern, which means: Don't match, if the string + in the job's pattern, which means: Don't match, if the string .com appears directly following microsoft in the page. This prevents links to microsoft.com from being trashed, while still replacing the word everywhere else. @@ -7407,7 +7685,7 @@ s* industry[ -]leading \ The x option in this job turns on extended syntax, and allows for - e.g. the liberal use of (non-interpreted!) whitespace for nicer formatting. + e.g. the liberal use of (non-interpreted!) whitespace for nicer formatting. @@ -7419,11 +7697,11 @@ s* industry[ -]leading \ The Pre-defined Filters - @@ -7463,12 +7741,12 @@ pre-defined filters for your convenience: - Use with caution. This is an aggressive filter, and can break sites that + Use with caution. This is an aggressive filter, and can break sites that rely heavily on JavaScript. - + js-events @@ -7492,7 +7770,7 @@ pre-defined filters for your convenience: This filter will undo many common instances of HTML based abuse. - The BLINK and MARQUEE tags + The BLINK and MARQUEE tags are neutralized (yeah baby!), and browser windows will be created as resizeable (as of course they should be!), and will have location, scroll and menu bars -- even if specified otherwise. @@ -7513,9 +7791,9 @@ pre-defined filters for your convenience: This filter disables most HTML and JavaScript code that reads or sets - cookies. It cannot detect all clever uses of these types of code, so it + cookies. It cannot detect all clever uses of these types of code, so it should not be relied on as an absolute fix. Use it wherever you would also - use the cookie crunch actions. + use the cookie crunch actions. @@ -7524,8 +7802,8 @@ pre-defined filters for your convenience: refresh tags - Disable any refresh tags if the interval is greater than nine seconds (so - that redirections done via refresh tags are not destroyed). This is useful + Disable any refresh tags if the interval is greater than nine seconds (so + that redirections done via refresh tags are not destroyed). This is useful for dial-on-demand setups, or for those who find this HTML feature annoying. @@ -7536,9 +7814,9 @@ pre-defined filters for your convenience: unsolicited-popups - This filter attempts to prevent only unsolicited pop-up - windows from opening, yet still allow pop-up windows that the user - has explicitly chosen to open. It was added in version 3.0.1, + This filter attempts to prevent only unsolicited pop-up + windows from opening, yet still allow pop-up windows that the user + has explicitly chosen to open. It was added in version 3.0.1, as an improvement over earlier such filters. @@ -7549,7 +7827,7 @@ pre-defined filters for your convenience: This is recommended only for browsers that cannot perform this function - reliably themselves. And be aware that some sites require such windows + reliably themselves. And be aware that some sites require such windows in order to function normally. Use with caution. @@ -7582,7 +7860,7 @@ pre-defined filters for your convenience: banners-by-size - This filter removes image tags purely based on what size they are. Fortunately + This filter removes image tags purely based on what size they are. Fortunately for us, many ads and banner images tend to conform to certain standardized sizes, which makes this filter quite effective for ad stripping purposes. @@ -7591,7 +7869,7 @@ pre-defined filters for your convenience: but just happen to be of one of the standard banner sizes. - Recommended only for those who require extreme ad blocking. The default + Recommended only for those who require extreme ad blocking. The default block rules should catch 95+% of all ads without this filter enabled. @@ -7601,7 +7879,7 @@ pre-defined filters for your convenience: banners-by-link - This is an experimental filter that attempts to kill any banners if + This is an experimental filter that attempts to kill any banners if their URLs seem to point to known or suspected click trackers. It is currently not of much value and is not recommended for use by default. @@ -7612,7 +7890,7 @@ pre-defined filters for your convenience: webbugs - Webbugs are small, invisible images (technically 1X1 GIF images), that + Webbugs are small, invisible images (technically 1X1 GIF images), that are used to track users across websites, and collect information on them. As an HTML page is loaded by the browser, an embedded image tag causes the browser to contact a third-party site, disclosing the tracking information @@ -7631,7 +7909,7 @@ pre-defined filters for your convenience: A rather special-purpose filter that can be used to enlarge textareas (those - multi-line text boxes in web forms) and turn off hard word wrap in them. + multi-line text boxes in web forms) and turn off hard word wrap in them. It was written for the sourceforge.net tracker system where such boxes are a nuisance, but it can be handy on other sites, too. @@ -7675,20 +7953,20 @@ pre-defined filters for your convenience: Many Microsoft products that generate HTML use non-standard extensions (read: violations) of the ISO 8859-1 aka Latin-1 character set. This can cause those - HTML documents to display with errors on standard-compliant platforms. + HTML documents to display with errors on standard-compliant platforms. - This filter translates the MS-only characters into Latin-1 equivalents. - It is not necessary when using MS products, and will cause corruption of + This filter translates the MS-only characters into Latin-1 equivalents. + It is not necessary when using MS products, and will cause corruption of all documents that use 8-bit character sets other than Latin-1. It's mostly worthwhile for Europeans on non-MS platforms, if weird garbage characters - sometimes appear on some pages, or user agents that don't correct for this on + sometimes appear on some pages, or user agents that don't correct for this on the fly. +--> @@ -7698,7 +7976,7 @@ pre-defined filters for your convenience: A filter for shockwave haters. As the name suggests, this filter strips code - out of web pages that is used to embed shockwave flash objects. + out of web pages that is used to embed shockwave flash objects. @@ -7774,12 +8052,12 @@ pre-defined filters for your convenience: - + yahoo - Another CSS based block, this time for Yahoo text ads. And removes + Another CSS based block, this time for Yahoo text ads. And removes a width limitation as well. @@ -7789,7 +8067,7 @@ pre-defined filters for your convenience: msn - Another CSS based block, this time for MSN text ads. And removes + Another CSS based block, this time for MSN text ads. And removes tracking URLs, as well as a width limitation. @@ -7818,7 +8096,7 @@ pre-defined filters for your convenience: - + html-to-xml @@ -7897,13 +8175,13 @@ pre-defined filters for your convenience: Privoxy's Template Files - All Privoxy built-in pages, i.e. error pages such as the + All Privoxy built-in pages, i.e. error pages such as the 404 - No Such Domain error page, the BLOCKED page and all pages of its web-based - user interface, are generated from templates. + user interface, are generated from templates. (Privoxy must be running for the above links to work as intended.) @@ -7920,10 +8198,10 @@ pre-defined filters for your convenience: 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 + 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. + during upgrades. Note that just like in configuration files, lines starting @@ -8055,7 +8333,7 @@ Requests expressions in its actions files and filter file, through the PCRE and - @@ -8082,7 +8360,7 @@ Requests To make a simple analogy, we do something similar when we use wild-card - characters when listing files with the dir command in DOS. + characters when listing files with the dir command in DOS. *.* matches all filenames. The special character here is the asterisk which matches any and all characters. We can be more specific and use ? to match just individual @@ -8093,7 +8371,7 @@ Requests Regular expressions do essentially the same thing, but are much, much more - powerful. There are many more special characters and ways of + powerful. There are many more special characters and ways of building complex patterns however. Let's look at a few of the common ones, and then some examples: @@ -8129,10 +8407,10 @@ Requests \ - The escape character denotes that - the following character should be taken literally. This is used where one of the + the following character should be taken literally. This is used where one of the special characters (e.g. .) needs to be taken literally and - not as a special meta-character. Example: example\.com, makes - sure the period is recognized only as a period (and not expanded to its + not as a special meta-character. Example: example\.com, makes + sure the period is recognized only as a period (and not expanded to its meta-character meaning of any single character). @@ -8141,7 +8419,7 @@ Requests [ ] - Characters enclosed in brackets will be matched if any of the enclosed characters are encountered. For instance, [0-9] - matches any numeric digit (zero through nine). As an example, we can combine + matches any numeric digit (zero through nine). As an example, we can combine this with + to match any digit one of more times: [0-9]+. @@ -8158,14 +8436,14 @@ Requests | - The bar character works like an or conditional statement. A match is successful if the sub-expression on either side of | matches. As an example: - /(this|that) example/ uses grouping and the bar character + /(this|that) example/ uses grouping and the bar character and would match either this example or that example, and nothing else. - These are just some of the ones you are likely to use when matching URLs with + These are just some of the ones you are likely to use when matching URLs with Privoxy, and is a long way from a definitive list. This is enough to get us started with a few simple examples which may be more illuminating: @@ -8173,12 +8451,12 @@ Requests /.*/banners/.* - A simple example - that uses the common combination of . and * to + that uses the common combination of . and * to denote any character, zero or more times. In other words, any string at all. - So we start with a literal forward slash, then our regular expression pattern + So we start with a literal forward slash, then our regular expression pattern (.*) another literal forward slash, the string banners, another forward slash, and lastly another - .*. We are building + .*. We are building a directory path here. This will match any file with the path that has a directory named banners in it. The .* matches any characters, and this could conceivably be more forward slashes, so it @@ -8194,14 +8472,14 @@ Requests - /.*/adv((er)?ts?|ertis(ing|ements?))?/ - + /.*/adv((er)?ts?|ertis(ing|ements?))?/ - We have several literal forward slashes again (/), so we are - building another expression that is a file path statement. We have another + building another expression that is a file path statement. We have another .*, so we are matching against any conceivable sub-path, just so it matches our expression. The only true literal that must match our pattern is adv, together with the forward slashes. What comes after the adv string is the - interesting part. + interesting part. @@ -8211,29 +8489,29 @@ Requests ((er)?ts?|ertis(ing|ements?)) is optional, as are the individual sub-expressions: (er), (ing|ements?), and the s. The | - means or. We have two of those. For instance, - (ing|ements?), can expand to match either ing + means or. We have two of those. For instance, + (ing|ements?), can expand to match either ing OR ements?. What is being done here, is an - attempt at matching as many variations of advertisement, and + attempt at matching as many variations of advertisement, and similar, as possible. So this would expand to match just adv, or advert, or adverts, or advertising, or advertisement, or - advertisements. You get the idea. But it would not match + advertisements. You get the idea. But it would not match advertizements (with a z). We could fix that by - changing our regular expression to: + changing our regular expression to: /.*/adv((er)?ts?|erti(s|z)(ing|ements?))?/, which would then match either spelling. - /.*/advert[0-9]+\.(gif|jpe?g) - Again - another path statement with forward slashes. Anything in the square brackets + /.*/advert[0-9]+\.(gif|jpe?g) - Again + another path statement with forward slashes. Anything in the square brackets [ ] can be matched. This is using 0-9 as a shorthand expression to mean any digit one through nine. It is the same as saying 0123456789. So any digit matches. The + - means one or more of the preceding expression must be included. The preceding - expression here is what is in the square brackets -- in this case, any digit - one through nine. Then, at the end, we have a grouping: (gif|jpe?g). + means one or more of the preceding expression must be included. The preceding + expression here is what is in the square brackets -- in this case, any digit + one through nine. Then, at the end, we have a grouping: (gif|jpe?g). This includes a |, so this needs to match the expression on either side of that bar character also. A simple gif on one side, and the other side will in turn match either jpeg or jpg, @@ -8263,7 +8541,7 @@ Requests - More reading on Perl Compatible Regular expressions: + More reading on Perl Compatible Regular expressions: http://perldoc.perl.org/perlre.html @@ -8282,22 +8560,22 @@ Requests Privoxy's Internal Pages - Since Privoxy proxies each requested - web page, it is easy for Privoxy to + Since Privoxy proxies each requested + web page, it is easy for Privoxy to trap certain special URLs. In this way, we can talk directly to - Privoxy, and see how it is - configured, see how our rules are being applied, change these + Privoxy, and see how it is + configured, see how our rules are being applied, change these rules and other configuration options, and even turn - Privoxy's filtering off, all with + Privoxy's filtering off, all with a web browser. - The URLs listed below are the special ones that allow direct access + The URLs listed below are the special ones that allow direct access to Privoxy. Of course, - Privoxy must be running to access these. If - not, you will get a friendly error message. Internet access is not + Privoxy must be running to access these. If + not, you will get a friendly error message. Internet access is not necessary either. @@ -8305,11 +8583,11 @@ Requests - - Privoxy main page: + + Privoxy main page:
- + http://config.privoxy.org/
@@ -8321,75 +8599,77 @@ Requests
- - Show information about the current configuration, including viewing and + + Show information about the current configuration, including viewing and editing of actions files:
- + http://config.privoxy.org/show-status
- + - + Show the source code version numbers:
- + http://config.privoxy.org/show-version
- + - + Show the browser's request headers:
- + http://config.privoxy.org/show-request
- + - + Show which actions apply to a URL and why:
- + http://config.privoxy.org/show-url-info
- + - - 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:
- + http://config.privoxy.org/toggle
- Short cuts. Turn off, then on: + Short cuts. Turn off, then on:
- + http://config.privoxy.org/toggle?set=disable
- + http://config.privoxy.org/toggle?set=enable
- +
@@ -8414,7 +8694,7 @@ Requests the bookmark may not be safe - just click OK. Then you can run the Bookmarklet directly from your favorites/bookmarks. For even faster access, you can put them on the Links bar (IE) or the Personal - Toolbar (Netscape), and run them with a single click. + Toolbar (Netscape), and run them with a single click. @@ -8425,47 +8705,47 @@ Requests Privoxy - Enable - + Privoxy - Disable - + Privoxy - Toggle Privoxy (Toggles between enabled and disabled) - + Privoxy- View Status - + + + --> Privoxy - Why? - + Credit: The site which gave us the general idea for these bookmarklets is www.bookmarklets.com. They - have more information about bookmarklets. + have more information about bookmarklets. @@ -8478,7 +8758,7 @@ Requests Chain of Events - Let's take a quick look at how some of Privoxy's + 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: @@ -8487,48 +8767,48 @@ Requests - First, your web browser requests a web page. The browser knows to send - the request to Privoxy, which will in turn, - relay the request to the remote web server after passing the following - tests: + First, your web browser requests a web page. The browser knows to send + the request to Privoxy, which will in turn, + relay the request to the remote web server after passing the following + tests: - + - Privoxy traps any request for its own internal CGI + Privoxy traps any request for its own internal CGI pages (e.g http://p.p/) and sends the CGI page back to the browser. - + - Next, Privoxy checks to see if the URL + Next, Privoxy checks to see if the URL matches any +block patterns. If so, the URL is then blocked, and the remote web server will not be contacted. - +handle-as-image - and + +handle-as-image + and +handle-as-empty-document - are then checked, and if there is no match, an + 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). - + Untrusted URLs are blocked. If URLs are being added to the trust file, then that is done. - + If the URL pattern matches the +fast-redirects action, it is then processed. Unwanted parts of the requested URL are stripped. - + Now the rest of the client browser's request headers are processed. If any @@ -8537,31 +8817,24 @@ Requests etc.), headers are suppressed or forged as determined by these actions and their parameters. - + Now the web server starts sending its response back (i.e. typically a web page). - + First, the server headers are read and processed to determine, among other things, the MIME type (document type) and encoding. The headers are then - filtered as determined by the + filtered as determined by the +crunch-incoming-cookies, +session-cookies-only, and +downgrade-http-version actions. - - - - If the +kill-popups - action applies, and it is an HTML or JavaScript document, the popup-code in the - response is filtered on-the-fly as it is received. - - + If any +filter action @@ -8574,35 +8847,35 @@ Requests they are specified in one of the filter files. Animated GIFs, if present, are reduced to either the first or last frame, depending on the action setting.The entire page, which is now filtered, is then sent by - Privoxy back to your browser. + Privoxy back to your browser. If neither a +filter action or +deanimate-gifs - matches, then Privoxy passes the raw data through + matches, then Privoxy passes the raw data through to the client browser as it becomes available. - + - As the browser receives the now (possibly filtered) page content, it + 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 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 + 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 + request. For the sake of brevity and simplicity, we have focused on Privoxy's core features only. @@ -8614,7 +8887,7 @@ Requests Troubleshooting: Anatomy of an Action - The way Privoxy applies + The way Privoxy applies actions and filters to any given URL can be complex, and not always so easy to understand what is happening. And sometimes we need to be able to @@ -8623,15 +8896,17 @@ Requests is causing us a problem inadvertently. It can be a little daunting to look at the actions and filters files themselves, since they tend to be filled with regular expressions whose consequences are not - always so obvious. + always so obvious. - One quick test to see if Privoxy is causing a problem - 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. + One quick test to see if Privoxy is causing a problem + 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. (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 @@ -8642,7 +8917,7 @@ Requests - Privoxy also provides the + Privoxy also provides the http://config.privoxy.org/show-url-info page that can show us very specifically how actions are being applied to any given URL. This is a big help for troubleshooting. @@ -8650,7 +8925,7 @@ Requests First, enter one URL (or partial URL) at the prompt, and then - Privoxy will tell us + Privoxy will tell us how the current configuration will handle it. This will not help with filtering effects (i.e. the +filter action) from @@ -8666,8 +8941,8 @@ Requests - Let's try an example, google.com, - and look at it one section at a time in a sample configuration (your real + Let's try an example, google.com, + and look at it one section at a time in a sample configuration (your real configuration may vary): @@ -8677,7 +8952,8 @@ Requests In file: default.action [ View ] [ Edit ] - {+deanimate-gifs {last} + {+change-x-forwarded-for{block} + +deanimate-gifs {last} +fast-redirects {check-decoded-url} +filter {refresh-tags} +filter {img-reorder} @@ -8685,13 +8961,12 @@ Requests +filter {webbugs} +filter {jumping-windows} +filter {ie-exploits} - +hide-forwarded-for-headers +hide-from-header {block} +hide-referrer {forge} +session-cookies-only +set-image-blocker {pattern} / - + { -session-cookies-only } .google.com @@ -8699,17 +8974,17 @@ Requests .google.com In file: user.action [ View ] [ Edit ] -(no matches in this file) +(no matches in this file) - This is telling us how we have defined our + This is telling us how we have defined our actions, and - which ones match for our test case, google.com. + which ones match for our test case, google.com. Displayed is all the actions that are available to us. Remember, the + sign denotes on. - - denotes off. So some are on here, but many + denotes off. So some are on here, but many are off. Each example we try may provide a slightly different end result, depending on our configuration directives. @@ -8737,7 +9012,7 @@ In file: user.action [ View ] [ Edit ].google.com. This will match any hosts and sub-domains, in the google.com domain also, such as - www.google.com or mail.google.com. But it would not + www.google.com or mail.google.com. But it would not match www.google.de! So, apparently, we have these two actions defined as exceptions to the general rules at the top somewhere in the lower part of our default.action file, and @@ -8747,7 +9022,7 @@ In file: user.action [ View ] [ Edit ] Then, for our user.action file, we again have no hits. So there is nothing google-specific that we might have added to our own, local - configuration. If there was, those actions would over-rule any actions from + configuration. If there was, those actions would over-rule any actions from previously processed files, such as default.action. user.action typically has the last word. This is the best place to put hard and fast exceptions, @@ -8755,7 +9030,7 @@ In file: user.action [ View ] [ Edit ] And finally we pull it all together in the bottom section and summarize how - Privoxy is applying all its actions + Privoxy is applying all its actions to google.com: @@ -8764,9 +9039,10 @@ In file: user.action [ View ] [ Edit ] Final results: - + -add-header -block + +change-x-forwarded-for{block} -client-header-filter{hide-tor-exit-notation} -content-type-overwrite -crunch-client-header @@ -8808,30 +9084,24 @@ In file: user.action [ View ] [ Edit ] + +set-image-blocker {pattern} - Notice the only difference here to the previous listing, is to + Notice the only difference here to the previous listing, is to fast-redirects and session-cookies-only, - which are activated specifically for this site in our configuration, + which are activated specifically for this site in our configuration, and thus show in the Final Results. @@ -8842,37 +9112,37 @@ 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, - which is the expanded form of one of our aliases that had been defined as: + 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, + which is the expanded form of one of our aliases that had been defined as: +block-as-image. (Aliases are defined in - the first section of the actions file and typically used to combine more + the first section of the actions file and typically used to combine more than one action.) - Any one of these would have done the trick and blocked this as an unwanted - image. This is unnecessarily redundant since the last case effectively - would also cover the first. No point in taking chances with these guys - though ;-) Note that if you want an ad or obnoxious + Any one of these would have done the trick and blocked this as an unwanted + image. This is unnecessarily redundant since the last case effectively + would also cover the first. No point in taking chances with these guys + though ;-) Note that if you want an ad or obnoxious URL to be invisible, it should be defined as ad.doubleclick.net is done here -- as both a +block - and an + linkend="BLOCK">+block{} + and an +handle-as-image. The custom alias +block-as-image just simplifies the process and make it more readable. @@ -8890,8 +9160,9 @@ In file: user.action [ View ] [ Edit ][ View ] [ Edit ] - {-add-header + {-add-header -block + +change-x-forwarded-for{block} -client-header-filter{hide-tor-exit-notation} -content-type-overwrite -crunch-client-header @@ -8899,8 +9170,8 @@ In file: user.action [ View ] [ Edit ][ View ] [ Edit ] - Ooops, the /adsl/ is matching /ads in our + Ooops, the /adsl/ is matching /ads in our configuration! But we did not want this at all! Now we see why we get the - blank page. It is actually triggering two different actions here, and - the effects are aggregated so that the URL is blocked, and &my-app; is told + blank page. It is actually triggering two different actions here, and + the effects are aggregated so that the URL is blocked, and &my-app; is told to treat the block as if it were an image. But this is, of course, all wrong. We could now add a new action below this (or better in our own user.action file) that explicitly @@ -8979,28 +9244,28 @@ In file: user.action [ View ] [ Edit ] - Now the page displays ;-) + Now the page displays ;-) Remember to flush your browser's caches when making these kinds of changes to your configuration to insure that you get a freshly delivered page! Or, try using Shift+Reload. - But now what about a situation where we get no explicit matches like + But now what about a situation where we get no explicit matches like we did with: - { +block +handle-as-image } + { +block{Path starts with "ads".} +handle-as-image } /ads That actually was very helpful and pointed us quickly to where the problem - was. If you don't get this kind of match, then it means one of the default + was. If you don't get this kind of match, then it means one of the default rules in the first section of default.action is causing the problem. This would require some guesswork, and maybe a little trial and error to isolate the offending rule. One likely cause would be one of the @@ -9023,7 +9288,7 @@ In file: user.action [ View ] [ Edit ] - { shop } is an alias that expands to + { shop } is an alias that expands to { -filter -session-cookies-only }. Or you could do your own exception to negate filtering: @@ -9044,23 +9309,23 @@ 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 + the subsequent path portion), all sub-pages within that domain are included automatically in the scope of the action. - Images that are inexplicably being blocked, may well be hitting the + Images that are inexplicably being blocked, may well be hitting the +filter{banners-by-size} - rule, which assumes - that images of certain sizes are ad banners (works well + rule, which assumes + that images of certain sizes are ad banners (works well most of the time since these tend to be standardized). { fragile } is an alias that disables most actions that are the most likely to cause trouble. This can be used as a - last resort for problem sites. - + last resort for problem sites. + @@ -9069,16 +9334,16 @@ 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, + 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., just as an example. - + If this still does not work, you will have to go through the remaining actions one by one to find which one(s) is causing the problem. @@ -9089,7 +9354,7 @@ In file: user.action [ View ] [ Edit ][ View ] [ Edit ][ View ] [ Edit ][ View ] [ Edit ][ View ] [ Edit ][ View ] [ Edit ][ View ] [ Edit ]