3 Copyright © 2001, 2002 by Privoxy Developers
5 $Id: user-manual.sgml,v 1.104 2002/05/04 08:44:45 swa Exp $
7 The user manual gives users information on how to install, configure and use
10 Privoxy is a web proxy with advanced filtering capabilities for protecting
11 privacy, filtering web page content, managing cookies, controlling access, and
12 removing ads, banners, pop-ups and other obnoxious Internet junk. Privoxy has a
13 very flexible configuration and can be customized to suit individual needs and
14 tastes. Privoxy has application for both stand-alone systems and multi-user
17 Privoxy is based on Internet Junkbuster (tm).
19 You can find the latest version of the user manual at http://www.privoxy.org/
20 user-manual/. Please see the Contact section on how to contact the developers.
22 -------------------------------------------------------------------------------
33 2.1.1. Red Hat and SuSE RPMs
36 2.1.4. Solaris, NetBSD, FreeBSD, HP-UX
41 2.2. Building from Source
44 4. Quickstart to Using Privoxy
47 5.1. RedHat and Debian
50 5.4. Solaris, NetBSD, FreeBSD, HP-UX and others
54 5.8. Command Line Options
56 6. Privoxy Configuration
58 6.1. Controlling Privoxy with Your Web Browser
59 6.2. Configuration Files Overview
61 7. The Main Configuration File
63 7.1. Configuration and Log File Locations
73 7.2. Local Set-up Documentation
83 7.3.2. single-threaded
85 7.4. Access Control and Security
89 7.4.3. enable-remote-toggle
90 7.4.4. enable-edit-actions
91 7.4.5. ACLs: permit-access and deny-access
97 7.5.2. forward-socks4 and forward-socks4a
98 7.5.3. Advanced Forwarding Examples
100 7.6. Windows GUI Options
104 8.1. Finding the Right Mix
106 8.3. How Actions are Applied to URLs
109 8.4.1. The Domain Pattern
110 8.4.2. The Path Pattern
116 8.5.3. +deanimate-gifs
117 8.5.4. +downgrade-http-version
118 8.5.5. +fast-redirects
120 8.5.7. +hide-forwarded-for-headers
121 8.5.8. +hide-from-header
123 8.5.10. +hide-user-agent
124 8.5.11. +handle-as-image
125 8.5.12. +set-image-blocker
126 8.5.13. +limit-connect
127 8.5.14. +prevent-compression
128 8.5.15. +session-cookies-only
129 8.5.16. +prevent-reading-cookies
130 8.5.17. +prevent-setting-cookies
132 8.5.19. +send-vanilla-wafer
135 8.5.22. Sample Actions Files
141 9.1. The +filter Action
144 11. Contacting the Developers, Bug Reporting and Feature Requests
148 11.3. Request new features
149 11.4. Report ads or other filter problems
152 12. Copyright, License and History
161 14.1. Regular Expressions
162 14.2. Privoxy's Internal Pages
166 14.3. Chain of Events
167 14.4. Anatomy of an Action
171 This documentation is included with the current beta version of Privoxy,
172 v.2.9.15, and is mostly complete at this point. The most up to date reference
173 for the time being is still the comments in the source files and in the
174 individual configuration files. Development of version 3.0 is currently nearing
175 completion, and includes many significant changes and enhancements over earlier
176 versions. The target release date for stable v3.0 is "soon" ;-).
178 Since this is a beta version, not all new features are well tested. This
179 documentation may be slightly out of sync as a result (especially with CVS
180 sources). And there may be bugs, though hopefully not many!
182 -------------------------------------------------------------------------------
186 In addition to Internet Junkbuster's traditional features of ad and banner
187 blocking and cookie management, Privoxy provides new features, some of them
188 currently under development:
190 * Integrated browser based configuration and control utility at http://
191 config.privoxy.org/ (shortcut: http://p.p/). Browser-based tracing of rule
192 and filter effects. Remote toggling.
194 * Web page content filtering (removes banners based on size, invisible
195 "web-bugs", JavaScript and HTML annoyances, pop-up windows, etc.)
197 * Modularized configuration that allows for standard settings and user
198 settings to reside in separate files, so that installing updated actions
199 files won't overwrite idividual user settings.
201 * HTTP/1.1 compliant (but not all optional 1.1 features are supported).
203 * Support for Perl Compatible Regular Expressions in the configuration files,
204 and generally a more sophisticated and flexible configuration syntax over
207 * Improved cookie management features (e.g. session based cookies).
211 * Bypass many click-tracking scripts (avoids script redirection).
213 * Multi-threaded (POSIX and native threads).
215 * User-customizable HTML templates for all proxy-generated pages (e.g.
218 * Auto-detection and re-reading of config file changes.
220 * Improved signal handling, and a true daemon mode (Unix).
222 * Every feature now controllable on a per-site or per-location basis,
223 configuration more powerful and versatile over-all.
225 * Many smaller new features added, limitations and bugs removed, and security
228 -------------------------------------------------------------------------------
232 Privoxy is available both in convenient pre-compiled packages for a wide range
233 of operating systems, and as raw source code. For most users, we recommend
234 using the packages, which can be downloaded from our Privoxy Project Page.
236 Note: If you have a previous Junkbuster or Privoxy installation on your system,
237 you will need to remove it. Some platforms do this for you as part of their
238 installation procedure. (See below for your platform). In any case be sure to
239 backup your old configuration if it is valuable to you. See the note to
240 upgraders section below.
242 -------------------------------------------------------------------------------
246 How to install the binary packages depends on your operating system:
248 -------------------------------------------------------------------------------
250 2.1.1. Red Hat and SuSE RPMs
252 RPMs can be installed with rpm -Uvh privoxy-2.9.15-1.rpm, and will use /etc/
253 privoxy for the location of configuration files.
255 Note that on Red Hat, Privoxy will not be automatically started on system boot.
256 You will need to enable that using chkconfig, ntsysv, or similar methods. Note
257 that SuSE will automatically start Privoxy in the boot process.
259 If you have problems with failed dependencies, try rebuilding the SRC RPM: rpm
260 --rebuild privoxy-2.9.15-1.src.rpm;. This will use your locally installed
261 libraries and RPM version.
263 Also note that if you have a Junkbuster RPM installed on your system, you need
264 to remove it first, because the packages conflict. Otherwise, RPM will try to
265 remove Junkbuster automatically, before installing Privoxy.
267 -------------------------------------------------------------------------------
273 -------------------------------------------------------------------------------
277 Just double-click the installer, which will guide you through the installation
278 process. You will find the configuration files in the same directory as you
279 installed Privoxy in. We do not use the registry of Windows.
281 -------------------------------------------------------------------------------
283 2.1.4. Solaris, NetBSD, FreeBSD, HP-UX
285 Create a new directory, cd to it, then unzip and untar the archive. For the
286 most part, you'll have to figure out where things go. FIXME.
288 -------------------------------------------------------------------------------
292 First, make sure that no previous installations of Junkbuster and / or Privoxy
293 are left on your system. You can do this by
295 Then, just double-click the WarpIN self-installing archive, which will guide
296 you through the installation process. A shadow of the Privoxy executable will
297 be placed in your startup folder so it will start automatically whenever OS/2
300 The directory you choose to install Privoxy into will contain all of the
303 -------------------------------------------------------------------------------
307 Unzip the downloaded package (you can either double-click on the file in the
308 finder, or on the desktop if you downloaded it there). Then, double-click on
309 the package installer icon and follow the installation process. Privoxy will be
310 installed in the subdirectory /Applications/Privoxy.app. Privoxy will set
311 itself up to start automatically on system bring-up via /System/Library/
312 StartupItems/Privoxy.
314 -------------------------------------------------------------------------------
318 Copy and then unpack the lha archive to a suitable location. All necessary
319 files will be installed into Privoxy directory, including all configuration and
320 log files. To uninstall, just remove this directory.
322 Start Privoxy (with RUN <>NIL:) in your startnet script (AmiTCP), in s:
323 user-startup (RoadShow), as startup program in your startup script (Genesis),
324 or as startup action (Miami and MiamiDx). Privoxy will automatically quit when
325 you quit your TCP/IP stack (just ignore the harmless warning your TCP/IP stack
326 may display that Privoxy is still running).
328 -------------------------------------------------------------------------------
330 2.2. Building from Source
332 The most convenient way to obtain the Privoxy sources is to download the source
333 tarball from our project page.
335 If you like to live on the bleeding edge and are not afraid of using possibly
336 unstable development versions, you can check out the up-to-the-minute version
337 directly from the CVS repository or simply download the nightly CVS tarball.
339 To build Privoxy from source, autoconf, GNU make (gmake), and, of course, a C
340 compiler like gcc are required.
342 When building from a source tarball (either release version or nightly CVS
343 tarball), first unpack the source:
345 tar xzvf privoxy-2.9.15-beta-src* [.tgz or .tar.gz]
346 cd privoxy-2.9.15-beta
348 For retrieving the current CVS sources, you'll need CVS installed. Note that
349 sources from CVS are development quality, and may not be stable, or well
350 tested. To download CVS source:
352 cvs -d:pserver:anonymous@cvs.ijbswa.sourceforge.net:/cvsroot/ijbswa login
353 cvs -z3 -d:pserver:anonymous@cvs.ijbswa.sourceforge.net:/cvsroot/ijbswa co current
356 This will create a directory named current/, which will contain the source
359 Then, in either case, to build from unpacked tarball or CVS source:
363 ./configure # (--help to see options)
364 make # (the make from gnu, gmake for *BSD)
366 make -n install # (to see where all the files will go)
367 make install # (to really install)
369 If you have gnu make, you can have the first four steps automatically done for
374 in the freshly downloaded or unpacked source directory.
376 For more detailed instructions on how to build Redhat and SuSE RPMs, Windows
377 self-extracting installers, building on platforms with special requirements
378 etc, please consult the developer manual.
380 -------------------------------------------------------------------------------
384 There are very significant changes from earlier Junkbuster versions to the
385 current Privoxy. The number, names, syntax, and purposes of configuration files
386 have substantially changed. Junkbuster 2.0.x configuration files will not
387 migrate, Junkbuster 2.9.x and Privoxy configurations will need to be ported.
388 The functionalities of the old blockfile, cookiefile and imagelist are now
389 combined into the "actions files". default.action, is the main actions file.
390 Local exceptions should best be put into user.action.
392 A "filter file" (typically default.filter) is new as of Privoxy 2.9.x, and
393 provides some of the new sophistication (explained below). config is much the
396 If upgrading from a 2.0.x version, you will have to use the new config files,
397 and possibly adapt any personal rules from your older files. When porting
398 personal rules over from the old blockfile to the new actions files, please
399 note that even the pattern syntax has changed. If upgrading from 2.9.x
400 development versions, it is still recommended to use the new configuration
403 A quick list of things to be aware of before upgrading:
405 * The default listening port is now 8118 due to a conflict with another
408 * Some installers may remove earlier versions completely. Save any important
411 * Privoxy is controllable with a web browser at the special URL: http://
412 config.privoxy.org/ (Shortcut: http://p.p/). Many aspects of configuration
413 can be done here, including temporarily disabling Privoxy.
415 * The primary configuration file for cookie management, ad and banner
416 blocking, and many other aspects of Privoxy configuration is in the actions
417 files. It is strongly recommended to become familiar with the new actions
418 concept below, before modifying these files. Locally defined rules should
421 * Some installers may not automatically start Privoxy after installation.
423 -------------------------------------------------------------------------------
425 4. Quickstart to Using Privoxy
427 * If upgrading, please back up any configuration files. See the Note to
430 * Install Privoxy. See the Installation Section for platform specific
433 * Start Privoxy, if the installation program has not done this already. See
434 the section Starting Privoxy.
436 * Set your browser to use Privoxy as HTTP and HTTPS proxy by setting the
437 proxy configuration for address of localhost and port 8118. (Junkbuster and
438 earlier versions of Privoxy used port 8000.) See the section Starting
441 * Flush your browser's caches, to remove any cached ad images.
443 * Enjoy surfing with enhanced comfort and privacy. You may want to customize
444 the user.action file to personalize your new browsing experience. See the
445 Configuration section for more configuration options, and how to further
446 customize your installation.
448 * If you experience problems with sites that "misbehave", see the Anatomy of
449 an Action section in the Appendix.
451 * Please see the section Contacting the Developers on how to report bugs or
452 problems with websites or to get help.
454 -------------------------------------------------------------------------------
458 Before launching Privoxy for the first time, you will want to configure your
459 browser(s) to use Privoxy as a HTTP and HTTPS proxy. The default is localhost
460 for the proxy address, and port 8118 (earlier versions used port 8000). This is
461 the one configuration step that must be done!
463 With Netscape (and Mozilla), this can be set under Edit -> Preferences ->
464 Advanced -> Proxies -> HTTP Proxy. For Internet Explorer: Tools -> Internet
465 Properties -> Connections -> LAN Setting. Then, check "Use Proxy" and fill in
466 the appropriate info (Address: localhost, Port: 8118). Include if HTTPS proxy
469 After doing this, flush your browser's disk and memory caches to force a
470 re-reading of all pages and to get rid of any ads that may be cached. You are
471 now ready to start enjoying the benefits of using Privoxy!
473 Privoxy is typically started by specifying the main configuration file to be
474 used on the command line. If no configuration file is specified on the command
475 line, Privoxy will look for a file named config in the current directory.
476 Except on Win32 where it will try config.txt.
478 -------------------------------------------------------------------------------
480 5.1. RedHat and Debian
482 We use a script. Note that RedHat does not start Privoxy upon booting per
483 default. It will use the file /etc/privoxy/config as its main configuration
484 file. FIXME: Debian??
486 # /etc/rc.d/init.d/privoxy start
488 -------------------------------------------------------------------------------
492 We use a script. It will use the file /etc/privoxy/config as its main
493 configuration file. Note that SuSE starts Privoxy upon booting your PC.
497 -------------------------------------------------------------------------------
501 Click on the Privoxy Icon to start Privoxy. If no configuration file is
502 specified on the command line, Privoxy will look for a file named config.txt.
503 Note that Windows will automatically start Privoxy upon booting you PC.
505 -------------------------------------------------------------------------------
507 5.4. Solaris, NetBSD, FreeBSD, HP-UX and others
509 Example Unix startup command:
511 # /usr/sbin/privoxy /etc/privoxy/config
513 -------------------------------------------------------------------------------
519 -------------------------------------------------------------------------------
525 -------------------------------------------------------------------------------
531 -------------------------------------------------------------------------------
533 5.8. Command Line Options
535 Privoxy may be invoked with the following command-line options:
539 Print version info and exit. Unix only.
543 Print short usage info and exit. Unix only.
547 Don't become a daemon, i.e. don't fork and become process group leader, and
548 don't detach from controlling tty. Unix only.
552 On startup, write the process ID to FILE. Delete the FILE on exit. Failure
553 to create or delete the FILE is non-fatal. If no FILE option is given, no
554 PID file will be used. Unix only.
556 * --user USER[.GROUP]
558 After (optionally) writing the PID file, assume the user ID of USER, and if
559 included the GID of GROUP. Exit if the privileges are not sufficient to do
564 If no configfile is included on the command line, Privoxy will look for a
565 file named "config" in the current directory (except on Win32 where it will
566 look for "config.txt" instead). Specify full path to avoid confusion. If no
567 config file is found, Privoxy will fail to start.
569 -------------------------------------------------------------------------------
571 6. Privoxy Configuration
573 All Privoxy configuration is stored in text files. These files can be edited
574 with a text editor. Many important aspects of Privoxy can also be controlled
575 easily with a web browser.
577 -------------------------------------------------------------------------------
579 6.1. Controlling Privoxy with Your Web Browser
581 Privoxy's user interface can be reached through the special URL http://
582 config.privoxy.org/ (shortcut: http://p.p/), which is a built-in page and works
583 without Internet access. You will see the following section:
586 ? View & change the current configuration
587 ? View the source code version numbers
588 ? View the request headers.
589 ? Look up which actions apply to a URL and why
590 ? Toggle Privoxy on or off
593 This should be self-explanatory. Note the first item leads to an editor for the
594 actions files, which is where the ad, banner, cookie, and URL blocking magic is
595 configured as well as other advanced features of Privoxy. This is an easy way
596 to adjust various aspects of Privoxy configuration. The actions file, and other
597 configuration files, are explained in detail below.
599 "Toggle Privoxy On or Off" is handy for sites that might have problems with
600 your current actions and filters. You can in fact use it as a test to see
601 whether it is Privoxy causing the problem or not. Privoxy continues to run as a
602 proxy in this case, but all manipulation is disabled, i.e. Privoxy acts like a
603 normal forwarding proxy. There is even a toggle Bookmarklet offered, so that
604 you can toggle Privoxy with one click from your browser.
606 -------------------------------------------------------------------------------
608 6.2. Configuration Files Overview
610 For Unix, *BSD and Linux, all configuration files are located in /etc/privoxy/
611 by default. For MS Windows, OS/2, and AmigaOS these are all in the same
612 directory as the Privoxy executable. The name and number of configuration files
613 has changed from previous versions, and is subject to change as development
616 The installed defaults provide a reasonable starting point, though some
617 settings may be aggressive by some standards. For the time being, the principle
618 configuration files are:
620 * The main configuration file is named config on Linux, Unix, BSD, OS/2, and
621 AmigaOS and config.txt on Windows. This is a required file.
623 * default.action (the main actions file) is used to define which "actions"
624 relating to banner-blocking, images, pop-ups, content modification, cookie
625 handling etc should be applied by default. It also defines many exceptions
626 (both positive and negative) from this default set of actions that enable
627 Privoxy to selectively eliminate the junk, and only the junk, on as many
628 websites as possible.
630 Multiple actions files may be defined in config. These are processed in the
631 order they are defined. Local customizations and locally preferred
632 exceptions to the default policies as defined in default.action (which you
633 will most propably want to define sooner or later) are probably best
634 applied in user.action, where you can preserve them across upgrades.
635 standard.action is for Privoxy's internal use.
637 There is also a web based editor that can be accessed from http://
638 config.privoxy.org/show-status (Shortcut: http://p.p/show-status) for the
639 various actions files.
641 * default.filter (the filter file) can be used to re-write the raw page
642 content, including viewable text as well as embedded HTML and JavaScript,
643 and whatever else lurks on any given web page. The filtering jobs are only
644 pre-defined here; whether to apply them or not is up to the actions files.
646 All files use the "#" character to denote a comment (the rest of the line will
647 be ignored) and understand line continuation through placing a backslash ("\")
648 as the very last character in a line. If the # is preceded by a backslash, it
649 looses its special function. Placing a # in front of an otherwise valid
650 configuration line to prevent it from being interpreted is called "commenting
653 The actions files and default.filter can use Perl style regular expressions for
656 After making any changes, there is no need to restart Privoxy in order for the
657 changes to take effect. Privoxy detects such changes automatically. Note,
658 however, that it may take one or two additional requests for the change to take
659 effect. When changing the listening address of Privoxy, these "wake up"
660 requests must obviously be sent to the old listening address.
662 While under development, the configuration content is subject to change. The
663 below documentation may not be accurate by the time you read this. Also, what
664 constitutes a "default" setting, may change, so please check all your
665 configuration files on important issues.
667 -------------------------------------------------------------------------------
669 7. The Main Configuration File
671 Again, the main configuration file is named config on Linux/Unix/BSD and OS/2,
672 and config.txt on Windows. Configuration lines consist of an initial keyword
673 followed by a list of values, all separated by whitespace (any number of spaces
674 or tabs). For example:
678 Assigns the value /etc/privoxy to the option confdir and thus indicates that
679 the configuration directory is named "/etc/privoxy/".
681 All options in the config file except for confdir and logdir are optional.
682 Watch out in the below description for what happens if you leave them unset.
684 The main config file controls all aspects of Privoxy's operation that are not
685 location dependent (i.e. they apply universally, no matter where you may be
688 -------------------------------------------------------------------------------
690 7.1. Configuration and Log File Locations
692 Privoxy can (and normally does) use a number of other files for additional
693 configuration, help and logging. This section of the configuration file tells
694 Privoxy where to find those other files.
696 The user running Privoxy, must have read permission for all configuration
697 files, and write permission to any files that would be modified, such as log
700 -------------------------------------------------------------------------------
706 The directory where the other configuration files are located
714 /etc/privoxy (Unix) or Privoxy installation dir (Windows)
722 No trailing "/", please
724 When development goes modular and multi-user, the blocker, filter, and
725 per-user config will be stored in subdirectories of "confdir". For now, the
726 configuration directory structure is flat, except for confdir/templates,
727 where the HTML templates for CGI output reside (e.g. Privoxy's 404 error
730 -------------------------------------------------------------------------------
736 The directory where all logging takes place (i.e. where logfile and jarfile
745 /var/log/privoxy (Unix) or Privoxy installation dir (Windows)
753 No trailing "/", please
755 -------------------------------------------------------------------------------
761 The actions file(s) to use
765 File name, relative to confdir, without the .action suffix
769 standard # Internal purposes, no editing recommended
771 default # Main actions file
773 user # User customizations
777 No actions are taken at all. Simple neutral proxying.
781 Multiple actionsfile lines are permitted, and are in fact recommended!
783 The default values include standard.action, which is used for internal
784 purposes and should be loaded, default.action, which is the "main" actions
785 file maintained by the developers, and user.action, where you can make your
788 Actions files are where all the per site and per URL configuration is done
789 for ad blocking, cookie management, privacy considerations, etc. There is
790 no point in using Privoxy without at least one actions file.
792 -------------------------------------------------------------------------------
798 The filter file to use
802 File name, relative to confdir
806 default.filter (Unix) or default.filter.txt (Windows)
810 No textual content filtering takes place, i.e. all +filter{name} actions in
811 the actions files are turned neutral.
815 The "default.filter" file contains content modification rules that use
816 "regular expressions". These rules permit powerful changes on the content
817 of Web pages, e.g., you could disable your favorite JavaScript annoyances,
818 re-write the actual displayed text, or just have some fun replacing
819 "Microsoft" with "MicroSuck" wherever it appears on a Web page.
821 -------------------------------------------------------------------------------
831 File name, relative to logdir
835 logfile (Unix) or privoxy.log (Windows)
839 No log file is used, all log messages go to the console (stderr).
843 The windows version will additionally log to the console.
845 The logfile is where all logging and error messages are written. The level
846 of detail and number of messages are set with the debug option (see below).
847 The logfile can be useful for tracking down a problem with Privoxy (e.g.,
848 it's not blocking an ad you think it should block) but in most cases you
849 probably will never look at it.
851 Your logfile will grow indefinitely, and you will probably want to
852 periodically remove it. On Unix systems, you can do this with a cron job
853 (see "man cron"). For Red Hat, a logrotate script has been included.
855 On SuSE Linux systems, you can place a line like "/var/log/privoxy.* +1024k
856 644 nobody.nogroup" in /etc/logfiles, with the effect that cron.daily will
857 automatically archive, gzip, and empty the log, when it exceeds 1M size.
859 Any log files must be writable by whatever user Privoxy is being run as
860 (default on UNIX, user id is "privoxy").
862 -------------------------------------------------------------------------------
868 The file to store intercepted cookies in
872 File name, relative to logdir
876 jarfile (Unix) or privoxy.jar (Windows)
880 Intercepted cookies are not stored at all.
884 The jarfile may grow to ridiculous sizes over time.
886 -------------------------------------------------------------------------------
892 The trust file to use
896 File name, relative to confdir
900 Unset (commented out). When activated: trust (Unix) or trust.txt (Windows)
904 The whole trust mechanism is turned off.
908 The trust mechanism is an experimental feature for building white-lists and
909 should be used with care. It is NOT recommended for the casual user.
911 If you specify a trust file, Privoxy will only allow access to sites that
912 are named in the trustfile. You can also mark sites as trusted referrers
913 (with +), with the effect that access to untrusted sites will be granted,
914 if a link from a trusted referrer was used. The link target will then be
915 added to the "trustfile". Possible applications include limiting Internet
918 If you use + operator in the trust file, it may grow considerably over
921 -------------------------------------------------------------------------------
923 7.2. Local Set-up Documentation
925 If you intend to operate Privoxy for more users that just yourself, it might be
926 a good idea to let them know how to reach you, what you block and why you do
927 that, your policies etc.
929 -------------------------------------------------------------------------------
935 Location of the Privoxy User Manual.
939 A fully qualified URI
947 http://www.privoxy.org/version/user-manual/ will be used, where version is
952 The User Manual URI is used for help links from some of the internal CGI
953 pages. The manual itself is normally packaged with the binary
954 distributions, so you propably want to set this to a locally installed
955 copy. For multi-user setups, you could provide a copy on a local webserver
956 for all your users and use the corresponding URL here.
960 Unix, in local filesystem:
962 user-manual file:///usr/share/doc/privoxy-2.9.15/user-manual/
964 Any platform, on local webserver (called "local-webserver"):
966 user-manual http://local-webserver/privoxy-user-manual/
968 +-----------------------------------------------------------------+
970 |-----------------------------------------------------------------|
971 |If set, this option should be the first option in the config |
972 |file, because it is used while the config file is being read. |
973 +-----------------------------------------------------------------+
975 -------------------------------------------------------------------------------
977 7.2.2. trust-info-url
981 A URL to be displayed in the error page that users will see if access to an
982 untrusted page is denied.
990 Two example URL are provided
994 No links are displayed on the "untrusted" error page.
998 The value of this option only matters if the experimental trust mechanism
999 has been activated. (See trustfile above.)
1001 If you use the trust mechanism, it is a good idea to write up some on-line
1002 documentation about your trust policy and to specify the URL(s) here. Use
1003 multiple times for multiple URLs.
1005 The URL(s) should be added to the trustfile as well, so users don't end up
1006 locked out from the information on why they were locked out in the first
1009 -------------------------------------------------------------------------------
1011 7.2.3. admin-address
1015 An email address to reach the proxy administrator.
1027 No email address is displayed on error pages and the CGI user interface.
1031 If both admin-address and proxy-info-url are unset, the whole "Local
1032 Privoxy Support" box on all generated pages will not be shown.
1034 -------------------------------------------------------------------------------
1036 7.2.4. proxy-info-url
1040 A URL to documentation about the local Privoxy setup, configuration or
1053 No link to local documentation is displayed on error pages and the CGI user
1058 If both admin-address and proxy-info-url are unset, the whole "Local
1059 Privoxy Support" box on all generated pages will not be shown.
1061 This URL shouldn't be blocked ;-)
1063 -------------------------------------------------------------------------------
1067 These options are mainly useful when tracing a problem. Note that you might
1068 also want to invoke Privoxy with the --no-daemon command line option when
1071 -------------------------------------------------------------------------------
1077 Key values that determine what information gets logged.
1085 12289 (i.e.: URLs plus informational and warning messages)
1089 Nothing gets logged.
1093 The available debug levels are:
1095 debug 1 # show each GET/POST/CONNECT request
1096 debug 2 # show each connection status
1097 debug 4 # show I/O status
1098 debug 8 # show header parsing
1099 debug 16 # log all data into the logfile
1100 debug 32 # debug force feature
1101 debug 64 # debug regular expression filter
1102 debug 128 # debug fast redirects
1103 debug 256 # debug GIF de-animation
1104 debug 512 # Common Log Format
1105 debug 1024 # debug kill pop-ups
1106 debug 4096 # Startup banner and warnings.
1107 debug 8192 # Non-fatal errors
1109 To select multiple debug levels, you can either add them or use multiple
1112 A debug level of 1 is informative because it will show you each request as
1113 it happens. 1, 4096 and 8192 are highly recommended so that you will notice
1114 when things go wrong. The other levels are probably only of interest if you
1115 are hunting down a specific problem. They can produce a hell of an output
1118 The reporting of fatal errors (i.e. ones which crash Privoxy) is always on
1119 and cannot be disabled.
1121 If you want to use CLF (Common Log Format), you should set "debug 512" ONLY
1122 and not enable anything else.
1124 -------------------------------------------------------------------------------
1126 7.3.2. single-threaded
1130 Whether to run only one server thread
1142 Multi-threaded (or, where unavailable: forked) operation, i.e. the ability
1143 to serve multiple requests simultaneously.
1147 This option is only there for debug purposes and you should never need to
1148 use it. It will drastically reduce performance.
1150 -------------------------------------------------------------------------------
1152 7.4. Access Control and Security
1154 This section of the config file controls the security-relevant aspects of
1155 Privoxy's configuration.
1157 -------------------------------------------------------------------------------
1159 7.4.1. listen-address
1163 The IP address and TCP port on which Privoxy will listen for client
1176 Bind to localhost (127.0.0.1), port 8118. This is suitable and recommended
1177 for home users who run Privoxy on the same machine as their browser.
1181 You will need to configure your browser(s) to this proxy address and port.
1183 If you already have another service running on port 8118, or if you want to
1184 serve requests from other machines (e.g. on your local network) as well,
1185 you will need to override the default.
1187 If you leave out the IP address, Privoxy will bind to all interfaces
1188 (addresses) on your machine and may become reachable from the Internet. In
1189 that case, consider using access control lists (ACL's) (see "ACLs" below),
1194 Suppose you are running Privoxy on a machine which has the address
1195 192.168.0.1 on your local private network (192.168.0.0) and has another
1196 outside connection with a different address. You want it to serve requests
1199 listen-address 192.168.0.1:8118
1201 -------------------------------------------------------------------------------
1207 Initial state of "toggle" status
1219 Act as if toggled on
1223 If set to 0, Privoxy will start in "toggled off" mode, i.e. behave like a
1224 normal, content-neutral proxy. See enable-remote-toggle below. This is not
1225 really useful anymore, since toggling is much easier via the web interface
1226 than via editing the conf file.
1228 The windows version will only display the toggle icon in the system tray if
1229 this option is present.
1231 -------------------------------------------------------------------------------
1233 7.4.3. enable-remote-toggle
1237 Whether or not the web-based toggle feature may be used
1249 The web-based toggle feature is disabled.
1253 When toggled off, Privoxy acts like a normal, content-neutral proxy, i.e.
1254 it acts as if none of the actions applied to any URL.
1256 For the time being, access to the toggle feature can not be controlled
1257 separately by "ACLs" or HTTP authentication, so that everybody who can
1258 access Privoxy (see "ACLs" and listen-address above) can toggle it for all
1259 users. So this option is not recommended for multi-user environments with
1262 Note that you must have compiled Privoxy with support for this feature,
1263 otherwise this option has no effect.
1265 -------------------------------------------------------------------------------
1267 7.4.4. enable-edit-actions
1271 Whether or not the web-based actions file editor may be used
1283 The web-based actions file editor is disabled.
1287 For the time being, access to the editor can not be controlled separately
1288 by "ACLs" or HTTP authentication, so that everybody who can access Privoxy
1289 (see "ACLs" and listen-address above) can modify its configuration for all
1290 users. So this option is not recommended for multi-user environments with
1293 Note that you must have compiled Privoxy with support for this feature,
1294 otherwise this option has no effect.
1296 -------------------------------------------------------------------------------
1298 7.4.5. ACLs: permit-access and deny-access
1302 Who can access what.
1306 src_addr[/src_masklen] [dst_addr[/dst_masklen]]
1308 Where src_addr and dst_addr are IP addresses in dotted decimal notation or
1309 valid DNS names, and src_masklen and dst_masklen are subnet masks in CIDR
1310 notation, i.e. integer values from 2 to 30 representing the length (in
1311 bits) of the network address. The masks and the whole destination part are
1320 Don't restrict access further than implied by listen-address
1324 Access controls are included at the request of ISPs and systems
1325 administrators, and are not usually needed by individual users. For a
1326 typical home user, it will normally suffice to ensure that Privoxy only
1327 listens on the localhost or internal (home) network address by means of the
1328 listen-address option.
1330 Please see the warnings in the FAQ that this proxy is not intended to be a
1331 substitute for a firewall or to encourage anyone to defer addressing basic
1332 security weaknesses.
1334 Multiple ACL lines are OK. If any ACLs are specified, then the Privoxy
1335 talks only to IP addresses that match at least one permit-access line and
1336 don't match any subsequent deny-access line. In other words, the last match
1337 wins, with the default being deny-access.
1339 If Privoxy is using a forwarder (see forward below) for a particular
1340 destination URL, the dst_addr that is examined is the address of the
1341 forwarder and NOT the address of the ultimate target. This is necessary
1342 because it may be impossible for the local Privoxy to determine the IP
1343 address of the ultimate target (that's often what gateways are used for).
1345 You should prefer using IP addresses over DNS names, because the address
1346 lookups take time. All DNS names must resolve! You can not use domain
1347 patterns like "*.org" or partial domain names. If a DNS name resolves to
1348 multiple IP addresses, only the first one is used.
1350 Denying access to particular sites by ACL may have undesired side effects
1351 if the site in question is hosted on a machine which also hosts other
1356 Explicitly define the default behavior if no ACL and listen-address are
1357 set: "localhost" is OK. The absence of a dst_addr implies that all
1358 destination addresses are OK:
1360 permit-access localhost
1362 Allow any host on the same class C subnet as www.privoxy.org access to
1363 nothing but www.example.com:
1365 permit-access www.privoxy.org/24 www.example.com/32
1367 Allow access from any host on the 26-bit subnet 192.168.45.64 to anywhere,
1368 with the exception that 192.168.45.73 may not access
1369 www.dirty-stuff.example.com:
1371 permit-access 192.168.45.64/26
1372 deny-access 192.168.45.73 www.dirty-stuff.example.com
1374 -------------------------------------------------------------------------------
1380 Maximum size of the buffer for content filtering.
1392 Use a 4MB (4096 KB) limit.
1396 For content filtering, i.e. the +filter and +deanimate-gif actions, it is
1397 necessary that Privoxy buffers the entire document body. This can be
1398 potentially dangerous, since a server could just keep sending data
1399 indefinitely and wait for your RAM to exhaust -- with nasty consequences.
1402 When a document buffer size reaches the buffer-limit, it is flushed to the
1403 client unfiltered and no further attempt to filter the rest of the document
1404 is made. Remember that there may be multiple threads running, which might
1405 require up to buffer-limit Kbytes each, unless you have enabled
1406 "single-threaded" above.
1408 -------------------------------------------------------------------------------
1412 This feature allows routing of HTTP requests through a chain of multiple
1413 proxies. It can be used to better protect privacy and confidentiality when
1414 accessing specific domains by routing requests to those domains through an
1415 anonymous public proxy (see e.g. http://www.multiproxy.org/anon_list.htm) Or to
1416 use a caching proxy to speed up browsing. Or chaining to a parent proxy may be
1417 necessary because the machine that Privoxy runs on has no direct Internet
1420 Also specified here are SOCKS proxies. Privoxy supports the SOCKS 4 and SOCKS
1423 -------------------------------------------------------------------------------
1429 To which parent HTTP proxy specific requests should be routed.
1433 target_domain[:port] http_parent[/port]
1435 Where target_domain is a domain name pattern (see the chapter on domain
1436 matching in the default.action file), http_parent is the address of the
1437 parent HTTP proxy as an IP addresses in dotted decimal notation or as a
1438 valid DNS name (or "." to denote "no forwarding", and the optional port
1439 parameters are TCP ports, i.e. integer values from 1 to 64535
1447 Don't use parent HTTP proxies.
1451 If http_parent is ".", then requests are not forwarded to another HTTP
1452 proxy but are made directly to the web servers.
1454 Multiple lines are OK, they are checked in sequence, and the last match
1459 Everything goes to an example anonymizing proxy, except SSL on port 443
1460 (which it doesn't handle):
1462 forward .* anon-proxy.example.org:8080
1465 Everything goes to our example ISP's caching proxy, except for requests to
1468 forward .*. caching-proxy.example-isp.net:8000
1469 forward .example-isp.net .
1471 -------------------------------------------------------------------------------
1473 7.5.2. forward-socks4 and forward-socks4a
1477 Through which SOCKS proxy (and to which parent HTTP proxy) specific
1478 requests should be routed.
1482 target_domain[:port] socks_proxy[/port] http_parent[/port]
1484 Where target_domain is a domain name pattern (see the chapter on domain
1485 matching in the default.action file), http_parent and socks_proxy are IP
1486 addresses in dotted decimal notation or valid DNS names (http_parent may be
1487 "." to denote "no HTTP forwarding"), and the optional port parameters are
1488 TCP ports, i.e. integer values from 1 to 64535
1496 Don't use SOCKS proxies.
1500 Multiple lines are OK, they are checked in sequence, and the last match
1503 The difference between forward-socks4 and forward-socks4a is that in the
1504 SOCKS 4A protocol, the DNS resolution of the target hostname happens on the
1505 SOCKS server, while in SOCKS 4 it happens locally.
1507 If http_parent is ".", then requests are not forwarded to another HTTP
1508 proxy but are made (HTTP-wise) directly to the web servers, albeit through
1513 From the company example.com, direct connections are made to all "internal"
1514 domains, but everything outbound goes through their ISP's proxy by way of
1515 example.com's corporate SOCKS 4A gateway to the Internet.
1517 forward-socks4a .*. socks-gw.example.com:1080 www-cache.example-isp.net:8080
1518 forward .example.com .
1520 A rule that uses a SOCKS 4 gateway for all destinations but no HTTP parent
1523 forward-socks4 .*. socks-gw.example.com:1080 .
1525 -------------------------------------------------------------------------------
1527 7.5.3. Advanced Forwarding Examples
1529 If you have links to multiple ISPs that provide various special content only to
1530 their subscribers, you can configure multiple Privoxies which have connections
1531 to the respective ISPs to act as forwarders to each other, so that your users
1532 can see the internal content of all ISPs.
1534 Assume that host-a has a PPP connection to isp-a.net. And host-b has a PPP
1535 connection to isp-b.net. Both run Privoxy. Their forwarding configuration can
1541 forward .isp-b.net host-b:8118
1546 forward .isp-a.net host-a:8118
1548 Now, your users can set their browser's proxy to use either host-a or host-b
1549 and be able to browse the internal content of both isp-a and isp-b.
1551 If you intend to chain Privoxy and squid locally, then chain as browser ->
1552 squid -> privoxy is the recommended way.
1554 Assuming that Privoxy and squid run on the same box, your squid configuration
1555 could then look like this:
1557 # Define Privoxy as parent proxy (without ICP)
1558 cache_peer 127.0.0.1 parent 8118 7 no-query
1560 # Define ACL for protocol FTP
1563 # Do not forward FTP requests to Privoxy
1564 always_direct allow ftp
1566 # Forward all the rest to Privoxy
1567 never_direct allow all
1569 You would then need to change your browser's proxy settings to squid's address
1570 and port. Squid normally uses port 3128. If unsure consult http_port in
1573 -------------------------------------------------------------------------------
1575 7.6. Windows GUI Options
1577 Privoxy has a number of options specific to the Windows GUI interface:
1579 If "activity-animation" is set to 1, the Privoxy icon will animate when
1580 "Privoxy" is active. To turn off, set to 0.
1582 activity-animation 1
1585 If "log-messages" is set to 1, Privoxy will log messages to the console window:
1590 If "log-buffer-size" is set to 1, the size of the log buffer, i.e. the amount
1591 of memory used for the log messages displayed in the console window, will be
1592 limited to "log-max-lines" (see below).
1594 Warning: Setting this to 0 will result in the buffer to grow infinitely and eat
1600 log-max-lines is the maximum number of lines held in the log buffer. See above.
1605 If "log-highlight-messages" is set to 1, Privoxy will highlight portions of the
1606 log messages with a bold-faced font:
1608 log-highlight-messages 1
1611 The font used in the console window:
1613 log-font-name Comic Sans MS
1616 Font size used in the console window:
1621 "show-on-task-bar" controls whether or not Privoxy will appear as a button on
1622 the Task bar when minimized:
1627 If "close-button-minimizes" is set to 1, the Windows close button will minimize
1628 Privoxy instead of closing the program (close with the exit option on the File
1631 close-button-minimizes 1
1634 The "hide-console" option is specific to the MS-Win console version of Privoxy.
1635 If this option is used, Privoxy will disconnect from and hide the command
1641 -------------------------------------------------------------------------------
1645 The actions files are used to define what actions Privoxy takes for which URLs,
1646 and thus determine how ad images, cookies and various other aspects of HTTP
1647 content and transactions are handled, and on which sites (or even parts
1648 thereof). There are three such files included with Privoxy (as of version
1649 2.9.15), with differing purposes:
1651 * standard.action - is used by the web based editor, to set various
1652 pre-defined sets of rules for the default actions section in
1653 default.action. These have increasing levels of aggressiveness and have no
1654 influence on your browsing unless you select them explicitly in the editor.
1655 It is not recommend to edit this file.
1657 * default.action - is the primary action file that sets the initial values
1658 for all actions. It is intended to provide a base level of functionality
1659 for Privoxy's array of features. So it is a set of broad rules that should
1660 work reasonably well for users everywhere. This is the file that the
1661 developers are keeping updated, and making available to users.
1663 * user.action - is intended to be for local site preferences and exceptions.
1664 As an example, if your ISP or your bank has specific requirements, and need
1665 special handling, this kind of thing should go here. This file will not be
1668 The list of actions files to be used are defined in the main configuration
1669 file, and are processed in the order they are defined. The content of these can
1670 all be viewed and edited from http://config.privoxy.org/show-status.
1672 An actions file typically has multiple sections. If you want to use "aliases"
1673 in an actions file, you have to place the (optional) alias section at the top
1674 of that file. Then comes the default set of rules which will apply universally
1675 to all sites and pages (be very careful with using such a universal set in
1676 user.action or any other actions file after default.action, because it will
1677 override the result from consulting any previous file). And then below that,
1678 exceptions to the defined universal policies. You can regard user.action as an
1679 appendix to default.action, with the advantage that is a separate file, which
1680 makes preserving your personal settings across Privoxy upgrades easier.
1682 Actions can be used to block anything you want, including ads, banners, or just
1683 some obnoxious URL that you would rather not see. Cookies can be accepted or
1684 rejected, or accepted only during the current browser session (i.e. not written
1685 to disk), content can be modified, JavaScripts tamed, user-tracking fooled, and
1686 much more. See below for a complete list of actions.
1688 -------------------------------------------------------------------------------
1690 8.1. Finding the Right Mix
1692 Note that some actions, like cookie suppression or script disabling, may render
1693 some sites unusable that rely on these techniques to work properly. Finding the
1694 right mix of actions is not always easy and certainly a matter of personal
1695 taste. In general, it can be said that the more "aggressive" your default
1696 settings (in the top section of the actions file) are, the more exceptions for
1697 "trusted" sites you will have to make later. If, for example, you want to kill
1698 popup windows per default, you'll have to make exceptions from that rule for
1699 sites that you regularly use and that require popups for actually useful
1700 content, like maybe your bank, favorite shop, or newspaper.
1702 We have tried to provide you with reasonable rules to start from in the
1703 distribution actions files. But there is no general rule of thumb on these
1704 things. There just are too many variables, and sites are constantly changing.
1705 Sooner or later you will want to change the rules (and read this chapter again
1708 -------------------------------------------------------------------------------
1712 The easiest way to edit the actions files is with a browser by using our
1713 browser-based editor, which can be reached from http://config.privoxy.org/
1714 show-status. The editor allows both fine-grained control over every single
1715 feature on a per-URL basis, and easy choosing from wholesale sets of defaults
1716 like "Cautious", "Medium" or "Advanced".
1718 If you prefer plain text editing to GUIs, you can of course also directly edit
1719 the the actions files. Look at default.action which is richly commented.
1721 -------------------------------------------------------------------------------
1723 8.3. How Actions are Applied to URLs
1725 Actions files are divided into sections. There are special sections, like the "
1726 alias" sections which will be discussed later. For now let's concentrate on
1727 regular sections: They have a heading line (often split up to multiple lines
1728 for readability) which consist of a list of actions, separated by whitespace
1729 and enclosed in curly braces. Below that, there is a list of URL patterns, each
1732 To determine which actions apply to a request, the URL of the request is
1733 compared to all patterns in each action file file. Every time it matches, the
1734 list of applicable actions for the URL is incrementally updated, using the
1735 heading of the section in which the pattern is located. If multiple matches for
1736 the same URL set the same action differently, the last match wins. If not, the
1737 effects are aggregated (e.g. a URL might match both the "+handle-as-image" and
1740 You can trace this process for any given URL by visiting http://
1741 config.privoxy.org/show-url-info.
1743 More detail on this is provided in the Appendix, Anatomy of an Action.
1745 -------------------------------------------------------------------------------
1749 Generally, a pattern has the form <domain>/<path>, where both the <domain> and
1750 <path> are optional. (This is why the pattern / matches all URLs).
1754 is a domain-only pattern and will match any request to www.example.com,
1755 regardless of which document on that server is requested.
1759 means exactly the same. For domain-only patterns, the trailing / may be
1762 www.example.com/index.html
1764 matches only the single document /index.html on www.example.com.
1768 matches the document /index.html, regardless of the domain, i.e. on any web
1773 matches nothing, since it would be interpreted as a domain name and there
1774 is no top-level domain called .html.
1776 -------------------------------------------------------------------------------
1778 8.4.1. The Domain Pattern
1780 The matching of the domain part offers some flexible options: if the domain
1781 starts or ends with a dot, it becomes unanchored at that end. For example:
1785 matches any domain that ENDS in .example.com
1789 matches any domain that STARTS with www.
1793 matches any domain that CONTAINS .example. (Correctly speaking: It matches
1794 any FQDN that contains example as a domain.)
1796 Additionally, there are wild-cards that you can use in the domain names
1797 themselves. They work pretty similar to shell wild-cards: "*" stands for zero
1798 or more arbitrary characters, "?" stands for any single character, you can
1799 define character classes in square brackets and all of that can be freely
1804 matches "adserver.example.com", "ads.example.com", etc but not
1809 matches all of the above, and then some.
1813 matches www.ipix.com, pictures.epix.com, a.b.c.d.e.upix.com etc.
1815 www[1-9a-ez].example.c*
1817 matches www1.example.com, www4.example.cc, wwwd.example.cy,
1818 wwwz.example.com etc., but not wwww.example.com.
1820 -------------------------------------------------------------------------------
1822 8.4.2. The Path Pattern
1824 Privoxy uses Perl compatible regular expressions (through the PCRE library) for
1827 There is an Appendix with a brief quick-start into regular expressions, and
1828 full (very technical) documentation on PCRE regex syntax is available on-line
1829 at http://www.pcre.org/man.txt. You might also find the Perl man page on
1830 regular expressions (man perlre) useful, which is available on-line at http://
1831 www.perldoc.com/perl5.6/pod/perlre.html.
1833 Note that the path pattern is automatically left-anchored at the "/", i.e. it
1834 matches as if it would start with a "^" (regular expression speak for the
1835 beginning of a line).
1837 Please also note that matching in the path is case INSENSITIVE by default, but
1838 you can switch to case sensitive at any point in the pattern by using the "(?
1839 -i)" switch: www.example.com/(?-i)PaTtErN.* will match only documents whose
1840 path starts with PaTtErN in exactly this capitalization.
1842 -------------------------------------------------------------------------------
1846 All actions are disabled by default, until they are explicitly enabled
1847 somewhere in an actions file. Actions are turned on if preceded with a "+", and
1848 turned off if preceded with a "-". So a +action means "do that action", e.g.
1849 +block means "please block URLs that match the following patterns", and -block
1850 means "don't block URLs that match the following patterns, even if +block
1851 previously applied."
1853 Again, actions are invoked by placing them on a line, enclosed in curly braces
1854 and separated by whitespace, like in {+some-action -some-other-action
1855 {some-parameter}}, followed by a list of URL patterns, one per line, to which
1856 they apply. Together, the actions line and the following pattern lines make up
1857 a section of the actions file.
1859 There are three classes of actions:
1861 * Boolean, i.e the action can only be "enabled" or "disabled". Syntax:
1863 +name # enable action name
1864 -name # disable action name
1868 * Parameterized, where some value is required in order to enable this type of
1871 +name{param} # enable action and set parameter to param,
1872 # overwriting parameter from previous match if necessary
1873 -name # disable action. The parameter can be omitted
1875 Note that if the URL matches multiple positive forms of a parameterized
1876 action, the last match wins, i.e. the params from earlier matches are
1879 Example: +hide-user-agent{ Mozilla 1.0 }
1881 * Multi-value. These look exactly like parameterized actions, but they behave
1882 differently: If the action applies multiple times to the same URL, but with
1883 different parameters, all the parameters from all matches are remembered.
1884 This is used for actions that can be executed for the same request
1885 repeatedly, like adding multiple headers, or filtering through multiple
1888 +name{param} # enable action and add param to the list of parameters
1889 -name{param} # remove the parameter param from the list of parameters
1890 # If it was the last one left, disable the action.
1891 -name # disable this action completely and remove all parameters from the list
1893 Examples: +add-header{X-Fun-Header: Some text} and +filter{html-annoyances}
1895 If nothing is specified in any actions file, no "actions" are taken. So in this
1896 case Privoxy would just be a normal, non-blocking, non-anonymizing proxy. You
1897 must specifically enable the privacy and blocking features you need (although
1898 the provided default actions files will give a good starting point).
1900 Later defined actions always over-ride earlier ones. So exceptions to any rules
1901 you make, should come in the latter part of the file (or in a file that is
1902 processed later when using multiple actions files). For multi-valued actions,
1903 the actions are applied in the order they are specified. Actions files are
1904 processed in the order they are defined in config (the default installation has
1905 three actions files). It also quite possible for any given URL pattern to match
1906 more than one pattern and thus more than one set of actions!
1908 The list of valid Privoxy actions are:
1910 -------------------------------------------------------------------------------
1918 Purpose and typical uses:
1920 Send a user defined HTTP header to the web server. Can be used to confuse
1925 Any value is possible. Validity of the defined HTTP headers is not checked.
1926 It is recommended that you use the "X-" prefix for custom headers.
1930 {+add-header{X-User-Tracking: sucks}}
1935 This action may be specified multiple times, in order to define multiple
1936 headers. This is rarely needed for the typical user. If you don't know what
1937 "HTTP headers" are, you definitely don't need to worry about this one.
1939 -------------------------------------------------------------------------------
1947 Purpose and typical uses:
1949 Requests for URLs to which this action applies are blocked, i.e. the
1950 requests are not forwarded to the remote server, but answered locally with
1951 a substitute page or image, as determined by the handle-as-image and
1952 set-image-blocker actions. It is typically used to block ads or other
1962 .banners.example.com
1968 If a URL matches one of the blocked patterns, Privoxy will intercept the
1969 URL and display its special "BLOCKED" page instead. If there is sufficient
1970 space, a large red banner will appear with a friendly message about why the
1971 page was blocked, and a way to go there anyway. If there is insufficient
1972 space a smaller "BLOCKED" page will appear without the red banner. Click
1973 here to view the default blocked HTML page (Privoxy must be running for
1974 this to work as intended!).
1976 A very important exception is if the URL matches both "+block" and
1977 "+handle-as-image", then it will be handled by "+set-image-blocker" (see
1978 below). It is important to understand this process, in order to understand
1979 how Privoxy is able to deal with ads and other objectionable content.
1981 The "+filter" action can also perform some of the same functionality as
1982 "+block", but by virtue of very different programming techniques, and is
1983 most often used for different reasons.
1985 -------------------------------------------------------------------------------
1987 8.5.3. +deanimate-gifs
1995 To stop those annoying, distracting animated GIF images.
2003 {+deanimate-gifs{last}}
2009 De-animate all animated GIF images, i.e. reduce them to their last frame.
2010 This will also shrink the images considerably (in bytes, not pixels!). If
2011 the option "first" is given, the first frame of the animation is used as
2012 the replacement. If "last" is given, the last frame of the animation is
2013 used instead, which probably makes more sense for most banner animations,
2014 but also has the risk of not showing the entire last frame (if it is only a
2015 delta to an earlier frame).
2017 -------------------------------------------------------------------------------
2019 8.5.4. +downgrade-http-version
2027 "+downgrade-http-version" will downgrade HTTP/1.1 client requests to HTTP/
2028 1.0 and downgrade the responses as well.
2036 {+downgrade-http-version}
2042 Use this action for servers that use HTTP/1.1 protocol features that
2043 Privoxy doesn't handle well yet. HTTP/1.1 is only partially implemented.
2044 Default is not to downgrade requests. This is an infrequently needed
2045 action, and is used to help with rare problem sites only.
2047 -------------------------------------------------------------------------------
2049 8.5.5. +fast-redirects
2057 The "+fast-redirects" action enables interception of "redirect" requests
2058 from one server to another, which are used to track users.Privoxy can cut
2059 off all but the last valid URL in a redirect request and send a local
2060 redirect back to your browser without contacting the intermediate site(s).
2074 Many sites, like yahoo.com, don't just link to other sites. Instead, they
2075 will link to some script on their own server, giving the destination as a
2076 parameter, which will then redirect you to the final target. URLs resulting
2077 from this scheme typically look like: http://some.place/some_script?http://
2080 Sometimes, there are even multiple consecutive redirects encoded in the
2081 URL. These redirections via scripts make your web browsing more traceable,
2082 since the server from which you follow such a link can see where you go to.
2083 Apart from that, valuable bandwidth and time is wasted, while your browser
2084 ask the server for one redirect after the other. Plus, it feeds the
2087 This is a normally "on" feature, and often requires exceptions for sites
2088 that are sensitive to defeating this mechanism.
2090 -------------------------------------------------------------------------------
2100 Apply page filtering as defined by named sections of the default.filter
2101 file to the specified site(s). "Filtering" can be any modification of the
2102 raw page content, including re-writing or deletion of content.
2106 "+filter" must include the name of one of the section identifiers from
2107 default.filter (or whatever filterfile is specified in config).
2109 Example usage (from the current default.filter):
2111 +filter{html-annoyances}: Get rid of particularly annoying HTML abuse.
2113 +filter{js-annoyances}: Get rid of particularly annoying JavaScript abuse
2115 +filter{content-cookies}: Kill cookies that come in the HTML or JS content
2117 +filter{popups}: Kill all popups in JS and HTML
2119 +filter{frameset-borders}: Give frames a border and make them resizable
2121 +filter{webbugs}: Squish WebBugs (1x1 invisible GIFs used for user
2124 +filter{refresh-tags}: Kill automatic refresh tags (for dial-on-demand
2127 +filter{fun}: Text replacements for subversive browsing fun!
2129 +filter{nimda}: Remove Nimda (virus) code.
2131 +filter{banners-by-size}: Kill banners by size (very efficient!)
2133 +filter{shockwave-flash}: Kill embedded Shockwave Flash objects
2135 +filter{crude-parental}: Kill all web pages that contain the words "sex" or
2140 This is potentially a very powerful feature! And requires a knowledge of
2141 regular expressions if you want to "roll your own". Filtering operates on a
2142 line by line basis throughout the entire page.
2144 Filtering requires buffering the page content, which may appear to slow
2145 down page rendering since nothing is displayed until all content has passed
2146 the filters. (It does not really take longer, but seems that way since the
2147 page is not incrementally displayed.) This effect will be more noticeable
2148 on slower connections.
2150 Filtering can achieve some of the effects as the "+block" action, i.e. it
2151 can be used to block ads and banners. In the overall scheme of things,
2152 filtering is one of the first things "Privoxy" does with a web page. So
2153 other most other actions are applied to the already "filtered" page.
2155 -------------------------------------------------------------------------------
2157 8.5.7. +hide-forwarded-for-headers
2165 Block any existing X-Forwarded-for HTTP header, and do not add a new one.
2173 {+hide-forwarded-for-headers}
2179 It is fairly safe to leave this on. It does not seem to break many sites.
2181 -------------------------------------------------------------------------------
2183 8.5.8. +hide-from-header
2191 To block the browser from sending your email address in a "From:" header.
2195 Keyword: "block", or any user defined value.
2199 {+hide-from-header{block}}
2205 The keyword "block" will completely remove the header (not to be confused
2206 with the "+block" action). Alternately, you can specify any value you
2207 prefer to send to the web server.
2209 -------------------------------------------------------------------------------
2211 8.5.9. +hide-referer
2219 Don't send the "Referer:" (sic) HTTP header to the web site. Or,
2220 alternately send a forged header instead.
2224 Prevent the header from being sent with the keyword, "block". Or, "forge" a
2225 URL to one from the same server as the request. Or, set to user defined
2226 value of your choice.
2230 {+hide-referer{forge}}
2236 "forge" is the preferred option here, since some servers will not send
2237 images back otherwise.
2239 "+hide-referrer" is an alternate spelling of "+hide-referer". It has the
2240 exact same parameters, and can be freely mixed with, "+hide-referer".
2241 ("referrer" is the correct English spelling, however the HTTP specification
2242 has a bug - it requires it to be spelled as "referer".)
2244 -------------------------------------------------------------------------------
2246 8.5.10. +hide-user-agent
2254 To change the "User-Agent:" header so web servers can't tell your browser
2255 type. Who's business is it anyway?
2259 Any user defined string.
2263 {+hide-user-agent{Netscape 6.1 (X11; I; Linux 2.4.18 i686)}}
2269 Warning! This breaks many web sites that depend on this in order to
2270 determine how the target browser will respond to various requests. Use with
2273 -------------------------------------------------------------------------------
2275 8.5.11. +handle-as-image
2283 To define what Privoxy should treat automatically as an image, and is an
2284 important ingredient of how ads are handled.
2293 /.*\.(gif|jpg|jpeg|png|bmp|ico)
2298 This only has meaning if the URL (or pattern) also is "+block"ed, in which
2299 case a user definable image can be sent rather than a HTML page. This is
2300 integral to the whole concept of ad blocking: the URL must match both a
2301 "+block" rule, and "+handle-as-image". (See "+set-image-blocker" below for
2302 control over what will actually be displayed by the browser.)
2304 There is little reason to change the default definition for this action.
2306 -------------------------------------------------------------------------------
2308 8.5.12. +set-image-blocker
2316 Decide what to do with URLs that end up tagged with both "+block" and
2317 "+handle-as-image", e.g an advertisement.
2321 There are four available options: "-set-image-blocker" will send a HTML
2322 "blocked" page, usually resulting in a "broken image" icon.
2323 "+set-image-blocker{blank}" will send a 1x1 transparent GIF image.
2324 "+set-image-blocker{pattern}" will send a checkerboard type pattern (the
2325 default). And finally, "+set-image-blocker{http://xyz.com}" will send a
2326 HTTP temporary redirect to the specified image. This has the advantage of
2327 the icon being being cached by the browser, which will speed up the
2332 {+set-image-blocker{blank}}
2338 If you want invisible ads, they need to meet criteria as matching both
2339 images and blocked actions. And then, "image-blocker" should be set to
2340 "blank" for invisibility. Note you cannot treat HTML pages as images in
2341 most cases. For instance, frames require an HTML page to display. So a
2342 frame that is an ad, typically cannot be treated as an image. Forcing an
2343 "image" in this situation just will not work reliably.
2345 -------------------------------------------------------------------------------
2347 8.5.13. +limit-connect
2355 By default, Privoxy only allows HTTP CONNECT requests to port 443 (the
2356 standard, secure HTTPS port). Use "+limit-connect" to disable this
2357 altogether, or to allow more ports.
2361 Any valid port number, or port number range.
2365 +limit-connect{443} #
2366 This is the default and need not be specified.
2367 +limit-connect{80,443} # Ports 80 and 443 are OK.
2368 +limit-connect{-3, 7, 20-100, 500-} #
2369 Port less than 3, 7, 20 to 100 and above 500 are OK.
2374 The CONNECT methods exists in HTTP to allow access to secure websites
2375 (https:// URLs) through proxies. It works very simply: the proxy connects
2376 to the server on the specified port, and then short-circuits its
2377 connections to the client and to the remote proxy. This can be a big
2378 security hole, since CONNECT-enabled proxies can be abused as TCP relays
2381 If you want to allow CONNECT for more ports than this, or want to forbid
2382 CONNECT altogether, you can specify a comma separated list of ports and
2383 port ranges (the latter using dashes, with the minimum defaulting to 0 and
2386 If you don't know what any of this means, there probably is no reason to
2389 -------------------------------------------------------------------------------
2391 8.5.14. +prevent-compression
2399 Prevent the specified websites from compressing HTTP data.
2407 {+prevent-compression}
2413 Some websites do this, which can be a problem for Privoxy, since "+filter",
2414 "+kill-popups" and "+gif-deanimate" will not work on compressed data. This
2415 will slow down connections to those websites, though. Default typically is
2416 to turn "prevent-compression" on.
2418 -------------------------------------------------------------------------------
2420 8.5.15. +session-cookies-only
2428 Allow cookies for the current browser session only.
2434 Example usage (disabling):
2436 {-session-cookies-only}
2442 If websites set cookies, "+session-cookies-only" will make sure they are
2443 erased when you exit and restart your web browser. This makes profiling
2444 cookies useless, but won't break sites which require cookies so that you
2445 can log in for transactions. This is generally turned on for all sites, and
2446 is the recommended setting.
2448 "+prevent-*-cookies" actions should be turned off as well (see below), for
2449 "+session-cookies-only" to work. Or, else no cookies will get through at
2450 all. For, "persistent" cookies that survive across browser sessions, see
2453 -------------------------------------------------------------------------------
2455 8.5.16. +prevent-reading-cookies
2463 Explicitly prevent the web server from reading any cookies on your system.
2471 {+prevent-reading-cookies}
2477 Often used in conjunction with "+prevent-setting-cookies" to disable
2478 cookies completely. Note that "+session-cookies-only" requires these to
2479 both be disabled (or else it never gets any cookies to cache).
2481 For "persistent" cookies to work (i.e. they survive across browser sessions
2482 and reboots), all three cookie settings should be "off" for the specified
2485 -------------------------------------------------------------------------------
2487 8.5.17. +prevent-setting-cookies
2495 Explicitly block the web server from storing cookies on your system.
2503 {+prevent-setting-cookies}
2509 Often used in conjunction with "+prevent-reading-cookies" to disable
2510 cookies completely (see above).
2512 -------------------------------------------------------------------------------
2514 8.5.18. +kill-popups
2522 Stop those annoying JavaScript pop-up windows!
2536 "+kill-popups" uses a built in filter to disable pop-ups that use the
2537 window.open() function, etc. This is one of the first actions processed by
2538 Privoxy as it contacts the remote web server. This action is not always
2539 100% reliable, and is supplemented by "+filter{popups}".
2541 -------------------------------------------------------------------------------
2543 8.5.19. +send-vanilla-wafer
2551 Sends a cookie for every site stating that you do not accept any copyright
2552 on cookies sent to you, and asking them not to track you.
2560 {+send-vanilla-wafer}
2566 This action only applies if you are using a jarfile for saving cookies. Of
2567 course, this is a (relatively) unique header and could conceivably be used
2570 -------------------------------------------------------------------------------
2580 This allows you to send an arbitrary, user definable cookie.
2584 User specified cookie name and corresponding value.
2588 {+send-wafer{name=value}}
2594 This can be specified multiple times in order to add as many cookies as you
2597 -------------------------------------------------------------------------------
2601 Note that many of these actions have the potential to cause a page to
2602 misbehave, possibly even not to display at all. There are many ways a site
2603 designer may choose to design his site, and what HTTP header content, and other
2604 criteria, he may depend on. There is no way to have hard and fast rules for all
2605 sites. See the Appendix for a brief example on troubleshooting actions.
2607 -------------------------------------------------------------------------------
2609 8.5.22. Sample Actions Files
2611 Remember that the meaning of any of the above references is reversed by
2612 preceding the action with a "-", in place of the "+". Also, that some actions
2613 are turned on in the default section of the actions file, and require little to
2614 no additional configuration. These are just "on".
2616 But, other actions that are turned on in the default section do typically
2617 require exceptions to be listed in the latter sections of one of our actions
2618 file. For instance, by default no URLs are "blocked" (i.e. in the default
2619 definitions of default.action). We need exceptions to this in order to enable
2620 ad blocking in the lower sections. But we need to be very selective about what
2621 we do block. Thus, the default is "off" for blocking.
2623 Below is a liberally commented sample default.action file to demonstrate how
2624 all the pieces come together. And to show how exceptions to the default
2625 policies can be handled. This is followed by a brief user.action with similar
2628 # Sample default.action file <developers@privoxy.org>
2630 # Settings -- Don't change! For internal Privoxy use ONLY.
2632 for-privoxy-version=3.0
2635 ##########################################################################
2636 # Aliases must be defined *before* they are used. These are
2637 # easier to remember, and can combine several actions into one. Once
2638 # defined they can be used just like any built-in action -- but within
2639 # this file only! Aliases do not require a + or - sign.
2640 ##########################################################################
2642 # Some useful aliases.
2643 # Alias to turn off cookie handling, ie allow all cookies unmolested.
2644 -prevent-cookies = -prevent-setting-cookies -prevent-reading-cookies \
2645 -session-cookies-only
2647 # Alias to both block and treat as if an image for ad blocking
2649 +imageblock = +block +handle-as-image
2651 # Fragile sites should have the minimum changes:
2652 fragile = -block -deanimate-gifs -fast-redirects -filter -hide-referer \
2653 -prevent-cookies -kill-popups
2655 # Shops should be allowed to set persistent cookies
2656 shop = -filter -prevent-cookies -session-cookies-only
2659 ##########################################################################
2660 # Begin default action settings. Anything in this section will match
2661 # all URLs -- UNLESS we have exceptions that also match, defined below this
2662 # section. We will show all potential actions here whether they are on
2663 # or off. We could omit any disabled action if we wanted, since all
2664 # actions are 'off' by default anyway. Shown for completeness only.
2665 # Actions are enabled if preceded by a '+', otherwise they are disabled
2666 # (unless an alias has been defined without this).
2667 ##########################################################################
2672 -downgrade-http-version \
2674 +filter{html-annoyances} \
2675 +filter{js-annoyances} \
2676 -filter{content-cookies} \
2679 -filter{refresh-tags} \
2682 +filter{banners-by-size} \
2683 -filter{shockwave-flash} \
2684 -filter{crude-prental} \
2685 +hide-forwarded-for-headers \
2686 +hide-from-header{block} \
2690 +set-image-blocker{pattern} \
2692 +prevent-compression \
2693 -session-cookies-only \
2694 -prevent-reading-cookies \
2695 -prevent-setting-cookies \
2697 -send-vanilla-wafer \
2700 / # forward slash will match *all* potential URL patterns.
2702 ##########################################################################
2703 # Default behavior is now set. Now we will define some exceptions to our
2704 # default action policies.
2705 ##########################################################################
2707 # These sites are very complex and require very minimal interference.
2708 # We'll disable most actions with our 'fragile' alias:
2710 .office.microsoft.com # surprise, surprise!
2711 .windowsupdate.microsoft.com
2714 # Shopping sites - not as fragile but require some special
2715 # handling. We still want to block ads, and we will allow
2716 # persistant cookies via the 'shop' alias:
2719 .worldpay.com # for quietpc.com
2724 # These sites require pop-ups too :( We'll combine our 'shop'
2725 # alias with two other actions into one rule to allow all popups.
2726 { shop -kill-popups -filter{popups} }
2731 # The 'Fast-redirects' action breaks some sites. Disable this action
2732 # for these known sensitive sites:
2735 edit.europe.yahoo.com
2737 .altavista.com/.*(like|url|link):http
2738 .altavista.com/trans.*urltext=http
2742 # Define which file types will be treated as images. Important
2744 { +handle-as-image }
2745 /.*\.(gif|jpe?g|png|bmp|ico)
2748 # Now lets list some domains that are known ad generators. And
2749 # our alias that we use here will block these as well as force
2750 # them to be treated as images. This combination of actions is
2751 # important for ad blocking. What the browser will show instead is
2752 # determined by the setting of "+set-image-blocker"
2756 .a.yimg.com/(?:(?!/i/).)*$
2757 .a[0-9].yimg.com/(?:(?!/i/).)*$
2761 ad.*.doubleclick.net
2764 # These will just simply be blocked. They will generate the BLOCKED
2765 # banner page, if matched. Heavy use of wildcards and regular
2766 # expressions in this example. Enable block action:
2772 /.*count(er)?\.(pl|cgi|exe|dll|asp|php[34]?)
2773 /(?:.*/)?(publicite|werbung|rekla(ma|me|am)|annonse|maino(kset|nta|s)?)/
2777 # The above block section will probably inadvertantly catch some
2778 # sites we DO NOT want blocked via the wildcards and regular expressions.
2779 # Now let's set exceptions to the exceptions so the good guys get better
2780 # treatment. Disable block action:
2786 # Let's just trust all .edu top level domains.
2788 www.ugu.com/sui/ugu/adv
2789 # We'll need to access to path names containing 'download'
2792 # 'adv' is for globalintersec and means advanced, not advertisement
2793 www.globalintersec.com/adv
2796 # Don't filter *anything* from our friends at sourceforge.
2797 # Notice we don't have to name the individual filter
2798 # identifiers -- we just turn them all off in one fell swoop.
2799 # Disable all filters for this one site:
2804 So far we are painting with a broad brush by setting general policies. The
2805 above would be a reasonable starting point for many situations. Now, we want to
2806 be more specific and have customized rules that are more suitable to our
2807 personal habits and preferences. These would be for narrowly defined situations
2808 like your ISP or your bank, and should be placed in user.action, which is
2809 parsed after all other actions files and should not be clobbered by upgrades.
2810 So any settings here, will have the last word and over-ride any previously
2813 Now a few examples of some things that one might do with a user.action file.
2815 # Sample user.action file.
2817 # Any aliases you want to use need to be re-defined here.
2818 # Alias to turn off cookie handling, ie allow all cookies unmolested.
2819 -prevent-cookies = -prevent-setting-cookies -prevent-reading-cookies \
2820 -session-cookies-only
2822 # Fragile sites should have the minimum changes:
2823 fragile = -block -deanimate-gifs -fast-redirects -filter -hide-referer \
2824 -prevent-cookies -kill-popups
2826 # Allow persistent cookies for a few regular sites that we
2827 # trust via our above alias. These will be saved from one browser session
2828 # to the next. We are explicity turning off any and all cookie handling,
2829 # even though the prevent-*-cookie settings were disabled in our above
2830 # default.action anyway. So cookies from these domains will come through
2832 { -prevent-cookies }
2839 # My ISP uses obnoxious self promoting images on many pages.
2840 # Nuke them :) Note that "+handle-as-image" need not be specified,
2841 # since all URLs ending in .gif will be tagged as images by the
2842 # general rules in default.action anyway.
2844 www.my-isp-example.com/logo[0-9].gif
2847 # Say the site where you do your homebanking needs to open
2848 # popup windows, but you have chosen to kill popups by
2849 # default. This will allow it for your-example-bank.com:
2851 { -filter{popups} -kill-popups }
2852 .my-example-bank.com
2855 # This site is delicate, and requires kid-glove
2861 -------------------------------------------------------------------------------
2865 Custom "actions", known to Privoxy as "aliases", can be defined by combining
2866 other "actions". These can in turn be invoked just like the built-in "actions".
2867 Currently, an alias can contain any character except space, tab, "=", "{" or "}
2868 ". But please use only "a"- "z", "0"-"9", "+", and "-". Alias names are not
2869 case sensitive, and must be defined before other actions in the actions file!
2870 And there can only be one set of "aliases" defined per file. Each actions file
2871 may have its own aliases, but they are only visible within that file. Aliases
2872 do not requir a "+" or "-" sign in front, since they are merely expanded.
2874 Now let's define a few aliases:
2876 # Useful custom aliases we can use later. These must come first!
2878 +prevent-cookies = +prevent-setting-cookies +prevent-reading-cookies
2879 -prevent-cookies = -prevent-setting-cookies -prevent-reading-cookies
2881 -block -prevent-cookies -filter -fast-redirects -hide-referer -kill-popups
2882 shop = -prevent-cookies -filter -fast-redirects
2883 +imageblock = +block +handle-as-image
2885 # Aliases defined from other aliases, for people who don't like to type
2887 c0 = +prevent-cookies
2888 c1 = -prevent-cookies
2889 #... etc. Customize to your heart's content.
2892 Some examples using our "shop" and "fragile" aliases from above. These would
2893 appear in the lower sections of an actions file as exceptions to the default
2894 actions (as defined in the upper section):
2896 # These sites are very complex and require
2897 # minimal interference.
2899 .office.microsoft.com
2900 .windowsupdate.microsoft.com
2903 # Shopping sites - but we still want to block ads.
2906 .worldpay.com # for quietpc.com
2909 # These shops require pop-ups also
2915 The "shop" and "fragile" aliases are often used for "problem" sites that
2916 require most actions to be disabled in order to function properly.
2918 -------------------------------------------------------------------------------
2922 Any web page can be dynamically modified with the filter file. This
2923 modification can be removal, or re-writing, of any web page content, including
2924 tags and non-visible content. The default filter file is oddly enough
2925 default.filter, located in the config directory.
2927 This is potentially a very powerful feature, and requires knowledge of both
2928 "regular expression" and HTML in order create custom filters. But, there are a
2929 number of useful filters included with Privoxy for many common situations.
2931 The included example file is divided into sections. Each section begins with
2932 the FILTER keyword, followed by the identifier for that section, e.g. "FILTER:
2933 webbugs". Each section performs a similar type of filtering, such as
2936 This file uses regular expressions to alter or remove any string in the target
2937 page. The expressions can only operate on one line at a time. Some examples
2938 from the included default default.filter:
2940 Stop web pages from displaying annoying messages in the status bar by deleting
2943 FILTER: html-annoyances
2945 # New browser windows should be resizeable and have a location and status
2948 s/resizable="?(no|0)"?/resizable=1/ig s/noresize/yesresize/ig
2949 s/location="?(no|0)"?/location=1/ig s/status="?(no|0)"?/status=1/ig
2950 s/scrolling="?(no|0|Auto)"?/scrolling=1/ig
2951 s/menubar="?(no|0)"?/menubar=1/ig
2953 # The <BLINK> tag was a crime!
2955 s*<blink>|</blink>**ig
2959 #s/framespacing="?(no|0)"?//ig
2960 #s/margin(height|width)=[0-9]*//gi
2963 Just for kicks, replace any occurrence of "Microsoft" with "MicroSuck", and
2964 have a little fun with topical buzzwords:
2968 s/microsoft(?!.com)/MicroSuck/ig
2972 s/industry-leading|cutting-edge|award-winning/<font color=red><b>BINGO!</b></
2976 Kill those pesky little web-bugs:
2978 # webbugs: Squish WebBugs (1x1 invisible GIFs used for user tracking)
2981 s/<img\s+[^>]*?(width|height)\s*=\s*['"]?1\D[^>]*?(width|height)\s*=\s*['"]?1
2982 (\D[^>]*?)?>/<!-- Squished WebBug -->/sig
2985 -------------------------------------------------------------------------------
2987 9.1. The +filter Action
2989 Filters are enabled with the "+filter" action from within one of the actions
2990 files. "+filter" requires one parameter, which should match one of the section
2991 identifiers in the filter file itself. Example:
2993 +filter{html-annoyances}
2995 This would activate that particular filter. Similarly, "+filter" can be turned
2996 off for selected sites as: "-filter{html-annoyances}". Remember too, all
2997 actions are off by default, unless they are explicity enabled in one of the
3000 -------------------------------------------------------------------------------
3004 When Privoxy displays one of its internal pages, such as a 404 Not Found error
3005 page (Privoxy must be running for link to work as intended), it uses the
3006 appropriate template. On Linux, BSD, and Unix, these are located in /etc/
3007 privoxy/templates by default. These may be customized, if desired.
3008 cgi-style.css is used to control the HTML attributes (fonts, etc).
3010 The default Blocked (Privoxy needs to be running for page to display) banner
3011 page with the bright red top banner, is called just "blocked". This may be
3012 customized or replaced with something else if desired.
3014 -------------------------------------------------------------------------------
3016 11. Contacting the Developers, Bug Reporting and Feature Requests
3018 We value your feedback. However, to provide you with the best support, please
3019 note the following sections.
3021 -------------------------------------------------------------------------------
3025 To get support, use the Sourceforge Support Forum:
3027 http://sourceforge.net/tracker/?group_id=11118&atid=211118
3029 -------------------------------------------------------------------------------
3033 To submit bugs, use the Sourceforge Bug Forum:
3035 http://sourceforge.net/tracker/?group_id=11118&atid=111118.
3037 Make sure that the bug has not already been submitted. Please try to verify
3038 that it is a Privoxy bug, and not a browser or site bug first. If you are using
3039 your own custom configuration, please try the stock configs to see if the
3040 problem is a configuration related bug. And if not using the latest development
3041 snapshot, please try the latest one. Or even better, CVS sources. Please be
3042 sure to include the Privoxy version, platform, browser, any pertinent log data,
3043 any other relevant details (please be specific) and, if possible, some way to
3046 -------------------------------------------------------------------------------
3048 11.3. Request new features
3050 To submit ideas on new features, use the Sourceforge feature request forum:
3052 http://sourceforge.net/tracker/?atid=361118&group_id=11118&func=browse.
3054 -------------------------------------------------------------------------------
3056 11.4. Report ads or other filter problems
3058 You can also send feedback on websites that Privoxy has problems with. Please
3059 bookmark the following link: "Privoxy - Submit Filter Feedback". Once you surf
3060 to a page with problems, use the bookmark to send us feedback. We will look
3061 into the issue as soon as possible.
3063 New, improved default.action files will occasionally be made available based on
3064 your feedback. These will be announced on the ijbswa-announce list.
3066 -------------------------------------------------------------------------------
3070 For any other issues, feel free to use the mailing lists:
3072 http://sourceforge.net/mail/?group_id=11118.
3074 Anyone interested in actively participating in development and related
3075 discussions can also join the appropriate mailing list. Archives are available,
3076 too. See the page on Sourceforge.
3078 -------------------------------------------------------------------------------
3080 12. Copyright, License and History
3084 Permission is granted to copy, distribute and/or modify this document under the
3085 terms of the GNU Free Documentation License, Version 1.1 or any later version
3086 published by the Free Software Foundation with no Invariant Sections, no
3087 Front-Cover Texts, and no Back-Cover Texts. A copy of the license can be found
3088 http://www.gnu.org/licenses/fdl.html.
3090 -------------------------------------------------------------------------------
3094 Privoxy is free software; you can redistribute it and/or modify it under the
3095 terms of the GNU General Public License as published by the Free Software
3096 Foundation; either version 2 of the License, or (at your option) any later
3099 This program is distributed in the hope that it will be useful, but WITHOUT ANY
3100 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
3101 PARTICULAR PURPOSE. See the GNU General Public License for more details, which
3102 is available from the Free Software Foundation, Inc, 59 Temple Place - Suite
3103 330, Boston, MA 02111-1307, USA.
3105 You should have received a copy of the GNU General Public License along with
3106 this program; if not, write to the Free Software Foundation, Inc., 59 Temple
3107 Place, Suite 330, Boston, MA 02111-1307 USA.
3109 -------------------------------------------------------------------------------
3113 Privoxy is evolved, and derived from, the Internet Junkbuster, with many
3114 improvments and enhancements over the original.
3116 Junkbuster was originally written by Anonymous Coders and Junkbusters
3117 Corporation, and was released as free open-source software under the GNU GPL.
3118 Stefan Waldherr made many improvements, and started the SourceForge project
3119 Privoxy to rekindle development. There are now several active developers
3120 contributing. The last stable release of Junkbuster was v2.0.2, which has now
3123 -------------------------------------------------------------------------------
3127 Other references and sites of interest to Privoxy users:
3129 http://www.privoxy.org/, The Privoxy Home page.
3131 http://sourceforge.net/projects/ijbswa, the Project Page for Privoxy on
3134 http://p.p/, access Privoxy from your browser. Alternately, http://
3135 config.privoxy.org may work in some situations where the first does not.
3137 http://p.p/, and select "Privoxy - Submit Filter Feedback" to submit "misses"
3140 http://www.junkbusters.com/ht/en/cookies.html
3142 http://www.waldherr.org/junkbuster/
3144 http://privacy.net/analyze/
3146 http://www.squid-cache.org/
3150 -------------------------------------------------------------------------------
3154 14.1. Regular Expressions
3156 Privoxy can use "regular expressions" in various config files. Assuming support
3157 for "pcre" (Perl Compatible Regular Expressions) is compiled in, which is the
3158 default. Such configuration directives do not require regular expressions, but
3159 they can be used to increase flexibility by matching a pattern with wild-cards
3162 If you are reading this, you probably don't understand what "regular
3163 expressions" are, or what they can do. So this will be a very brief
3164 introduction only. A full explanation would require a book ;-)
3166 "Regular expressions" is a way of matching one character expression against
3167 another to see if it matches or not. One of the "expressions" is a literal
3168 string of readable characters (letter, numbers, etc), and the other is a
3169 complex string of literal characters combined with wild-cards, and other
3170 special characters, called meta-characters. The "meta-characters" have special
3171 meanings and are used to build the complex pattern to be matched against. Perl
3172 Compatible Regular Expressions is an enhanced form of the regular expression
3173 language with backward compatibility.
3175 To make a simple analogy, we do something similar when we use wild-card
3176 characters when listing files with the dir command in DOS. *.* matches all
3177 filenames. The "special" character here is the asterisk which matches any and
3178 all characters. We can be more specific and use ? to match just individual
3179 characters. So "dir file?.text" would match "file1.txt", "file2.txt", etc. We
3180 are pattern matching, using a similar technique to "regular expressions"!
3182 Regular expressions do essentially the same thing, but are much, much more
3183 powerful. There are many more "special characters" and ways of building complex
3184 patterns however. Let's look at a few of the common ones, and then some
3187 . - Matches any single character, e.g. "a", "A", "4", ":", or "@".
3189 ? - The preceding character or expression is matched ZERO or ONE times. Either/
3192 + - The preceding character or expression is matched ONE or MORE times.
3194 * - The preceding character or expression is matched ZERO or MORE times.
3196 \ - The "escape" character denotes that the following character should be taken
3197 literally. This is used where one of the special characters (e.g. ".") needs to
3198 be taken literally and not as a special meta-character. Example: "example
3199 \.com", makes sure the period is recognized only as a period (and not expanded
3200 to its meta-character meaning of any single character).
3202 [] - Characters enclosed in brackets will be matched if any of the enclosed
3203 characters are encountered. For instance, "[0-9]" matches any numeric digit
3204 (zero through nine). As an example, we can combine this with "+" to match any
3205 digit one of more times: "[0-9]+".
3207 () - parentheses are used to group a sub-expression, or multiple
3210 | - The "bar" character works like an "or" conditional statement. A match is
3211 successful if the sub-expression on either side of "|" matches. As an example:
3212 "/(this|that) example/" uses grouping and the bar character and would match
3213 either "this example" or "that example", and nothing else.
3215 s/string1/string2/g - This is used to rewrite strings of text. "string1" is
3216 replaced by "string2" in this example. There must of course be a match on
3219 These are just some of the ones you are likely to use when matching URLs with
3220 Privoxy, and is a long way from a definitive list. This is enough to get us
3221 started with a few simple examples which may be more illuminating:
3223 /.*/banners/.* - A simple example that uses the common combination of "." and "
3224 *" to denote any character, zero or more times. In other words, any string at
3225 all. So we start with a literal forward slash, then our regular expression
3226 pattern (".*") another literal forward slash, the string "banners", another
3227 forward slash, and lastly another ".*". We are building a directory path here.
3228 This will match any file with the path that has a directory named "banners" in
3229 it. The ".*" matches any characters, and this could conceivably be more forward
3230 slashes, so it might expand into a much longer looking path. For example, this
3231 could match: "/eye/hate/spammers/banners/annoy_me_please.gif", or just "/
3232 banners/annoying.html", or almost an infinite number of other possible
3233 combinations, just so it has "banners" in the path somewhere.
3235 A now something a little more complex:
3237 /.*/adv((er)?ts?|ertis(ing|ements?))?/ - We have several literal forward
3238 slashes again ("/"), so we are building another expression that is a file path
3239 statement. We have another ".*", so we are matching against any conceivable
3240 sub-path, just so it matches our expression. The only true literal that must
3241 match our pattern is adv, together with the forward slashes. What comes after
3242 the "adv" string is the interesting part.
3244 Remember the "?" means the preceding expression (either a literal character or
3245 anything grouped with "(...)" in this case) can exist or not, since this means
3246 either zero or one match. So "((er)?ts?|ertis(ing|ements?))" is optional, as
3247 are the individual sub-expressions: "(er)", "(ing|ements?)", and the "s". The "
3248 |" means "or". We have two of those. For instance, "(ing|ements?)", can expand
3249 to match either "ing" OR "ements?". What is being done here, is an attempt at
3250 matching as many variations of "advertisement", and similar, as possible. So
3251 this would expand to match just "adv", or "advert", or "adverts", or
3252 "advertising", or "advertisement", or "advertisements". You get the idea. But
3253 it would not match "advertizements" (with a "z"). We could fix that by changing
3254 our regular expression to: "/.*/adv((er)?ts?|erti(s|z)(ing|ements?))?/", which
3255 would then match either spelling.
3257 /.*/advert[0-9]+\.(gif|jpe?g) - Again another path statement with forward
3258 slashes. Anything in the square brackets "[]" can be matched. This is using
3259 "0-9" as a shorthand expression to mean any digit one through nine. It is the
3260 same as saying "0123456789". So any digit matches. The "+" means one or more of
3261 the preceding expression must be included. The preceding expression here is
3262 what is in the square brackets -- in this case, any digit one through nine.
3263 Then, at the end, we have a grouping: "(gif|jpe?g)". This includes a "|", so
3264 this needs to match the expression on either side of that bar character also. A
3265 simple "gif" on one side, and the other side will in turn match either "jpeg"
3266 or "jpg", since the "?" means the letter "e" is optional and can be matched
3267 once or not at all. So we are building an expression here to match image GIF or
3268 JPEG type image file. It must include the literal string "advert", then one or
3269 more digits, and a "." (which is now a literal, and not a special character,
3270 since it is escaped with "\"), and lastly either "gif", or "jpeg", or "jpg".
3271 Some possible matches would include: "//advert1.jpg", "/nasty/ads/
3272 advert1234.gif", "/banners/from/hell/advert99.jpg". It would not match
3273 "advert1.gif" (no leading slash), or "/adverts232.jpg" (the expression does not
3274 include an "s"), or "/advert1.jsp" ("jsp" is not in the expression anywhere).
3276 s/microsoft(?!.com)/MicroSuck/i - This is a substitution. "MicroSuck" will
3277 replace any occurrence of "microsoft". The "i" at the end of the expression
3278 means ignore case. The "(?!.com)" means the match should fail if "microsoft" is
3279 followed by ".com". In other words, this acts like a "NOT" modifier. In case
3280 this is a hyperlink, we don't want to break it ;-).
3282 We are barely scratching the surface of regular expressions here so that you
3283 can understand the default Privoxy configuration files, and maybe use this
3284 knowledge to customize your own installation. There is much, much more that can
3285 be done with regular expressions. Now that you know enough to get started, you
3286 can learn more on your own :/
3288 More reading on Perl Compatible Regular expressions: http://www.perldoc.com/
3289 perl5.6/pod/perlre.html
3291 -------------------------------------------------------------------------------
3293 14.2. Privoxy's Internal Pages
3295 Since Privoxy proxies each requested web page, it is easy for Privoxy to trap
3296 certain special URLs. In this way, we can talk directly to Privoxy, and see how
3297 it is configured, see how our rules are being applied, change these rules and
3298 other configuration options, and even turn Privoxy's filtering off, all with a
3301 The URLs listed below are the special ones that allow direct access to Privoxy.
3302 Of course, Privoxy must be running to access these. If not, you will get a
3303 friendly error message. Internet access is not necessary either.
3305 * Privoxy main page:
3307 http://config.privoxy.org/
3309 Alternately, this may be reached at http://p.p/, but this variation may not
3310 work as reliably as the above in some configurations.
3312 * Show information about the current configuration, including viewing and
3313 editing of actions files:
3315 http://config.privoxy.org/show-status
3317 * Show the source code version numbers:
3319 http://config.privoxy.org/show-version
3321 * Show the browser's request headers:
3323 http://config.privoxy.org/show-request
3325 * Show which actions apply to a URL and why:
3327 http://config.privoxy.org/show-url-info
3329 * Toggle Privoxy on or off. In this case, "Privoxy" continues to run, but
3330 only as a pass-through proxy, with no actions taking place:
3332 http://config.privoxy.org/toggle
3334 Short cuts. Turn off, then on:
3336 http://config.privoxy.org/toggle?set=disable
3338 http://config.privoxy.org/toggle?set=enable
3340 These may be bookmarked for quick reference. See next.
3342 -------------------------------------------------------------------------------
3344 14.2.1. Bookmarklets
3346 Below are some "bookmarklets" to allow you to easily access a "mini" version of
3347 some of Privoxy's special pages. They are designed for MS Internet Explorer,
3348 but should work equally well in Netscape, Mozilla, and other browsers which
3349 support JavaScript. They are designed to run directly from your bookmarks - not
3350 by clicking the links below (although that should work for testing).
3352 To save them, right-click the link and choose "Add to Favorites" (IE) or "Add
3353 Bookmark" (Netscape). You will get a warning that the bookmark "may not be
3354 safe" - just click OK. Then you can run the Bookmarklet directly from your
3355 favorites/bookmarks. For even faster access, you can put them on the "Links"
3356 bar (IE) or the "Personal Toolbar" (Netscape), and run them with a single
3363 * Privoxy - Toggle Privoxy (Toggles between enabled and disabled)
3365 * Privoxy- View Status
3367 * Privoxy - Submit Filter Feedback
3369 Credit: The site which gave me the general idea for these bookmarklets is
3370 www.bookmarklets.com. They have more information about bookmarklets.
3372 -------------------------------------------------------------------------------
3374 14.3. Chain of Events
3376 Let's take a quick look at the basic sequence of events when a web page is
3377 requested by your browser and Privoxy is on duty:
3379 * First, your web browser requests a web page. The browser knows to send the
3380 request to Privoxy, which will in turn, relay the request to the remote web
3381 server after passing the following tests:
3383 * Privoxy traps any request for its own internal CGI pages (e.g http://p.p/)
3384 and sends the CGI page back to the browser.
3386 * Next, Privoxy checks to see if the URL matches any "+block" patterns. If
3387 so, the URL is then blocked, and the remote web server will not be
3388 contacted. "+handle-as-image" is then checked and if it does not match, an
3389 HTML "BLOCKED" page is sent back. Otherwise, if it does match, an image is
3390 returned. The type of image depends on the setting of "+set-image-blocker"
3391 (blank, checkerboard pattern, or an HTTP redirect to an image elsewhere).
3393 * Untrusted URLs are blocked. If URLs are being added to the trust file, then
3396 * If the URL pattern matches the "+fast-redirects" action, it is then
3397 processed. Unwanted parts of the requested URL are stripped.
3399 * Now the rest of the client browser's request headers are processed. If any
3400 of these match any of the relevant actions (e.g. "+hide-user-agent", etc.),
3401 headers are suppressed or forged as determined by these actions and their
3404 * Now the web server starts sending its response back (i.e. typically a web
3405 page and related data).
3407 * First, the server headers are read and processed to determine, among other
3408 things, the MIME type (document type) and encoding. The headers are then
3409 filtered as deterimed by the "+prevent-setting-cookies",
3410 "+session-cookies-only", and "+downgrade-http-version" actions.
3412 * If the "+kill-popups" action applies, and it is an HTML or JavaScript
3413 document, the popup-code in the response is filtered on-the-fly as it is
3416 * If a "+filter" or "+deanimate-gifs" action applies (and the document type
3417 fits the action), the rest of the page is read into memory (up to a
3418 configurable limit). Then the filter rules (from default.filter) are
3419 processed against the buffered content. Filters are applied in the order
3420 they are specified in the default.filter file. Animated GIFs, if present,
3421 are reduced to either the first or last frame, depending on the action
3422 setting.The entire page, which is now filtered, is then sent by Privoxy
3423 back to your browser.
3425 If neither "+filter" or "+deanimate-gifs" matches, then Privoxy passes the
3426 raw data through to the client browser as it becomes available.
3428 * As the browser receives the now (probably filtered) page content, it reads
3429 and then requests any URLs that may be embedded within the page source,
3430 e.g. ad images, stylesheets, JavaScript, other HTML documents (e.g.
3431 frames), sounds, etc. For each of these objects, the browser issues a new
3432 request. And each such request is in turn processed as above. Note that a
3433 complex web page may have many such embedded URLs.
3435 -------------------------------------------------------------------------------
3437 14.4. Anatomy of an Action
3439 The way Privoxy applies "actions" and "filters" to any given URL can be
3440 complex, and not always so easy to understand what is happening. And sometimes
3441 we need to be able to see just what Privoxy is doing. Especially, if something
3442 Privoxy is doing is causing us a problem inadvertently. It can be a little
3443 daunting to look at the actions and filters files themselves, since they tend
3444 to be filled with "regular expressions" whose consequences are not always so
3447 One quick test to see if Privoxy is causing a problem or not, is to disable it
3448 temporarily. This should be the first troubleshooting step. See the
3449 Bookmarklets section on a quick and easy way to do this (be sure to flush
3452 Privoxy also provides the http://config.privoxy.org/show-url-info page that can
3453 show us very specifically how actions are being applied to any given URL. This
3454 is a big help for troubleshooting.
3456 First, enter one URL (or partial URL) at the prompt, and then Privoxy will tell
3457 us how the current configuration will handle it. This will not help with
3458 filtering effects (i.e. the "+filter" action) from the default.filter file
3459 since this is handled very differently and not so easy to trap! It also will
3460 not tell you about any other URLs that may be embedded within the URL you are
3461 testing. For instance, images such as ads are expressed as URLs within the raw
3462 page source of HTML pages. So you will only get info for the actual URL that is
3463 pasted into the prompt area -- not any sub-URLs. If you want to know about
3464 embedded URLs like ads, you will have to dig those out of the HTML source. Use
3465 your browser's "View Page Source" option for this. Or right click on the ad,
3468 Let's try an example, google.com, and look at it one section at a time:
3470 Matches for http://google.com:
3472 --- File standard ---
3473 (no matches in this file)
3475 --- File default ---
3477 { -add-header -block +deanimate-gifs{last} -downgrade-http-version +fast-redirects
3478 -filter{popups} -filter{fun} -filter{shockwave-flash} -filter{crude-parental}
3479 +filter{html-annoyances} +filter{js-annoyances} +filter{content-cookies}
3480 +filter{webbugs} +filter{refresh-tags} +filter{nimda} +filter{banners-by-size}
3481 +hide-forwarded-for-headers +hide-from-header{block} +hide-referer{forge}
3482 -hide-user-agent -handle-as-image +set-image-blocker{pattern} -limit-connect
3483 +prevent-compression +session-cookies-only -prevent-reading-cookies
3484 -prevent-setting-cookies -kill-popups -send-vanilla-wafer -send-wafer }
3487 { -session-cookies-only }
3494 (no matches in this file)
3496 This tells us how we have defined our "actions", and which ones match for our
3497 example, "google.com". The first listing is any matches for the standard.action
3498 file. No hits at all here on "standard". Then next is "default", or our
3499 default.action file. The large, multi-line listing, is how the actions are set
3500 to match for all URLs, i.e. our default settings. If you look at your "actions"
3501 file, this would be the section just below the "aliases" section near the top.
3502 This will apply to all URLs as signified by the single forward slash at the end
3503 of the listing -- "/".
3505 But we can define additional actions that would be exceptions to these general
3506 rules, and then list specific URLs (or patterns) that these exceptions would
3507 apply to. Last match wins. Just below this then are two explicit matches for
3508 ".google.com". The first is negating our previous cookie setting, which was for
3509 "+session-cookies-only" (i.e. not persistent). So we will allow persistent
3510 cookies for google. The second turns off any "+fast-redirects" action, allowing
3511 this to take place unmolested. Note that there is a leading dot here --
3512 ".google.com". This will match any hosts and sub-domains, in the google.com
3513 domain also, such as "www.google.com". So, apparently, we have these two
3514 actions defined somewhere in the lower part of our default.action file, and
3515 "google.com" is referenced somewhere in these latter sections.
3517 Then, for our user.action file, we again have no hits.
3519 And finally we pull it all together in the bottom section and summarize how
3520 Privoxy is applying all its "actions" to "google.com":
3523 -add-header -block +deanimate-gifs{last} -downgrade-http-version -fast-redirects
3524 -filter{popups} -filter{fun} -filter{shockwave-flash} -filter{crude-parental}
3525 +filter{html-annoyances} +filter{js-annoyances} +filter{content-cookies}
3526 +filter{webbugs} +filter{refresh-tags} +filter{nimda} +filter{banners-by-size}
3527 +hide-forwarded-for-headers +hide-from-header{block} +hide-referer{forge}
3528 -hide-user-agent -handle-as-image +set-image-blocker{pattern} -limit-connect
3529 +prevent-compression -session-cookies-only -prevent-reading-cookies
3530 -prevent-setting-cookies -kill-popups -send-vanilla-wafer -send-wafer
3532 Notice the only difference here to the previous listing, is to "fast-redirects"
3533 and "session-cookies-only".
3535 Now another example, "ad.doubleclick.net":
3537 { +block +handle-as-image }
3540 { +block +handle-as-image }
3543 { +block +handle-as-image }
3546 We'll just show the interesting part here, the explicit matches. It is matched
3547 three different times. Each as an "+block +handle-as-image", which is the
3548 expanded form of one of our aliases that had been defined as: "+imageblock". (
3549 "Aliases" are defined in the first section of the actions file and typically
3550 used to combine more than one action.)
3552 Any one of these would have done the trick and blocked this as an unwanted
3553 image. This is unnecessarily redundant since the last case effectively would
3554 also cover the first. No point in taking chances with these guys though ;-)
3555 Note that if you want an ad or obnoxious URL to be invisible, it should be
3556 defined as "ad.doubleclick.net" is done here -- as both a "+block" and an
3557 "+handle-as-image". The custom alias "+imageblock" just simplifies the process
3558 and make it more readable.
3560 One last example. Let's try "http://www.rhapsodyk.net/adsl/HOWTO/". This one is
3561 giving us problems. We are getting a blank page. Hmmm...
3563 Matches for http://www.rhapsodyk.net/adsl/HOWTO/:
3565 { -add-header -block +deanimate-gifs -downgrade-http-version +fast-redirects
3566 +filter{html-annoyances} +filter{js-annoyances} +filter{kill-popups}
3567 +filter{webbugs} +filter{nimda} +filter{banners-by-size} +filter{hal}
3568 +filter{fun} +hide-forwarded-for-headers +hide-from-header{block}
3569 +hide-referer{forge} -hide-user-agent -handle-as-image +set-image-blocker{blank}
3570 +prevent-compression +session-cookies-only -prevent-setting-cookies
3571 -prevent-reading-cookies +kill-popups -send-vanilla-wafer -send-wafer }
3574 { +block +handle-as-image }
3577 Ooops, the "/adsl/" is matching "/ads"! But we did not want this at all! Now we
3578 see why we get the blank page. We could now add a new action below this that
3579 explicitly does not block ("{-block}") paths with "adsl". There are various
3580 ways to handle such exceptions. Example:
3585 Now the page displays ;-) Be sure to flush your browser's caches when making
3586 such changes. Or, try using Shift+Reload.
3588 But now what about a situation where we get no explicit matches like we did
3591 { +block +handle-as-image }
3594 That actually was very telling and pointed us quickly to where the problem was.
3595 If you don't get this kind of match, then it means one of the default rules in
3596 the first section is causing the problem. This would require some guesswork,
3597 and maybe a little trial and error to isolate the offending rule. One likely
3598 cause would be one of the "{+filter}" actions. Try adding the URL for the site
3599 to one of aliases that turn off "+filter":
3603 .worldpay.com # for quietpc.com
3608 "{shop}" is an "alias" that expands to "{ -filter -session-cookies-only }". Or
3609 you could do your own exception to negate filtering:
3614 This would probably be most appropriately put in user.action, for local site
3617 "{fragile}" is an alias that disables most actions. This can be used as a last
3618 resort for problem sites. Remember to flush caches! If this still does not
3619 work, you will have to go through the remaining actions one by one to find
3620 which one(s) is causing the problem.