CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
"><LINK
REL="HOME"
-TITLE="Privoxy 3.1.1 User Manual"
+TITLE="Privoxy 3.0.4 User Manual"
HREF="index.html"><LINK
REL="PREVIOUS"
TITLE="See Also"
HREF="seealso.html"><LINK
REL="STYLESHEET"
TYPE="text/css"
-HREF="../p_doc.css"></HEAD
+HREF="../p_doc.css">
+<LINK REL="STYLESHEET" TYPE="text/css" HREF="p_doc.css">
+</head
><BODY
CLASS="SECT1"
BGCOLOR="#EEEEEE"
><TH
COLSPAN="3"
ALIGN="center"
->Privoxy 3.1.1 User Manual</TH
+>Privoxy 3.0.4 User Manual</TH
></TR
><TR
><TD
><H1
CLASS="SECT1"
><A
-NAME="APPENDIX">14. Appendix</H1
+NAME="APPENDIX"
+></A
+>14. Appendix</H1
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
-NAME="REGEX">14.1. Regular Expressions</H2
+NAME="REGEX"
+></A
+>14.1. Regular Expressions</H2
><P
> <SPAN
CLASS="APPLICATION"
TARGET="_top"
>PCRE</A
> and
- <A
-HREF="http://www.oesterhelt.org/pcrs/"
-TARGET="_top"
->PCRS</A
+ <SPAN
+CLASS="APPLICATION"
+>PCRS</SPAN
> libraries.</P
><P
> If you are reading this, you probably don't understand what <SPAN
CLASS="emphasis"
><I
CLASS="EMPHASIS"
->[]</I
+>[ ]</I
></SPAN
> - Characters enclosed in brackets will be matched if
any of the enclosed characters are encountered. For instance, <SPAN
CLASS="emphasis"
><I
CLASS="EMPHASIS"
->()</I
+>( )</I
></SPAN
> - parentheses are used to group a sub-expression,
or multiple sub-expressions.
> in the path
somewhere.</P
><P
-> A now something a little more complex:</P
+> And now something a little more complex:</P
><P
> <SPAN
CLASS="emphasis"
another path statement with forward slashes. Anything in the square brackets
<SPAN
CLASS="QUOTE"
->"[]"</SPAN
+>"[ ]"</SPAN
> can be matched. This is using <SPAN
CLASS="QUOTE"
>"0-9"</SPAN
><P
> More reading on Perl Compatible Regular expressions:
<A
-HREF="http://www.perldoc.com/perl5.6/pod/perlre.html"
+HREF="http://perldoc.perl.org/perlre.html"
TARGET="_top"
->http://www.perldoc.com/perl5.6/pod/perlre.html</A
+>http://perldoc.perl.org/perlre.html</A
></P
><P
> For information on regular expression based substitutions and their applications
><H2
CLASS="SECT2"
><A
-NAME="AEN3474">14.2. <SPAN
+NAME="AEN4783"
+></A
+>14.2. <SPAN
CLASS="APPLICATION"
>Privoxy</SPAN
>'s Internal Pages</H2
Privoxy main page:
</P
><A
-NAME="AEN3489"><BLOCKQUOTE
+NAME="AEN4798"
+></A
+><BLOCKQUOTE
CLASS="BLOCKQUOTE"
><P
>
editing of actions files:
</P
><A
-NAME="AEN3497"><BLOCKQUOTE
+NAME="AEN4806"
+></A
+><BLOCKQUOTE
CLASS="BLOCKQUOTE"
><P
>
Show the source code version numbers:
</P
><A
-NAME="AEN3502"><BLOCKQUOTE
+NAME="AEN4811"
+></A
+><BLOCKQUOTE
CLASS="BLOCKQUOTE"
><P
>
Show the browser's request headers:
</P
><A
-NAME="AEN3507"><BLOCKQUOTE
+NAME="AEN4816"
+></A
+><BLOCKQUOTE
CLASS="BLOCKQUOTE"
><P
>
Show which actions apply to a URL and why:
</P
><A
-NAME="AEN3512"><BLOCKQUOTE
+NAME="AEN4821"
+></A
+><BLOCKQUOTE
CLASS="BLOCKQUOTE"
><P
>
to run, but only as a pass-through proxy, with no actions taking place:
</P
><A
-NAME="AEN3518"><BLOCKQUOTE
+NAME="AEN4827"
+></A
+><BLOCKQUOTE
CLASS="BLOCKQUOTE"
><P
>
> Short cuts. Turn off, then on:
</P
><A
-NAME="AEN3522"><BLOCKQUOTE
+NAME="AEN4831"
+></A
+><BLOCKQUOTE
CLASS="BLOCKQUOTE"
><P
>
</P
></BLOCKQUOTE
><A
-NAME="AEN3525"><BLOCKQUOTE
+NAME="AEN4834"
+></A
+><BLOCKQUOTE
CLASS="BLOCKQUOTE"
><P
>
><H3
CLASS="SECT3"
><A
-NAME="BOOKMARKLETS">14.2.1. Bookmarklets</H3
+NAME="BOOKMARKLETS"
+></A
+>14.2.1. Bookmarklets</H3
><P
> Below are some <SPAN
CLASS="QUOTE"
><LI
><P
> <A
-HREF="javascript:w=Math.floor(screen.width/2);h=Math.floor(screen.height*0.9);void(window.open('http://www.privoxy.org/actions/index.php?url='+escape(location.href),'Feedback','screenx='+w+',width='+w+',height='+h+',scrollbars=yes,toolbar=no,location=no,directories=no,status=no,menubar=no,copyhistory=no').focus());"
-TARGET="_top"
->Privoxy - Submit Actions File Feedback</A
->
- </P
-></LI
-><LI
-><P
-> <A
HREF="javascript:void(window.open('http://config.privoxy.org/show-url-info?url='+escape(location.href),'Why').focus());"
TARGET="_top"
>Privoxy - Why?</A
><H2
CLASS="SECT2"
><A
-NAME="CHAIN">14.3. Chain of Events</H2
+NAME="CHAIN"
+></A
+>14.3. Chain of Events</H2
><P
> Let's take a quick look at the basic sequence of events when a web page is
requested by your browser and <SPAN
CLASS="APPLICATION"
>Privoxy</SPAN
> 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 <A
+HREF="http://p.p/"
+TARGET="_top"
+>http://p.p/</A
+>) and sends the CGI page back to the browser.
</P
></LI
><LI
<TT
CLASS="FILENAME"
>default.filter</TT
->) are processed against the buffered
- content. Filters are applied in the order they are specified in the
- <TT
-CLASS="FILENAME"
->default.filter</TT
-> file. Animated GIFs, if present, are
- reduced to either the first or last frame, depending on the action
+> and any other filter files) are
+ processed against the buffered content. Filters are applied in the order
+ they are specified in one of the filter files. Animated GIFs, if present,
+ are reduced to either the first or last frame, depending on the action
setting.The entire page, which is now filtered, is then sent by
<SPAN
CLASS="APPLICATION"
></LI
><LI
><P
-> 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
><H2
CLASS="SECT2"
><A
-NAME="ACTIONSANAT">14.4. Anatomy of an Action</H2
+NAME="ACTIONSANAT"
+></A
+>14.4. Anatomy of an Action</H2
><P
> The way <SPAN
CLASS="APPLICATION"
>"+filter"</SPAN
></A
> action) from
- the <TT
-CLASS="FILENAME"
->default.filter</TT
-> file since this is handled very
+ one of the filter files since this is handled very
differently and not so easy to trap! 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
TARGET="_top"
>google.com</A
>,
- and look at it one section at a time:</P
+ and look at it one section at a time in a sample configuration (your real
+ configuration may vary):</P
><P
> <TABLE
BORDER="0"
>[ Edit ]</SPAN
>
-{-add-header
- -block
- -crunch-outgoing-cookies
- -crunch-incoming-cookies
- +deanimate-gifs{last}
- -downgrade-http-version
- +fast-redirects
- -filter{popups}
- -filter{fun}
- -filter{shockwave-flash}
- -filter{crude-parental}
- +filter{html-annoyances}
- +filter{js-annoyances}
- +filter{content-cookies}
- +filter{webbugs}
- +filter{refresh-tags}
- +filter{nimda}
- +filter{banners-by-size}
- +hide-forwarded-for-headers
- +hide-from-header{block}
- +hide-referer{forge}
- -hide-user-agent
- -handle-as-image
- -kill-popups
- -limit-connect
- +prevent-compression
- -send-vanilla-wafer
- -send-wafer
- +session-cookies-only
- +set-image-blocker{pattern} }
+ {-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
+ +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 }
.google.com
></TABLE
></P
><P
-> This tells us how we have defined our
+> This is telling us how we have defined our
<A
HREF="actions-file.html#ACTIONS"
><SPAN
>"actions"</SPAN
></A
>, and
- which ones match for our example, <SPAN
+ which ones match for our test case, <SPAN
CLASS="QUOTE"
>"google.com"</SPAN
->. The first listing
+>.
+ Displayed is all the actions that are available to us. Remember,
+ the <TT
+CLASS="LITERAL"
+>+</TT
+> sign denotes <SPAN
+CLASS="QUOTE"
+>"on"</SPAN
+>. <TT
+CLASS="LITERAL"
+>-</TT
+>
+ denotes <SPAN
+CLASS="QUOTE"
+>"off"</SPAN
+>. So some are <SPAN
+CLASS="QUOTE"
+>"on"</SPAN
+> here, but many
+ are <SPAN
+CLASS="QUOTE"
+>"off"</SPAN
+>. Each example we try may provide a slightly different
+ end result, depending on our configuration directives.</P
+><P
+> The first listing
is any matches for the <TT
CLASS="FILENAME"
>standard.action</TT
>"+session-cookies-only"</SPAN
></A
>
- (i.e. not persistent). So we will allow persistent cookies for google. The
- second turns <SPAN
+ (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
+ <SPAN
CLASS="emphasis"
><I
CLASS="EMPHASIS"
> Then, for our <TT
CLASS="FILENAME"
>user.action</TT
-> file, we again have no hits.</P
+> file, we again have no hits.
+ So there is nothing google-specific that we might have added to our own, local
+ configuration.</P
><P
> And finally we pull it all together in the bottom section and summarize how
<SPAN
CLASS="SCREEN"
> Final results:
- -add-header
- -block
- -crunch-outgoing-cookies
- -crunch-incoming-cookies
- +deanimate-gifs{last}
- -downgrade-http-version
- -fast-redirects
- -filter{popups}
- -filter{fun}
- -filter{shockwave-flash}
- -filter{crude-parental}
- +filter{html-annoyances}
- +filter{js-annoyances}
- +filter{content-cookies}
- +filter{webbugs}
- +filter{refresh-tags}
- +filter{nimda}
- +filter{banners-by-size}
- +hide-forwarded-for-headers
- +hide-from-header{block}
- +hide-referer{forge}
- -hide-user-agent
- -handle-as-image
- -kill-popups
- -limit-connect
- +prevent-compression
- -send-vanilla-wafer
+ -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
+ -fast-redirects
+ +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} </PRE
+ -session-cookies-only
+ +set-image-blocker {pattern}
+ -treat-forbidden-connects-like-blocks </PRE
></TD
></TR
></TABLE
> and <SPAN
CLASS="QUOTE"
>"session-cookies-only"</SPAN
+>,
+ which are activated specifically for this site in our configuration,
+ and thus show in the <SPAN
+CLASS="QUOTE"
+>"Final Results"</SPAN
>.</P
><P
> Now another example, <SPAN
><P
> One last example. Let's try <SPAN
CLASS="QUOTE"
->"http://www.rhapsodyk.net/adsl/HOWTO/"</SPAN
+>"http://www.example.net/adsl/HOWTO/"</SPAN
>.
This one is giving us problems. We are getting a blank page. Hmmm ...</P
><P
><TD
><PRE
CLASS="SCREEN"
-> Matches for http://www.rhapsodyk.net/adsl/HOWTO/:
+> Matches for http://www.example.net/adsl/HOWTO/:
In file: default.action <SPAN
CLASS="GUIBUTTON"
>
{-add-header
- -block
- -crunch-incoming-cookies
- -crunch-outgoing-cookies
+ -block
+ -content-type-overwrite
+ -crunch-client-header
+ -crunch-if-none-match
+ -crunch-incoming-cookies
+ -crunch-outgoing-cookies
+ -crunch-server-header
+deanimate-gifs
-downgrade-http-version
- +fast-redirects
+ +fast-redirects{check-decoded-url}
+filter{html-annoyances}
+filter{js-annoyances}
+filter{kill-popups}
+filter{banners-by-size}
+filter{hal}
+filter{fun}
+ -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-referer{forge}
-hide-user-agent
- -handle-as-image
+ -inspect-jpegs
+kill-popups
+ -overwrite-last-modified
+prevent-compression
+ -redirect
-send-vanilla-wafer
-send-wafer
+session-cookies-only
- +set-image-blocker{blank} }
+ +set-image-blocker{blank}
+ -treat-forbidden-connects-like-blocks }
/
{ +block +handle-as-image }
> is matching <SPAN
CLASS="QUOTE"
>"/ads"</SPAN
->! 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 does <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
CLASS="emphasis"
><I
CLASS="EMPHASIS"
->not</I
+>un</I
></SPAN
->
- block (<SPAN
+> blocks (<SPAN
CLASS="QUOTE"
>"{-block}"</SPAN
->) paths with <SPAN
+>) paths with
+ <SPAN
CLASS="QUOTE"
>"adsl"</SPAN
->. 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"