Python, implementing proxy support for a socket based application (not urllib2)

Posted by Terry Felkrow on Stack Overflow See other posts from Stack Overflow or by Terry Felkrow
Published on 2010-04-15T16:07:22Z Indexed on 2010/04/23 22:43 UTC
Read the original article Hit count: 240

Filed under:
|
|
|
|

Hey guys,

I am little stumped: I have a simple messenger client program (pure python, sockets), and I wanted to add proxy support (http/s, socks), however I am a little confused on how to go about it. I am assuming that the connection on the socket level will be done to the proxy server, at which point the headers should contain a CONNECT + destination IP (of the chat server) and authentication, (if proxy requires so), however the rest is a little beyond me. How is the subsequent connection handled, specifically the reading/writing, etc...

Are there any guides on proxy support implementation for socket based (tcp) programming in Python?

Thank you

© Stack Overflow or respective owner

Related posts about python

Related posts about tcp