Contents
Welcome to the hastily written and even semi-accurate guide to...

The Proxomitron - Universal Web Filter

Presented for your approval: the awe, mystery and just plain oddness that is...

the Proxomitron help file!

Armchair of Contents

General Information

What's new in version Naoko-3

Well what the heck is this thing it anyway?

How it works

Installation and Eradication

Shonenware - Distribution and Copyright

The Bits and Pieces

Disorientation

The Main Screen

The Log Window

Web Page Filters

Web Page Filter Editor

HTTP Header Filters

Header Filter Editor

Matching Expression Test Window

Config Dialog

External Proxy Dialog

Filter Creation

And now... The Proxomitron Text Matching Language

An Introduction to text matching

Tips and Tricks

Vestigial Organs....

How do I ...? The Proxomitron IFAOFAQN

A hitchhikers guide to the default filter set

Meta Character Quick Reference

Send me your filters!

Limitations

Got Bugs? (Contacting the author)


What's new in Naoko-3
What's new in version Naoko-3

Much has been added since the last release of the Proxomitron (version Naoko-2) and many existing features have been improved.  Here's the rundown...

•	The Proxomitron's can now live in the system tray!

Easily the most requested feature, the Proxomitron can now be set to minimize as an icon in the system tray. You can enable this feature under the Configuration dialog. Of course, right-clicking it also reveals a handy pop-up menu giving you quick access to many useful settings.

• 	New and improved web filters

Of course, several new filters have been added since the last release, but many (if not most) of the previous filters have also been updated and should work even better than before.

 • 	URL match added to HTTP header filters.

Just like the web filters, you can now have header filters work (or not work) only on certain URLs.  This can greatly increase their flexibility. For example, you can accept/send cookies only to certain trusted sites, disable a filter that may cause trouble on a particular page, or send different HTTP header values to different web pages. You can even fix incorrect MIME Content-Type headers for media types a web server doesn't know about yet (as is sometimes the case with MIDI and MP3 files).

• 	Connection Killer replacement code

Placing a "\k" in the replacement text of any filter allows you to kill the current connection.  With web page filters this will simply end the page at that point - stopping any further loading. With header filters it allows you skip loading an image or other item based on its URL, content type, size, etc.  Killed Images will be replaced by default with a blank transparent .GIF file "killed.gif" - other items, like java applets, audio/video files, and the like will simply be sent the contents of the "killed.html" file.

• 	Matching Expression Test window

To help make creating your own filters easier, there's now a window designed to help you test matching expressions.  Here you can enter some HTML text and quickly see what effect a filter will have on it. When designing or modifying a filter, this can save you much  aggravation and many web page reloads!

• 	Webpage source debug Info

Under the log window's menu is a new option to insert debugging information into the source of a webpage.  This will let you see where a particular filter rule made changes to a page and what text was replaced.

• 	Config file merge option

To make maintaining and updating Proxomitron's config files easer, a Filter Merge option has been added to the main menu.  This lets you easily combine  filters from another config file into the currently loaded.

• 	Automatic launching of URLs when config files are loaded.

You can now enter a URL in the configuration dialog that will be automatically loaded into your web browser whenever the config file is loaded. Just use the config files like browser bookmarks to go to a web page with a customized set of filters already in place!

• 	Resizeable dialogs

Many of Proxomitron's dialog boxes can now be resized - allowing you to see more of a long filter list and see longer, more descriptive, filter names.  To tell if a dialog is resizeable, look for a small green triangle in the upper left-hand corner.

• 	Customized edit window context menus

Many of the edit windows in Proxomitron (URL, matching, replacement, etc.) now have customized context menus. Several of the new features are "hidden" here so be sure to right-click and check them out.

• 	Automatic file URL creation

With filters that allow you to insert your own images or other items into a web page it's common to use a "file" URL pointing to a file on your local hard drive.  In both the web filter and header filter editors, right-clicking over the replacement text window now reveals an option to insert a file URL - this lets you easily choose any file and have its URL automatically inserted into the replacement text.

• 	MIME Base64 encode/decode

The replacement text window In the HTTP header filter editor now has a context menu option to encode and decode MIME Base64 strings.  You can use this to create web page or proxy server password headers for automatically logging into servers that require them. See the HTTP header filter editor section for more details on password creation.

• 	External proxy comments

You can now add text comments after entries in the external proxy selector list. Just enter it like so - "hostname:port comments".

• 	Proxy rotation

Although a bit experimental, several people requested the ability to automatically rotate the currently selected proxy in the proxy list.  This feature can be enabled by right-clicking over the proxy selector list and selecting "advanced proxy settings".

• 	"Promiscuous" mode

Normally the Proxomitron will only accept connections coming from the same PC it's running on - it does so by checking to ensure the connecting IP address is the   "localhost". The idea is to prevent someone from outside connecting to the Proxomitron using it to "mask" their true IP address and appear  to be coming from your PC instead!  However, several people wished to bypass this feature so they could use one instance of the Proxomitron for several PCs.  For that reason, you can now disable the "localhost" protection by entering the following line into the [Global] section of a Proxomitron config file - Promiscuous =TRUE

Caution: This should only be done if you fully realize and accept the security risk involved!

•	Insect-a-cism

Of course, no new version of anything would be complete without the squashing of a few bugs under the porcelain foot of progress.  Many bugs that were fixed no one but me even noticed ;-). However, of particular note is an improved ability to read through corrupt or missing header information (which should take care of a few pages that caused the previous Proxomitron grief).


Temp Topic
Nothing to see here - move along!


What The Heck Is It?
Proxomitron (Prox-om-i-tron): An almost painless introduction

Attack of the creeping feature-itis...

Web Browsers have come a long way in recent years. Features have been added toe over forehead until the modern net-behemoths bears little resemblance to the quaint and simple browsers of years past. Is such change always to be welcomed in the name of progress? Perhaps the time has come when mankind must ask itself - has this mad rush of browser technology has outstripped our ability to control it?

Truth is many of the fancy new HTML features are just plain annoying. Often they serve no purpose except to overcrowd the screen with more and more slow-loading advertising content. Still, what can you do - disable JavaScript? or even more drastically disable loading all images? That only makes an increasing number of pages totally inaccessible. It's very strange that the browser "powers that be" decided to give the user so little control.

Enter The Proxomitron, Re-Writing the web Your way...

It was out of my own personal frustration with such "browser abuse"  that the Proxomitron was born - at it's heart is a powerful text matching engine specially designed to re-write web pages on the fly, as you view them in your browser.

Getting rid of many common annoyances is as simple as clicking on one of the filtering rules included with the program, but best of all, the Proxomitron's rules aren't "hard-coded".  You can look at them, modify them, even write entirely new ones!

If you know some HTML, you'll find the Proxomitron allows you to personally customize just about any web page you view. You'll no longer be at some web-master's tender mercy. Even if you know no HTML, you'll find the included rules give you far more control than you've ever had before, and my hopes are that other Proxomitron user will contribute useful rules they've written for the benefit of everyone.

Spies like us...

Besides filtering web pages, The Proxomitron also allows you to control the normally hidden HTTP header messages that pass between your browser and the outside world. Many people are unaware that this covert conversation is even taking place, yet it can reveal all sorts of information. See exactly what your web browser has to say, then have it tell the world only what you want! Even those notorious "cookies" can be deleted or modified if you wish.

Don't get scaled by your Java...

In the wrong hands some JavaScript commands have been used to attack!  Less ominous, but still aggravating are commands that do things like add a page to your bookmarks whether you want it there or not.   More and more, disabling  JavaScript entirely just isn't a viable option - The Proxomitron allows you to selectively disable specific JavaScript commands while leaving the rest working.  It's even possible to redefine a command's function entirely.

Here's a partial list of what the Proxomitron can do "out of the box"

(not that it was ever in a box mind you)

•	Stop pop-up windows

• 	Stop pop-up JavaScript message boxes

• 	Remove web-branding and other scripts tacked on by "free" web providers.

• 	Convert most ads and banner pictures into simple text links

• 	Freeze all animated gifs

• 	Make blinking text appear as bold instead

• 	Remove slow web counters

• 	Stop web pages from "auto-refreshing"

• 	Prevent pages from changing fonts

• 	Get rid of or replace web page background images

• 	Protect against getting "trapped" inside someone else's frames!

• 	Make background MIDI songs play only when you choose.

• 	Remove status bar scroll-texts

• 	Remove "dynamic" HTML from pages

• 	Disguise your browser's identity and version from JavaScripts

• 	Remove style sheets

• 	Un-hide URLs when the mouse is over a link

• 	Disable frames or tables altogether

• 	Change or delete cookies

• 	Change your browser's user-agent and other identifying fields

• 	Hide where you've been previously from inquisitive web servers

       and, as they say, much, much more.


How It Works
How the Proxomitron Works

The power of the proxy

Perhaps you are wondering what mysterious universal forces the Proxomitron calls upon perform its work?  Well, unlike what you might expect, The Proxomitron is not a browser plug-in. Instead it takes advantage of an old feature of the web know as a "HTTP Proxy".  This allows a program to sit between your web browser and the Internet at large.  The Proxomitron uses this to intercept all requests for web pages before your browser gets to see them - allowing for everything to be monitored, and possibly changed, by you first.

We don't play favorites (sorry Bill)

Almost every web browser ever made supports a proxy interface - it's part of the original specifications for the web. Because of this, the Proxomitron works just as well with most any version of any browser, be it Netscape, Internet Explorer, or even Lynx!  It can even work with many other types of programs that use HTTP to do their stuff (like off-line web browsing utilities for instance).


Installation and Eradication
Installing and Un-installing installing

System Requirements

The Proxomitron was developed on Windows 95 using a Pentium 120 (although a 486 is probably all you need).  Windows 98 and NT should work as well (as several users have reported), but I currently have no ability to test on these platforms. Please inform me if you do have any troubles here.

Upgrading from a previous versions

If you don't want to keep the previous version around, It's safe to simply copy the new files over top of the old (be sure to include the subdirectories) .  However first make backup copies or rename any config files you changed!  Otherwise they'll be overwritten by the newer versions. To keep your changes either copy the config files somewhere else or simply change them from their original names (as in default.cfg to MyDefault.cfg ). This only applies to the config files included in the original distribution, any config files you named yourself will be fine.

Installation and Eradication

None needed really.  Well, at least not in the normal sense...

Unlike many windows programs which seem to insinuate their way into your system like some parasitic organism,  the Proxomitron...

1 - copies no files to any folders outside its own

2 - makes no changes to your system registry

3 - and modifies no .ini files

The Proxomitron comes in two flavors - one with an installer/uninstaller ProxN3i.zip and one without ProxN3.zip. If you're used to copying files on your PC you don't really need the installer.

For the plain version just place the files within the ProxN3.zip wherever you wish.  To Un-install just delete the folder containing the Proxomitron program. No further trace of it will be left anywhere else on your system.  Because of this It's also safe to move the program folder from one place to another without having to "re-install".

For the installer version, simply click setup.exe and follow the on screen directions.  This time around I've ditched the gargantuan InstallShield installer for the much smaller and simpler Inno Setup installer (which saved about 400k off the file size). It's free, and I encourage any programmer looking for a simple install/uninstaller for their software to check it out.

Setting your web browser to use the Proxomitron

After "Installation" you must configure your web browser to use the program. This involves setting the browser's proxy option. Although it varies from browser to browser, most all browsers have this option somewhere.

For Netscape: Run Netscape and go under the "Edit" menu. Select "Preferences > advanced > proxies". Click "Manual proxy configuration" then "View". Next under HTTP enter "localhost" and for port enter "8080". Leave the other proxy entries (FTP, Gopher, etc.) alone.

For Internet Explorer 3.x & 4.x: Select "View", "Internet Options", then click the "connections" tab. Click "Use proxy server" and click "advanced" or "settings" (for 4.0 and 3.0 respectively). Under HTTP enter "localhost" and for port "8080". Leave the other proxy entries (FTP, Gopher, etc.) alone. You can also set the proxy from the Control panel's Internet options.

For Internet Explorer 5.x: Well, it seems with every version Microsoft has to bury this a little deeper (are they trying to hide it? ;-). Anyway, go to "Tools", "Internet Options", then "Connections". Select the dial-up connection you use (or LAN if appropriate) click "Settings" then check "Use Proxy Server". Click "Advanced" and under the HTTP entry only, enter "localhost" for host and "8080" for port. Also be sure you don't have autoconfig or other such nonsense enabled. Phew!

For Other browsers: The process should be similar to one of the above. First locate where to set the HTTP proxy entry. Once you find it, set it to "localhost" with the port of "8080".

Here's an example taken from Netscape (other browsers will look much the same) of how the proxy configuration should look - note the areas highlighted in yellow. You want to find the screen that has all these options separate.

After the browser it configured, run The Proxomitron program. Now any connections your browser makes must go through, and be filtered by, The Proxomitron.

Warning: after configuring your browser for use with Proxomitron, it won't be able to find web pages unless the Proxomitron is running also! To bypass the Proxomitron entirely and return your browser to normal operation, just set your browser not to use a proxy server (or "direct connection to the Internet" as Netscape puts it). Both Netscape and Internet Explorer allow you to switch between these two settings with a simple checkbox in their proxy configuration screens.

To help make things more convenient, you can set the Proxomitron to automatically run your browser whenever it starts (See Configuration).  Then simply start the Proxomitron whenever you would normally start your browser.

Note: If you are already connecting through a proxy server, you'll need to set the Proxomitron to use your original HTTP proxy settings. (See External Proxies).


Copywrong
Proxomitron Distribution and Copyright

