X-Git-Url: http://www.privoxy.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=doc%2Fwebserver%2Fuser-manual%2Factions-file.html;h=ed6ffe402479d28e49c8d3f56b2b6feb3edffa9c;hb=66237b3fc4eb5187c29d7bc598a87676db5b780b;hp=d3e621db0fcbabdb791d86451d743908b9af1ebc;hpb=473cfd051580edfa1e2a3f6beeb9a0d09a8253fd;p=privoxy.git diff --git a/doc/webserver/user-manual/actions-file.html b/doc/webserver/user-manual/actions-file.html index d3e621db..ed6ffe40 100644 --- a/doc/webserver/user-manual/actions-file.html +++ b/doc/webserver/user-manual/actions-file.html @@ -7,7 +7,7 @@ NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.79">Privoxy 3.0.9 User ManualPrivoxy 3.0.16 User ManualPrivoxy with - differing purposes: -

-

The list of actions files to be used are defined in the main configuration file, and are processed in the order they are defined (e.g. @@ -531,7 +501,7 @@ CLASS="SECT2" >

8.1. Finding the Right Mix

8.2. How to Edit

Generally, an URL pattern has the form <domain>/<path>, where both the +><domain><port>/<path>, where the <domain> and , the <port> + and the <path> are - optional. (This is why the special are optional. (This is why the special + / pattern matches all - URLs). Note that the protocol portion of the URL pattern (e.g. - pattern matches all URLs). Note that the protocol + portion of the URL pattern (e.g. http://) should ) should + not be included in - the pattern. This is assumed already!

be included in the pattern. This is assumed already!

The pattern matching syntax is different for the domain and path parts of the URL. The domain part uses a simple globbing type matching technique, @@ -783,6 +756,20 @@ CLASS="QUOTE" > (POSIX 1003.2).

The port part of a pattern is a decimal port number preceded by a colon + (:). If the domain part contains a numerical IPv6 address, + it has to be put into angle brackets + (<, >).

www.example.com/index.html$www.example.com/index.html

:8000/

Matches any URL pointing to TCP port 8000. +

<2001:db8::1>/

Matches any URL with the host address 2001:db8::1. + (Note that the real URL uses plain brackets, not angle brackets.) +

index.html

8.4.1. The Domain Pattern

8.4.2. The Path Pattern

are, you definitely don't need to worry about this one.

Headers added by this action are not modified by other actions. +

Example usage:

8.5.3. change-x-forwarded-for

Typical use:

Improve privacy by not forwarding the source of the request in the HTTP headers.

Effect:

Deletes the "X-Forwarded-For:" HTTP header from the client request, + or adds a new one. +

Type:

Parameterized.

Parameter:

  • "block" to delete the header.

  • "add" to create the header (or append + the client's IP address to an already existing one). +

Notes:

It is safe and recommended to use block. +

Forwarding the source address of the request may make + sense in some multi-user setups but is also a privacy risk. +

Example usage:

+change-x-forwarded-for{block}
+

8.5.3. client-header-filter8.5.4. client-header-filter

8.5.4. client-header-tagger8.5.5. client-header-tagger

8.5.5. content-type-overwrite8.5.6. content-type-overwrite

8.5.6. crunch-client-header8.5.7. crunch-client-header

8.5.7. crunch-if-none-match8.5.8. crunch-if-none-match

8.5.8. crunch-incoming-cookies8.5.9. crunch-incoming-cookies

8.5.9. crunch-server-header8.5.10. crunch-server-header

8.5.10. crunch-outgoing-cookies8.5.11. crunch-outgoing-cookies

8.5.11. deanimate-gifs8.5.12. deanimate-gifs

8.5.12. downgrade-http-version8.5.13. downgrade-http-version

8.5.13. fast-redirects8.5.14. fast-redirects

8.5.14. filter8.5.15. filter

8.5.15. force-text-mode8.5.16. force-text-mode

8.5.16. forward-override8.5.17. forward-override

8.5.17. handle-as-empty-document8.5.18. handle-as-empty-document

8.5.18. handle-as-image8.5.19. handle-as-image

8.5.19. hide-accept-language8.5.20. hide-accept-language

8.5.20. hide-content-disposition8.5.21. hide-content-disposition

8.5.21. hide-if-modified-since8.5.22. hide-if-modified-since

8.5.22. hide-forwarded-for-headers

Typical use:

Improve privacy by not forwarding the source of the request in the HTTP headers.

Effect:

Deletes any existing "X-Forwarded-for:" HTTP header from client requests. -

Type:

Boolean.

Parameter:

N/A -

Notes:

It is safe and recommended to leave this on. -

Example usage:

+hide-forwarded-for-headers
-

8.5.23. hide-from-header

hided-if-modified-sincehide-if-modified-since
to further customize your random range. @@ -6679,7 +6718,7 @@ CLASS="SECT3" >

8.5.34. Summary

. Now, let's look at an example match-all.action, default.action and + and user.action - file and see how all these pieces come together:

file and see how all these pieces come together:

8.7.1. default.action8.7.1. match-all.action

Every config file should start with a short comment stating its purpose:

Remember all actions are disabled when matching starts, + so we have to explicitly enable the ones we want.

While the match-all.action file only contains a + single section, it is probably the most important one. It has only one + pattern, "/", but this pattern + matches all URLs. Therefore, the set of + actions used in this "default" section will + be applied to all requests as a start. It can be partly or + wholly overridden by other actions files like default.action + and user.action, but it will still be largely responsible + for your overall browsing experience.

Again, at the start of matching, all actions are disabled, so there is + no need to disable any actions here. (Remember: a "+" + preceding the action name enables the action, a "-" disables!). + Also note how this long line has been made more readable by splitting it into + multiple lines with line continuation.

# Sample default.action file <ijbswa-developers@lists.sourceforge.net>
{ \ + +change-x-forwarded-for{block} \ + +hide-from-header{block} \ + +set-image-blocker{pattern} \ +} +/ # Match all URLs +

Then, since this is the The default behavior is now set.

8.7.2. default.action

If you aren't a developer, there's no need for you to edit the + default.action file, the -first section is a special section for internal use that you needn't -change or worry about:

file. It is maintained by + the Privoxy developers and if you disagree with some of the + sections, you should overrule them in your user.action.

Understanding the default.action file can + help you with your user.action, though.

The first section in this file is a special section for internal use + that prevents older Privoxy versions from reading the file:

########################################################################## # Settings -- Don't change! For internal Privoxy use ONLY. ########################################################################## - {{settings}} -for-privoxy-version=3.0

After that comes the (optional) alias section. We'll use the example -section from the above After that comes the (optional) alias section. We'll use the example + section from the above chapter on aliases, -that also explains why and how aliases are used:

Now come the regular sections, i.e. sets of actions, accompanied - by URL patterns to which they apply. Remember all actions - are disabled when matching starts, so we have to explicitly - enable the ones we want.

The first regular section is probably the most important. It has only - one pattern, "/", but this pattern - matches all URLs. Therefore, the - set of actions used in this "default" section will - be applied to all requests as a start. It can be partly or - wholly overridden by later matches further down this file, or in user.action, - but it will still be largely responsible for your overall browsing - experience.

Again, at the start of matching, all actions are disabled, so there is - no need to disable any actions here. (Remember: a "+" - preceding the action name enables the action, a "-" disables!). - Also note how this long line has been made more readable by splitting it into - multiple lines with line continuation.

##########################################################################
-# "Defaults" section:
-##########################################################################
- { \
- +deanimate-gifs \
- +filter{html-annoyances} \
- +filter{refresh-tags} \
- +filter{webbugs} \
- +filter{ie-exploits} \     
- +hide-forwarded-for-headers \
- +hide-from-header{block} \
- +hide-referrer{forge} \
- +prevent-compression \
- +session-cookies-only \
- +set-image-blocker{pattern} \
- }
- / # forward slash will match *all* potential URL patterns.

The default behavior is now set. -

The first of our specialized sections is concerned with "fragile"fast-redirects - action, which we enabled per default above, breaks some sites. So disable - it for popular sites where we know it misbehaves:

match-all.action
, + breaks some sites. So disable it for popular sites where we know it misbehaves:

and - information). We can mark any URL as an image with the

8.7.2. user.action8.7.3. user.action

So far we are painting with a broad brush by setting general policies, @@ -8229,4 +8255,4 @@ VALIGN="top" > \ No newline at end of file +>