mirror of
https://github.com/feather-wallet/feather.git
synced 2025-03-12 09:37:47 +00:00
Nodes: connect to clearnet nodes during initial sync on Tais/Whonix
This commit is contained in:
parent
a55dbfdaf1
commit
32f66f6622
2 changed files with 4 additions and 10 deletions
|
@ -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(),
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue