34 lines
1.7 KiB
Markdown
34 lines
1.7 KiB
Markdown
# Architektur
|
|
|
|
```
|
|
Sources/RemminaMac/
|
|
RemminaMacApp.swift # @main, WindowGroup, lädt ProfileStore
|
|
Models/ConnectionProfile.swift # ProtocolType + ConnectionProfile + StoredSSHKey (Codable)
|
|
Stores/ProfileStore.swift # ObservableObject, JSON-Persistenz, Filter/Suche/Gruppen
|
|
Security/KeychainHelper.swift# SecItemAdd/Copy/Delete Wrapper
|
|
Services/ConnectionServices.swift # SSHService (ssh-Befehl) + RDPService (freerdp/rdc/vnc)
|
|
Views/ContentView.swift # NavigationSplitView: Sidebar + Tabs + Statusbar
|
|
Views/SessionView.swift # Detail pro Sitzung
|
|
Views/ProfileEditorView.swift# Formular Neu/Bearbeiten + Keychain-Anbindung
|
|
Views/SSHKeysView.swift # Key-Liste, Import, ssh-keygen
|
|
```
|
|
|
|
## Datenfluss
|
|
1. `RemminaMacApp` erstellt `ProfileStore` als `@StateObject`, injiziert als `environmentObject`.
|
|
2. `ProfileStore.load()` liest `profiles.json` + `sshkeys.json`, sonst Sample-Daten.
|
|
3. `ContentView` filtert via `searchText`/`selectedGroup`, `selection` steuert Detail.
|
|
4. `connect(_:)` setzt `lastConnected`, öffnet Tab, delegiert an `SSHService`/`RDPService`.
|
|
5. Secrets nur via `KeychainHelper`, JSON enthält nur Account-Referenzen.
|
|
|
|
## Wichtige Dateien
|
|
- `Stores/ProfileStore.swift:13` — Pfade + `load()`/`save()`
|
|
- `Models/ConnectionProfile.swift:3` — Protokoll-Defaults (Ports, Icons)
|
|
- `Services/ConnectionServices.swift:6` — `sshArguments(for:key:)`
|
|
- `Views/ContentView.swift` — Remmina-Layout
|
|
|
|
## Nächste Ausbaustufen
|
|
1. SwiftTerm-View statt externem Terminal + `swift-nio-ssh` für echte SSH-Sessions.
|
|
2. FreeRDP als XPC-Service einbetten statt `Process`.
|
|
3. SFTP-Browser (NIO SFTP oder libssh2-Bridge).
|
|
4. Export/Import-Buttons + Drag&Drop für Keys.
|