Simple localhost/proxy Server

Nick Smallbone nick at
Fri Jul 23 16:57:45 CEST 2004

"Fuzzyman" <michael at> wrote in message
news:8089854e.0407230627.525eba34 at
> I am trying to write a small server program that will work on a
> *client* machine as a localhost server. It should then act as a proxy
> server but modify URLs fetched through it - so that the fetches go via
> an external CGI proxy.... Understand all that ? :-)
> (I have a working CGI proxy that will remotely fetch web pages that I
> can't access. The CGI proxy knows which page to fetch through the
> PATH_INFO environment variable. What I'd like to do is write a little
> server program that will sit on the client machine and modify URL
> requests so that they go *via* the CGI proxy..).
> So I have a few examples of proxy server programs - like tcpwatch and
> the Tiny HTTP Debugging proxy - but I'm afraid my knowledge of http is
> so little that I'm struggling to feel my way through. (Although I've
> written a few CGIs..).
> Can anyone point me in the right direction ?
> A localhost server that I can get a response from with my browser -
> and can see the requests coming in python - would be cool.
> I run 'Tiny HTTP Proxy' by SUZUKI Hisao and it prints :
> Any clients will be served...
> Serving HTTP on port 8000 ...
> But can I get it to respond... can I jigger..........
> I put port 8000 as my proxy settings in IE, I
> or just plain  in the address bar...
> nothing seems to make it respond...
> Hmmm... out of my depth I'm afraid.

You won't get much luck trying to send packets to Perhaps if you
try port 8000 as your proxy.

More information about the Python-list mailing list