feat: add Tor address rotation, cleanup, and per-app toggle RPC endpoints

tor.rotate-service: renames hidden service dir, restarts Tor, waits
for new hostname. Old dir kept for 24h transition.
tor.cleanup-rotated: removes expired old service directories.
tor.toggle-app: enable/disable Tor access per app with service dir
management and container restart.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Dorian
2026-03-12 23:57:38 +00:00
co-authored by Claude Opus 4.6
parent 83c0092f1b
commit f1ca60e732
3 changed files with 221 additions and 3 deletions
+3
View File
@@ -370,6 +370,9 @@ impl RpcHandler {
"tor.create-service" => self.handle_tor_create_service(params).await,
"tor.delete-service" => self.handle_tor_delete_service(params).await,
"tor.get-onion-address" => self.handle_tor_get_onion_address(params).await,
"tor.rotate-service" => self.handle_tor_rotate_service(params).await,
"tor.cleanup-rotated" => self.handle_tor_cleanup_rotated().await,
"tor.toggle-app" => self.handle_tor_toggle_app(params).await,
// Nostr relay management
"nostr.list-relays" => self.handle_nostr_list_relays().await,