2013-04-16, 14:11
Provides a socket-like interface that supports connections to any TCP service through the use of a SOCKS4, SOCKS5 or HTTP proxy. An easy way to do use proxies.
The source for the module is here: http://code.google.com/p/script-module-socksipy
The source for the code on which the module is based is here, along with examples of use: http://code.google.com/p/socksipy-branch
Note that my module is just a plain script module with the script from socksipy-branch dropped in without modification.
Usage
Taken from code where self.type, self.server, etc., have been initialised withg appropriate values, the following code makes all subsequent urllib2 requests go through the specified proxy:
Available from the offical XBMC repository: script.module.socksipy
The source for the module is here: http://code.google.com/p/script-module-socksipy
The source for the code on which the module is based is here, along with examples of use: http://code.google.com/p/socksipy-branch
Note that my module is just a plain script module with the script from socksipy-branch dropped in without modification.
Usage
Taken from code where self.type, self.server, etc., have been initialised withg appropriate values, the following code makes all subsequent urllib2 requests go through the specified proxy:
Code:
socks.setdefaultproxy(self.type, self.server, self.port, self.dns, self.user, self.password)
socks.wrapmodule(urllib2)
Available from the offical XBMC repository: script.module.socksipy