Add FDA request dialog

This commit is contained in:
世界
2024-10-05 10:03:59 +08:00
parent 41ed30a5fa
commit 88ee9d5097
7 changed files with 92 additions and 9 deletions
+5
View File
@@ -0,0 +1,5 @@
import Foundation
public enum FullDiskAccessPermissionRequired: Error {
case error
}
+5
View File
@@ -49,6 +49,11 @@ public class ExtensionProfile: ObservableObject {
try await manager.saveToPreferences()
}
@available(iOS 16.0, macOS 13.0, tvOS 17.0, *)
public func fetchLastDisconnectError() async throws {
try await connection.fetchLastDisconnectError()
}
public func start() async throws {
await fetchProfile()
manager.isEnabled = true
+1
View File
@@ -32,6 +32,7 @@ open class ExtensionProvider: NEPacketTunnelProvider {
LibboxRedirectStderr(FilePath.cacheDirectory.appendingPathComponent("stderr.log").relativePath, &error)
if let error {
writeFatalError("(packet-tunnel) redirect stderr error: \(error.localizedDescription)")
return
}
await LibboxSetMemoryLimit(!SharedPreferences.ignoreMemoryLimit.get())