A radical new concept in software distribution...

The Proxomitron has no time limit, no nag screens, and no registrations keys - all features are full functional now and forever.  It is not Shareware, Demoware, Careware, Crippleware, or even TupperWare™.

Although it's Free, It's not Freeware either.... The Proxomitron is, in fact, Shonenware!

What the name of PuyoPuyo is Shonenware!!?

Shonenware is a concept dedicated to the support of the one-and-only world famous female power-trio from Osaka Japan Shonen Knife -  kawaii creators of the very best music in the world!

Under the terms of Shonenware, you can use the program as often as you like for as long as you like. You are under no restriction to stop using it after so many days, or indeed ever! You can also, of course, freely copy it as long as you abide by certain conditions (see below). However, If you find the program useful you're encouraged to "register" it.

How to register....

To register simply go out and buy any CD, record, or tape by Shonen Knife, listen to it carefully, and e-mail me your impressions of the album. Be sure to include detailed enough descriptions of the songs to convince me that you actually *did* buy the album ;-). Alternately mail (not email - no binary attachments please) me a picture of you holding the CD. If you can convince me you really do own a Shonen Knife album, well then you're registered.

What? Your local record shop doesn't have any Shonen Knife? Well, then they must not be a proper bison loving establishment - I say.  Don't fret however, most on-line music stores boast a good selection for sale (I personally have had good experience with "Music Boulevard"). If you're new to Shonen Knife and don't know where to start, I recommend "Brand New Knife" as an excellent first choice. "Let's Knife" is also a perennial favorite.

If you're already a fan of Shonen Knife, and perhaps own some (or all) of their albums, you're already qualified for registration! Just send me some email about your favorite Shonen Knife tunes or Near-Knife experiences. Sending me a picture of you with Shonen Knife, of course earns you extra credit.

If on the off chance, you actually happen to be Shonen Knife (i.e. Naoko, Atsuko, or Michie), you of course, have a lifetime registration for this and any other Shonenware releases.  Sadly, I hear tell they all use Macs ;-).

I should also mention I'm in no way affiliated with Shonen Knife. The only benefit I receive is by encouraging a band who's music I enjoy and hopefully helping others to discover this unique group too.

Why register...

Although not required, Registration accomplishes they following nifty things.

1 -	Makes me happy (because I like Shonen Knife) which encourages me to write better versions of this program!

2 -	Makes Shonen Knife happy and allows them to make more albums which...

3 - Makes the entire world a happier place!

4 -	And most importantly, it can make you happy since it results in owning a magical Shonen Knife album of your very own!

Now, how often does registering a program give you the chance to improve the entire world? ;-)

Oh, and you can also receive email notification of new versions (if you request it). Not to mention registering is likely to give gives your suggestions, problems, and general opinions about the program higher priority.

Legalese...

The Proxomitron is Copyright 1999 by Scott R. Lemmon (That being me)

Use it at your own risk!

I believe the Proxomitron to be a safe and useful application, but I can make no guarantee that it will work properly (or at all), or that some unforeseen bug won't inadvertently cause damage, compromise your system, or even wake Godzilla.

I will in no way be held responsible for any damages occurring as the result of using this program. By using this program at all, you're agreeing to abide by these terms.

Distribution

I retain all right to the program, but freely authorize the distribution of copies of this version as long as...

1 -	No fee is charged for the program except to cover the basic distribution costs of media and shipping (not to exceed $5.00 US).

2 -	The program and all associated files are only distributed in their original archive and are not altered in any way.

3 - It is not included as part of another commercial product.

4 -	Absolutely No bison are harmed in the distribution process.

This product may be included in any software collection downloadable through electronic means (including web sites, FTP sites, and Bulletin Board Systems) as long as no fee is charged to gain access to or download this product.

For inclusion of this product with a commercial product, or inclusion on compilation CD ROMs or other media sold for profit, permission must first be gotten from the author: Scott R. Lemmon

(See Contacting the author)

For most Shareware/Freeware CD ROM collections and the like, permission will be gladly given.  I'd just like to be aware of such uses.


Disorientation
Why does this thing looks so weird?!!

Psychedelic ain't it?

The Proxomitron was initially intended for my own personal use, and was largely written out of my own frustration with the ever increasing abuse of web browser features. It's more an experiment in programming than anything else. Anyway, I also took the opportunity to pry into some of the darker crevasses of the Windows API and see what would crawl out.

One of those creatures still surviving is my experimentation with owner drawn buttons and backgrounds - instead of Window's normal monochromatic splendor, the Proxomitron can tile any bitmap file (.BMP) in much the same way as web page backgrounds.

The result is the Technicolored  mess you see before you....

Don't despair however, The hyper-colorful defaults are simply the product of my own deranged psyche, and you are free to use any Windows bitmap files you like or none at all (go under the Config dialog and click on the texture to change). In fact, I've included some pretty wood textures in the release for giving Proxomitron that "Retro" feel!

To look right I strongly recommend you have your display driver set to 16 bit or 24 bit color mode.  Textures can be disabled, and in fact are by default if your display driver is set to use 256 colors or less. Although you can force the program to use textures anyway, generally they'll look *really* bad as I do no palette switching in the program. Web browsing in general looks much better in the higher color modes anyway.


Main Screen
Proxomitron's Main Screen

Except for the default background textures, here's something like what you'll see when you first run the Proxomitron (this gives you an idea how much effect different textures have on the look of the program).  Click on an item to have it's function explained....

Proxomitron config files

Instead of using .ini files or the system registry to store its settings, the Proxomitron uses config files (ending in .cfg).  When the Proxomitron first loads, it looks for a file named "default.cfg" in the program's directory - this is where all initial settings are kept. You can save other config files under different names however, to quickly switch between various setups. You can even give each configuration its own background textures to help make them more distinctive. Use the file menu (or right click over the main window) to bring up options to load and save the config files.

The configuration files are just simple text files and can be edited by any text editor (like Notepad). An easy way to email someone a filter you designed or post it on the web, is simply to copy it from the config file.

Merging Config files

Filters from one config file can be merged into the current config file by selecting "Merge config files" from the main screen's "File" menu.  This can come in useful when updating a config with new filters, or moving your custom made filters to a new set.

Types of filters

The Proxomitron has several categories of filters - Web filters, Incoming header filters, Outgoing header filters, and a .GIF file animation filter. Each set of filters can be quickly disabled by un-checking the corresponding "Active Filters" check box.

•	Web filters affect the HTML of loading web pages.

•	Outgoing filters affect request HTTP header messages sent from your browser to the Internet.

•	Incoming filters affect reply HTTP header messages sent from the Internet to your browser.

•	The "Freeze .GIF animation" filter loads only the first image of an animated .GIF

The "Abort" button will stop all current connection and resets the Proxomitron. It works like the stop button on your browser. Normally you only need use it if for some reason a connection refuses to die.

The "Bypass" button temporarily suspends all filters. By pressing Bypass then forcing your browser to reload a web page, you can see the page in its original unfiltered form. Use this if a filter accidentally removes something you didn't intend from a web page.

Note: Many Browsers don't always really reload when you press the "reload" button. Often they first "ask" the web page's server if the page has changed. If not, the browser uses the copy it already has stored in its cache.  The Proxomitron will normally detect a browser reload and force the page's HTML to reload anyway - allowing you to see the effects of filter changes.  However for some things, like animated .GIFs you must "force" your browser to reload the entire page.

Netscape	: 	Hold down SHIFT and click reload or press SHIFT+CTRL+R.

Internet Explorer	: Hold CTRL and select View->Refresh from the menu or press CTRL+F5. Note this only works for version 4.x and above!

One way to always force a reload no matter what is to leave the "If-Modified-Since" and "Last-Modified" header message filters enabled, and only bypass web page filters.  Be warned however, this makes your browsers cache very inefficient!


Save Button
Save Current Config

This button saves changes in Proxomitron's settings back to the currently loaded config file.


Load Button
Reload Current Config

This button reloads the current config file. Use it to quickly undo any unsaved changes.


Run Application Button
Launch Application or URL

This button launches an application (usually your web browser) or switches to it if it's already running. It can also be used to jump to a specific URL.  To choose which application or URL to run, select the "Config" button.


Main Menu
Proxomitron's File and help menu

Use this menu to save and load config files, or exit the program. Note: you can also access this menu by right-clicking on any part of the Proxomitron's main window.


Enable Web Filters
Web filter bypass

This check this box globally enables or disables all web page filters. Use it to quickly turn web page filtering off or on.


Enable Outgoing HTTP filters
Outgoing header filter bypass

This check box enables or disables any outgoing HTTP header filters. When this box is unchecked, all headers sent by your web browser will go to the server unchanged (See HTTP Header Filters for more info)


Enable Incoming HTTP Filters
Incoming header filter bypass

This check box enables or disables any incoming HTTP header filters. When this box is unchecked, all headers sent from the web server will go to your browser unchanged (See HTTP Header Filters for more info)


Freeze .GIF animation
Freeze GIF animation

When checked, this checkbox strips all animation from .GIF files. This simple feature alone makes many web pages far easier on the eyes! It also saves on image loading time.


Enable External Proxy
Use remote proxy

This checkbox quickly enables or disables the remote proxy setting. When it is checked Proxomitron will use any remote proxy you've selected - when unchecked Proxomitron will connect directly to the Internet.


Bypass Button
Global bypass button

This button will place Proxomitron in "Bypass" mode - all filters will be disabled.  Press it then force a reload on your browser to see a page in its original unfiltered form.


Abort Button
Abort current connections

This button will abort any currently loading web pages (shown as "connections" in the status window). Use it sparingly! First try pressing "stop" on your browser and wait to see if the number of connections decreases to zero.  If some connections still refuse to die, this button will give em' the ax.


Log Window Button
Open log window

This button opens Proxomitron's log window (or switches to it if it's already open). You can use the log window to view hidden HTTP header messages sent between your browser and the Internet. It can also provide extra information during other Proxomitron operations. (See Log Window)


Main Window Status Bar
Status Window

This is Proxomitron's status window. It shows various messages regarding Proxomitron's operation. It also shows the current number of HTTP connections Proxomitron is currently processing.


Web Filter Button
Web Page Filters

This button opens Proxomitron's web page filter list. In here you can select which filters to activate, or edit and create new filters. (See Web Page Filters)


Header Filter Button
HTTP Header Filters

This button opens Proxomitron's HTTP header filter list. In here you can select which incoming and outgoing header filters are active, edit existing filters, or create new ones.


Config Button

This opens Proxomitron's configuration dialog. In here you can select several global Proxomitron settings, including the program run by the "Launch Application" button.


Proxy Button
External Proxy Selector Button

This button opens Proxomitron's external proxy selector. Here you can keep lists of Internet proxy servers and quickly switch between them. You can also test a proxy server for accessibility.


The Log Window
Proxomitron's Log Window

The log window is used to display useful information about ongoing activity. This includes HTTP header messages sent between your web browser and the Internet, and information on which web page filters matched a particular page. To see them click the "Log Window" button on Proxomitron's main window. Messages are only logged while the log window is open and are lost when the window is closed. This is for efficiency's sake since always logging all information might slow down Proxomitron operations. Log windows messages can however be saved to the windows clipboard - first select the messages then either click the "Copy" option from the log window's "Edit" menu, or press CTRL-C.

Other options on the edit of interest menu include...

Pause 	- Temporarily suspends logging

Reset 	- Clears the log window

HTML filters 	- Enable/disable logging of web page filter matches

HTTP filters 	- Enable/disable logging of header messages

The edit menu can also be accessed by right-clicking anywhere over the log window.

Inserting HTML Debug Info

Under the log window's menu is an option to insert  "debug info" into webpages.  This places a web filter's name and the original text it replaced into a page's source surrounded by HTML comments directly before the replacement text...

 <!-- MATCH: Banner Blaster

 <a href="http://adnet.com/ad?123"><img src="some.ad.gif?123" alt="Buy!"></a>

 -->

 <center><font size=1><a href="http://adnet.com/ad?123">[Buy!]</a></font></center>

It can be very useful for tracking down what's actually happening with a filter. However since even commented text, depending on  where it's inserted, can mess up a webpage, you should only enable this feature when having troubles with a filter.

Log window messages are color coded...

Green	:Request messages from your browser to the Internet

Yellow	:Response messages from an Internet web server to your browser

White	:Informational - such as the start and end of new connections

Red	:Error messages

Violet	:Web page filter matches

Cyan	:Proxy test progress messages

The HTTP request and response header messages allow you to view the normally hidden conversation that takes place whenever your browser requests a web page. For details on what these messages can tell you see HTTP Header Filters

Since requests for web pages may come in any order and are often mixed together, the Proxomitron numbers all requests your browser makes.  You can use these number to track, for instance, which request goes with which reply.


Web Page Filters
The Web Page Filter Dialog

Clicking the "Web Page" filter button opens a list of all Web Page filters. Each filter can be individually enabled or disabled by checking the check box next to it.

The Default Filters

Web filters are perhaps the most useful feature of the Proxomitron. With them you can stop stuff like ad banners, pop-up windows, auto-play music and more. Simply click the checkbox of any filter you wish to use then hit reload on your browser to try them out. If you're looking for more information on what each default filters does, check out the Hitch-Hikers Guide to the Default Web Filters.

Of couse, you're not limited to these initial filters - you can modify them or create entirely new ones of your own!

Web Page Filter Ordering

You can use the "Cut" and "Paste" buttons to re-order web filters. With web page filters, order is important!  This is not the case with HTTP header filters. Normally, when a filter matches a bit of HTML it "uses it up" so no other filter can match it. This first come first served approach allows you to give priority to certain filters. A filter that only matched a specific case would come before a more general "catch all" filter that matched on the same type of HTML tag. Filters at the top of the list have the highest priority, filters at the end have the lowest.  Note that in some cases you might want a filter not "use up" the text it matches and allow other filters a crack at it. Look at "Allow for multiple matches" under the Web Page Filter Editor dialog to see how to do this.

Changes to web filters

Enabling or disabling a filter check box takes effect immediately, however any changes or additions you make to filters themselves won't go into effect until the "OK" or "Apply" button is pressed - until then the check box of these modified filters will be show as grayed. This allows you to change filters while a web page is still using them (or in reality copies of them). For changes to actually take effect, the filters must not be in use.  Also, pressing "Cancel" in this dialog will undo all pending changes you've made to the filters - this includes filters you've added or deleted.

Editing Web Filters

Use "Edit", "New", and "Dupe" to modify web page filters. "Edit" edits the selected filter (you can also double-click the filters name) and "New" creates a new filter. "Dupe" creates a copy of the selected filter which you can then modify. It's useful for using an already existing filter as a starting point for your new filter.

All of these button will bring up the Web Page Filter Editor - use it to modify the rules a particular filter uses.


Web Page Filter OK Button
OK Button

Click this to return to put any changes you've made into effect and return to Proxomitron's main window.


Web Page Filter Cancel Button
Cancel Button

Use this button to forget any changes you've made to the web filters and return to Proxomitron's main window.


Web Page Filter Checkboxes
Web Filter Check Boxes

Use these to enable or disable a particular web page filter. Note: changes here go into effect immediately.


Web Page Filter Names
Web Filter List

This is a list of all web page filters. You can edit a filter either by double-clicking it or pressing the "Edit" button. Use "Cut" and "Paste" to change the order of filters in this list.

A series of selected filters can also be toggled on and off by right-clicking.


Web Page Filter Edit Button
Edit Web Filter Button

This allows you to edit the currently selected web filter. See Web Page Filter Editor


Web Page Filter New Button
New Web Filter Button

Use this to create a new web filter -

See Web Page Filter Editor.


Web Page Filter Dupe Button
Dupe Web Page Filter Button

This button creates a duplicate copy of the currently selected web filter. With it you can use an existing filter as a template for a new filter.

See Web Page Filter Editor


Web Page Filter Cut Button
Cut Button

Use this to delete selected filters. When used with the "Paste" button, cut filters can be inserted into a new location in the filter list.


Web Page Filter Paste Button
Paste Button

Use this button to paste filters deleted by the "Cut" button into a new location in the filter list.


Web Page Filter Editor
The Web Page Filter Editor

This is the web page filter editor (in all its original Technicolor glory). Here is where you can modify the matching rules that allow the Proxomitron to re-write web pages.  Click on an area below to get an explanation of its function.

The Basics...

At its simplest the matching rules work much the same as a word processor's "Search and Replace" function. Any text matching the "Matching Expression" will be replaced with the text in the "Replacement Text" section.  A matching expression of "Rimmer" with a replacement text of "That Smeghead" for instance, would change every occurrence of "Rimmer" on a web page to "That Smeghead". Simple no?

Things really get fun when you start adding Matching Rules into the mix.

"<start>" and "<end>"

Besides the normal text and matching expressions, the matching clause can have two values that have special meaning: <start> and <end>.

<start> inserts the replacement text at the beginning of a web page - use it to add items like JavaScript to a page. Likewise <end> can be used to tack stuff to the tail end of a page.

For these special cases, bounds and limit are ignored. Also when used by multiple rules, the items will be added in the same order they appear in the web page filter list.

What the heck is this Scope thing anyway?

In HTML it's not uncommon for tags to run for several lines. Scope settings allow the filter to determine how far forward to search for the end of a match after finding the start. If not for scope, the entire web page might have to be scanned before a rule could be sure a there was no match. Not a good idea, since no data could be sent to your browser until the whole page finished loading.  Thankfully the designers of HTML gave their tags predictable beginning and ending values which makes things a bit easier.

The byte limit and bounds limit both work together to restrict the amount of text searched.

Byte Limit controls how many characters forward to look for a match before giving up.  Normally keep this as small as possible - for most tags, a value of 128-256 or even less is fine. Increase it if you find a rule that should match isn't working. Making it too large however, can make pages appear to load slower since the program must process more data before sending anything to your browser.

Often the best size to use depends heavily on the tag in question. The "<Script ... </script>" tag for instance, often needs a large limit since it may contain many lines of JavaScript. In this case, try a limit of around 4096.

Bounds Limit is just an initial matching expression used to control the range (or boundaries) of the main matching expression. Normally a bounds check simply consists of the HTML start and end tags with an asterisk in between - "<script * </script>"  Anything valid in the matching expression can be used here, but with a bounds check - the simpler it is, the better.

Its use is optional  - you don't need it for many simple matching expressions.  However, with complex matches it can improve performance, since the main expression need only be checked if the bounds returns true. More importantly, it's also useful for preventing a rule from matching more text than intended. Take the following rule intended to match a web link....

Matching: <a * href="slugcakes.html" > * </a>

If matched against the following text...

<a href="crabcakes.html" > some stuff </a><br>

<a href="slugcakes.html" > other stuff </a>

The first asterisk would match the entire area highlighted in blue and grab both links instead of just the second one!   By using a bounds match like "<a * </a>" it's restricted to only checking one link at a time.

The Matching Expression and Bounds

When not using bounds , never place wildcards at the beginning or end of a matching expression (as in " *foo* ").  This results in the rule grabbing however many characters byte limit is set to - not usually what you want.

When using bounds however, the situation changes. Since the bounds selects the range of text being searched - the matching expression must match everything matched by the bounds  for the rule as a whole to match. The easiest way to do this is by using wildcards at both the beginning and end of the expression. Often matching variables are used (as in "\1 foo \2") so the text surrounding  the part of the tag you're matching can be captured and included in the replacement text.

Here's an example of matching a link like: <a href="http://somewhere"> some text </a>

Bounds	: <a\s*</a>	Limit: 128

Matching	: * href="\1" * > *

Replace	: <a href="\1"> some new link next </a>

URL Match - a different kind of scope control

You can use URL Match to limit a filter to affect only certain web pages. All matching rules apply here, so you need only match part of the URL.  Multiple pages can be included by using the OR symbol "|" as in "www.this.com|www.this.too.com", and pages can be excluded by using negation "(^...)" as in "(^www.not.this.page)".

Also note that the "http://" portion of the URL is removed prior to the match - don't test for it.

What does "Allow for multiple matches" do?

Normally, when a rule is matched the result is sent directly to the web browser - no other rules are allowed to process the matched section. This is mainly for efficiency, as it saves quite a bit of work, but it's also a useful way to give certain filters priority over others - essentially it's first come, first served.

This doesn't always work however. Take the "<Body ... >" tag - It contains several, somewhat unrelated, elements that we may want to change.  For instance, if we had two rules - one that changed the default text color and another that changed the background image - we'd have a problem. The first rule would prevent the second rule from working by "using-up" the <Body> tag. This is where "allow for multiple matches" comes in. When checked, it inserts the result of a match back into the processing buffer so other rules can get a whack at it.  In the above scenario, if we enabled it on the first rule, the second rule could then also match.

Use this feature sparingly - although powerful, it does require more processing than normal, and if not used carefully can lead to "recursive" matching.

Consider the following situation - say there's a rule with a matching clause of "frog" and a replacement text of "The evil frog must die!". Looks innocent enough doesn't it? Ah, but if this rule had multiple match enabled, the "frog" in the replacement text would cause the rule to match its own output - resulting in an endless plague of frogs! Why? well the first time the rules "sees" the word frog it inserts the phrase "The evil frog must die!" - simple enough, but the scan continues forward until it hits the new "frog" and the whole process repeats itself. The solution? Well, if "frog" had been the first word in the replacement text this wouldn't have happened. The next match always occurs one letter forwards so it would see "rog" instead of "frog". Just make sure your rule won't match its own replacement text - minus its first character - and all will be ok.


Web Page Filter Editor Name Field
Filter Name

Set the web page filter's name here. The name has no effect on the function of the filter, but simply allows you to tell the filters apart.


Allow for multiple matches

Checking this box lets the next filter match against the output of this filter. Use it to allow several filters to match the same HTML tag. Normally the text matched is used up by a filter - allowing only one filter to match on a particular tag, but some tags (like the "BODY" tag) may contain several items you may want to separately filter.

Warning: Enabling this creates the potential for recursive matching! (See below for more details)


Web Page Filter Editor Suffix Field
Scope Bounds

This is a simple matching expression used to limit the range of text checked by the main matching expression. You can use all the normal matching rules.

It often consists of just the start and end tag - for example, a rule used to match a link may have a bounds like "<a * </a>".  Use of bounds is optional, but it can improve performance by eliminating the need to check a more complex matching expression each time.  It's also useful for preventing a rule from matching more than you intended.


Web Page Filter Editor Limit Field
Scope Byte Limit

The Byte Limit determines the maximum number of characters to be considered for the match. Use the lowest value that still works, for example...

128 or less for small tags that only span a few lines

256-512 for medium sized matches of several lines

4096 for tags that span many lines (like "<Script ...>").

This number has a maximum value of 32076. Larger numbers may make web pages appear to load slower since the Proxomitron may need to scan ahead that many characters before sending data on to your browser.


Web Page Filter Editor Matching Expression
Matching Expression

Matching expression uses Proxomitron's Matching Rules to match text on a web page. Think of it as being a bit like a word processors "Search and Replace" function. Text matched here is replaced by the text in the "Replacement Text" section.

The matching clause can also have two special values:

<start> which will insert the replacement text at the start of a web page, while <end> will insert it at the end. Use to unconditionally add items to web pages.


Web Page Filter Editor Test button
Test Matching Button

This button opens up the Testing window which allows you to see in advance what effect a fliter will have on a given bit of HTML text.  Any changes made in the editor will be reflected in the matching window as soon as they are made (no need to press the OK button first)


Web Page Filter Editor Replacement Text
Replacement Text

The replacement text section determines what gets substituted for the text matched by the matching expression. Type whatever you wish here, or leave it blank to delete the text entirely.

Note: You can capture parts of the matched text to use in your replacement. This is a very powerful tool when re-writing existing tags. (See Matching Rules).  Also note by right-clicking you can insert the URL of a disk file into the replacement text. Useful for inserting your own background images and such.


Web Page Filter Editor URL Field
URL Match

The URL match allows you to limit rules to only affect certain web pages. In it you can use the full compliment of Matching Rules to match against the web page's URL. Note that "http://" is first removed from the URL before the match is done. Here's some examples...

"www.bison.com|www.frog.com" - will only match pages who's URL begins with "www.bison.com" or "www.frog.com"

"*sailormoon&(^*negaverse)" - would match any URL that has the word "sailormoon" unless it also has the word "negaverse"


HTTP Header Filters
The HTTP Header Filter Dialog

Here is where you can control how the Proxomitron edits the HTTP header messages that pass between your browser and the Internet.  Click on an area to get an explanation of its function.

The mysterious HTTP Headers revealed...

HTTP Headers are messages sent between your browser and Internet web servers whenever you request a page. These messages contain all sorts of information - some necessary, some merely informational. This includes, among other things, the infamous "web cookies" you may of heard about. Normally these messages are never seen, but using the Proxomitron's Log Window, you can see what your browser has to say.

Headers come in two flavors - Request Headers are outgoing messages from your browser to the web server, while Reply Headers are incoming messages from the web server back to your browser. The log window shows these in different colors, green and yellow respectively. Headers can be arranged in any order and the same header may even appear twice (though this is unusual). Headers your browser or the web server doesn't understand are simply ignored.

Using the HTTP header filters, you can add, delete, or change these headers based on their content. To modify or create a filter use the HTTP Header Filter Editor.

Warning: Caution should always be used when modifying HTTP headers - sending incorrect data or deleting required headers can impair your browser's operation.

Committing URL-acide

One newly added header filter serves a special function. The "URL-Killer:"  uses the new connection killer "\k" option to block unwanted URLs.  When a URL match is made, the remote web server won't even be contacted.  For image URLs the Proxomitron will return "killed.gif" (by default a blank, transparent .gif file) in place of the original image, for any other type of URL the Proxomitron simply sends the contents of "killed.html" instead.  Both killed.gif and killed.html are located in the Proxomitron's program directory under "html" and can be changed to send whatever you wish.

Besides URLs, you can use the same trick to kill items based on other header content as well. Content-Length: and Content-Type: can often make good candidates.  Note that for filters based on reply headers, the remote web server must first be contacted in order to get the information to test. Still, killing a reply will avoid loading the item's actual data.

File Sushi -  How to fix broken MIME Content-Types

Web servers use the "Content-Type:" header to tell your browser what it's loading. A web page, for example,  is "text/html" while a .jpeg file would be "image/jpeg".  However, when a server isn't aware of a new or unusual media type, it usually defaults to "text/plain".  Generally, this is bad because the browser, thinking it's reading a text file, can corrupt the data by gleefully adding extrainous CR/LF pairs where none should be - also known as "cooking" a file.

The Proxomitron can turn down the heat by assigning the correct content type to a "text/plain" file based on the URL's extention  (which is what the web server should have done in the first place). The default filter set includes examples for JavaScript, MIDI and MP3 files (look for the "Content-Type" header filters) - use them as a basis for adding other  media types.

HTTP headers in their natural environment

Here's a mini-bestiary of some common HTTP headers what they do...

Request Headers

If-Modified-Since:	This contains the date of the last time your web browser fetched this web page. Basically it says to the web server "only send me the page if it's been changed since this date". Deleting this header will force a web page to fully reload even if it's already in your browser's cache (with IE you'll also need to delete the "Last-Modified" header).

Referer: 	This contains the URL of the web page you previously came from. For security reasons web browser are supposed to give you the option not to send this information, but few browsers do.  It's usually safe to delete although it can have an odd effect on things like free web counters, which sometimes use it to track which web page they're keeping count of. If enabled for outgoing messages, Proxomitron's default Referer filter just sends a page its own URL here - sneaky no?

User-Agent:	This contains information about your web browser and usually your operating system as well. Normally, it's just informational - you can delete this header or even send your own information here if you like.

UA-...	Some versions of Internet Explorer sends several headers all beginning with "UA-". They contain various information about your computer and its settings. These are not standard headers, and are not required for any valid purpose. I recommend deleting them! Or better yet, use The Proxomitron's "UA-*" filters send back phony information (an excellent chance to get creative).

Host:	Contains the host name of the web page your contacting (as in "www.somewhere.com"). It commonly used by many web servers for "virtual hosting" where the same web server is used for several different sites. Generally leave this one alone.

Accept: 	Contains a list of file and image type your browser understands. Another one you usually need not modify.

Accept-Language:	Contains a list of preferred languages - intended for allowing multi-lingual web pages the automatically choose your language (though seldom really used for this). This is another header that the original HTTP specs said should be under user control. Sometimes you may not wish everyone to know your native language.

Accept-Charset:	The character sets your browser understands. Generally best let alone.

Cookie:	This is perhaps one of the most infamous, and misunderstood of all headers. Cookies contain a line of information originally send by a web server to your browser. All your browser ever does with them is send them back to the server unchanged.  Most often they contain some sort of user identification the server uses to tell you apart from other visitors, but the server has to know this information already through other means to create the cookie in the first place. By altering a cookie, you can really "mess with a server's head" so to speak and confuse it to who you really are. Depending on the situation, this can be a good or bad thing ;-).

You can use the Proxomitron's cookie filter to stop all cookies from being sent, or by including a URL match, send cookies only to certain trusted sites.

Pragma: no-cache	Often sent by web browsers when a page is reloaded. It's intended to tell any remote proxy to send a fresh version of the page (instead of a copy it may have stored). The Proxomitron uses this to detect when a browser's "reload" button is pressed.

Reply Headers

Server: 	Contains the Name and version of the web server. Simply informational and not used by your browser. Sort of the reverse of the "User-Agent" header.

Cache-control: 	affect how pages are stored in your browser's cache. A value of "Private" indicated the contents should not be stored while "max-age" give an indication of how long the page should be kept (kinda like a "Use By" date on milk ;-).

Pragma: no-cache	In a reply, this Indicates that your web browser should not store the page in its cache. Often used for temporary web pages like search engine results.

Expires:	Another header used by your browser's cache - contains a date when the web page's contents will have probably changed.  It usually is only speculative.

Date:	The web server's idea of the current date and time.

Last-Modified:	The date and time the web page was last modified. Also used by your browser's cache. For earlier versions of Internet Explorer, you may have to delete this header along with "If-Modified-Since" to "force" the browser to always reload a web page.

Content-Type:	Contains the type of data the server is sending, for example "text/html" is used for a web page and "image/gif" for a .GIF file.

Accept-Ranges: 	Part of HTTP 1.1 -  "Bytes" indicates a server supports retrieving arbitrary sections of a file.  Used by some download utilities to "resume" an interrupted file transfer.

ETag:	A little like a checksum (but only very little). It contains a string that is supposed to change every time the web page is updated. The string has no real meaning other than that. Again something to be used by your browser's cache.

Connection:	Another HTTP 1.1 header - "close" indicates no more data will be send on this connection (as was always the case in HTTP 1.0). HTTP 1.1 supports the idea of "persistent connections"  where the same connection is "reused" to send multiple items. Supposed to be better, but if you ask me, it mainly benefits the web server (by reducing load) not the person viewing the web page - since it serializes the loading of web page elements.

Content-Location: 	The URL where the data came from - not always present.

Location: 	Used by URL re-directors to automatically forward a browser to a new location. Not quite the same as Content-Location (as I originally though ;-).

Content-Length:	The length in bytes of the web page or file being sent.

Set-cookie:	A request to your browser to store the information contained in this header and send it back to this sever the next time you visit the web page.  Delete this, and your browser will never receive any cookies.  In the Set-Cookie filter, the URL match can be used to selectively accept cookies.


Header Filter "Out" Checkboxes
Outgoing Header Filter Enable/Disable

Any header filter can either be applied against incoming or outgoing HTTP header messages (or both). Clicking this checkbox enables this filter for outgoing messages. Changing this takes effect immediately.


Header Filter "In" Checkboxes
Incoming Header Filter Enable/Disable

Any header filter can either be applied against incoming or outgoing HTTP header messages (or both). Clicking this checkbox enables this filter for incoming messages. Changing this takes effect immediately.


Header Filter Names

This is a alphabetical list of all header filters. Unlike web page filters, order is unimportant. The part of the name before the ":" is the actual header to filter - anything after the ":" is simply a descriptive comment. The (Out) or (In) in the descriptions simply indicates how this filter is commonly used.

Multiple selected filters can be toggled on or off by pressing the "1" for outgoing and "2" for incoming filters.


Header Filter Edit Button

This button allows you to edit the currently selected header filter. (See Header Filter Editor)


Header Filter  New Button
New Header Filter Button

Use this to create a new header filter.

(See Header Filter Editor)


Header Filter Dupe Button
Duplicate Header Filter Button

This button creates a copy of the currently selected header filter. Use it to aid in creating a new filter similar to an existing one. (See Header Filter Editor)


Header Filter Delete Button
Delete Header Filter Button

This button deletes any selected header filter. However, deletes aren't permanent until you press the OK button.


Header Filter OK Button

Click here to put all changes and/or deletes into effect. Until OK is pressed, the Proxomitron actually uses a copy of the original unmodified filters - allowing you to edit filters while web pages are still loading.

Note: No web pages should be loading when OK is pressed.


Header Filter Cancel Button

Click here to cancel any additions, deletes, or modifications made to the header filters while in the header filter dialog.


Header Filter Editor
The Header Filter Editor

Here is where you change HTTP header filters or create new ones. Click on an area below to get an explanation of its function.

Unlike web page filters, the header filter's name is very important. It's simply the name of the header you want filtered and, except for case,  it must match exactly (sorry no wildcards here). A comment can be added after the colon ":" which will be ignored during filter matching.

The matching clause and replacement text work similar to the web page filter editor but match on the header's contents only (not the header's name).

A header filter can basically do one of three things: delete an existing header, modify an existing header, or add a new header.

•	To change a header both the matching expression and replacement text must have something in them. Just use "*" in the matching clause to match all headers of that type.

•	To delete a header include a matching expression, but leave the replacement text blank.

•	To add a header include a replacement text, but leave the matching expression blank.

Killing connections and rejecting selected URLs

A new option in the replacement text, "\k", allows you to kill any connection before it is loaded. When used with the URL match, you can create a "ban list" of URLs never to accept. Look at the "URL-Killer:" HTTP filter in the default filter set for an example of this.

MIME encode/decode and password strings

Right-clicking over the replacement text window will reveal an option to MIME encode/decode an selected text. This can be used to create password entries to automatically log you into sites or proxy servers that require a password.  For web sites use the following header filter...

Name	= Authorization:

URL	= The site you wish to send the password to

Replace	= basic username:password

Next select the username:password portion and select MIME > encode from the context menu. The end result should look something like this...

basic dXNlcm5hbWU6cGFzc3dvcmQ=

When enabled, this rule will send your password string to the server automatically and you will not be prompted for a login.  Note: this only works for sites using the "basic" HTTP authentication scheme. You can use the decode option if you need to see or change your password at a later date.

Creating a proxy server password is much the same - just change the header name to...

Name = Proxy-Authorization:

and remove any URL match (since the proxy server will be used for all URLs)


Header Filter Editor - Header Name
This contains the name of the header you want to filter.  An easy way to find this is simply copy the header you want from the Log Window and just paste it here.

If the header name is followed by a colon ":", you can place a descriptive comment after it. This will have no effect on the actual filtering.

"HTTP-Header-Name: optional comment here"


Header Filter Editor - URL match
URL Match

The URL match allows you to limit the header filter to only affect certain web sites. You can use the full compliment of Matching Rules to match against the site's URL. Note that "http://" is first removed from the URL before the match is done.  This also allows you to create several header filters for the same HTTP header, having different values sent to different web sites. Here's some examples...

"www.bison.com|www.frog.com" - will only match URLs beginning with "www.bison.com" or "www.frog.com"

"*sailormoon&(^*negaverse)" - would match any URL that has the word "sailormoon" unless it also has the word "negaverse"


Header Filter Editor - Matching
The header filter matching clause uses the Proxomitron's Matching Rules to limit the filter to only headers containing certain information. For instance, under the "User-Agent: " filter, a matching clause of "*nav*" would restrict it to just matching Netscape.

Just place an asterisk "*" here if you want to match all headers of this type, or leave this field blank to add a new header of your own.

You can test a match by right-clicking over this window and selecting "Test matching"


Header Filter Editor - Replace
The replacement text will replace the header's contents with text of your own. You can also use matching variables to capture parts of the original header's text (See Matching Rules).

To delete a header altogether, simply leave this field blank.

Right-clicking over this window will also let you insert a file URL or MIME encode/decode a selected protion of text.


Matching Test Window
The Matching Expression Test Window

A very useful feature new to version Naoko-3 is the Matching Expression Test Window. It lets you see first-hand if a particular expression will match any given text, and (if applicable) show what the resulting text will look like.  No more web page reloading just to check every little modification you make to a filter - just "paste and test".

You get here by pressing the "test" button in the Web Page Filter Editor or selecting "Test Matching" from the right-click context menu of the HTTP filter or URL matching windows.

Simplicity was never easier...

Using the tester is really pretty straight-forward.  Just enter some stuff to match in the top window (this will often be HTML source snipped from a web page), and press the TEST button. The result window will either show you what results your match has wrought, or tell you the rule simply didn't match at all.

We're always open...

Another unusual thing about the tester window is it doesn't have to be closed to go back to the filter editor.  You can simply flip between the editor and the tester window and any changes made to a filter will be immediately recognized the next time you press "test".  This makes it very easy to see what effect a change will have before you actually update the filter by pressing the editor's "OK" button.


Matching Test Window - Test Button
Test Button

Perhaps not entirely unexpectedly, the "Test" button starts a test.


Matching Test Window - Done Button
Done Button

Nothing special - just closes the testing window. However, you can also switch back to the filter editor while leaving the  tester window open if you like.


Matching Test Window - Text to test
Text to test window

Enter any text you wish to test against the filter you're currently editing here.


Matching Test Window - Results
The Result Window

This window shows you what changes the filter will make to the text being tested. It will also tell you if the filter doesn't match at all.


Matching Rules
Proxomitron's Text Matching Language

The text matching language is the key to understanding how the Proxomitron's filters work. It allows you to match complex combinations of HTML tags and store parts of the matched text into variables which can later be used in the replacement text.

If you're familiar with DOS and UNIX style filename wildcards (*,?,[...]) or regular expressions, you'll find much that's familiar in Proxomitron's matching rules. My original goal, in fact, was to create a matching language as easy to use as wildcards, but with much of the added power of regular expressions. I'm not exactly sure I succeeded, but it somehow I got it all to work! ;-)

If this kind of stuff is new to you, check out An Introduction to Text Matching for the basics.

Many of the rules have also been specifically designed to make working with HTML easier. For instance, since case is seldom important in HTML, all matching is case insensitive - saving you the trouble of testing for both upper and lower case.

Proxomitron's meta characters

Here's is a complete list of all the Proxomitron meta characters and what they do.

* 	The Asterisk will match any string of characters. For example, "foo*bar" would match "foobar", "fooma babar", or even "foo goat bat bison bar". Basically the asterisk means, "search forward matching anything until you find what follows the asterisk"

? 	The question mark matches any single character no matter what it is. "?oat" would match "boat" or "goat" or even "<oat"

[abc...]	Square Brackets matches any single character listed within the '[' and ']' Ranges can also be checked by using a dash: "[A-Z]" will match any letter "A" through "Z" while "[0-9]" will match any single digit. If the first character is a "^" it will match any character not within the brackets - "[^0-9abc]" will match any character that's not a digit and not "a", "b", or "c".

[#n-n]	Special numeric match. This is used to easily check for numeric value ranges in HTML tags. For example, to check for a number between 100 and 150 use "[#100-150]". If the second number is a '*' it acts as if it's infinitely large, "[#40-*]" would match any number greater than 40. To check for a number less than 40 simply use "[#0-40]". To check for an exact number the second number can be left out (as in "[#100]"). The numeric match will match regardless of leading zeros or quotes surrounding a number - tag="0100".  Note that currently, this rule only works with positive numbers, but you can use the dash to test for negative values: "-[#2-7]" for instance, could be used to match -2 through -7.

" "	A space always matches - but it also consumes any number of spaces or tabs it may find. Use it where there may or may not be a space between items. For example

"<tag value>" would match "<tag value>" or "<tag   value>" or even "<tagvalue>".

\s	Backslash-s: Like the space, will consume any number of spaces or tabs, but there must be at least one for it to match. For example "<tag\s>" would match "<tag >" or "<tag   >" but not "<tag>"

\w 	Backslash-w: Word match.  Will match any number of non-space characters. it's basically the opposite of "\s", but in some ways it's also similar to "*". The difference being it will stop if it hits a space or a ">" (which marks the end of a HTML tag). It comes in very handy when matching tag values and URLs (See tips and tricks)

\t	Matches a tab character explicitly

\r	Matches a carriage return character explicitly

\n	Matches a newline character explicitly

\0-9	Backslash+Digit 0-9: Match into a variable. This is one of Proxomitrons key matching rules. It matches just like  the "*" character, but stores whatever is matched into one of ten variables.  These variables can then be used in the replacement text to include parts of the original HTML. Use it to change only part of a tag while leaving other parts intact. For example, to change only the background in a <body ... >  tag you could use...

Matching:	<body \1 background="*" \2 >

Replace:	<body \1 background="mybackground.gif" \2 >

This way, anything else originally within the body tag, both before and after the background tag, will be included  in the replacement text.

              	More complex matches can be captured by placing the \#  directly after a set of parenthesis with no spaces in-between as in "(foo*bar)\1" It this case anything matched within those parenthesis will be placed into the variable. This is similar to regular expressions, but with the added benefit of being able to choose which variable gets used.

|	Use the vertical bar as an "OR" function. For example "foo|bar" would match either "foo" or "bar".

&	Use the Ampersand as a "AND" function. For example "*foo&*bar" would match "foo bar" or "bar foo" but not "foo foo". Note the use of the asterisk - something like this is always needed with the AND function since a word could never be both "foo" and "bar" at the same place and time ;). AND is useful for situations where tag values may come in any order...

<img src="picture" height=60 width=200>

which could also be written...

<img width=200 height=60 src="picture">

both would be matched by...

<img (*src="picture" & *height=60 & *width=200)*>

( ... )	Use parenthesis to create matching sub-expressions within matching phrases. For example "foo(bar|bear|goat)" would match "foobar", "foobear" or even "foogoat". Parenthesis can be nested, as in "foo(bar|(black|brown|puce) bear|goat)" which would match "foobar" "fooblackbear" "foobrownbear" etc.. Also as with "[...]", if the first character following a "(" is "^" the expression will match only if the expression within does not match.  For example, "(^foo|bar)" would match anything that's not "foo" or "bar". Note that a negated expression consumes no characters - it just test them. I think Perl calls this a "negative forward assertion"?

+	The plus sign indicates a run of repeating characters.  For instance, "a+" would match "a", "aa", or "aaaa". You can use it after other meta characters or parenthesis for more complex runs. For example...

[abc]+         	would match a run of any characters  "a","b",or "c" like "ababccba"

([a-z]&[^n])+   would match a run of letters "a" through "z" but not "n"

(foo)+	      	would match "foo", "foofoo", "foofoofoo", etc.

\	The Backslash can be used to "escape" any character that has special meaning and treat it as a normal character.  For example, to match a parenthesis in the HTML text use "\(", to match a backslash itself use "\\".

=	The equal character has special "magic". It will match not only the "=" itself, but also any whitespace before or after - making tests for tag values easier.  For example foo="bar" also matches foo=  "bar" or foo = "bar"

"	The double quote  - it will match either double or single quotes (since either may be used in HTML). for example  " * " would match...

"oh happy mongoose"  ...or... 'oh happy mengeese'

If you want to test for double quotes explicitly just use the backslash - \"

'	The single quote is smarter than your average quote: It attempts to match the appropriate ending quote for any quote previously matched by the double quote - even if there are other quotes in between!  Confused?  Don't be - in HTML it's common to use a mixture of single and double quotes when you need "quotes within quotes" - look at the following examples...

single within double: href=" javascript:window.open( ' bison.html ' ); "  or...

double within single: href=' javascript:window.open( " bison.html " ); '

both these could be matched by href=( " * ' )  -  simply use the double quote to match the initial quote and the single quote to match the ending quote.  There are some restrictions here: First both the starting & ending quotes must be in the same sub-expression - that means in the same set of nested parenthesis. for example....

" some text '   	works...

( " some text ' ) 	works too...

" ( some text | other text) ' 	even works... but

" (  some text '  ) 	won't work worth a darn

( " | ) some text ( ' | )	sadly, won't work either

Another restriction is start and end quotes can't be nested in the same sub-expression - a matching clause of...

" something " something else ' end of something '    won't work

However, you can nest them using a different sub-expression, like so...

" something ( " something else ' )  end of something '

It's also worth noting that if no previous double quote was matched, the single quote just matches a normal single quote. Still it's safer to use \' to explicitly check for a single quote if you need to.

Special Replacement Text codes

Besides the matching rules, there are a few special codes that are used in the replacement

text. First "\0" through "\9" are used to insert values stored into the corresponding variables from the matching expression - there are also a few others...

\u -	includes the full URL of the current web page.

\k - New: Kills the current connection - useful in HTTP headers to ban specific URLs and in web page filters to skip loading the rest of a page.

\h -	includes the host portion of the URL

\p -	includes the path portion

\q -	includes any query string from a URL (anything following a "?")

\a -	includes any anchor text from a URL (anything following a "#")

\d -	includes the application's base directory in a "file://" URL format

(used to aid in including substitute images or data)

That's all the rules in a nutshell.

For more examples on how to use them see tips and tricks


An Introduction to text matching

To those unfamiliar with matching languages they do look very cryptic at first, but don't worry - the idea is really very simple. Certain characters, often called wildcards or meta characters, are given special meaning. Each of these characters will match parts of the original text only if they meet certain conditions. The text that's been matched can then be replaced by something else.

For example, the asterisk "*" will match any unknown group of characters, no matter what they are. It's normally used to match a section of text you're not sure about.  For instance, say you were trying to match any word that ended with the letters "ko". Using "*ko" would match  "Naoko" or "Atsuko" but it wouldn't match "Michie".  While, something like "john*smith" would match "John W Smith",  "John 'Bubba' Smith", not to mention plain 'ol "John Smith".

Applying the idea to HTML - say you wanted to match all image tags. An image tag always begins with "<img" and ends with a ">", but it can also have any number of things in between.   A matching expression like "<img * >"   could be used. It's like saying...

Match anything that starts with <img, possibly has some other stuff here, then ends with ">".

In the replacement text you could then re-write the image tag to say exactly what you want it to. It's even possible to "capture" parts of the original text you may want to keep (like the URL of the image for instance) to use in the replacement text. Look at the following...

Matching: 	<img * src=(\w)\1 * >

Replace: 	<img src=\1 border=1 >

This introduces a few new ideas, first of all the "\w" (or word match) will match any continuous string of text unbroken by a space - it's useful for matching URLs.  the parenthesis "( ... )" followed by the "\1" basically say "Stick whatever is matched between ( and ) and place it into  variable number one".   The "\1" in the replacement text then just inserts the contents of variable number one at that location. The Proxomitron matching language features ten such variables numbered 0-9.

Put into action, the above rule would re-write an image tag that looked like...

<img align=left src="bison.gif" alt="My pet bison Phil" >

Into...

<img src="bison.gif" border=1 >

The part in blue it what the first "*" matched.

The part in red is what the "(\w)\1" matched.

The part in green is what the last "*" matched.

Notice that the blue and green bits never appear in the replacement text. Only the bit we decided to keep by using the number variable does. By deciding what to keep and what to throw away we can completely rework a bit of HTML. For example, say we wanted to change the above image so that instead of showing us our bison, it gave us a link we could click to see it. If we changed the replacement text to read...

Replace: 	<a href=\1 > a picture </a>

Then the same image text of...

<img align=left src="bison.gif" alt="My pet bison Phil" >

would now become...

<a href="bison.gif" > a picture </a>

Hopefully this will give you a brief idea of how pattern matching works. Read about the other meta characters to learn more about putting these ideas into action.

Return to matching rules


Consume
To "consume" a character means a matching rule will use the character up making it no longer available to following rules. Normally a matching meta character will consume all characters it matches.

For example, if the matching expression "*reindeer*soul!" was used to match the sentence, "Those evil reindeer, oh how they prance upon my soul!",

First "*" would consume "Those evil"

then the word "reindeer" would be consumed.

the second "*" would consume ", oh how they prance upon my "

and finally "soul!" would be consumed.


Tips and Tricks
Matching Rule Tips and Tricks

The matching rules are the most complex part of the Proxomitron. Understanding them can be confusing at first - especially if you've never used a pattern matching language before. However, don't despair, even very simple rules can accomplish quite a bit. Take it a step at a time and soon it'll become second nature. To get you started, Here's a few tips covering some basic HTML matching tasks.

Note: This section assumes you know a little about HTML - if not there are many excellent tutorials available on the net. Also If you don't intend to write your own rules, you can ignore this information entirely.

Formatting your matching rules

Complex matching rules can often be hard to read. However, to make them a little more legible, both the matching expressions and replacement text can be split over multiples lines. These line breaks are ignored in the output. To actually include a line break in the replacement text or match one in the matching clause use "\n".

Also because spaces always match true, you can normally use them freely to separate elements of a matching expression. Just be aware that they do consume spaces they find.

Some general info

When designing a new rule it's more common for it to not match at all rather than match too much.  Always start simple - then add refinements as needed. That way, when a rule suddenly doesn't match when you expected it to, you'll have an idea which part is causing the trouble.

Use the log window to see when a filter matches, and use your browser's "view source" option to see the results of a match. These are two very helpful tools when designing rules.  Even more helpful is the new Match Testing Window which allows you to see exactly how a filter will change a bit of HTML text.

Cutting and pasting HTML

Often a good way to get started on a new filter is to cut and pase the HTML you're interested in directly into the matching clause.  One thing to watch out for here is line endings - since the matching clause ignores line breaks, a line of HTML that looks like so...

<br>

<p>

seems just like "<br><p>" to it.  This can cause trouble since the actual HTML also has a newline character that must be matched.  The solution is simply to place a space at the begining or end of each line (if it doesn't already have one) this will match all "whitespace" including any newlines.

Disabling a tags and tag elements

Since browsers will ignore any tags and element they don't understand, a "quick and dirty" but effective way to disable a tag or one of its elements is to rename it. This comes in especially useful when the same element may be used by several different tags. Take "onload" for example, this element auto-runs a JavaScript. Although normally in the "<body ... >" tag, it may occur elsewhere as well. To stop it you could use...

Matching:	onload=

Replace:	LoadOff=

Which would make a tag like...

   <body background="bak.gif" onload="window.open(myadd);" >

become...

   <body background="bak.gif" LoadOff="window.open(myadd);" >

Notice how simple this rule is! It's also a bit risky too, since there's a chance the phrase "onload=" could occur outside a tag in the actual text of a web page. In practice however this seldom happens (including the equal sign helps guard against this a bit). Even if it does, it's normally not a big deal as long as you realize what's happened.

Killing two stones with one bird

Here's a simple trick for changing both a start and end tag with the same rule. This trick is used by the "Blink to Bold" rule among others. In this rule we want to convert "<blink>" to "<b>" and "</blink>" to "</b>" - Let's take a look how it's done...

Matching:	<\1blink>

Replace:	<\1b>

By using the "\1" meta character, the rule will match both the start tag: "<blink>" and also the end tag: "</blink>". Additionally, the  "\1" captures the end tag's slash for use in the replacement text. A safer, but more complex,  version of the rule might be...

Matching:	< ( / | )\1 blink>

Replace:	<\1b>

Can you tell why? If not read "Testing for something or nothing".

Capturing a tag's contents

Often you'll want to change only one element of a tag while leaving the rest as they are. This is where the number variable "\#" matching is very useful. Take the following example of a rule to kill web page backgrounds.

Matching:	<body \1 background=\w \2 >

Replace:	<body \1 \2>

When they don't directly follow parenthesis ( ... )'s  the \# variables act just like an asterisk "*". Here, the "\1"  captures anything before the background element, while the "\2" captures everything afterwards. In the replacement text, the background element is simply left out, but you could also include your own background here.

Adding an new element to a tag

Here's quick trick to add an element to a tag.  Although the "proper" method would be to replace an element if it already exists and add it only if it doesn't, this can sometimes be difficult. It's often simpler to just add the element regardless. We just need to make sure the browser will use our tag instead of any pre-existing one.  For example, to add a border to all "<img ... >" tags, you could use.

Matching:	<img \1 >

Replace:	<img border=1 \1 border=1>

Why add border twice?  Well ideally, when a browser finds a duplicate element it should use the first one and ignore the rest. This is in fact what Netscape does, but as it turns out, Internet Explorer does the exact opposite! (what a surprise huh?)  By placing the element at the beginning and end of the tag, it works in either case.  Note that being browser independent isn't as important here as it is for designing web pages. You're likely to know what browser you intend to use, so it's ok to just arrange thing in the way your browser expects.

Capturing specific tag attribute values

The values of a tag's attributes can often be tricky to match. Take "<a href=... >" for instance. "href" indicates a URL, but the URL value could be surrounded by single quotes, double quotes, or even no quotes at all.  This is where the word match "\w" rule comes in handy.  It will match everything, including any quotes it may find, until it hits a space or the end of the tag.  For example, if you wanted to capture the URL into the \1 variable you could use...

<a * href=(\w)\1 * >

Remember that when a "\#" immediately follows parenthesis it captures whatever text those parenthesis matched.  A more interesting example is...

<a * href=(\w(banner|advert|cgi)\w)\1 * >

Which would only match URLs containing the words "banner", "advert", or "cgi".  We now have the beginnings of a "banner blaster" type rule.

Testing for something or nothing

Often you'll find you'll want an expression to match whether a particular value is there or not. To do that use the following rule... "( something | )"

This will first test for the word "something" but if it isn't found the expression is still true. Why? Notice there's an OR symbol (vertical bar) with nothing between it and the closing parenthesis. This creates an empty expression and an empty expression is always true and consumes no characters. Read this as saying - match "something" OR nothing.

Note that if the expression had been written "(|something)", the word "something" would never be matched!  Since ORs are processed from left to right, the empty expression would always match first before the word "something" got a chance.

A practical example is ( " | ) * ( " | )  which tests for something that may or may not be surrounded by quotes.

Here's a more elaborate example which grabs the "border" value from an "<img ... >" tag if it exists and places it into the variable \1

<img ( * (border=\w)\1 | ) * >

Be careful of the placement of asterisks here, for example "<img*(border=\w|)\1*>" might not do what you expect. Upon scanning the first character after "<img ", if it turned out not to be "border" the sub-expression would still match!  Then when "border" occurred later in the string, it would be matched by the second asterisk instead, since the initial test had already passed by.

Using "AND" to capture multiple tag attributes

By using the ampersand "&" you can capture certain tag attributes regardless of the order they're found in. For example. Say you wanted to re-write an "<img ... >" tag to contain an image of your own, but wanted to keep the original "width" and "height" values. You might use...

Matching: 	<img ( (*(height=\w)\1*| ) & (*(width=\w)\2*| ) ) >

Replace: 	<img src="file://d|/my_pictures/shonen.gif" \1 \2 >

Note that the height is captured into variable \1 and the width into \2. Also by using the "something or nothing" syntax described above, the expression will still match even if the width or height value is missing from the tag.  In which case the corresponding \# variables will simply be blank.

Using "smart" quotes

Most of the time "\w" works well for capturing a tags attributes. However there are times when you need something more. Something like the an "<img ... >" tag's "alt" element often contains spaces as in... alt="this is some text" or alt='also some text'.  To capture this sort of thing use the double quotes...

Matching:	alt=( " * " )\1

An even more complex situation often arises with JavaScript.  Here is common to have "quotes within quotes" as in the following...

onmouseover="javascript:window.open( ' mywindow.html ' ); "

capturing this would normally be difficult as it could also be written...

onmouseover= ' javascript:window.open( " mywindow.html " ); '

This is where the single quote comes in, it looks for the correct closing quote for the previous starting quote.  Take the following rule: it can be used to deal with just about any value it comes up against.

Matching: onmouseover=( " * ' | \w )\1

This will get single quotes, double quotes, nested quotes, or even no quotes at all!

Using file URLs to include your own stuff

A "file URL" is a URL that points to a file on your hard drive rather than some location on the Internet.  Browsers use file URLs to view web pages stored off-line, but they are also a very handy way to insert your own pictures, web pages, even JavaScripts into pages you view.

The Proxomitron now makes it very easy to insert a file URL into a matching rule's replacement text.  First position your cursor where you wish to insert the URL then right-click and select "Insert file URL" from the context menu. A file requester will open up allowing you to choose the file to insert.

Here's an example of a "background replacer" rule that uses a file URL

Matching:	<body ( \1 background=\w | ) \2 >

Replace:	<body \1 background="file://c|/pictures/background.gif" \2 >

Note the matching expression has a space between the ")" and the "\2" - it's a common mistake to forget this space! This would result in the \2 containing what was matched in the "( ... )" phrase instead of whatever follows the background attribute.

Inserting JavaScript or other items in every web page you view.

Here's an trick for really taking control of a web page. JavaScript can be a very powerful tool - in the right hands...  Now those hands can be your own! To insert a JavaScript, or for that matter anything else, into every web page you view, search for a tag you know will always be there - "<html>",  "<head>" or "<body>" are often a good choices.  Take for example, a rule to stop JavaScript error boxes from popping up. For Netscape we need to execute the following bit of JavaScript code on every page "<script> this.onerror=null; </script>" The rule would look like so...

Matching:	<html>

Replace:	<html>\n<script> onerror=null; </script>

This basically inserts the script directly after the <html> tag. Note the "\n" - this causes a line break between the <html> tag and the start of the script. Though not really necessary, it makes the web page source easier to view if you want to check your results.  Also, when using this trick it's best to have the "Allow for multiple matches" check box enabled. This allows any other rules that may use the same trick to insert their text as well.  Warning: don't be tempted to try to insert something before a tag with multi-match enabled - this leads to recursive matching!

Small scripts like the one above can easily be included directly in the replacement text, but for larger scripts this might be cumbersome. A better solution might be to have the "<script ...>" tag contain a "file URL" pointing to a file with the actual script. As In...

<html>\n<script src= "file://c|/scripts/myscript.js" >

An even better way to insert items into every web page you view.

I described the above method first because it's a useful trick when you need to insert something into a certain area of the page (like after the <body ... > tag for instance).  However, if all you want to do is put it at the start or end of the page there's an even easier way....

The matching clause can have two special values <start> and <end> - they simply insert the replacement text either at the beginning or end of a web page.  They're easy to use and very efficient since no searching has to be done.  Using <start> the above rule could be written...

Matching:	<start>

Replace:	<script> onerror=null; </script>

This works great for JavaScripts (and overriding JavaScript functions - see below).  Also there's no need to worry about allowing for multiple matches!

Overriding JavaScript Functions with your own

In Netscape and Internet Explorer 4.0+ there's a very effective trick for warping JavaScripts.  Any JavaScript function - even built-in ones - can be redefined to do whatever we want. Say we wanted to get rid of those "alert( ... )"  and "confirm( ... )" boxes.  We could do it by simply inserting the following script at the start of a web page (use the <start> technique above)....

<script>

    function alert( ){ return(1); }

    function confirm( ){ return(1); }

</start>

Now whenever any other script on the page attempts to call an alert or confirm box, our functions get called instead.  By returning a "1" we even make the unsuspecting script think we answered "yes" to the confirm box's prompt!

This is really a very powerful concept - although the functions in this example don't really do anything, more complex replacement functions could filter only certain alert boxes or even do something else entirely. There's really no limit.

Since it's so efficient, the Proxomitron's default rules make good use of this trick. One drawback, while it works with most all versions of Netscape, and IE 4.0 or higher - it won't work with Microsoft's JScript in IE 3.x  The Proxomitron provides an alternate rule set for IE 3.0 users which use the normal search and replace techniques to accomplish these things instead.

Using recursive matching

Recursive matching is when a rule matches its own previous results. Normally this is something to avoid, especially if it leads to infinite recursion - where the rule matches endlessly against itself. However, used properly,  this can be a powerful technique. Take this scenario - say you want to eliminate any pop-up windows the occurs between the "<script ..." and "</script>" tags.  Since JavaScript uses the "open(...)" command to pop open a window, the resulting rule might look like this...

Matching:	<script \1 open \( * \) \2 </script>

Replace:	<script \1 \2 </script>

(In actuality, you'd also want to use scope here, but we'll discuss that later - also note the use of the "\" to escape the special meaning of the parenthesis).  This might work if there was only one open command in the JavaScript, but if there was more than that only the first would be eliminated.  The solution? Well, two things. First, check "Allow for multiple matches" to let the rule match against its own results. Secondly, we need to change the replacement text to read...

Replace:	\n<script \1 \2 </script>

Why? Well, in order to help guard against accidental infinite recursion, the Proxomitron's matching engine always advances one character forward after all rules have been checked. This means the next time through our rule would see only "script ..." instead of "<script ...". To get around this we simply insert a "newline" character in front of the replacement text. Although in the final output this will create a blank line before the "<script ..." tag, the browser will ignore it.  However it lets the rule see "<script ..." next time around. A leading space could have also been used,  in fact so could anything that doesn't affect the web browser's function.  The idea is simply to push the entire result at least one character forward.

Once all the "open(...)" commands have been removed, the rule will no longer match, so there's no danger of infinite recursion.

A word about Scope Bounds

For simplicity, the examples here have made no use of the web filter's scope bounds settings. Bounds can be used to control how far ahead the Proxomitron's matching engine scans a web page when searching for a match (see the web page filter editor for a more detailed explanation).

With bounds you normally give the rule fixed starting and ending points to search between.  Reusing an example from above, take the following rule...

Matching:	<script \1 open \( * \) \2 </script>

Replace:	<script \1 \2 </script>

Written using bounds might look like...

Bounds:	<script\s*</script>    	Byte Limit: 4096

Matching:	\1 open \( * \) \2

Replace:	\1 \2

Notice we just move the fixed beginning and ending text into the scope's bounds check. The byte limit is the maximum characters to search before giving up. Nothing to it really. Also we've used the \1 and \2 in the matching expression to capture the start and end of what the bounds matched - including  <script and </script>. So we no longer need put them in the replacement text.

That's all there is...  For now

Those are all the tips I can think of. If you have any ideas of your own please let me know. Also remember you can look at the rules that come with the Proxomitron!  Use them as a starting point when writing new rules - often you'll find one that already comes close to what you want to do.


Matching Character Reference
Meta Character Quick Reference

Here's a quick list of all Proxomitron's special characters. See Matching Rules for more detailed explanations.

Matching meta characters

* 	Match a string of any characters.

? 	match any single character

[abc...]	Match any single character within "[ ... ]" or not within "[^ ... ]"

[#n-n]	Numeric range match.

" "	Always matches but also consumes any whitespace.

\s	Match string of whitespace only.

\w 	Match any number of non-space characters except ">".

\t	Matches a single tab character explicitly

\r	Matches a single carriage return character explicitly

\n	Matches a single newline character explicitly

\0-9	Match into a variable - works like "*" unless following parens "( ... )\1" .

|	OR function.

&	AND function.

( ... )	Group a sub-expression. Negate with "(^ ... )"

+	repeat previous match - matches pattern runs.

\	Escape any meta character's special meaning.

=	Magic equal - absorbs leading/trailing spaces.

"	Magic quote - matches double or single quote

'	Smart ending quote - use to deal with nested quotes

Special Replacement Text Escapes

\# -	Insert variable into replacement text

\k - New: Kills the current connection - useful for eliminating certain URLs or webpages

\u -	Insert the full URL of the current web page.

\h -	Insert the host portion of the URL

\p -	Insert the path portion

\q -	Insert any query string from a URL (anything following a "?")

\a -	Insert any anchor text from a URL (anything following a "#")

\d -	Insert the Proxomitron application base directory in a "file://" URL format

\\  -	Insert a single backslash explicitly


Configuration Dialog
The Configuration Dialog

Here is where several of the Proxomitron's global settings can be changed. Click and area for an explanation of its function.

Autorunning programs and URLs

The Proxomitron allows you to autostart a program whenever it's first started or when you click on the "Run Program or URL" button on the main screen or taskbar menu.

When used with a program, this provides a handy way to launch your browser along with the proxomitron.  When used with a URL it allows you to save config files that contain settings specially tailored to a website then launch that page whenever the config file is loaded.  You can use this a bit like browser bookmarks to easily jump to a site with specific filters already in place.

If "Run at startup" is checked the program/URL will be started automatically. If unchecked, The program/URL will only be run whenever the "Run application or URL" button is pressed on the main screen (or selected from the system tray context menu).


Config - No Texture Checkbox
No Textures

Click this to disable the use of background textures. Takes effect whenever the Proxomitron is restarted or a config file is reloaded.


Config - Always use textures checkbox
Always Use Textures

Click here to force the Proxomitron to use background textures even if the display driver only supports 256 colors or less. Warning, unless the textures are designed to use the default palette this is usually ugly! Takes effect whenever the Proxomitron is restarted or a config file is reloaded.


Config - Change Textures
Set Textures

This is where you select the background texture the Proxomitron uses. Simply click the texture you wish to change and a file requester will open.

Textures must be windows bitmap files - all except for the button texture will be tiled.


Config - Listener Port
Listener Port

This is the TCP/IP port the Proxomitron monitors for incoming requests. Normally the default of 8080 is fine, but any available port can be used.  Note: if you change this value, you'll also need to change the HTTP proxy port number in your browser's proxy settings.


Config - Run program at startup
Run program at startup

Click here to have the program or URL listed below automatically run.

A program will be run when the Proxomitron is first started. Useful for starting your web browser along with the Proxomitron.

When used with a URL the page will be launched every time the config file is loaded - allowing you to use config files a bit like browser bookmarks.


Config - Auto-run program filename
Autorun Program/URL Name

This can contain either a program name or a web page URL. The "Find" button will open a file requester allowing you to select a program to run, or you can type in any web page URL you would like this configuration to launch.


Config - Minimize to system tray
Minimize to system tray

A highly requested and very useful feature, checking this box allows the Proxomitron to live in the system tray whenever you minimize the main window.

Not only does this help unclutter the taskbar, but it also provides a handy context menu allowing you to change many of Proxomitron's main settings.


External Proxy Dialog

The Proxomitron can itself use a proxy server. In fact, you can maintain a list of multiple proxy servers and easily switch between them.

This is Proxomitron's external proxy configuration dialog. Click on an area to get an explanation of its function.

What can an "external" proxy do?

The most common use for a proxy server is to act as a "global" webpage cache in order to speed up web browsing (especially overseas or where Internet connection may be slow or unreliable).  However they can do much more - anything from filtering out material inappropriate for children, to translating a webpage from one language to another.  You may want to check this site for more information  Proxys-4-All  http://www.bikkel.com/~proxy/

Adding proxy comments

As of Naoko-3 you can follow a proxy entry with any comment text you like (using a space to separate them).  This can be helpful to remind you what a particular proxy does or how reliable it has been. Just use the following format...

proxy.host.name:port comment text here

Adding lists of proxy servers

It's possible to add multiple servers at once by first clicking "Add" then pasting in a list of proxy server entries.  This will work as long as the entries are in the correct format.  You can also enter multiple items by pressing Ctrl+Enter after each entry in the add dialog.

Advanced proxy settings

Right-clicking over the proxy list edit window will allow you to select "Advanced proxy settings". Currently this consists of one oft-requested feature: proxy rotation.   When enabled proxy rotation will automatically switch to the next proxy in the list every so many connections.  It's best to be sure all proxy servers in the list are reliable if you decide to use this feature.

Proxy passwords

If you use a proxy that requires a password (as is often the case with proxy "firewalls") you can  create a special HTTP header filter to automatically send the password to your sever. See the Header filter editor for more details.

Testing a proxy

The Proxomitron can perform a "loopback" test on an external proxy. During the test the Proxomitron makes a request for a web page - through the remote proxy - back to itself.  It then monitors both ends of the conversation.  Use it to tell if a particular proxy server is accessible and available for use.

If the test is successful, the status window will show the name of the proxy server as it would appear to the remote host. Otherwise an error message will be reported.

Far more detailed information, including HTTP headers added by the remote proxy, can be viewed if the log window is open during the test.


Proxy Dialog - External proxy list
External Proxy List

This is a list of all external proxies the Proxomitron knows about.  Simply select the one you want to use. An entry can be changed here by typing over top of it, or deleted by blanking the name out entirely.

Right-clicking over the list reveals more options including the advanced proxy settings.


Proxy Dialog - Add button
Add a new external proxy

Click here to add a new external proxy to the list.

Use the format...  servername:port

You can also add optional comments...

goodproxy:8080 Fast and reliable

flipper:3128 Translate pages into dolphin

Lastly you can use Ctrl+Enter to insert multiple proxy entries at once (or even cut & paste a list)


Proxy Dialog - OK & Cancel buttons
Proxy OK and Cancel buttons

No changes to the external proxy list are final until OK is pressed. Use Cancel to undo recent changes.


Proxy Dialog - Test button
Test External Proxy

Press this button to test an external proxy for availability and access rights. If the test succeeds you'll see the name of the proxy as it would appear to any host you connect to - otherwise you'll see an error message.

Note: Open the log window during testing for more detailed test information.


Proxy Dialog - Status window
Proxy status window

This area informs you of additions, changes and deletes to the proxy list.  It also shows the results of a proxy test.


Contacting the Author

If you're finding the Proxomitron's mysteries a little too mysterious ;-) or just want to contact the program's author, I can be reached via one of the following methods. I can't always promise a reply, but I will try to address any serious problems people may be having.

E-Mail: 	proxomitron@apexmail.com

Postal:	Scott R. Lemmon

2121 Gillis St.

Palatka Fl, 32177

Note: 	Unfortunately due to a change in the "free" service provided by NetAddress (usa.net), the Proxomitron's email address has changed since the last release.

Feel free to email me - I'm interested in hearing from people who've found some use for this odd little program of mine.

Also be sure to check for new developments at the Proxomitron web page. The page itself may move, but the following URL should always take you its current location...

http://proxomitron.cjb.net/

The Proxomitron can also be found at the following sites...

241 Computer Services

http://www.241computers.com/software/

MJK's Japanese Proxomitron support page

http//www.imasy.or.jp/~mjk/soft/proxomitron/index.html

I'd like to thank them for all their help in supporting the Proxomitron.


Send me your filters!

One of the Proxomitron's most powerful features is the ability for anyone to create new and more powerful filtering rules. It's my hope that this will lead to an ever-growing collection of useful filters which I can make available for all to download on the Proxomitron web page.

If you've created a filter you feel may be of interest to others please email it to...

proxomitron@usa.net

Use a subject of: "New filter submission"

Including the following information...

Description	: Tell me what your filter does

URL	: Give me an example of a web page it's used on

Browser	: Which web browser do you use (name and version)

Filter Text	: do the following...

Step 1: Save the filter into a config file then edit that config file in a text editor.

Step 2: Search for your filter under the "[patterns]" section

Step 3: Cut and paste the filter's text into your email

Here's an example of what a filter looks like...

name="Banner Blaster"

Bounds = "<a\s*</a>"

limit = 800

match ="\s\1>*<img*(*src= "\w((/ad|sponsor|ads|banner|cgi)\w"|/0")|"

       "*width=[#466-480]&*height=[#55-60]|"

       "*width=[#88]&*height=[#31])*>*"

replace = "<center><a \1>\r\n[Banner Killed]</a></center>\r\n"

active=1

By submitting a filter, you are agreeing to place it in the public domain - you relinquish any copyright claim on it!

I'm mostly looking for web page filters, but if you create a useful HTTP header filter feel free to send that too.


Proxomitron Questions
The Proxomitron IFAOFAQN  (It's Finally A Official F.A.Q. Now)

Since Naoko-3 is the second release of the Proxomitron some questions have indeed had a chance to be asked frequently.  Astonishingly my psychic friends did show amazing accuracy in their predictions and seldom seemed to miss the kayak - it almost makes the expansive phone bills worth it...

I've run the Proxomitron, but my browser doesn't seem to use it - why?

You need to set your browser's proxy option to use the Proxomitron - see installation.

Also, the first time you use the Proxomitron you may need to reload the page or clear your browser's cache before the changes will appear.

My browser doesn't seem to work anymore - what gives?

Once you set your browser to use the Proxomitron both programs must be running for things to work. If you don't want to use the Proxomitron at all, just set your browser back to not using a HTTP proxy. Also see installation

I'm getting JavaScript errors on web pages I view - why?

Are you using Internet Explorer version 3.x?  It doesn't support some of the JavaScript tricks the Proxomitron uses to filter things like pop-up windows and alert boxes.  You can either upgrade to IE 4.0 or higher or use the special Internet Explorer 3.0 rule set included with the Proxomitron distribution.  Netscape doesn't seem to have these problems by the way ;-).

A filter can also on occasion cause an error by changing things in a way the original script never expected  (like closing a window it thought should be open for instance).  The Proxomitron's rules are designed to work transparently when they can, but it's not always possible to account for every situation.  The solution is to enable the "Suppress all JavaScript errors" filter - the  browser will then ignore any errors if they occur.  Since Its not unusual for scripts to fail even without the Proxomitron's meddling, it's a good filter to always use. Unfortunately, there doesn't appear to be a way to do this in IE 3.x - sorry.

When using certain filters, some web pages don't seem to work anymore - why?

When filtering a web page there's always a chance something necessary to the page's function might be eliminated - this is especially true of JavaScript based filters. Although it's bad HTML design, some pages might actually need pop-up windows or dynamic HTML in order to work.  The quick solution is just to bypass the web filters and hit reload on your browser.

For the more adventurous, open the log window. This will show which rules are used on a particular page, and can be useful in tracking down exactly which rule is causing the problem. Once you find it you can exclude the offending page by adding it to the rule's URL match, like so... (^www.dont.filter.me.com)

How do I see the original unfiltered web page?

Simply press the Proxomitron's bypass button then press reload on your browser.

Note this may not reload animated .GIFs - you may need to "force" a total reload. In Netscape hold down SHIFT while you press reload. In IE 4.x press CTRL+F5 (doesn't seem to be a way to do this in IE 3.x ??! ) .

How come some rules don't appear to work on my browser?

What browser are you using?  Proxomitron can use any browser, but some items (especially JavaScript) can vary wildly from browser to browser.  The default rule set was designed around Netscape and I.E. 4.x  - there's also a special I.E. 3.x rule set.   If your using a different browser however, some rules might need tweaked to work properly - the good part is anyone can change them!  If you do find an incompatibility please let me know.

How many filters can I use at the same time?

The Proxomitron imposes no hard limit on the number of filters you can use (it's only limited by your computers memory). However, on slower systems using too many simultaneous filters could slow things down.  Generally you may notice this if your using a 486 or slower PC.  If you do, here's a few tips:

1 	Web filters use the most CPU time - the GIF and header filters use very little.

2 	Non-active filters consume almost no CPU time - enable just those you need.

3 	Using URL limits with web filters can reduce load since all filters won't be active for all pages.

4 	When creating complex filters, use a bounds expression and as small a byte limit as you can get away with.

A Pentium 120 can run a large number of active filters with no slowdown - with even faster CPU's it becomes more and more a non-issue.


Default Filters
Default Web Filters

This is a brief description of what the web filters provided with the Proxomitron can do. Note that, since new filters are always being added and improved, this list might not be exhaustive.

The default filter set...

The following list gives, in no particular order, a brief description of most of the web filters in the default set. Note rules shown in red are new in version Naoko-3. Also note that many (if not most) of the old rules have undergone improvements.  If a particular rule didn't work for you before, be sure to try it again.

Banner Blaster: This is the main advertising filtering rule. It takes any image that look to it like an advertisement and replaces it with a plain text link (using any original ALT text the image may have had). It's quite effective - and since ads remain clickable, seldom affects a web page's over-all function.

Customization tip: In this filter you'll see a section like "(href|src)=\w(ads.|click|...)" with many words within parenthesis "(...)" separated by the OR symbol "|".  You can add additional words here to make the rule filter even more ads.  Another tip: you can remove ads entirely (no text links) by blanking out the replacement text or changing it to fixed message of your own.

Banner Blaster (limit text):  Same as the banner blaster, but limits the amount of text to the first four words. Useful for times when advertisers attempt to cram in too much ALT text.

Banner Replacer: An alternate ad killer, this rule replaces ad banners with a transparent .GIF image surrounded by a border. It keeps the layout of the page closer to the original, and is a good example of how to replace an image with one of your own. In fact, this rule can be customized to use any image you like.  To choose a different replacement image, highlight \dclear.gif in the replacement text, right-click, and select "insert file URL" from the context menu.  Next choose your replacement image and press "Open" - it's URL will automatically be inserted into the replacement text.

Area Map Ad Blaster parts 1 & 2: This is a two part filter designed to eliminate ads that use area maps.  Area maps are different from normal banners in that they can contain several links. The first rule acts a bit like the banner blaster converting the first link it finds into text. If used alone, only the first link will be converted. The second part, when used with part 1, will continue to convert all additional links within the area map to text - retaining its full functionality.

Kill JavaScript Banners: JavaScript banners that use dynamic HTML have a unique "signature" that this rule picks up on. This rule will almost never filter anything that's not an actual ad, and although the banner blaster often works with JavaScript ads anyway, having this rule enabled gives a little extra protection.

Kill Hyper Banner: Stops a particularly annoying Java based animated banner, but is really an example of how to filter out rogue Java applets.  Other applets can be included simply by adding their class name to the list like so...

*code=("|)(hyper|other1|other2|etc).class*

Counter Killer:  Kills many web page counters - counters can slow down the loading of a page if  the browser must wait for the counter to update.

Webpage Background Killer: Removes the main web page background, but leaves other background images (like those inside a table) intact.

Webpage Background Replacer: Changes all web pages to use a background of your own. Change the replacement text to point to any image you like - just use the same method mentioned in the "Banner Replacer" rule above.

Kill All Backgrounds (even tables): Gets rid of any background image it finds, even those in tables.

Sounds to links: Changes any <embed ... > or <bgsound ... > tags to a links.  Stops many background sounds and lets you download them instead.

Sound Silencer: More aggressive, just eliminates most sounds and MIDI files.

Embedded MIDI Silencer: Attempts to make all autoplay and hidden embedded MIDI files both visible and non-autoplay. Allows you to play them only if you want!

Blink Buster (Blink to Bold): Converts <blink>  tags to <B> "bold" ones instead. Saves some eyestrain!

Freeze font's face: Removes the "face" attribute from the font tag: helps keeps pages from using fonts you may not like or have installed.

Onload unloader: Onload is one method used to autorun scripts. This filter will disable it.

OnUnload unloader: Submitted to be by "CyberDude" this is a very useful rule.  OnUnload will run a script whenever you leave a web page! An insidious tag that used for little more than opening pop-up ad windows - it makes an excellent candidate for the chopping block.  In fact,  when this rule is used with the "Kill All pop-up windows" and "Restore pop-up windows after page loads" rules below, almost all "spam" pop-up windows will be killed while still allowing more appropriate pop-up windows to work.

Kill All pop-up windows: Say bye bye to JavaScript pop up windows.  Enabling this rule by itself will completely disable the JavaScript "window.open" command. Even better, when used with the rule below, most useful pop-ups will still work.

Restore pop-up windows after page loads: When used with the previous rule, this filter will re-enable pop-up windows once a page has finished loading.  Useful for getting rid of only those windows that pop-up when you first visit a page, while allowing windows that pop-up when you click a link or press a button to still work.  It can be a good alternative to completely disabling pop-up windows entirely as it allows pages that use them properly to still work.

Link De-Obfuscator:  If you hate pages that "hide" the real URL a link is pointing to by placing some text on the status line instead, this rule will "unhide" those links.

Anti-Auto-Refresher: Stops pages from "Auto Refreshing".  Often used to forward you automatically to a new page, or by pages with frames to load a new ad every so often. This rule also creates a link allowing you to refresh manually if needed.

Wordwrap all form textboxes:  Makes sure all text entry forms have word-wrap enabled. A must for posting to some web message boards.

GeoCities branding killer:  Specialized rule to stop GeoCities web page branding. Also see the "Kill add-on JavaScripts" below which will do this and more.

Kill add-on JavaScripts:  A filter I find very useful - this one gets rid of any JavaScript tacked on to the end of a web page. Usually these scripts are added by free web space providers to pop-open advertising windows or even worse "brand" a web page with their logo.  Makes visiting such pages much more pleasant.

Suppress all JavaScript errors:  Stops all JavaScript error messages.  This is a nice rule to use at all times since so many JavaScripts seem to fail of their own accord.  Also it's added protection in case another rule stops a JavaScript from working properly.  Note: there appears not to be a way to do this on I.E. 3.0 (except upgrading of course) - sorry.

Kill alert/confirm boxes: Stops those JavaScript pop-up message boxes asking you to press OK to continue. Often used for disclaimers of one type or another.

Stop status bar scrollers:  Disables the JavaScript command to send text to the status bar. Eliminates scrollers and other such beasts.

Kill Dynamic HTML JavaScripts:  Often Dynamic HTML is used to do nothing more than push fresh ads and other annoyances your direction, this rule stops it.  Be careful though, some pages may actually use dynamic HTML for something important (foolish of em' I know, but who can explain the mind of a webmaster ;-).

Stop JavaScript Timers:  Stops any timed JavaScript events. This is another way to effectively stop status bar scrollers and periodic ad updating.

Disable JavaScript:  Stops JavaScript - a good trick is to use the URL scope in this filter to only disable JavaScript on selected pages.

Kill Nosey JavaScripts: Kills any JavaScript that asks the wrong questions! Contains a list of "naughty" functions and properties that no JavaScript should use in polite company (including referrer, cookies, history, etc). Use it to stop JavaScripts from revealing personal information about you or your computer.  Of course, you can customize the list according to what you feel is appropriate to reveal.

Disable JavaScript cookies: Prevents JavaScripts from sending or receiving cookie information. Use with the URL match to allow JavaScript cookies at given sites if you wish.

Hide Browser's Referrer from JS: The "referrer" is by far the most revealing data your browser sends out.  By looking at referrer lists webmasters can tell not only the site you visited last, but if you clicked a link from email or a page on your hard drive, possibly more personal information as well! Note this is normally revealed in a HTTP header named "Referer" but JavaScript can be used to grab this information as well.

Hide Browser's Version from JS:  Make JavaScripts think you're using an earlier version of your web browser - can often prevent a JavaScript from attempting more "advanced" ways of annoying you.  Good for stopping the loading of images that change when the mouse is over them.

Hide Browser's Identity from JS:  Change the name reported by your browser to JavaScripts. Confuse the heck out of 'em.

Kill the worst Pop-Up windows: Only stops Pop-up windows within <script ... </script> tags, but leaves "window.open" commands contained within links alone. It's a more aggressive way to limit pop-up windows without disabling them entirely.  Actually this rule is getting a bit obsolete now as the other pop-up rules seem to do a better job.

Kill window.external methods:  These JavaScript commands refer to things outside the web page. They can do many nasty things like change your bookmarks and worse. This filter helps protects you from their tampering.

Stop OnMouseOver events:  Stops things that happen when your mouse moves over a link. saves time, and these things tend to be mostly cosmetic anyway.

Frame Jumper-Outer:  One thing I've always hated is clicking on a web page's link to some other site and having it open up inside the current page's frames. Often known as "Getting Stuck in someone else's frames" it's a reflection of poor design of the original page.  This rule usually takes care of this problem quite effectively.

Kill Style Sheets: For those who aren't dedicated followers of fashion - this will disable style sheets (but not individual style tags).

Kill Layers: Layers - this single most useless idea Netscape ever came up with. Stop anyone silly enough to use them.

iFrame to link: Converts Internet Explorer type "floating" frames to normal links. This allows you access to such frames in other browsers, but is also useful for IE users since many ads come "wrapped" in floating frames. Because it's not supported by all browsers, pages seldom rely on floating frames, making legitimate uses rare.

Frame Exploder: On pages with frames, opens each frame in a new window.  I wouldn't exactly call it useful, but it's interesting.

Allow for frame resizing: A new and rather useful rule, this will make all frames "resizeable" allowing to you finally see half-obscured frames or reclaim the screen space  wasted by advertising frames.

DeFramer: Makes your browser act like it doesn't support frames at all. Will gives you the no-frames version of a page if it exists.

Convert Frames to Links:  Creates a link for each frame window. Use with the above rule to still navigate pages with frames. Could even allow a non-frames browser to use a "frames only" site.

DeTabler: Removes all tables from a web page. Not something you'll want to use all the time since it can drastically alter a page's layout, but it can come in handy on pages where tables make a lengthy list of items take forever to appear. Note: This filter has been combined into one rule from two in the previous release.

Table width unlimiter: Removes any large fixed width limits from a table - useful sometimes when viewing pages at less than their intended screen size.

Skinnier Table Border: Prevents pages from using really fat table borders. Just a cosmetic touch.

Other Filter Sets

There are also a few other filter sets are provided in the Proxomitron distribution. You can select one by choosing "Load config file" from the Proxomitron's main menu.

Proxomitron Defaults: Is another copy of all default settings - keep it as a reference if you change any of the defaults.

Proxomitron Retro: Same as the Default set, but shows an example of using an alternate background texture set.

Proxomitron Black Project: Another texture set example, but this one also has all settings enabled for more "anonymous" net surfing.

Low Bandwidth set: This filter set removes most all images, Java applets, and other bulky items from web pages while attempting to keep the page functional.  Clickable images and image maps are, for example, converted into simple text links.  It's useful for surfing while downloading files or visiting pages that take an eternity to load.

Internet Explorer 3.x set:  This is a set specialized to deal with several JavaScript incompatibilities in Internet Explorer version 3.x. Only use this set if you have this browser. (note: I.E. 4.x and up don't need this set)


Shonen Knife
Shonen Knife!

(Atsuko, Naoko, and Miche)

Who's Shonen Knife you ask? Well, shame on you for not knowing about the most powerful force to hit this planet since the dinos died!

Seriously though, Shonen Knife is a three member female rock group from Osaka Japan. They've been around for quite some time and have a ever-growing and extremely loyal following worldwide. Unlike many female pop singers (Japanese and otherwise) Shonen Knife aren't ones to sing petulant love songs over a bland background of synthetic strings and tinkely bells - neither are they the product of some record company's promotion department. They're a full forced, guitar driven, rock band who aren't afraid on occation to let the feedback fly! They write their own songs, play their own instruments, and have a very strong say in all aspects of their music.

In short they are...

Naoko Yamano - Lead guitarist, singer, songwriter and all around magical force of nature. I think Naoko is the best dreamer to write songs since John Lennon was imagining. Her songs are often wildly energetic, creative - and, ok, a bit silly.  Don't be fooled into thinking silly means unimportant though, in her hands it becomes a way to express deeper feelings and love of life than many more "serious" musicians could ever hope for. It's a powerful gift, and given a chance, she can work wonders before you even realize it.

Atsuko Yamano - Naoko's sister, group drummer, singer, and costume designer! She's not only musical but also responsible for much of the group's style and identity. The creator of many instantly recognizable Knife looks (I love the "space panda" costumes!), she helps define the visual side of the group.

Michie Nakatani - Naoko's college friend,  bass player, singer, song writer, and a major creative force in her own right. If I compare Naoko to Lennon, then Michie is most certainly McCartney. Her songs are often introspective and personal with a characteristic warmth and beauty, but still full of life's love and humor.  She shares Naoko's gift of expressing deep feelings in a song that on the surface may seem only playful.

Musically their sound is extremely diverse, borrowing elements from many different sources.  They are strongly influenced by many 60's bands like The Beatles, The Kinks, Cream, early Pink Floyd, even Captain Beefheart. However,  just when you think you know what to expect, don't be surprised if the next song owes more to the Ramones or Black Sabbath!  This Knife has a real edge that's both sharp and unpredicatble!

Lyrically the songs are beyond any description I can think of - perhaps Frank Zappa meets the PowerPuff Girls.  Mostly lighthearted and full of humor, the songs express a boundless joy, wild imagination, and unexpected insight that's guaranteed to improve you're outlook on life. I often compare them to the Beatles, but this has more to do with the spirit of their music than simply the sound. The Beatles were the first British group to take American Rock and Roll and add elements of their Liverpool experience (even the accents) - most of their contemporaries were simply content to create a carbon copy.  Similarly Shonen Knife adds much that is personal and uniquely Japanese to their music (yes, even the accents ;-), but make it accessible to everyone.  They have the uncommon ability to take a style of music we think we know well and turn it on it's head.

This can be a little disorienting at first: who for example would expect a heavy metal tune about a pet carp, or heartfelt ballad about a longing for strawberry cream puffs!  Spaceships, bison, jelly beans, barbie dolls, public baths, mythological creatures, choco-bars, neon zebras, robots, pot scrubbers, and most of all food, all mix freely and unexpectedly in their lyrics.  Some may dismiss them as too silly or trivial, but not those who take the time to really listen.  Indeed, what Shonen Knife do avoid are most of the tired, trite, and cliche ridden subjects of popular music.  I can't recall, for example, them ever writing a regular old love song.

On a personal level, the members of Shonen Knife are some of the kindest and most genuine people you're ever likely to meet.  Something you may very well do if you go to one of their amazing concerts.  Often they'll be around before and after the show - they love music and really care about their fans (after all, they themselves are music fans too).

What it all comes down to is a group that truly loves to create music that brings happiness into other people's lives - this is their ultimate goal. Sounds simple doesn't it?  It's not, happiness and joy are the hardest of all emotions to convey.  It's much easier to tap into dark emotions like alienation, or depression. Many group have taken this route, and there's nothing wrong with that - it can have a cathartic effect. However, to capture happiness in all of its depth is another matter entirely - few groups who attempt it ever succeed.

Shonen Knife do succeed by reminding us of all the simple wonders in life that too often get overlooked.  Their music frees that magic locked in the dreams of childhood - all too often forgotten in adult life.  It's a powerful magic indeed, and perhaps the only magic that's real.

Here's some Shonen Knife sources on the net.

Shonen Knife Nexus:   http://home.earthlink.net/~gwiz/ShonenLA.html

All things Knife can be found here. Perhaps the most comple source of Shonen Knife information on the net.

Heartfriends of Shonen Knife: http://www.geocities.co.jp/Broadway/3561/

Shonen Knife support from Japan - be sure to give my regards to Shonen Knife missionary Kappa-Chan Mamiko!

Shonen Knife Home Page: http://www.mmjp.or.jp/knife/

Shonen Knife's very own home page - it's in Japanese however!


Limitations
Proxomitron's filtering limitations

The Proxomitron can filter most web pages. However, there are a few type of pages and data it won't filter. These include...

Pages that uses your browser's security layer - These pages are encrypted and use an entirely different protocol from normal web pages. Although it might be possible to filter them, since they are most often only used for secure on-line transactions,  it would probably be unwise! Currently, the Proxomitron will not affect these pages in any way.

Protocols other than HTTP:  The Proxomitron does not filter FTP, gopher, or any other Internet protocol besides HTTP.  These protocols are rarely used to display web pages. Don't set your browser's proxy options for other protocols to use the Proxomitron - they won't work (normally ;-).

An important exception:  As it turns out, much to my own surprise - if you're using an external proxy server you can, in fact, set at least the FTP and Gopher options in your browser to pass through the Proxomitron.  This is because the remote proxy server handles all the ugly details involved with each particular protocol - useful for those who make use of the proxy switching feature.

Content types other than html, javascript, and gif images  - The proxomitron will send any other type of data unchanged. This insures zip files and other binary data are never corrupted. Note that the HTTP headers for other data types can be affected - so be careful here.

"Chunked" encoded and other types of content encoding - The Proxomitron only filters un-encoded web pages.  Pages with any type of content encoding are simply send as-is. Content encoding is currently not widely used (if it's even really used at all ;-), but don't worry - if it ever becomes common,  newer versions of the Proxomitron could very well support it (so any sneaky web-masters out there - don't think it's a way around the filters ;-).


Filter Merge
Merging Config File Filters

A feature new to Naoko-3 is the filter merge option. Although it might seem simple, it really can be useful.  With it, you can insert filters into the currently config file from any other config file you choose.  To make updating configs with newer versions easier, exact duplicates are weeded out of the merge. Only new or altered filters are included.

When you select the "Merge config filters" from the menu on Proxomitron's main screen you'll get a windows file requester with a few additional options at the bottom...

Here you can limit the merge to certain filter types. Simply check only the sections you wish to include.

Global 	- Will merge global settings set under the "Config" dialog.

Web Filters 	- Will merge Web Page filters.

Header Filters 	- Will merge HTTP Header filters

External Proxy List	- Will merge lists of proxy servers

Seeing Red?

Newly merged web page and HTTP header filters will be shown in red - this makes it easy to tell new filters apart from older versions with the same name.  By picking and choosing which filters to keep and which to delete you can selectively update only those filters you choose. To "Get the red out" simply save and reload the new config file.

Sugar Frosted "Mini-Configs"

Filter merging also lets you create "Mini-Config" files - containing only a few related filters.  For example, you could create a config file containing only JavaScript filters, and then use the merge to easily add this functionality into another config file.  This also makes it easier to share your filters with others. Just create a config file containing only the filters you wish to share.

Location!, Location!, Location!

Because order is important, when merged web page filters are either inserted at the top of the list or next to any existing filter with the same name.  This way, updated filters should keep their correct position in the filter list.  Meanwhile, HTTP header filters and proxy servers are simply sorted into the current list alphabetically (since order doesn't affect their function).