@@ -10,6 +10,8 @@ class AppState: ObservableObject {
1010 private let logger = Logger ( subsystem: Bundle . main. bundleIdentifier!, category: " AppState " )
1111 let appId = Bundle . main. bundleIdentifier!
1212
13+ let dangerousDisableDownloadSignatureValidation : Bool
14+
1315 // Stored in UserDefaults
1416 @Published private( set) var hasSession : Bool {
1517 didSet {
@@ -87,6 +89,7 @@ class AppState: ObservableObject {
8789 if useLiteralHeaders, let headers = try ? JSONEncoder ( ) . encode ( literalHeaders) {
8890 proto. providerConfiguration ? [ " literalHeaders " ] = headers
8991 }
92+ proto. providerConfiguration ? [ " dangerousDisableDownloadSignatureValidation " ] = dangerousDisableDownloadSignatureValidation
9093 proto. serverAddress = baseAccessURL!. absoluteString
9194 return proto
9295 }
@@ -106,6 +109,9 @@ class AppState: ObservableObject {
106109 {
107110 self . persistent = persistent
108111 self . onChange = onChange
112+ dangerousDisableDownloadSignatureValidation = persistent
113+ ? UserDefaults . standard. bool ( forKey: Keys . dangerousDisableDownloadSignatureValidation)
114+ : false
109115 keychain = Keychain ( service: Bundle . main. bundleIdentifier!)
110116 _hasSession = Published ( initialValue: persistent ? UserDefaults . standard. bool ( forKey: Keys . hasSession) : false )
111117 _baseAccessURL = Published (
@@ -219,6 +225,7 @@ class AppState: ObservableObject {
219225 static let stopVPNOnQuit = " StopVPNOnQuit "
220226 static let startVPNOnLaunch = " StartVPNOnLaunch "
221227
228+ static let dangerousDisableDownloadSignatureValidation = " DangerousDisableDownloadSignatureValidation "
222229 static let skipHiddenIconAlert = " SkipHiddenIconAlert "
223230 }
224231}
0 commit comments