From: tobtoht Date: Wed, 22 Jun 2022 22:16:02 +0000 (+0200) Subject: Nodes: connect to clearnet nodes during initial sync on Tais/Whonix X-Git-Url: https://git.nutra.tk/v1?a=commitdiff_plain;h=32f66f662262c94c46a51b909fd7cab9cc076151;p=gamesguru%2Ffeather.git Nodes: connect to clearnet nodes during initial sync on Tais/Whonix --- diff --git a/src/utils/WebsocketNotifier.cpp b/src/utils/WebsocketNotifier.cpp index 6ffca2d5..5ba833ed 100644 --- a/src/utils/WebsocketNotifier.cpp +++ b/src/utils/WebsocketNotifier.cpp @@ -121,9 +121,6 @@ void WebsocketNotifier::onWSNodes(const QJsonArray &nodes) { if(nettype == "testnet" && networkType != NetworkType::TESTNET) continue; - if(type == "clearnet" && (TailsOS::detect() || WhonixOS::detect() || Utils::isTorsocks())) - continue; - FeatherNode node{obj.value("address").toString(), obj.value("height").toInt(), obj.value("target_height").toInt(), diff --git a/src/utils/nodes.cpp b/src/utils/nodes.cpp index 86fc2395..c1bfea04 100644 --- a/src/utils/nodes.cpp +++ b/src/utils/nodes.cpp @@ -383,18 +383,11 @@ void Nodes::onWalletRefreshed() { if (m_connection.isOnion()) return; - // Don't reconnect on Tails or Whonix (all traffic is already routed through Tor) - if (TailsOS::detect() || WhonixOS::detect()) - return; - this->autoConnect(true); } } bool Nodes::useOnionNodes() { - if (TailsOS::detect() || WhonixOS::detect()) { - return true; - } auto privacyLevel = config()->get(Config::torPrivacyLevel).toInt(); if (privacyLevel == Config::allTor) { return true; @@ -426,6 +419,10 @@ bool Nodes::useTorProxy(const FeatherNode &node) { return false; } + if (TailsOS::detect() || WhonixOS::detect()) { + return true; + } + return this->useOnionNodes(); }