CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
"><LINK
REL="HOME"
-TITLE="Privoxy 3.0.4 User Manual"
+TITLE="Privoxy 3.0.5 User Manual"
HREF="index.html"><LINK
REL="PREVIOUS"
TITLE="See Also"
><TH
COLSPAN="3"
ALIGN="center"
->Privoxy 3.0.4 User Manual</TH
+>Privoxy 3.0.5 User Manual</TH
></TR
><TR
><TD
><H2
CLASS="SECT2"
><A
-NAME="AEN4783"
+NAME="AEN4920"
></A
->14.2. <SPAN
-CLASS="APPLICATION"
->Privoxy</SPAN
->'s Internal Pages</H2
+>14.2. Privoxy's Internal Pages</H2
><P
> Since <SPAN
CLASS="APPLICATION"
Privoxy main page:
</P
><A
-NAME="AEN4798"
+NAME="AEN4934"
></A
><BLOCKQUOTE
CLASS="BLOCKQUOTE"
editing of actions files:
</P
><A
-NAME="AEN4806"
+NAME="AEN4942"
></A
><BLOCKQUOTE
CLASS="BLOCKQUOTE"
Show the source code version numbers:
</P
><A
-NAME="AEN4811"
+NAME="AEN4947"
></A
><BLOCKQUOTE
CLASS="BLOCKQUOTE"
Show the browser's request headers:
</P
><A
-NAME="AEN4816"
+NAME="AEN4952"
></A
><BLOCKQUOTE
CLASS="BLOCKQUOTE"
Show which actions apply to a URL and why:
</P
><A
-NAME="AEN4821"
+NAME="AEN4957"
></A
><BLOCKQUOTE
CLASS="BLOCKQUOTE"
to run, but only as a pass-through proxy, with no actions taking place:
</P
><A
-NAME="AEN4827"
+NAME="AEN4963"
></A
><BLOCKQUOTE
CLASS="BLOCKQUOTE"
> Short cuts. Turn off, then on:
</P
><A
-NAME="AEN4831"
+NAME="AEN4967"
></A
><BLOCKQUOTE
CLASS="BLOCKQUOTE"
</P
></BLOCKQUOTE
><A
-NAME="AEN4834"
+NAME="AEN4970"
></A
><BLOCKQUOTE
CLASS="BLOCKQUOTE"
><A
NAME="ACTIONSANAT"
></A
->14.4. Anatomy of an Action</H2
+>14.4. Troubleshooting: Anatomy of an Action</H2
><P
> The way <SPAN
CLASS="APPLICATION"
and easy way to do this (be sure to flush caches afterward!). Looking at the
logs is a good idea too.</P
><P
+> 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.</P
+><P
> <SPAN
CLASS="APPLICATION"
>Privoxy</SPAN
end result, depending on our configuration directives.</P
><P
> The first listing
- is any matches for the <TT
-CLASS="FILENAME"
->standard.action</TT
-> file. No hits at
- all here on <SPAN
-CLASS="QUOTE"
->"standard"</SPAN
->. Then next is <SPAN
-CLASS="QUOTE"
->"default"</SPAN
->, or
- our <TT
+ is for our <TT
CLASS="FILENAME"
>default.action</TT
-> 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 <SPAN
+> 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 <SPAN
CLASS="QUOTE"
>"actions"</SPAN
-> file, this would be the section
- just below the <SPAN
+> file, this would be the
+ section just below the <SPAN
CLASS="QUOTE"
>"aliases"</SPAN
-> section near the top. This will apply to
- all URLs as signified by the single forward slash at the end of the listing
- -- <SPAN
+> section near the top. This
+ will apply to all URLs as signified by the single forward slash at the end
+ of the listing -- <SPAN
CLASS="QUOTE"
->"/"</SPAN
+>" / "</SPAN
>.</P
><P
-> 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
- <SPAN
+> 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 <SPAN
CLASS="QUOTE"
>".google.com"</SPAN
->. The first is negating our previous cookie setting,
- which was for <A
+>. The first is negating our previous
+ cookie setting, which was for <A
HREF="actions-file.html#SESSION-COOKIES-ONLY"
><SPAN
CLASS="QUOTE"
CLASS="EMPHASIS"
>off</I
></SPAN
-> any
- <A
+> any <A
HREF="actions-file.html#FAST-REDIRECTS"
><SPAN
CLASS="QUOTE"
<SPAN
CLASS="QUOTE"
>"www.google.com"</SPAN
->. So, apparently, we have these two actions
- defined somewhere in the lower part of our <TT
+> or <SPAN
+CLASS="QUOTE"
+>"mail.google.com"</SPAN
+>. But it would not
+ match <SPAN
+CLASS="QUOTE"
+>"www.google.de"</SPAN
+>! So, apparently, we have these two actions
+ defined as exceptions to the general rules at the top somewhere in the lower
+ part of our <TT
CLASS="FILENAME"
>default.action</TT
->
- file, and <SPAN
+> file, and
+ <SPAN
CLASS="QUOTE"
>"google.com"</SPAN
-> is referenced somewhere in these latter
- sections.</P
+> is referenced somewhere in these latter sections.</P
><P
> Then, for our <TT
CLASS="FILENAME"
>user.action</TT
> file, we again have no hits.
So there is nothing google-specific that we might have added to our own, local
- configuration.</P
+ configuration. If there was, those actions would over-rule any actions from
+ previously processed files, such as <TT
+CLASS="FILENAME"
+>default.action</TT
+>.
+ <TT
+CLASS="FILENAME"
+>user.action</TT
+> typically has the last word. This is the
+ best place to put hard and fast exceptions,</P
><P
> And finally we pull it all together in the bottom section and summarize how
<SPAN
><TD
><PRE
CLASS="SCREEN"
-> { +block +handle-as-image }
- .ad.doubleclick.net
-
- { +block +handle-as-image }
+> { +block }
ad*.
+ { +block }
+ .ad.
+
{ +block +handle-as-image }
- .doubleclick.net</PRE
+ .[a-vx-z]*.doubleclick.net</PRE
></TD
></TR
></TABLE
></P
><P
-> We'll just show the interesting part here, the explicit matches. It is
- matched three different times. Each as an <SPAN
+> We'll just show the interesting part here - the explicit matches. It is
+ matched three different times. Two <SPAN
+CLASS="QUOTE"
+>"+block"</SPAN
+> sections,
+ and a <SPAN
CLASS="QUOTE"
>"+block +handle-as-image"</SPAN
>,
which is the expanded form of one of our aliases that had been defined as:
<SPAN
CLASS="QUOTE"
->"+imageblock"</SPAN
+>"+block-as-image"</SPAN
>. (<A
HREF="actions-file.html#ALIASES"
><SPAN
>.
The custom alias <SPAN
CLASS="QUOTE"
->"+imageblock"</SPAN
-> just simplifies the process and make
- it more readable.</P
+>"<TT
+CLASS="LITERAL"
+>+block-as-image</TT
+>"</SPAN
+> just
+ simplifies the process and make it more readable.</P
><P
> One last example. Let's try <SPAN
CLASS="QUOTE"
>"/ads"</SPAN
> 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
- <SPAN
+ blank page. It is actually triggering two different actions here, and
+ the effects are aggregated so that the URL is blocked, and <SPAN
+CLASS="APPLICATION"
+>Privoxy</SPAN
+> 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
+ <TT
+CLASS="FILENAME"
+>user.action</TT
+> file) that explicitly
+ <SPAN
CLASS="emphasis"
><I
CLASS="EMPHASIS"
>un</I
></SPAN
-> blocks (<SPAN
+> blocks (
+ <A
+HREF="actions-file.html#BLOCK"
+><SPAN
CLASS="QUOTE"
>"{-block}"</SPAN
+></A
>) paths with
- <SPAN
+ <SPAN
CLASS="QUOTE"
>"adsl"</SPAN
-> in them (remember, last match in the configuration wins).
- There are various ways to handle such exceptions. Example:</P
+> in them (remember, last match in the configuration
+ wins). There are various ways to handle such exceptions. Example:</P
><P
> <TABLE
BORDER="0"
></TABLE
></P
><P
-> Now the page displays ;-) Be sure to flush your browser's caches when
- making such changes. Or, try using <TT
+> 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 <TT
CLASS="LITERAL"
>Shift+Reload</TT
>.</P
></TABLE
></P
><P
-> 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 <SPAN
+ rules in the first section of <TT
+CLASS="FILENAME"
+>default.action</TT
+> 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
+ <A
+HREF="actions-file.html#FILTER"
+><SPAN
CLASS="QUOTE"
->"{+filter}"</SPAN
-> actions. These
- tend to be harder to troubleshoot. Try adding the URL for the site to one of
- aliases that turn off <SPAN
+>"+filter"</SPAN
+></A
+> actions.
+ These tend to be harder to troubleshoot.
+ Try adding the URL for the site to one of aliases that turn off
+ <A
+HREF="actions-file.html#FILTER"
+><SPAN
CLASS="QUOTE"
>"+filter"</SPAN
+></A
>:</P
><P
> <TABLE
><TD
><PRE
CLASS="SCREEN"
-> {shop}
+> { shop }
.quietpc.com
.worldpay.com # for quietpc.com
.jungle.com
><P
> <SPAN
CLASS="QUOTE"
->"{shop}"</SPAN
+>"<TT
+CLASS="LITERAL"
+>{ shop }</TT
+>"</SPAN
> is an <SPAN
CLASS="QUOTE"
>"alias"</SPAN
> that expands to
<SPAN
CLASS="QUOTE"
->"{ -filter -session-cookies-only }"</SPAN
+>"<TT
+CLASS="LITERAL"
+>{ -filter -session-cookies-only }</TT
+>"</SPAN
>.
Or you could do your own exception to negate filtering: </P
><P
><TD
><PRE
CLASS="SCREEN"
-> {-filter}
- .forbes.com</PRE
+> { -filter }
+ # Disable ALL filter actions for sites in this section
+ .forbes.com
+ developer.ibm.com
+ localhost</PRE
></TD
></TR
></TABLE
></P
><P
-> This would turn off all filtering for that site. This would probably be most
- appropriately put in <TT
+> This would turn off all filtering for these sites. This is best
+ put in <TT
CLASS="FILENAME"
>user.action</TT
>, for local site
- exceptions.</P
+ 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
+ automatcially in the scope of the action.</P
><P
> Images that are inexplicably being blocked, may well be hitting the
- <SPAN
+<A
+HREF="actions-file.html#FILTER-BANNERS-BY-SIZE"
+><SPAN
CLASS="QUOTE"
>"+filter{banners-by-size}"</SPAN
-> rule, which assumes
- that images of certain sizes are ad banners (works well most of the time
- since these tend to be standardized).</P
+></A
+>
+ rule, which assumes
+ that images of certain sizes are ad banners (works well
+ <SPAN
+CLASS="emphasis"
+><I
+CLASS="EMPHASIS"
+>most of the time</I
+></SPAN
+> since these tend to be standardized).</P
+><P
+> <SPAN
+CLASS="QUOTE"
+>"<TT
+CLASS="LITERAL"
+>{ fragile }</TT
+>"</SPAN
+> 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. </P
+><P
+> <TABLE
+BORDER="0"
+BGCOLOR="#E0E0E0"
+WIDTH="100%"
+><TR
+><TD
+><PRE
+CLASS="SCREEN"
+> { fragile }
+ # Handle with care: easy to break
+ mail.google.
+ mybank.example.com</PRE
+></TD
+></TR
+></TABLE
+></P
><P
> <SPAN
+CLASS="emphasis"
+><I
+CLASS="EMPHASIS"
+>Remember to flush caches!</I
+></SPAN
+> Note that the
+ <TT
+CLASS="LITERAL"
+>mail.google</TT
+> reference lacks the TLD portion (e.g.
+ <SPAN
CLASS="QUOTE"
->"{fragile}"</SPAN
-> 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.</P
+>".com"</SPAN
+>. This will effectively match any TLD with
+ <TT
+CLASS="LITERAL"
+>google</TT
+> in it, such as <TT
+CLASS="LITERAL"
+>mail.google.de</TT
+>,
+ just as an example.</P
+><P
+>
+ 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.</P
></DIV
></DIV
><DIV