Fix setting socksproxytype and return in proxyconfig_stem:

socksproxytype is set to SOCKS5 temporary if proxyconfig succeeds.
v0.6
Dmitri Bogomolov 4 years ago
parent 168c4a5696
commit c35f48bd0b
Signed by untrusted user: g1itch
GPG Key ID: 720A756F18DEED13

@ -43,6 +43,7 @@ def connect_plugin(config): # pylint: disable=too-many-branches
):
# remote proxy is choosen for outbound connections,
# nothing to do here, but need to set socksproxytype to SOCKS5!
config.set('bitmessagesettings', 'socksproxytype', 'SOCKS5')
logwrite(
'sockshostname is set to remote address,'
' aborting stem proxy configuration')
@ -77,6 +78,8 @@ def connect_plugin(config): # pylint: disable=too-many-branches
logwrite('Started tor on port %s' % port)
break
config.setTemp('bitmessagesettings', 'socksproxytype', 'SOCKS5')
if config.safeGetBoolean('bitmessagesettings', 'sockslisten'):
# need a hidden service for inbound connections
try:
@ -117,6 +120,5 @@ def connect_plugin(config): # pylint: disable=too-many-branches
config.set(
onionhostname, 'keytype', response.private_key_type)
config.save()
config.set('bitmessagesettings', 'socksproxytype', 'SOCKS5')
return True
return True

Loading…
Cancel
Save