From 8cc651a370f4925bf94001e89028968d7c8c790a Mon Sep 17 00:00:00 2001 From: Miguel Jacq Date: Wed, 24 Jan 2018 11:37:48 +1100 Subject: [PATCH] #523 prioritise connecting to the v3 onionshare site when checking for updates, if Tor version is >= 0.3.2.9 --- onionshare_gui/update_checker.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/onionshare_gui/update_checker.py b/onionshare_gui/update_checker.py index ca2eb48a..b9d9d515 100644 --- a/onionshare_gui/update_checker.py +++ b/onionshare_gui/update_checker.py @@ -19,6 +19,7 @@ along with this program. If not, see . """ from PyQt5 import QtCore import datetime, time, socket, re, platform +from distutils.version import LooseVersion as Version from onionshare import socks from onionshare.settings import Settings @@ -96,7 +97,10 @@ class UpdateChecker(QtCore.QObject): if force: path += '?force=1' - onion_domain = 'elx57ue5uyfplgva.onion' + if Version(self.onion.tor_version) >= Version('0.3.2.9'): + onion_domain = 'lldan5gahapx5k7iafb3s4ikijc4ni7gx5iywdflkba5y2ezyg6sjgyd.onion' + else: + onion_domain = 'elx57ue5uyfplgva.onion' common.log('UpdateChecker', 'check', 'loading http://{}{}'.format(onion_domain, path))