Skip to content

refactor: remove Tor functionality#511

Merged
barrydeen merged 1 commit intomainfrom
refactor/remove-tor
May 4, 2026
Merged

refactor: remove Tor functionality#511
barrydeen merged 1 commit intomainfrom
refactor/remove-tor

Conversation

@barrydeen
Copy link
Copy Markdown
Owner

Summary

  • Remove embedded kmp-tor client, all .onion relay support, Tor toggle UI (splash/auth/drawer), and Tor SOCKS plumbing from HttpClientFactory.
  • Drop TorManager, TorStatus, RelayConfig.isOnionUrl/isConnectableUrl, RelayPool.swapClientAndReconnect/ensureClientCurrent, RelayLifecycleManager.onTorSwitch.
  • Delete kmp-tor Gradle dependencies, ProGuard keep rules, the ic_tor_onion drawable, and 9 Tor-related string keys across 11 locales.
  • Relay URL validation now accepts only wss:// with a hostname (no port, no localhost, no IP). cleartextTrafficPermitted="true" stays — still needed for local (RFC1918 / loopback) relays.

Test plan

  • ./gradlew assembleDebug builds cleanly (no Kotlin/Lint errors)
  • No residual references — grep -rni 'TorManager|TorStatus|kmp-tor|isOnionUrl|TorRelay|ic_tor_onion|tor_enabled|\.onion' is empty across app/, gradle/, README
  • Install on device: app launches; no TorManager.initialize log noise
  • Splash, Auth, side-drawer no longer show the Tor pill / onion icon button
  • Relay settings: adding wss://relay.example.com works; .onion URLs are rejected by isValidUrl
  • Feed loads and DMs continue to work over plain wss:// relays (no proxy applied)

Notes

  • tor_enabled SharedPreferences key in wisp_settings is left as a harmless orphan on devices upgraded from a prior install — no code reads it anymore.
  • Two pre-existing dead-code warnings (scope/launch in WispDrawerContent.kt) and one "condition is always true" in RelayPool.kt:1297 are unrelated to this change.

Drops the embedded kmp-tor client, all .onion relay support, the Tor
toggle UI on splash/auth/drawer screens, the SOCKS proxy plumbing in
HttpClientFactory, all Tor-related strings across 11 locales, the
TorManager singleton, and the kmp-tor dependencies and ProGuard rules.

Relay URL validation now accepts only wss:// (with hostname, no port,
non-localhost, non-IP). The cleartextTrafficPermitted network security
flag stays — still needed for local relays on RFC1918 / loopback.
@barrydeen barrydeen merged commit 81aeaa0 into main May 4, 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