Add proxy authentication
- proxy module was missing initialisation of authentication
This commit is contained in:
parent
ff9634141e
commit
757740369b
|
@ -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:
|
||||
|
|
Reference in New Issue
Block a user