In perusing Debian's Package List, I came across a number of Perl based Proxy tools.
The first one, an item that sounds interesting, but havn't thought of a way to put it into
action yet, is an HTTP Recorder. HTTP::Recorder
is a browser-independent recorder that
records interactions with web sites and produces scripts for
automated playback. Recorder produces WWW::Mechanize
scripts by default (see WWW::Mechanize
by Andy Lester),
The next item is an HTTP Tunnel. httptunnel creates a bidirectional virtual data connection tunnelled in HTTP requests. The HTTP requests can be sent via an HTTP proxy if so desired. This can be useful for users behind restrictive firewalls. If WWW access is allowed through a HTTP proxy, it's possible to use httptunnel and, say, telnet or PPP to connect to a computer outside the firewall.
The third item is HTTP::Proxy. It is a Perl based HTTP Proxy. It sounds like it can do some SSL type interception as well. It has an ability for add-on modules allowing various parts of a page to be re-processed prior to delivery back to a user.