@@ -7377,8 +7968,9 @@ Requests
Chain of Events
- Let's take a quick look at the basic sequence of events when a web page is
- requested by your browser and Privoxy is on duty:
+ Let's take a quick look at how some of Privoxy's
+ core features are triggered, and the ensuing sequence of events when a web
+ page is requested by your browser:
@@ -7394,7 +7986,7 @@ Requests
Privoxy traps any request for its own internal CGI
- pages (e.g http://p.p/) and sends the CGI page back to the browser.
+ pages (e.g http://p.p/) and sends the CGI page back to the browser.
@@ -7404,10 +7996,13 @@ Requests
linkend="BLOCK">+block patterns. If
so, the URL is then blocked, and the remote web server will not be contacted.
+handle-as-image
- is then checked and if it does not match, an
- HTML BLOCKED page is sent back. Otherwise, if it does match,
- an image is returned. The type of image depends on the setting of +set-image-blocker
+ and
+ +handle-as-empty-document
+ are then checked, and if there is no match, an
+ HTML BLOCKED page is sent back to the browser. Otherwise, if
+ it does match, an image is returned for the former, and an empty text
+ document for the latter. The type of image would depend on the setting of
+ +set-image-blocker
(blank, checkerboard pattern, or an HTTP redirect to an image elsewhere).
@@ -7435,8 +8030,8 @@ Requests
- Now the web server starts sending its response back (i.e. typically a web page and related
- data).
+ Now the web server starts sending its response back (i.e. typically a web
+ page).
@@ -7452,14 +8047,7 @@ Requests
- If the +kill-popups
- action applies, and it is an HTML or JavaScript document, the popup-code in the
- response is filtered on-the-fly as it is received.
-
-
-
-
- If a +filter
+ If any +filter action
or +deanimate-gifs
action applies (and the document type fits the action), the rest of the page is
@@ -7472,7 +8060,7 @@ Requests
Privoxy back to your browser.
- If neither +filter
+ If neither a +filter action
or +deanimate-gifs
matches, then Privoxy passes the raw data through
@@ -7481,24 +8069,32 @@ Requests
- As the browser receives the now (probably filtered) page content, it
+ As the browser receives the now (possibly filtered) page content, it
reads and then requests any URLs that may be embedded within the page
source, e.g. ad images, stylesheets, JavaScript, other HTML documents (e.g.
- frames), sounds, etc. For each of these objects, the browser issues a new
- request. And each such request is in turn processed as above. Note that a
- complex web page may have many such embedded URLs.
+ frames), sounds, etc. For each of these objects, the browser issues a
+ separate request (this is easily viewable in Privoxy's
+ logs). And each such request is in turn processed just as above. Note that a
+ complex web page will have many, many such embedded URLs. If these
+ secondary requests are to a different server, then quite possibly a very
+ differing set of actions is triggered.
+
+ NOTE: This is somewhat of a simplistic overview of what happens with each URL
+ request. For the sake of brevity and simplicity, we have focused on
+ Privoxy's core features only.
+
-Anatomy of an Action
+Troubleshooting: Anatomy of an Action
The way Privoxy applies
@@ -7518,7 +8114,16 @@ Requests
or not, is to disable it temporarily. This should be the first troubleshooting
step. See the Bookmarklets section on a quick
and easy way to do this (be sure to flush caches afterward!). Looking at the
- logs is a good idea too.
+ logs is a good idea too. (Note that both the toggle feature and logging are
+ enabled via config file settings, and may need to be
+ turned on.)
+
+
+ Another easy troubleshooting step to try is if you have done any
+ customization of your installation, revert back to the installed
+ defaults and see if that helps. There are times the developers get complaints
+ about one thing or another, and the problem is more related to a customized
+ configuration issue.
@@ -7553,65 +8158,23 @@ Requests
- Matches for http://google.com:
+ Matches for http://www.google.com:
In file: default.action [ View ][ Edit ]
- {-add-header
- -block
- -content-type-overwrite
- -crunch-client-header
- -crunch-if-none-match
- -crunch-incoming-cookies
- -crunch-outgoing-cookies
- -crunch-server-header
- +deanimate-gifs {last}
- -downgrade-http-version
+ {+deanimate-gifs {last}
+fast-redirects {check-decoded-url}
- -filter {js-events}
- -filter {content-cookies}
- -filter {all-popups}
- -filter {banners-by-link}
- -filter {tiny-textforms}
- -filter {frameset-borders}
- -filter {demoronizer}
- -filter {shockwave-flash}
- -filter {quicktime-kioskmode}
- -filter {fun}
- -filter {crude-parental}
- -filter {site-specifics}
- +filter {js-annoyances}
- +filter {html-annoyances}
+filter {refresh-tags}
- +filter {unsolicited-popups}
+filter {img-reorder}
+filter {banners-by-size}
+filter {webbugs}
+filter {jumping-windows}
+filter {ie-exploits}
- -filter-client-headers
- -filter-server-headers
- -force-text-mode
- -handle-as-empty-document
- -handle-as-image
- -hide-accept-language
- -hide-content-disposition
+hide-forwarded-for-headers
+hide-from-header {block}
- -hide-if-modified-since
+hide-referrer {forge}
- -hide-user-agent
- -inspect-jpegs
- -kill-popups
- -limit-connect
- -overwrite-last-modified
- +prevent-compression
- -redirect
- -send-vanilla-wafer
- -send-wafer
+session-cookies-only
+set-image-blocker {pattern}
- -treat-forbidden-connects-like-blocks }
/
{ -session-cookies-only }
@@ -7637,41 +8200,42 @@ In file: user.action [ View ][ Edit ]
The first listing
- is any matches for the standard.action file. No hits at
- all here on standard. Then next is default, or
- our default.action file. The large, multi-line listing,
- is how the actions are set to match for all URLs, i.e. our default settings.
- If you look at your actions file, this would be the section
- just below the aliases section near the top. This will apply to
- all URLs as signified by the single forward slash at the end of the listing
- -- /.
-
-
-
- But we can define additional actions that would be exceptions to these general
- rules, and then list specific URLs (or patterns) that these exceptions would
- apply to. Last match wins. Just below this then are two explicit matches for
- .google.com. The first is negating our previous cookie setting,
- which was for default.action file. The large, multi-line
+ listing, is how the actions are set to match for all URLs, i.e. our default
+ settings. If you look at your actions file, this would be the
+ section just below the aliases section near the top. This
+ will apply to all URLs as signified by the single forward slash at the end
+ of the listing -- / .
+
+
+
+ But we have defined additional actions that would be exceptions to these general
+ rules, and then we list specific URLs (or patterns) that these exceptions
+ would apply to. Last match wins. Just below this then are two explicit
+ matches for .google.com. The first is negating our previous
+ cookie setting, which was for +session-cookies-only
(i.e. not persistent). So we will allow persistent cookies for google, at
least that is how it is in this example. The second turns
- off any
- off any +fast-redirects
action, allowing this to take place unmolested. 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 two actions
- defined somewhere in the lower part of our default.action
- file, and google.com is referenced somewhere in these latter
- sections.
+ www.google.com or mail.google.com. But it would not
+ match www.google.de! So, apparently, we have these two actions
+ defined as exceptions to the general rules at the top somewhere in the lower
+ part of our default.action file, and
+ google.com is referenced somewhere in these latter sections.
Then, for our user.action file, we again have no hits.
So there is nothing google-specific that we might have added to our own, local
- configuration.
+ configuration. If there was, those actions would over-rule any actions from
+ previously processed files, such as default.action.
+ user.action typically has the last word. This is the
+ best place to put hard and fast exceptions,
@@ -7688,6 +8252,7 @@ In file: user.action [ View ][ Edit ][ View ][ Edit ][ View ][ Edit ]
+ +set-image-blocker {pattern}
Notice the only difference here to the previous listing, is to
fast-redirects and session-cookies-only,
- which are actived specifically for this site in our configuration,
+ which are activated specifically for this site in our configuration,
and thus show in the Final Results.
@@ -7745,22 +8322,23 @@ In file: user.action [ View ][ Edit ]
- { +block +handle-as-image }
- .ad.doubleclick.net
-
- { +block +handle-as-image }
+ { +block{Domains starts with "ad"} }
ad*.
- { +block +handle-as-image }
- .doubleclick.net
+ { +block{Domain contains "ad"} }
+ .ad.
+
+ { +block{Doubleclick banner server} +handle-as-image }
+ .[a-vx-z]*.doubleclick.net
- We'll just show the interesting part here, the explicit matches. It is
- matched three different times. Each as an +block +handle-as-image,
+ We'll just show the interesting part here - the explicit matches. It is
+ matched three different times. Two +block{} sections,
+ and a +block{} +handle-as-image,
which is the expanded form of one of our aliases that had been defined as:
- +imageblock. (+block-as-image. (Aliases are defined in
the first section of the actions file and typically used to combine more
than one action.)
@@ -7773,28 +8351,28 @@ In file: user.action [ View ][ Edit ]ad.doubleclick.net
is done here -- as both a +block
+ linkend="BLOCK">+block{}and an
- +handle-as-image.
- The custom alias +imageblock just simplifies the process and make
- it more readable.
+ +handle-as-image.
+ The custom alias +block-as-image just
+ simplifies the process and make it more readable.
- One last example. Let's try http://www.rhapsodyk.net/adsl/HOWTO/.
+ One last example. Let's try http://www.example.net/adsl/HOWTO/.
This one is giving us problems. We are getting a blank page. Hmmm ...
- Matches for http://www.rhapsodyk.net/adsl/HOWTO/:
+ Matches for http://www.example.net/adsl/HOWTO/:
In file: default.action [ View ][ Edit ]
{-add-header
-block
+ -client-header-filter{hide-tor-exit-notation}
-content-type-overwrite
-crunch-client-header
-crunch-if-none-match
@@ -7803,17 +8381,33 @@ In file: user.action [ View ][ Edit ][ View ][ Edit ]
@@ -7843,10 +8434,15 @@ In file: user.action [ View ][ Edit ]
Ooops, the /adsl/ is matching /ads in our
configuration! But we did not want this at all! Now we see why we get the
- blank page. We could now add a new action below this that explicitly
- un blocks ({-block}) paths with
- adsl in them (remember, last match in the configuration wins).
- There are various ways to handle such exceptions. Example:
+ blank page. It is actually triggering two different actions here, and
+ the effects are aggregated so that the URL is blocked, and &my-app; is told
+ to treat the block as if it were an image. But this is, of course, all wrong.
+ We could now add a new action below this (or better in our own
+ user.action file) that explicitly
+ un blocks (
+ {-block}) paths with
+ adsl in them (remember, last match in the configuration
+ wins). There are various ways to handle such exceptions. Example:
@@ -7858,8 +8454,10 @@ In file: user.action [ View ][ Edit ]
- Now the page displays ;-) Be sure to flush your browser's caches when
- making such changes. Or, try using Shift+Reload.
+ Now the page displays ;-)
+ Remember to flush your browser's caches when making these kinds of changes to
+ your configuration to insure that you get a freshly delivered page! Or, try
+ using Shift+Reload.
@@ -7870,25 +8468,27 @@ In file: user.action [ View ][ Edit ]
- { +block +handle-as-image }
+ { +block{Path starts with "ads".} +handle-as-image }
/ads
- That actually was very telling and pointed us quickly to where the problem
+ That actually was very helpful and pointed us quickly to where the problem
was. If you don't get this kind of match, then it means one of the default
- 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. These
- tend to be harder to troubleshoot. Try adding the URL for the site to one of
- aliases that turn off +filter:
+ rules in the first section of default.action is causing
+ the problem. This would require some guesswork, and maybe a little trial and
+ error to isolate the offending rule. One likely cause would be one of the
+ +filter actions.
+ These tend to be harder to troubleshoot.
+ Try adding the URL for the site to one of aliases that turn off
+ +filter:
- {shop}
+ { shop }
.quietpc.com
.worldpay.com # for quietpc.com
.jungle.com
@@ -7898,8 +8498,8 @@ In file: user.action [ View ][ Edit ]
- {shop} is an alias that expands to
- { -filter -session-cookies-only }.
+ { shop } is an alias that expands to
+ { -filter -session-cookies-only }.
Or you could do your own exception to negate filtering:
@@ -7907,29 +8507,55 @@ In file: user.action [ View ][ Edit ]
- {-filter}
+ { -filter }
+ # Disable ALL filter actions for sites in this section
.forbes.com
+ developer.ibm.com
+ localhost
- This would turn off all filtering for that site. This would probably be most
- appropriately put in user.action, for local site
- exceptions.
+ This would turn off all filtering for these sites. This is best
+ put in user.action, for local site
+ exceptions. Note that when a simple domain pattern is used by itself (without
+ the subsequent path portion), all sub-pages within that domain are included
+ automatically in the scope of the action.
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).
++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).
+
+
+
+ { fragile } is an alias that disables most
+ actions that are the most likely to cause trouble. This can be used as a
+ last resort for problem sites.
+
+
+
+
+ { fragile }
+ # Handle with care: easy to break
+ mail.google.
+ mybank.example.com
+
- {fragile} is an alias that disables most actions. This can be
- used as a last resort for problem sites. Remember to flush caches! If this
- still does not work, you will have to go through the remaining actions one by
- one to find which one(s) is causing the problem.
+ Remember to flush caches! Note that the
+ mail.google reference lacks the TLD portion (e.g.
+ .com). This will effectively match any TLD with
+ google in it, such as mail.google.de.,
+ just as an example.
+
+
+ If this still does not work, you will have to go through the remaining
+ actions one by one to find which one(s) is causing the problem.
@@ -7953,10 +8579,246 @@ In file: user.action [ View ][ Edit ][ View ][ Edit ][ View ][ Edit ][ View ][ Edit ][ View ][ Edit ]