I needed a simple HTTP proxy server that i could point my browser to
and it would always forward my requests to a single host:port. I
don't want a general proxy solution (no browser configuration) and I
couldn't quickly find one online. That's when I decided to give
Python and
Twisted a try.
Here's how it turned out. It seems
to work great but as I'm a Twisted newbie and it only took me an
hour or so to implement I'm guessing there's a more elegant way of
doing this. For example the parameter passing (host, port, data)
from host objects to protocol instances accounts for lot of the
lines in the implementation. Any comments are more than welcome
(email to webmaster).