diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-07-01 22:51:30 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-07-01 22:51:30 +0200 |
commit | 0a305f78abacdd38f5b9b9af4aa3c4c982da6895 (patch) | |
tree | 80a69601ca89ff25959d9236f3dee77467c6a495 | |
parent | sphinx documentation (diff) | |
download | pyload-0a305f78abacdd38f5b9b9af4aa3c4c982da6895.tar.xz |
closed #338
-rw-r--r-- | module/config/default.conf | 2 | ||||
-rw-r--r-- | module/network/HTTPRequest.py | 4 | ||||
-rw-r--r-- | module/network/RequestFactory.py | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/module/config/default.conf b/module/config/default.conf index 192ad907a..78097e8f1 100644 --- a/module/config/default.conf +++ b/module/config/default.conf @@ -33,7 +33,6 @@ download - "Download": int max_downloads : "Max Parallel Downloads" = 3
int max_speed : "Max Download Speed in kb/s" = -1
bool limit_speed : "Limit Download Speed" = False
- bool proxy : "Use Proxy" = False
str interface : "Download interface to bind (ip or Name)" = None
bool ipv6 : "Allow IPv6" = False
permission - "Permissions":
@@ -59,3 +58,4 @@ proxy - "Proxy": http;socks4;socks5 type : "Protocol" = http
str username : "Username" = None
password password : "Password" = None
+ bool proxy : "Use Proxy" = False
diff --git a/module/network/HTTPRequest.py b/module/network/HTTPRequest.py index 7904070e8..6707cc70e 100644 --- a/module/network/HTTPRequest.py +++ b/module/network/HTTPRequest.py @@ -97,11 +97,11 @@ class HTTPRequest(): else: self.c.setopt(pycurl.PROXYTYPE, pycurl.PROXYTYPE_HTTP) - self.c.setopt(pycurl.PROXY, str(proxy["address"])) #unicode issues... + self.c.setopt(pycurl.PROXY, str(proxy["address"])) self.c.setopt(pycurl.PROXYPORT, proxy["port"]) if proxy["username"]: - self.c.setopt(pycurl.PROXYUSERPWD, "%s:%s" % (proxy["username"], proxy["password"])) + self.c.setopt(pycurl.PROXYUSERPWD, str("%s:%s" % (proxy["username"], proxy["password"]))) if ipv6: self.c.setopt(pycurl.IPRESOLVE, pycurl.IPRESOLVE_WHATEVER) diff --git a/module/network/RequestFactory.py b/module/network/RequestFactory.py index 6bb7ced62..1a38ace43 100644 --- a/module/network/RequestFactory.py +++ b/module/network/RequestFactory.py @@ -78,7 +78,7 @@ class RequestFactory(): def getProxies(self): """ returns a proxy list for the request classes """ - if not self.core.config["download"]["proxy"]: + if not self.core.config["proxy"]["proxy"]: return {} else: type = "http" |