setproxy(proxytype, addr[, port[, rdns[, username[, password]]]]) Sets the proxy to be used. proxytype - The type of the proxy to be used. Three types are supported: PROXY_TYPE_SOCKS4 (including socks4a), PROXY_TYPE_SOCKS5 and PROXY_TYPE_HTTP
(self, proxytype=None, addr=None, port=None, rdns=True, username=None, password=None)
| 144 | return data |
| 145 | |
| 146 | def setproxy(self, proxytype=None, addr=None, port=None, rdns=True, username=None, password=None): |
| 147 | """setproxy(proxytype, addr[, port[, rdns[, username[, password]]]]) |
| 148 | Sets the proxy to be used. |
| 149 | proxytype - The type of the proxy to be used. Three types |
| 150 | are supported: PROXY_TYPE_SOCKS4 (including socks4a), |
| 151 | PROXY_TYPE_SOCKS5 and PROXY_TYPE_HTTP |
| 152 | addr - The address of the server (IP or DNS). |
| 153 | port - The port of the server. Defaults to 1080 for SOCKS |
| 154 | servers and 8080 for HTTP proxy servers. |
| 155 | rdns - Should DNS queries be preformed on the remote side |
| 156 | (rather than the local side). The default is True. |
| 157 | Note: This has no effect with SOCKS4 servers. |
| 158 | username - Username to authenticate with to the server. |
| 159 | The default is no authentication. |
| 160 | password - Password to authenticate with to the server. |
| 161 | Only relevant when username is also provided. |
| 162 | """ |
| 163 | self.__proxy = (proxytype, addr, port, rdns, username, password) |
| 164 | |
| 165 | def __negotiatesocks5(self): |
| 166 | """__negotiatesocks5(self,destaddr,destport) |