mirror of
https://github.com/feather-wallet/feather.git
synced 2024-12-22 19:49:28 +00:00
nodes: clarify useSocks5Proxy
This commit is contained in:
parent
fe91c5ea4f
commit
31183f7a31
1 changed files with 13 additions and 3 deletions
|
@ -449,26 +449,36 @@ bool Nodes::useI2PNodes() {
|
|||
|
||||
bool Nodes::useSocks5Proxy(const FeatherNode &node) {
|
||||
if (node.isLocal()) {
|
||||
// When Feather is connected to a local node, ignore proxy settings.
|
||||
return false;
|
||||
}
|
||||
|
||||
if (Utils::isTorsocks()) {
|
||||
// When Feather is started with torsocks, let torsocks handle traffic.
|
||||
return false;
|
||||
}
|
||||
|
||||
if (TailsOS::detect() || WhonixOS::detect()) {
|
||||
if (config()->get(Config::proxy).toInt() == Config::Proxy::None) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (TailsOS::detect()) {
|
||||
// Tails does not transparently route traffic over Tor.
|
||||
return true;
|
||||
}
|
||||
|
||||
if (WhonixOS::detect()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (config()->get(Config::proxy).toInt() == Config::Proxy::Tor) {
|
||||
// Don't use socks5 proxy if initial sync traffic is excluded.
|
||||
return this->useOnionNodes();
|
||||
}
|
||||
|
||||
if (config()->get(Config::proxy).toInt() != Config::Proxy::None) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void Nodes::updateModels() {
|
||||
|
|
Loading…
Reference in a new issue