summaryrefslogtreecommitdiff
path: root/src/connection.py
diff options
context:
space:
mode:
authorlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-02-16 13:37:08 +0000
committerlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-02-16 13:37:08 +0000
commitda5a8aa8d392da4ca2c94e13508ad577fdeed5d7 (patch)
treee11fc7ee2dc4f44b8d630b01bb032911a8edc800 /src/connection.py
parent410c68c50d429e12fe3ade4100bfdb71d333ab9e (diff)
downloadpoezio-da5a8aa8d392da4ca2c94e13508ad577fdeed5d7.tar.gz
poezio-da5a8aa8d392da4ca2c94e13508ad577fdeed5d7.tar.bz2
poezio-da5a8aa8d392da4ca2c94e13508ad577fdeed5d7.tar.xz
poezio-da5a8aa8d392da4ca2c94e13508ad577fdeed5d7.zip
fixed #1151
Diffstat (limited to 'src/connection.py')
-rw-r--r--src/connection.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/connection.py b/src/connection.py
index 0e26f008..1876cdb6 100644
--- a/src/connection.py
+++ b/src/connection.py
@@ -60,7 +60,15 @@ class Connection(threading.Thread):
def connect_to_server(self, server, port):
# TODO proxy stuff
- return self.client.connect((server, port))
+ if config.get('use_proxy','false') == 'true':
+ return self.client.connect((server, port),
+ {'host': config.get("proxy_server", ""),
+ 'port': config.get("proxy_port", 1080),
+ 'user': config.get("proxy_user", ""),
+ 'password': config.get("proxy_password", "")
+ })
+ else:
+ return self.client.connect((server, port))
def authenticate(self, anon=True):
if anon: