mirror of
https://github.com/onionshare/onionshare.git
synced 2025-01-01 02:36:14 -05:00
Only allow starting v3 onion services if the tor that we're connected to supports it
This commit is contained in:
parent
1d1efb7e54
commit
657806a003
@ -406,7 +406,7 @@ class Onion(object):
|
|||||||
# Does this version of Tor support next-gen ('v3') onions?
|
# Does this version of Tor support next-gen ('v3') onions?
|
||||||
# Note, this is the version of Tor where this bug was fixed:
|
# Note, this is the version of Tor where this bug was fixed:
|
||||||
# https://trac.torproject.org/projects/tor/ticket/28619
|
# https://trac.torproject.org/projects/tor/ticket/28619
|
||||||
self.supports_v3_onions = self.tor_version > Version('0.4.0.0')
|
self.supports_v3_onions = self.tor_version >= Version('0.4.0.0')
|
||||||
|
|
||||||
def is_authenticated(self):
|
def is_authenticated(self):
|
||||||
"""
|
"""
|
||||||
@ -464,7 +464,7 @@ class Onion(object):
|
|||||||
else:
|
else:
|
||||||
key_type = "NEW"
|
key_type = "NEW"
|
||||||
# Work out if we can support v3 onion services, which are preferred
|
# Work out if we can support v3 onion services, which are preferred
|
||||||
if Version(self.tor_version) >= Version('0.3.3.1') and not self.settings.get('use_legacy_v2_onions'):
|
if self.supports_v3_onions and not self.settings.get('use_legacy_v2_onions'):
|
||||||
key_content = "ED25519-V3"
|
key_content = "ED25519-V3"
|
||||||
else:
|
else:
|
||||||
# fall back to v2 onion services
|
# fall back to v2 onion services
|
||||||
|
Loading…
Reference in New Issue
Block a user