From b08291a8981be4eb57fc628e1d205a0ce253a9b8 Mon Sep 17 00:00:00 2001 From: mkaay Date: Mon, 10 May 2010 15:43:10 +0200 Subject: new config option (outgoing intreface) --- module/network/Request.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'module/network') diff --git a/module/network/Request.py b/module/network/Request.py index 733ab5851..1fb76d7e0 100755 --- a/module/network/Request.py +++ b/module/network/Request.py @@ -32,7 +32,7 @@ class AbortDownload(Exception): pass class Request: - def __init__(self): + def __init__(self, interface=None): self.dl_time = 0 self.dl_finished = 0 @@ -64,6 +64,7 @@ class Request: self.maxSpeed = 0 self.isSlow = False self.cookieJar = None + self.interface = interface # change this for connection information self.debug = False @@ -91,6 +92,8 @@ class Request: self.pycurl.setopt(pycurl.SSL_VERIFYPEER, 0) if self.debug: self.pycurl.setopt(pycurl.VERBOSE, 1) + if self.interface: + self.pycurl.setopt(pycurl.INTERFACE, self.interface) self.pycurl.setopt(pycurl.USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en; rv:1.9.0.8) Gecko/2009032609 Firefox/3.0.10") -- cgit v1.2.3