feat: add Tor services management UI in Settings
Settings page shows all Tor hidden services with toggle switches (enable/disable per app) and a Rotate button for the main node address. Added RPC client methods for tor.list-services, tor.toggle-app, tor.rotate-service, tor.cleanup-rotated. Toggle CSS classes in style.css. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -340,6 +340,22 @@ class RPCClient {
|
||||
})
|
||||
}
|
||||
|
||||
async torListServices(): Promise<{ services: Array<{ name: string; local_port: number; onion_address: string | null; enabled: boolean }> }> {
|
||||
return this.call({ method: 'tor.list-services' })
|
||||
}
|
||||
|
||||
async torRotateService(name: string): Promise<{ rotated: boolean; name: string; old_onion: string | null; new_onion: string | null; transition_hours: number }> {
|
||||
return this.call({ method: 'tor.rotate-service', params: { name } })
|
||||
}
|
||||
|
||||
async torToggleApp(appId: string, enabled: boolean): Promise<{ app_id: string; enabled: boolean; changed: boolean; onion_address: string | null }> {
|
||||
return this.call({ method: 'tor.toggle-app', params: { app_id: appId, enabled } })
|
||||
}
|
||||
|
||||
async torCleanupRotated(): Promise<{ cleaned: string[]; count: number }> {
|
||||
return this.call({ method: 'tor.cleanup-rotated' })
|
||||
}
|
||||
|
||||
async verifyNostrRevoked(): Promise<{
|
||||
revoked: boolean
|
||||
nostr_pubkey: string
|
||||
|
||||
Reference in New Issue
Block a user