X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=blobdiff_plain;f=doc%2Fsource%2Fuser-manual.sgml;h=f8e1c7ef237597229cd1b22ac0b8575d20182eae;hp=3829fc6749dbeb986d4fba8b3941c7b880afa419;hb=f0dac6fb7df84c98bbe4ed782bb479543ec98f7d;hpb=1476ac19503b5f64f2cb694ef96fde2ecd64b849 diff --git a/doc/source/user-manual.sgml b/doc/source/user-manual.sgml index 3829fc67..f8e1c7ef 100644 --- a/doc/source/user-manual.sgml +++ b/doc/source/user-manual.sgml @@ -10,15 +10,17 @@ - - + + + - + - + + @@ -30,7 +32,7 @@ This file belongs into ijbswa.sourceforge.net:/home/groups/i/ij/ijbswa/htdocs/ - $Id: user-manual.sgml,v 1.117 2002/05/17 13:56:16 oes Exp $ + $Id: user-manual.sgml,v 2.3 2002/09/26 00:12:17 hal9 Exp $ Copyright (C) 2001, 2002 Privoxy Developers See LICENSE. @@ -45,18 +47,18 @@
-Privoxy User Manual +Privoxy &p-version; User Manual Copyright &my-copy; 2001, 2002 by - Privoxy Developers + Privoxy Developers -$Id: user-manual.sgml,v 1.117 2002/05/17 13:56:16 oes Exp $ +$Id: user-manual.sgml,v 2.3 2002/09/26 00:12:17 hal9 Exp $ - You can find the latest version of the user manual at User Manual at http://www.privoxy.org/user-manual/. - Please see the Contact section on how to + Please see the Contact section on how to contact the developers. @@ -123,12 +125,10 @@ Hal. This documentation is included with the current &p-status; version of Privoxy, v.&p-version;soon ;-)]]>. + and is mostly complete at this point. + Development of version 3.2 is just beginning, + and will include many significant changes and enhancements over + earlier versions]]>. @@ -137,7 +137,7 @@ Hal. Since this is a &p-status; version, not all new features are well tested. This documentation may be slightly out of sync as a result (especially with CVS sources). And there may be bugs, though hopefully - not many! + not many! Please find them! ]]> @@ -187,7 +187,7 @@ How to install the binary packages depends on your operating system: -Red Hat, SuSE RPMs and Conectiva +Red Hat, SuSE and Conectiva RPMs RPMs can be installed with rpm -Uvh privoxy-&p-version;-1.rpm, @@ -205,7 +205,7 @@ automatically start Privoxy in the boot process. If you have problems with failed dependencies, try rebuilding the SRC RPM: - rpm --rebuild privoxy-&p-version;-1.src.rpm;. This + rpm --rebuild privoxy-&p-version;-1.src.rpm. This will use your locally installed libraries and RPM version. @@ -220,7 +220,10 @@ automatically start Privoxy in the boot process. Debian - FIXME. + DEBs can be installed with dpkg -i + privoxy_&p-version;-1.deb, and will use + /etc/privoxy for the location of configuration + files. @@ -241,7 +244,7 @@ automatically start Privoxy in the boot process. Create a new directory, cd to it, then unzip and untar the archive. For the most part, you'll have to figure out where - things go. FIXME. + things go. @@ -252,7 +255,10 @@ automatically start Privoxy in the boot process. First, make sure that no previous installations of Junkbuster and / or Privoxy are left on your - system. You can do this by + system. Check that no Junkbuster + or Privoxy objects are in + your startup folder. + @@ -269,17 +275,32 @@ automatically start Privoxy in the boot process. -Max OSX - - Unzip the downloaded package (you can either double-click on the file - in the finder, or on the desktop if you downloaded it there). Then, - double-click on the package installer icon and follow the installation - process. - Privoxy will be installed in the subdirectory - /Applications/Privoxy.app. - Privoxy will set itself up to start - automatically on system bring-up via - /System/Library/StartupItems/Privoxy. +Mac OSX + + Unzip the downloaded file (you can either double-click on the file + from the finder, or from the desktop if you downloaded it there). + Then, double-click on the package installer icon named + Privoxy.pkg + and follow the installation process. + Privoxy will be installed in the folder + /Library/Privoxy. + It will start automatically whenever you start up. To prevent it from + starting automatically, remove or rename the folder + /Library/StartupItems/Privoxy. + + + To start Privoxy by hand, double-click on + StartPrivoxy.command in the + /Library/Privoxy folder. + Or, type this command in the Terminal: + + + + /Library/Privoxy/StartPrivoxy.command + + + + You will be prompted for the administrator password. @@ -291,16 +312,29 @@ automatically start Privoxy in the boot process. directory, including all configuration and log files. To uninstall, just remove this directory. + + + +Gentoo - Start Privoxy (with RUN <>NIL:) in your - startnet script (AmiTCP), in - s:user-startup (RoadShow), as startup program in your - startup script (Genesis), or as startup action (Miami and MiamiDx). - Privoxy will automatically quit when you quit your - TCP/IP stack (just ignore the harmless warning your TCP/IP stack may display that - Privoxy is still running). + Gentoo source packages (Ebuilds) for Privoxy are + contained in the Gentoo Portage Tree (they are not on the download page, + but there is a Gentoo section, where you can see when a new + Privoxy Version is added to the Portage Tree). + + + Before installing Privoxy under Gentoo just do + first emerge rsync to get the latest changes from the + Portage tree. With emerge privoxy you install the latest + version. + + + Configuration files are in /etc/privoxy, the + documentation is in /usr/share/doc/privoxy-&p-version; + and the Log directory is in /var/log/privoxy. + @@ -325,8 +359,35 @@ automatically start Privoxy in the boot process. &buildsource; + + +Keeping your Installation Up-to-Date + + As user feedback comes in and development continues, we will make updated versions + of both the main actions file (as a separate + package) and the software itself (including the actions file) available for + download. + + + + If you wish to receive an email notification whenever we release updates of + Privoxy or the actions file, subscribe + to our announce mailing list, ijbswa-announce@lists.sourceforge.net. + + + + In order not to loose your personal changes and adjustments when updating + to the latest default.action file we strongly + recommend that you use user.action for your + customization of Privoxy. See the Chapter on actions files for details. + + + @@ -537,7 +598,7 @@ automatically start Privoxy in the boot process. This section will provide a quick summary of ad blocking so you can get up to speed quickly without having to read the more extensive - information provided below, though this is highly recommeneded. + information provided below, though this is highly recommended. First a bit of a warning ... blocking ads is much like blocking SPAM: the @@ -567,26 +628,27 @@ automatically start Privoxy in the boot process. Actions are specified in Privoxy's configuration, followed by one or more URLs to which the action should apply. URLs can actually be URL type patterns that use - wildcards so they can apply potentially to a range of similar URLs. + wildcards so they can apply potentially to a range of similar URLs. The + actions, together with the URL patterns are called a section. - When you connect to a website, the full path of the URL will either match one - of the actions as defined in - Privoxy's configuration, or not. If so, then - Privoxy will perform the action accordingly. If - not, then nothing special happens. Futhermore, web pages may contain - embedded, secondary URLs that your web browser will display as it parses the - original page's HTML content. An ad image for instance, is just a URL + When you connect to a website, the full URL will either match one or more + of the sections as defined in Privoxy's configuration, + or not. If so, then Privoxy will perform the + respective actions. If not, then nothing special happens. Furthermore, web + pages may contain embedded, secondary URLs that your web browser will + use to load additional components of the page, as it parses the + original page's HTML content. An ad image for instance, is just an URL embedded in the page somewhere. The image itself may be on the same server, or a server somewhere else on the Internet. Complex web pages will have many such embedded URLs. - The actions we need to know about for ad blocking are: block, handle-as-image, and set-image-blocker: + The actions we need to know about for ad blocking are: block, handle-as-image, and + set-image-blocker: @@ -594,48 +656,47 @@ automatically start Privoxy in the boot process. - block - this action stops + block - this action stops any contact between your browser and any URL patterns that match this action's configuration. It can be used for blocking ads, but also anything that is determined to be unwanted. By itself, it simply stops any - communication with the remote server. If this is the only action that - matches for this particular URL, then Privoxy will - display its own BLOCKED page to let you now what has happened. + communication with the remote server and sends Privoxy's + own built-in BLOCKED page instead to let you now what has happened. - handle-as-image - - forces Privoxy to treat this URL as if it were - an image. Privoxy knows about common image - types (e.g. GIF), but there are many situations where this does not apply. - So we'll force it. This is particularly important for ad blocking, since - once we can treat it as an image, we can make more intelligent decisisions - on how to handle it. There are some limitations to this though. For - instance, you can't just force an image substituion for an entire HTML page - in most situations. + handle-as-image - + tells Privoxy to treat this URL as an image. + Privoxy's default configuration already does this + for all common image types (e.g. GIF), but there are many situations where this + is not so easy to determine. So we'll force it in these cases. This is particularly + important for ad blocking, since only if we know that it's an image of + some kind, can we replace it with an image of our choosing, instead of the + Privoxy BLOCKED page (which would only result in + a broken image icon). There are some limitations to this + though. For instance, you can't just brute-force an image substitution for + an entire HTML page in most situations. - set-image-blocker - - tells Privoxy what to display in place of - an ad image that has hit a block rule. For this to come into play, - the URL must match a block action somewhere in the configuration. - And, it must also either be of a known image type, or - match an handle-as-image - action. + set-image-blocker - tells + Privoxy what to display in place of an ad image that + has hit a block rule. For this to come into play, the URL must match a + block action somewhere in the + configuration, and, it must also match an + handle-as-image action. The configuration options on what to display instead of the ad are: -    pattern - a checkboard pattern, so that an ad +    pattern - a checkerboard pattern, so that an ad replacement is obvious. This is the default. @@ -647,8 +708,8 @@ automatically start Privoxy in the boot process. -    http://<URL> - A redirect to any URL of the - user's choosing (advanced usage). +    http://<URL> - A redirect to any image anywhere + of the user's choosing (advanced usage). @@ -658,7 +719,7 @@ automatically start Privoxy in the boot process. The quickest way to adjust any of these settings is with your browser through - the special Privoxy editor at Privoxy editor at http://config.privoxy.org/show-status (shortcut: http://p.p/show-status). This is an internal page, and does not require Internet access. Select the @@ -706,7 +767,7 @@ automatically start Privoxy in the boot process. - Screenshot of Files in Use + [ Screenshot of Actions Files in Use ] @@ -715,22 +776,26 @@ automatically start Privoxy in the boot process. - You should have an Actions section labeled +block. - If not, click the Edit button just - under the word Actions. This will bring up a list of all - actions. Find block near the top, and click in the - Enabled column, then - Submit just below the list. + You should have a section with only + block listed under + Actions:. + If not, click a Insert new section below + button, and in the new section that just appeared, click the + Edit button right under the word Actions:. + This will bring up a list of all actions. Find + block near the top, and click + in the Enabled column, then Submit + just below the list. - Now, in the +block actions section, click the - Add button, and paste the URL the - browser got from Copy Link - Location. Remove the http:// at - the beginning of the URL. Then, click - Submit. + Now, in the block actions section, + click the Add button, and paste the URL the + browser got from Copy Link Location. + Remove the http:// at the beginning of the URL. Then, click + Submit (or + OK if in a pop-up window). @@ -754,6 +819,7 @@ automatically start Privoxy in the boot process. For advanced users who want to hand edit their config files, you might want to now go to the Actions Files Tutorial. + The ideas explained therein also apply to the web-based editor. @@ -773,15 +839,64 @@ automatically start Privoxy in the boot process. 127.0.0.1 (or localhost) for the proxy address, and port 8118 (earlier versions used port 8000). This is the one configuration step that must be done! + + Please note that Privoxy can only proxy HTTP and + HTTPS traffic. It will not work with FTP or other protocols. + + + + +
Proxy Configuration (Mozilla) + + + + + + [ Screenshot of Mozilla Proxy Configuration ] + + +
+
With Netscape (and - Mozilla), this can be set under Edit - -> Preferences -> Advanced -> Proxies -> HTTP Proxy. - For Internet Explorer: Tools -> - Internet Properties -> Connections -> LAN Setting. Then, - check Use Proxy and fill in the appropriate info (Address: - 127.0.0.1, Port: 8118). Include if HTTPS proxy support too. + Mozilla), this can be set under: + + + + + + Edit + |_ + Preferences + |_ + Advanced + |_ + Proxies + |_ + HTTP Proxy + + + + For Internet Explorer: + + + + + + Tools + |_ + Internet Properties + |_ + Connections + |_ + LAN Settings + + + + Then, check Use Proxy and fill in the appropriate info + (Address: 127.0.0.1, Port: 8118). Include HTTPS (SSL), if you want HTTPS + proxy support too. @@ -799,12 +914,12 @@ automatically start Privoxy in the boot process. directory. Except on Win32 where it will try config.txt. - -RedHat, Conectiva and Debian + +Red Hat and Conectiva -We use a script. Note that RedHat does not start Privoxy upon booting per -default. It will use the file /etc/privoxy/config as its -main configuration file. FIXME: Debian?? + We use a script. Note that Red Hat does not start Privoxy upon booting per + default. It will use the file /etc/privoxy/config as + its main configuration file. @@ -813,6 +928,21 @@ main configuration file. FIXME: Debian?? + +Debian + + We use a script. Note that Debian starts Privoxy upon booting per + default. It will use the file + /etc/privoxy/config as its main configuration + file. + + + + # /etc/init.d/privoxy start + + + + SuSE @@ -852,14 +982,29 @@ Example Unix startup command: OS/2 -FIXME. + During installation, Privoxy is configured to + start automatically when the system restarts. You can start it manually by + double-clicking on the Privoxy icon in the + Privoxy folder. -MAX OSX +Mac OSX + + During installation, Privoxy is configured to + start automatically when the system restarts. To start Privoxy by hand, + double-click on the StartPrivoxy.command icon in the + /Library/Privoxy folder. Or, type this command + in the Terminal: + + + + /Library/Privoxy/StartPrivoxy.command + + -FIXME. + You will be prompted for the administrator password. @@ -867,7 +1012,36 @@ FIXME. AmigaOS -FIXME. + Start Privoxy (with RUN <>NIL:) in your + startnet script (AmiTCP), in + s:user-startup (RoadShow), as startup program in your + startup script (Genesis), or as startup action (Miami and MiamiDx). + Privoxy will automatically quit when you quit your + TCP/IP stack (just ignore the harmless warning your TCP/IP stack may display that + Privoxy is still running). + + + + +Gentoo + + A script is again used. It will use the file /etc/privoxy/config + as its main configuration file. + + + + /etc/init.d/privoxy start + + + + Note that Privoxy is not automatically started at + boot time by default. You can change this with the rc-update + command. + + + + rc-update add privoxy default + @@ -956,17 +1130,17 @@ must find a better place for this paragraph - If the above paragraph sounds gibberish to you, you might want to read more about the actions concept - or even dive deep into the Appendix - on actions. + If the above paragraph sounds gibberish to you, you might want to read more about the actions concept + or even dive deep into the Appendix + on actions. If you can't get rid of the problem at all, think you've found a bug in Privoxy, want to propose a new feature or smarter rules, please see the - section Contacting the - Developers below. + section Contacting the + Developers below. --> @@ -1044,1898 +1218,216 @@ must find a better place for this paragraph
- - - - - - - - - - - -<application>Privoxy</application> Configuration - - All Privoxy configuration is stored - in text files. These files can be edited with a text editor. - Many important aspects of Privoxy can - also be controlled easily with a web browser. - - - - - - -Controlling <application>Privoxy</application> with Your Web Browser - - Privoxy's user interface can be reached through the special - URL http://config.privoxy.org/ - (shortcut: http://p.p/), - which is a built-in page and works without Internet access. - You will see the following section: - - - - - - - Privoxy Menu - - - -         ▪  View & change the current configuration - - -         ▪  View the source code version numbers - - -         ▪  View the request headers. - - -         ▪  Look up which actions apply to a URL and why - - -         ▪  Toggle Privoxy on or off - - - - - - - - This should be self-explanatory. Note the first item leads to an editor for the - actions files, which is where the ad, banner, - cookie, and URL blocking magic is configured as well as other advanced features of - Privoxy. This is an easy way to adjust various - aspects of Privoxy configuration. The actions - file, and other configuration files, are explained in detail below. - - - - Toggle Privoxy On or Off is handy for sites that might - have problems with your current actions and filters. You can in fact use - it as a test to see whether it is Privoxy - causing the problem or not. Privoxy continues - to run as a proxy in this case, but all manipulation is disabled, i.e. - Privoxy acts like a normal forwarding proxy. There - is even a toggle Bookmarklet offered, so - that you can toggle Privoxy with one click from - your browser. - - - - - - - - - - - - -Configuration Files Overview - - For Unix, *BSD and Linux, all configuration files are located in - /etc/privoxy/ by default. For MS Windows, OS/2, and - AmigaOS these are all in the same directory as the - Privoxy executable. - - - - The installed defaults provide a reasonable starting point, though - some settings may be aggressive by some standards. For the time being, the - principle configuration files are: - - - - - - - - The main configuration file is named config - on Linux, Unix, BSD, OS/2, and AmigaOS and config.txt - on Windows. This is a required file. - - - - - - default.action (the main actions file) - is used to define which actions relating to banner-blocking, images, pop-ups, - content modification, cookie handling etc should be applied by default. It also defines many - exceptions (both positive and negative) from this default set of actions that enable - Privoxy to selectively eliminate the junk, and only the junk, on - as many websites as possible. - - - Multiple actions files may be defined in config. These - are processed in the order they are defined. Local customizations and locally - preferred exceptions to the default policies as defined in - default.action (which you will most probably want - to define sooner or later) are probably best applied in - user.action, where you can preserve them across - upgrades. standard.action is for - Privoxy's internal use. - - - There is also a web based editor that can be accessed from - http://config.privoxy.org/show-status - (Shortcut: http://p.p/show-status) for the - various actions files. - - - - - - default.filter (the filter - file) can be used to re-write the raw page content, including - viewable text as well as embedded HTML and JavaScript, and whatever else - lurks on any given web page. The filtering jobs are only pre-defined here; - whether to apply them or not is up to the actions files. - - - - - - - - All files use the # character to denote a - comment (the rest of the line will be ignored) and understand line continuation - through placing a backslash ("\") as the very last character - in a line. If the # is preceded by a backslash, it looses - its special function. Placing a # in front of an otherwise - valid configuration line to prevent it from being interpreted is called "commenting - out" that line. - - - - The actions files and default.filter - can use Perl style regular expressions for - maximum flexibility. - - - - After making any changes, there is no need to restart - Privoxy in order for the changes to take - effect. Privoxy detects such changes - automatically. Note, however, that it may take one or two additional - requests for the change to take effect. When changing the listening address - of Privoxy, these wake up requests - must obviously be sent to the old listening address. - - - - While under development, the configuration content is subject to change. - The below documentation may not be accurate by the time you read this. - Also, what constitutes a default setting, may change, so - please check all your configuration files on important issues. - -]]> - - - - - - - - - -The Main Configuration File - - - Again, the main configuration file is named config on - Linux/Unix/BSD and OS/2, and config.txt on Windows. - Configuration lines consist of an initial keyword followed by a list of - values, all separated by whitespace (any number of spaces or tabs). For - example: - - - - - - - confdir /etc/privoxy - - - - - - Assigns the value /etc/privoxy to the option - confdir and thus indicates that the configuration - directory is named /etc/privoxy/. - - - - All options in the config file except for confdir and - logdir are optional. Watch out in the below description - for what happens if you leave them unset. - - - - The main config file controls all aspects of Privoxy's - operation that are not location dependent (i.e. they apply universally, no matter - where you may be surfing). - - - - - - -Configuration and Log File Locations - - - Privoxy can (and normally does) use a number of - other files for additional configuration, help and logging. - This section of the configuration file tells Privoxy - where to find those other files. - - - - The user running Privoxy, must have read permission for all - configuration files, and write permission to any files that would - be modified, such as log files. - - -confdir - - - - Specifies: - - The directory where the other configuration files are located - - - - Type of value: - - Path name - - - - Default value: - - /etc/privoxy (Unix) or Privoxy installation dir (Windows) - - - - Effect if unset: - - Mandatory - - - - Notes: - - - No trailing /, please - - - When development goes modular and multi-user, the blocker, filter, and - per-user config will be stored in subdirectories of confdir. - For now, the configuration directory structure is flat, except for - confdir/templates, where the HTML templates for CGI - output reside (e.g. Privoxy's 404 error page). - - - - - - - -logdir - - - - Specifies: - - - The directory where all logging takes place (i.e. where logfile and - jarfile are located) - - - - - Type of value: - - Path name - - - - Default value: - - /var/log/privoxy (Unix) or Privoxy installation dir (Windows) - - - - Effect if unset: - - Mandatory - - - - Notes: - - - No trailing /, please - - - - - - - -actionsfile - - - - - - - - Specifies: - - - The actions file(s) to use - - - - - Type of value: - - File name, relative to confdir, without the .action suffix - - - - Default values: - - - - standard # Internal purposes, no editing recommended - - - default # Main actions file - - - user # User customizations - - - - - - Effect if unset: - - - No actions are taken at all. Simple neutral proxying. - - - - - Notes: - - - Multiple actionsfile lines are permitted, and are in fact recommended! - - - The default values include standard.action, which is used for internal - purposes and should be loaded, default.action, which is the - main actions file maintained by the developers, and - user.action, where you can make your personal additions. - - - Actions files are where all the per site and per URL configuration is done for - ad blocking, cookie management, privacy considerations, etc. - There is no point in using Privoxy without at - least one actions file. - - - - - - -filterfile - - - - Specifies: - - - The filter file to use - - - - - Type of value: - - File name, relative to confdir - - - - Default value: - - default.filter (Unix) or default.filter.txt (Windows) - - - - Effect if unset: - - - No textual content filtering takes place, i.e. all - +filter{name} - actions in the actions files are turned neutral. - - - - - Notes: - - - The filter file contains content modification - rules that use regular expressions. These rules permit - powerful changes on the content of Web pages, e.g., you could disable your favorite - JavaScript annoyances, re-write the actual displayed text, or just have some - fun replacing Microsoft with MicroSuck wherever - it appears on a Web page. - - - The - +filter{name} - actions rely on the relevant filter (name) - to be defined in the filter file! - - - A pre-defined filter file called default.filter that contains - a bunch of handy filters for common problems is included in the distribution. - See the section on the filter - action for a list. - - - - - - -logfile - - - - Specifies: - - - The log file to use - - - - - Type of value: - - File name, relative to logdir - - - - Default value: - - logfile (Unix) or privoxy.log (Windows) - - - - Effect if unset: - - - No log file is used, all log messages go to the console (stderr). - - - - - Notes: - - - The windows version will additionally log to the console. - - - The logfile is where all logging and error messages are written. The level - of detail and number of messages are set with the debug - option (see below). The logfile can be useful for tracking down a problem with - Privoxy (e.g., it's not blocking an ad you - think it should block) but in most cases you probably will never look at it. - - - Your logfile will grow indefinitely, and you will probably want to - periodically remove it. On Unix systems, you can do this with a cron job - (see man cron). For Red Hat, a logrotate - script has been included. - - - On SuSE Linux systems, you can place a line like /var/log/privoxy.* - +1024k 644 nobody.nogroup in /etc/logfiles, with - the effect that cron.daily will automatically archive, gzip, and empty the - log, when it exceeds 1M size. - - - Any log files must be writable by whatever user Privoxy - is being run as (default on UNIX, user id is privoxy). - - - - - - -jarfile - - - - Specifies: - - - The file to store intercepted cookies in - - - - - Type of value: - - File name, relative to logdir - - - - Default value: - - jarfile (Unix) or privoxy.jar (Windows) - - - - Effect if unset: - - - Intercepted cookies are not stored at all. - - - - - Notes: - - - The jarfile may grow to ridiculous sizes over time. - - - - - - -trustfile - - - Specifies: - - - The trust file to use - - - - - Type of value: - - File name, relative to confdir - - - - Default value: - - Unset (commented out). When activated: trust (Unix) or trust.txt (Windows) - - - - Effect if unset: - - - The whole trust mechanism is turned off. - - - - - Notes: - - - The trust mechanism is an experimental feature for building white-lists and should - be used with care. It is NOT recommended for the casual user. - - - If you specify a trust file, Privoxy will only allow - access to sites that are named in the trustfile. - You can also mark sites as trusted referrers (with +), with - the effect that access to untrusted sites will be granted, if a link from a - trusted referrer was used. - The link target will then be added to the trustfile. - Possible applications include limiting Internet access for children. - - - If you use + operator in the trust file, it may grow considerably over time. - - - - - - - - - - - - - - -Local Set-up Documentation - - - If you intend to operate Privoxy for more users - than just yourself, it might be a good idea to let them know how to reach - you, what you block and why you do that, your policies, etc. - - -user-manual - - - Specifies: - - - Location of the Privoxy User Manual. - - - - - Type of value: - - A fully qualified URI - - - - Default value: - - Unset - - - - Effect if unset: - - - http://www.privoxy.org/version/user-manual/ - will be used, where version is the Privoxy version. - - - - - Notes: - - - The User Manual URI is used for help links from some of the internal CGI pages. - The manual itself is normally packaged with the binary distributions, so you probably want - to set this to a locally installed copy. For multi-user setups, you could provide a copy on - a local webserver for all your users and use the corresponding URL here. - - - Examples: - - - Unix, in local filesystem: - - - user-manual  file:///usr/share/doc/privoxy-&p-version;/user-manual/ - - - Any platform, on local webserver (called local-webserver): - - - user-manual  http://local-webserver/privoxy-user-manual/ - - - - If set, this option should be the first option in the config file, because - it is used while the config file is being read. - - - - - - - -trust-info-url - - - - Specifies: - - - A URL to be displayed in the error page that users will see if access to an untrusted page is denied. - - - - - Type of value: - - URL - - - - Default value: - - Two example URL are provided - - - - Effect if unset: - - - No links are displayed on the "untrusted" error page. - - - - - Notes: - - - The value of this option only matters if the experimental trust mechanism has been - activated. (See trustfile above.) - - - If you use the trust mechanism, it is a good idea to write up some on-line - documentation about your trust policy and to specify the URL(s) here. - Use multiple times for multiple URLs. - - - The URL(s) should be added to the trustfile as well, so users don't end up - locked out from the information on why they were locked out in the first place! - - - - - - -admin-address - - - - Specifies: - - - An email address to reach the proxy administrator. - - - - - Type of value: - - Email address - - - - Default value: - - Unset - - - - Effect if unset: - - - No email address is displayed on error pages and the CGI user interface. - - - - - Notes: - - - If both admin-address and proxy-info-url - are unset, the whole "Local Privoxy Support" box on all generated pages will - not be shown. - - - - - - -proxy-info-url - - - - Specifies: - - - A URL to documentation about the local Privoxy setup, - configuration or policies. - - - - - Type of value: - - URL - - - - Default value: - - Unset - - - - Effect if unset: - - - No link to local documentation is displayed on error pages and the CGI user interface. - - - - - Notes: - - - If both admin-address and proxy-info-url - are unset, the whole "Local Privoxy Support" box on all generated pages will - not be shown. - - - This URL shouldn't be blocked ;-) - - - - - - - - - - - - -Debugging - - - These options are mainly useful when tracing a problem. - Note that you might also want to invoke - Privoxy with the --no-daemon - command line option when debugging. - - -debug - - - - Specifies: - - - Key values that determine what information gets logged to the - logfile. - - - - - Type of value: - - Integer values - - - - Default value: - - 12289 (i.e.: URLs plus informational and warning messages) - - - - Effect if unset: - - - Nothing gets logged. - - - - - Notes: - - - The available debug levels are: - - - - debug 1 # show each GET/POST/CONNECT request - debug 2 # show each connection status - debug 4 # show I/O status - debug 8 # show header parsing - debug 16 # log all data into the logfile - debug 32 # debug force feature - debug 64 # debug regular expression filter - debug 128 # debug fast redirects - debug 256 # debug GIF de-animation - debug 512 # Common Log Format - debug 1024 # debug kill pop-ups - debug 4096 # Startup banner and warnings. - debug 8192 # Non-fatal errors - - - - To select multiple debug levels, you can either add them or use - multiple debug lines. - - - A debug level of 1 is informative because it will show you each request - as it happens. 1, 4096 and 8192 are highly recommended - so that you will notice when things go wrong. The other levels are probably - only of interest if you are hunting down a specific problem. They can produce - a hell of an output (especially 16). - - - - The reporting of fatal errors (i.e. ones which crash - Privoxy) is always on and cannot be disabled. - - - If you want to use CLF (Common Log Format), you should set debug - 512 ONLY and not enable anything else. - - - - - - -single-threaded - - - - Specifies: - - - Whether to run only one server thread - - - - - Type of value: - - None - - - - Default value: - - Unset - - - - Effect if unset: - - - Multi-threaded (or, where unavailable: forked) operation, i.e. the ability to - serve multiple requests simultaneously. - - - - - Notes: - - - This option is only there for debug purposes and you should never - need to use it. It will drastically reduce performance. - - - - - - - - - - - -Access Control and Security - - - This section of the config file controls the security-relevant aspects - of Privoxy's configuration. - - -listen-address - - - - Specifies: - - - The IP address and TCP port on which Privoxy will - listen for client requests. - - - - - Type of value: - - [IP-Address]:Port - - - - - Default value: - - 127.0.0.1:8118 - - - - Effect if unset: - - - Bind to 127.0.0.1 (localhost), port 8118. This is suitable and recommended for - home users who run Privoxy on the same machine as - their browser. - - - - - Notes: - - - You will need to configure your browser(s) to this proxy address and port. - - - If you already have another service running on port 8118, or if you want to - serve requests from other machines (e.g. on your local network) as well, you - will need to override the default. - - - If you leave out the IP address, Privoxy will - bind to all interfaces (addresses) on your machine and may become reachable - from the Internet. In that case, consider using access control lists (ACL's) - (see ACLs below), or a firewall. - - - - - Example: - - - Suppose you are running Privoxy on - a machine which has the address 192.168.0.1 on your local private network - (192.168.0.0) and has another outside connection with a different address. - You want it to serve requests from inside only: - - - - listen-address 192.168.0.1:8118 - - - - - - - -toggle - - - - Specifies: - - - Initial state of "toggle" status - - - - - Type of value: - - 1 or 0 - - - - Default value: - - 1 - - - - Effect if unset: - - - Act as if toggled on - - - - - Notes: - - - If set to 0, Privoxy will start in - toggled off mode, i.e. behave like a normal, content-neutral - proxy where all ad blocking, filtering, etc are disabled. See - enable-remote-toggle below. This is not really useful - anymore, since toggling is much easier via the web interface than via - editing the conf file. - - - The windows version will only display the toggle icon in the system tray - if this option is present. - - - - - - - -enable-remote-toggle - - - Specifies: - - - Whether or not the web-based toggle - feature may be used - - - - - Type of value: - - 0 or 1 - - - - Default value: - - 1 - - - - Effect if unset: - - - The web-based toggle feature is disabled. - - - - - Notes: - - - When toggled off, Privoxy acts like a normal, - content-neutral proxy, i.e. it acts as if none of the actions applied to - any URL. - - - For the time being, access to the toggle feature can not be - controlled separately by ACLs or HTTP authentication, - so that everybody who can access Privoxy (see - ACLs and listen-address above) can - toggle it for all users. So this option is not recommended - for multi-user environments with untrusted users. - - - Note that you must have compiled Privoxy with - support for this feature, otherwise this option has no effect. - - - - - - - -enable-edit-actions - - - Specifies: - - - Whether or not the web-based actions - file editor may be used - - - - - Type of value: - - 0 or 1 - - - - Default value: - - 1 - - - - Effect if unset: - - - The web-based actions file editor is disabled. - - - - - Notes: - - - For the time being, access to the editor can not be - controlled separately by ACLs or HTTP authentication, - so that everybody who can access Privoxy (see - ACLs and listen-address above) can - modify its configuration for all users. So this option is not - recommended for multi-user environments with untrusted users. - - - Note that you must have compiled Privoxy with - support for this feature, otherwise this option has no effect. - - - - - - - -ACLs: permit-access and deny-access - - - - - - Specifies: - - - Who can access what. - - - - - Type of value: - - - src_addr[/src_masklen] - [dst_addr[/dst_masklen]] - - - Where src_addr and - dst_addr are IP addresses in dotted decimal notation or valid - DNS names, and src_masklen and - dst_masklen are subnet masks in CIDR notation, i.e. integer - values from 2 to 30 representing the length (in bits) of the network address. The masks and the whole - destination part are optional. - - - - - Default value: - - Unset - - - - Effect if unset: - - - Don't restrict access further than implied by listen-address - - - - - Notes: - - - Access controls are included at the request of ISPs and systems - administrators, and are not usually needed by individual users. - For a typical home user, it will normally suffice to ensure that - Privoxy only listens on the localhost - (127.0.0.1) or internal (home) network address by means of the - listen-address - option. - - - Please see the warnings in the FAQ that this proxy is not intended to be a substitute - for a firewall or to encourage anyone to defer addressing basic security - weaknesses. - - - Multiple ACL lines are OK. - If any ACLs are specified, then the Privoxy - talks only to IP addresses that match at least one permit-access line - and don't match any subsequent deny-access line. In other words, the - last match wins, with the default being deny-access. - - - If Privoxy is using a forwarder (see forward below) - for a particular destination URL, the dst_addr - that is examined is the address of the forwarder and NOT the address - of the ultimate target. This is necessary because it may be impossible for the local - Privoxy to determine the IP address of the - ultimate target (that's often what gateways are used for). - - - You should prefer using IP addresses over DNS names, because the address lookups take - time. All DNS names must resolve! You can not use domain patterns - like *.org or partial domain names. If a DNS name resolves to multiple - IP addresses, only the first one is used. - - - Denying access to particular sites by ACL may have undesired side effects - if the site in question is hosted on a machine which also hosts other sites. - - - - - Examples: - - - Explicitly define the default behavior if no ACL and - listen-address are set: localhost - is OK. The absence of a dst_addr implies that - all destination addresses are OK: - - - - permit-access localhost - - - - Allow any host on the same class C subnet as www.privoxy.org access to - nothing but www.example.com: - - - - permit-access www.privoxy.org/24 www.example.com/32 - - - - Allow access from any host on the 26-bit subnet 192.168.45.64 to anywhere, - with the exception that 192.168.45.73 may not access www.dirty-stuff.example.com: - - - - permit-access 192.168.45.64/26 - deny-access 192.168.45.73 www.dirty-stuff.example.com - - - - - - - -buffer-limit - - - - Specifies: - - - Maximum size of the buffer for content filtering. - - - - - Type of value: - - Size in Kbytes - - - - Default value: - - 4096 - - - - Effect if unset: - - - Use a 4MB (4096 KB) limit. - - - - - Notes: - - - For content filtering, i.e. the +filter and - +deanimate-gif actions, it is necessary that - Privoxy buffers the entire document body. - This can be potentially dangerous, since a server could just keep sending - data indefinitely and wait for your RAM to exhaust -- with nasty consequences. - Hence this option. - - - When a document buffer size reaches the buffer-limit, it is - flushed to the client unfiltered and no further attempt to - filter the rest of the document is made. Remember that there may be multiple threads - running, which might require up to buffer-limit Kbytes - each, unless you have enabled single-threaded - above. - - - - - - - - - - - - - - -Forwarding - - - This feature allows routing of HTTP requests through a chain of - multiple proxies. - It can be used to better protect privacy and confidentiality when - accessing specific domains by routing requests to those domains - through an anonymous public proxy (see e.g. http://www.multiproxy.org/anon_list.htm) - Or to use a caching proxy to speed up browsing. Or chaining to a parent - proxy may be necessary because the machine that Privoxy - runs on has no direct Internet access. - - - - Also specified here are SOCKS proxies. Privoxy - supports the SOCKS 4 and SOCKS 4A protocols. - - -forward - - - Specifies: - - - To which parent HTTP proxy specific requests should be routed. - - - - - Type of value: - - - target_domain[:port] - http_parent[/port] - - - Where target_domain is a domain name pattern (see the - chapter on domain matching in the default.action file), - http_parent is the address of the parent HTTP proxy - as an IP addresses in dotted decimal notation or as a valid DNS name (or . to denote - no forwarding, and the optional - port parameters are TCP ports, i.e. integer - values from 1 to 64535 - - - - - Default value: - - Unset - - - - Effect if unset: - - - Don't use parent HTTP proxies. - - - - - Notes: - - - If http_parent is ., then requests are not - forwarded to another HTTP proxy but are made directly to the web servers. - - - Multiple lines are OK, they are checked in sequence, and the last match wins. - - - - - Examples: - - - Everything goes to an example anonymizing proxy, except SSL on port 443 (which it doesn't handle): - - - - forward .* anon-proxy.example.org:8080 - forward :443 . - - - - Everything goes to our example ISP's caching proxy, except for requests - to that ISP's sites: - - - - forward .*. caching-proxy.example-isp.net:8000 - forward .example-isp.net . - - - - - - - - -forward-socks4 and forward-socks4a - - - - - - Specifies: - - - Through which SOCKS proxy (and to which parent HTTP proxy) specific requests should be routed. - - - - - Type of value: - - - target_domain[:port] - socks_proxy[/port] - http_parent[/port] - - - Where target_domain is a domain name pattern (see the - chapter on domain matching in the default.action file), - http_parent and socks_proxy - are IP addresses in dotted decimal notation or valid DNS names (http_parent - may be . to denote no HTTP forwarding), and the optional - port parameters are TCP ports, i.e. integer values from 1 to 64535 - - - - - Default value: - - Unset - - - - Effect if unset: - - - Don't use SOCKS proxies. - - - - - Notes: - - - Multiple lines are OK, they are checked in sequence, and the last match wins. - - - The difference between forward-socks4 and forward-socks4a - is that in the SOCKS 4A protocol, the DNS resolution of the target hostname happens on the SOCKS - server, while in SOCKS 4 it happens locally. - - - If http_parent is ., then requests are not - forwarded to another HTTP proxy but are made (HTTP-wise) directly to the web servers, albeit through - a SOCKS proxy. - - - - - Examples: - - - From the company example.com, direct connections are made to all - internal domains, but everything outbound goes through - their ISP's proxy by way of example.com's corporate SOCKS 4A gateway to - the Internet. - - - - forward-socks4a .*. socks-gw.example.com:1080 www-cache.example-isp.net:8080 - forward .example.com . - - - - A rule that uses a SOCKS 4 gateway for all destinations but no HTTP parent looks like this: - - - - forward-socks4 .*. socks-gw.example.com:1080 . - - - - - - - -Advanced Forwarding Examples - - - If you have links to multiple ISPs that provide various special content - only to their subscribers, you can configure multiple Privoxies - which have connections to the respective ISPs to act as forwarders to each other, so that - your users can see the internal content of all ISPs. - - - - Assume that host-a has a PPP connection to isp-a.net. And host-b has a PPP connection to - isp-b.net. Both run Privoxy. Their forwarding - configuration can look like this: + - - host-a: - + - - - forward .*. . - forward .isp-b.net host-b:8118 - - + - - host-b: - + - - - forward .*. . - forward .isp-a.net host-a:8118 - - - - Now, your users can set their browser's proxy to use either - host-a or host-b and be able to browse the internal content - of both isp-a and isp-b. - + +<application>Privoxy</application> Configuration + + All Privoxy configuration is stored + in text files. These files can be edited with a text editor. + Many important aspects of Privoxy can + also be controlled easily with a web browser. + - - If you intend to chain Privoxy and - squid locally, then chain as - browser -> squid -> privoxy is the recommended way. - + + + +Controlling <application>Privoxy</application> with Your Web Browser - Assuming that Privoxy and squid - run on the same box, your squid configuration could then look like this: + Privoxy's user interface can be reached through the special + URL http://config.privoxy.org/ + (shortcut: http://p.p/), + which is a built-in page and works without Internet access. + You will see the following section: + - - - # Define Privoxy as parent proxy (without ICP) - cache_peer 127.0.0.1 parent 8118 7 no-query + + + +     Privoxy Menu - # Define ACL for protocol FTP - acl ftp proto FTP + + +         ▪  View & change the current configuration + + +         ▪  View the source code version numbers + + +         ▪  View the request headers. + + +         ▪  Look up which actions apply to a URL and why + + +         ▪  Toggle Privoxy on or off + + +         ▪  Documentation + + + + - # Do not forward FTP requests to Privoxy - always_direct allow ftp - # Forward all the rest to Privoxy - never_direct allow all + + This should be self-explanatory. Note the first item leads to an editor for the + actions files, which is where the ad, banner, + cookie, and URL blocking magic is configured as well as other advanced features of + Privoxy. This is an easy way to adjust various + aspects of Privoxy configuration. The actions + file, and other configuration files, are explained in detail below. - You would then need to change your browser's proxy settings to squid's address and port. - Squid normally uses port 3128. If unsure consult http_port in squid.conf. + Toggle Privoxy On or Off is handy for sites that might + have problems with your current actions and filters. You can in fact use + it as a test to see whether it is Privoxy + causing the problem or not. Privoxy continues + to run as a proxy in this case, but all manipulation is disabled, i.e. + Privoxy acts like a normal forwarding proxy. There + is even a toggle Bookmarklet offered, so + that you can toggle Privoxy with one click from + your browser. - - - - - -Windows GUI Options - - Privoxy has a number of options specific to the - Windows GUI interface: - - - - - If activity-animation is set to 1, the - Privoxy icon will animate when - Privoxy is active. To turn off, set to 0. - - - - - - - activity-animation 1 - - - - - - - - If log-messages is set to 1, - Privoxy will log messages to the console - window: - - - - - - log-messages 1 - - - - - - - If log-buffer-size is set to 1, the size of the log buffer, - i.e. the amount of memory used for the log messages displayed in the - console window, will be limited to log-max-lines (see below). - + + +Configuration Files Overview - Warning: Setting this to 0 will result in the buffer to grow infinitely and - eat up all your memory! + For Unix, *BSD and Linux, all configuration files are located in + /etc/privoxy/ by default. For MS Windows, OS/2, and + AmigaOS these are all in the same directory as the + Privoxy executable. - - - - log-buffer-size 1 - - - + The installed defaults provide a reasonable starting point, though + some settings may be aggressive by some standards. For the time being, the + principle configuration files are: - - log-max-lines is the maximum number of lines held - in the log buffer. See above. - + - - - - - log-max-lines 200 - - - - + + + The main configuration file is named config + on Linux, Unix, BSD, OS/2, and AmigaOS and config.txt + on Windows. This is a required file. + + - - - If log-highlight-messages is set to 1, - Privoxy will highlight portions of the log - messages with a bold-faced font: - + + + default.action (the main actions file) + is used to define which actions relating to banner-blocking, images, pop-ups, + content modification, cookie handling etc should be applied by default. It also defines many + exceptions (both positive and negative) from this default set of actions that enable + Privoxy to selectively eliminate the junk, and only the junk, on + as many websites as possible. + + + Multiple actions files may be defined in config. These + are processed in the order they are defined. Local customizations and locally + preferred exceptions to the default policies as defined in + default.action (which you will most probably want + to define sooner or later) are probably best applied in + user.action, where you can preserve them across + upgrades. standard.action is for + Privoxy's internal use. + + + There is also a web based editor that can be accessed from + http://config.privoxy.org/show-status + (Shortcut: http://p.p/show-status) for the + various actions files. + + - - - - - log-highlight-messages 1 - - - - + + + default.filter (the filter + file) can be used to re-write the raw page content, including + viewable text as well as embedded HTML and JavaScript, and whatever else + lurks on any given web page. The filtering jobs are only pre-defined here; + whether to apply them or not is up to the actions files. + + - - - The font used in the console window: + - - - - log-font-name Comic Sans MS - - - + All files use the # character to denote a + comment (the rest of the line will be ignored) and understand line continuation + through placing a backslash ("\") as the very last character + in a line. If the # is preceded by a backslash, it looses + its special function. Placing a # in front of an otherwise + valid configuration line to prevent it from being interpreted is called "commenting + out" that line. - - Font size used in the console window: + The actions files and default.filter + can use Perl style regular expressions for + maximum flexibility. - - - - log-font-size 8 - - - - - - - - show-on-task-bar controls whether or not - Privoxy will appear as a button on the Task bar - when minimized: + After making any changes, there is no need to restart + Privoxy in order for the changes to take + effect. Privoxy detects such changes + automatically. Note, however, that it may take one or two additional + requests for the change to take effect. When changing the listening address + of Privoxy, these wake up requests + must obviously be sent to the old listening address. + - - - - show-on-task-bar 0 - - - + While under development, the configuration content is subject to change. + The below documentation may not be accurate by the time you read this. + Also, what constitutes a default setting, may change, so + please check all your configuration files on important issues. +]]> - - - If close-button-minimizes is set to 1, the Windows close - button will minimize Privoxy instead of closing - the program (close with the exit option on the File menu). - + + + - - - - - close-button-minimizes 1 - - - - - - - The hide-console option is specific to the MS-Win console - version of Privoxy. If this option is used, - Privoxy will disconnect from and hide the - command console. - + - - - - - #hide-console - - - - + + + + &config; + - - @@ -2950,9 +1442,9 @@ forward-socks4 and forward-socks4a Privoxy takes for which URLs, and thus determine how ad images, cookies and various other aspects of HTTP content and transactions are handled, and on which sites (or even parts thereof). There - are three such files included with Privoxy (as of - version 2.9.15), with differing purposes: - + are three such files included with Privoxy, with + differing purposes: + @@ -2963,8 +1455,8 @@ forward-socks4 and forward-socks4a provide a base level of functionality for Privoxy's array of features. So it is a set of broad rules that should work reasonably well for users everywhere. - This is the file that the developers are keeping updated, and making - available to users. + This is the file that the developers are keeping updated, and making available to users. @@ -3067,11 +1559,11 @@ forward-socks4 and forward-socks4a How Actions are Applied to URLs Actions files are divided into sections. There are special sections, - like the alias sections which will be discussed later. For now - let's concentrate on regular sections: They have a heading line (often split - up to multiple lines for readability) which consist of a list of actions, - separated by whitespace and enclosed in curly braces. Below that, there - is a list of URL patterns, each on a separate line. + like the alias sections which will + be discussed later. For now let's concentrate on regular sections: They have a + heading line (often split up to multiple lines for readability) which consist + of a list of actions, separated by whitespace and enclosed in curly braces. + Below that, there is a list of URL patterns, each on a separate line. @@ -3080,10 +1572,12 @@ forward-socks4 and forward-socks4a applicable actions for the URL is incrementally updated, using the heading of the section in which the pattern is located. If multiple matches for the same URL set the same action differently, the last match wins. If not, - the effects are aggregated (e.g. a URL might match both the - +handle-as-image - and +block actions). - + the effects are aggregated. E.g. a URL might match a regular section with + a heading line of { + +handle-as-image }, + then later another one with just { + +block }, resulting + in both actions to apply. @@ -3100,10 +1594,23 @@ forward-socks4 and forward-socks4a Patterns + + As mentioned, Privoxy uses patterns + to determine what actions might apply to which sites and pages your browser + attempts to access. These patterns use wild card type + pattern matching to achieve a high degree of + flexibility. This allows one expression to be expanded and potentially match + against many similar patterns. + + - Generally, a pattern has the form <domain>/<path>, - where both the <domain> and <path> - are optional. (This is why the pattern / matches all URLs). + Generally, a Privoxy pattern has the form + <domain>/<path>, where both the + <domain> and <path> are + optional. (This is why the special / pattern matches all + URLs). Note that the protocol portion of the URL pattern (e.g. + http://) should not be included in + the pattern. This is assumed already! @@ -3170,7 +1677,7 @@ forward-socks4 and forward-socks4a matches any domain that ENDS in - .example.com + .example.com (e.g. www.example.com) @@ -3272,12 +1779,10 @@ forward-socks4 and forward-socks4a - Please also note that matching in the path is case - INSENSITIVE by default, but you can switch to case - sensitive at any point in the pattern by using the - (?-i) switch: - www.example.com/(?-i)PaTtErN.* will match only - documents whose path starts with PaTtErN in + Please also note that matching in the path is CASE INSENSITIVE + by default, but you can switch to case sensitive at any point in the pattern by using the + (?-i) switch: www.example.com/(?-i)PaTtErN.* will match + only documents whose path starts with PaTtErN in exactly this capitalization. @@ -3414,7 +1919,7 @@ forward-socks4 and forward-socks4a -<emphasis>add-header</emphasis> +add-header @@ -3478,7 +1983,7 @@ forward-socks4 and forward-socks4a -<emphasis>block</emphasis> +block @@ -3572,7 +2077,7 @@ forward-socks4 and forward-socks4a -<emphasis>crunch-incoming-cookies</emphasis> +crunch-incoming-cookies @@ -3622,7 +2127,8 @@ forward-socks4 and forward-socks4a It makes no sense at all to use this action in conjunction with the session-cookies-only action, - since it would prevent the session cookies from being set. + since it would prevent the session cookies from being set. See also + filter-content-cookies. @@ -3641,7 +2147,7 @@ forward-socks4 and forward-socks4a -<emphasis>crunch-outgoing-cookies</emphasis> +crunch-outgoing-cookies @@ -3711,7 +2217,7 @@ forward-socks4 and forward-socks4a -<emphasis>deanimate-gifs</emphasis> +deanimate-gifs @@ -3779,7 +2285,7 @@ forward-socks4 and forward-socks4a -<emphasis>downgrade-http-version</emphasis> +downgrade-http-version @@ -3843,7 +2349,7 @@ problem-host.example.com -<emphasis>fast-redirects</emphasis> +fast-redirects @@ -3922,7 +2428,7 @@ problem-host.example.com -<emphasis>filter</emphasis> +filter @@ -3936,8 +2442,9 @@ problem-host.example.com Effect: - Text documents, including HTML and JavaScript, to which this action applies, are filtered on-the-fly - through the specified regular expression based substitutions. + Text documents, including HTML and JavaScript, to which this action + applies, are filtered on-the-fly through the specified regular expression + based substitutions. @@ -3957,7 +2464,8 @@ problem-host.example.com The name of a filter, as defined in the filter file (typically default.filter, set by the filterfile - option in the config file) + option in the config file). Filtering + can be completely disabled without the use of parameters. @@ -3966,8 +2474,8 @@ problem-host.example.com Notes: - For your convenience, there are a bunch of pre-defined filters available - in the distribution filter file that you can use. See the example below for + For your convenience, there are a number of pre-defined filters available + in the distribution filter file that you can use. See the examples below for a list. @@ -3981,6 +2489,18 @@ problem-host.example.com since the page is not incrementally displayed.) This effect will be more noticeable on slower connections. + + The amount of data that can be filtered is limited to the + buffer-limit + option in the main config file. The + default is 4096 KB (4 Megs). Once this limit is exceeded, the buffered + data, and all pending data, is passed through unfiltered. + + + Inappropriate MIME types, such as zipped files, are not filtered at all. + Encrypted SSL data (from HTTPS servers) cannot be filtered either since + this would violate the integrity of the secure transaction. + At this time, Privoxy cannot (yet!) uncompress compressed documents. If you want filtering to work on all documents, even those that @@ -3989,13 +2509,16 @@ problem-host.example.com action in conjunction with filter. - Filtering can achieve some of the effects as the + Filtering can achieve some of the same effects as the block - action, i.e. it can be used to block ads and banners. + action, i.e. it can be used to block ads and banners. But the mechanism + works quite differently. One effective use, is to block ad banners + based on their size (see below), since many of these seem to be somewhat + standardized. - Feedback with suggestions for new or improved filters is particularly - welcome! + Feedback with suggestions for new or + improved filters is particularly welcome! @@ -4013,7 +2536,15 @@ problem-host.example.com - +filter{banners-by-size} # Kill banners by size (very efficient!) + +filter{banners-by-size} # Kill banners based on their size for this page (very efficient!) + + + + +filter{banners-by-link} # Kill banners based on the link they are contained in (experimental) + + + + +filter{img-reorder} # Reorder attributes in <img> tags to make the banners-by-* filters more effective @@ -4051,6 +2582,10 @@ problem-host.example.com +filter{crude-parental} # Kill all web pages that contain the words "sex" or "warez" + + + +filter{js-events} # Kill all JS event bindings (Radically destructive! Only for extra nasty sites) + @@ -4059,7 +2594,7 @@ problem-host.example.com -<emphasis>handle-as-image</emphasis> +handle-as-image @@ -4114,7 +2649,7 @@ problem-host.example.com reflect the file type, like in the second example section. - Note that you cannot treat HTML pages as images in most cases. For instance, (inline) ad + Note that you cannot treat HTML pages as images in most cases. For instance, (in-line) ad frames require an HTML page to be sent, or they won't display properly. Forcing handle-as-image in this situation will not replace the ad frame with an image, but lead to error messages. @@ -4149,7 +2684,7 @@ ad.doubleclick.net -<emphasis>hide-forwarded-for-headers</emphasis> +hide-forwarded-for-headers @@ -4215,7 +2750,7 @@ ad.doubleclick.net -<emphasis>hide-from-header</emphasis> +hide-from-header @@ -4287,7 +2822,7 @@ ad.doubleclick.net -<emphasis>hide-referrer</emphasis> +hide-referrer @@ -4366,7 +2901,7 @@ ad.doubleclick.net -<emphasis>hide-user-agent</emphasis> +hide-user-agent @@ -4448,7 +2983,7 @@ ad.doubleclick.net -<emphasis>kill-popups<anchor id="kill-popup"></emphasis> +kill-popups<anchor id="kill-popup"> @@ -4538,7 +3073,7 @@ ad.doubleclick.net -<emphasis>limit-connect</emphasis> +limit-connect @@ -4619,7 +3154,7 @@ ad.doubleclick.net -<emphasis>prevent-compression</emphasis> +prevent-compression @@ -4708,7 +3243,7 @@ www.pclinuxonline.com -<emphasis>send-vanilla-wafer</emphasis> +send-vanilla-wafer @@ -4774,7 +3309,7 @@ www.pclinuxonline.com -<emphasis>send-wafer</emphasis> +send-wafer @@ -4840,7 +3375,7 @@ my-internal-testing-server.void -<emphasis>session-cookies-only</emphasis> +session-cookies-only @@ -4921,7 +3456,7 @@ my-internal-testing-server.void -<emphasis>set-image-blocker</emphasis> +set-image-blocker @@ -5237,7 +3772,7 @@ shop = mercy-for-cookies -filter{popups} -kill-popups The first regular section is probably the most important. It has only one pattern, /, but this pattern - matches all URLs.. Therefore, the + matches all URLs. Therefore, the set of actions used in this default section will be applied to all requests as a start. It can be partly or wholly overridden by later matches further down this file, or in user.action, @@ -5248,7 +3783,7 @@ shop = mercy-for-cookies -filter{popups} -kill-popups Again, at the start of matching, all actions are disabled, so there is no real need to disable any actions here, but we will do that nonetheless, - to have a complete listing for your reference. (Remember: A + + to have a complete listing for your reference. (Remember: a + preceding the action name enables the action, a - disables!). Also note how this long line has been made more readable by splitting it into multiple lines with line continuation. @@ -5276,8 +3811,11 @@ shop = mercy-for-cookies -filter{popups} -kill-popups -filter{fun} \ +filter{nimda} \ +filter{banners-by-size} \ + -filter{banners-by-link} \ + -filter{img-reorder} \ -filter{shockwave-flash} \ -filter{crude-parental} \ + -filter{js-events} \ -handle-as-image \ +hide-forwarded-for-headers \ +hide-from-header{block} \ @@ -5561,7 +4099,7 @@ www.ugu.com/sui/ugu/adv So far we are painting with a broad brush by setting general policies, which would be a reasonable starting point for many people. Now, - you'd maybe want to be more specific and have customized rules that + you might want to be more specific and have customized rules that are more suitable to your personal habits and preferences. These would be for narrowly defined situations like your ISP or your bank, and should be placed in user.action, which is parsed after all other @@ -5791,7 +4329,7 @@ another.popular.site.net/more/junk/here/ in a syntax that imitates Perl's s/// operator. If you are familiar with Perl, you will find this to be quite intuitive, and may want to look at the - PCRS man page + PCRS man page for the subtle differences to Perl behaviour. Most notably, the non-standard option letter U is supported, which turns the default to ungreedy matching. @@ -5942,7 +4480,7 @@ s|(<script.*)document\.referrer(.*</script>)|$1"Not Your Business!"$2|U # The status bar is for displaying link targets, not pointless blahblah # -s/window\.status\s*=\s*['"].*?['"]/dUmMy=1/ig +s/window\.status\s*=\s*(['"]).*?\1/dUmMy=1/ig @@ -5951,7 +4489,10 @@ s/window\.status\s*=\s*['"].*?['"]/dUmMy=1/ig or more whitespace. The ? in .*? makes this matching of arbitrary text ungreedy. (Note that the U option is not set). The ['"] construct means: a single - or a double quote. + or a double quote. Finally, \1 is + a backreference to the first parenthesis just like $1 above, + with the difference that in the pattern, a backslash indicates + a backreference, whereas in the substitute, it's the dollar. @@ -5967,7 +4508,7 @@ s/window\.status\s*=\s*['"].*?['"]/dUmMy=1/ig # Kill OnUnload popups. Yummy. Test: http://www.zdnet.com/zdsubs/yahoo/tree/yfs.html # -s/(<body .*)onunload(.*>)/$1never$2/iU +s/(<body [^>]*)onunload(.*>)/$1never$2/iU @@ -5978,7 +4519,11 @@ s/(<body .*)onunload(.*>)/$1never$2/iU This job replaces the onunload attribute in <body> tags with the dummy word never. Note that the i option makes the pattern matching - case-insensitive. + case-insensitive. Also note that ungreedy matching alone doesn't always guarantee + a minimal match: In the first parenthesis, we had to use [^>]* + instead of .* to prevent the match from exceeding the + <body> tag if it doesn't contain OnUnload, but the page's + content does. @@ -5998,7 +4543,7 @@ s/microsoft(?!\.com)/MicroSuck/ig Note the (?!\.com) part (a so-called negative lookahead) in the job's pattern, which means: Don't match, if the string .com appears directly following microsoft - in the page. This prevents links to microsoft.com from being messed, while + in the page. This prevents links to microsoft.com from being trashed, while still replacing the word everywhere else. @@ -6008,6 +4553,8 @@ s/microsoft(?!\.com)/MicroSuck/ig # s* industry[ -]leading \ | cutting[ -]edge \ +| customer[ -]focused \ +| market[ -]driven \ | award[ -]winning # Comments are OK, too! \ | high[ -]performance \ | solutions[ -]based \ @@ -6020,7 +4567,7 @@ s* industry[ -]leading \ The x option in this job turns on extended syntax, and allows for - e.g. the liberal use of (non-interpreted!) whitespace for nicer formatting. + e.g. the liberal use of (non-interpreted!) whitespace for nicer formatting. @@ -6046,12 +4593,12 @@ s* industry[ -]leading \ and all pages of its web-based user interface, are generated from templates. (Privoxy must be running for the above links to work as - intended) + intended.) These templates are stored in a subdirectory of the configuration - directory called templates. On unixish platforms, + directory called templates. On Unixish platforms, this is typically /etc/privoxy/templates/. @@ -6399,7 +4946,7 @@ Requests - For information on regular expression based substititions and their applications + For information on regular expression based substitutions and their applications in filters, please see the filter file tutorial in this manual. @@ -6446,7 +4993,7 @@ Requests There is a shortcut: http://p.p/ (But it - doesn't provide a fallback to a real page, in case the request is not + doesn't provide a fall-back to a real page, in case the request is not sent through Privoxy) @@ -6584,13 +5131,17 @@ Requests Privoxy - Submit Actions File Feedback - + + + Privoxy - Why? + + Credit: The site which gave us the general idea for these bookmarklets is - www.bookmarklets.com. They + www.bookmarklets.com. They have more information about bookmarklets. @@ -6670,7 +5221,7 @@ Requests First, the server headers are read and processed to determine, among other things, the MIME type (document type) and encoding. The headers are then - filtered as deterimed by the + filtered as determined by the +crunch-incoming-cookies, +session-cookies-only, and +downgrade-http-version @@ -6744,7 +5295,8 @@ Requests One quick test to see if Privoxy is causing a problem or not, is to disable it temporarily. This should be the first troubleshooting step. See the Bookmarklets section on a quick - and easy way to do this (be sure to flush caches afterward!). + and easy way to do this (be sure to flush caches afterward!). Looking at the + logs is a good idea too. @@ -6958,7 +5510,7 @@ In file: user.action [ View ] [ Edit ] One last example. Let's try http://www.rhapsodyk.net/adsl/HOWTO/. - This one is giving us problems. We are getting a blank page. Hmmm... + This one is giving us problems. We are getting a blank page. Hmmm ... @@ -7040,8 +5592,9 @@ In file: user.action [ View ] [ Edit ]{+filter} actions. Try - adding the URL for the site to one of aliases that turn off +filter: + One likely cause would be one of the {+filter} actions. These + tend to be harder to troubleshoot. Try adding the URL for the site to one of + aliases that turn off +filter: @@ -7072,8 +5625,16 @@ In file: user.action [ View ] [ Edit ] - This would probably be most appropriately put in user.action, - for local site exceptions. + This would turn off all filtering for that site. This would probably be most + appropriately put in user.action, for local site + exceptions. + + + + Images that are inexplicably being blocked, may well be hitting the + +filter{banners-by-size} rule, which assumes + that images of certain sizes are ad banners (works well most of the time + since these tend to be standardized). @@ -7108,6 +5669,100 @@ In file: user.action [ View ] [ Edit ] style. + - Small fixes in the actions chapter + - Small clarifications in the quickstart to ad blocking + - Removed from s since the new doc CSS + renders them red (bad in TOC). + + Revision 1.120 2002/05/23 19:16:43 roro + Correct Debian specials (installation and startup). + + Revision 1.119 2002/05/22 17:17:05 oes + Added Security hint + + Revision 1.118 2002/05/21 04:54:55 hal9 + -New Section: Quickstart to Ad Blocking + -Reformat Actions Anatomy to match new CGI layout + Revision 1.117 2002/05/17 13:56:16 oes - Reworked & extended Templates chapter - Small changes to Regex appendix