Python 3.4 中带代理的套接字
Socket with Proxy in Python 3.4
我有一个代码,我想通过代理传递所有包,我该如何使用:
import socket
import #Here your socket library
# The rest of the code here
您推荐我将哪个库与 Socket 一起使用?我说的真的有可能吗?
在 Python 3.4 中使用 Socksipy 我可以让代码多 3 行,它们是:
import socksipy
s=socket.socket( )
s = socks.socksocket()
s.setproxy(socks.PROXY_TYPE_SOCKS5, 'localhost', 9050)
s.connect((HOST, PORT))
Socksipy 位于:http://socksipy.sourceforge.net/ and its very simple to use, you just need to read their wiki so than you can work with. The URL for the wiki is: https://code.google.com/p/socksipy-branch/
我有一个代码,我想通过代理传递所有包,我该如何使用:
import socket
import #Here your socket library
# The rest of the code here
您推荐我将哪个库与 Socket 一起使用?我说的真的有可能吗?
在 Python 3.4 中使用 Socksipy 我可以让代码多 3 行,它们是:
import socksipy
s=socket.socket( )
s = socks.socksocket()
s.setproxy(socks.PROXY_TYPE_SOCKS5, 'localhost', 9050)
s.connect((HOST, PORT))
Socksipy 位于:http://socksipy.sourceforge.net/ and its very simple to use, you just need to read their wiki so than you can work with. The URL for the wiki is: https://code.google.com/p/socksipy-branch/