From 757740369b1cb9540ef87eaff298d74a3242d03d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20=C5=A0urda?= Date: Sun, 18 Feb 2018 20:53:16 +0100 Subject: [PATCH] Add proxy authentication - proxy module was missing initialisation of authentication --- src/network/proxy.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/network/proxy.py b/src/network/proxy.py index 43298f63..1d7ca357 100644 --- a/src/network/proxy.py +++ b/src/network/proxy.py @@ -3,6 +3,7 @@ import time from advanceddispatcher import AdvancedDispatcher import asyncore_pollchoose as asyncore +from bmconfigparser import BMConfigParser from debug import logger import network.connectionpool import state @@ -87,6 +88,11 @@ class Proxy(AdvancedDispatcher): self.isOutbound = True self.fullyEstablished = False self.create_socket(socket.AF_INET, socket.SOCK_STREAM) + if BMConfigParser().safeGetBoolean("bitmessagesettings", "socksauthentication"): + self.auth = (BMConfigParser().safeGet("bitmessagesettings", "socksusername"), + BMConfigParser().safeGet("bitmessagesettings", "sockspassword")) + else: + self.auth = None if address.host.endswith(".onion") and self.onion_proxy is not None: self.connect(self.onion_proxy) else: