Simple localhost/proxy Server

Fuzzyman michael at foord.net
Fri Jul 23 10:27:19 EDT 2004


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 0.0.0.0 port 8000 ...

But can I get it to respond... can I jigger..........
I put 0.0.0.0 port 8000 as my proxy settings in IE, I
http://0.0.0.0:8000 or just plain 0.0.0.0  in the address bar...
nothing seems to make it respond...

Hmmm... out of my depth I'm afraid.


Regards,


Fuzzy

http://www.vooidspace.org.uk/atlantibots/pythonutils.html



More information about the Python-list mailing list