![]() t_default_proxy(socks.SOCKS5, "localhost") To monkeypatch the entire standard library with a single default proxy: import urllib2 # Can be treated identical to a regular socket object S.set_proxy(socks.SOCKS4, "localhost", 4444) S.set_proxy(socks.SOCKS5, "localhost") # SOCKS4 and SOCKS5 use port 1080 by default S = socks.socksocket() # Same API as socket.socket in the standard lib If you wish to use HTTP (not SOCKS) proxies, it is recommended that you rely on your HTTP client's native proxy support ( proxies dict for requests, or urllib2.ProxyHandler for urllib2) instead. ![]() Certain HTTP proxies may not work with this library. Warning: PySocks/SocksiPy only supports HTTP proxies that use CONNECT tunneling. These will install both the socks and sockshandler modules.Īlternatively, include just socks.py in your project. pip install / setup.py install will automatically install the sockshandler module. ![]() HTTP proxy client included but not supported or recommended (you should use urllib2's or requests' own HTTP proxy interface).UDP mostly supported (issues may occur in some edge cases). ![]() SOCKS proxy client for Python 2.7 and 3.4+.Seamlessly configure SOCKS proxies for any socket object by calling socket_t_proxy(). It is a modern fork of SocksiPy with bug fixes and extra features.Īcts as a drop-in replacement to the socket module. PySocks lets you send traffic through SOCKS and HTTP proxy servers. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |