10
votes

I have been surfing around on google, googling away in order to find the source of a Python HTTP proxy server, because i wish to write my own. Good news is: I found lots! Bad news is: I think they are too complicated. At least for me to properly grasp. I have seen python do stuff like this before in very simple and compact manners. But i am unable to find one that is simple enough.

Can any of you help?

I would really appreciate any feedback.

Jake

2
What kind of proxy - HTTP? SOCKS? And what's the use case? - AndiDog
Sorry for not being more precise. I would like it to be an HTTP proxy server. The use case is just to use as one would a normal proxy server. As simple as possible. - Jake
Well in this case you might rather want to use a normal proxy server (Squid, Privoxy, Polipo). If you want a custom proxy, use Apache/mod_proxy ;) - AndiDog
Thing is.. I want to write my own. Hmm and to me, even the simple ones like the one Brian linked looks a bit difficult to me. - Jake
@Jake: It's not clear to me how you could expect anything much simpler than the one I linked. It barely does anything. - Brian

2 Answers

7
votes

One incredibly simple one is python-proxy. I found it on the list of python proxies at xhaus, which was the top result when I googled "python proxy server" (sans quotes).

4
votes

Twisted lets you build simple ones, if you don't mind the complexity that is twisted.