X-Git-Url: http://www.privoxy.org/gitweb/?a=blobdiff_plain;f=doc%2Fsource%2Fuser-manual.sgml;h=0c5ee3003363528c7757a0a05f1ec35637fd8080;hb=157312a27ddadfdca91ccd1ed4b7b6e300ca5e9b;hp=3ff9a8c7f9bd47a4f2c741a84798269dcc6f970b;hpb=dfd5fc0277170f121ff5b4a1daa88406ea549f2b;p=privoxy.git
diff --git a/doc/source/user-manual.sgml b/doc/source/user-manual.sgml
index 3ff9a8c7..0c5ee300 100644
--- a/doc/source/user-manual.sgml
+++ b/doc/source/user-manual.sgml
@@ -10,10 +10,11 @@
+
-
+
@@ -34,7 +35,7 @@
Purpose : user manual
- Copyright (C) 2001-2018 Privoxy Developers https://www.privoxy.org/
+ Copyright (C) 2001-2021 Privoxy Developers https://www.privoxy.org/
See LICENSE.
========================================================================
@@ -53,7 +54,7 @@
- Copyright &my-copy; 2001-2018 by
+ Copyright &my-copy; 2001-2021 by
Privoxy Developers
@@ -121,7 +122,8 @@ Hal.
Since this is a &p-status; version, not all new features are well tested. This
documentation may be slightly out of sync as a result (especially with
- CVS sources). And there may be bugs, though hopefully
+ git sources).
+ And there may be bugs, though hopefully
not many!
]]>
@@ -131,7 +133,7 @@ Hal.
In addition to the core
features of ad blocking and
- cookie management,
+ cookie management,
Privoxy provides many supplemental
features,
that give the end-user more control, more privacy and more freedom:
@@ -225,31 +227,6 @@ How to install the binary packages depends on your operating system:
-
-OS/2
-
-
- First, make sure that no previous installations of
- Junkbuster and / or
- Privoxy are left on your
- system. Check that no Junkbuster
- or Privoxy objects are in
- your startup folder.
-
-
-
- Then, just double-click the WarpIN self-installing archive, which will
- guide you through the installation process. A shadow of the
- Privoxy executable will be placed in your
- startup folder so it will start automatically whenever OS/2 starts.
-
-
-
- The directory you choose to install Privoxy
- into will contain all of the configuration files.
-
-
-
Mac OS X
@@ -365,42 +342,42 @@ How to install the binary packages depends on your operating system:
Run the setup program and from View / Category select:
- Devel
- autoconf 2.5
- automake 1.15
- binutils
- cmake
- gcc-core
- gcc-g++
- git
- make
- mingw64-i686-gcc-core
- mingw64-i686-zlib
- Editors
- vim
- Libs
- libxslt: GNOME XSLT library (runtime)
- Net
- curl
- openssh
- Text
- docbook-dssl
- docbook-sgml31
- docbook-utils
- openjade
- Utils
- gnupg
- Web
- w3m
+Devel
+ autoconf 2.5
+ automake 1.15
+ binutils
+ cmake
+ gcc-core
+ gcc-g++
+ git
+ make
+ mingw64-i686-gcc-core
+ mingw64-i686-zlib
+Editors
+ vim
+Libs
+ libxslt: GNOME XSLT library (runtime)
+Net
+ curl
+ openssh
+Text
+ docbook-dssl
+ docbook-sgml31
+ docbook-utils
+ openjade
+Utils
+ gnupg
+Web
+ w3m
If you haven't already downloaded the Privoxy source code, get it now:
- mkdir <root-dir>
- cd <root-dir>
- git clone https://www.privoxy.org/git/privoxy.git
+mkdir <root-dir>
+cd <root-dir>
+git clone https://www.privoxy.org/git/privoxy.git
@@ -410,10 +387,10 @@ How to install the binary packages depends on your operating system:
unzip into <root-dir> and build the software:
- cd <root-dir>
- cd tidy-html5-x.y.z/build/cmake
- cmake ../.. -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIB:BOOL=OFF -DCMAKE_INSTALL_PREFIX=/usr/local
- make && make install
+cd <root-dir>
+cd tidy-html5-x.y.z/build/cmake
+cmake ../.. -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIB:BOOL=OFF -DCMAKE_INSTALL_PREFIX=/usr/local
+make && make install
@@ -421,14 +398,93 @@ How to install the binary packages depends on your operating system:
https://sourceforge.net/projects/nsis/files/NSIS%203/
- and extract the NSIS directory to privoxy/windows.
- Then edit the windows/GNUmakefile to set the location of the NSIS executable - eg:
+ and extract the NSIS directory to /<root-dir>/nsis/.
+ Then edit the windows/GNUmakefile to set the location
+ of the NSIS executable - eg:
# Path to NSIS
-MAKENSIS = ./nsis/makensis.exe
+MAKENSIS = /<root-dir>/nsis/makensis.exe
+
+ Get the latest 8.x PCRE code from
+ PCRE
+ https://ftp.pcre.org/pub/pcre/
+ and build the static PCRE libraries with
+
+
+export CFLAGS="-O2 -fstack-protector-strong -D_FORTIFY_SOURCE=2"
+export LDFLAGS="-fstack-protector-strong"
+export CPPFLAGS="-DPCRE_STATIC"
+
+./configure --host=i686-w64-mingw32 \
+ --prefix=/usr/local/i686-w64-mingw32 \
+ --enable-utf --enable-unicode-properties \
+ --enable-jit \
+ --enable-newline-is-anycrlf \
+ --enable-pcre16 \
+ --enable-pcre32 \
+ --disable-pcregrep-libbz2 \
+ --disable-pcregrep-libz \
+ --disable-pcretest-libreadline \
+ --disable-stack-for-recursion \
+ --enable-static --disable-shared \
+ && make
+
+
+
+
+
+ If you want to be able to have Privoxy do TLS Inspection, get the latest
+ 2.16.x MBED-TLS library source code from
+
+ https://github.com/ARMmbed/mbedtls/tags,
+ extract the tar file into <root-dir>
+ and build the static libraries with
+
+export WINDOWS_BUILD=1
+# build for a Windows platform
+
+unset DEBUG
+
+export CC=i686-w64-mingw32-gcc
+export LD=i686-w64-mingw32-gcc
+export CFLAGS="-O2 -fstack-protector-strong -D_FORTIFY_SOURCE=2"
+export LDFLAGS="${LDFLAGS} -fstack-protector-strong"
+
+make lib
+# build the libraries
+
+
+
+
+
+ Get the brotli library from
+
+ https://github.com/google/brotli/releases
+ and build the static libraries with
+
+./bootstrap
+# to create the GNU autotools files
+
+autoconf
+
+export CFLAGS="-O2 -fstack-protector-strong -D_FORTIFY_SOURCE=2"
+export LDFLAGS="${LDFLAGS} -fstack-protector-strong"
+
+./configure --host=i686-w64-mingw32 \
+ --prefix=/usr/local/i686-w64-mingw32 \
+ --enable-static \
+ --disable-shared \
+ --with-gnu-ld \
+ --disable-silent-rules \
+ && make
+
+
+
+
+
Build
@@ -437,8 +493,8 @@ MAKENSIS = ./nsis/makensis.exe
To build just the Privoxy executable and not the whole installation package, do:
- cd <root-dir>/privoxy
- ./windows/MYconfigure && make
+cd <root-dir>/privoxy
+./windows/MYconfigure && make
@@ -446,10 +502,10 @@ MAKENSIS = ./nsis/makensis.exe
for building software, so the process is:
- $ autoheader # creates config.h.in
- $ autoconf # uses config.h.in to create the configure shell script
- $ ./configure [options] # creates GNUmakefile
- $ make [options] # builds the program
+autoheader # creates config.h.in
+autoconf # uses config.h.in to create the configure shell script
+./configure [options] # creates GNUmakefile
+make [options] # builds the program
@@ -462,7 +518,8 @@ MAKENSIS = ./nsis/makensis.exe
--enable-zlib
--enable-static-linking
--disable-pthread
- --disable-dynamic-pcre
+ --with-brotli
+ --with-mbedtls
@@ -471,11 +528,11 @@ MAKENSIS = ./nsis/makensis.exe
- $ export CFLAGS="-O2" # set gcc optimization level
- $ export LDFLAGS="-Wl,--nxcompat" # Enable DEP
- $ ./configure --host=i686-w64-mingw32 --enable-mingw32 --enable-zlib \
- > --enable-static-linking --disable-pthread --disable-dynamic-pcre
- $ make # build Privoxy
+$ export CFLAGS="-O2" # set gcc optimization level
+$ export LDFLAGS="-Wl,--nxcompat" # Enable DEP
+$ ./configure --host=i686-w64-mingw32 --enable-mingw32 --enable-zlib \
+> --enable-static-linking --disable-pthread
+$ make # build Privoxy
@@ -615,8 +672,9 @@ MAKENSIS = ./nsis/makensis.exe
use, filtering, you will need to force compression off. Example:
- { +filter{google} +prevent-compression }
- .google.
+{ +filter{google} +prevent-compression }
+.google.
+
Or if you use a number of filters, or filter many sites, you may just want
to turn off compression for all sites in
@@ -682,7 +740,7 @@ MAKENSIS = ./nsis/makensis.exe
Set your browser to use Privoxy as HTTP and
- HTTPS (SSL) proxy
+ HTTPS (SSL) proxy
by setting the proxy configuration for address of
127.0.0.1 and port 8118.
DO NOT activate proxying for FTP or
@@ -695,7 +753,7 @@ MAKENSIS = ./nsis/makensis.exe
Flush your browser's disk and memory caches, to remove any cached ad images.
If using Privoxy to manage
- cookies,
+ cookies,
you should remove any currently stored cookies too.
@@ -1048,7 +1106,7 @@ MAKENSIS = ./nsis/makensis.exe
Before launching Privoxy for the first time, you
will want to configure your browser(s) to use
Privoxy as a HTTP and HTTPS (SSL)
- proxy. The default is
+ proxy. The default is
127.0.0.1 (or localhost) for the proxy address, and port 8118 (earlier versions
used port 8000). This is the one configuration step that must be done
!
@@ -1060,13 +1118,13 @@ MAKENSIS = ./nsis/makensis.exe
@@ -1077,7 +1135,7 @@ MAKENSIS = ./nsis/makensis.exe
- Tools -> Options -> Advanced -> Network ->Connection -> Settings
+ Edit -> Preferences -> Network Settings -> Settings
@@ -1134,7 +1192,7 @@ MAKENSIS = ./nsis/makensis.exe
After doing this, flush your browser's disk and memory caches to force a
re-reading of all pages and to get rid of any ads that may be cached. Remove
- any cookies,
+ any cookies,
if you want Privoxy to manage that. You are now
ready to start enjoying the benefits of using
Privoxy!
@@ -1157,7 +1215,7 @@ MAKENSIS = ./nsis/makensis.exe
file.
- # /etc/init.d/privoxy start
+# /etc/init.d/privoxy start
@@ -1178,7 +1236,7 @@ MAKENSIS = ./nsis/makensis.exe
To start Privoxy manually, run:
- # service privoxy onestart
+# service privoxy onestart
@@ -1206,7 +1264,7 @@ Click on the &my-app; Icon to start Privoxy. If no co
Example Unix startup command:
- # /usr/sbin/privoxy --user privoxy /etc/privoxy/config
+# /usr/sbin/privoxy --user privoxy /etc/privoxy/config
Note that if you installed Privoxy through
@@ -1216,16 +1274,6 @@ Example Unix startup command:
-
-OS/2
-
- During installation, Privoxy is configured to
- start automatically when the system restarts. You can start it manually by
- double-clicking on the Privoxy icon in the
- Privoxy folder.
-
-
-
Mac OS X
@@ -1516,7 +1564,7 @@ for details.
▪ View & change the current configuration
- ▪ View the source code version numbers
+ ▪ View or toggle the tags that can be set based on the client's address
▪ View the request headers.
@@ -1574,8 +1622,8 @@ for details.
Configuration Files Overview
- For Unix, *BSD and Linux, all configuration files are located in
- /etc/privoxy/ by default. For MS Windows and OS/2
+ For Unix, *BSD and GNU/Linux, all configuration files are located in
+ /etc/privoxy/ by default. For MS Windows
these are all in the same directory as the
Privoxy executable.
The main configuration file is named config
- on Linux, Unix, BSD, and OS/2, and config.txt
+ on GNU/Linux, Unix, BSD, and config.txt
on Windows. This is a required file.
@@ -1792,7 +1840,7 @@ for details.
The default profiles, and their associated actions, as pre-defined in
default.action are:
-
Default Configurations
+
Default Configurations
@@ -2035,12 +2083,13 @@ for details.
might look like:
-
- { +handle-as-image +block{Banner ads.} }
- # Block these as if they were images. Send no block page.
- banners.example.com
- media.example.com/.*banners
- .example.com/images/ads/
+
+{ +handle-as-image +block{Banner ads.} }
+# Block these as if they were images. Send no block page.
+banners.example.com
+media.example.com/.*banners
+.example.com/images/ads/
+
You can trace this process for URL patterns and any given URL by visiting Regular
+ Regular
Expressions (POSIX 1003.2).
@@ -2240,7 +2289,7 @@ for details.
themselves. These work similarly to shell globbing type wild-cards:
* represents zero or more arbitrary characters (this is
equivalent to the
- Regular
+ Regular
Expression based syntax of .*),
? represents any single character (this is equivalent to the
regular expression syntax of a simple .), and you can define
@@ -2292,6 +2341,12 @@ for details.
While flexible, this is not the sophistication of full regular expression based syntax.
+
+ When compiled with FEATURE_PCRE_HOST_PATTERNS patterns can be prefixed with
+ PCRE-HOST-PATTERN: in which case full regular expression
+ (PCRE) can be used for the host pattern as well.
+
+
@@ -2302,7 +2357,7 @@ for details.
Privoxy uses modern POSIX 1003.2
- Regular
+ Regular
Expressions for matching the path portion (after the slash),
and is thus more flexible.
@@ -2572,8 +2627,9 @@ example.org/blocked-example-page
disabled. Syntax:
- +name # enable action name
- -name # disable action name
++name # enable action name
+-name # disable action name
+
Example: +handle-as-image
@@ -2585,10 +2641,11 @@ example.org/blocked-example-page
Parameterized, where some value is required in order to enable this type of action.
Syntax:
-
- +name{param} # enable action and set parameter to param,
- # overwriting parameter from previous match if necessary
- -name # disable action. The parameter can be omitted
+
++name{param} # enable action and set parameter to param,
+ # overwriting parameter from previous match if necessary
+-name # disable action. The parameter can be omitted
+
Note that if the URL matches multiple positive forms of a parameterized action,
the last match wins, i.e. the params from earlier matches are simply ignored.
@@ -2607,11 +2664,12 @@ example.org/blocked-example-page
that can be executed for the same request repeatedly, like adding multiple
headers, or filtering through multiple filters. Syntax:
-
- +name{param} # enable action and add param to the list of parameters
- -name{param} # remove the parameter param from the list of parameters
- # If it was the last one left, disable the action.
- -name # disable this action completely and remove all parameters from the list
+
++name{param} # enable action and add param to the list of parameters
+-name{param} # remove the parameter param from the list of parameters
+ # If it was the last one left, disable the action.
+-name # disable this action completely and remove all parameters from the list
+
Examples: +add-header{X-Fun-Header: Some text} and
+filter{html-annoyances}
@@ -2811,18 +2869,20 @@ example.org/blocked-example-page
Example usage (section):
- {+block{No nasty stuff for you.}}
+
+{+block{No nasty stuff for you.}}
# Block and replace with "blocked" page
- .nasty-stuff.example.com
+.nasty-stuff.example.com
{+block{Doubleclick banners.} +handle-as-image}
# Block and replace with image
- .ad.doubleclick.net
- .ads.r.us/banners/
+.ad.doubleclick.net
+.ads.r.us/banners/
{+block{Layered ads.} +handle-as-empty-document}
# Block and then ignore
- adserver.example.net/.*\.js$
+adserver.example.net/.*\.js$
+
@@ -2959,6 +3019,21 @@ example.org/blocked-example-page
one. This can be used to rewrite the request destination behind the client's
back, for example to specify a Tor exit relay for certain requests.
+
+ Note that to change the destination host for
+ https-inspected
+ requests a protocol and host has to be added to the URI.
+
+
+ If https inspection
+ is enabled, the protocol can be downgraded from https to http
+ but upgrading a request from http to https is currently not
+ supported.
+
+
+ After detecting a rewrite, &my-app; does not update the actions
+ used for the request based on the new host.
+
Please refer to the filter file chapter
to learn which client-header filters are available by default, and how to
@@ -2982,6 +3057,83 @@ example.org/blocked-example-page
+
+
+client-body-filter
+
+
+
+ Typical use:
+
+
+ Rewrite or remove client request body.
+
+
+
+
+
+ Effect:
+
+
+ All request bodies to which this action applies are filtered on-the-fly through
+ the specified regular expression based substitutions.
+
+
+
+
+
+ Type:
+
+
+ Multi-value.
+
+
+
+
+ Parameter:
+
+
+ The name of a client-body filter, as defined in one of the
+ filter files.
+
+
+
+
+
+ Notes:
+
+
+ Please refer to the filter file chapter
+ to learn how to create your own client-body filters.
+
+
+ The distribution default.filter file contains a selection of
+ client-body filters for example purposes.
+
+
+ The amount of data that can be filtered is limited by the
+ buffer-limit
+ option in the main config file. The
+ default is 4096 KB (4 Megs). Once this limit is exceeded, the whole
+ request body is passed through unfiltered.
+
+
+
+
+
+ Example usage (section):
+
+
+# Remove "test" everywhere in the request body
+{+client-body-filter{remove-test}}
+/
+
+
+
+
+
+
+
@@ -3658,6 +3810,76 @@ new action
+
+
+
+delay-response
+
+
+
+ Typical use:
+
+ Delay responses to the client to reduce the load
+
+
+
+
+ Effect:
+
+
+ Delays responses to the client by sending the response in ca. 10 byte chunks.
+
+
+
+
+
+ Type:
+
+
+ Parameterized.
+
+
+
+
+ Parameter:
+
+
+ Number of milliseconds
+
+
+
+
+
+ Notes:
+
+
+ Sometimes when JavaScript code is used to fetch advertisements
+ it doesn't respect Privoxy's blocks and retries to fetch the
+ same resource again causing unnecessary load on the client.
+
+
+ This action delays responses to the client and can be combined
+ with blocks
+ to slow down the JavaScript code, thus reducing
+ the load on the client.
+
+
+ When used without blocks
+ the action can also be used to simulate a slow internet connection.
+
+
+
+
+
+ Example usage:
+
+ +delay-response{100}
+
+
+
+
+
+
downgrade-http-version
@@ -3730,6 +3952,7 @@ problem-host.example.com
+
external-filter
@@ -3915,7 +4138,7 @@ problem-host.example.com
looks for the string http://, either in plain text
(invalid but often used) or encoded as http%3a//.
Some sites use their own URL encoding scheme, encrypt the address
- of the target server or replace it with a database id. In theses cases
+ of the target server or replace it with a database id. In these cases
fast-redirects is fooled and the request reaches the
redirection server where it probably gets logged.
@@ -3926,11 +4149,12 @@ problem-host.example.com
Example usage:
- { +fast-redirects{simple-check} }
- one.example.com
+{ +fast-redirects{simple-check} }
+one.example.com
- { +fast-redirects{check-decoded-url} }
- another.example.com/testing
+{ +fast-redirects{check-decoded-url} }
+another.example.com/testing
+
@@ -4010,15 +4234,15 @@ problem-host.example.com
Rolling your own
filters requires a knowledge of
- Regular
+ Regular
Expressions and
- HTML.
+ HTML.
This is very powerful feature, and potentially very intrusive.
Filters should be used with caution, and where an equivalent
action is not available.
- The amount of data that can be filtered is limited to the
+ The amount of data that can be filtered is limited by the
buffer-limit
option in the main config file. The
default is 4096 KB (4 Megs). Once this limit is exceeded, the buffered
@@ -4162,10 +4386,18 @@ problem-host.example.com
+filter{no-ping} # Removes non-standard ping attributes in <a> and <area> tags.
+
+
+
+ +filter{github} # Removes the annoying "Sign-Up" banner and the Cookie disclaimer.+filter{google} # CSS-based block for Google text ads. Also removes a width limitation and the toolbar advertisement.
+
+
+
+ +filter{imdb} # Removes some ads on IMDb.
@@ -4178,6 +4410,10 @@ problem-host.example.com
+filter{blogspot} # Cleans up some Blogspot blogs. Read the fine print before using this.
+
+
+
+ +filter{sourceforge} # Reduces the amount of ads for proprietary software on SourceForge.
@@ -4724,11 +4960,14 @@ new action
Example usage:
- # Disarm the download link in Sourceforge's patch tracker
+
+# Disarm the download link in Sourceforge's patch tracker
{ -filter \
- +content-type-overwrite{text/plain}\
- +hide-content-disposition{block} }
- .sourceforge.net/tracker/download\.php
+ +content-type-overwrite{text/plain} \
+ +hide-content-disposition{block} \
+}
+.sourceforge.net/tracker/download\.php
+
@@ -5060,7 +5299,7 @@ new action
More information on known user-agent strings can be found at
http://www.user-agents.org/
and
- http://en.wikipedia.org/wiki/User_agent.
+ http://en.wikipedia.org/wiki/User_agent.
@@ -5068,7 +5307,7 @@ new action
Example usage:
- +hide-user-agent{Netscape 6.1 (X11; I; Linux 2.4.18 i686)}
+ +hide-user-agent{Mozilla/5.0 (X11; ElectroBSD i386; rv:78.0) Gecko/20100101 Firefox/78.0}
@@ -5076,14 +5315,14 @@ new action
-
-limit-connect
+
+https-inspectionTypical use:
- Prevent abuse of Privoxy as a TCP proxy relay or disable SSL for untrusted sites
+ Filter encrypted requests and responses
@@ -5091,16 +5330,16 @@ new action
Effect:
- Specifies to which ports HTTP CONNECT requests are allowable.
+ Encrypted requests are decrypted, filtered and forwarded encrypted.
Type:
-
+
- Parameterized.
+ Boolean.
@@ -5108,62 +5347,57 @@ new action
Parameter:
- A comma-separated list of ports or port ranges (the latter using dashes, with the minimum
- defaulting to 0 and the maximum to 65K).
+ N/A
-
+Notes:
- By default, i.e. if no limit-connect action applies,
- Privoxy allows HTTP CONNECT requests to all
- ports. Use limit-connect if fine-grained control
- is desired for some or all destinations.
+ This action allows &my-app; to filter encrypted requests and responses.
+ For this to work &my-app; has to generate a certificate for the web site
+ and send it to the client which has to accept it.
- 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 server.
- This means CONNECT-enabled proxies can be used as TCP relays very easily.
-
-
- Privoxy relays HTTPS traffic without seeing
- the decoded content. Websites can leverage this limitation to circumvent &my-app;'s
- filters. By specifying an invalid port range you can disable HTTPS entirely.
-
+ Before this works the directives in the
+ HTTPS inspection section
+ of the config file have to be configured.
+
+
+ Note that the action has to be enabled based on the CONNECT
+ request which doesn't contain a path. Enabling it based on
+ a pattern with path doesn't work as the path is only seen
+ by &my-app; if the action is already enabled.
+
+
+ This is an experimental feature.
+
- Example usages:
+ Example usage (section):
-
-
-
- +limit-connect{443} # Port 443 is OK.
-+limit-connect{80,443} # Ports 80 and 443 are OK.
-+limit-connect{-3, 7, 20-100, 500-} # Ports less than 3, 7, 20 to 100 and above 500 are OK.
-+limit-connect{-} # All ports are OK
-+limit-connect{,} # No HTTPS/SSL traffic is allowed
+ {+https-inspection}
+www.example.com
+
-
-limit-cookie-lifetime
+
+ignore-certificate-errorsTypical use:
- Limit the lifetime of HTTP cookies to a couple of minutes or hours.
+ Filter encrypted requests and responses without verifying the certificate
@@ -5171,7 +5405,7 @@ new action
Effect:
- Overwrites the expires field in Set-Cookie server headers if it's above the specified limit.
+ Encrypted requests are forwarded to sites without verifying the certificate.
@@ -5180,7 +5414,7 @@ new action
Type:
- Parameterized.
+ Boolean.
@@ -5188,7 +5422,7 @@ new action
Parameter:
- The lifetime limit in minutes, or 0.
+ N/A
@@ -5197,34 +5431,187 @@ new action
Notes:
- This action reduces the lifetime of HTTP cookies coming from the
- server to the specified number of minutes, starting from the time
- the cookie passes Privoxy.
-
-
- Cookies with a lifetime below the limit are not modified.
- The lifetime of session cookies is set to the specified limit.
+ When the
+ +https-inspection
+ action is used &my-app; by default verifies that the remote site uses a valid
+ certificate.
- The effect of this action depends on the server.
+ If the certificate can't be validated by &my-app; the connection is aborted.
- In case of servers which refresh their cookies with each response
- (or at least frequently), the lifetime limit set by this action
- is updated as well.
- Thus, a session associated with the cookie continues to work with
- this action enabled, as long as a new request is made before the
- last limit set is reached.
+ This action disables the certificate check so requests to sites
+ with certificates that can't be validated are allowed.
- However, some servers send their cookies once, with a lifetime of several
- years (the year 2037 is a popular choice), and do not refresh them
- until a certain event in the future, for example the user logging out.
- In this case this action may limit the absolute lifetime of the session,
- even if requests are made frequently.
+ Note that enabling this action allows Man-in-the-middle attacks.
-
- If the parameter is 0, this action behaves like
+
+
+
+
+ Example usage:
+
+
+ {+ignore-certificate-errors}
+ www.example.org
+
+
+
+
+
+
+
+
+
+limit-connect
+
+
+
+ Typical use:
+
+ Prevent abuse of Privoxy as a TCP proxy relay or disable SSL for untrusted sites
+
+
+
+
+ Effect:
+
+
+ Specifies to which ports HTTP CONNECT requests are allowable.
+
+
+
+
+
+ Type:
+
+
+ Parameterized.
+
+
+
+
+ Parameter:
+
+
+ A comma-separated list of ports or port ranges (the latter using dashes, with the minimum
+ defaulting to 0 and the maximum to 65K).
+
+
+
+
+
+ Notes:
+
+
+ By default, i.e. if no limit-connect action applies,
+ Privoxy allows HTTP CONNECT requests to all
+ ports. Use limit-connect if fine-grained control
+ is desired for some or all destinations.
+
+
+ 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 server.
+ This means CONNECT-enabled proxies can be used as TCP relays very easily.
+
+
+ Privoxy relays HTTPS traffic without seeing
+ the decoded content. Websites can leverage this limitation to circumvent &my-app;'s
+ filters. By specifying an invalid port range you can disable HTTPS entirely.
+
+
+
+
+
+ Example usages:
+
+
+
+
+ +limit-connect{443} # Port 443 is OK.
++limit-connect{80,443} # Ports 80 and 443 are OK.
++limit-connect{-3, 7, 20-100, 500-} # Ports less than 3, 7, 20 to 100 and above 500 are OK.
++limit-connect{-} # All ports are OK
++limit-connect{,} # No HTTPS/SSL traffic is allowed
+
+
+
+
+
+
+
+
+limit-cookie-lifetime
+
+
+
+ Typical use:
+
+ Limit the lifetime of HTTP cookies to a couple of minutes or hours.
+
+
+
+
+ Effect:
+
+
+ Overwrites the expires field in Set-Cookie server headers if it's above the specified limit.
+
+
+
+
+
+ Type:
+
+
+ Parameterized.
+
+
+
+
+ Parameter:
+
+
+ The lifetime limit in minutes, or 0.
+
+
+
+
+
+ Notes:
+
+
+ This action reduces the lifetime of HTTP cookies coming from the
+ server to the specified number of minutes, starting from the time
+ the cookie passes Privoxy.
+
+
+ Cookies with a lifetime below the limit are not modified.
+ The lifetime of session cookies is set to the specified limit.
+
+
+ The effect of this action depends on the server.
+
+
+ In case of servers which refresh their cookies with each response
+ (or at least frequently), the lifetime limit set by this action
+ is updated as well.
+ Thus, a session associated with the cookie continues to work with
+ this action enabled, as long as a new request is made before the
+ last limit set is reached.
+
+
+ However, some servers send their cookies once, with a lifetime of several
+ years (the year 2037 is a popular choice), and do not refresh them
+ until a certain event in the future, for example the user logging out.
+ In this case this action may limit the absolute lifetime of the session,
+ even if requests are made frequently.
+
+
+ If the parameter is 0, this action behaves like
session-cookies-only.
@@ -5309,9 +5696,10 @@ new action
Note that some (rare) ill-configured sites don't handle requests for uncompressed
documents correctly. Broken PHP applications tend to send an empty document body,
- some IIS versions only send the beginning of the content. If you enable
- prevent-compression per default, you might want to add
- exceptions for those sites. See the example for how to do that.
+ some IIS versions only send the beginning of the content and some content delivery
+ networks let the connection time out.
+ If you enable prevent-compression per default, you might
+ want to add exceptions for those sites. See the example for how to do that.
@@ -5324,19 +5712,20 @@ new action
#
{ +filter{tiny-textforms} +prevent-compression }
# Match only these sites
- .google.
- sourceforge.net
- sf.net
+.google.
+sourceforge.net
+sf.net
# Or instead, we could set a universal default:
#
{ +prevent-compression }
- / # Match all sites
+/ # Match all sites
# Then maybe make exceptions for broken sites:
#
{ -prevent-compression }
-.compusa.com/
+.compusa.com/
+
@@ -5428,11 +5817,14 @@ new action
Example usage:
- # Let the browser revalidate without being tracked across sessions
+
+# Let the browser revalidate without being tracked across sessions
{ +hide-if-modified-since{-60} \
- +overwrite-last-modified{randomize} \
- +crunch-if-none-match}
-/
+ +overwrite-last-modified{randomize} \
+ +crunch-if-none-match \
+}
+/
+
@@ -5523,14 +5915,15 @@ new action
Example usages:
- # Replace example.com's style sheet with another one
+
+# Replace example.com's style sheet with another one
{ +redirect{http://localhost/css-replacements/example.com.css} }
- example.com/stylesheet\.css
+example.com/stylesheet\.css
# Create a short, easy to remember nickname for a favorite site
# (relies on the browser to accept and forward invalid URLs to &my-app;)
{ +redirect{https://www.privoxy.org/user-manual/actions-file.html} }
- a
+a
# Always use the expanded view for Undeadly.org articles
# (Note the $ at the end of the URL pattern to make sure
@@ -5559,6 +5952,10 @@ example.com/.*toChange=(?!bar)
# Redirect Destination = https://www.illumos.org/issues/4974
i[0-9][0-9][0-9][0-9]*/
+# Redirect requests for the old Tor Hidden Service of the Privoxy website to the new one
+{+redirect{s@^http://jvauzb4sb3bwlsnc.onion/@http://l3tczdiiwoo63iwxty4lhs6p7eaxop5micbn7vbliydgv63x5zrrrfyd.onion/@}}
+jvauzb4sb3bwlsnc.onion/
+
# Redirect remote requests for this manual
# to the local version delivered by Privoxy
{+redirect{s@^http://www@http://config@}}
@@ -5739,6 +6136,63 @@ TAG:^image/
+
+
+suppress-tag
+
+
+
+ Typical use:
+
+
+ Suppress client or server tag.
+
+
+
+
+
+ Effect:
+
+
+ Server or client tags to which this action applies are not added to the request,
+ thus making all actions that are specific to these request tags inactive.
+
+
+
+
+
+ Type:
+
+
+ Multi-value.
+
+
+
+
+ Parameter:
+
+
+ The result tag of a server-header or client-header tagger, as defined in one of the
+ filter files.
+
+
+
+
+
+ Example usage (section):
+
+
+# Suppress tag produced by range-requests client-header tagger for requests coming from address 10.0.0.1
+{+suppress-tag{RANGE-REQUEST}}
+TAG:^IP-ADDRESS: 10\.0\.0\.1$
+
+
+
+
+
+
+
+
session-cookies-only
@@ -6000,32 +6454,33 @@ TAG:^image/
- # Useful custom aliases we can use later.
- #
- # Note the (required!) section header line and that this section
- # must be at the top of the actions file!
- #
- {{alias}}
+# Useful custom aliases we can use later.
+#
+# Note the (required!) section header line and that this section
+# must be at the top of the actions file!
+#
+{{alias}}
- # These aliases just save typing later:
- # (Note that some already use other aliases!)
- #
- +crunch-all-cookies = +crunch-incoming-cookies +crunch-outgoing-cookies
- -crunch-all-cookies = -crunch-incoming-cookies -crunch-outgoing-cookies
- +block-as-image = +block{Blocked image.} +handle-as-image
- allow-all-cookies = -crunch-all-cookies -session-cookies-only -filter{content-cookies}
+# These aliases just save typing later:
+# (Note that some already use other aliases!)
+#
++crunch-all-cookies = +crunch-incoming-cookies +crunch-outgoing-cookies
+-crunch-all-cookies = -crunch-incoming-cookies -crunch-outgoing-cookies
++block-as-image = +block{Blocked image.} +handle-as-image
+allow-all-cookies = -crunch-all-cookies -session-cookies-only -filter{content-cookies}
- # These aliases define combinations of actions
- # that are useful for certain types of sites:
- #
- fragile = -block -filter -crunch-all-cookies -fast-redirects -hide-referrer -prevent-compression
+# These aliases define combinations of actions
+# that are useful for certain types of sites:
+#
+fragile = -block -filter -crunch-all-cookies -fast-redirects -hide-referrer -prevent-compression
- shop = -crunch-all-cookies -filter{all-popups}
+shop = -crunch-all-cookies -filter{all-popups}
- # Short names for other aliases, for really lazy people ;-)
- #
- c0 = +crunch-all-cookies
- c1 = -crunch-all-cookies
+# Short names for other aliases, for really lazy people ;-)
+#
+c0 = +crunch-all-cookies
+c1 = -crunch-all-cookies
+
...and put them to use. These sections would appear in the lower part of an
@@ -6034,28 +6489,29 @@ TAG:^image/
- # These sites are either very complex or very keen on
- # user data and require minimal interference to work:
- #
- {fragile}
- .office.microsoft.com
- .windowsupdate.microsoft.com
- # Gmail is really mail.google.com, not gmail.com
- mail.google.com
-
- # Shopping sites:
- # Allow cookies (for setting and retrieving your customer data)
- #
- {shop}
- .quietpc.com
- .worldpay.com # for quietpc.com
- mybank.example.com
+# These sites are either very complex or very keen on
+# user data and require minimal interference to work:
+#
+{fragile}
+.office.microsoft.com
+.windowsupdate.microsoft.com
+# Gmail is really mail.google.com, not gmail.com
+mail.google.com
- # These shops require pop-ups:
- #
- {-filter{all-popups} -filter{unsolicited-popups}}
- .dabs.com
- .overclockers.co.uk
+# Shopping sites:
+# Allow cookies (for setting and retrieving your customer data)
+#
+{shop}
+.quietpc.com
+.worldpay.com # for quietpc.com
+mybank.example.com
+
+# These shops require pop-ups:
+#
+{-filter{all-popups} -filter{unsolicited-popups}}
+.dabs.com
+.overclockers.co.uk
+
Aliases like shop and fragile are typically used for
@@ -6164,7 +6620,7 @@ for-privoxy-version=3.0.11
#
+crunch-all-cookies = +crunch-incoming-cookies +crunch-outgoing-cookies
-crunch-all-cookies = -crunch-incoming-cookies -crunch-outgoing-cookies
- +block-as-image = +block{Blocked image.} +handle-as-image
+ +block-as-image = +block{Blocked image.} +handle-as-image
mercy-for-cookies = -crunch-all-cookies -session-cookies-only -filter{content-cookies}
# These aliases define combinations of actions
@@ -6464,10 +6920,11 @@ handle-as-text = -filter +-filter +-filter }
- .your-home-banking-site.com
+.your-home-banking-site.com
+
Some file types you may not want to filter for various reasons:
@@ -6506,8 +6964,9 @@ stupid-server.example.com/
{ +block{Nasty ads.} }
- www.example.com/nasty-ads/sponsor\.gif
- another.example.net/more/junk/here/
+www.example.com/nasty-ads/sponsor\.gif
+another.example.net/more/junk/here/
+
The URLs of dynamically generated banners, especially from large banner
@@ -6523,10 +6982,11 @@ stupid-server.example.com/
{ +block-as-image }
- .doubleclick.net
- .fastclick.net
- /Realmedia/ads/
- ar.atwola.com/
+.doubleclick.net
+.fastclick.net
+/Realmedia/ads/
+ar.atwola.com/
+
Now you noticed that the default configuration breaks Forbes Magazine,
@@ -6542,9 +7002,10 @@ stupid-server.example.com/
{ fragile }
- .forbes.com
- webmail.example.com
- .mybank.com
+.forbes.com
+webmail.example.com
+.mybank.com
+
You like the fun text replacements in default.filter,
@@ -6555,7 +7016,8 @@ stupid-server.example.com/
{ +filter{fun} }
- / # For ALL sites!
+/ # For ALL sites!
+
Note that the above is not really a good idea: There are exceptions
@@ -6574,9 +7036,10 @@ stupid-server.example.com/
{ allow-ads }
- .sourceforge.net
- .slashdot.org
- .osdn.net
+.sourceforge.net
+.slashdot.org
+.osdn.net
+
Note that allow-ads has been aliased to
@@ -6594,7 +7057,8 @@ stupid-server.example.com/
{ handle-as-text }
- /.*\.sh$
+/.*\.sh$
+
user.action is generally the best place to define
@@ -6631,13 +7095,15 @@ stupid-server.example.com/
- &my-app; supports three different pcrs-based filter actions:
+ &my-app; supports four different pcrs-based filter actions:
filter to
rewrite the content that is send to the client,
client-header-filter
- to rewrite headers that are send by the client, and
+ to rewrite headers that are send by the client,
server-header-filter
- to rewrite headers that are send by the server.
+ to rewrite headers that are send by the server, and
+ client-body-filter
+ to rewrite client request body.
@@ -6696,7 +7162,8 @@ stupid-server.example.com/
filter file is organized in sections, which are called filters
here. Each filter consists of a heading line, that starts with one of the
keywordsFILTER:,
- CLIENT-HEADER-FILTER: or SERVER-HEADER-FILTER:
+ CLIENT-HEADER-FILTER:, SERVER-HEADER-FILTER: or
+ CLIENT-BODY-FILTER:
followed by the filter's name, and a short (one line)
description of what it does. Below that line
come the jobs, i.e. lines that define the actual
@@ -6763,7 +7230,7 @@ stupid-server.example.com/
If you are new to
- Regular
+ Regular
Expressions, you might want to take a look at
the Appendix on regular expressions, and
see the Perl
@@ -7259,7 +7726,7 @@ pre-defined filters for your convenience:
sometimes appear on some pages, or user agents that don't correct for this on
the fly.
@@ -7650,16 +8117,63 @@ Requests
Privoxy is free software; you can
- redistribute it and/or modify it under the terms of the
- GNU General Public License, version 2,
- as published by the Free Software Foundation and included in
- the next section.
+ redistribute and/or modify its source code under the terms
+ of the GNU General Public License
+ as published by the Free Software Foundation, either version 2
+ of the license, or (at your option) any later version.
+
+
+
+ The same is true for Privoxy binaries
+ unless they are linked with a
+ mbed TLS version
+ that is licensed under the Apache 2.0 license in which
+ case you can redistribute and/or modify the Privoxy
+ binaries under the terms of the GNU General Public License
+ as published by the Free Software Foundation, either version 3
+ of the license, or (at your option) any later version.
+
+
+
+ Both licenses are included in the next section.
License
-
+GNU General Public License version 2
+
+
+
+GNU General Public License version 3
+
+
+
+Third-party licenses and copyrights
+
+ Privoxy depends on a couple of third-party libraries which have seperate licenses.
+ Please refer to the third-party websites for up-to-date license and copyright
+ information.
+
+
+ Privoxy depends on pcre.
+
+
+ When compiled with FEATURE_BROTLI (optional), Privoxy depends on
+ brotli.
+
+
+ When compiled with FEATURE_HTTPS_INSPECTION (optional),
+ Privoxy depends on a TLS library. The supported libraries are
+ LibreSSL,
+ mbed TLS and
+ OpenSSL.
+
+
+ When compiled with FEATURE_ZLIB (optional),
+ Privoxy depends on zlib.
+
+
@@ -7970,23 +8484,23 @@ Requests
- Show information about the current configuration, including viewing and
- editing of actions files:
+ View and toggle client tags: