FilterProxy EXAMPLE Configuration

This is what the web-based config pages look like. Note that this particular page doesn't *do* anything (i.e. none of add/delete/change work here). Download FilterProxy and try it for yourself.

FilterProxy version 0.26

FilterProxy Global options
Filtering Enabled
Logfile name:
upstream HTTP proxy (proxy that FilterProxy should use):
HTTP protocol version to use (set to 1.0 to fix problems with Konqueror, some proxies).
Log informational messages. (logs URL's that are transferred)
Log timing messages. (logs how long it takes for filters to complete -- use this info to optimize Rewrite rules)
Log debugging messages. (very spammy -- you probably won't need it)
Wait this many seconds before giving up on an outgoing connection
Enable user authentication using passwords ( Edit users, admins, and passwords)
Global configuration for modules:

URL regexp Filters Applied Action
.* Compress DeAnim Header Rewrite
http://(\w+.)? Rewrite
http://(\w+\.)?(aceshardware|doomworld).com Rewrite
http://(\w+\.)?(dilbert|comics|unitedmedia)\.com Rewrite
http://(\w+\.)?(neoseeker|arstechnica)\.com Rewrite
http://(\w+\.)?(slashdot\.org|freshmeat\.net|andover\.net|fr [...truncated...] Rewrite
http://(\w+\.)?alphalinux\.org Rewrite
http://(\w+\.)?altavista\.com Rewrite
http://(\w+\.)?angelfire\.com Rewrite
http://(\w+\.)?freshmeat\.net Rewrite
http://(\w+\.)?geocities\.com Rewrite
http://(\w+\.)?insanehardware\.com Rewrite
http://(\w+\.)?linux\.org Rewrite
http://(\w+\.)?linuxdevices\.com Rewrite
http://(\w+\.)?prohosting\.com Rewrite
http://(\w+\.)?sciencemag\.org Rewrite
http://(\w+\.)?sourceforge\.net Rewrite
http://(\w+\.)?space\.com Rewrite
http://(\w+\.)?tripod\.com Rewrite
http://(\w+\.)?upside\.com Rewrite
http://(\w+\.)?weather\.com Rewrite
http://(\w+\.)?yahoo\.com Rewrite
http://(\w+\.)?zdnet\.com Rewrite
http://\w+\.go\.com Rewrite

How does this work?

For every page you request with your browser, FilterProxy will compare its URL to the 'URL regexp' list above. If one (or more) match, it will apply the filters listed for that regexp. A regexp is a Regular Expression, and gory details can be found by running 'man perlre'. The basics are summarized below. These regexps are case-insensitive.

If more than one regexp matches your URL, each of the configurations is passed to the respective modules. This acts like an AND operation in that all the filters (and config for each filter) will be applied to pages matching those URL regexp's.

If you wish to have a module not be applied for a particular site, when it would be applied normally, create a URL regexp for that site, select the module you don't want applied, and click "Delete". The module will show up in the list looking like -(DeAnim) and that module will not be applied to any site that matches the corresponding URL regexp.

Regular Expression Overview

regexp stringWill match
.*all sites
.any single character
*causes the expression that preceeds it to be matched 0 or more times
+causes the expression that preceeds to be matched 1 or more times
?causes the expression that preceeds it to be matched 0 or 1 times
[a-z]any of the characters in the brackets will match
[^a-z]any character but those brackets will match
()Use to group expressions
http://([a-z]*)?\.somewhere\.com,, BUT NOT (note leading \.)

Hopefully you get the idea. If you need more info, consult perl's "perlre" manual page.

FilterProxy was written by Bob McElrath. Please see the README, BUGS, and any relevant module documentation before mailing me with problems.