X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=blobdiff_plain;f=doc%2Fwebserver%2Fuser-manual%2Fconfiguration.html;h=abfbabb402b556fcb95348af528619f59fa92b59;hp=523f10bdb542a0e799f83566f208404e33bbc7fd;hb=56d03106907472899fa6e8933e81058744ce0fed;hpb=c01c83eba954cb16fdc45a258e54fbc80100f161 diff --git a/doc/webserver/user-manual/configuration.html b/doc/webserver/user-manual/configuration.html index 523f10bd..abfbabb4 100644 --- a/doc/webserver/user-manual/configuration.html +++ b/doc/webserver/user-manual/configuration.html @@ -95,7 +95,7 @@ CLASS="SECT2" >

5.1. Controlling Privoxy Privoxy can be reached by the special +>'s user interface can be reached through the special URL http://p.p/ (or alternately - http://config.privoxy.org/ + (shortcut: http://p.p/), - which is an internal page. You will see the following section:

Please choose from the following options: + * Privoxy main page * Show information about the current configuration * Show the source code version numbers - * Show the client's request headers. + * Show the request headers. * Show which actions apply to a URL and why * Toggle Privoxy on or off * Edit the actions list @@ -155,19 +157,14 @@ CLASS="APPLICATION" CLASS="APPLICATION" >Privoxy configuration. The actions - file, and other configuration files, are explained in detail below. - Privoxy will automatically detect any changes - to these files.

"Toggle Privoxy On or Off" is handy for sites that might - have problems with your current actions and filters, or just to test if - a site misbehaves, whether it is Privoxy @@ -175,14 +172,23 @@ CLASS="APPLICATION" CLASS="APPLICATION" >Privoxy continues - to run as a proxy in this case, but all filtering is disabled.

Bookmarklet offered, so + that you can toggle Privoxy with one click from + your browser.

