阅读背景:

Python,为基于套接字的应用程序实现代理支持(不是urllib2)

来源:互联网 

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...I am little stumped: I have a simple messenger




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: