feat: support tor .onion relay storage and connections#154
Merged
Conversation
Split RelayConfig.isAcceptableUrl into isValidUrl (structural validation, always allows .onion) and isConnectableUrl (checks Tor state). Users can always add .onion relays to their lists; connections are only attempted when Tor is active. - Add network security config to allow cleartext ws:// for .onion - Lazily rebuild OkHttpClient when Tor state changes (ensureClientCurrent) - Fix relay probe: try ws:// first for .onion, increase timeout for Tor - Fix relay picker to respect user-specified protocol (ws:// or wss://) - Pass saved relay configs on Tor switch to pick up .onion relays - Add broadcast feedback toast to relay screen - Add TorRelay debug logging for connection troubleshooting
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.onionrelays to any relay list at any time, regardless of Tor state.onionrelays are only connected when Tor is active — silently skipped otherwisews://blocked by Android network security policy for.oniondomains.onionws:///wss://protocolTest plan
.onionrelay with Tor off — should be accepted and saved.onionrelay appears in relay list but is not connected.onionrelay auto-connects.onionrelay disconnects but stays in the saved list.onionrelays in saved list connect.onionrelay while Tor is active