Fix setting socksproxytype and return in proxyconfig_stem:
socksproxytype is set to SOCKS5 temporary if proxyconfig succeeds.
This commit is contained in:
parent
168c4a5696
commit
c35f48bd0b
|
@ -43,6 +43,7 @@ def connect_plugin(config): # pylint: disable=too-many-branches
|
||||||
):
|
):
|
||||||
# remote proxy is choosen for outbound connections,
|
# remote proxy is choosen for outbound connections,
|
||||||
# nothing to do here, but need to set socksproxytype to SOCKS5!
|
# nothing to do here, but need to set socksproxytype to SOCKS5!
|
||||||
|
config.set('bitmessagesettings', 'socksproxytype', 'SOCKS5')
|
||||||
logwrite(
|
logwrite(
|
||||||
'sockshostname is set to remote address,'
|
'sockshostname is set to remote address,'
|
||||||
' aborting stem proxy configuration')
|
' aborting stem proxy configuration')
|
||||||
|
@ -77,6 +78,8 @@ def connect_plugin(config): # pylint: disable=too-many-branches
|
||||||
logwrite('Started tor on port %s' % port)
|
logwrite('Started tor on port %s' % port)
|
||||||
break
|
break
|
||||||
|
|
||||||
|
config.setTemp('bitmessagesettings', 'socksproxytype', 'SOCKS5')
|
||||||
|
|
||||||
if config.safeGetBoolean('bitmessagesettings', 'sockslisten'):
|
if config.safeGetBoolean('bitmessagesettings', 'sockslisten'):
|
||||||
# need a hidden service for inbound connections
|
# need a hidden service for inbound connections
|
||||||
try:
|
try:
|
||||||
|
@ -117,6 +120,5 @@ def connect_plugin(config): # pylint: disable=too-many-branches
|
||||||
config.set(
|
config.set(
|
||||||
onionhostname, 'keytype', response.private_key_type)
|
onionhostname, 'keytype', response.private_key_type)
|
||||||
config.save()
|
config.save()
|
||||||
config.set('bitmessagesettings', 'socksproxytype', 'SOCKS5')
|
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
Loading…
Reference in New Issue
Block a user