goofyproxy acts as an HTTP proxy that filters received data
through an external process.
To use it, run it and go in network preferences of your browser to configure
localhost:PORT as proxy for HTTP connections.
- Get the Qt Library version 4.5.0 or higher
- Run: qmake && make
goofyproxy PORT CONTENTTYPEPREFIX COMMAND [COMMANDARGS]
Open an HTTP proxy on port PORT.
Each response with a Content-Type
that starts with CONTENTTYPEPREFIX
gets
its payload sent through COMMAND
's stdin. Stdout is sent back to the client.
goofyproxy 8080 text/html sed '{s/<p\([> ]\)/<h1\1/; s/<\/p>/<\/h1>/}'
would change every occurence of <p></p>
for <h1></h1>
in HTML resources.
goofyproxy 8080 image/ convert - -colorspace Gray -sketch 0x20+120 -
goofyproxy 8080 image/ convert - -paint 3 -
goofyproxy 8080 text/html perl -nle ' $_=~ s/(?!<.*?)([^\w])cat(?![^<>]*?>)/\1Batman/ig; print $_'
Linux, Mac OS X
A serious issue is often seen on Windows machines, at least on mine, where the client connection would be closed automatically when putting the software under medium load.
HTTPS is not supported and pages using SPDY might cause problems.