Files
Amber/app/src/offline/java/com/greenart7c3
Claude d65d56d9f4 Add Tor status notification, retry on timeout, and prevent clearnet leaks
Tor status notification:
- TorManager.init() registers a dedicated "TorChannel" notification channel
- Shows "Starting Tor…" when start() is called
- Updates to "Built-in Tor Active" once the SOCKS proxy port is ready
- Shows "Retrying Tor connection…" before each retry attempt
- Cancels the notification on stop()

Retry on timeout:
- runMigrations() now loops until TorManager.isRunning is true
- On each 120s timeout: shows retrying notification, stops the current
  Tor instance, waits 3s, then starts fresh

No clearnet leaks when Tor is enabled:
- loadSettingsFromEncryptedStorage() now sets a fail-closed proxy on port 1
  for TorMode.BUILTIN so connections refuse immediately instead of bypassing
  the proxy before TorManager configures the real SOCKS port
- Same fix applied in updateTorMode() for runtime Tor mode switches

https://claude.ai/code/session_01JwcwxdYrDnr3QyHqTBz33a
2026-03-16 12:40:08 +00:00
..