From: Lee Date: Mon, 19 Mar 2018 15:46:58 +0000 (-0400) Subject: have docbook generate valid html X-Git-Tag: v_3_0_27~59 X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=commitdiff_plain;h=352696e3ebdddaaf4d370ee35f2bab3ed3b18134 have docbook generate valid html http://validator.w3.org/check fusses about 'end tag for element "P" which is not open' if a table is inside a paragraph - eg

...

docbook 3.1 turns and into html s, so get rid of all the enclosing s problematic constructs:
...
... ... ... ... ... ... --- diff --git a/doc/source/buildsource.sgml b/doc/source/buildsource.sgml index 5a4f6229..c97fb260 100644 --- a/doc/source/buildsource.sgml +++ b/doc/source/buildsource.sgml @@ -40,12 +40,10 @@ --> first unpack the source:
- tar xzvf privoxy-&p-version;-src.tar.gz cd privoxy-&p-version; - For retrieving the current CVS sources, you'll need a CVS client installed. @@ -54,13 +52,11 @@ documentation, which might give commands like: - cvs -d:pserver:anonymous@ijbswa.cvs.sourceforge.net:/cvsroot/ijbswa login cvs -z3 -d:pserver:anonymous@ijbswa.cvs.sourceforge.net:/cvsroot/ijbswa co current cd current - This will create a directory named current/, which will @@ -88,17 +84,13 @@ /etc/passwd might then look like: - privoxy:*:7777:7777:privoxy proxy:/no/home:/no/shell - And then /etc/group, like: - privoxy:*:7777: - Some binary packages may do this for you. @@ -108,7 +100,6 @@ Then, to build from either unpacked tarball or CVS source: - autoheader autoconf @@ -117,18 +108,15 @@ su # Possibly required make -n install # (to see where all the files will go) make -s install # (to really install, -s to silence output) - Using GNU make, you can have the first four steps automatically done for you by just typing: - make - in the freshly downloaded or unpacked source directory. @@ -139,10 +127,8 @@ users cannot easily bypass the proxy (e.g. Go There Anyway), or alter their own configurations, configure like this: - ./configure --disable-toggle --disable-editor --disable-force - Note that all of these options can also be disabled through the configuration file. @@ -170,10 +156,8 @@ on the make command line, but be sure both already exist: - make -s install USER=privoxy GROUP=privoxy - The default installation path for make install is diff --git a/doc/source/changelog.sgml b/doc/source/changelog.sgml index dffdefcb..3d6094e5 100644 --- a/doc/source/changelog.sgml +++ b/doc/source/changelog.sgml @@ -30,11 +30,12 @@ for the previously released 3.0.25 beta which introduced client-specific tags and included a couple of minor improvements. - + Bug fixes: + @@ -44,11 +45,11 @@ - General improvements: + @@ -74,11 +75,11 @@ - Documentation improvements: + @@ -102,11 +103,11 @@ - Infrastructure improvements: + @@ -115,11 +116,11 @@ - Build system improvements: + @@ -137,20 +138,19 @@ - - Changes between Privoxy 3.0.25 beta and the previous release: - + Bug fixes: + @@ -170,11 +170,11 @@ - General improvements: + @@ -243,11 +243,11 @@ - Action file improvements: + @@ -262,11 +262,11 @@ - Documentation improvements: + @@ -398,11 +398,11 @@ - Infrastructure improvements: + @@ -423,11 +423,11 @@ - Build system improvements: + @@ -509,11 +509,11 @@ - Privoxy-Regression-Test: + @@ -555,7 +555,6 @@ - - + diff --git a/doc/source/contacting.sgml b/doc/source/contacting.sgml index a75197d0..4451e9d2 100644 --- a/doc/source/contacting.sgml +++ b/doc/source/contacting.sgml @@ -65,7 +65,6 @@ Please be sure to provide the following information when reporting problems or requesting support: - @@ -128,6 +127,7 @@ is being used and the following debug options are enabled (all of them): + debug 1 # Log the destination for each request Privoxy let through. # See also debug 1024. debug 2 # show each connection status @@ -141,14 +141,15 @@ debug 1024 # Log the destination for requests Privoxy didn't let through, debug 4096 # Startup banner and warnings. debug 8192 # Non-fatal errors debug 65536 # Log applying actions - If you are having trouble with a filter, please additionally enable + debug 64 # debug regular expression filters + If you suspect that Privoxy interprets the request or the response incorrectly, please enable - debug 32768 # log all data read from the network + debug 32768 # log all data read from the network It's easy for us to ignore log messages that aren't relevant but missing log messages may make it impossible to investigate a problem. If you aren't @@ -163,7 +164,6 @@ debug 65536 # Log applying actions - You don't have to tell us your actual name when filing a problem diff --git a/doc/source/developer-manual.sgml b/doc/source/developer-manual.sgml index 1d82805c..89d0b004 100644 --- a/doc/source/developer-manual.sgml +++ b/doc/source/developer-manual.sgml @@ -231,7 +231,6 @@ Hal. Basic Guidelines, for all branches: - Please don't commit even @@ -267,7 +266,6 @@ Hal. - @@ -2071,6 +2058,7 @@ $ afl-fuzz -i input/ -o output/ -f bla.filter -m none privoxy --fuzz filter bla. First you need to determine which version number the release will have. Privoxy version numbers consist of three numbers, separated by dots, like in X.Y.Z (e.g. 3.0.0), where: + @@ -2122,7 +2110,6 @@ $ afl-fuzz -i input/ -o output/ -f bla.filter -m none privoxy --fuzz filter bla. - In summary, the main CVS trunk is the development branch where new features are being worked on for the next stable series. This should @@ -2155,7 +2142,6 @@ $ afl-fuzz -i input/ -o output/ -f bla.filter -m none privoxy --fuzz filter bla. The following must be done by one of the developers prior to each new release. - @@ -2184,13 +2170,13 @@ $ afl-fuzz -i input/ -o output/ -f bla.filter -m none privoxy --fuzz filter bla. If action file processing has changed and is not backward-compatible, make sure the "for-privoxy-version=x.y.z" minimum version number in default.action.master has been updated: + {{settings}} ############################################################################# #MASTER# COMMENT: The minimum Privoxy version: for-privoxy-version=3.0.11 - @@ -2255,7 +2241,6 @@ for-privoxy-version=3.0.11 - @@ -2272,14 +2257,12 @@ for-privoxy-version=3.0.11 asked for a password): - mkdir dist # delete or choose different name if it already exists cd dist cvs -d:pserver:anonymous@ijbswa.cvs.sourceforge.net:/cvsroot/ijbswa login cvs -z3 -d:pserver:anonymous@ijbswa.cvs.sourceforge.net:/cvsroot/ijbswa export -r v_X_Y_Z current - Do NOT change a single bit, including, but not limited to @@ -2311,7 +2294,6 @@ for-privoxy-version=3.0.11 Please keep these general guidelines in mind when putting together your package. These apply to all platforms! - @@ -2420,7 +2402,6 @@ for-privoxy-version=3.0.11 - @@ -2430,28 +2411,22 @@ for-privoxy-version=3.0.11 version into an empty directory. (See "Building and releasing packages" above). Then run: - cd current autoheader && autoconf && ./configure - Then do: - make tarball-dist - To upload the package to Sourceforge, simply issue - make tarball-upload - Go to the displayed URL and release the file publicly on Sourceforge. For the change log field, use the relevant section of the @@ -2484,28 +2459,22 @@ for-privoxy-version=3.0.11 Then run: - cd current autoheader && autoconf && ./configure - Then do - make dist-dist - To upload the package to Sourceforge, simply issue - make dist-upload rpm_packagerev - where rpm_packagerev is the RPM release number as determined above. @@ -2520,11 +2489,9 @@ for-privoxy-version=3.0.11 version into an empty directory. (See "Building and releasing packages" above). Then get the OS/2 Setup module: - cvs -z3 -d:pserver:anonymous@ijbswa.cvs.sourceforge.net:/cvsroot/ijbswa co os2setup - You will need a mix of development tools. The main compilation takes place with IBM Visual Age C++. @@ -2540,28 +2507,22 @@ for-privoxy-version=3.0.11 Edit the os2build.cmd file to set the final executable filename. For example, - installExeName='privoxyos2_setup_X.Y.Z.exe' - Next, edit the IJB.wis file so the release number matches in the PACKAGEID section: - PACKAGEID="Privoxy Team\Privoxy\Privoxy Package\X\Y\Z" - You're now ready to build. Run: - os2build - You will find the WarpIN-installable executable in the ./files directory. Upload this anonymously to @@ -2575,31 +2536,25 @@ for-privoxy-version=3.0.11 Login to Sourceforge's compilefarm via ssh: - ssh cf.sourceforge.net - Choose the right operating system (not the Debian one). When logged in, make sure that you have freshly exported the right version into an empty directory. (See "Building and releasing packages" above). Then run: - cd current autoheader && autoconf && ./configure - Then run - gmake solaris-dist - which creates a gzip'ed tar archive. Sadly, you cannot use make solaris-upload on the Sourceforge machine (no ncftpput). You now have @@ -2620,22 +2575,18 @@ for-privoxy-version=3.0.11 version into an empty directory. (See "Building and releasing packages" above). Then get the Windows setup module: - cvs -z3 -d:pserver:anonymous@ijbswa.cvs.sourceforge.net:/cvsroot/ijbswa co winsetup - Then you can build the package. This is fully automated, and is controlled by winsetup/GNUmakefile. All you need to do is: - cd winsetup make - Now you can manually rename privoxy_setup.exe to privoxy_setup_X_Y_Z.exe, and upload it to @@ -2652,30 +2603,24 @@ for-privoxy-version=3.0.11 entry to debian/changelog, if it is not already there, for example by running: - debchange -v &p-version;-&p-status;-1 "New upstream version" - Then, run: - dpkg-buildpackage -rfakeroot -us -uc -b - This will create ../privoxy_&p-version;-&p-status;-1_i386.deb which can be uploaded. To upload the package to Sourceforge, simply issue - make debian-upload - Mac OS X @@ -2695,10 +2640,10 @@ for-privoxy-version=3.0.11 The OSXPackageBuilder module generates OS X installer packages supporting all Macs running OS X 10.4 and above. Obtain it from CVS as follows into a folder parallel to the exported privoxy source: + cvs -z3 -d:pserver:anonymous@ijbswa.cvs.sourceforge.net:/cvsroot/ijbswa co OSXPackageBuilder - The module contains complete instructions on its usage in the file OS X Package Builder HOWTO.txt. @@ -2722,19 +2667,17 @@ for-privoxy-version=3.0.11 Check out the module from CVS as follows into a folder parallel to the exported privoxy source: + cvs -z3 -d:pserver:anonymous@ijbswa.cvs.sourceforge.net:/cvsroot/ijbswa co osxsetup - Then run: - cd osxsetup build - This will run autoheader, autoconf and configure as well as make. @@ -2747,11 +2690,9 @@ for-privoxy-version=3.0.11 package" button. If you specify ./Privoxy.pkg as the output package name, you can then create the distributable zip file with the command: - zip -r privoxyosx_setup_x.y.z.zip Privoxy.pkg - You can then upload this file directly to the Files section of the Sourceforge project in the Macintosh (OS X) folder. Each new version @@ -2770,10 +2711,10 @@ for-privoxy-version=3.0.11 Check out the module from CVS as follows into a folder parallel to the exported privoxy source: + cvs -z3 -d:pserver:anonymous@ijbswa.cvs.sourceforge.net:/cvsroot/ijbswa co macsetup - The module contains complete instructions on its usage in its README file. The end result will be the @@ -2797,7 +2738,6 @@ for-privoxy-version=3.0.11 to SourceForge, and go through the release steps. The upload is done via FTP: - @@ -2815,7 +2755,6 @@ for-privoxy-version=3.0.11 - Or use the make targets as described above. @@ -2877,11 +2816,9 @@ for-privoxy-version=3.0.11 If you have changed anything in the stable-branch documentation source SGML files, do: - make dok - That will generate doc/webserver/user-manual, doc/webserver/developer-manual, @@ -2904,11 +2841,9 @@ for-privoxy-version=3.0.11 Next, commit any changes from the above steps to CVS. All set? If these are docs in the stable branch, then do: - make webserver - This will do the upload to the webserver (www.privoxy.org) and ensure all files and directories diff --git a/doc/source/faq.sgml b/doc/source/faq.sgml index afe66dab..a9ee01f8 100644 --- a/doc/source/faq.sgml +++ b/doc/source/faq.sgml @@ -935,12 +935,10 @@ the differences? for them in the user.action file. An example for yahoo might look like: - # Allow all cookies for Yahoo login: # { -crunch-incoming-cookies -crunch-outgoing-cookies -session-cookies-only } .login.yahoo.com - These kinds of sites are often quite complex and heavy with Javascript and @@ -949,13 +947,11 @@ the differences? url="../user-manual/actions-file.html#ALIASES">alias just for such sticky situations: - # Gmail is a _fragile_ site: # { fragile } # Gmail is ... mail.google.com - Be sure to flush your browser's caches whenever making these kinds of changes, just to make sure the changes take. @@ -1106,10 +1102,8 @@ with a browser? Does that not raise security issues? should look like: - listen-address 192.168.1.1:8118 - Save the file, and restart Privoxy. Configure @@ -1121,10 +1115,8 @@ with a browser? Does that not raise security issues? all available interfaces: - listen-address :8118 - And then use Privoxy's @@ -1397,11 +1389,9 @@ and thus avoid individual browser configuration? To disable all cookie actions, so that cookies are allowed unrestricted, both in and out, for example.com: - { -crunch-incoming-cookies -crunch-outgoing-cookies -session-cookies-only -filter{content-cookies} } .example.com - Place the above in user.action. Note that some of these may be off by default anyway, so this might be redundant, but there is no harm @@ -1492,16 +1482,13 @@ and thus avoid individual browser configuration? can very easily over-ride all blocking with the following very simple rule in your user.action: - # Unblock everybody, everywhere { -block } / # UN-Block *all* URLs - Or even a more comprehensive reversing of various ad related actions: - # Unblock everybody, everywhere, and turn off appropriate filtering, etc { -block \ @@ -1510,7 +1497,6 @@ and thus avoid individual browser configuration? allow-popups \ } / # UN-Block *all* URLs and allow ads - This last action in this compound statement, allow-popups, is an BLOCKED page? available as compile-time options. You should configure the sources as follows: - ./configure --disable-toggle --disable-editor --disable-force - This will create an executable with hard-coded security features so that &my-app; does not allow easy bypassing of blocked sites, or changing the @@ -1855,11 +1839,9 @@ us help you. Your efforts are not wasted, and we do appreciate them. forwarding section and uncomment the line: - # forward-socks5t / 127.0.0.1:9050 . - Note that if you got Tor through one of the bundles, you may have to change the port from 9050 to 9150 (or even another one). @@ -1872,13 +1854,11 @@ us help you. Your efforts are not wasted, and we do appreciate them. uncomment the following forward rules, to make sure your local network is still reachable through Privoxy: - # forward 192.168.*.*/ . # forward 10.*.*.*/ . # forward 127.*.*.*/ . - Unencrypted connections to systems in these address ranges will be as (un)secure as the local network is, but the alternative is @@ -1892,11 +1872,9 @@ us help you. Your efforts are not wasted, and we do appreciate them. network by using their names, you will need additional exceptions that look like this: - # forward localhost/ . - Save the modified configuration file and open http://config.privoxy.org/show-status @@ -2241,14 +2219,12 @@ altered it! Yikes, what is wrong! your hosts list is neglected by Privoxy's configuration, consider adding your list to your user.action file: - { +block } www.ad.example1.com ad.example2.com ads.galore.example.com etc.example.com - @@ -2344,7 +2320,6 @@ and related issues? There are several possibilities: - Privoxy is not running. Solution: verify @@ -2364,7 +2339,6 @@ and related issues? try disabling or removing the firewall as a simple test. - @@ -2417,7 +2391,6 @@ still getting through. How? our job a little easier. &my-app; has crunched (meaning caught and BLOCKED) quite a few items in this example, but perhaps missed a few as well. - - Despite 12 out of 32 requests being blocked, the page looked, and seemed to behave perfectly normal (minus some ads, of course). @@ -2915,14 +2887,12 @@ browsing has slowed to a crawl. What gives? To do that, enable logging to figure out which requests get blocked by &my-app; and add the hosts (no path patterns) to a section like this: - - Additionally you have to configure your browser to contact 127.0.0.1:0 directly (instead of through &my-app;). @@ -3047,11 +3017,12 @@ browsing has slowed to a crawl. What gives? Your userid probably isn't allowed to edit the file. On Windows you can use the windows equivalent of sudo: - runas /user:administrator "notepad \privoxy\config.txt" + runas /user:administrator "notepad \privoxy\config.txt" or fix the file permissions: +C:\Privoxy>icacls config.txt config.txt BUILTIN\Administrators:(I)(F) NT AUTHORITY\SYSTEM:(I)(F) @@ -3074,7 +3045,6 @@ config.txt I3668\Lee:(F) Successfully processed 1 files; Failed processing 0 files C:\Privoxy> - or try to point-n-click your way through adjusting the file diff --git a/doc/source/newfeatures.sgml b/doc/source/newfeatures.sgml index f83de65b..44f73c06 100644 --- a/doc/source/newfeatures.sgml +++ b/doc/source/newfeatures.sgml @@ -21,7 +21,7 @@ faq --> - + + Supports "Connection: keep-alive". Outgoing connections can @@ -141,4 +142,4 @@ - + diff --git a/doc/source/p-config.sgml b/doc/source/p-config.sgml index d509c42f..788dc7b6 100644 --- a/doc/source/p-config.sgml +++ b/doc/source/p-config.sgml @@ -251,30 +251,22 @@ II. FORMAT OF THE CONFIGURATION FILE Unix, in local filesystem (may not work with all browsers): -   user-manual  file:///usr/share/doc/privoxy-&p-version;/user-manual/ - Windows, in local filesystem, must use forward slash notation: -   user-manual  file:/c:/some-dir/privoxy-&p-version;/user-manual/ - Windows, UNC notation (with forward slashes): -   user-manual  file://///some-server/some-path/privoxy-&p-version;/user-manual/ - --> The best all purpose solution is simply to put the full local PATH to where the User Manual is located: -   user-manual  /usr/share/doc/privoxy/user-manual - The User Manual is then available to anyone with access to Privoxy, by following the built-in URL: @@ -285,9 +277,7 @@ II. FORMAT OF THE CONFIGURATION FILE If the documentation is not on the local system, it can be accessed from a remote server, as: -   user-manual  http://example.com/privoxy/user-manual/ - @@ -1035,7 +1025,6 @@ actionsfile The available debug levels are: - debug 1 # Log the destination for each request &my-app; let through. See also debug 1024. debug 2 # show each connection status @@ -1054,7 +1043,6 @@ actionsfile debug 32768 # log all data read from the network debug 65536 # Log the applying actions - To select multiple debug levels, you can either add them or use multiple debug lines. @@ -1329,21 +1317,17 @@ actionsfile (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 - Suppose you are running Privoxy on an IPv6-capable machine and you want it to listen on the IPv6 address of the loopback device: - listen-address [::1]:8118 - @@ -1790,49 +1774,39 @@ ACLs: permit-access and deny-access 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 (or other domains hosted on the same system): - 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 the IP address behind www.dirty-stuff.example.com: - permit-access 192.168.45.64/26 deny-access 192.168.45.73 www.dirty-stuff.example.com - Allow access from the IPv4 network 192.0.2.0/24 even if listening on an IPv6 wild card address (not supported on all platforms): - permit-access 192.0.2.0/24 - This is equivalent to the following line even if listening on an IPv4 address (not supported on all platforms): - permit-access [::ffff:192.0.2.0]/120 - @@ -2138,40 +2112,32 @@ ACLs: permit-access and deny-access Everything goes to an example parent proxy, except SSL on port 443 (which it doesn't handle): - forward / parent-proxy.example.org:8080 forward :443 . - Everything goes to our example ISP's caching proxy, except for requests to that ISP's sites: - forward / caching-proxy.isp.example.net:8000 forward .isp.example.net . - Parent proxy specified by an IPv6 address: - forward / [2001:DB8::1]:8000 - Suppose your parent proxy doesn't support IPv6: - forward / parent-proxy.example.org:8000 forward ipv6-server.example.org . forward <[2-3][0-9a-f][0-9a-f][0-9a-f]:*> . - @@ -2276,30 +2242,24 @@ forward-socks4, forward-socks4a, forward-socks5 and forward-socks5t 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.isp.example.net:8080 forward .example.com . - A rule that uses a SOCKS 4 gateway for all destinations but no HTTP parent looks like this: - forward-socks4 / socks-gw.example.com:1080 . - To chain Privoxy and Tor, both running on the same system, you would use something like: - forward-socks5t / 127.0.0.1:9050 . - Note that if you got Tor through one of the bundles, you may have to change the port from 9050 to 9150 (or even another one). @@ -2311,13 +2271,11 @@ forward-socks4, forward-socks4a, forward-socks5 and forward-socks5t reach your local network, if you need to access local servers you therefore might want to make some exceptions: - forward 192.168.*.*/ . forward 10.*.*.*/ . forward 127.*.*.*/ . - Unencrypted connections to systems in these address ranges will be as (un)secure as the local network is, but the alternative is that you @@ -2330,11 +2288,9 @@ forward-socks4, forward-socks4a, forward-socks5 and forward-socks5t using their names, you will need additional exceptions that look like this: - forward localhost/ . - @@ -2362,23 +2318,19 @@ forward-socks4, forward-socks4a, forward-socks5 and forward-socks5t host-a: - forward / . forward .isp-b.example.net host-b:8118 - host-b: - forward / . forward .isp-a.example.org host-a:8118 - Now, your users can set their browser's proxy to use either @@ -2397,7 +2349,6 @@ forward-socks4, forward-socks4a, forward-socks5 and forward-socks5t run on the same box, your squid configuration could then look like this: - # Define Privoxy as parent proxy (without ICP) cache_peer 127.0.0.1 parent 8118 7 no-query @@ -2410,7 +2361,6 @@ forward-socks4, forward-socks4a, forward-socks5 and forward-socks5t # 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. @@ -2423,11 +2373,9 @@ forward-socks4, forward-socks4a, forward-socks5 and forward-socks5t say, on antivir.example.com, port 8010: - forward / . forward /.*\.(exe|com|dll|zip)$ antivir.example.com:8010 - ]]> @@ -3495,7 +3443,6 @@ forward-socks4, forward-socks4a, forward-socks5 and forward-socks5t Examples: - # Best speed (compared to the other levels) compression-level 1 @@ -3508,7 +3455,6 @@ forward-socks4, forward-socks4a, forward-socks5 and forward-socks5t # is likely to be flawed. compression-level 0 - @@ -3656,14 +3602,12 @@ forward-socks4, forward-socks4a, forward-socks5 and forward-socks5t Examples: - # Define a couple of tags, the described effect requires action sections # that are enabled based on CLIENT-TAG patterns. client-specific-tag circumvent-blocks Overrule blocks but do not affect other actions disable-content-filters Disable content-filters but do not affect other actions - @@ -3721,12 +3665,10 @@ forward-socks4, forward-socks4a, forward-socks5 and forward-socks5t Examples: - # Increase the time to life for temporarily enabled tags to 3 minutes client-tag-lifetime 180 - @@ -3795,13 +3737,11 @@ forward-socks4, forward-socks4a, forward-socks5 and forward-socks5t Examples: - # Allow systems that can reach Privoxy to provide the client # IP address with a X-Forwarded-For header. trust-x-forwarded-for 1 - @@ -3870,12 +3810,10 @@ forward-socks4, forward-socks4a, forward-socks5 and forward-socks5t Examples: - # Increase the receive buffer size receive-buffer-size 32768 - diff --git a/doc/source/seealso.sgml b/doc/source/seealso.sgml index 04b06510..b86189d8 100644 --- a/doc/source/seealso.sgml +++ b/doc/source/seealso.sgml @@ -32,7 +32,6 @@ users: - ]]> - + diff --git a/doc/source/user-manual.sgml b/doc/source/user-manual.sgml index e512472a..68a53abf 100644 --- a/doc/source/user-manual.sgml +++ b/doc/source/user-manual.sgml @@ -409,7 +409,6 @@ How to install the binary packages depends on your operating system: versions of Privoxy: - @@ -494,11 +493,9 @@ How to install the binary packages depends on your operating system: that filtering does not work on compressed pages, so if you use, or want to use, filtering, you will need to force compression off. Example: - { +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 @@ -526,14 +523,13 @@ How to install the binary packages depends on your operating system: --> -Quickstart to Using Privoxy - + @@ -633,7 +629,6 @@ How to install the binary packages depends on your operating system: - @@ -710,7 +705,6 @@ How to install the binary packages depends on your operating system: set-image-blocker: - @@ -785,7 +779,6 @@ How to install the binary packages depends on your operating system: - Advanced users will eventually want to explore &my-app; @@ -831,7 +824,6 @@ How to install the binary packages depends on your operating system: A quick and simple step by step example: - @@ -855,7 +847,6 @@ How to install the binary packages depends on your operating system: -
Actions Files in Use @@ -866,7 +857,6 @@ How to install the binary packages depends on your operating system:
-
@@ -901,7 +891,6 @@ How to install the binary packages depends on your operating system: - This is a very crude and simple example. There might be good reasons to use a @@ -949,7 +938,6 @@ How to install the binary packages depends on your operating system: -
Proxy Configuration Showing Mozilla/Netscape HTTP and HTTPS (SSL) Settings @@ -961,7 +949,6 @@ How to install the binary packages depends on your operating system:
-
@@ -1010,7 +997,6 @@ How to install the binary packages depends on your operating system: -
Proxy Configuration Showing Internet Explorer HTTP and HTTPS (Secure) Settings @@ -1022,7 +1008,6 @@ How to install the binary packages depends on your operating system:
-
@@ -1050,11 +1035,9 @@ How to install the binary packages depends on your operating system: /etc/privoxy/config as its main configuration file. - # /etc/init.d/privoxy start - @@ -1073,11 +1056,9 @@ How to install the binary packages depends on your operating system: To start Privoxy manually, run: - # service privoxy onestart - @@ -1103,11 +1084,9 @@ Click on the &my-app; Icon to start Privoxy. If no co Example Unix startup command: - # /usr/sbin/privoxy --user privoxy /etc/privoxy/config - Note that if you installed Privoxy through a package manager, the package will probably contain a platform-specific @@ -1254,7 +1233,6 @@ must find a better place for this paragraph command-line options: - @@ -1370,7 +1348,6 @@ must find a better place for this paragraph - On MS Windows only there are two additional @@ -1491,7 +1468,6 @@ for details. principle configuration files are: - @@ -1549,7 +1525,6 @@ for details. - The syntax of the configuration and filter files may change between different @@ -1635,7 +1610,6 @@ for details. are three action files included with Privoxy with differing purposes: - @@ -1698,7 +1672,6 @@ for details. The default profiles, and their associated actions, as pre-defined in default.action are: -
Default Configurations @@ -1816,11 +1789,9 @@ for details.
- - The list of actions files to be used are defined in the main configuration @@ -1944,14 +1915,12 @@ 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/ - You can trace this process for URL patterns and any given URL by visiting - # If the admin defined the client-specific-tag circumvent-blocks, # and the request comes from a client that previously requested @@ -2441,7 +2409,6 @@ CLIENT-TAG:^circumvent-blocks$ # the previous one. {+block{Nobody is supposed to request this.}} example.org/blocked-example-page - @@ -2478,18 +2445,15 @@ example.org/blocked-example-page
Actions fall into three categories: - Boolean, i.e the action can only be enabled or disabled. Syntax: - +name # enable action name -name # disable action name - Example: +handle-as-image @@ -2501,12 +2465,10 @@ 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 - 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. @@ -2525,13 +2487,11 @@ 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 - Examples: +add-header{X-Fun-Header: Some text} and +filter{html-annoyances} @@ -2539,7 +2499,6 @@ example.org/blocked-example-page - If nothing is specified in any actions file, no actions are @@ -2634,7 +2593,6 @@ example.org/blocked-example-page Example usage: - # Add a DNT ("Do not track") header to all requests, # event to those that already have one. # @@ -2645,7 +2603,6 @@ example.org/blocked-example-page # header may make user-tracking easier. {+add-header{DNT: 1}} / - @@ -2734,7 +2691,6 @@ example.org/blocked-example-page Example usage (section): - {+block{No nasty stuff for you.}} # Block and replace with "blocked" page .nasty-stuff.example.com @@ -2747,7 +2703,6 @@ example.org/blocked-example-page {+block{Layered ads.} +handle-as-empty-document} # Block and then ignore adserver.example.net/.*\.js$ - @@ -2818,9 +2773,7 @@ example.org/blocked-example-page Example usage: - +change-x-forwarded-for{block} - @@ -2898,13 +2851,11 @@ example.org/blocked-example-page Example usage (section): - # Hide Tor exit notation in Host and Referer Headers {+client-header-filter{hide-tor-exit-notation}} / - - + @@ -2973,7 +2924,6 @@ example.org/blocked-example-page Example usage (section): - # Tag every request with the User-Agent header {+client-header-tagger{user-agent}} @@ -2998,8 +2948,7 @@ TAG:^User-Agent: fetch libfetch/ TAG:^User-Agent: Ubuntu APT-HTTP/ TAG:^User-Agent: MPlayer/ - - + # Tag all requests with the Range header set {+client-header-tagger{range-requests}} @@ -3014,8 +2963,7 @@ TAG:^User-Agent: MPlayer/ {-filter -deanimate-gifs} TAG:^RANGE-REQUEST$ - - + # Tag all requests with the client IP address # @@ -3029,7 +2977,6 @@ TAG:^RANGE-REQUEST$ {+forward-override{forward-socks5 127.0.1.2:2222 .}} TAG:^IP-ADDRESS: 10\.0\.0\.1$ - @@ -3129,7 +3076,6 @@ TAG:^IP-ADDRESS: 10\.0\.0\.1$ Example usage (sections): - # Check if www.example.net/ really uses valid XHTML { +content-type-overwrite{application/xml} } www.example.net/ @@ -3139,7 +3085,6 @@ www.example.net/ www.example.net/.*\.css$ www.example.net/.*style - @@ -3218,12 +3163,10 @@ new action Example usage (section): - # Block the non-existent "Privacy-Violation:" client header { +crunch-client-header{Privacy-Violation:} } / - @@ -3300,14 +3243,12 @@ new action Example usage (section): - # Let the browser revalidate cached documents but don't # allow the server to use the revalidation headers for user tracking. {+hide-if-modified-since{-60} \ +overwrite-last-modified{randomize} \ +crunch-if-none-match} / - @@ -3375,9 +3316,7 @@ new action Example usage: - +crunch-incoming-cookies - @@ -3454,11 +3393,9 @@ new action Example usage (section): - # Crunch server headers that try to prevent caching { +crunch-server-header{no-cache} } / - @@ -3525,9 +3462,7 @@ new action Example usage: - +crunch-outgoing-cookies - @@ -3595,9 +3530,7 @@ new action Example usage: - +deanimate-gifs{last} - @@ -3667,10 +3600,8 @@ new action Example usage (section): - {+downgrade-http-version} problem-host.example.com - @@ -3757,9 +3688,7 @@ problem-host.example.com Example usage: - +external-filter{fancy-filter} - @@ -3874,14 +3803,12 @@ problem-host.example.com Example usage: - { +fast-redirects{simple-check} } one.example.com { +fast-redirects{check-decoded-url} } another.example.com/testing - @@ -4023,112 +3950,112 @@ problem-host.example.com - +filter{js-annoyances} # Get rid of particularly annoying JavaScript abuse. + +filter{js-annoyances} # Get rid of particularly annoying JavaScript abuse. - +filter{js-events} # Kill JavaScript event bindings and timers (Radically destructive! Only for extra nasty sites). + +filter{js-events} # Kill JavaScript event bindings and timers (Radically destructive! Only for extra nasty sites). - +filter{html-annoyances} # Get rid of particularly annoying HTML abuse. + +filter{html-annoyances} # Get rid of particularly annoying HTML abuse. - +filter{content-cookies} # Kill cookies that come in the HTML or JS content. + +filter{content-cookies} # Kill cookies that come in the HTML or JS content. - +filter{refresh-tags} # Kill automatic refresh tags if refresh time is larger than 9 seconds. + +filter{refresh-tags} # Kill automatic refresh tags if refresh time is larger than 9 seconds. - +filter{unsolicited-popups} # Disable only unsolicited pop-up windows. + +filter{unsolicited-popups} # Disable only unsolicited pop-up windows. - +filter{all-popups} # Kill all popups in JavaScript and HTML. + +filter{all-popups} # Kill all popups in JavaScript and HTML. - +filter{img-reorder} # Reorder attributes in <img> tags to make the banners-by-* filters more effective. + +filter{img-reorder} # Reorder attributes in <img> tags to make the banners-by-* filters more effective. - +filter{banners-by-size} # Kill banners by size. + +filter{banners-by-size} # Kill banners by size. - +filter{banners-by-link} # Kill banners by their links to known clicktrackers. + +filter{banners-by-link} # Kill banners by their links to known clicktrackers. - +filter{webbugs} # Squish WebBugs (1x1 invisible GIFs used for user tracking). + +filter{webbugs} # Squish WebBugs (1x1 invisible GIFs used for user tracking). - +filter{tiny-textforms} # Extend those tiny textareas up to 40x80 and kill the hard wrap. + +filter{tiny-textforms} # Extend those tiny textareas up to 40x80 and kill the hard wrap. - +filter{jumping-windows} # Prevent windows from resizing and moving themselves. + +filter{jumping-windows} # Prevent windows from resizing and moving themselves. - +filter{frameset-borders} # Give frames a border and make them resizable. + +filter{frameset-borders} # Give frames a border and make them resizable. - +filter{iframes} # Removes all detected iframes. Should only be enabled for individual sites. + +filter{iframes} # Removes all detected iframes. Should only be enabled for individual sites. - +filter{demoronizer} # Fix MS's non-standard use of standard charsets. + +filter{demoronizer} # Fix MS's non-standard use of standard charsets. - +filter{shockwave-flash} # Kill embedded Shockwave Flash objects. + +filter{shockwave-flash} # Kill embedded Shockwave Flash objects. - +filter{quicktime-kioskmode} # Make Quicktime movies saveable. + +filter{quicktime-kioskmode} # Make Quicktime movies saveable. - +filter{fun} # Text replacements for subversive browsing fun! + +filter{fun} # Text replacements for subversive browsing fun! - +filter{crude-parental} # Crude parental filtering. Note that this filter doesn't work reliably. + +filter{crude-parental} # Crude parental filtering. Note that this filter doesn't work reliably. - +filter{ie-exploits} # Disable some known Internet Explorer bug exploits. + +filter{ie-exploits} # Disable some known Internet Explorer bug exploits. - +filter{site-specifics} # Cure for site-specific problems. Don't apply generally! + +filter{site-specifics} # Cure for site-specific problems. Don't apply generally! - +filter{no-ping} # Removes non-standard ping attributes in <a> and <area> tags. + +filter{no-ping} # Removes non-standard ping attributes in <a> and <area> tags. - +filter{google} # CSS-based block for Google text ads. Also removes a width limitation and the toolbar advertisement. + +filter{google} # CSS-based block for Google text ads. Also removes a width limitation and the toolbar advertisement. - +filter{yahoo} # CSS-based block for Yahoo text ads. Also removes a width limitation. + +filter{yahoo} # CSS-based block for Yahoo text ads. Also removes a width limitation. - +filter{msn} # CSS-based block for MSN text ads. Also removes tracking URLs and a width limitation. + +filter{msn} # CSS-based block for MSN text ads. Also removes tracking URLs and a width limitation. - +filter{blogspot} # Cleans up some Blogspot blogs. Read the fine print before using this. + +filter{blogspot} # Cleans up some Blogspot blogs. Read the fine print before using this. @@ -4198,11 +4125,9 @@ new action Example usage: - +force-text-mode - @@ -4331,7 +4256,6 @@ new action Example usage: - # Use an ssh tunnel for requests previously tagged as # User-Agent: fetch libfetch/2.0 and make sure @@ -4349,7 +4273,6 @@ new action } TAG:^User-Agent: fetch libfetch/2\.0$ - @@ -4421,13 +4344,11 @@ new action Example usage: - # Block all documents on example.org that end with ".js", # but send an empty document instead of the usual HTML message. {+block{Blocked JavaScript} +handle-as-empty-document} example.org/.*\.js$ - @@ -4502,7 +4423,6 @@ example.org/.*\.js$ Example usage (sections): - # Generic image extensions: # {+handle-as-image} @@ -4514,7 +4434,6 @@ example.org/.*\.js$ {+block{Nasty banners.} +handle-as-image} nasty-banner-server.example.com/junk.cgi\?output=trash - @@ -4594,13 +4513,11 @@ new action Example usage (section): - # Pretend to use Canadian language settings. {+hide-accept-language{en-ca} \ +hide-user-agent{Mozilla/5.0 (X11; U; OpenBSD i386; en-CA; rv:1.8.0.4) Gecko/20060628 Firefox/1.5.0.4} \ } / - @@ -4684,13 +4601,11 @@ new action Example usage: - # Disarm the download link in Sourceforge's patch tracker { -filter \ +content-type-overwrite{text/plain}\ +hide-content-disposition{block} } .sourceforge.net/tracker/download\.php - @@ -4773,13 +4688,11 @@ new action Example usage (section): - # Let the browser revalidate but make tracking based on the time less likely. {+hide-if-modified-since{-60} \ +overwrite-last-modified{randomize} \ +crunch-if-none-match} / - @@ -4848,10 +4761,9 @@ new action Example usage: - - +hide-from-header{block} or + +hide-from-header{block} + or +hide-from-header{spam-me-senseless@sittingduck.example.com} - @@ -4952,10 +4864,9 @@ new action Example usage: - - +hide-referrer{forge} or + +hide-referrer{forge} + or +hide-referrer{http://www.yahoo.com/} - @@ -5034,9 +4945,7 @@ new action Example usage: - +hide-user-agent{Netscape 6.1 (X11; I; Linux 2.4.18 i686)} - @@ -5112,13 +5021,11 @@ new action - +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 - @@ -5203,10 +5110,7 @@ new action Example usages: - - +limit-cookie-lifetime{60} - - + +limit-cookie-lifetime{60} @@ -5292,7 +5196,6 @@ new action Example usage (sections): - # Selectively turn off compression, and enable a filter # @@ -5311,7 +5214,6 @@ new action # { -prevent-compression } .compusa.com/ - @@ -5403,13 +5305,11 @@ new action Example usage: - # Let the browser revalidate without being tracked across sessions { +hide-if-modified-since{-60} \ +overwrite-last-modified{randomize} \ +crunch-if-none-match} / - @@ -5500,7 +5400,6 @@ new action Example usages: - # Replace example.com's style sheet with another one { +redirect{http://localhost/css-replacements/example.com.css} } example.com/stylesheet\.css @@ -5541,7 +5440,6 @@ i[0-9][0-9][0-9][0-9]*/ # to the local version delivered by Privoxy {+redirect{s@^http://www@http://config@}} www.privoxy.org/user-manual/ - @@ -5615,7 +5513,6 @@ www.privoxy.org/user-manual/ Example usage (section): - {+server-header-filter{html-to-xml}} example.org/xml-instance-that-is-delivered-as-html @@ -5623,7 +5520,6 @@ example.org/xml-instance-that-is-delivered-as-html {+server-header-filter{xml-to-html}} example.org/instance-that-is-delivered-as-xml-but-is-not - @@ -5700,7 +5596,6 @@ example.org/instance-that-is-delivered-as-xml-but-is-not Example usage (section): - # Tag every request with the content type declared by the server {+server-header-tagger{content-type}} @@ -5713,8 +5608,7 @@ example.org/instance-that-is-delivered-as-xml-but-is-not # silly example. {+external-filter{rotate-image} +force-text-mode} TAG:^image/ - - + @@ -5807,9 +5701,7 @@ TAG:^image/ Example usage: - +session-cookies-only - @@ -5909,21 +5801,15 @@ TAG:^image/ Built-in pattern: - +set-image-blocker{pattern} - Redirect to the BSD daemon: - +set-image-blocker{http://www.freebsd.org/gifs/dae_up3.gif} - Redirect to the built-in pattern for better caching: - +set-image-blocker{http://config.privoxy.org/send-banner?type=pattern} - @@ -5990,7 +5876,6 @@ TAG:^image/ Now let's define some aliases... - # Useful custom aliases we can use later. # @@ -6018,7 +5903,6 @@ TAG:^image/ # c0 = +crunch-all-cookies c1 = -crunch-all-cookies - ...and put them to use. These sections would appear in the lower part of an @@ -6026,7 +5910,6 @@ TAG:^image/ up for the / pattern): - # These sites are either very complex or very keen on # user data and require minimal interference to work: @@ -6050,7 +5933,6 @@ TAG:^image/ {-filter{all-popups} -filter{unsolicited-popups}} .dabs.com .overclockers.co.uk - Aliases like shop and fragile are typically used for @@ -6101,7 +5983,6 @@ hal stop here multiple lines with line continuation. - { \ +change-x-forwarded-for{block} \ @@ -6110,7 +5991,6 @@ hal stop here } / # Match all URLs - The default behavior is now set. @@ -6137,14 +6017,12 @@ hal stop here that prevents older &my-app; versions from reading the file: - ########################################################################## # Settings -- Don't change! For internal Privoxy use ONLY. ########################################################################## {{settings}} for-privoxy-version=3.0.11 - After that comes the (optional) alias section. We'll use the example @@ -6152,7 +6030,6 @@ for-privoxy-version=3.0.11 that also explains why and how aliases are used: - ########################################################################## # Aliases @@ -6172,7 +6049,6 @@ for-privoxy-version=3.0.11 # fragile = -block -filter -crunch-all-cookies -fast-redirects -hide-referrer shop = -crunch-all-cookies -filter{all-popups} - The first of our specialized sections is concerned with fragile @@ -6183,7 +6059,6 @@ for-privoxy-version=3.0.11 of actions explicitly: - ########################################################################## # Exceptions for sites that'll break under the default action set: @@ -6195,7 +6070,6 @@ for-privoxy-version=3.0.11 .office.microsoft.com # surprise, surprise! .windowsupdate.microsoft.com mail.google.com - Shopping sites are not as fragile, but they typically @@ -6203,7 +6077,6 @@ mail.google.com carts or item details. Again, we'll use a pre-defined alias: - # Shopping sites: # @@ -6212,7 +6085,6 @@ mail.google.com .worldpay.com # for quietpc.com .jungle.com .scan.co.uk - The fast-redirects @@ -6220,7 +6092,6 @@ mail.google.com breaks some sites. So disable it for popular sites where we know it misbehaves: - { -fast-redirects } login.yahoo.com @@ -6229,7 +6100,6 @@ edit.*.yahoo.com .altavista.com/.*(like|url|link):http .altavista.com/trans.*urltext=http .nytimes.com - It is important that Privoxy knows which @@ -6244,7 +6114,6 @@ edit.*.yahoo.com good start: - ########################################################################## # Images: @@ -6255,7 +6124,6 @@ edit.*.yahoo.com # { +handle-as-image } /.*\.(gif|jpe?g|png|bmp|ico)$ - And then there are known banner sources. They often use scripts to @@ -6272,7 +6140,6 @@ edit.*.yahoo.com action before, it still applies and needn't be repeated: - # Known ad generators: # @@ -6284,7 +6151,6 @@ ar.atwola.com .a[0-9].yimg.com/(?:(?!/i/).)*$ bs*.gsanet.com .qkimg.net - One of the most important jobs of Privoxy @@ -6304,7 +6170,6 @@ bs*.gsanet.com to keep the example short: - ########################################################################## # Block these fine banners: @@ -6323,7 +6188,6 @@ count*. # Site-specific patterns (abbreviated): # .hitbox.com - It's quite remarkable how many advertisers actually call their banner @@ -6353,7 +6217,6 @@ count*. with no block action applying. - ########################################################################## # Save some innocent victims of the above generic block patterns: @@ -6377,7 +6240,6 @@ ad[ud]*. # (adult.* and add.*) # www.globalintersec.com/adv # (adv = advanced) www.ugu.com/sui/ugu/adv - Filtering source code can have nasty side effects, @@ -6387,7 +6249,6 @@ www.ugu.com/sui/ugu/adv disables all filters in one fell swoop! - # Don't filter code! # @@ -6397,7 +6258,6 @@ bugzilla. developer. wiki. .sourceforge.net - The actual default.action is of course much more @@ -6431,10 +6291,8 @@ wiki. - # My user.action file. <fred@example.com> - As aliases are local to the actions @@ -6442,7 +6300,6 @@ wiki. default.action, unless you repeat them here: - # Aliases are local to the file they are defined in. # (Re-)define aliases for this file: @@ -6472,7 +6329,6 @@ allow-ads = -block -filter{banners-by-size} -filter{banners-by-link} # Alias for specific file types that are text, but might have conflicting # MIME types. We want the browser to force these to be text documents. handle-as-text = -filter +-content-type-overwrite{text/plain} +-force-text-mode -hide-content-disposition - Say you have accounts on some sites that you visit regularly, and @@ -6483,30 +6339,25 @@ handle-as-text = -filter +-filter } .your-home-banking-site.com - Some file types you may not want to filter for various reasons: - # Technical documentation is likely to contain strings that might # erroneously get altered by the JavaScript-oriented filters: @@ -6518,7 +6369,6 @@ handle-as-text = -filter +-block action. Say you've @@ -6531,12 +6381,10 @@ stupid-server.example.com/ in default.action anyway: - { +block{Nasty ads.} } www.example.com/nasty-ads/sponsor\.gif another.example.net/more/junk/here/ - The URLs of dynamically generated banners, especially from large banner @@ -6550,14 +6398,12 @@ stupid-server.example.com/ browser. Use cautiously. - { +block-as-image } .doubleclick.net .fastclick.net /Realmedia/ads/ ar.atwola.com/ - Now you noticed that the default configuration breaks Forbes Magazine, @@ -6571,13 +6417,11 @@ stupid-server.example.com/ that misbehave, and add those to our personalized list of troublemakers: - { fragile } .forbes.com webmail.example.com .mybank.com - You like the fun text replacements in default.filter, @@ -6586,11 +6430,9 @@ stupid-server.example.com/ update-safe config, once and for all: - { +filter{fun} } / # For ALL sites! - Note that the above is not really a good idea: There are exceptions @@ -6607,13 +6449,11 @@ stupid-server.example.com/ sites that you feel provide value to you: - { allow-ads } .sourceforge.net .slashdot.org .osdn.net - Note that allow-ads has been aliased to @@ -6629,11 +6469,9 @@ stupid-server.example.com/ it should I choose to. - { handle-as-text } /.*\.sh$ - user.action is generally the best place to define @@ -6645,11 +6483,9 @@ stupid-server.example.com/ paths and patterns: - { +set-image-blocker{blank} } / # ALL sites - @@ -6761,9 +6597,7 @@ stupid-server.example.com/ like this: - FILTER: foo Replace all "foo" with "bar" - Below that line, and up to the next header line, come the jobs that @@ -6829,9 +6663,7 @@ stupid-server.example.com/ needed: - s/foo/bar/ - But wait! Didn't the comment say that all occurrences @@ -6840,17 +6672,14 @@ stupid-server.example.com/ we'll need to add the g option: - s/foo/bar/g - Our complete filter now looks like this: - + FILTER: foo Replace all "foo" with "bar" s/foo/bar/g - Let's look at some real filters for more interesting examples. Here you see @@ -6859,14 +6688,12 @@ s/foo/bar/g - FILTER: js-annoyances Get rid of particularly annoying JavaScript abuse # Get rid of JavaScript referrer tracking. Test page: http://www.randomoddness.com/untitled.htm # s|(<script.*)document\.referrer(.*</script>)|$1"Not Your Business!"$2|Usg - Following the header line and a comment, you see the job. Note that it uses @@ -6948,12 +6775,10 @@ s|(<script.*)document\.referrer(.*</script>)|$1"Not Your Business!"$2|U this time only point out the constructs of special interest: - # The status bar is for displaying link targets, not pointless blahblah # s/window\.status\s*=\s*(['"]).*?\1/dUmMy=1/ig - \s stands for whitespace characters (space, tab, newline, @@ -6976,12 +6801,10 @@ s/window\.status\s*=\s*(['"]).*?\1/dUmMy=1/ig you move your mouse over links. - # Kill OnUnload popups. Yummy. Test: http://www.zdnet.com/zdsubs/yahoo/tree/yfs.html # s/(<body [^>]*)onunload(.*>)/$1never$2/iU - Including the @@ -7002,14 +6825,12 @@ s/(<body [^>]*)onunload(.*>)/$1never$2/iU The last example is from the fun department: - FILTER: fun Fun text replacements # Spice the daily news: # s/microsoft(?!\.com)/MicroSuck/ig - Note the (?!\.com) part (a so-called negative lookahead) @@ -7019,7 +6840,6 @@ s/microsoft(?!\.com)/MicroSuck/ig still replacing the word everywhere else. - # Buzzword Bingo (example for extended regex syntax) # @@ -7035,7 +6855,6 @@ s* industry[ -]leading \ | unrivalled \ *<font color="red"><b>BINGO!</b></font> \ *igx - The x option in this job turns on extended syntax, and allows for @@ -7070,6 +6889,7 @@ pre-defined filters for your convenience: The purpose of this filter is to get rid of particularly annoying JavaScript abuse. To that end, it + @@ -7093,7 +6913,6 @@ pre-defined filters for your convenience: - Use with caution. This is an aggressive filter, and can break sites that rely heavily on JavaScript. @@ -7552,7 +7371,7 @@ pre-defined filters for your convenience: &my-app; will temporary store the content to filter in the temporary-directory. - + EXTERNAL-FILTER: cat Pointless example filter that doesn't actually modify the content /bin/cat @@ -7578,7 +7397,6 @@ EXTERNAL-FILTER: rotate-image Rotate an image by 180 degree. Test filter with li EXTERNAL-FILTER: citation-needed Adds a "[citation needed]" tag to an image. The coordinates may need adjustment. /usr/local/bin/convert - -pointsize 16 -fill white -annotate +17+418 "[citation needed]" - - @@ -7651,14 +7469,12 @@ EXTERNAL-FILTER: citation-needed Adds a "[citation needed]" tag to an image. The is in an alpha or beta development stage: - <!-- @if-unstable-start --> ... beta warning HTML code goes here ... <!-- if-unstable-end@ --> - If the "unstable" symbol is set, everything in between and including @@ -7666,9 +7482,7 @@ EXTERNAL-FILTER: citation-needed Adds a "[citation needed]" tag to an image. The will disappear, leaving nothing but an empty comment: - <!-- --> - There's also an if-then-else construct and an #include @@ -7721,9 +7535,8 @@ Requests License - + - @@ -7812,35 +7625,35 @@ Requests and then some examples: - + . - Matches any single character, e.g. a, A, 4, :, or @. - + - + ? - The preceding character or expression is matched ZERO or ONE times. Either/or. - + - + + - The preceding character or expression is matched ONE or MORE times. - + - + * - The preceding character or expression is matched ZERO or MORE times. - + - + \ - The escape character denotes that the following character should be taken literally. This is used where one of the @@ -7849,25 +7662,25 @@ Requests sure the period is recognized only as a period (and not expanded to its meta-character meaning of any single character). - + - + [ ] - Characters enclosed in brackets will be matched if any of the enclosed characters are encountered. For instance, [0-9] matches any numeric digit (zero through nine). As an example, we can combine this with + to match any digit one of more times: [0-9]+. - + - + ( ) - parentheses are used to group a sub-expression, or multiple sub-expressions. - + - + | - The bar character works like an or conditional statement. A match is successful if the @@ -7876,7 +7689,7 @@ Requests and would match either this example or that example, and nothing else. - + These are just some of the ones you are likely to use when matching URLs with @@ -8014,7 +7827,6 @@ Requests necessary either. - @@ -8106,7 +7918,6 @@ Requests - @@ -8120,7 +7931,6 @@ Requests page is requested by your browser: - @@ -8229,7 +8039,7 @@ Requests - + NOTE: This is somewhat of a simplistic overview of what happens with each URL request. For the sake of brevity and simplicity, we have focused on @@ -8302,7 +8112,6 @@ Requests configuration may vary): - Matches for http://www.google.com: @@ -8332,7 +8141,6 @@ Requests In file: user.action [ View ] [ Edit ] (no matches in this file) - This is telling us how we have defined our @@ -8390,7 +8198,6 @@ In file: user.action [ View ] [ Edit ]google.com: - Final results: @@ -8450,7 +8257,6 @@ In file: user.action [ View ] [ Edit ] - Notice the only difference here to the previous listing, is to @@ -8463,7 +8269,6 @@ In file: user.action [ View ] [ Edit ]ad.doubleclick.net: - { +block{Domains starts with "ad"} } ad*. @@ -8474,7 +8279,6 @@ In file: user.action [ View ] [ Edit ] - We'll just show the interesting part here - the explicit matches. It is @@ -8506,7 +8310,6 @@ In file: user.action [ View ] [ Edit ] - Matches for http://www.example.net/adsl/HOWTO/: @@ -8571,7 +8374,6 @@ In file: user.action [ View ] [ Edit ] - Ooops, the /adsl/ is matching /ads in our @@ -8587,12 +8389,10 @@ In file: user.action [ View ] [ Edit ] - { -block } /adsl - Now the page displays ;-) @@ -8606,12 +8406,10 @@ In file: user.action [ View ] [ Edit ] - { +block{Path starts with "ads".} +handle-as-image } /ads - That actually was very helpful and pointed us quickly to where the problem @@ -8625,7 +8423,6 @@ In file: user.action [ View ] [ Edit ]+filter: - { shop } .quietpc.com @@ -8634,7 +8431,6 @@ In file: user.action [ View ] [ Edit ] - { shop } is an alias that expands to @@ -8642,7 +8438,6 @@ In file: user.action [ View ] [ Edit ] - { -filter } # Disable ALL filter actions for sites in this section @@ -8650,7 +8445,6 @@ In file: user.action [ View ] [ Edit ] - This would turn off all filtering for these sites. This is best @@ -8673,13 +8467,12 @@ In file: user.action [ View ] [ Edit ] - + { fragile } # Handle with care: easy to break mail.google. mybank.example.com -