5.2. Configuration Files Overview

  • The default.action file is used to define various - (the actions file) is used to define + which of a set of various "actions" relating to images, banners, pop-ups, access - restrictions, banners and cookies. There is a CGI based editor for this - file that can be accessed via relating to images, banners, + pop-ups, access restrictions, banners and cookies are to be applied, and where. + There is a web based editor for this file that can be accessed at http://config.privoxy.org/edit-actions/ + (Shortcut: http://p.p. (Other actions - files are included as well with differing levels of filtering +>http://p.p/edit-actions/). + (Other actions files are included as well with differing levels of filtering and blocking, e.g. basic.action

  • The default.filter file can be used to re-write the raw +> (the filter file) can be used to re-write the raw page content, including viewable text as well as embedded HTML and JavaScript, - and whatever else lurks on any given web page. + and whatever else lurks on any given web page. The filtering jobs are only + pre-defined here; whether to apply them or not is up to the actions file.

  • All files use the "#" character to denote a + comment (the rest of the line will be ignored) and understand line continuation + through placing a backslash ("\") as the very last character + in a line. If the # is preceded by a backslash, it looses + its special function. Placing a # in front of an otherwise + valid configuration line to prevent it from being interpreted is called "commenting + out" that line.

    default.actiondefault.filter - can use Perl style regular expressions for maximum flexibility. All files use - the "#" character to denote a comment. Such - lines are not processed by Privoxy. After - making any changes, there is no need to restart + can use Perl style regular expressions for + maximum flexibility.

    After making any changes, there is no need to restart PrivoxyPrivoxy should detect such changes - automatically.

    detects such changes + automatically. Note, however, that it may take one or two additional + requests for the change to take effect. When changing the listening address + of Privoxy, these "wake up" requests + must obviously be sent to the old listening address.

    While under development, the configuration content is subject to change. The below documentation may not be accurate by the time you read this. @@ -298,7 +339,7 @@ CLASS="SECT2" >

    5.3. The Main Configuration File

      blockfile blocklist.iniconfdir /etc/privoxy
       

    +>

    Indicates that the blockfile is named "blocklist.ini". (A - default installation does not use this.)

    A "#" indicates a comment. Any part of a - line following a " Assigns the value #" is ignored, except if - the "/etc/privoxy to the option + #" is preceded by a - confdir and thus indicates that the configuration + directory is named "\""/etc/privoxy/".

    Thus, by placing a " All options in the config file except for #" at the start of an - existing configuration line, you can make it a comment and it will be treated - as if it weren't there. This is called "commenting out" an - option and can be useful to turn off features: If you comment out the - "logfile" line, Privoxy will not - log to a file at all. Watch for the "default:" section in each - explanation to see what happens if the option is left unset (or commented - out).

    Long lines can be continued on the next line by using a - "confdir and + \" as the very last character.

    logdir are optional. Watch out in the below description + for what happens if you leave them unset.

    There are various aspects of The main config file controls all aspects of Privoxy behavior - that can be tuned.

    's + operation that are not location dependent (i.e. they apply universally, no matter + where you may be surfing).

    5.3.1. Defining Other Configuration Files5.3.1. Configuration and Log File Locations

    Privoxy can use a number of other files to tell it - what ads to block, what cookies to accept, and perform other functions. This - section of the configuration file tells can (and normally does) use a number of + other files for additional configuration and logging. + This section of the configuration file tells Privoxy - where to find all those other files.

    5.3.1.1. confdir

    On Windows and AmigaOS, - Privoxy looks for these files in the same - directory as the executable. On Unix and OS/2, -

    Specifies:

    The directory where the other configuration files are located

    Type of value:

    Path name

    Default value:

    /etc/privoxy (Unix) or Privoxy looks for these files in the current - working directory. In either case, an absolute path name can be used to - avoid problems.

    installation dir (Windows)

    Effect if unset:

    Mandatory

    Notes:

    No trailing "/", please +

    When development goes modular and multi-user, the blocker, filter, and - per-user config will be stored in subdirectories of When development goes modular and multi-user, the blocker, filter, and + per-user config will be stored in subdirectories of "confdir". - For now, only confdir/templates is used for storing HTML - templates for CGI results.

    The location of the configuration files:

    , where the HTML templates for CGI + output reside (e.g. Privoxy's 404 error page). +

    5.3.1.2. logdir

      confdir /etc/privoxy       # No trailing /, please.
    -   

    -

    Specifies:

    The directory where all logging (i.e. The directory where all logging takes place (i.e. where logfile and - jarfile) takes place. No trailing - are located) +

    Type of value:

    Path name

    Default value:

    /var/log/privoxy (Unix) or Privoxy installation dir (Windows)

    Effect if unset:

    Mandatory

    Notes:

    No trailing "/", please:

    , please +

    5.3.1.3. actionsfile

    Specifies:

    The actions file to use +

    Type of value:

    File name, relative to

      logdir /var/log/privoxy
    -   

    - confdir

    Default value:

    default.action (Unix) or default.action.txt (Windows)

    Effect if unset:

    Note that all file specifications below are relative to - the above two directories!

    No action is taken at all. Simple neutral proxying. +

    Notes:

    The "default.action" file contains patterns to specify the - actions to apply to requests for each site. Default: Cookies to and from all - destinations are kept only during the current browser session (i.e. they are - not saved to disk). Pop-ups are disabled for all sites. All sites are - filtered through selected sections of "default.filter". No sites - are blocked. There is no point in using Privoxy displays a checkboard type - pattern for filtered ads and other images. The syntax of this file is - explained in detail below. Other - "actions" files are included, and you are free to use any of - them. They have varying degrees of aggressiveness.

    without + an actions file. There are three different actions files included in the + distribution, with varying degrees of aggressiveness: + default.action, intermediate.action and + advanced.action. +

    5.3.1.4. filterfile

    Specifies:

    The filter file to use +

    Type of value:

    File name, relative to

      actionsfile default.action
    -   

    - confdir

    Default value:

    default.filter (Unix) or default.filter.txt (Windows)

    Effect if unset:

    No textual content filtering takes place, i.e. all + +filter{name} + actions in the actions file are turned off +

    Notes:

    The The "default.filter" file contains content modification rules - that use "regular expressions". These rules permit powerful - changes on the content of Web pages, e.g., you could disable your favorite - JavaScript annoyances, re-write the actual displayed text, or just have some - fun replacing "Microsoft" with "MicroSuck" wherever - it appears on a Web page. Default: whatever the developers are playing with - :-/

    5.3.1.5. logfile

    Specifies:

    Filtering requires buffering the page content, which may appear to slow down - page rendering since nothing is displayed until all content has passed - the filters. (It does not really take longer, but seems that way since - the page is not incrementally displayed.) This effect will be more noticeable - on slower connections.

    The log file to use +

    Type of value:

    File name, relative to

      filterfile default.filter
    -   

    - logdir

    Default value:

    The logfile is where all logging and error messages are written. The logfile - can be useful for tracking down a problem with - logfile (Unix) or privoxy.log (Windows)

    Effect if unset:

    No log file is used, all log messages go to the console (stderr). +

    Notes:

    The windows version will additionally log to the console. +

    The logfile is where all logging and error messages are written. The level + of detail and number of messages are set with the debug + option (see below). The logfile can be useful for tracking down a problem with + Privoxy (e.g., it's not blocking an ad you - think it should block) but in most cases you probably will never look at it.

    Your logfile will grow indefinitely, and you will probably want to - periodically remove it. On Unix systems, you can do this with a cron job - (see Your logfile will grow indefinitely, and you will probably want to + periodically remove it. On Unix systems, you can do this with a cron job + (see "man cron"). For Redhat, a ). For Red Hat, a logrotate - script has been included.

    On SuSE Linux systems, you can place a line like On SuSE Linux systems, you can place a line like "/var/log/privoxy.* - +1024k 644 nobody.nogroup" in /etc/logfiles, with - the effect that cron.daily will automatically archive, gzip, and empty the - log, when it exceeds 1M size.

    5.3.1.6. jarfile

    Default: Log to the a file named logfile. - Comment out to disable logging.

    Specifies:

    The file to store intercepted cookies in +

    Type of value:

    File name, relative to

      logfile logfile
    -   

    - logdir

    Default value:

    The "jarfile" defines where - Privoxy stores the cookies it intercepts. Note - that if you use a "jarfile", it may grow quite large. Default: - Don't store intercepted cookies.

    jarfile (Unix) or privoxy.jar (Windows)

    Effect if unset:

    Intercepted cookies are not stored at all. +

    Notes:

    The jarfile may grow to ridiculous sizes over time. +

    5.3.1.7. trustfile

      #jarfile jarfile
    -   

    -

    Specifies:

    If you specify a "trustfile", - Privoxy will only allow access to sites that - are named in the trustfile. You can also mark sites as trusted referrers, - with the effect that access to untrusted sites will be granted, if a link - from a trusted referrer was used. The link target will then be added to the - "trustfile". This is a very restrictive feature that typical - users most probably want to leave disabled. Default: Disabled, don't use the - trust mechanism.

    The trust file to use +

    Type of value:

    File name, relative to

      #trustfile trust
    -   

    - confdir

    Default value:

    Unset (commented out). When activated: trust (Unix) or trust.txt (Windows)

    Effect if unset:

    The whole trust mechanism is turned off. +

    Notes:

    The trust mechanism is an experimental feature for building white-lists and should + be used with care. It is NOT recommended for the casual user. +

    If you use the trust mechanism, it is a good idea to write up some on-line - documentation about your blocking policy and to specify the URL(s) here. They - will appear on the page that your users receive when they try to access - untrusted content. Use multiple times for multiple URLs. Default: Don't - display links on the If you specify a trust file, Privoxy will only allow + access to sites that are named in the trustfile. + You can also mark sites as trusted referrers (with +), with + the effect that access to untrusted sites will be granted, if a link from a + trusted referrer was used. + The link target will then be added to the "untrusted" info page.

    "trustfile". + Possible applications include limiting Internet access for children. +

    If you use

      trust-info-url http://www.example.com/why_we_block.html
    -  trust-info-url http://www.example.com/what_we_allow.html
    -   

    -

    +
    operator in the trust file, it may grow considerably over time. +

    5.3.2. Other Configuration Options5.3.2. Local Set-up Documentation

    This part of the configuration file contains options that control how - If you intend to operate Privoxy operates.

    for more users + that just yourself, it might be a good idea to let them know how to reach + you, what you block and why you do that, your policies etc. +

    5.3.2.1. trust-info-url

    "Admin-address" should be set to the email address of the proxy - administrator. It is used in many of the proxy-generated pages. Default: - fill@me.in.please.

    Specifies:

    A URL to be displayed in the error page that users will see if access to an untrusted page is denied. +

    Type of value:

    URL

    Default value:

    Two example URL are provided

    Effect if unset:

    No links are displayed on the "untrusted" error page. +

    Notes:

    The value of this option only matters if the experimental trust mechanism has been + activated. (See

      #admin-address fill@me.in.please
    -   

    - trustfile above.) +

    If you use the trust mechanism, it is a good idea to write up some on-line + documentation about your trust policy and to specify the URL(s) here. + Use multiple times for multiple URLs. +

    The URL(s) should be added to the trustfile as well, so users don't end up + locked out from the information on why they were locked out in the first place! +

    5.3.2.2. admin-address

    Specifies:

    "Proxy-info-url" can be set to a URL that contains more info - about this Privoxy installation, it's - configuration and policies. It is used in many of the proxy-generated pages - and its use is highly recommended in multi-user installations, since your - users will want to know why certain content is blocked or modified. Default: - Don't show a link to on-line documentation.

    An email address to reach the proxy administrator. +

    Type of value:

      Email address

    Default value:

    proxy-info-url http://www.example.com/proxy.html
    -   

    - Unset

    Effect if unset:

    "Listen-address" specifies the address and port where - Privoxy will listen for connections from your - Web browser. The default is to listen on the localhost port 8118, and - this is suitable for most users. (In your web browser, under proxy - configuration, list the proxy server as "localhost" and the - port as "8118").

    No email address is displayed on error pages and the CGI user interface. +

    Notes:

    If you already have another service running on port 8118, or if you want to - serve requests from other machines (e.g. on your local network) as well, you - will need to override the default. The syntax is - "listen-address [<ip-address>]:<port>". If you leave - out the IP address, Privoxy will bind to all - interfaces (addresses) on your machine and may become reachable from the - Internet. In that case, consider using access control lists (acl's) (see - "aclfile" above), or a firewall.

    If both admin-address and proxy-info-url + are unset, the whole "Local Privoxy Support" box on all generated pages will + not be shown. +

    5.3.2.3. proxy-info-url

    Specifies:

    For example, suppose you are running A URL to documentation about the local Privoxy on - a machine which has the address 192.168.0.1 on your local private network - (192.168.0.0) and has another outside connection with a different address. - You want it to serve requests from inside only:

    setup, + configuration or policies. +

    Type of value:

      URL

    Default value:

    listen-address 192.168.0.1:8118
    -   

    - Unset

    Effect if unset:

    If you want it to listen on all addresses (including the outside - connection):

    No link to local documentation is displayed on error pages and the CGI user interface. +

    Notes:

    If both

      listen-address :8118
    -   

    -

    If you do this, consider using ACLs (see "aclfile" above). Note: - you will need to point your browser(s) to the address and port that you have - configured here. Default: localhost:8118 (127.0.0.1:8118).

    admin-address
    and proxy-info-url + are unset, the whole "Local Privoxy Support" box on all generated pages will + not be shown. +

    The debug option sets the level of debugging information to log in the - logfile (and to the console in the Windows version). A debug level of 1 is - informative because it will show you each request as it happens. Higher - levels of debug are probably only of interest to developers.

    This URL shouldn't be blocked ;-) +

    5.3.3. Debugging

    These options are mainly useful when tracing a problem. + Note that you might also want to invoke + Privoxy with the

      debug         1 # GPC   = show each GET/POST/CONNECT request
    -  debug         2 # CONN  = show each connection status
    -  debug         4 # IO    = show I/O status
    -  debug         8 # HDR   = show header parsing
    -  debug        16 # LOG   = log all data into the logfile
    -  debug        32 # FRC   = debug force feature
    -  debug        64 # REF   = debug regular expression filter 
    -  debug       128 #       = debug fast redirects
    -  debug       256 #       = debug GIF de-animation
    -  debug       512 # CLF   = Common Log Format
    -  debug      1024 #       = debug kill pop-ups
    -  debug      4096 # INFO  = Startup banner and warnings.
    -  debug      8192 # ERROR = Non-fatal errors
    -    

    --no-daemon -

    5.3.3.1. debug

    Specifies:

    Key values that determine what information gets logged. +

    Type of value:

    Integer values

    Default value:

    12289 (i.e.: URLs plus informational and warning messages)

    Effect if unset:

    Nothing gets logged. +

    Notes:

    The available debug levels are: +

      debug         1 # show each GET/POST/CONNECT request
    +  debug         2 # show each connection status
    +  debug         4 # show I/O status
    +  debug         8 # show header parsing
    +  debug        16 # log all data into the logfile
    +  debug        32 # debug force feature
    +  debug        64 # debug regular expression filter 
    +  debug       128 # debug fast redirects
    +  debug       256 # debug GIF de-animation
    +  debug       512 # Common Log Format
    +  debug      1024 # debug kill pop-ups
    +  debug      4096 # Startup banner and warnings.
    +  debug      8192 # Non-fatal errors
    +    
    +

    To select multiple debug levels, you can either add them or use + multiple debug lines. +

    It is A debug level of 1 is informative because it will show you each request + as it happens. highly recommended that you enable ERROR - reporting (debug 8192), at least until v3.0 is released.

    1, 4096 and 8192 are highly recommended + so that you will notice when things go wrong. The other levels are probably + only of interest if you are hunting down a specific problem. They can produce + a hell of an output (especially 16). + +

    The reporting of FATAL errors (i.e. ones which crash - The reporting of fatal errors (i.e. ones which crash + Privoxy) is always on and cannot be disabled.

    ) is always on and cannot be disabled. +

    If you want to use CLF (Common Log Format), you should set If you want to use CLF (Common Log Format), you should set "debug - 512" ONLY, do not enable anything else.

    Multiple "debug" directives, are OK - they're logical-OR'd - together.

       debug 15 # same as setting the first 4 listed above
    -   

    - ONLY and not enable anything else. +

    5.3.3.2. single-threaded

    Specifies:

    Default:

    Whether to run only one server thread +

    Type of value:

      debug 1 # URLs
    -  debug 4096 # Info
    -  None

    Default value:

    debug 8192 # Errors - *we highly recommended enabling this*
    -   

    - Unset

    Effect if unset:

    Privoxy normally uses - "multi-threading", a software technique that permits it to - handle many different requests simultaneously. In some cases you may wish to - disable this -- particularly if you're trying to debug a problem. The - "single-threaded" option forces - Privoxy to handle requests sequentially. - Default: Multi-threaded mode.

    Multi-threaded (or, where unavailable: forked) operation, i.e. the ability to + serve multiple requests simultaneously. +

    Notes:

       This option is only there for debug purposes and you should never + need to use it. #single-threaded
    -   

    -

    "toggle" allows you to temporarily disable all - Privoxy's filtering. Just set "toggle - 0".

    The Windows version of Privoxy puts an icon in - the system tray, which also allows you to change this option. If you - right-click on that icon (or select the "Options" menu), one - choice is "Enable". Clicking on enable toggles - Privoxy on and off. This is useful if you want - to temporarily disable Privoxy, e.g., to access - a site that requires cookies which you would otherwise have blocked. This can also - be toggled via a web browser at the PrivoxyIt will drastically reduce performance. - internal address of http://p.p on - any platform.

    5.3.4. Access Control and Security

    "toggle 1" means Privoxy runs - normally, "toggle 0" means that - This section of the config file controls the security-relevant aspects + of Privoxy becomes a non-anonymizing non-blocking - proxy. Default: 1 (on).

    's configuration. +

    5.3.4.1. listen-address

      toggle 1
    -   

    -

    Specifies:

    For content filtering, i.e. the "+filter" and - "+deanimate-gif" actions, it is necessary that - The IP address and TCP port on which Privoxy buffers the entire document body. - This can be potentially dangerous, since a server could just keep sending - data indefinitely and wait for your RAM to exhaust. With nasty consequences.

    The buffer-limit option lets you set the maximum - size in Kbytes that each buffer may use. When the documents buffer exceeds - this size, it is flushed to the client unfiltered and no further attempt to - filter the rest of it is made. Remember that there may multiple threads - running, which might require increasing the "buffer-limit" - Kbytes each, unless you have enabled - "single-threaded" above.

      buffer-limit 4069
    -   

    - will + listen for client requests. +

    Type of value:

    [IP-Address]:Port

    To enable the web-based default.action file editor set - enable-edit-actions to 1, or 0 to disable. Note - that you must have compiled

    Default value:

    localhost:8118

    Effect if unset:

    Bind to localhost (127.0.0.1), port 8118. This is suitable and recommended for + home users who run Privoxy with - support for this feature, otherwise this option has no effect. This - internal page can be reached at http://p.p. -

    on the same machine as + their browser. +

    Notes:

    Security note: If this is enabled, anyone who can use the proxy - can edit the actions file, and their changes will affect all users. - For shared proxies, you probably want to disable this. Default: enabled.

    You will need to configure your browser(s) to this proxy address and port. +

      enable-edit-actions 1
    -   

    -

    If you already have another service running on port 8118, or if you want to + serve requests from other machines (e.g. on your local network) as well, you + will need to override the default. +

    Allow If you leave out the IP address, Privoxy to be toggled on and off - remotely, using your web browser. Set will + bind to all interfaces (addresses) on your machine and may become reachable + from the Internet. In that case, consider using access control lists (acl's) + (see "enable-remote-toggle"to - 1 to enable, and 0 to disable. Note that you must have compiled - "ACLs" below), or a firewall. +

    Example:

    Suppose you are running Privoxy with support for this feature, - otherwise this option has no effect.

    Security note: If this is enabled, anyone who can use the proxy can toggle - it on or off (see http://p.p), and - their changes will affect all users. For shared proxies, you probably want to - disable this. Default: enabled.

      enable-remote-toggle 1
    -   

    -

    5.3.3. Access Control List (ACL)

    Access controls are included at the request of some ISPs and systems - administrators, and are not usually needed by individual users. Please note - the warnings in the FAQ that this proxy is not intended to be a substitute - for a firewall or to encourage anyone to defer addressing basic security - weaknesses.

    If no access settings are specified, the proxy talks to anyone that - connects. If any access settings file are specified, then the proxy - talks only to IP addresses permitted somewhere in this file and not - denied later in this file.

    Summary -- if using an ACL:

    Client must have permission to receive service. -

    on + a machine which has the address 192.168.0.1 on your local private network + (192.168.0.0) and has another outside connection with a different address. + You want it to serve requests from inside only: +

      listen-address  192.168.0.1:8118
    +    
    LAST match in ACL wins. -
    +

    5.3.4.2. toggle

    Specifies:

    Default behavior is to deny service. -
    Initial state of "toggle" status +

    Type of value:

    1 or 0

    Default value:

    1

    Effect if unset:

    Act as if toggled on +

    Notes:

    If set to 0, Privoxy will start in + "toggled off" mode, i.e. behave like a normal, content-neutral + proxy. See enable-remote-toggle + below. This is not really useful anymore, since toggling is much easier + via the web + interface then via editing the conf file. +

    The syntax for an entry in the Access Control List is:

    The windows version will only display the toggle icon in the system tray + if this option is present. +

    5.3.4.3. enable-remote-toggle

      ACTION    SRC_ADDR[/SRC_MASKLEN]    [ DST_ADDR[/DST_MASKLEN] ]
    -   

    -

    Specifies:

    Whether or not the web-based toggle + feature may be used +

    Type of value:

    0 or 1

    Default value:

    1

    Effect if unset:

    The web-based toggle feature is disabled. +

    Notes:

    Where the individual fields are:

    When toggled off, Privoxy acts like a normal, + content-neutral proxy, i.e. it acts as if none of the actions applied to + any URL. +

      For the time being, access to the toggle feature can ACTION      = "permit-access" or not be + controlled separately by "deny-access"
    -
    SRC_ADDR    = client hostname or dotted IP address
    SRC_MASKLEN = number of bits in the subnet mask for the source
    -
    DST_ADDR    = server or forwarder hostname or dotted IP address
    DST_MASKLEN = number of bits in the subnet mask for the target
    -   

    -

    - The field separator (FS) is whitespace (space or tab).

    IMPORTANT NOTE: If "ACLs" or HTTP authentication, + so that everybody who can access Privoxy is using a - forwarder (see below) or a gateway for a particular destination URL, the - (see + "ACLs" and DST_ADDR that is examined is the address of the forwarder - or the gateway and listen-address above) can + toggle it for all users. So this option is NOT the address of the ultimate - target. This is necessary because it may be impossible for the local - not recommended + for multi-user environments with untrusted users. +

    Note that you must have compiled Privoxy to determine the address of the - ultimate target (that's often what gateways are used for).

    with + support for this feature, otherwise this option has no effect. +

    5.3.4.4. enable-edit-actions

    Here are a few examples to show how the ACL features work:

    Specifies:

    Whether or not the web-based actions + file editor may be used +

    Type of value:

    0 or 1

    Default value:

    1

    Effect if unset:

    The web-based actions file editor is disabled. +

    Notes:

    "localhost" is OK -- no DST_ADDR implies that - For the time being, access to the editor can ALL destination addresses are OK:

    not be + controlled separately by "ACLs" or HTTP authentication, + so that everybody who can access Privoxy (see + "ACLs" and

      listen-address above) can + modify its configuration for all users. So this option is permit-access localhost
    -   

    -

    not + recommended for multi-user environments with untrusted users. +

    A silly example to illustrate permitting any host on the class-C subnet with - Note that you must have compiled Privoxy to go anywhere:

    with + support for this feature, otherwise this option has no effect. +

    5.3.4.5. ACLs: permit-access and deny-access

      permit-access www.privoxy.com/24
    -   

    -

    Specifies:

    Except deny one particular IP address from using it at all:

    Who can access what. +

    Type of value:

    src_addr[/src_masklen] + [dst_addr[/dst_masklen]] +

       Where src_addr and + dst_addr are IP addresses in dotted decimal notation or valid + DNS names, and src_masklen and + dst_masklen are subnet masks in CIDR notation, i.e. integer + values from 2 to 30 representing the length (in bits) of the network address. The masks and the whole + destination part are optional. +

    Default value:

    deny-access ident.privoxy.com
    -   

    - Unset

    Effect if unset:

    You can also specify an explicit network address and subnet mask. - Explicit addresses do not have to be resolved to be used.

    Don't restrict access further than implied by

      listen-address +

    Notes:

    Access controls are included at the request of ISPs and systems + administrators, and permit-access 207.153.200.0/24
    -   

    -

    are not usually needed by individual users. + For a typical home user, it will normally suffice to ensure that + Privoxy only listens on the localhost or internal (home) + network address by means of the listen-address option. +

    Please see the warnings in the FAQ that this proxy is not intended to be a substitute + for a firewall or to encourage anyone to defer addressing basic security + weaknesses. +

    A subnet mask of 0 matches anything, so the next line permits everyone.

    Multiple ACL lines are OK. + If any ACLs are specified, then the Privoxy + talks only to IP addresses that match at least one permit-access line + and don't match any subsequent deny-access line. In other words, the + last match wins, with the default being deny-access. +

    If Privoxy is using a forwarder (see

      forward below) + for a particular destination URL, the dst_addr + that is examined is the address of the forwarder and permit-access 0.0.0.0/0
    -   

    -

    NOT the address + of the ultimate target. This is necessary because it may be impossible for the local + Privoxy to determine the IP address of the + ultimate target (that's often what gateways are used for). +

    Note, you You should prefer using IP addresses over DNS names, because the address lookups take + time. All DNS names must resolve! You can cannot say:

    not use domain patterns + like "*.org" or partial domain names. If a DNS name resolves to multiple + IP addresses, only the first one is used. +

    Denying access to particular sites by ACL may have undesired side effects + if the site in question is hosted on a machine which also hosts other sites. +

    Examples:

    Explicitly define the default behavior if no ACL and +

      permit-access .org
    -   

    - listen-address are set: "localhost" + is OK. The absence of a dst_addr implies that + all destination addresses are OK: +

      permit-access  localhost
    +    
    +

    Allow any host on the same class C subnet as www.privoxy.org access to + nothing but www.example.com: +

      permit-access  www.privoxy.org/24 www.example.com/32
    +    
    +

    Allow access from any host on the 26-bit subnet 192.168.45.64 to anywhere, + with the exception that 192.168.45.73 may not access www.dirty-stuff.example.com: +

      permit-access  192.168.45.64/26
    +  deny-access    192.168.45.73    www.dirty-stuff.example.com
    +    
    +

    5.3.4.6. buffer-limit

    Specifies:

    to allow all *.org domains. Every IP address listed must resolve fully.

    Maximum size of the buffer for content filtering. +

    Type of value:

    Size in Kbytes

    Default value:

    4096

    Effect if unset:

    Use a 4MB (4096 KB) limit. +

    Notes:

    An ISP may want to provide a For content filtering, i.e. the +filter and + +deanimate-gif actions, it is necessary that + Privoxy that is - accessible by "the world" and yet restrict use of some of their - private content to hosts on its internal network (i.e. its own subscribers). - Say, for instance the ISP owns the Class-B IP address block 123.124.0.0 (a 16 - bit netmask). This is how they could do it:

    buffers the entire document body. + This can be potentially dangerous, since a server could just keep sending + data indefinitely and wait for your RAM to exhaust -- with nasty consequences. + Hence this option. +

    When a document buffer size reaches the

     permit-access 0.0.0.0/0 0.0.0.0/0   # other clients can go anywhere 
    -                                       # with the following exceptions:

    deny-access   0.0.0.0/0   123.124.0.0/16 # block all external requests for
    -                                          # sites on the ISP's network
    -
    permit 0.0.0.0/0 www.my_isp.com        # except for the ISP's main 
    -                                          # web site
    -
    buffer-limit
    , it is + flushed to the client unfiltered and no further attempt to + filter the rest of the document is made. Remember that there may be multiple threads + running, which might require up to buffer-limit Kbytes + permit 123.124.0.0/16 0.0.0.0/0          # the ISP's clients can go 
    -                                          # anywhere
    -   

    -

    Note that if some hostnames are listed with multiple IP addresses, - the primary value returned by DNS (via gethostbyname()) is used. Default: - Anyone can access the proxy.

    each, unless you have enabled "single-threaded" + above. +

    5.3.4. Forwarding5.3.5. Forwarding

    This feature allows chaining of HTTP requests via multiple proxies. +> This feature allows routing of HTTP requests through a chain of + multiple proxies. It can be used to better protect privacy and confidentiality when accessing specific domains by routing requests to those domains - to a special purpose filtering proxy such as lpwa.com. Or to use - a caching proxy to speed up browsing.

    It can also be used in an environment with multiple networks to route - requests via multiple gateways allowing transparent access to multiple - networks without having to modify browser configurations.

    http://www.multiproxy.org/anon_list.htm) + Or to use a caching proxy to speed up browsing. Or chaining to a parent + proxy may be necessary because the machine that Privoxy + runs on has no direct Internet access.

    Also specified here are SOCKS proxies. Privoxy - SOCKS 4 and SOCKS 4A. The difference is that SOCKS 4A will resolve the target - hostname using DNS on the SOCKS server, not our local DNS client.

    The syntax of each line is:

    5.3.5.1. forward

     forward target_domain[:port] http_proxy_host[:port]
    forward-socks4 target_domain[:port] socks_proxy_host[:port] http_proxy_host[:port]
    forward-socks4a target_domain[:port] socks_proxy_host[:port] http_proxy_host[:port]
    -   

    -

    Specifies:

    To which parent HTTP proxy specific requests should be routed. +

    Type of value:

    target_domain[:port] + http_parent[/port] +

    If http_proxy_host is Where target_domain is a domain name pattern (see the + chapter on domain matching in the actions file), + http_parent is the address of the parent HTTP proxy + as an IP addresses in dotted decimal notation or as a valid DNS name (or ".", then requests are not forwarded to a - HTTP proxy but are made directly to the web servers.

    Lines are checked in sequence, and the last match wins.

    There is an implicit line equivalent to the following, which specifies that - anything not finding a match on the list is to go out without forwarding - or gateway protocol, like so:

      forward .* . # implicit
    -   

    -

    In the following common configuration, everything goes to Lucent's LPWA, - except SSL on port 443 (which it doesn't handle):

    to denote + "no forwarding", and the optional + port parameters are TCP ports, i.e. integer + values from 1 to 64535 +

    Default value:

     forward .* lpwa.com:8000
    forward :443 .
    -   

    - Unset

    Effect if unset:

    - Some users have reported difficulties related to LPWA's use of - Don't use parent HTTP proxies. +

    Notes:

    If http_parent is "." as the last element of the domain, and have said that this - can be fixed with this:

    , then requests are not + forwarded to another HTTP proxy but are made directly to the web servers. +

      forward lpwa. lpwa.com:8000
    -   

    -

    Multiple lines are OK, they are checked in sequence, and the last match wins. +

    Examples:

    (NOTE: the syntax for specifying target_domain has changed since the - previous paragraph was written -- it will not work now. More information - is welcome.)

    Everything goes to an example anonymizing proxy, except SSL on port 443 (which it doesn't handle): +

    In this fictitious example, everything goes via an ISP's caching proxy, - except requests to that ISP:

      forward   .*     anon-proxy.example.org:8080
    +  forward   :443   .
    +    
    +

     forward .* caching.myisp.net:8000
    forward myisp.net .
    -   

    -

    Everything goes to our example ISP's caching proxy, except for requests + to that ISP's sites: +

    For the @home network, we're told the forwarding configuration is this:

      forward   .*.                caching-proxy.example-isp.net:8000
    +  forward   .example-isp.net   .
    +    
    +

    5.3.5.2. forward-socks4 and forward-socks4a

      forward .* proxy:8080
    -   

    -

    Specifies:

    Also, we're told they insist on getting cookies and JavaScript, so you should - allow cookies from home.com. We consider JavaScript a potential security risk. - Java need not be enabled.

    Through which SOCKS proxy (and to which parent HTTP proxy) specific requests should be routed. +

    Type of value:

    target_domain[:port] + socks_proxy[/port] + http_parent[/port] +

    In this example direct connections are made to all "internal" Where target_domain is a domain name pattern (see the + chapter on domain matching in the actions file), + http_parent and socks_proxy + are IP addresses in dotted decimal notation or valid DNS names (http_parent - domains, but everything else goes through Lucent's LPWA by way of the - company's SOCKS gateway to the Internet.

    "." to denote "no HTTP forwarding"), and the optional + port parameters are TCP ports, i.e. integer values from 1 to 64535 +

    Default value:

     forward-socks4 .* lpwa.com:8000 firewall.my_company.com:1080
    forward my_company.com .
    -   

    - Unset

    Effect if unset:

    Don't use SOCKS proxies. +

    Notes:

    This is how you could set up a site that always uses SOCKS but no forwarders:

    Multiple lines are OK, they are checked in sequence, and the last match wins. +

    The difference between

      forward-socks4a .* . firewall.my_company.com:1080
    -   

    -

    forward-socks4
    and forward-socks4a + is that in the SOCKS 4A protocol, the DNS resolution of the target hostname happens on the SOCKS + server, while in SOCKS 4 it happens locally. +

    An advanced example for network administrators:

    If http_parent is ".", then requests are not + forwarded to another HTTP proxy but are made (HTTP-wise) directly to the web servers, albeit through + a SOCKS proxy. +

    Examples:

    From the company example.com, direct connections are made to all + "internal" domains, but everything outbound goes through + their ISP's proxy by way of example.com's corporate SOCKS 4A gateway to + the Internet. +

      forward-socks4a   .*.            socks-gw.example.com:1080  www-cache.example-isp.net:8080
    +  forward           .example.com   .
    +    
    +

    If you have links to multiple ISPs that provide various special content to - their subscribers, you can configure forwarding to pass requests to the - specific host that's connected to that ISP so that everybody can see all - of the content on all of the ISPs.

    A rule that uses a SOCKS 4 gateway for all destinations but no HTTP parent looks like this: +

    This is a bit tricky, but here's an example:

      forward-socks4   .*.            socks-gw.example.com:1080  .
    +    
    +

    5.3.5.3. Advanced Forwarding Examples

    host-a has a PPP connection to isp-a.com. And host-b has a PPP connection to - isp-b.com. host-a can run a If you have links to multiple ISPs that provide various special content + only to their subscribers, you can configure multiple Privoxy proxy with - forwarding like this:

     forward .* .
    Privoxies + which have connections to the respective ISPs to act as forwarders to each other, so that + forward isp-b.com host-b:8118
    -   

    -

    your users can see the internal content of all ISPs.

    host-b can run a Assume that host-a has a PPP connection to isp-a.net. And host-b has a PPP connection to + isp-b.net. Both run Privoxy proxy with forwarding - like this:

    . Their forwarding + configuration can look like this:

     forward .* .
    forward isp-a.com host-a:8118
    -   

    -

    host-a:

    Now, anyone on the Internet (including users on host-a - and host-b) can set their browser's proxy to either - host-a or host-b and be able to browse the content on isp-a or isp-b.

      forward    .*.         .
    +  forward    .isp-b.net  host-b:8118
    + 

    Here's another practical example, for University of Kent at - Canterbury students with a network connection in their room, who - need to use the University's Squid web cache.

    host-b:

     forward *. ssbcache.ukc.ac.uk:3128  # Use the proxy, except for:
    forward .ukc.ac.uk .  # Anything on the same domain as us
    forward * .  # Host with no domain specified
    forward 129.12.*.* .  # A dotted IP on our /16 network.
    forward 127.*.*.* .  # Loopback address
    forward localhost.localdomain .  # Loopback address
    forward www.ukc.mirror.ac.uk .  # Specific host
    -   

    -
      forward    .*.         .
    +  forward    .isp-a.net  host-a:8118
    + 

    Now, your users can set their browser's proxy to use either + host-a or host-b and be able to browse the internal content + of both isp-a and isp-b.

    If you intend to chain Privoxybrowser -> squid -> privoxy is the recommended way.

    Your squid configuration could then look like this (assuming that the IP -address of the box is 192.168.0.1 ):

    Assuming that Privoxy and squid + run on the same box, your squid configuration could then look like this:

      # Define Privoxy as parent cache 
    -  
    -  cache_peer 192.168.0.1 parent 8118 0 no-query
    -
    -  # don't listen to the whole world
    -  http_port 192.168.0.1:3128
    -
    -  # define the local lan
    -  acl mylocallan src 192.168.0.1-192.168.0.5/255.255.255.255
    -
    -  # grant access for http to local lan
    -  http_access allow mylocallan
    -  
    -  # Define ACL for protocol FTP 
    -  acl FTP proto FTP 
    -
    -  # Do not forward ACL FTP to privoxy
    -  always_direct allow FTP 
    -
    -  # Do not forward ACL CONNECT (https) to privoxy
    -  always_direct allow CONNECT 
    -
    -  # Forward the rest to privoxy
    -  never_direct allow all 
    -   

    -
      # Define Privoxy as parent proxy (without ICP) 
    +  cache_peer 127.0.0.1 parent 8118 7 no-query 
    +
    +  # Define ACL for protocol FTP 
    +  acl ftp proto FTP 
    +
    +  # Do not forward FTP requests to Privoxy
    +  always_direct allow ftp 
    +
    +  # Forward all the rest to Privoxy
    +  never_direct allow all 
    + 

    You would then need to change your browser's proxy settings to squid's address and port. + Squid normally uses port 3128. If unsure consult http_port in squid.conf.

    5.3.5. Windows GUI Options5.3.6. Windows GUI Options

    5.4. The Actions File

    The "default.action" file (formerly +> The actions file (default.action, formerly: actionsfilePrivoxy takes, and thus - determines how ad images, cookies and various other aspects of HTTP content - and transactions are handled. These can be accepted or rejected for all - sites, or just those sites you choose. See below for a complete list of - actions.

    takes for which + URLs, and thus determines how ad images, cookies and various other aspects + of HTTP content and transactions are handled on which sites (or even parts + thereof).

    Anything you want can blocked, including ads, banners, or just some obnoxious URL that you would rather not see. Cookies can be accepted or rejected, or - accepted only during the current browser session (i.e. not written to disk). - Changes to default.action should be immediately visible - to Privoxy without the need to restart.

    Note that some sites may misbehave, or possibly not work at all with some - actions. This may require some tinkering with the rules to get the most - mileage of Privoxy's features, and still be - able to see and enjoy just what you want to. There is no general rule of - thumb on these things. There just are too many variables, and sites are - always changing.

    An actions file typically has sections. At the top, "aliases" are + defined (discussed below), then the default set of rules which will apply + universally to all sites and pages. And then below that is generally a lengthy + set of exceptions to the defined universal policies.

    5.4.1. Finding the Right Mix

    Note that some actions like cookie suppression or script disabling may + render some sites unusable, which rely on these techniques to work properly. + Finding the right mix of actions is not easy and certainly a matter of personal + taste. In general, it can be said that the more "aggressive" + your default settings (in the top section of the actions file) are, + the more exceptions for "trusted" sites you will have to + make later. If, for example, you want to kill popup windows per default, you'll + have to make exceptions from that rule for sites that you regularly use + and that require popups for actually useful content, like maybe your bank, + favorite shop, or newspaper.

    We have tried to provide you with reasonable rules to start from in the + distribution actions file. But there is no general rule of thumb on these + things. There just are too many variables, and sites are constantly changing. + Sooner or later you will want to change the rules (and read this chapter).

    5.4.2. How to Edit

    The easiest way to edit the "actions" file is with a browser by - loading http://p.p/, and then select - http://config.privoxy.org/edit-actions.

    If you prefer plain text editing to GUIs, you can of course also directly edit the + default.action file.

    5.4.3. How Actions are Applied to URLs

    The actions file is divided into sections. There are special sections, + like the "Edit Actions List". A text editor can also be used.

    "alias" sections which will be discussed later. For now + let's concentrate on regular sections: They have a heading line (often split + up to multiple lines for readability) which consist of a list of actions, + separated by whitespace and enclosed in curly braces. Below that, there + is a list of URL patterns, each on a separate line.

    To determine which actions apply to a request, the URL of the request is compared to all patterns in this file. Every time it matches, the list of - applicable actions for the URL is incrementally updated. You can trace - this process by visiting

    You can trace this process by visiting http://p.p/show-url-info.

    http://config.privoxy.org/show-url-info.

    There are four types of lines in this file: comments (begin with a - "#" character), actions, aliases and patterns, all of which are - explained below, as well as the configuration file syntax that - Privoxy understands.

    More detail on this is provided in the Appendix, Anatomy of an Action.

    5.4.1. URL Domain and Path Syntax5.4.4. Patterns

    Generally, a pattern has the form <domain>/<path>, where both the - <domain> and <path> part are optional. If you only specify a - domain part, the "/" can be left out:

    www.example.com - is a domain only pattern and will match any request to - "www.example.com".

    Generally, a pattern has the form <domain>/<path>, + where both the <domain> and <path> + are optional. (This is why the pattern / matches all URLs).

    www.example.com/ - means exactly the same.

    www.example.com/

    www.example.com/index.html - matches only the single - document "/index.html" on "www.example.com".

    is a domain-only pattern and will match any request to www.example.com, + regardless of which document on that server is requested. +

    www.example.com

    /index.html - matches the document "/index.html", - regardless of the domain. So would match any page named "index.html" means exactly the same. For domain-only patterns, the trailing / may + be omitted. +

    www.example.com/index.html

    matches only the single document /index.html - on any site.

    www.example.com. +

    /index.html

    matches the document /index.html, regardless of the domain, + i.e. on index.html - matches nothing, since it would be - interpreted as a domain name and there is no top-level domain called - ".html".

    any web server. +

    index.html

    matches nothing, since it would be interpreted as a domain name and + there is no top-level domain called .html. +

    5.4.4.1. The Domain Pattern

    The matching of the domain part offers some flexible options: if the domain starts or ends with a dot, it becomes unanchored at that end. For example:

    .example.com - matches any domain or sub-domain that -

    .example.com

    matches any domain that ENDS in ".example.com".

    in + .example.com +

    www.

    www. - matches any domain that matches any domain that STARTS with - "www".

    www. +

    .example.

    matches any domain that CONTAINS .example. + (Correctly speaking: It matches any FQDN that contains example as a domain.) +

    Additionally, there are wild-cards that you can use in the domain names themselves. They work pretty similar to shell wild-cards: "?" stands for - any single character. And you can define character classes in square - brackets and they can be freely mixed:

    ad*.example.com - matches

    ad*.example.com

    matches "adserver.example.com", - "ads.example.com", etc but not "sfads.example.com".

    +

    *ad*.example.com

    *ad*.example.com - matches all of the above, and then some.

    matches all of the above, and then some. +

    .?pix.com

    .?pix.com - matches "www.ipix.com" matches www.ipix.com, - "pictures.epix.com", "a.b.c.d.e.upix.com", etc.

    pictures.epix.com, a.b.c.d.e.upix.com etc. +

    www[1-9a-ez].example.c*

    www[1-9a-ez].example.com - matches "www1.example.com" matches www1.example.com, - "www4.example.com", "wwwd.example.com"www4.example.cc, wwwd.example.cy, - "wwwz.example.com", etc., but wwwz.example.com etc., but not - "wwww.example.com".

    wwww.example.com. +

    5.4.4.2. The Path Pattern

    If Privoxy was compiled with - "pcre" support (the default), Perl compatible regular expressions - can be used. These are more flexible and powerful than other types - of "regular expressions". See the pcre/docs/ directory or "man - perlre" (also available on uses Perl compatible regular expressions + (through the http://www.perldoc.com/perl5.6/pod/perlre.html) - for details. A brief discussion of regular expressions is in the - PCRE library) for + matching the path.

    There is an Appendix. For instance:

    with a brief quick-start into regular + expressions, and full (very technical) documentation on PCRE regex syntax is available on-line + at http://www.pcre.org/man.txt. + You might also find the Perl man page on regular expressions (man perlre) + useful, which is available on-line at http://www.perldoc.com/perl5.6/pod/perlre.html.

    /.*/advert[0-9]+\.jpe?g - would match a URL from any - domain, with any path that includes Note that the path pattern is automatically left-anchored at the "advert" followed - immediately by one or more digits, then a "." and ending in - either "jpeg" or "jpg". So we match - "example.com/ads/advert2.jpg", and - "www.example.com/ads/banners/advert39.jpeg", but not - "/", + i.e. it matches as if it would start with a "www.example.com/ads/banners/advert39.gif" (no gifs in the - example pattern).

    "^".

    Please note that matching in the path is case +> Please also note that matching in the path is case INSENSITIVE"(?-i)" switch:

    www.example.com/(?-i)PaTtErN.* - will match only - documents whose path starts with "PaTtErN" switch: + www.example.com/(?-i)PaTtErN.* will match only + documents whose path starts with PaTtErN in exactly this capitalization.

    5.4.2. Actions5.4.5. Actions

    Actions are enabled if preceded with a "-". Actions are invoked by enclosing the - action name in curly braces (e.g. {+some_action}), followed by a list of - URLs to which the action applies. There are three classes of actions:

    . So a "+action" means + "do that action", e.g. "+block" means please + "block the following URLs and/or patterns". All actions are + disabled by default, until they are explicitly enabled somewhere in an actions + file.

    + Actions are invoked by enclosing the action name in curly braces (e.g. + {+some_action}), followed by a list of URLs (or patterns that match URLs) to + which the action applies. There are three classes of actions:

  • - Boolean (e.g. "+/-block"): -

    "on" or + "off". Examples: +

  • - parameterized (e.g. "+/-hide-user-agent"): +>"+/-hide-user-agent{ Mozilla 1.0 }", + where some value is required in order to enable this type of action. + Examples:

    {-name}         # disable action
    +>         # disable action ("parameter") can be omitted
         

  • - Multi-value (e.g. "{+/-add-header{Name: value}}", ot + "{+/-wafer{name=value}}"): +>), where some value needs to be defined + in addition to simply enabling the actino. Examples:

      {+name{param}}   # enable action and add parameter {+name{param=value}}   # enable action and set "param" to "value"
      {-name{param}}{-name{param=value}}
       # remove the parameter "param"
    +> completely
      {-name}          # disable this action totally
    +>                # disable this action totally and remove param too
         

    "actions" are:

    5.4.5.1. +add-header{Name: value}

    • Type:

      Multi-value.

      Typical uses:

      Send a user defined HTTP header to the web server. +

      Possible values:

      - Add the specified HTTP header, which is not checked for validity. - You may specify this many times to specify many different headers: -

      Any value is possible. Validity of the defined HTTP headers is not checked. +

      Example usage:

             +add-header{Name: value}{+add-header{X-User-Tracking: sucks}}
      -     

      - -

    • .example.com
      +    

      Notes:

      - Block this URL totally. In a default installation, a This action may be specified multiple times, in order to define multiple + headers. This is rarely needed for the typical user. If you don't know what + "blocked" - URL will result in bright red banner that says "HTTP headers" are, you definitely don't need to worry about this + one. +

  • 5.4.5.2. +block

    Type:

    Boolean.

    Typical uses:

    Used to block a URL from reaching your browser. The URL may be + anything, but is typically used to block ads or other obnoxious + content. +

    Possible values:

    N/A

    Example usage:

         {+block}
    +     .example.com
    +     .ads.r.us
    +    

    Notes:

    Privoxy will display its + special "BLOCKED", - with a reason why it is being blocked, and an option to see it anyway. - The page displayed for this is the page if a URL matches one of the + blocked patterns. If there is sufficient space, a large red + banner will appear with a friendly message about why the page + was blocked, and a way to go there anyway. If there is insufficient + space a smaller blocked page will appear without the red banner. + One exception is if the URL matches both "+block" + and "+image", then it can be handled by + "+image-blocker" (see below). +

    The "+filter" action can also perform some of the + same functionality as "+block", but by virtue of very + different programming techniques, and is typically used for different + reasons. +

    5.4.5.3. +deanimate-gifs

    Type:

    Parameterized.

    Typical uses:

    To stop those annoying, distracting animated GIF images. +

    Possible values:

    "last" or "blocked" template - file. -

    "first" +

    Example usage:

            +block{+deanimate-gifs{last}}
    -     

    - -

  • .example.com
    +    

  • Notes:

    - De-animate all animated GIF images, i.e. reduce them to their last frame. - This will also shrink the images considerably (in bytes, not pixels!). If - the option De-animate all animated GIF images, i.e. reduce them to their last frame. + This will also shrink the images considerably (in bytes, not pixels!). If + the option "first" is given, the first frame of the animation - is used as the replacement. If "last" is given, the last frame - of the animation is used instead, which probably makes more sense for most - banner animations, but also has the risk of not showing the entire last - frame (if it is only a delta to an earlier frame). -

    is given, the last + frame of the animation is used instead, which probably makes more sense for + most banner animations, but also has the risk of not showing the entire + last frame (if it is only a delta to an earlier frame). +

    5.4.5.4. +downgrade

    Type:

    Boolean.

    Typical uses:

    "+downgrade" will downgrade HTTP/1.1 client requests to + HTTP/1.0 and downgrade the responses as well. +

    Possible values:

    N/A +

    Example usage:

           +deanimate-gifs{last}{+downgrade}
    -  +deanimate-gifs{first}.example.com
    -     

    - -

  • Notes:

    Use this action for servers that use HTTP/1.1 protocol features that + Privoxy doesn't handle well yet. HTTP/1.1 is + only partially implemented. Default is not to downgrade requests. This is + an infrequently needed action, and is used to help with problem sites only. +

    5.4.5.5. +fast-redirects

    Type:

    Boolean.

    Typical uses:

    The "+downgrade" will downgrade HTTP/1.1 client requests to - HTTP/1.0 and downgrade the responses as well. Use this action for servers - that use HTTP/1.1 protocol features that - "+fast-redirects" action enables interception of + "redirect" requests from one server to another, which + are used to track users.Privoxy doesn't handle well yet. HTTP/1.1 - is only partially implemented. Default is not to downgrade requests. -

    can cut off + all but the last valid URL in redirect request and send a local redirect + back to your browser without contacting the intermediate site(s). +

    Possible values:

    N/A +

    Example usage:

           +downgrade{+fast-redirects}
    -     

    - -

  • .example.com
    +    

  • Notes:

    - Many sites, like yahoo.com, don't just link to other sites. Instead, they - will link to some script on their own server, giving the destination as a - parameter, which will then redirect you to the final target. URLs resulting - from this scheme typically look like: - http://some.place/some_script?http://some.where-else.

    Sometimes, there are even multiple consecutive redirects encoded in the - URL. These redirections via scripts make your web browsing more traceable, - since the server from which you follow such a link can see where you go to. - Apart from that, valuable bandwidth and time is wasted, while your browser - ask the server for one redirect after the other. Plus, it feeds the - advertisers. -

    The "+fast-redirects" option enables interception of these - types of requests by Privoxy, who will cut off - all but the last valid URL in the request and send a local redirect back to - your browser without contacting the intermediate site(s). -

    Sometimes, there are even multiple consecutive redirects encoded in the + URL. These redirections via scripts make your web browsing more traceable, + since the server from which you follow such a link can see where you go + to. Apart from that, valuable bandwidth and time is wasted, while your + browser ask the server for one redirect after the other. Plus, it feeds + the advertisers. +

       This is a normally on feature, and often requires exceptions for sites that + are sensitive to defeating this mechanism. +

    5.4.5.6. +fast-redirects
    -     

    -
    -

  • +filter
  • - Apply the filters in the section_header - section of the

    Type:

    Parameterized.

    Typical uses:

    Apply page filtering as defined by named sections of the + default.filter file to the site(s). - file to the specified site(s). + "Filtering" can be any modification of the raw + page content, including re-writing or deletion of content. +

    Possible values:

    "+filter" must include the name of one of the section identifiers + from default.filter sections are grouped according to like - functionality. Filters can be used to - re-write any of the raw page content. This is a potentially a - very powerful feature! -

      (or whatever + +filter{section_header}
    -     

    - -

    - Filter sections that are pre-defined in the supplied - filterfile is specified in config). +

    Example usage (from the current default.filter include: -

    ):

    html-annoyances+filter{html-annoyances}: Get rid of particularly annoying HTML abuse.
    js-annoyances+filter{js-annoyances}: Get rid of particularly annoying JavaScript abuse
    no-poups+filter{content-cookies}: Kill cookies that come in the HTML or JS content +

    +filter{popups}: Kill all popups in JS and HTML
    frameset-borders: Give frames a border +>+filter{frameset-borders}: Give frames a border and make them resizable
    webbugs+filter{webbugs}: Squish WebBugs (1x1 invisible GIFs used for user tracking)
    no-refresh: Automatic refresh sucks on auto-dialup lines +>+filter{refresh-tags}: Kill automatic refresh tags (for dial-on-demand setups)
    fun+filter{fun}: Text replacements for subversive browsing fun!
    nimda: Remove (virus) Nimda code. +>+filter{nimda}: Remove Nimda (virus) code. +

    +filter{banners-by-size}: Kill banners by size (very efficient!)
    banners-by-size: Kill banners by size +>+filter{shockwave-flash}: Kill embedded Shockwave Flash objects
    crude-parental+filter{crude-parental}: Kill all web pages that contain the words "sex" or "warez"

  • Notes:

    - Block any existing X-Forwarded-for header, and do not add a new one: -

    This is potentially a very powerful feature! And requires a knowledge + of regular expressions if you want to "roll your own". + Filtering operates on a line by line basis. +

       Filtering requires buffering the page content, which may appear to + slow down page rendering since nothing is displayed until all content has + passed the filters. (It does not really take longer, but seems that way + since the page is not incrementally displayed.) This effect will be more + noticeable on slower connections. +

    Filtering can achieve some of the effects as the "+block" + action, i.e. it can be used to block ads and banners. In the overall + scheme of things, filtering is one of the last things "Privoxy" + does with a web page. So other actions are applied first. +

    5.4.5.7. +hide-forwarded

    Type:

    Boolean.

    Typical uses:

    Block any existing X-Forwarded-for HTTP header, and do not add a new one. +

    Possible values:

    N/A +

    Example usage:

         {+hide-forwarded}
    -     

    - -

  • .example.com
    +    

  • Notes:

    - If the browser sends a It is fairly safe to leave this on. It does not seem to break many sites. +

    5.4.5.8. +hide-from

    Type:

    Parameterized.

    Typical uses:

    To block the browser from sending your email address in a "From:" header containing your e-mail - address, this either completely removes the header ( + header. +

    Possible values:

    Keyword: "block"), or - changes it to the specified e-mail address. -

    , or any user defined value. +

    Example usage:

           +hide-from{block}{+hide-from{block}}
    -  +hide-from{spam@sittingduck.xqq}.example.com
    -     

    - -

  • Notes:

    - Don't send the The keyword "block" will completely remove the header. + Alternately, you can specify any value you prefer to send to the web + server. +

    5.4.5.9. +hide-referer

    Type:

    Parameterized.

    Typical uses:

    Don't send the "Referer:" (sic) header to the web site. You - can block it, forge a URL to the same server as the request (which is - preferred because some sites will not send images otherwise) or set it to a - constant, user defined string of your choice. -

    (sic) HTTP header to the web site. + Or, alternately send a forged header instead. +

    Possible values:

    Prevent the header from being sent with the keyword, "block". + Or, "forge" a URL to one from the same server as the request. + Or, set to user defined value of your choice. +

    Example usage:

      +hide-referer{block}
    -       +hide-referer{forge}{+hide-referer{forge}}
    -  +hide-referer{http://nowhere.com}.example.com
    -     

    - -

  • Notes:

    "forge" is the preferred option here, since some servers will + not send images back otherwise. +

    - Alternative spelling of "+hide-referrer" is an alternate spelling of + "+hide-referer". It has the same - parameters, and can be freely mixed with, . It has the exact same parameters, and can be freely + mixed with, "+hide-referer". - (. ("referrer" is the correct English spelling, however the HTTP - specification has a bug - it requires it to be spelled is the + correct English spelling, however the HTTP specification has a bug - it + requires it to be spelled as "referer".)

    5.4.5.10. +hide-user-agent

    Type:

    Parameterized.

    Typical uses:

    To change the "User-Agent:" header so web servers can't tell + your browser type. Who's business is it anyway? +

    Possible values:

    Any user defined string. +

    Example usage:

           +hide-referrer{...}{+hide-user-agent{Netscape 6.1 (X11; I; Linux 2.4.18 i686)}}
    -     

    - -

  • .msn.com
    +    

  • Notes:

    Warning! This breaks many web sites that depend on this in order + to determine how the target browser will respond to various + requests. Use with caution. +

    5.4.5.11. +image

    - Change the "User-Agent:" header so web servers can't tell your - browser type. Warning! This breaks many web sites. Specify the - user-agent value you want. Example, pretend to be using Netscape on - Linux: -

    Type:

    Boolean.

    Typical uses:

    To define what Privoxy should treat + automatically as an image. +

    Possible values:

    N/A +

    Example usage:

           +hide-user-agent{Mozilla (X11; I; Linux 2.0.32 i586)}{+image}
    -     

    - -

  • /.*\.(gif|jpg|jpeg|png|bmp|ico)
    +    

  • Notes:

    - Treat this URL as an image. This only matters if it's also This only has meaning if the URL (or pattern) also is + "+block"ed, - in which case a ed, in which case a "blocked" image can be sent rather than a HTML page. - See image can + be sent rather than a HTML page. (See "+image-blocker{}" below for the control over what is actually sent. - If you want invisible ads, they should be defined as - images and blocked. And also, - "image-blocker" should be set to "blank". Note you - cannot treat HTML pages as images in most cases. For instance, frames - require an HTML page to display. So a frame that is an ad, cannot be - treated as an image. Forcing an "image" in this - situation just will not work. -

    below + for the control over what is actually sent.) +

       There is little reason to change the default definition for this. +

    5.4.5.12. +image
    -     

    -
    -

  • +image-blocker
  • Type:

    Parameterized.

    Typical uses:

    Decides what to do with URLs that end up tagged with Decide what to do with URLs that end up tagged with both "{+block - +image}", e.g an advertizement. There are five options. - "{+block}" + and "{+image}", e.g an advertisement. +

    Possible values:

    There are four available options: "-image-blocker" will send a HTML will send a HTML + "blocked" page, - usually resulting in a page, usually resulting in a "broken image" icon. -"broken + image" icon. "+image-blocker{blank}" will send a 1x1 transparent GIF -image. And finally, will send a 1x1 + transparent GIF image. "+image-blocker{http://xyz.com}""+image-blocker{pattern}" will send a -HTTP temporary redirect to the specified image. This has the advantage of the -icon being being cached by the browser, which will speed up the display. -"+image-blocker{pattern}" will send a checkboard type pattern -

    "+image-blocker{http://xyz.com}" will send a HTTP temporary + redirect to the specified image. This has the advantage of the icon being + being cached by the browser, which will speed up the display. +

    Example usage:

      +image-blocker{blank}
    -       +image-blocker{pattern}{+image-blocker{blank}}
    -  +image-blocker{http://p.p/send-banner}.example.com
    -     

    - -

  • Notes:

    - By default (i.e. in the absence of a If you want invisible ads, they need to be both + defined as images and blocked. + And then, "+limit-connect" - action), "image-blocker" should be set to + "blank" for invisibility. Note you cannot treat HTML pages as + images in most cases. For instance, frames require an HTML page to display. + So a frame that is an ad, cannot be treated as an image. Forcing an + "image" in this situation just will not work. +

    5.4.5.13. +limit-connect

    Type:

    Parameterized.

    Typical uses:

    By default, Privoxy will only allow CONNECT - requests to port 443, which is the standard port for https as a - precaution. -

    only allows HTTP CONNECT + requests to port 443 (the standard, secure HTTPS port). Use + "+limit-connect" to disable this altogether, or to allow + more ports. +

    Possible values:

    Any valid port number, or port number range. +

    Example usages:

         +limit-connect{443}                      # This is the default and need not be specified.
    +     +limit-connect{80,443}                 # Ports 80 and 443 are OK.
    +     +limit-connect{-3, 7, 20-100, 500-} # Port less than 3, 7, 20 to 100 and above 500 are OK.
    +    

    Notes:

    The CONNECT methods exists in HTTP to allow access to secure websites - (https:// URLs) through proxies. It works very simply: the proxy - connects to the server on the specified port, and then short-circuits - its connections to the client The CONNECT methods exists in HTTP to allow access to secure websites + (https:// URLs) through proxies. It works very simply: the proxy connects + to the server on the specified port, and then short-circuits its + connections to the client and to the remote proxy. - This can be a big security hole, since CONNECT-enabled proxies can - be abused as TCP relays very easily. + This can be a big security hole, since CONNECT-enabled proxies can be + abused as TCP relays very easily.

    If you want to allow CONNECT for more ports than this, or want to forbid CONNECT altogether, you can specify a comma separated list of ports and port ranges (the latter using dashes, with the minimum defaulting to 0 and - max to 65K): + max to 65K).

    If you don't know what any of this means, there probably is no reason to + change this one. +

    5.4.5.14. +no-compression

    Type:

    Boolean.

    Typical uses:

    Prevent the specified websites from compressing HTTP data. +

    Possible values:

    N/A +

    Example usage:

      +limit-connect{443} # This is the default and need no be specified.
    -  +limit-connect{80,443} # Ports 80 and 443 are OK.
    -       +limit-connect{-3, 7, 20-100, 500-} # Port less than 3, 7, 20 to 100{+no-compression}
    -   #and above 500 are OK..example.com

    -     

    - -

  • Notes:

    "+no-compression" prevents the website from compressing the - data. Some websites do this, which can be a problem for - Some websites do this, which can be a problem for + Privoxy, since "+filter", - "+no-popup" and "+gif-deanimate" will not work on - compressed data. This will slow down connections to those websites, - though. Default is will not work + on compressed data. This will slow down connections to those websites, + though. Default typically is to turn "no-compression" is turned on. -

    on. +

    5.4.5.15. +no-cookies-keep

    Type:

    Boolean.

    Typical uses:

    Allow cookies for the current browser session only. +

    Possible values:

    N/A +

    Example usage:

           +nocompression{+no-cookies-keep}
    -     

    - -

  • .example.com
    +    

  • Notes:

    - If the website sets cookies, If websites set cookies, "no-cookies-keep" will make sure - they are erased when you exit and restart your web browser. This makes - profiling cookies useless, but won't break sites which require cookies so - that you can log in for transactions. Default: on. -

    "session cookies". +

    5.4.5.16. +no-cookies-read

    Type:

    Boolean.

    Typical uses:

    Explicitly prevent the web server from reading any cookies on your + system. +

    Possible values:

    N/A +

    Example usage:

           +no-cookies-keep{+no-cookies-read}
    -     

    - -

  • .example.com
    +    

  • Notes:

    - Prevent the website from reading cookies: -

    Often used in conjunction with "+no-cookies-set" to + disable persistant cookies completely. +

    5.4.5.17. +no-cookies-set

    Type:

    Boolean.

    Typical uses:

    Explicitly block the web server from sending cookies to your + system. +

    Possible values:

    N/A +

    Example usage:

           +no-cookies-read{+no-cookies-set}
    -     

    - -

  • .example.com
    +    

  • Notes:

    - Prevent the website from setting cookies: -

    Often used in conjunction with "+no-cookies-read" to + disable persistant cookies completely. +

    5.4.5.18. +no-popup

    Type:

    Boolean.

    Typical uses:

    Stop those annoying JavaScript pop-up windows! +

    Possible values:

    N/A +

    Example usage:

           +no-cookies-set{+no-popup}
    -     

    - -

  • - Filter the website through a built-in filter to disable those obnoxious - JavaScript pop-up windows via window.open(), etc. The two alternative - spellings are equivalent. -

    .example.com
    +    

  • Notes:

    "+no-popup" uses a built in filter to disable pop-ups + that use the

    window.open() function, etc. +

    An alternate spelling is "+no-popups", which is + interchangeable. +

    5.4.5.19. +vanilla-wafer

    Type:

    Boolean.

    Typical uses:

    Sends a cookie for every site stating that you do not accept any copyright + on cookies sent to you, and asking them not to track you. +

    Possible values:

    N/A +

    Example usage:

           +no-popup{+vanilla-wafer}
    -  +no-popups.example.com
    -     

    - -

  • Notes:

    - This action only applies if you are using a This action only applies if you are using a jarfile - for saving cookies. It sends a cookie to every site stating that you do not - accept any copyright on cookies sent to you, and asking them not to track - you. Of course, this is a (relatively) unique header they could use to - track you. -

      

    5.4.5.20. +vanilla-wafer
    -     

    -
    -

  • +wafer
  • - This allows you to add an arbitrary cookie. It can be specified multiple - times in order to add as many cookies as you like. -

    Type:

    Multi-value.

    Typical uses:

    This allows you to send an arbitrary, user definable cookie. +

    Possible values:

    User specified cookie name and corresponding value. +

    Example usage:

           +wafer{name=value}{+wafer{name=value}}
    -     

    - -

    .example.com
    +    

    Notes:

    The meaning of any of the above is reversed by preceding the action with a - This can be specified multiple times in order to add as many cookies as you + like. +

    5.4.5.21. Actions Examples

    Note that the meaning of any of the above examples is reversed by preceding + the action with a "-", in place of the "+".

    . Also, + that some actions are turned on in the default section of the actions file, + and require little to no additional configuration. These are just "on". + Some actions that are turned on the default section do typically require + exceptions to be listed in the lower sections of actions file.

    Some examples:

     # Turn off all persistent cookies
     { +no-cookies-read }
     { +no-cookies-set }

     # Allow cookies for this browser session ONLY
     { +no-cookies-keep }

     # Exceptions to the above, sites that benefit from persistent cookies
    + # that saved from one browser session to the next.
     { -no-cookies-read }
     { -no-cookies-set }
     { -no-cookies-keep }
    @@ -3506,9 +5396,9 @@ CLASS="LITERALLAYOUT" > Turn on page filtering according to rules in the defined sections of refilterfiledefault.filter
    , and make one exception for - sourceforge: + Sourceforge:

    "blocked" banner). Many of these use regular expressions - that will expand to match multiple URLs:

    banner). Many of these use + regular expressions that will expand to match + multiple URLs:

    for a brief example on troubleshooting actions.

    5.4.3. Aliases5.4.6. Aliases

    Custom  .nytimes.com

    - # Shopping sites - still want to block ads.
    + # Shopping sites - but we still want to block ads.
     {shop}
     .quietpc.com
     .worldpay.com   # for quietpc.com
     .jungle.com
     .scan.co.uk

    - # These shops require pop-ups
    + # These shops require pop-ups also 
     {shop -no-popups}
     .dabs.com
     .overclockers.co.uk
    @@ -3872,7 +5767,7 @@ CLASS="SECT2" >

    5.6. Templates