fix(settings): disable the unimplemented Tor option and tell its users
The "Use Tor" checkbox was saved but never read: no build routed any traffic (node, RPC, price/update/bootstrap/pool HTTP or Lite gRPC) through Tor, so users who ticked it believed they were anonymous. - The checkbox is disabled and always shown unticked, on the Settings page and in the legacy Settings window. Its tooltip says it is not available and gives the alternatives: for the node, proxy=127.0.0.1:9050 in DRAGONX.conf with Tor running; otherwise a system-wide VPN/Tor (Lite builds get the short version). The "Use Tor" label is kept. - Behaviour change: a stored use_tor=true is cleared once at startup (Settings::consumeLegacyUseTor + a synchronous save before the async writer and any Settings page state), with a 20 s warning in the user's language. The cleared key is the "already told" flag, so the notice never repeats. No settings format change. - 3 new strings (tt_tor_unavailable, tt_tor_unavailable_lite, tor_never_applied_notice) in all 8 languages; the tooltip wraps at tor-tooltip-wrap-width from ui.toml. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+10
@@ -412,6 +412,14 @@ bool App::init()
|
||||
settings_->save(); // no writer attached yet: synchronous
|
||||
settings_->clearUpgradeSave();
|
||||
}
|
||||
// "Use Tor" never did anything. Clear a stored opt-in once, synchronously and before any Settings
|
||||
// page state is loaded (so nothing writes it back), and warn that user below, once the saved
|
||||
// language is loaded.
|
||||
const bool legacyTorCleared = settings_->consumeLegacyUseTor();
|
||||
if (legacyTorCleared) {
|
||||
DEBUG_LOGF("[INFO] Cleared the unimplemented use_tor setting\n");
|
||||
settings_->save(); // no writer attached yet: synchronous
|
||||
}
|
||||
// From here on settings_->save() is written by file_writer_ off the UI thread (flushed by main()
|
||||
// at exit); a save after a fund/security-critical setter still waits for the disk (Settings::save).
|
||||
settings_->setFileWriter(&file_writer_);
|
||||
@@ -501,6 +509,8 @@ bool App::init()
|
||||
if (!lang.empty()) {
|
||||
util::I18n::instance().loadLanguage(lang);
|
||||
}
|
||||
if (legacyTorCleared)
|
||||
ui::Notifications::instance().warning(TR("tor_never_applied_notice"), 20.0f);
|
||||
|
||||
// Initialize RPC client
|
||||
rpc_ = std::make_unique<rpc::RPCClient>();
|
||||
|
||||
Reference in New Issue
Block a user