+-------------------------------------------------------------------------------
+
+9.2. Privoxy's Internal Pages
+
+Since Privoxy proxies each requested web page, it is easy for Privoxy to trap
+certain special URLs. In this way, we can talk directly to Privoxy, and see how
+it is configured, see how our rules are being applied, change these rules and
+other configuration options, and even turn Privoxy's filtering off, all with a
+web browser.
+
+The URLs listed below are the special ones that allow direct access to Privoxy.
+Of course, Privoxy must be running to access these. If not, you will get a
+friendly error message. Internet access is not necessary either.
+
+ * Privoxy main page:
+
+
+ http://config.privoxy.org/
+
+
+ Alternately, this may be reached at http://p.p/, but this variation may not
+ work as reliably as the above in some configurations.
+
+ * Show information about the current configuration:
+
+
+ http://config.privoxy.org/show-status
+
+
+ * Show the source code version numbers:
+
+
+ http://config.privoxy.org/show-version
+
+
+ * Show the client's request headers:
+
+
+ http://config.privoxy.org/show-request
+
+
+ * Show which actions apply to a URL and why:
+
+
+ http://config.privoxy.org/show-url-info
+
+
+ * Toggle Privoxy on or off. In this case, "Privoxy" continues to run, but
+ only as a pass-through proxy, with no actions taking place:
+
+
+ http://config.privoxy.org/toggle
+
+
+ Short cuts. Turn off, then on:
+
+
+ http://config.privoxy.org/toggle?set=disable
+
+
+
+ http://config.privoxy.org/toggle?set=enable
+
+
+ * Edit the actions list file:
+
+
+ http://config.privoxy.org/edit-actions
+
+
+
+These may be bookmarked for quick reference.
+-------------------------------------------------------------------------------
+
+9.2.1. Bookmarklets
+
+Here are some bookmarklets to allow you to easily access a "mini" version of
+this page. They are designed for MS Internet Explorer, but should work equally
+well in Netscape, Mozilla, and other browsers which support JavaScript. They
+are designed to run directly from your bookmarks - not by clicking the links
+below (although that will work for testing).
+
+To save them, right-click the link and choose "Add to Favorites" (IE) or "Add
+Bookmark" (Netscape). You will get a warning that the bookmark "may not be
+safe" - just click OK. Then you can run the Bookmarklet directly from your
+favourites/bookmarks. For even faster access, you can put them on the "Links"
+bar (IE) or the "Personal Toolbar" (Netscape), and run them with a single
+click.
+
+ * Enable Privoxy
+
+ * Disable Privoxy
+
+ * Toggle Privoxy (Toggles between enabled and disabled)
+
+ * View Privoxy Status
+
+
+Credit: The site which gave me the general idea for these bookmarklets is
+www.bookmarklets.com. They have more information about bookmarklets.
+-------------------------------------------------------------------------------
+
+9.3. Anatomy of an Action
+
+The way Privoxy applies "actions" and "filters" to any given URL can be
+complex, and not always so easy to understand what is happening. And sometimes
+we need to be able to see just what Privoxy is doing. Especially, if something
+Privoxy is doing is causing us a problem inadvertantly. It can be a little
+daunting to look at the actions and filters files themselves, since they tend
+to be filled with "regular expressions" whose consequences are not always so
+obvious. Privoxy provides the http://config.privoxy.org/show-url-info page that
+can show us very specifically how actions are being applied to any given URL.
+This is a big help for troubleshooting.
+
+First, enter one URL (or partial URL) at the prompt, and then Privoxy will tell
+us how the current configuration will handle it. This will not help with
+filtering effects from the default.filter file! It also will not tell you about
+any other URLs that may be embedded within the URL you are testing. For
+instance, images such as ads are expressed as URLs within the raw page source
+of HTML pages. So you will only get info for the actual URL that is pasted into
+the prompt area -- not any sub-URLs. If you want to know about embedded URLs
+like ads, you will have to dig those out of the HTML source. Use your browser's
+"View Page Source" option for this. Or right click on the ad, and grab the URL.
+
+Let's look at an example, google.com, one section at a time:
+
+ System default actions:
+
+ { -add-header -block -deanimate-gifs -downgrade -fast-redirects -filter
+ -hide-forwarded -hide-from -hide-referer -hide-user-agent -image
+ -image-blocker -limit-connect -no-compression -no-cookies-keep
+ -no-cookies-read -no-cookies-set -no-popups -vanilla-wafer -wafer }
+
+
+
+This is the top section, and only tells us of the compiled in defaults. This is
+basically what Privoxy would do if there were not any "actions" defined, i.e.
+it does nothing. Every action is disabled. This is not particularly informative
+for our purposes here. OK, next section:
+
+ Matches for http://google.com:
+
+ { -add-header -block +deanimate-gifs -downgrade +fast-redirects
+ +filter{html-annoyances} +filter{js-annoyances} +filter{no-popups}
+ +filter{webbugs} +filter{nimda} +filter{banners-by-size} +filter{hal}
+ +filter{fun} +hide-forwarded +hide-from{block} +hide-referer{forge}
+ -hide-user-agent -image +image-blocker{blank} +no-compression
+ +no-cookies-keep -no-cookies-read -no-cookies-set +no-popups
+ -vanilla-wafer -wafer }
+ /
+
+ { -no-cookies-keep -no-cookies-read -no-cookies-set }
+ .google.com
+
+ { -fast-redirects }
+ .google.com
+
+
+
+This is much more informative, and tells us how we have defined our "actions",
+and which ones match for our example, "google.com". The first grouping shows
+our default settings, which would apply to all URLs. If you look at your
+"actions" file, this would be the section just below the "aliases" section near
+the top. This applies to all URLs as signified by the single forward slash -- "
+/".
+
+These are the default actions we have enabled. But we can define additional
+actions that would be exceptions to these general rules, and then list specific
+URLs that these exceptions would apply to. Last match wins. Just below this
+then are two explict matches for ".google.com". The first is negating our
+various cookie blocking actions (i.e. we will allow cookies here). The second
+is allowing "fast-redirects". Note that there is a leading dot here --
+".google.com". This will match any hosts and sub-domains, in the google.com
+domain also, such as "www.google.com". So, apparently, we have these actions
+defined somewhere in the lower part of our actions file, and "google.com" is
+referenced in these sections.
+
+And now we pull it altogether in the bottom section and summarize how Privoxy
+is appying all its "actions" to "google.com":
+
+ Final results:
+
+ -add-header -block -deanimate-gifs -downgrade -fast-redirects
+ +filter{html-annoyances} +filter{js-annoyances} +filter{no-popups}
+ +filter{webbugs} +filter{nimda} +filter{banners-by-size} +filter{hal}
+ +filter{fun} +hide-forwarded +hide-from{block} +hide-referer{forge}
+ -hide-user-agent -image +image-blocker{blank} -limit-connect +no-compression
+ -no-cookies-keep -no-cookies-read -no-cookies-set +no-popups -vanilla-wafer
+ -wafer
+
+
+
+Now another example, "ad.doubleclick.net":
+
+ { +block +image }
+ .ad.doubleclick.net
+
+ { +block +image }
+ ad*.
+
+ { +block +image }
+ .doubleclick.net
+
+
+
+We'll just show the interesting part here, the explicit matches. It is matched
+three different times. Each as an "+block +image", which is the expanded form
+of one of our aliases that had been defined as: "+imageblock". ("Aliases" are
+defined in the first section of the actions file and typically used to combine
+more than one action.)
+
+Any one of these would have done the trick and blocked this as an unwanted
+image. This is unnecessarily redundant since the last case effectively would
+also cover the first. No point in taking chances with these guys though ;-)
+Note that if you want an ad or obnoxious URL to be invisible, it should be
+defined as "ad.doubleclick.net" is done here -- as both a "+block" and an
+"+image". The custom alias "+imageblock" does this for us.
+
+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...
+
+ Matches for http://www.rhapsodyk.net/adsl/HOWTO/:
+
+ { -add-header -block +deanimate-gifs -downgrade +fast-redirects
+ +filter{html-annoyances} +filter{js-annoyances} +filter{no-popups}
+ +filter{webbugs} +filter{nimda} +filter{banners-by-size} +filter{hal}
+ +filter{fun} +hide-forwarded +hide-from{block} +hide-referer{forge}
+ -hide-user-agent -image +image-blocker{blank} +no-compression
+ +no-cookies-keep -no-cookies-read -no-cookies-set +no-popups
+ -vanilla-wafer -wafer }
+ /
+
+ { +block +image }
+ /ads
+
+
+
+Ooops, the "/adsl/" is matching "/ads"! But we did not want this at all! Now we
+see why we get the blank page. We could now add a new action below this that
+explictly does not block (-block) pages with "adsl". There are various ways to
+handle such exceptions. Example:
+
+ { -block }
+ /adsl
+
+
+
+Now the page displays ;-) Be sure to flush your browser's caches when making
+such changes. Or, try using Shift+Reload.
+
+But now what about a situation where we get no explicit matches like we did
+with:
+
+ { -block }
+ /adsl
+
+
+
+That actually was very telling and pointed us quickly to where the problem was.
+If you don't get this kind of match, then it means one of the default rules in
+the first section is causing the problem. This would require some guesswork,
+and maybe a little trial and error to isolate the offending rule. One likely
+cause would be one of the "{+filter}" actions. Try adding the URL for the site
+to one of aliases that turn off "+filter":
+
+ {shop}
+ .quietpc.com
+ .worldpay.com # for quietpc.com
+ .jungle.com
+ .scan.co.uk
+ .forbes.com
+
+
+
+"{shop}" is an "alias" that expands to "{ -filter -no-cookies -no-cookies-keep
+}". Or you could do your own exception to negate filtering:
+
+ {-filter}
+ .forbes.com
+
+