The pattern matching syntax is different for the domain and path parts of
the URL. The domain part uses a simple globbing type matching technique,
- while the path part uses a more flexible
+ while the path part uses more flexible
"Regular
- Expressions (PCRE)" based syntax.
(POSIX 1003.2).www.example.com/index.html$www.example.com/index.html matches any domain that ENDS in
- matches any domain with first-level domain .example.comcom
+ and second-level domain example.
+ For example www.example.com,
+ example.com and foo.bar.baz.example.com.
+ Note that it wouldn't match if the second-level domain was another-example.
www.
+> (It also matches the domain
+ www but most of the time that doesn't matter.)
Privoxy uses Perl compatible (PCRE)
+> uses "modern" POSIX 1003.2
"Regular
- Expression" based syntax
- (through the PCRE library) for
- matching the path portion (after the slash), and is thus more flexible.
for matching the path portion (after the slash),
+ and is thus more flexible. There is an Appendix with a brief quick-start into regular
- expressions, and full (very technical) documentation on PCRE regex syntax is available on-line
- at http://www.pcre.org/man.txt.
- You might also find the Perl man page on regular expressions (man perlre)
- useful, which is available on-line at http://perldoc.perl.org/perlre.html.
man re_format). Note that the path pattern is automatically left-anchored at the
Example: +block+handle-as-image
Type:Boolean.
Parameterized.Parameter:N/A
A block reason that should be given to the user.Notes:"BLOCKED" page
- for requests to blocked pages. This page contains links to find out why the request
- was blocked, and a click-through to the blocked content (the latter only if compiled with the
- force feature enabled). The
"BLOCKED" page adapts to the available
- screen space -- it displays full-blown if space allows, or miniaturized and text-only
- if loaded into a small frame or window. If you are using
Privoxy
- right now, you can take a look at the
-
"BLOCKED"
- page.
+ for requests to blocked pages. This page contains the block reason given as
+ parameter, a link to find out why the block action applies, and a click-through
+ to the blocked content (the latter only if the force feature is available and
+ enabled).
@@ -1981,18 +1971,18 @@ WIDTH="90%"
>
{+block}
+>{+block{No nasty stuff for you.}}
# Block and replace with "blocked" page
.nasty-stuff.example.com
-{+block +handle-as-image}
+{+block{Doubleclick banners.} +handle-as-image}
# Block and replace with image
.ad.doubleclick.net
.ads.r.us/banners/
-{+block +handle-as-empty-document}
+{+block{Layered ads.} +handle-as-empty-document}
# Block and then ignore
- adserver.exampleclick.net/.*\.js$ | {+client-header-filter{hide-tor-exit-notation}}
-.exit/
+># Hide Tor exit notation in Host and Referer Headers
+{+client-header-filter{hide-tor-exit-notation}}
+/
| # Tag every request with the User-Agent header
{+client-header-tagger{user-agent}}
/
+
+# Tagging itself doesn't change the action
+# settings, sections with TAG patterns do:
+#
+# If it's a download agent, use a different forwarding proxy,
+# show the real User-Agent and make sure resume works.
+{+forward-override{forward-socks5 10.0.0.2:2222 .} \
+ -hide-if-modified-since \
+ -overwrite-last-modified \
+ -hide-user-agent \
+ -filter \
+ -deanimate-gifs \
+}
+TAG:^User-Agent: NetBSD-ftp/
+TAG:^User-Agent: Novell ZYPP Installer
+TAG:^User-Agent: RPM APT-HTTP/
+TAG:^User-Agent: fetch libfetch/
+TAG:^User-Agent: Ubuntu APT-HTTP/
+TAG:^User-Agent: MPlayer/
+filter{js-annoyances} # Get rid of particularly annoying JavaScript abuse +filter{js-annoyances} # Get rid of particularly annoying JavaScript abuse. | +filter{js-events} # Kill all JS event bindings (Radically destructive! Only for extra nasty sites) +filter{js-events} # Kill all JS 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 (for dial-on-demand setups) +filter{refresh-tags} # Kill automatic refresh tags (for dial-on-demand setups). | +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 resizeable +filter{frameset-borders} # Give frames a border and make them resizable. | +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 savable +filter{quicktime-kioskmode} # Make Quicktime movies saveable. | +filter{crude-parental} # Crude parental filtering (demo only) +filter{crude-parental} # Crude parental filtering. Note that this filter doesn't work reliably. | +filter{ie-exploits} # Disable a known Internet Explorer bug exploits +filter{ie-exploits} # Disable some known Internet Explorer bug exploits. | +filter{site-specifics} # Custom filters for specific site related problems +filter{site-specifics} # Cure for site-specific problems. Don't apply generally! |
+filter{google} # Removes text ads and other Google specific improvements +filter{no-ping} # Removes non-standard ping attributes in <a> and <area> tags. |
+filter{yahoo} # Removes text ads and other Yahoo specific improvements +filter{google} # CSS-based block for Google text ads. Also removes a width limitation and the toolbar advertisement. |
+filter{msn} # Removes text ads and other MSN specific improvements +filter{yahoo} # CSS-based block for Yahoo text ads. Also removes a width limitation. |
+filter{blogspot} # Cleans up Blogspot blogs +filter{msn} # CSS-based block for MSN text ads. Also removes tracking URLs and a width limitation. |
+filter{no-ping} # Removes non-standard ping attributes from anchor and area tags +filter{blogspot} # Cleans up some Blogspot blogs. Read the fine print before using this. |
"forward-socks4"
- to use a socks4 connection (with local DNS resolution) instead.
+ to use a socks4 connection (with local DNS resolution) instead, use
"forward-socks5"
+ for socks5 connections (with remote DNS resolution).
"forward-socks4" to use a socks4 connection
- (with local DNS resolution) instead.
+ (with local DNS resolution) instead, use "forward-socks5"
+ for socks5 connections (with remote DNS resolution).
Notes:
This action takes parameters similar to the
+> This action takes parameters similar to the
forward# Block all documents on example.org that end with ".js",
# but send an empty document instead of the usual HTML message.
-{+block +handle-as-empty-document}
+{+block{Blocked JavaScript} +handle-as-empty-document}
example.org/.*\.js$
- Typical use:
Try to protect against a MS buffer over-run in JPEG processing
- Effect:
Protect against a known exploit
-
- Type:
Boolean.
- Parameter:
N/A
-
- Notes:
See Microsoft Security Bulletin MS04-028. JPEG images are one of the most
- common image types found across the Internet. The exploit as described can
- allow execution of code on the target system, giving an attacker access
- to the system in question by merely planting an altered JPEG image, which
- would have no obvious indications of what lurks inside. This action
- tries to prevent this exploit if delivered through unencrypted HTTP.
-
Note that the exploit mentioned is several years old
- and it's unlikely that your client is still vulnerable
- against it. This action may be removed in one of the
- next releases.
-
- Example usage: