feat(network): support custom relay servers

Add strict custom Iroh relay profiles with safe restart and rollback across the Rust core, Compose apps, and Apple apps. Preserve multi-relay invitations and fail closed on configuration or recovery mismatches.
This commit is contained in:
2026-07-23 14:27:40 +02:00
parent 5939489432
commit cbace73908
66 changed files with 5692 additions and 168 deletions

View File

@@ -38,6 +38,17 @@ struct SettingsScreen: View {
NavigationLink(value: SettingsSection.storage) {
SettingsRow(icon: "internaldrive", title: String(localized: "storage_title"), value: nil)
}
}
Section(String(localized: "settings_advanced_title")) {
NavigationLink(value: SettingsSection.network) {
SettingsRow(
icon: "network",
title: String(localized: "settings_network_title"),
value: relayModeLabel(model.state.relayMode)
)
}
}
Section {
NavigationLink(value: SettingsSection.about) {
SettingsRow(icon: "info.circle", title: String(localized: "about_title"), value: nil)
}
@@ -99,6 +110,8 @@ private struct SettingsSectionContent: View {
AppearanceSettings(model: model)
case .notifications:
NotificationSettings(model: model)
case .network:
NetworkSettings(model: model)
case .storage:
StorageSettings(model: model)
case .about:
@@ -109,6 +122,13 @@ private struct SettingsSectionContent: View {
}
}
func relayModeLabel(_ mode: RelayPreferenceMode) -> String {
switch mode {
case .automatic: return String(localized: "relay_mode_automatic")
case .custom: return String(localized: "relay_mode_custom")
}
}
struct SettingsRow: View {
let icon: String
let title: String