Add fully manual VPN mode

This commit is contained in:
2026-05-26 14:18:38 +03:00
parent c3d8e4b62f
commit f2d4f8e04b
10 changed files with 94 additions and 13 deletions

View File

@@ -122,11 +122,13 @@ enum VPNState: Equatable {
enum VPNLaunchMode: String {
case auto
case manual
case manualFull
var cliArgument: String {
switch self {
case .auto: return "--auto"
case .manual: return "--manual"
case .manualFull: return "--manual-full"
}
}
}
@@ -459,7 +461,7 @@ class VPNManager: ObservableObject {
state = .disconnected
userInitiatedDisconnect = false
autoReconnectAttempts = 0
} else if currentLaunchMode == .manual {
} else if currentLaunchMode != .auto {
log("Manual connection ended; auto-reconnect is disabled for manual mode")
state = .disconnected
autoReconnectAttempts = 0