X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=blobdiff_plain;f=doc%2Fwebserver%2Fuser-manual%2Fappendix.html;h=604dbe74763b319eb41b4c82430b04ca09c1c160;hp=45b706d0a82a0f025f44260e174bfbd672d4f780;hb=474793f5da05b90f24ac2b38a7d7774cb761ab35;hpb=07cf496b6edcbd3cf315ec7c48f2c94be27357b1 diff --git a/doc/webserver/user-manual/appendix.html b/doc/webserver/user-manual/appendix.html index 45b706d0..604dbe74 100644 --- a/doc/webserver/user-manual/appendix.html +++ b/doc/webserver/user-manual/appendix.html @@ -3,37 +3,23 @@ - - Appendix - + - - +
@@ -98,11 +84,11 @@ body { - +
. - Matches any - single character, e.g. "a", - "A", "4", - ":", or "@".. - + Matches any single character, e.g. "a", "A", "4", ":", or + "@".
@@ -110,8 +96,8 @@ body { - @@ -120,8 +106,9 @@ body {
? - The preceding - character or expression is matched ZERO or ONE times. + ? - The + preceding character or expression is matched ZERO or ONE times. Either/or.
- +
+ - The preceding - character or expression is matched ONE or MORE times.+ - The + preceding character or expression is matched ONE or MORE + times.
@@ -129,8 +116,9 @@ body { - +
* - The preceding - character or expression is matched ZERO or MORE times.* - The + preceding character or expression is matched ZERO or MORE + times.
@@ -138,7 +126,7 @@ body { - -
\ - The + \ - The "escape" character denotes that the following character should be taken literally. This is used where one of the special characters (e.g.
[ ] - Characters - enclosed in brackets will be matched if any of the enclosed - characters are encountered. For instance, [ ] - + Characters enclosed in brackets will be matched if any of the + enclosed characters are encountered. For instance, "[0-9]" matches any numeric digit (zero through nine). As an example, we can combine this with "+" to match any digit one of more times: @@ -168,8 +156,8 @@ body { - @@ -178,7 +166,7 @@ body {
( ) - parentheses - are used to group a sub-expression, or multiple + ( ) - + parentheses are used to group a sub-expression, or multiple sub-expressions.
-
| - The + | - The "bar" character works like an "or" conditional statement. A match is successful if the sub-expression on either side of -

/.*/banners/.* - A simple example that uses the - common combination of "." and "*" to denote any character, zero or more times. In - other words, any string at all. So we start with a literal forward - slash, then our regular expression pattern (/.*/banners/.* - A simple example that uses + the common combination of "." and + "*" to denote any character, zero or more + times. In other words, any string at all. So we start with a literal + forward slash, then our regular expression pattern (".*") another literal forward slash, the string "banners", another forward slash, and lastly another ".*". We are building a directory @@ -217,16 +205,17 @@ body {

And now something a little more complex:

-

/.*/adv((er)?ts?|ertis(ing|ements?))?/ - We have - several literal forward slashes again ("/"), - so we are building another expression that is a file path statement. We - have another ".*", so we are matching - against any conceivable sub-path, just so it matches our expression. - The only true literal that must - match our pattern is adv, - together with the forward slashes. What comes after the "adv" string is the interesting part.

+

/.*/adv((er)?ts?|ertis(ing|ements?))?/ - We + have several literal forward slashes again ("/"), so we are building another expression that is a + file path statement. We have another ".*", + so we are matching against any conceivable sub-path, just so it matches + our expression. The only true literal that must match our pattern is + adv, together with the forward + slashes. What comes after the "adv" string + is the interesting part.

Remember the "?" means the preceding expression (either a literal character or anything grouped with @@ -238,15 +227,14 @@ body { "QUOTE">"s". The "|" means "or". We have two of those. For instance, "(ing|ements?)", can expand to match either - "ing" OR "ements?". - What is being done here, is an attempt at matching as many variations - of "advertisement", and similar, as - possible. So this would expand to match just "adv", or "advert", or - "adverts", or "advertising", or "advertisement", or "ing" OR "ements?". What is + being done here, is an attempt at matching as many variations of + "advertisement", and similar, as possible. + So this would expand to match just "adv", or + "advert", or "adverts", or "advertising", + or "advertisement", or "advertisements". You get the idea. But it would not match "advertizements" (with a "z"). We could fix that by changing our regular @@ -254,8 +242,8 @@ body { "QUOTE">"/.*/adv((er)?ts?|erti(s|z)(ing|ements?))?/", which would then match either spelling.

-

/.*/advert[0-9]+\.(gif|jpe?g) - Again another +

/.*/advert[0-9]+\.(gif|jpe?g) - Again another path statement with forward slashes. Anything in the square brackets "[ ]" can be matched. This is using "0-9" as a shorthand expression to mean any @@ -305,8 +293,8 @@ body {

-

14.2. Privoxy's - Internal Pages

+

14.2. + Privoxy's Internal Pages

Since Privoxy proxies each requested web page, it is easy for

  • -

    Privoxy main page:

    +

    Privoxy main page:

    Show information about the current configuration, including - viewing and editing of actions files:

    + viewing and editing of actions files:

  • -

    Show the source code version numbers:

    +

    Show the source code version numbers:

  • -

    Show the browser's request headers:

    +

    Show the browser's request headers:

  • -

    Show which actions apply to a URL and why:

    +

    Show which actions apply to a URL and why:

    "off", "Privoxy" continues to run, but only as a pass-through proxy, with no actions taking place:

    + "AEN5884" id="AEN5884">

    http://config.privoxy.org/toggle

    -

    Short cuts. Turn off, then on:

    +

    Short cuts. Turn off, then on:

    http://config.privoxy.org/toggle?set=disable

    -
    +

  • - -

    These may be bookmarked for quick reference. See next.

    - -
    -

    14.2.1. - Bookmarklets

    - -

    Below are some "bookmarklets" to allow - you to easily access a "mini" version of - some of Privoxy's special pages. - 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 should 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 favorites/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.

    - - - -

    Credit: The site which gave us the general idea for these - bookmarklets is www.bookmarklets.com. They have more information about - bookmarklets.

    -
  • @@ -603,22 +528,22 @@ body { "actions-file.html#ACTIONS">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 inadvertently. 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.

    + we need to be able to see just what Privoxy is doing. Especially, if something + Privoxy is doing is causing us a + problem inadvertently. 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.

    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!). Looking - at the 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".)

    + the first troubleshooting step (be sure to flush caches afterward!). + Looking at the 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 @@ -652,7 +577,7 @@ body { "_top">google.com, and look at it one section at a time in a sample configuration (your real configuration may vary):

    - +
    @@ -718,8 +643,8 @@ In file: user.action [ View ] "+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 -- [ View ] "actions" to "google.com":

    - +
    @@ -822,7 +747,7 @@ In file: user.action [ View ] Now another example, "ad.doubleclick.net":

    - +
    @@ -856,7 +781,7 @@ In file: user.action [ View ] "ad.doubleclick.net" is done here -- as both a "+block{}"
    -      and an and an "+handle-as-image". The custom alias "+block-as-image" just
    @@ -866,7 +791,7 @@ In file: user.action [ View ] "http://www.example.net/adsl/HOWTO/". This one is giving
           us problems. We are getting a blank page. Hmmm ...

    - +
    @@ -947,13 +872,13 @@ In file: user.action [ View ] user.action file) that explicitly un blocks ( un blocks ( "{-block}")
           paths with "adsl" in them (remember, last
           match in the configuration wins). There are various ways to handle such
           exceptions. Example:

    - +
    @@ -972,7 +897,7 @@ In file: user.action [ View ] But now what about a situation where we get no explicit matches like
           we did with:

    - +
    @@ -995,7 +920,7 @@ In file: user.action [ View ] "+filter":

    - +
    @@ -1016,7 +941,7 @@ In file: user.action [ View ] ". Or you could do your own exception to negate
           filtering:

    - +
    @@ -1040,14 +965,14 @@ In file: user.action [ View ] "+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).

    + "emphasis">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.

    - +
    @@ -1060,12 +985,12 @@ In file: user.action [ View ] 
           
    -

    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.

    +

    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 @@ -1074,7 +999,7 @@ In file: user.action [ View ]