Skip to content

doc: documentation updates for torPrivacyLevel as well as multiple other important user safety and privacy areas of code. #290

Open
scramblr wants to merge 2 commits intofeather-wallet:masterfrom
scramblr:doc/tor-privacy-level-comments
Open

doc: documentation updates for torPrivacyLevel as well as multiple other important user safety and privacy areas of code. #290
scramblr wants to merge 2 commits intofeather-wallet:masterfrom
scramblr:doc/tor-privacy-level-comments

Conversation

@scramblr
Copy link
Copy Markdown

@scramblr scramblr commented Mar 1, 2026

Summary

Document previously-undocumented Tor subsystem behaviors:

  • Add comments to the PrivacyLevel enum in config.h explaining each value and its effect on node traffic routing
  • Document torPrivacyLevel, torOnlyAllowOnion, socks5Port, torManagedPort, useLocalTor, and initSyncThreshold settings.json keys in config.cpp
  • Document Whonix/Tails/torsocks auto-detection and its effects on Tor daemon management (whonix.h, whonix.cpp, tails.h)
  • Document TorManager restart limit (max 4 attempts), silent failure mode, and all private member variables (TorManager.h, TorManager.cpp)
  • Document checkConnection() priority order (6 code paths) and shouldStartTorDaemon() return conditions
  • Document stateChanged() auto-restart behavior after Tor crash
  • Document automatic clearnet-to-onion reconnection on wallet refresh in onWalletRefreshed()
  • Document useOnionNodes() full decision tree including torOnlyAllowOnion override
  • Document dual port architecture: managed Tor on 19450 vs system Tor on 9050
  • Document proxy address selection logic in connectToNode()
  • Fix misleading comment in useSocks5Proxy()

This addresses the MAINTENANCE.md goal of documenting default settings.

Companion PR: feather-wallet/feather-docs#18

Test plan

  • Documentation-only change (comments), no functional impact

Add comments to the PrivacyLevel enum in config.h and the Tor
settings block in config.cpp explaining the three privacy levels
and the initSyncThreshold setting.
Document the following previously-undocumented behaviors:

- Whonix/Tails/torsocks auto-detection and its effects on Tor daemon
  management and connection checking
- TorManager restart limit (max 4 attempts) and silent failure mode
- Automatic clearnet-to-onion reconnection on wallet refresh during
  allTorExceptInitSync mode
- torOnlyAllowOnion overriding torPrivacyLevel regardless of setting
- Dual port architecture: managed Tor on 19450 vs system Tor on 9050
- Proxy address selection logic in connectToNode()
- Fixed misleading comment in useSocks5Proxy()
@scramblr
Copy link
Copy Markdown
Author

scramblr commented Mar 1, 2026

Documentation is always the most annoying and hard to do part of any project, so.. since I saw that there was zero documentation for one of the settings in settings.json I figured I might as well go through the project and find the most critical things that needed to be documented/fixed that related to user safety and privacy. Hope this helps. Peace!

@scramblr scramblr changed the title doc: document torPrivacyLevel enum and settings.json keys doc: documentation updates for torPrivacyLevel as well as multiple other important user safety and privacy areas of code. Mar 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant