Require tor 0.4.0.0 for v3 onion services (will change in the future). And update settings dialog so if the connected version of tor doesn't support v3 onions, then always show legacy options. If it does support v3 onions, allow 'Use legacy addresses'

This commit is contained in:
Micah Lee 2018-12-05 20:33:45 -08:00
parent 00cbc2ff4b
commit 16f6742a71
2 changed files with 25 additions and 11 deletions

View file

@ -387,6 +387,7 @@ class Onion(object):
# Get the tor version
self.tor_version = self.c.get_version().version_str
self.common.log('Onion', 'connect', 'Connected to tor {}'.format(self.tor_version))
# Do the versions of stem and tor that I'm using support ephemeral onion services?
list_ephemeral_hidden_services = getattr(self.c, "list_ephemeral_hidden_services", None)
@ -403,7 +404,9 @@ class Onion(object):
self.supports_stealth = False
# Does this version of Tor support next-gen ('v3') onions?
self.supports_next_gen_onions = self.tor_version > Version('0.3.3.1')
# Note, this is the version of Tor where this bug was fixed:
# https://trac.torproject.org/projects/tor/ticket/28619
self.supports_v3_onions = self.tor_version > Version('0.4.0.0')
def is_authenticated(self):
"""