What a coincidence! This week I've been working on the HTTP mangling too! I've come up with the following Perl script which acts as an HTTP proxy - should work in any browser on any OS. You'll need Perl installed, as well as the LWP::UserAgent module:
http://search.cpan.org/~gaas/libwww-...P/UserAgent.pm
(was already installed on my Ubuntu machine) and the HTTP::Proxy module:
http://search.cpan.org/~book/HTTP-Pr.../HTTP/Proxy.pm
Here's the script, which is very simple. It only works for HTTP, so don't try using it for HTTPS, FTP or other protocols - set your browser to go to WIND's proxy direct. I haven't done it, but it might be feasible to do a two-pass process to avoid the 1MB restriction by trying the WIND proxy, and if that fails redirect to another proxy (eg one using an SSH tunnel as I detailed above).
Code:
#!/usr/bin/perl
use HTTP::Proxy;
use LWP::UserAgent;
# create a filter to change the Content-Type header
{
package FilterPerl;
use base qw( HTTP::Proxy::HeaderFilter );
sub filter {
my ( $self, $headers, $message) = @_;
# grab the header, modify it, then write it back into the headers
$ct=$headers->header('Content-Type');
$ct =~ s!application/xhtml\+xml!text/html!g;
$headers->header('Content-Type' => $ct);
}
}
# create a new object to represent our onward connection - ie through
# WIND's proxy
my $fetcher = LWP::UserAgent->new();
$fetcher->proxy(['http','https','ftp','gopher'], 'http://192.168.200.10:9401/');
$fetcher->no_proxy('localhost');
# create our own proxy on localhost port 3128
my $proxy = HTTP::Proxy->new( port => 3128, agent => $fetcher );
# attach a filter to alter the responses returned by WIND's proxy
$proxy->push_filter( mime => undef, response => FilterPerl->new() );
# start the proxy running
$proxy->start;
Paste it into a file called something.pl and run it. The proxy will then run on localhost port 3128 for as long as the perl script is running.