diff --git a/ApplicationLibrary/Views/Dashboard/DashboardView.swift b/ApplicationLibrary/Views/Dashboard/DashboardView.swift index bb09eb1..4b5cb58 100644 --- a/ApplicationLibrary/Views/Dashboard/DashboardView.swift +++ b/ApplicationLibrary/Views/Dashboard/DashboardView.swift @@ -1,12 +1,60 @@ +import Library import SwiftUI public struct DashboardView: View { - @Environment(\.extensionProfile) private var extensionProfile + #if os(macOS) + @Environment(\.controlActiveState) private var controlActiveState + @State private var isLoading = true + @State private var systemExtensionInstalled = true + #endif public init() {} - public var body: some View { viewBuilder { + #if os(macOS) + if Variant.useSystemExtension { + viewBuilder { + if !systemExtensionInstalled { + FormView { + InstallSystemExtensionButton(reload) + } + } else { + DashboardView0() + } + }.onAppear(perform: reload) + } else { + DashboardView0() + } + #else + DashboardView0() + #endif + } + #if os(macOS) + .onChange(of: controlActiveState, perform: { newValue in + if newValue != .inactive { + if Variant.useSystemExtension { + if !isLoading { + reload() + } + } + } + }) + #endif + .navigationTitle("Dashboard") + } + + #if os(macOS) + private func reload() { + Task { + systemExtensionInstalled = await SystemExtension.isInstalled() + isLoading = false + } + } + #endif + + struct DashboardView0: View { + @Environment(\.extensionProfile) private var extensionProfile + var body: some View { if ApplicationLibrary.inPreview { ActiveDashboardView() } else if let profile = extensionProfile.wrappedValue { @@ -16,6 +64,6 @@ public struct DashboardView: View { InstallProfileButton() } } - }.navigationTitle("Dashboard") + } } } diff --git a/ApplicationLibrary/Views/Dashboard/InstallSystemExtensionButton.swift b/ApplicationLibrary/Views/Dashboard/InstallSystemExtensionButton.swift new file mode 100644 index 0000000..9dc4bd7 --- /dev/null +++ b/ApplicationLibrary/Views/Dashboard/InstallSystemExtensionButton.swift @@ -0,0 +1,45 @@ +#if os(macOS) + + import Library + import SwiftUI + + public struct InstallSystemExtensionButton: View { + @State private var errorPresented = false + @State private var errorMessage = "" + private let callback: () -> Void + public init(_ callback: @escaping () -> Void) { + self.callback = callback + } + + public var body: some View { + Button("Install SystemExtension") { + Task { + await installSystemExtension() + } + } + .alert(isPresented: $errorPresented) { + Alert( + title: Text("Error"), + message: Text(errorMessage), + dismissButton: .default(Text("Ok")) + ) + } + } + + private func installSystemExtension() async { + do { + if let result = try await SystemExtension.install() { + if result == .willCompleteAfterReboot { + errorMessage = "Need reboot" + errorPresented = true + } + } + callback() + } catch { + errorMessage = error.localizedDescription + errorPresented = true + } + } + } + +#endif diff --git a/ApplicationLibrary/Views/Profile/EditProfileContentView.swift b/ApplicationLibrary/Views/Profile/EditProfileContentView.swift index cf138f5..ddece65 100644 --- a/ApplicationLibrary/Views/Profile/EditProfileContentView.swift +++ b/ApplicationLibrary/Views/Profile/EditProfileContentView.swift @@ -48,7 +48,7 @@ public struct EditProfileContentView: View { } } .font(Font.system(.caption2, design: .monospaced)) - .disableAutocorrection(true) + .autocorrectionDisabled() #if os(iOS) .textInputAutocapitalization(.none) .background(Color(UIColor.secondarySystemGroupedBackground)) diff --git a/ApplicationLibrary/Views/Setting/SettingView.swift b/ApplicationLibrary/Views/Setting/SettingView.swift index 1a5aa72..6322e80 100644 --- a/ApplicationLibrary/Views/Setting/SettingView.swift +++ b/ApplicationLibrary/Views/Setting/SettingView.swift @@ -74,6 +74,27 @@ public struct SettingView: View { SharedPreferences.disableMemoryLimit = newValue } } + #if os(macOS) + if Variant.useSystemExtension { + HStack { + Button("Update System Extension") { + Task { + do { + if let result = try await SystemExtension.install(forceUpdate: true) { + if result == .willCompleteAfterReboot { + errorMessage = "Need reboot" + errorPresented = true + } + } + } catch { + errorMessage = error.localizedDescription + errorPresented = true + } + } + } + }.frame(maxWidth: .infinity, alignment: .trailing) + } + #endif } Section("Core") { FormTextItem("Version", version) diff --git a/Extension/PacketTunnelProvider.swift b/Extension/PacketTunnelProvider.swift index 533b5a8..fbeef8d 100644 --- a/Extension/PacketTunnelProvider.swift +++ b/Extension/PacketTunnelProvider.swift @@ -1,174 +1,4 @@ import Foundation -import Libbox import Library -import NetworkExtension -class PacketTunnelProvider: NEPacketTunnelProvider { - private var commandServer: LibboxCommandServer! - private var boxService: LibboxBoxService! - - override func startTunnel(options _: [String: NSObject]?) async throws { - NSLog("Here I am") - do { - try FileManager.default.createDirectory(at: FilePath.cacheDirectory, withIntermediateDirectories: true) - } catch { - writeFatalError("(packet-tunnel) error: create cache directory: \(error.localizedDescription)") - return - } - var error: NSError? - LibboxRedirectStderr(FilePath.cacheDirectory.appendingPathComponent("stderr.log").relativePath, &error) - if let error { - writeError("(packet-tunnel) redirect stderr error: \(error.localizedDescription)") - } - - LibboxSetMemoryLimit(!SharedPreferences.disableMemoryLimit) - - commandServer = LibboxNewCommandServer(FilePath.sharedDirectory.relativePath, serverInterface(self), Int32(SharedPreferences.maxLogLines)) - do { - try commandServer.start() - } catch { - writeFatalError("(packet-tunnel): log server start error: \(error.localizedDescription)") - return - } - writeMessage("(packet-tunnel) log server started") - - do { - try FileManager.default.createDirectory(at: FilePath.workingDirectory, withIntermediateDirectories: true) - } catch { - writeFatalError("(packet-tunnel) error: create working directory: \(error.localizedDescription)") - return - } - - LibboxSetup(FilePath.workingDirectory.relativePath, FilePath.cacheDirectory.relativePath, -1, -1) - - startService() - } - - private func writeMessage(_ message: String) { - if let commandServer { - commandServer.writeMessage(message) - } else { - NSLog(message) - } - } - - private func writeError(_ message: String) { - writeMessage(message) - #if os(iOS) - ServiceNotification.postServiceNotification(title: "Service Error", message: message) - #else - displayMessage(message) { _ in - } - #endif - } - - private func writeFatalError(_ message: String) { - writeError(message) - cancelTunnelWithError(NSError(domain: message, code: 0)) - } - - private func startService() { - let profile: Profile? - do { - profile = try ProfileManager.get(Int64(SharedPreferences.selectedProfileID)) - } catch { - writeFatalError("(packet-tunnel) error: missing default profile: \(error.localizedDescription)") - return - } - guard let profile else { - writeFatalError("(packet-tunnel) error: missing default profile") - return - } - let configContent: String - do { - configContent = try profile.read() - } catch { - writeFatalError("(packet-tunnel) error: read config file: \(error.localizedDescription)") - return - } - var error: NSError? - let service = LibboxNewService(configContent, ExtensionPlatformInterface(self, commandServer), &error) - if let error { - writeError("(packet-tunnel) error: create service: \(error.localizedDescription)") - return - } - guard let service else { - return - } - do { - try service.start() - } catch { - writeError("(packet-tunnel) error: start service: \(error.localizedDescription)") - return - } - boxService = service - commandServer.setService(service) - #if os(macOS) - Task.detached { - SharedPreferences.startedByUser = true - } - #endif - } - - private func stopService() { - if let service = boxService { - do { - try service.close() - } catch { - writeError("(packet-tunnel) error: stop service: \(error.localizedDescription)") - } - boxService = nil - commandServer.setService(nil) - } - } - - private func reloadService() { - writeMessage("(packet-tunnel) reloading service") - reasserting = true - defer { - reasserting = false - } - stopService() - startService() - } - - override func stopTunnel(with reason: NEProviderStopReason) async { - writeMessage("(packet-tunnel) stopping, reason: \(reason)") - stopService() - if let server = commandServer { - try? server.close() - commandServer = nil - } - #if os(macOS) - if reason == .userInitiated { - SharedPreferences.startedByUser = reason == .userInitiated - } - #endif - } - - override func handleAppMessage(_ messageData: Data) async -> Data? { - messageData - } - - override func sleep() async {} - - override func wake() {} - - private class serverInterface: NSObject, LibboxCommandServerHandlerProtocol { - unowned let tunnel: PacketTunnelProvider - - init(_ tunnel: PacketTunnelProvider) { - self.tunnel = tunnel - super.init() - } - - func serviceReload() throws { - tunnel.reloadService() - } - - func serviceStop() throws { - tunnel.stopService() - tunnel.writeMessage("(packet-tunnel) debug: service stopped") - } - } -} +class PacketTunnelProvider: ExtensionProvider {} diff --git a/Library/Database/Databse.swift b/Library/Database/Databse.swift index acbf88e..6decd6d 100644 --- a/Library/Database/Databse.swift +++ b/Library/Database/Databse.swift @@ -8,6 +8,7 @@ class Database { if let writer { return writer } + try FileManager.default.createDirectory(at: FilePath.sharedDirectory, withIntermediateDirectories: true) let database = try DatabasePool(path: FilePath.sharedDirectory.appendingPathComponent("settings.db").relativePath) var migrator = DatabaseMigrator().disablingDeferredForeignKeyChecks() migrator.eraseDatabaseOnSchemaChange = true diff --git a/Extension/Extension+Iterator.swift b/Library/Network/Extension+Iterator.swift similarity index 100% rename from Extension/Extension+Iterator.swift rename to Library/Network/Extension+Iterator.swift diff --git a/Extension/Extension+RunBlocking.swift b/Library/Network/Extension+RunBlocking.swift similarity index 100% rename from Extension/Extension+RunBlocking.swift rename to Library/Network/Extension+RunBlocking.swift diff --git a/Extension/ExtensionPlatformInterface.swift b/Library/Network/ExtensionPlatformInterface.swift similarity index 80% rename from Extension/ExtensionPlatformInterface.swift rename to Library/Network/ExtensionPlatformInterface.swift index 71aa666..c26732b 100644 --- a/Extension/ExtensionPlatformInterface.swift +++ b/Library/Network/ExtensionPlatformInterface.swift @@ -2,7 +2,7 @@ import Foundation import Libbox import NetworkExtension -class ExtensionPlatformInterface: NSObject, LibboxPlatformInterfaceProtocol { +public class ExtensionPlatformInterface: NSObject, LibboxPlatformInterfaceProtocol { private let tunnel: NEPacketTunnelProvider private let commandServer: LibboxCommandServer @@ -11,7 +11,7 @@ class ExtensionPlatformInterface: NSObject, LibboxPlatformInterfaceProtocol { commandServer = logServer } - func openTun(_ options: LibboxTunOptionsProtocol?, ret0_: UnsafeMutablePointer?) throws { + public func openTun(_ options: LibboxTunOptionsProtocol?, ret0_: UnsafeMutablePointer?) throws { guard let options else { throw NSError(domain: "nil options", code: 0) } @@ -105,52 +105,52 @@ class ExtensionPlatformInterface: NSObject, LibboxPlatformInterfaceProtocol { } } - func usePlatformAutoDetectControl() -> Bool { + public func usePlatformAutoDetectControl() -> Bool { true } - func autoDetectControl(_: Int32) throws {} + public func autoDetectControl(_: Int32) throws {} - func findConnectionOwner(_: Int32, sourceAddress _: String?, sourcePort _: Int32, destinationAddress _: String?, destinationPort _: Int32, ret0_ _: UnsafeMutablePointer?) throws { + public func findConnectionOwner(_: Int32, sourceAddress _: String?, sourcePort _: Int32, destinationAddress _: String?, destinationPort _: Int32, ret0_ _: UnsafeMutablePointer?) throws { throw NSError(domain: "not implemented", code: 0) } - func packageName(byUid _: Int32, error _: NSErrorPointer) -> String { + public func packageName(byUid _: Int32, error _: NSErrorPointer) -> String { "" } - func uid(byPackageName _: String?, ret0_ _: UnsafeMutablePointer?) throws { + public func uid(byPackageName _: String?, ret0_ _: UnsafeMutablePointer?) throws { throw NSError(domain: "not implemented", code: 0) } - func useProcFS() -> Bool { + public func useProcFS() -> Bool { false } - func writeLog(_ message: String?) { + public func writeLog(_ message: String?) { guard let message else { return } commandServer.writeMessage(message) } - func usePlatformDefaultInterfaceMonitor() -> Bool { + public func usePlatformDefaultInterfaceMonitor() -> Bool { false } - func startDefaultInterfaceMonitor(_: LibboxInterfaceUpdateListenerProtocol?) throws {} + public func startDefaultInterfaceMonitor(_: LibboxInterfaceUpdateListenerProtocol?) throws {} - func closeDefaultInterfaceMonitor(_: LibboxInterfaceUpdateListenerProtocol?) throws {} + public func closeDefaultInterfaceMonitor(_: LibboxInterfaceUpdateListenerProtocol?) throws {} - func useGetter() -> Bool { + public func useGetter() -> Bool { false } - func getInterfaces() throws -> LibboxNetworkInterfaceIteratorProtocol { + public func getInterfaces() throws -> LibboxNetworkInterfaceIteratorProtocol { throw NSError(domain: "not implemented", code: 0) } - func underNetworkExtension() -> Bool { + public func underNetworkExtension() -> Bool { true } } diff --git a/Library/Network/ExtensionProfile.swift b/Library/Network/ExtensionProfile.swift index 5ebeab5..009e5e9 100644 --- a/Library/Network/ExtensionProfile.swift +++ b/Library/Network/ExtensionProfile.swift @@ -41,6 +41,14 @@ public class ExtensionProfile: ObservableObject { public func start() async throws { manager.isEnabled = true try await manager.saveToPreferences() + #if os(macOS) + if Variant.useSystemExtension { + try manager.connection.startVPNTunnel(options: [ + "username": NSString(string: NSUserName()), + ]) + return + } + #endif try manager.connection.startVPNTunnel() } @@ -61,7 +69,11 @@ public class ExtensionProfile: ObservableObject { let manager = NETunnelProviderManager() manager.localizedDescription = "utun interface" let tunnelProtocol = NETunnelProviderProtocol() - tunnelProtocol.providerBundleIdentifier = "\(FilePath.packageName).extension" + if Variant.useSystemExtension { + tunnelProtocol.providerBundleIdentifier = "\(FilePath.packageName).system" + } else { + tunnelProtocol.providerBundleIdentifier = "\(FilePath.packageName).extension" + } tunnelProtocol.serverAddress = "sing-box" manager.protocolConfiguration = tunnelProtocol manager.isEnabled = true diff --git a/Library/Network/ExtensionProvider.swift b/Library/Network/ExtensionProvider.swift new file mode 100644 index 0000000..e86d8a5 --- /dev/null +++ b/Library/Network/ExtensionProvider.swift @@ -0,0 +1,183 @@ +import Foundation +import Libbox +import NetworkExtension + +open class ExtensionProvider: NEPacketTunnelProvider { + public var username: String? = nil + private var commandServer: LibboxCommandServer! + private var boxService: LibboxBoxService! + + override open func startTunnel(options _: [String: NSObject]?) async throws { + NSLog("Here I am") + + do { + try FileManager.default.createDirectory(at: FilePath.workingDirectory, withIntermediateDirectories: true) + } catch { + writeFatalError("(packet-tunnel) error: create working directory: \(error.localizedDescription)") + return + } + + if let username { + var error: NSError? + LibboxSetupWithUsername(FilePath.workingDirectory.relativePath, FilePath.cacheDirectory.relativePath, username, &error) + if let error { + writeFatalError("(packet-tunnel) error: setup service: \(error.localizedDescription)") + return + } + } else { + LibboxSetup(FilePath.workingDirectory.relativePath, FilePath.cacheDirectory.relativePath) + } + + var error: NSError? + LibboxRedirectStderr(FilePath.cacheDirectory.appendingPathComponent("stderr.log").relativePath, &error) + if let error { + writeError("(packet-tunnel) redirect stderr error: \(error.localizedDescription)") + } + + LibboxSetMemoryLimit(!SharedPreferences.disableMemoryLimit) + + commandServer = LibboxNewCommandServer(FilePath.sharedDirectory.relativePath, serverInterface(self), Int32(SharedPreferences.maxLogLines)) + do { + try commandServer.start() + } catch { + writeFatalError("(packet-tunnel): log server start error: \(error.localizedDescription)") + return + } + writeMessage("(packet-tunnel) log server started") + + startService() + } + + private func writeMessage(_ message: String) { + if let commandServer { + commandServer.writeMessage(message) + } else { + NSLog(message) + } + } + + private func writeError(_ message: String) { + writeMessage(message) + #if os(iOS) + ServiceNotification.postServiceNotification(title: "Service Error", message: message) + #else + if Variant.useSystemExtension { + NSLog(message) + } else { + displayMessage(message) { _ in + } + } + #endif + } + + public func writeFatalError(_ message: String) { + writeError(message) + cancelTunnelWithError(NSError(domain: message, code: 0)) + } + + private func startService() { + let profile: Profile? + do { + profile = try ProfileManager.get(Int64(SharedPreferences.selectedProfileID)) + } catch { + writeFatalError("(packet-tunnel) error: missing default profile: \(error.localizedDescription)") + return + } + guard let profile else { + writeFatalError("(packet-tunnel) error: missing default profile") + return + } + let configContent: String + do { + configContent = try profile.read() + } catch { + writeFatalError("(packet-tunnel) error: read config file: \(error.localizedDescription)") + return + } + var error: NSError? + let service = LibboxNewService(configContent, ExtensionPlatformInterface(self, commandServer), &error) + if let error { + writeError("(packet-tunnel) error: create service: \(error.localizedDescription)") + return + } + guard let service else { + return + } + do { + try service.start() + } catch { + writeError("(packet-tunnel) error: start service: \(error.localizedDescription)") + return + } + boxService = service + commandServer.setService(service) + #if os(macOS) + Task.detached { + SharedPreferences.startedByUser = true + } + #endif + } + + private func stopService() { + if let service = boxService { + do { + try service.close() + } catch { + writeError("(packet-tunnel) error: stop service: \(error.localizedDescription)") + } + boxService = nil + commandServer.setService(nil) + } + } + + private func reloadService() { + writeMessage("(packet-tunnel) reloading service") + reasserting = true + defer { + reasserting = false + } + stopService() + startService() + } + + override open func stopTunnel(with reason: NEProviderStopReason) async { + writeMessage("(packet-tunnel) stopping, reason: \(reason)") + stopService() + if let server = commandServer { + try? await Task.sleep(nanoseconds: 100 * NSEC_PER_MSEC) + try? server.close() + commandServer = nil + } + #if os(macOS) + if reason == .userInitiated { + SharedPreferences.startedByUser = reason == .userInitiated + } + #endif + } + + override open func handleAppMessage(_ messageData: Data) async -> Data? { + messageData + } + + override open func sleep() async {} + + override open func wake() {} + + private class serverInterface: NSObject, LibboxCommandServerHandlerProtocol { + unowned let tunnel: ExtensionProvider + + init(_ tunnel: ExtensionProvider) { + self.tunnel = tunnel + super.init() + } + + func serviceReload() throws { + tunnel.reloadService() + } + + func serviceStop() throws { + tunnel.stopService() + tunnel.writeMessage("(packet-tunnel) debug: service stopped") + } + } +} diff --git a/Library/Network/SystemExtension.swift b/Library/Network/SystemExtension.swift new file mode 100644 index 0000000..37f1b33 --- /dev/null +++ b/Library/Network/SystemExtension.swift @@ -0,0 +1,95 @@ +#if os(macOS) + import Foundation + import SystemExtensions + + public class SystemExtension: NSObject, OSSystemExtensionRequestDelegate { + private let forceUpdate: Bool + private let semaphore = DispatchSemaphore(value: 0) + private var result: OSSystemExtensionRequest.Result? + private var properties: [OSSystemExtensionProperties]? + private var error: Error? + + private init(forceUpdate: Bool = false) { + self.forceUpdate = forceUpdate + } + + public func request(_: OSSystemExtensionRequest, actionForReplacingExtension existing: OSSystemExtensionProperties, withExtension ext: OSSystemExtensionProperties) -> OSSystemExtensionRequest.ReplacementAction { + if forceUpdate { + return .replace + } + if existing.bundleIdentifier == ext.bundleIdentifier, + existing.bundleVersion == ext.bundleVersion + { + return .cancel + } else { + return .replace + } + } + + public func requestNeedsUserApproval(_: OSSystemExtensionRequest) { + semaphore.signal() + } + + public func request(_: OSSystemExtensionRequest, didFinishWithResult result: OSSystemExtensionRequest.Result) { + self.result = result + semaphore.signal() + } + + public func request(_: OSSystemExtensionRequest, didFailWithError error: Error) { + self.error = error + semaphore.signal() + } + + public func request(_: OSSystemExtensionRequest, foundProperties properties: [OSSystemExtensionProperties]) { + self.properties = properties + semaphore.signal() + } + + public func submitAndWait() throws -> OSSystemExtensionRequest.Result? { + let request = OSSystemExtensionRequest.activationRequest(forExtensionWithIdentifier: FilePath.packageName + ".system", queue: .main) + request.delegate = self + OSSystemExtensionManager.shared.submitRequest(request) + semaphore.wait() + if let error { + throw error + } + return result + } + + public func getProperties() throws -> [OSSystemExtensionProperties] { + let request = OSSystemExtensionRequest.propertiesRequest(forExtensionWithIdentifier: FilePath.packageName + ".system", queue: .main) + request.delegate = self + OSSystemExtensionManager.shared.submitRequest(request) + semaphore.wait() + if let error { + throw error + } + return properties! + } + + public static func isInstalled() async -> Bool { + await (try? Task.detached { + do { + let propList = try SystemExtension().getProperties() + if propList.isEmpty { + return false + } + for extensionProp in propList { + if !extensionProp.isAwaitingUserApproval, !extensionProp.isUninstalling { + return true + } + } + } catch { + NSLog(error.localizedDescription) + } + return false + }.result.get()) == true + } + + public static func install(forceUpdate: Bool = false) async throws -> OSSystemExtensionRequest.Result? { + try await Task.detached { + try SystemExtension(forceUpdate: forceUpdate).submitAndWait() + }.result.get() + } + } +#endif diff --git a/Library/Shared/FilePath.swift b/Library/Shared/FilePath.swift index 55cbaa0..8561c10 100644 --- a/Library/Shared/FilePath.swift +++ b/Library/Shared/FilePath.swift @@ -12,15 +12,25 @@ public enum FilePath { public extension FilePath { static let groupName = "group.\(packageName)" - static let sharedDirectory: URL! = FileManager.default.containerURL(forSecurityApplicationGroupIdentifier: groupName) + static var sharedDirectory = defaultSharedDirectory - static let cacheDirectory = sharedDirectory - .appendingPathComponent("Library", isDirectory: true) - .appendingPathComponent("Caches", isDirectory: true) + private static var defaultSharedDirectory: URL { + FileManager.default.containerURL(forSecurityApplicationGroupIdentifier: FilePath.groupName)! + } - static let workingDirectory = cacheDirectory.appendingPathComponent("Working", isDirectory: true) + static var cacheDirectory: URL { + sharedDirectory + .appendingPathComponent("Library", isDirectory: true) + .appendingPathComponent("Caches", isDirectory: true) + } - static let iCloudDirectory = FileManager.default.url(forUbiquityContainerIdentifier: nil)!.appendingPathComponent("Documents", isDirectory: true) + static var workingDirectory: URL { + cacheDirectory.appendingPathComponent("Working", isDirectory: true) + } + + static var iCloudDirectory: URL { + FileManager.default.url(forUbiquityContainerIdentifier: nil)!.appendingPathComponent("Documents", isDirectory: true) + } } public extension URL { diff --git a/Library/Shared/Variant.swift b/Library/Shared/Variant.swift new file mode 100644 index 0000000..a724fda --- /dev/null +++ b/Library/Shared/Variant.swift @@ -0,0 +1,9 @@ +import Foundation + +public enum Variant { + #if os(macOS) + public static var useSystemExtension = false + #else + public static let useSystemExtension = false + #endif +} diff --git a/SFM/ApplicationDelegate.swift b/MacLibrary/ApplicationDelegate.swift similarity index 69% rename from SFM/ApplicationDelegate.swift rename to MacLibrary/ApplicationDelegate.swift index 850ffd8..d2526ac 100644 --- a/SFM/ApplicationDelegate.swift +++ b/MacLibrary/ApplicationDelegate.swift @@ -4,8 +4,8 @@ import Foundation import Libbox import Library -class ApplicationDelegate: NSObject, NSApplicationDelegate { - func applicationDidFinishLaunching(_: Notification) { +open class ApplicationDelegate: NSObject, NSApplicationDelegate { + public func applicationDidFinishLaunching(_: Notification) { NSLog("Here I stand") // ServiceNotification.register() // Not work let event = NSAppleEventManager.shared().currentAppleEvent @@ -20,6 +20,15 @@ class ApplicationDelegate: NSObject, NSApplicationDelegate { } Task.detached { do { + if Variant.useSystemExtension { + if await SystemExtension.isInstalled() { + if let result = try await SystemExtension.install() { + if result == .willCompleteAfterReboot { + return + } + } + } + } try await self.postStart(launchedAsLogInItem) } catch { NSLog("application setup error: \(error.localizedDescription)") @@ -38,11 +47,11 @@ class ApplicationDelegate: NSObject, NSApplicationDelegate { } } - func applicationShouldTerminateAfterLastWindowClosed(_: NSApplication) -> Bool { + public func applicationShouldTerminateAfterLastWindowClosed(_: NSApplication) -> Bool { !SharedPreferences.menuBarExtraInBackground } - func applicationShouldHandleReopen(_: NSApplication, hasVisibleWindows flag: Bool) -> Bool { + public func applicationShouldHandleReopen(_: NSApplication, hasVisibleWindows flag: Bool) -> Bool { if !flag, NSApp.activationPolicy() == .accessory { NSApp.setActivationPolicy(.regular) NSRunningApplication.runningApplications(withBundleIdentifier: "com.apple.dock").first?.activate() diff --git a/MacLibrary/MacApplication.swift b/MacLibrary/MacApplication.swift new file mode 100644 index 0000000..278c9c5 --- /dev/null +++ b/MacLibrary/MacApplication.swift @@ -0,0 +1,96 @@ +import ApplicationLibrary +import Library +import SwiftUI + +public struct MacApplication: Scene { + @State private var showMenuBarExtra = false + @State private var isMenuPresented = false + + public init() {} + public var body: some Scene { + Window("sing-box", id: "main", content: { + MainView() + .onAppear { + Task.detached { + await initialize() + } + } + .environment(\.showMenuBarExtra, $showMenuBarExtra) + }) + .commands { + if showMenuBarExtra { + CommandGroup(replacing: .appTermination) { + Button("Quit sing-box") { + hide(closeApp: true) + } + .keyboardShortcut("q", modifiers: [.command]) + } + CommandGroup(replacing: .saveItem) { + Button("Close") { + hide(closeApp: false) + } + .keyboardShortcut("w", modifiers: [.command]) + } + } + SidebarCommands() + } + + Window("New Profile", id: NewProfileView.windowID) { + NewProfileView() + } + + WindowGroup("Edit Profile", id: EditProfileWindowView.windowID, for: Int64.self) { profileID in + EditProfileWindowView(profileID.wrappedValue) + }.commandsRemoved() + + WindowGroup("Edit Content", id: EditProfileContentView.windowID, for: EditProfileContentView.Context.self) { context in + EditProfileContentView(context.wrappedValue) + }.commandsRemoved() + + Window("Service Log", id: ServiceLogView.windowID) { + ServiceLogView() + } + MenuBarExtra(isInserted: $showMenuBarExtra) { + MenuView(isMenuPresented: $isMenuPresented) + } label: { + Image(systemName: "network.badge.shield.half.filled") + } + .menuBarExtraStyle(.window) + .menuBarExtraAccess(isPresented: $isMenuPresented) + } + + private func initialize() { + let initialShowMenuBarExtra = SharedPreferences.showMenuBarExtra + DispatchQueue.main.async { + showMenuBarExtra = initialShowMenuBarExtra + } + } + + private func hide(closeApp: Bool) { + Task.detached { + if SharedPreferences.menuBarExtraInBackground { + DispatchQueue.main.async { + hide0(closeApp: closeApp) + } + } else { + DispatchQueue.main.async { + if closeApp { + NSApp.terminate(nil) + } else { + NSApp.keyWindow?.close() + } + } + } + } + } + + private func hide0(closeApp: Bool) { + if closeApp || NSApp.keyWindow?.identifier?.rawValue == "main" { + let transformState = ProcessApplicationTransformState(kProcessTransformToUIElementApplication) + var psn = ProcessSerialNumber(highLongOfPSN: 0, lowLongOfPSN: UInt32(kCurrentProcess)) + TransformProcessType(&psn, transformState) + NSApp.setActivationPolicy(.accessory) + } + NSApp.keyWindow?.close() + } +} diff --git a/MacLibrary/MacLibrary.swift b/MacLibrary/MacLibrary.swift new file mode 100644 index 0000000..47221be --- /dev/null +++ b/MacLibrary/MacLibrary.swift @@ -0,0 +1,3 @@ +import Foundation + +public class MacLibrary {} diff --git a/SFM/MainView.swift b/MacLibrary/MainView.swift similarity index 97% rename from SFM/MainView.swift rename to MacLibrary/MainView.swift index 34eb03f..dd43605 100644 --- a/SFM/MainView.swift +++ b/MacLibrary/MainView.swift @@ -2,7 +2,7 @@ import ApplicationLibrary import Library import SwiftUI -struct MainView: View { +public struct MainView: View { @Environment(\.controlActiveState) private var controlActiveState @State private var selection = NavigationPage.dashboard @@ -14,7 +14,8 @@ struct MainView: View { @State private var serviceNotificationContent = "" @State private var serviceNotificationPresented = false - var body: some View { + public init() {} + public var body: some View { NavigationSplitView { VStack { SidebarView() diff --git a/SFM/MenuView.swift b/MacLibrary/MenuView.swift similarity index 97% rename from SFM/MenuView.swift rename to MacLibrary/MenuView.swift index fff44ea..8df7bc3 100644 --- a/SFM/MenuView.swift +++ b/MacLibrary/MenuView.swift @@ -6,17 +6,21 @@ import MacControlCenterUI import MenuBarExtraAccess import SwiftUI -struct MenuView: View { +public struct MenuView: View { @Environment(\.openWindow) private var openWindow private static let sliderWidth: CGFloat = 270 - @Binding var isMenuPresented: Bool + @Binding private var isMenuPresented: Bool @State private var isLoading = true @State private var profile: ExtensionProfile? - var body: some View { + public init(isMenuPresented: Binding) { + _isMenuPresented = isMenuPresented + } + + public var body: some View { MacControlCenterMenu(isPresented: $isMenuPresented) { MenuHeader("sing-box") { if isLoading { diff --git a/SFM/SidebarView.swift b/MacLibrary/SidebarView.swift similarity index 93% rename from SFM/SidebarView.swift rename to MacLibrary/SidebarView.swift index fb9078a..a8cf34b 100644 --- a/SFM/SidebarView.swift +++ b/MacLibrary/SidebarView.swift @@ -2,11 +2,12 @@ import ApplicationLibrary import Library import SwiftUI -struct SidebarView: View { +public struct SidebarView: View { @Environment(\.selection) private var selection @Environment(\.extensionProfile) private var extensionProfile - var body: some View { + public init() {} + public var body: some View { viewBuilder { if let profile = extensionProfile.wrappedValue { SidebarView0().environmentObject(profile) diff --git a/SFM.System/Application.swift b/SFM.System/Application.swift new file mode 100644 index 0000000..ebf7b79 --- /dev/null +++ b/SFM.System/Application.swift @@ -0,0 +1,16 @@ +import Library +import MacLibrary +import SwiftUI + +@main +struct Application: App { + @NSApplicationDelegateAdaptor private var appDelegate: ApplicationDelegate + + init() { + Variant.useSystemExtension = true + } + + var body: some Scene { + MacApplication() + } +} diff --git a/SFM.System/Assets.xcassets/AccentColor.colorset/Contents.json b/SFM.System/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/SFM.System/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SFM.System/Assets.xcassets/AppIcon.appiconset/Contents.json b/SFM.System/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..f4ac7bc --- /dev/null +++ b/SFM.System/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,68 @@ +{ + "images" : [ + { + "filename" : "apple-16 1x.png", + "idiom" : "mac", + "scale" : "1x", + "size" : "16x16" + }, + { + "filename" : "apple-16 2x.png", + "idiom" : "mac", + "scale" : "2x", + "size" : "16x16" + }, + { + "filename" : "apple-32 1x.png", + "idiom" : "mac", + "scale" : "1x", + "size" : "32x32" + }, + { + "filename" : "apple-32 2x 1.png", + "idiom" : "mac", + "scale" : "2x", + "size" : "32x32" + }, + { + "filename" : "apple-128 1x.png", + "idiom" : "mac", + "scale" : "1x", + "size" : "128x128" + }, + { + "filename" : "apple-128 2x.png", + "idiom" : "mac", + "scale" : "2x", + "size" : "128x128" + }, + { + "filename" : "apple-256 1x.png", + "idiom" : "mac", + "scale" : "1x", + "size" : "256x256" + }, + { + "filename" : "apple-256 2x.png", + "idiom" : "mac", + "scale" : "2x", + "size" : "256x256" + }, + { + "filename" : "apple-512 1x.png", + "idiom" : "mac", + "scale" : "1x", + "size" : "512x512" + }, + { + "filename" : "apple-512 2x.png", + "idiom" : "mac", + "scale" : "2x", + "size" : "512x512" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SFM.System/Assets.xcassets/AppIcon.appiconset/apple-128 1x.png b/SFM.System/Assets.xcassets/AppIcon.appiconset/apple-128 1x.png new file mode 100644 index 0000000..9b10cd7 Binary files /dev/null and b/SFM.System/Assets.xcassets/AppIcon.appiconset/apple-128 1x.png differ diff --git a/SFM.System/Assets.xcassets/AppIcon.appiconset/apple-128 2x.png b/SFM.System/Assets.xcassets/AppIcon.appiconset/apple-128 2x.png new file mode 100644 index 0000000..21693a6 Binary files /dev/null and b/SFM.System/Assets.xcassets/AppIcon.appiconset/apple-128 2x.png differ diff --git a/SFM.System/Assets.xcassets/AppIcon.appiconset/apple-16 1x.png b/SFM.System/Assets.xcassets/AppIcon.appiconset/apple-16 1x.png new file mode 100644 index 0000000..28df597 Binary files /dev/null and b/SFM.System/Assets.xcassets/AppIcon.appiconset/apple-16 1x.png differ diff --git a/SFM.System/Assets.xcassets/AppIcon.appiconset/apple-16 2x.png b/SFM.System/Assets.xcassets/AppIcon.appiconset/apple-16 2x.png new file mode 100644 index 0000000..6852edd Binary files /dev/null and b/SFM.System/Assets.xcassets/AppIcon.appiconset/apple-16 2x.png differ diff --git a/SFM.System/Assets.xcassets/AppIcon.appiconset/apple-256 1x.png b/SFM.System/Assets.xcassets/AppIcon.appiconset/apple-256 1x.png new file mode 100644 index 0000000..db0a7f0 Binary files /dev/null and b/SFM.System/Assets.xcassets/AppIcon.appiconset/apple-256 1x.png differ diff --git a/SFM.System/Assets.xcassets/AppIcon.appiconset/apple-256 2x.png b/SFM.System/Assets.xcassets/AppIcon.appiconset/apple-256 2x.png new file mode 100644 index 0000000..4449735 Binary files /dev/null and b/SFM.System/Assets.xcassets/AppIcon.appiconset/apple-256 2x.png differ diff --git a/SFM.System/Assets.xcassets/AppIcon.appiconset/apple-32 1x.png b/SFM.System/Assets.xcassets/AppIcon.appiconset/apple-32 1x.png new file mode 100644 index 0000000..171cb5b Binary files /dev/null and b/SFM.System/Assets.xcassets/AppIcon.appiconset/apple-32 1x.png differ diff --git a/SFM.System/Assets.xcassets/AppIcon.appiconset/apple-32 2x 1.png b/SFM.System/Assets.xcassets/AppIcon.appiconset/apple-32 2x 1.png new file mode 100644 index 0000000..1654da9 Binary files /dev/null and b/SFM.System/Assets.xcassets/AppIcon.appiconset/apple-32 2x 1.png differ diff --git a/SFM.System/Assets.xcassets/AppIcon.appiconset/apple-512 1x.png b/SFM.System/Assets.xcassets/AppIcon.appiconset/apple-512 1x.png new file mode 100644 index 0000000..99e829a Binary files /dev/null and b/SFM.System/Assets.xcassets/AppIcon.appiconset/apple-512 1x.png differ diff --git a/SFM.System/Assets.xcassets/AppIcon.appiconset/apple-512 2x.png b/SFM.System/Assets.xcassets/AppIcon.appiconset/apple-512 2x.png new file mode 100644 index 0000000..88a80d6 Binary files /dev/null and b/SFM.System/Assets.xcassets/AppIcon.appiconset/apple-512 2x.png differ diff --git a/SFM.System/Assets.xcassets/Contents.json b/SFM.System/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/SFM.System/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SFM.System/Info.plist b/SFM.System/Info.plist new file mode 100644 index 0000000..fbc2dd1 --- /dev/null +++ b/SFM.System/Info.plist @@ -0,0 +1,20 @@ + + + + + NSUbiquitousContainers + + iCloud.io.nekohasekai.sfa + + NSUbiquitousContainerIsDocumentScopePublic + + NSUbiquitousContainerName + sing-box + NSUbiquitousContainerSupportedFolderLevels + Any + + + ITSAppUsesNonExemptEncryption + + + diff --git a/SFM.System/SFM.entitlements b/SFM.System/SFM.entitlements new file mode 100644 index 0000000..b9938e5 --- /dev/null +++ b/SFM.System/SFM.entitlements @@ -0,0 +1,22 @@ + + + + + com.apple.developer.networking.networkextension + + packet-tunnel-provider-systemextension + + com.apple.developer.system-extension.install + + com.apple.security.app-sandbox + + com.apple.security.application-groups + + group.io.nekohasekai.sfa + + com.apple.security.files.user-selected.read-write + + com.apple.security.network.client + + + diff --git a/SFM/Application.swift b/SFM/Application.swift index ed1f14b..e1eba06 100644 --- a/SFM/Application.swift +++ b/SFM/Application.swift @@ -1,98 +1,11 @@ -import ApplicationLibrary -import Library +import MacLibrary import SwiftUI @main struct Application: App { @NSApplicationDelegateAdaptor private var appDelegate: ApplicationDelegate - @State private var showMenuBarExtra = false - @State private var isMenuPresented = false - var body: some Scene { - Window("sing-box", id: "main", content: { - MainView() - .onAppear { - Task.detached { - await initialize() - } - } - .environment(\.showMenuBarExtra, $showMenuBarExtra) - }) - .commands { - if showMenuBarExtra { - CommandGroup(replacing: .appTermination) { - Button("Quit sing-box") { - hide(closeApp: true) - } - .keyboardShortcut("q", modifiers: [.command]) - } - CommandGroup(replacing: .saveItem) { - Button("Close") { - hide(closeApp: false) - } - .keyboardShortcut("w", modifiers: [.command]) - } - } - SidebarCommands() - } - - Window("New Profile", id: NewProfileView.windowID) { - NewProfileView() - } - - WindowGroup("Edit Profile", id: EditProfileWindowView.windowID, for: Int64.self) { profileID in - EditProfileWindowView(profileID.wrappedValue) - }.commandsRemoved() - - WindowGroup("Edit Content", id: EditProfileContentView.windowID, for: EditProfileContentView.Context.self) { context in - EditProfileContentView(context.wrappedValue) - }.commandsRemoved() - - Window("Service Log", id: ServiceLogView.windowID) { - ServiceLogView() - } - MenuBarExtra(isInserted: $showMenuBarExtra) { - MenuView(isMenuPresented: $isMenuPresented) - } label: { - Image(systemName: "network.badge.shield.half.filled") - } - .menuBarExtraStyle(.window) - .menuBarExtraAccess(isPresented: $isMenuPresented) - } - - private func initialize() { - let initialShowMenuBarExtra = SharedPreferences.showMenuBarExtra - DispatchQueue.main.async { - showMenuBarExtra = initialShowMenuBarExtra - } - } - - private func hide(closeApp: Bool) { - Task.detached { - if SharedPreferences.menuBarExtraInBackground { - DispatchQueue.main.async { - hide0(closeApp: closeApp) - } - } else { - DispatchQueue.main.async { - if closeApp { - NSApp.terminate(nil) - } else { - NSApp.keyWindow?.close() - } - } - } - } - } - - private func hide0(closeApp: Bool) { - if closeApp || NSApp.keyWindow?.identifier?.rawValue == "main" { - let transformState = ProcessApplicationTransformState(kProcessTransformToUIElementApplication) - var psn = ProcessSerialNumber(highLongOfPSN: 0, lowLongOfPSN: UInt32(kCurrentProcess)) - TransformProcessType(&psn, transformState) - NSApp.setActivationPolicy(.accessory) - } - NSApp.keyWindow?.close() + MacApplication() } } diff --git a/SFM/SFM.entitlements b/SFM/SFM.entitlements index d7564b5..30f0f0d 100644 --- a/SFM/SFM.entitlements +++ b/SFM/SFM.entitlements @@ -28,7 +28,5 @@ com.apple.security.network.client - com.apple.security.network.server - diff --git a/SystemExtension/Info.plist b/SystemExtension/Info.plist new file mode 100644 index 0000000..90b6c2f --- /dev/null +++ b/SystemExtension/Info.plist @@ -0,0 +1,16 @@ + + + + + NetworkExtension + + NEMachServiceName + group.io.nekohasekai.sfa.system + NEProviderClasses + + com.apple.networkextension.packet-tunnel + $(PRODUCT_MODULE_NAME).PacketTunnelProvider + + + + diff --git a/SystemExtension/PacketTunnelProvider.swift b/SystemExtension/PacketTunnelProvider.swift new file mode 100644 index 0000000..1d5dccc --- /dev/null +++ b/SystemExtension/PacketTunnelProvider.swift @@ -0,0 +1,15 @@ +import Library +import NetworkExtension + +class PacketTunnelProvider: ExtensionProvider { + override func startTunnel(options: [String: NSObject]?) async throws { + guard let usernameObject = options?["username"] else { + writeFatalError("missing start options") + return + } + let username = usernameObject as! NSString + FilePath.sharedDirectory = URL(filePath: "/Users/\(username)/Library/Group Containers/\(FilePath.groupName)") + self.username = String(username) + try await super.startTunnel(options: options) + } +} diff --git a/SystemExtension/SystemExtension.entitlements b/SystemExtension/SystemExtension.entitlements new file mode 100644 index 0000000..62d2171 --- /dev/null +++ b/SystemExtension/SystemExtension.entitlements @@ -0,0 +1,14 @@ + + + + + com.apple.developer.networking.networkextension + + packet-tunnel-provider-systemextension + + com.apple.security.application-groups + + group.io.nekohasekai.sfa + + + diff --git a/SystemExtension/main.swift b/SystemExtension/main.swift new file mode 100644 index 0000000..5b415e8 --- /dev/null +++ b/SystemExtension/main.swift @@ -0,0 +1,11 @@ +import Foundation +import Library +import NetworkExtension + +Variant.useSystemExtension = true + +autoreleasepool { + NEProvider.startSystemExtensionMode() +} + +dispatchMain() diff --git a/sing-box.xcodeproj/project.pbxproj b/sing-box.xcodeproj/project.pbxproj index 3840814..2cd83ac 100644 --- a/sing-box.xcodeproj/project.pbxproj +++ b/sing-box.xcodeproj/project.pbxproj @@ -8,20 +8,21 @@ /* Begin PBXBuildFile section */ 3A017F922A4AB2E4009149FA /* GRDB in Frameworks */ = {isa = PBXBuildFile; productRef = 3A017F912A4AB2E4009149FA /* GRDB */; }; - 3A096F8A2A4ED3DE00D4A2ED /* PacketTunnelProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A096F892A4ED3DE00D4A2ED /* PacketTunnelProvider.swift */; }; 3A096F8F2A4ED3DE00D4A2ED /* Extension.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = 3A096F862A4ED3DE00D4A2ED /* Extension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; 3A1CF2F02A50E5EE000A8289 /* GroupListView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A1CF2EF2A50E5EE000A8289 /* GroupListView.swift */; }; 3A1CF2F22A50E613000A8289 /* OutboundGroup.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A1CF2F12A50E613000A8289 /* OutboundGroup.swift */; }; - 3A1CF2F42A50E937000A8289 /* SidebarView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A1CF2F32A50E937000A8289 /* SidebarView.swift */; }; 3A1CF2F62A50EE9C000A8289 /* GroupView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A1CF2F52A50EE9C000A8289 /* GroupView.swift */; }; 3A1CF2F82A50F0A5000A8289 /* GroupItemView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A1CF2F72A50F0A5000A8289 /* GroupItemView.swift */; }; 3A1CF2FA2A50F0BD000A8289 /* OutboundGroupItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A1CF2F92A50F0BD000A8289 /* OutboundGroupItem.swift */; }; + 3A2223542A6E1B6700C50B23 /* Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3A2223532A6E1B6700C50B23 /* Info.plist */; }; + 3A2223562A6E1BDE00C50B23 /* Variant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A2223552A6E1BDE00C50B23 /* Variant.swift */; }; + 3A2223582A6E1CC700C50B23 /* MacApplication.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A2223572A6E1CC700C50B23 /* MacApplication.swift */; }; + 3A22235A2A6E212A00C50B23 /* SystemExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A2223592A6E212A00C50B23 /* SystemExtension.swift */; }; 3A251C122A52D09700651082 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 3AAB5E7A2A4C1446009757F1 /* Assets.xcassets */; }; 3A3AA7FC2A4EFDAE002F78AB /* Library.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3AEC211D2A459B4700A63465 /* Library.framework */; }; 3A3AA7FF2A4EFDB3002F78AB /* Library.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3AEC211D2A459B4700A63465 /* Library.framework */; }; 3A3DEBEB2A4FFE2D00373BF4 /* AppIntents.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3A3DEBE62A4FFA6000373BF4 /* AppIntents.framework */; }; 3A44BB822A4DC28700E4C9F8 /* MainView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A44BB812A4DC28700E4C9F8 /* MainView.swift */; }; - 3A4EAD162A4FEAE6005435B3 /* ApplicationLibrary.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3A4EAD102A4FEAE6005435B3 /* ApplicationLibrary.framework */; }; 3A4EAD1B2A4FEB02005435B3 /* Library.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3AEC211D2A459B4700A63465 /* Library.framework */; }; 3A4EAD212A4FEB3C005435B3 /* ApplicationLibrary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A4EAD202A4FEB3C005435B3 /* ApplicationLibrary.swift */; }; 3A4EAD222A4FEB54005435B3 /* NavigationPage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AEC21742A45B0B800A63465 /* NavigationPage.swift */; }; @@ -48,8 +49,6 @@ 3A4EAD372A4FEC20005435B3 /* ApplicationLibrary.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3A4EAD102A4FEAE6005435B3 /* ApplicationLibrary.framework */; }; 3A4EAD3C2A4FECCE005435B3 /* NEVPNStatus+isConnected.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A4EAD3B2A4FECCE005435B3 /* NEVPNStatus+isConnected.swift */; }; 3A57DF372A4D5D2600690BC5 /* Profile+Date.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A57DF362A4D5D2600690BC5 /* Profile+Date.swift */; }; - 3A57DF3C2A4D705000690BC5 /* MacControlCenterUI in Frameworks */ = {isa = PBXBuildFile; productRef = 3A57DF3B2A4D705000690BC5 /* MacControlCenterUI */; }; - 3A57DF402A4D70B600690BC5 /* MenuView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A57DF3F2A4D70B600690BC5 /* MenuView.swift */; }; 3A57DF422A4D927A00690BC5 /* Profile+Hashable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A57DF412A4D927A00690BC5 /* Profile+Hashable.swift */; }; 3A5F26C82A503D4A00C27EDF /* Library.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3AEC211D2A459B4700A63465 /* Library.framework */; }; 3A5F26C92A503D4A00C27EDF /* Library.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3AEC211D2A459B4700A63465 /* Library.framework */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; @@ -60,9 +59,6 @@ 3A7701722A4E6B34008F031F /* Intents.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A7701712A4E6B34008F031F /* Intents.swift */; }; 3A7E90352A46756300D53052 /* SharedPreferences.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A7E90342A46756300D53052 /* SharedPreferences.swift */; }; 3A7E90382A46778E00D53052 /* BinaryCodable in Frameworks */ = {isa = PBXBuildFile; productRef = 3A7E90372A46778E00D53052 /* BinaryCodable */; }; - 3A8512122A5E8EF70076D233 /* Extension+Iterator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AF342AA2A4AA173002B34AC /* Extension+Iterator.swift */; }; - 3A8512132A5E8EF70076D233 /* ExtensionPlatformInterface.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AF342A62A4AA0FF002B34AC /* ExtensionPlatformInterface.swift */; }; - 3A8512142A5E8EF70076D233 /* Extension+RunBlocking.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AF342A82A4AA155002B34AC /* Extension+RunBlocking.swift */; }; 3A8655142A4FA26600B7181F /* IntentsExtension.appex in Embed ExtensionKit Extensions */ = {isa = PBXBuildFile; fileRef = 3A77016D2A4E6B34008F031F /* IntentsExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; 3A9108E42A511AE70088B196 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A9108E32A511AE70088B196 /* ContentView.swift */; }; 3A9144D92A46AE370036E9AD /* ShadredPreferences+Database.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A9144D82A46AE370036E9AD /* ShadredPreferences+Database.swift */; }; @@ -71,13 +67,18 @@ 3AC194492A50013F00BD8CB9 /* IntentsExtension.appex in Embed ExtensionKit Extensions */ = {isa = PBXBuildFile; fileRef = 3A77016D2A4E6B34008F031F /* IntentsExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; 3AC1944F2A50247300BD8CB9 /* ApplicationDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AC1944E2A50247300BD8CB9 /* ApplicationDelegate.swift */; }; 3AC194502A502DFE00BD8CB9 /* ServiceNotification.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AC1944C2A50206C00BD8CB9 /* ServiceNotification.swift */; }; - 3AC194522A50303300BD8CB9 /* ApplicationDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AC194512A50303300BD8CB9 /* ApplicationDelegate.swift */; }; 3AC5EC082A6417470077AF34 /* DeviceCensorship.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AC5EC072A6417470077AF34 /* DeviceCensorship.swift */; }; - 3ADF8DFB2A4AFDF500900CC8 /* MainView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AEC210D2A459B1900A63465 /* MainView.swift */; }; + 3AE4D0B22A6E2B6A009FEA9E /* ExtensionPlatformInterface.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AF342A62A4AA0FF002B34AC /* ExtensionPlatformInterface.swift */; }; + 3AE4D0B32A6E2B94009FEA9E /* Extension+RunBlocking.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AF342A82A4AA155002B34AC /* Extension+RunBlocking.swift */; }; + 3AE4D0B42A6E2BA3009FEA9E /* Extension+Iterator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AF342AA2A4AA173002B34AC /* Extension+Iterator.swift */; }; + 3AE4D0B52A6E2BAC009FEA9E /* ExtensionProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A096F892A4ED3DE00D4A2ED /* ExtensionProvider.swift */; }; + 3AE4D0B72A6E2C01009FEA9E /* PacketTunnelProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AE4D0B62A6E2C01009FEA9E /* PacketTunnelProvider.swift */; }; + 3AE4D0BD2A6E2DDC009FEA9E /* Library.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3AEC211D2A459B4700A63465 /* Library.framework */; }; + 3AE4D0BE2A6E2DDC009FEA9E /* Library.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3AEC211D2A459B4700A63465 /* Library.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 3AE4D0C12A6E4852009FEA9E /* InstallSystemExtensionButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AE4D0C02A6E4852009FEA9E /* InstallSystemExtensionButton.swift */; }; 3AEAEE992A4F16430059612D /* Extension.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = 3A096F862A4ED3DE00D4A2ED /* Extension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; 3AEC20F62A459AB400A63465 /* Application.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AEC20F52A459AB400A63465 /* Application.swift */; }; 3AEC20FA2A459AB500A63465 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 3AEC20F92A459AB500A63465 /* Assets.xcassets */; }; - 3AEC210C2A459B1900A63465 /* Application.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AEC210B2A459B1900A63465 /* Application.swift */; }; 3AEC21102A459B1A00A63465 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 3AEC210F2A459B1A00A63465 /* Assets.xcassets */; }; 3AEC212F2A459D5600A63465 /* Profile.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AEC212E2A459D5600A63465 /* Profile.swift */; }; 3AEC213C2A459FDF00A63465 /* Databse.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AEC213B2A459FDF00A63465 /* Databse.swift */; }; @@ -87,6 +88,26 @@ 3AEC21482A45A9DE00A63465 /* Bundle+Version.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AEC21472A45A9DE00A63465 /* Bundle+Version.swift */; }; 3AEC214A2A45AA5600A63465 /* Profile+RW.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AEC21492A45AA5600A63465 /* Profile+RW.swift */; }; 3AEC214C2A45AA8E00A63465 /* FilePath.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AEC214B2A45AA8E00A63465 /* FilePath.swift */; }; + 3AEC8A4F2A6E5E18003702E1 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 3AAB5E7A2A4C1446009757F1 /* Assets.xcassets */; }; + 3AEECBF22A6DF40A006A0E0C /* NetworkExtension.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3AF342B12A4AA520002B34AC /* NetworkExtension.framework */; }; + 3AEECBF52A6DF40A006A0E0C /* PacketTunnelProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AEECBF42A6DF40A006A0E0C /* PacketTunnelProvider.swift */; }; + 3AEECBF72A6DF40A006A0E0C /* main.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AEECBF62A6DF40A006A0E0C /* main.swift */; }; + 3AEECC072A6DF9CA006A0E0C /* Application.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AEECC062A6DF9CA006A0E0C /* Application.swift */; }; + 3AEECC0B2A6DF9CA006A0E0C /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 3AEECC0A2A6DF9CA006A0E0C /* Assets.xcassets */; }; + 3AEECC1A2A6DFA79006A0E0C /* io.nekohasekai.sfa.system.systemextension in Embed System Extensions */ = {isa = PBXBuildFile; fileRef = 3AEECBF12A6DF40A006A0E0C /* io.nekohasekai.sfa.system.systemextension */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; + 3AEECC1D2A6DFA79006A0E0C /* Library.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3AEC211D2A459B4700A63465 /* Library.framework */; }; + 3AEECC1E2A6DFA79006A0E0C /* Library.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3AEC211D2A459B4700A63465 /* Library.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 3AEECC352A6DFDAD006A0E0C /* MacLibrary.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3AEECC2F2A6DFDAD006A0E0C /* MacLibrary.framework */; }; + 3AEECC3A2A6DFDC5006A0E0C /* MacLibrary.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3AEECC2F2A6DFDAD006A0E0C /* MacLibrary.framework */; }; + 3AEECC3F2A6DFDF7006A0E0C /* MacLibrary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AEECC3E2A6DFDF7006A0E0C /* MacLibrary.swift */; }; + 3AEECC402A6DFE10006A0E0C /* ApplicationDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AC194512A50303300BD8CB9 /* ApplicationDelegate.swift */; }; + 3AEECC412A6DFE29006A0E0C /* MacLibrary.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3AEECC2F2A6DFDAD006A0E0C /* MacLibrary.framework */; }; + 3AEECC452A6DFE61006A0E0C /* ApplicationLibrary.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3A4EAD102A4FEAE6005435B3 /* ApplicationLibrary.framework */; }; + 3AEECC4A2A6DFEBB006A0E0C /* Application.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AEC210B2A459B1900A63465 /* Application.swift */; }; + 3AEECC4B2A6DFED7006A0E0C /* SidebarView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A1CF2F32A50E937000A8289 /* SidebarView.swift */; }; + 3AEECC4C2A6DFEF3006A0E0C /* MenuView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A57DF3F2A4D70B600690BC5 /* MenuView.swift */; }; + 3AEECC4E2A6DFF13006A0E0C /* MacControlCenterUI in Frameworks */ = {isa = PBXBuildFile; productRef = 3AEECC4D2A6DFF13006A0E0C /* MacControlCenterUI */; }; + 3AEECC4F2A6DFFE1006A0E0C /* MainView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AEC210D2A459B1900A63465 /* MainView.swift */; }; 3AF342A02A4A9916002B34AC /* ExtensionProfile.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AF3429F2A4A9916002B34AC /* ExtensionProfile.swift */; }; /* End PBXBuildFile section */ @@ -112,13 +133,6 @@ remoteGlobalIDString = 3A096F852A4ED3DE00D4A2ED; remoteInfo = Extension; }; - 3A4EAD142A4FEAE6005435B3 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 3AEC20BD2A45991900A63465 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 3A4EAD0F2A4FEAE6005435B3; - remoteInfo = ApplicationLibrary; - }; 3A4EAD1D2A4FEB02005435B3 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 3AEC20BD2A45991900A63465 /* Project object */; @@ -161,6 +175,13 @@ remoteGlobalIDString = 3A77016C2A4E6B34008F031F; remoteInfo = IntentsExtension; }; + 3AE4D0BA2A6E2C55009FEA9E /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 3AEC20BD2A45991900A63465 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 3AEC211C2A459B4700A63465; + remoteInfo = Library; + }; 3AEAEE9A2A4F16430059612D /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 3AEC20BD2A45991900A63465 /* Project object */; @@ -175,6 +196,48 @@ remoteGlobalIDString = 3AEC211C2A459B4700A63465; remoteInfo = Library; }; + 3AEECC1B2A6DFA79006A0E0C /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 3AEC20BD2A45991900A63465 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 3AEECBF02A6DF40A006A0E0C; + remoteInfo = SystemExtension; + }; + 3AEECC1F2A6DFA79006A0E0C /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 3AEC20BD2A45991900A63465 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 3AEC211C2A459B4700A63465; + remoteInfo = Library; + }; + 3AEECC332A6DFDAD006A0E0C /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 3AEC20BD2A45991900A63465 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 3AEECC2E2A6DFDAD006A0E0C; + remoteInfo = MacLibrary; + }; + 3AEECC3C2A6DFDC6006A0E0C /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 3AEC20BD2A45991900A63465 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 3AEECC2E2A6DFDAD006A0E0C; + remoteInfo = MacLibrary; + }; + 3AEECC422A6DFE29006A0E0C /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 3AEC20BD2A45991900A63465 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 3AEECC2E2A6DFDAD006A0E0C; + remoteInfo = MacLibrary; + }; + 3AEECC472A6DFE61006A0E0C /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 3AEC20BD2A45991900A63465 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 3A4EAD0F2A4FEAE6005435B3; + remoteInfo = ApplicationLibrary; + }; /* End PBXContainerItemProxy section */ /* Begin PBXCopyFilesBuildPhase section */ @@ -244,12 +307,35 @@ name = "Embed Frameworks"; runOnlyForDeploymentPostprocessing = 0; }; - 3ADB2DE02A4ABEF700FB9254 /* Embed System Extensions */ = { + 3AE4D0BF2A6E2DDC009FEA9E /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + 3AE4D0BE2A6E2DDC009FEA9E /* Library.framework in Embed Frameworks */, + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; + 3AEECC212A6DFA79006A0E0C /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + 3AEECC1E2A6DFA79006A0E0C /* Library.framework in Embed Frameworks */, + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; + 3AEECC232A6DFA79006A0E0C /* Embed System Extensions */ = { isa = PBXCopyFilesBuildPhase; buildActionMask = 2147483647; dstPath = "$(SYSTEM_EXTENSIONS_FOLDER_PATH)"; dstSubfolderSpec = 16; files = ( + 3AEECC1A2A6DFA79006A0E0C /* io.nekohasekai.sfa.system.systemextension in Embed System Extensions */, ); name = "Embed System Extensions"; runOnlyForDeploymentPostprocessing = 0; @@ -258,7 +344,7 @@ /* Begin PBXFileReference section */ 3A096F862A4ED3DE00D4A2ED /* Extension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = Extension.appex; sourceTree = BUILT_PRODUCTS_DIR; }; - 3A096F892A4ED3DE00D4A2ED /* PacketTunnelProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PacketTunnelProvider.swift; sourceTree = ""; }; + 3A096F892A4ED3DE00D4A2ED /* ExtensionProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExtensionProvider.swift; sourceTree = ""; }; 3A096F8B2A4ED3DE00D4A2ED /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 3A096F8C2A4ED3DE00D4A2ED /* Extension.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Extension.entitlements; sourceTree = ""; }; 3A1CF2EF2A50E5EE000A8289 /* GroupListView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GroupListView.swift; sourceTree = ""; }; @@ -267,6 +353,10 @@ 3A1CF2F52A50EE9C000A8289 /* GroupView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GroupView.swift; sourceTree = ""; }; 3A1CF2F72A50F0A5000A8289 /* GroupItemView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GroupItemView.swift; sourceTree = ""; }; 3A1CF2F92A50F0BD000A8289 /* OutboundGroupItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OutboundGroupItem.swift; sourceTree = ""; }; + 3A2223532A6E1B6700C50B23 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 3A2223552A6E1BDE00C50B23 /* Variant.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Variant.swift; sourceTree = ""; }; + 3A2223572A6E1CC700C50B23 /* MacApplication.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MacApplication.swift; sourceTree = ""; }; + 3A2223592A6E212A00C50B23 /* SystemExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SystemExtension.swift; sourceTree = ""; }; 3A3DEBE12A4FFA1A00373BF4 /* ExtensionFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ExtensionFoundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.0.sdk/System/Library/Frameworks/ExtensionFoundation.framework; sourceTree = DEVELOPER_DIR; }; 3A3DEBE62A4FFA6000373BF4 /* AppIntents.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppIntents.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.0.sdk/System/Library/Frameworks/AppIntents.framework; sourceTree = DEVELOPER_DIR; }; 3A44BB662A4DBF7900E4C9F8 /* SFI.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = SFI.entitlements; sourceTree = ""; }; @@ -308,6 +398,8 @@ 3ADF8DFC2A4B096000900CC8 /* EditProfileWindowView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EditProfileWindowView.swift; sourceTree = ""; }; 3ADF8E002A4B0F6300900CC8 /* EditProfileView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EditProfileView.swift; sourceTree = ""; }; 3ADF8E022A4B118700900CC8 /* Binding+Unwrap.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Binding+Unwrap.swift"; sourceTree = ""; }; + 3AE4D0B62A6E2C01009FEA9E /* PacketTunnelProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PacketTunnelProvider.swift; sourceTree = ""; }; + 3AE4D0C02A6E4852009FEA9E /* InstallSystemExtensionButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InstallSystemExtensionButton.swift; sourceTree = ""; }; 3AEAEE9C2A4F1A9D0059612D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 3AEC20DB2A4599D000A63465 /* Libbox.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; path = Libbox.xcframework; sourceTree = ""; }; 3AEC20F32A459AB400A63465 /* sing-box.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "sing-box.app"; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -329,6 +421,17 @@ 3AEC214B2A45AA8E00A63465 /* FilePath.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FilePath.swift; sourceTree = ""; }; 3AEC21742A45B0B800A63465 /* NavigationPage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NavigationPage.swift; sourceTree = ""; }; 3AEC21782A45BA5300A63465 /* EnvironmentValues.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnvironmentValues.swift; sourceTree = ""; }; + 3AEECBF12A6DF40A006A0E0C /* io.nekohasekai.sfa.system.systemextension */ = {isa = PBXFileReference; explicitFileType = "wrapper.system-extension"; includeInIndex = 0; path = io.nekohasekai.sfa.system.systemextension; sourceTree = BUILT_PRODUCTS_DIR; }; + 3AEECBF42A6DF40A006A0E0C /* PacketTunnelProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PacketTunnelProvider.swift; sourceTree = ""; }; + 3AEECBF62A6DF40A006A0E0C /* main.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = main.swift; sourceTree = ""; }; + 3AEECBF82A6DF40A006A0E0C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 3AEECBF92A6DF40A006A0E0C /* SystemExtension.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = SystemExtension.entitlements; sourceTree = ""; }; + 3AEECC042A6DF9CA006A0E0C /* SFM.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SFM.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 3AEECC062A6DF9CA006A0E0C /* Application.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Application.swift; sourceTree = ""; }; + 3AEECC0A2A6DF9CA006A0E0C /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 3AEECC2F2A6DFDAD006A0E0C /* MacLibrary.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = MacLibrary.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 3AEECC3E2A6DFDF7006A0E0C /* MacLibrary.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MacLibrary.swift; sourceTree = ""; }; + 3AEECC502A6E0074006A0E0C /* SFM.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = SFM.entitlements; sourceTree = ""; }; 3AF3429F2A4A9916002B34AC /* ExtensionProfile.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExtensionProfile.swift; sourceTree = ""; }; 3AF342A22A4A9B9B002B34AC /* InstallProfileButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InstallProfileButton.swift; sourceTree = ""; }; 3AF342A62A4AA0FF002B34AC /* ExtensionPlatformInterface.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExtensionPlatformInterface.swift; sourceTree = ""; }; @@ -381,8 +484,8 @@ buildActionMask = 2147483647; files = ( 3A5F26C82A503D4A00C27EDF /* Library.framework in Frameworks */, - 3A4EAD162A4FEAE6005435B3 /* ApplicationLibrary.framework in Frameworks */, - 3A57DF3C2A4D705000690BC5 /* MacControlCenterUI in Frameworks */, + 3AEECC352A6DFDAD006A0E0C /* MacLibrary.framework in Frameworks */, + 3AEECC412A6DFE29006A0E0C /* MacLibrary.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -396,18 +499,42 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 3AEECBEE2A6DF40A006A0E0C /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 3AE4D0BD2A6E2DDC009FEA9E /* Library.framework in Frameworks */, + 3AEECBF22A6DF40A006A0E0C /* NetworkExtension.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 3AEECC012A6DF9CA006A0E0C /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 3AEECC1D2A6DFA79006A0E0C /* Library.framework in Frameworks */, + 3AEECC3A2A6DFDC5006A0E0C /* MacLibrary.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 3AEECC2C2A6DFDAD006A0E0C /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 3AEECC452A6DFE61006A0E0C /* ApplicationLibrary.framework in Frameworks */, + 3AEECC4E2A6DFF13006A0E0C /* MacControlCenterUI in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ 3A096F882A4ED3DE00D4A2ED /* Extension */ = { isa = PBXGroup; children = ( - 3AF342A62A4AA0FF002B34AC /* ExtensionPlatformInterface.swift */, - 3AF342A82A4AA155002B34AC /* Extension+RunBlocking.swift */, - 3AF342AA2A4AA173002B34AC /* Extension+Iterator.swift */, - 3A096F892A4ED3DE00D4A2ED /* PacketTunnelProvider.swift */, 3A096F8B2A4ED3DE00D4A2ED /* Info.plist */, 3A096F8C2A4ED3DE00D4A2ED /* Extension.entitlements */, + 3AE4D0B62A6E2C01009FEA9E /* PacketTunnelProvider.swift */, ); path = Extension; sourceTree = ""; @@ -491,10 +618,13 @@ 3AEC20DB2A4599D000A63465 /* Libbox.xcframework */, 3AEC20F42A459AB400A63465 /* SFI */, 3AEC210A2A459B1900A63465 /* SFM */, + 3AEECC052A6DF9CA006A0E0C /* SFM.System */, 3AEC211E2A459B4700A63465 /* Library */, - 3A77016E2A4E6B34008F031F /* IntentsExtension */, - 3A096F882A4ED3DE00D4A2ED /* Extension */, 3A4EAD112A4FEAE6005435B3 /* ApplicationLibrary */, + 3AEECC302A6DFDAD006A0E0C /* MacLibrary */, + 3A096F882A4ED3DE00D4A2ED /* Extension */, + 3AEECBF32A6DF40A006A0E0C /* SystemExtension */, + 3A77016E2A4E6B34008F031F /* IntentsExtension */, 3AEC20C72A45991900A63465 /* Products */, 3AEC21012A459AE300A63465 /* Frameworks */, ); @@ -509,6 +639,9 @@ 3A77016D2A4E6B34008F031F /* IntentsExtension.appex */, 3A096F862A4ED3DE00D4A2ED /* Extension.appex */, 3A4EAD102A4FEAE6005435B3 /* ApplicationLibrary.framework */, + 3AEECBF12A6DF40A006A0E0C /* io.nekohasekai.sfa.system.systemextension */, + 3AEECC042A6DF9CA006A0E0C /* SFM.app */, + 3AEECC2F2A6DFDAD006A0E0C /* MacLibrary.framework */, ); name = Products; sourceTree = ""; @@ -541,14 +674,10 @@ 3AEC210A2A459B1900A63465 /* SFM */ = { isa = PBXGroup; children = ( - 3AEC210D2A459B1900A63465 /* MainView.swift */, 3AEC210B2A459B1900A63465 /* Application.swift */, 3AEC210F2A459B1A00A63465 /* Assets.xcassets */, 3AEC21142A459B1A00A63465 /* SFM.entitlements */, - 3A57DF3F2A4D70B600690BC5 /* MenuView.swift */, 3AEAEE9C2A4F1A9D0059612D /* Info.plist */, - 3AC194512A50303300BD8CB9 /* ApplicationDelegate.swift */, - 3A1CF2F32A50E937000A8289 /* SidebarView.swift */, ); path = SFM; sourceTree = ""; @@ -583,9 +712,14 @@ 3AEC21432A45A92B00A63465 /* Network */ = { isa = PBXGroup; children = ( + 3A096F892A4ED3DE00D4A2ED /* ExtensionProvider.swift */, + 3AF342AA2A4AA173002B34AC /* Extension+Iterator.swift */, + 3AF342A82A4AA155002B34AC /* Extension+RunBlocking.swift */, 3AEC21442A45A93800A63465 /* HTTPClient.swift */, 3AF3429F2A4A9916002B34AC /* ExtensionProfile.swift */, 3A4EAD3B2A4FECCE005435B3 /* NEVPNStatus+isConnected.swift */, + 3A2223592A6E212A00C50B23 /* SystemExtension.swift */, + 3AF342A62A4AA0FF002B34AC /* ExtensionPlatformInterface.swift */, ); path = Network; sourceTree = ""; @@ -596,6 +730,7 @@ 3AC1944C2A50206C00BD8CB9 /* ServiceNotification.swift */, 3AEC21472A45A9DE00A63465 /* Bundle+Version.swift */, 3AEC214B2A45AA8E00A63465 /* FilePath.swift */, + 3A2223552A6E1BDE00C50B23 /* Variant.swift */, ); path = Shared; sourceTree = ""; @@ -615,6 +750,41 @@ path = Views; sourceTree = ""; }; + 3AEECBF32A6DF40A006A0E0C /* SystemExtension */ = { + isa = PBXGroup; + children = ( + 3AEECBF42A6DF40A006A0E0C /* PacketTunnelProvider.swift */, + 3AEECBF62A6DF40A006A0E0C /* main.swift */, + 3AEECBF82A6DF40A006A0E0C /* Info.plist */, + 3AEECBF92A6DF40A006A0E0C /* SystemExtension.entitlements */, + ); + path = SystemExtension; + sourceTree = ""; + }; + 3AEECC052A6DF9CA006A0E0C /* SFM.System */ = { + isa = PBXGroup; + children = ( + 3AEECC062A6DF9CA006A0E0C /* Application.swift */, + 3AEECC0A2A6DF9CA006A0E0C /* Assets.xcassets */, + 3AEECC502A6E0074006A0E0C /* SFM.entitlements */, + 3A2223532A6E1B6700C50B23 /* Info.plist */, + ); + path = SFM.System; + sourceTree = ""; + }; + 3AEECC302A6DFDAD006A0E0C /* MacLibrary */ = { + isa = PBXGroup; + children = ( + 3AEC210D2A459B1900A63465 /* MainView.swift */, + 3A57DF3F2A4D70B600690BC5 /* MenuView.swift */, + 3A1CF2F32A50E937000A8289 /* SidebarView.swift */, + 3AEECC3E2A6DFDF7006A0E0C /* MacLibrary.swift */, + 3AC194512A50303300BD8CB9 /* ApplicationDelegate.swift */, + 3A2223572A6E1CC700C50B23 /* MacApplication.swift */, + ); + path = MacLibrary; + sourceTree = ""; + }; 3AF342A12A4A9B8D002B34AC /* Dashboard */ = { isa = PBXGroup; children = ( @@ -623,6 +793,7 @@ 3ADF8DF12A4AF59900900CC8 /* ActiveDashboardView.swift */, 3AF342CC2A4AA88C002B34AC /* StartStopButton.swift */, 3ADF8DF32A4AF9B500900CC8 /* DashboardView.swift */, + 3AE4D0C02A6E4852009FEA9E /* InstallSystemExtensionButton.swift */, ); path = Dashboard; sourceTree = ""; @@ -655,6 +826,13 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 3AEECC2A2A6DFDAD006A0E0C /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ @@ -745,7 +923,6 @@ 3AEC21052A459B1900A63465 /* Sources */, 3AEC21062A459B1900A63465 /* Frameworks */, 3AEC21072A459B1900A63465 /* Resources */, - 3ADB2DE02A4ABEF700FB9254 /* Embed System Extensions */, 3A096F762A4ED1A600D4A2ED /* Embed Foundation Extensions */, 3A8655132A4FA25C00B7181F /* Embed ExtensionKit Extensions */, 3A5F26CA2A503D4B00C27EDF /* Embed Frameworks */, @@ -755,12 +932,12 @@ dependencies = ( 3A096F7E2A4ED1AD00D4A2ED /* PBXTargetDependency */, 3A096F8E2A4ED3DE00D4A2ED /* PBXTargetDependency */, - 3A4EAD152A4FEAE6005435B3 /* PBXTargetDependency */, 3AC1944B2A50014000BD8CB9 /* PBXTargetDependency */, + 3AEECC342A6DFDAD006A0E0C /* PBXTargetDependency */, + 3AEECC432A6DFE29006A0E0C /* PBXTargetDependency */, ); name = SFM; packageProductDependencies = ( - 3A57DF3B2A4D705000690BC5 /* MacControlCenterUI */, ); productName = SFM; productReference = 3AEC21092A459B1900A63465 /* sing-box.app */; @@ -788,6 +965,71 @@ productReference = 3AEC211D2A459B4700A63465 /* Library.framework */; productType = "com.apple.product-type.framework"; }; + 3AEECBF02A6DF40A006A0E0C /* SystemExtension */ = { + isa = PBXNativeTarget; + buildConfigurationList = 3AEECBFF2A6DF40A006A0E0C /* Build configuration list for PBXNativeTarget "SystemExtension" */; + buildPhases = ( + 3AEECBED2A6DF40A006A0E0C /* Sources */, + 3AEECBEE2A6DF40A006A0E0C /* Frameworks */, + 3AEECBEF2A6DF40A006A0E0C /* Resources */, + 3AE4D0BF2A6E2DDC009FEA9E /* Embed Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + 3AE4D0BB2A6E2C55009FEA9E /* PBXTargetDependency */, + ); + name = SystemExtension; + productName = SystemExtension; + productReference = 3AEECBF12A6DF40A006A0E0C /* io.nekohasekai.sfa.system.systemextension */; + productType = "com.apple.product-type.system-extension"; + }; + 3AEECC032A6DF9CA006A0E0C /* SFM.System */ = { + isa = PBXNativeTarget; + buildConfigurationList = 3AEECC102A6DF9CA006A0E0C /* Build configuration list for PBXNativeTarget "SFM.System" */; + buildPhases = ( + 3AEECC002A6DF9CA006A0E0C /* Sources */, + 3AEECC012A6DF9CA006A0E0C /* Frameworks */, + 3AEECC022A6DF9CA006A0E0C /* Resources */, + 3AEECC212A6DFA79006A0E0C /* Embed Frameworks */, + 3AEECC232A6DFA79006A0E0C /* Embed System Extensions */, + ); + buildRules = ( + ); + dependencies = ( + 3AEECC1C2A6DFA79006A0E0C /* PBXTargetDependency */, + 3AEECC202A6DFA79006A0E0C /* PBXTargetDependency */, + 3AEECC3D2A6DFDC6006A0E0C /* PBXTargetDependency */, + ); + name = SFM.System; + packageProductDependencies = ( + ); + productName = SFM.System; + productReference = 3AEECC042A6DF9CA006A0E0C /* SFM.app */; + productType = "com.apple.product-type.application"; + }; + 3AEECC2E2A6DFDAD006A0E0C /* MacLibrary */ = { + isa = PBXNativeTarget; + buildConfigurationList = 3AEECC372A6DFDAD006A0E0C /* Build configuration list for PBXNativeTarget "MacLibrary" */; + buildPhases = ( + 3AEECC2A2A6DFDAD006A0E0C /* Headers */, + 3AEECC2B2A6DFDAD006A0E0C /* Sources */, + 3AEECC2C2A6DFDAD006A0E0C /* Frameworks */, + 3AEECC2D2A6DFDAD006A0E0C /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 3AEECC482A6DFE61006A0E0C /* PBXTargetDependency */, + ); + name = MacLibrary; + packageProductDependencies = ( + 3AEECC4D2A6DFF13006A0E0C /* MacControlCenterUI */, + ); + productName = MacLibrary; + productReference = 3AEECC2F2A6DFDAD006A0E0C /* MacLibrary.framework */; + productType = "com.apple.product-type.framework"; + }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ @@ -800,6 +1042,7 @@ TargetAttributes = { 3A096F852A4ED3DE00D4A2ED = { CreatedOnToolsVersion = 15.0; + LastSwiftMigration = 1430; }; 3A4EAD0F2A4FEAE6005435B3 = { CreatedOnToolsVersion = 15.0; @@ -818,6 +1061,16 @@ CreatedOnToolsVersion = 15.0; LastSwiftMigration = 1500; }; + 3AEECBF02A6DF40A006A0E0C = { + CreatedOnToolsVersion = 14.3.1; + }; + 3AEECC032A6DF9CA006A0E0C = { + CreatedOnToolsVersion = 14.3.1; + }; + 3AEECC2E2A6DFDAD006A0E0C = { + CreatedOnToolsVersion = 14.3.1; + LastSwiftMigration = 1430; + }; }; }; buildConfigurationList = 3AEC20C02A45991900A63465 /* Build configuration list for PBXProject "sing-box" */; @@ -841,10 +1094,13 @@ targets = ( 3AEC20F22A459AB400A63465 /* SFI */, 3AEC21082A459B1900A63465 /* SFM */, + 3AEECC032A6DF9CA006A0E0C /* SFM.System */, 3AEC211C2A459B4700A63465 /* Library */, - 3A77016C2A4E6B34008F031F /* IntentsExtension */, - 3A096F852A4ED3DE00D4A2ED /* Extension */, 3A4EAD0F2A4FEAE6005435B3 /* ApplicationLibrary */, + 3AEECC2E2A6DFDAD006A0E0C /* MacLibrary */, + 3A096F852A4ED3DE00D4A2ED /* Extension */, + 3AEECBF02A6DF40A006A0E0C /* SystemExtension */, + 3A77016C2A4E6B34008F031F /* IntentsExtension */, ); }; /* End PBXProject section */ @@ -881,6 +1137,30 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 3AEECBEF2A6DF40A006A0E0C /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 3AEECC022A6DF9CA006A0E0C /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 3AEC8A4F2A6E5E18003702E1 /* Assets.xcassets in Resources */, + 3A2223542A6E1B6700C50B23 /* Info.plist in Resources */, + 3AEECC0B2A6DF9CA006A0E0C /* Assets.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 3AEECC2D2A6DFDAD006A0E0C /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -888,10 +1168,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 3A8512142A5E8EF70076D233 /* Extension+RunBlocking.swift in Sources */, - 3A096F8A2A4ED3DE00D4A2ED /* PacketTunnelProvider.swift in Sources */, - 3A8512132A5E8EF70076D233 /* ExtensionPlatformInterface.swift in Sources */, - 3A8512122A5E8EF70076D233 /* Extension+Iterator.swift in Sources */, + 3AE4D0B72A6E2C01009FEA9E /* PacketTunnelProvider.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -907,6 +1184,7 @@ 3A4EAD292A4FEB6D005435B3 /* Formtem.swift in Sources */, 3A4EAD302A4FEB77005435B3 /* NewProfileView.swift in Sources */, 3A4EAD242A4FEB65005435B3 /* InstallProfileButton.swift in Sources */, + 3AE4D0C12A6E4852009FEA9E /* InstallSystemExtensionButton.swift in Sources */, 3A4EAD232A4FEB5A005435B3 /* EnvironmentValues.swift in Sources */, 3A4EAD282A4FEB65005435B3 /* ActiveDashboardView.swift in Sources */, 3A1CF2F02A50E5EE000A8289 /* GroupListView.swift in Sources */, @@ -954,11 +1232,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 3AEC210C2A459B1900A63465 /* Application.swift in Sources */, - 3A57DF402A4D70B600690BC5 /* MenuView.swift in Sources */, - 3A1CF2F42A50E937000A8289 /* SidebarView.swift in Sources */, - 3ADF8DFB2A4AFDF500900CC8 /* MainView.swift in Sources */, - 3AC194522A50303300BD8CB9 /* ApplicationDelegate.swift in Sources */, + 3AEECC4A2A6DFEBB006A0E0C /* Application.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -966,9 +1240,12 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 3AE4D0B52A6E2BAC009FEA9E /* ExtensionProvider.swift in Sources */, + 3A2223562A6E1BDE00C50B23 /* Variant.swift in Sources */, 3AEC214A2A45AA5600A63465 /* Profile+RW.swift in Sources */, 3A57DF422A4D927A00690BC5 /* Profile+Hashable.swift in Sources */, 3A7E90352A46756300D53052 /* SharedPreferences.swift in Sources */, + 3AE4D0B32A6E2B94009FEA9E /* Extension+RunBlocking.swift in Sources */, 3AEC21482A45A9DE00A63465 /* Bundle+Version.swift in Sources */, 3A57DF372A4D5D2600690BC5 /* Profile+Date.swift in Sources */, 3AEC212F2A459D5600A63465 /* Profile.swift in Sources */, @@ -977,14 +1254,47 @@ 3AEC213C2A459FDF00A63465 /* Databse.swift in Sources */, 3A4EAD3C2A4FECCE005435B3 /* NEVPNStatus+isConnected.swift in Sources */, 3AEC21422A45A8FF00A63465 /* Profile+Update.swift in Sources */, + 3A22235A2A6E212A00C50B23 /* SystemExtension.swift in Sources */, + 3AE4D0B42A6E2BA3009FEA9E /* Extension+Iterator.swift in Sources */, 3AEC214C2A45AA8E00A63465 /* FilePath.swift in Sources */, 3AC194502A502DFE00BD8CB9 /* ServiceNotification.swift in Sources */, + 3AE4D0B22A6E2B6A009FEA9E /* ExtensionPlatformInterface.swift in Sources */, 3AEC21402A45A28F00A63465 /* ProfileManager.swift in Sources */, 3A9144D92A46AE370036E9AD /* ShadredPreferences+Database.swift in Sources */, 3AF342A02A4A9916002B34AC /* ExtensionProfile.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; + 3AEECBED2A6DF40A006A0E0C /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 3AEECBF72A6DF40A006A0E0C /* main.swift in Sources */, + 3AEECBF52A6DF40A006A0E0C /* PacketTunnelProvider.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 3AEECC002A6DF9CA006A0E0C /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 3AEECC072A6DF9CA006A0E0C /* Application.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 3AEECC2B2A6DFDAD006A0E0C /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 3AEECC3F2A6DFDF7006A0E0C /* MacLibrary.swift in Sources */, + 3AEECC4C2A6DFEF3006A0E0C /* MenuView.swift in Sources */, + 3A2223582A6E1CC700C50B23 /* MacApplication.swift in Sources */, + 3AEECC402A6DFE10006A0E0C /* ApplicationDelegate.swift in Sources */, + 3AEECC4F2A6DFFE1006A0E0C /* MainView.swift in Sources */, + 3AEECC4B2A6DFED7006A0E0C /* SidebarView.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ @@ -1003,11 +1313,6 @@ target = 3A096F852A4ED3DE00D4A2ED /* Extension */; targetProxy = 3A44BB7E2A4DC1D800E4C9F8 /* PBXContainerItemProxy */; }; - 3A4EAD152A4FEAE6005435B3 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 3A4EAD0F2A4FEAE6005435B3 /* ApplicationLibrary */; - targetProxy = 3A4EAD142A4FEAE6005435B3 /* PBXContainerItemProxy */; - }; 3A4EAD1E2A4FEB02005435B3 /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = 3AEC211C2A459B4700A63465 /* Library */; @@ -1038,6 +1343,11 @@ target = 3A77016C2A4E6B34008F031F /* IntentsExtension */; targetProxy = 3AC1944A2A50014000BD8CB9 /* PBXContainerItemProxy */; }; + 3AE4D0BB2A6E2C55009FEA9E /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 3AEC211C2A459B4700A63465 /* Library */; + targetProxy = 3AE4D0BA2A6E2C55009FEA9E /* PBXContainerItemProxy */; + }; 3AEAEE9B2A4F16430059612D /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = 3A096F852A4ED3DE00D4A2ED /* Extension */; @@ -1048,12 +1358,43 @@ target = 3AEC211C2A459B4700A63465 /* Library */; targetProxy = 3AEC21372A459E0A00A63465 /* PBXContainerItemProxy */; }; + 3AEECC1C2A6DFA79006A0E0C /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 3AEECBF02A6DF40A006A0E0C /* SystemExtension */; + targetProxy = 3AEECC1B2A6DFA79006A0E0C /* PBXContainerItemProxy */; + }; + 3AEECC202A6DFA79006A0E0C /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 3AEC211C2A459B4700A63465 /* Library */; + targetProxy = 3AEECC1F2A6DFA79006A0E0C /* PBXContainerItemProxy */; + }; + 3AEECC342A6DFDAD006A0E0C /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 3AEECC2E2A6DFDAD006A0E0C /* MacLibrary */; + targetProxy = 3AEECC332A6DFDAD006A0E0C /* PBXContainerItemProxy */; + }; + 3AEECC3D2A6DFDC6006A0E0C /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 3AEECC2E2A6DFDAD006A0E0C /* MacLibrary */; + targetProxy = 3AEECC3C2A6DFDC6006A0E0C /* PBXContainerItemProxy */; + }; + 3AEECC432A6DFE29006A0E0C /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 3AEECC2E2A6DFDAD006A0E0C /* MacLibrary */; + targetProxy = 3AEECC422A6DFE29006A0E0C /* PBXContainerItemProxy */; + }; + 3AEECC482A6DFE61006A0E0C /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 3A4EAD0F2A4FEAE6005435B3 /* ApplicationLibrary */; + targetProxy = 3AEECC472A6DFE61006A0E0C /* PBXContainerItemProxy */; + }; /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ 3A096F912A4ED3DE00D4A2ED /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Extension/Extension.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; @@ -1083,6 +1424,7 @@ SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO; SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; }; @@ -1091,6 +1433,7 @@ 3A096F922A4ED3DE00D4A2ED /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Extension/Extension.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; @@ -1131,10 +1474,10 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development"; - CODE_SIGN_STYLE = Automatic; + CODE_SIGN_STYLE = Manual; CURRENT_PROJECT_VERSION = 1; DEFINES_MODULE = YES; - DEVELOPMENT_TEAM = Z56Z6NYZN2; + DEVELOPMENT_TEAM = ""; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; @@ -1154,6 +1497,7 @@ MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu17 gnu++20"; PRODUCT_BUNDLE_IDENTIFIER = io.nekohasekai.sfa.application; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + PROVISIONING_PROFILE_SPECIFIER = ""; SDKROOT = iphoneos; SKIP_INSTALL = YES; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx"; @@ -1170,10 +1514,10 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development"; - CODE_SIGN_STYLE = Automatic; + CODE_SIGN_STYLE = Manual; CURRENT_PROJECT_VERSION = 1; DEFINES_MODULE = YES; - DEVELOPMENT_TEAM = Z56Z6NYZN2; + DEVELOPMENT_TEAM = ""; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; @@ -1193,6 +1537,7 @@ MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu17 gnu++20"; PRODUCT_BUNDLE_IDENTIFIER = io.nekohasekai.sfa.application; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + PROVISIONING_PROFILE_SPECIFIER = ""; SDKROOT = iphoneos; SKIP_INSTALL = YES; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx"; @@ -1415,7 +1760,7 @@ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; - ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES; + ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = NO; CODE_SIGN_ENTITLEMENTS = SFI/SFI.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; @@ -1437,7 +1782,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.3.2; + MARKETING_VERSION = 1.3.3; OTHER_CODE_SIGN_FLAGS = "--deep"; OTHER_LDFLAGS = ""; PRODUCT_BUNDLE_IDENTIFIER = io.nekohasekai.sfa; @@ -1456,7 +1801,7 @@ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; - ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES; + ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = NO; CODE_SIGN_ENTITLEMENTS = SFI/SFI.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; @@ -1478,7 +1823,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.3.2; + MARKETING_VERSION = 1.3.3; OTHER_CODE_SIGN_FLAGS = "--deep"; OTHER_LDFLAGS = ""; PRODUCT_BUNDLE_IDENTIFIER = io.nekohasekai.sfa; @@ -1502,7 +1847,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 10; + CURRENT_PROJECT_VERSION = 11; DEAD_CODE_STRIPPING = YES; DEVELOPMENT_TEAM = Z56Z6NYZN2; ENABLE_HARDENED_RUNTIME = YES; @@ -1518,7 +1863,7 @@ "@executable_path/../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 13.0; - MARKETING_VERSION = 1.3.2; + MARKETING_VERSION = 1.3.3; OTHER_CODE_SIGN_FLAGS = ""; PRODUCT_BUNDLE_IDENTIFIER = io.nekohasekai.sfa; PRODUCT_NAME = "sing-box"; @@ -1540,7 +1885,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 10; + CURRENT_PROJECT_VERSION = 11; DEAD_CODE_STRIPPING = YES; DEVELOPMENT_TEAM = Z56Z6NYZN2; ENABLE_HARDENED_RUNTIME = YES; @@ -1556,7 +1901,7 @@ "@executable_path/../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 13.0; - MARKETING_VERSION = 1.3.2; + MARKETING_VERSION = 1.3.3; OTHER_CODE_SIGN_FLAGS = ""; PRODUCT_BUNDLE_IDENTIFIER = io.nekohasekai.sfa; PRODUCT_NAME = "sing-box"; @@ -1671,6 +2016,233 @@ }; name = Release; }; + 3AEECBFD2A6DF40A006A0E0C /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_ENTITLEMENTS = SystemExtension/SystemExtension.entitlements; + CODE_SIGN_IDENTITY = "Apple Development"; + "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Developer ID Application"; + CODE_SIGN_STYLE = Manual; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = ""; + "DEVELOPMENT_TEAM[sdk=macosx*]" = Z56Z6NYZN2; + ENABLE_HARDENED_RUNTIME = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = SystemExtension/Info.plist; + INFOPLIST_KEY_CFBundleDisplayName = SystemExtension; + INFOPLIST_KEY_NSHumanReadableCopyright = ""; + INFOPLIST_KEY_NSSystemExtensionUsageDescription = ""; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + "@executable_path/../../../../Frameworks", + ); + MACOSX_DEPLOYMENT_TARGET = 13.0; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = io.nekohasekai.sfa.system; + PRODUCT_NAME = "$(inherited)"; + PROVISIONING_PROFILE_SPECIFIER = ""; + "PROVISIONING_PROFILE_SPECIFIER[sdk=macosx*]" = "XC io nekohasekai sfa"; + SDKROOT = macosx; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + }; + name = Debug; + }; + 3AEECBFE2A6DF40A006A0E0C /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_ENTITLEMENTS = SystemExtension/SystemExtension.entitlements; + CODE_SIGN_IDENTITY = "Apple Development"; + "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Developer ID Application"; + CODE_SIGN_STYLE = Manual; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = ""; + "DEVELOPMENT_TEAM[sdk=macosx*]" = Z56Z6NYZN2; + ENABLE_HARDENED_RUNTIME = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = SystemExtension/Info.plist; + INFOPLIST_KEY_CFBundleDisplayName = SystemExtension; + INFOPLIST_KEY_NSHumanReadableCopyright = ""; + INFOPLIST_KEY_NSSystemExtensionUsageDescription = ""; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + "@executable_path/../../../../Frameworks", + ); + MACOSX_DEPLOYMENT_TARGET = 13.0; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = io.nekohasekai.sfa.system; + PRODUCT_NAME = "$(inherited)"; + PROVISIONING_PROFILE_SPECIFIER = ""; + "PROVISIONING_PROFILE_SPECIFIER[sdk=macosx*]" = "XC io nekohasekai sfa"; + SDKROOT = macosx; + SKIP_INSTALL = YES; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + SWIFT_VERSION = 5.0; + }; + name = Release; + }; + 3AEECC112A6DF9CA006A0E0C /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = NO; + CODE_SIGN_ENTITLEMENTS = SFM.System/SFM.entitlements; + CODE_SIGN_IDENTITY = "Apple Development"; + "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Developer ID Application"; + CODE_SIGN_STYLE = Manual; + COMBINE_HIDPI_IMAGES = YES; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = ""; + "DEVELOPMENT_TEAM[sdk=macosx*]" = Z56Z6NYZN2; + ENABLE_HARDENED_RUNTIME = YES; + ENABLE_PREVIEWS = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = SFM.System/Info.plist; + INFOPLIST_KEY_CFBundleDisplayName = "sing-box"; + INFOPLIST_KEY_NSHumanReadableCopyright = ""; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + MACOSX_DEPLOYMENT_TARGET = 13.0; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = io.nekohasekai.sfa.independent; + PRODUCT_NAME = SFM; + PROVISIONING_PROFILE_SPECIFIER = ""; + "PROVISIONING_PROFILE_SPECIFIER[sdk=macosx*]" = "XC io nekohasekai sfa independent"; + SDKROOT = macosx; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + }; + name = Debug; + }; + 3AEECC122A6DF9CA006A0E0C /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = NO; + CODE_SIGN_ENTITLEMENTS = SFM.System/SFM.entitlements; + CODE_SIGN_IDENTITY = "Apple Development"; + "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Developer ID Application"; + CODE_SIGN_STYLE = Manual; + COMBINE_HIDPI_IMAGES = YES; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = ""; + "DEVELOPMENT_TEAM[sdk=macosx*]" = Z56Z6NYZN2; + ENABLE_HARDENED_RUNTIME = YES; + ENABLE_PREVIEWS = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = SFM.System/Info.plist; + INFOPLIST_KEY_CFBundleDisplayName = "sing-box"; + INFOPLIST_KEY_NSHumanReadableCopyright = ""; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + MACOSX_DEPLOYMENT_TARGET = 13.0; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = io.nekohasekai.sfa.independent; + PRODUCT_NAME = SFM; + PROVISIONING_PROFILE_SPECIFIER = ""; + "PROVISIONING_PROFILE_SPECIFIER[sdk=macosx*]" = "XC io nekohasekai sfa independent"; + SDKROOT = macosx; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + SWIFT_VERSION = 5.0; + }; + name = Release; + }; + 3AEECC382A6DFDAD006A0E0C /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_IDENTITY = "Apple Development"; + CODE_SIGN_STYLE = Manual; + COMBINE_HIDPI_IMAGES = YES; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = ""; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_MODULE_VERIFIER = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_KEY_NSHumanReadableCopyright = ""; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + "@loader_path/Frameworks", + ); + MACH_O_TYPE = staticlib; + MACOSX_DEPLOYMENT_TARGET = 13.0; + MARKETING_VERSION = 1.0; + MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++"; + MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu11 gnu++20"; + PRODUCT_BUNDLE_IDENTIFIER = org.sagernet.sfa.macapp; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + PROVISIONING_PROFILE_SPECIFIER = ""; + SDKROOT = macosx; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + }; + name = Debug; + }; + 3AEECC392A6DFDAD006A0E0C /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_IDENTITY = "Apple Development"; + CODE_SIGN_STYLE = Manual; + COMBINE_HIDPI_IMAGES = YES; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = ""; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_MODULE_VERIFIER = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_KEY_NSHumanReadableCopyright = ""; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + "@loader_path/Frameworks", + ); + MACH_O_TYPE = staticlib; + MACOSX_DEPLOYMENT_TARGET = 13.0; + MARKETING_VERSION = 1.0; + MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++"; + MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu11 gnu++20"; + PRODUCT_BUNDLE_IDENTIFIER = org.sagernet.sfa.macapp; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + PROVISIONING_PROFILE_SPECIFIER = ""; + SDKROOT = macosx; + SKIP_INSTALL = YES; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + SWIFT_VERSION = 5.0; + }; + name = Release; + }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ @@ -1737,6 +2309,33 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; + 3AEECBFF2A6DF40A006A0E0C /* Build configuration list for PBXNativeTarget "SystemExtension" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 3AEECBFD2A6DF40A006A0E0C /* Debug */, + 3AEECBFE2A6DF40A006A0E0C /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 3AEECC102A6DF9CA006A0E0C /* Build configuration list for PBXNativeTarget "SFM.System" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 3AEECC112A6DF9CA006A0E0C /* Debug */, + 3AEECC122A6DF9CA006A0E0C /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 3AEECC372A6DFDAD006A0E0C /* Build configuration list for PBXNativeTarget "MacLibrary" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 3AEECC382A6DFDAD006A0E0C /* Debug */, + 3AEECC392A6DFDAD006A0E0C /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; /* End XCConfigurationList section */ /* Begin XCRemoteSwiftPackageReference section */ @@ -1772,16 +2371,16 @@ package = 3A017F902A4AB2E4009149FA /* XCRemoteSwiftPackageReference "GRDB" */; productName = GRDB; }; - 3A57DF3B2A4D705000690BC5 /* MacControlCenterUI */ = { - isa = XCSwiftPackageProductDependency; - package = 3A57DF3A2A4D705000690BC5 /* XCRemoteSwiftPackageReference "MacControlCenterUI" */; - productName = MacControlCenterUI; - }; 3A7E90372A46778E00D53052 /* BinaryCodable */ = { isa = XCSwiftPackageProductDependency; package = 3A7E90362A46778E00D53052 /* XCRemoteSwiftPackageReference "BinaryCodable" */; productName = BinaryCodable; }; + 3AEECC4D2A6DFF13006A0E0C /* MacControlCenterUI */ = { + isa = XCSwiftPackageProductDependency; + package = 3A57DF3A2A4D705000690BC5 /* XCRemoteSwiftPackageReference "MacControlCenterUI" */; + productName = MacControlCenterUI; + }; /* End XCSwiftPackageProductDependency section */ }; rootObject = 3AEC20BD2A45991900A63465 /* Project object */; diff --git a/sing-box.xcodeproj/xcuserdata/sekai.xcuserdatad/xcschemes/xcschememanagement.plist b/sing-box.xcodeproj/xcuserdata/sekai.xcuserdatad/xcschemes/xcschememanagement.plist index a0900b0..41ed2a3 100644 --- a/sing-box.xcodeproj/xcuserdata/sekai.xcuserdatad/xcschemes/xcschememanagement.plist +++ b/sing-box.xcodeproj/xcuserdata/sekai.xcuserdatad/xcschemes/xcschememanagement.plist @@ -7,21 +7,21 @@ ApplicationLibrary.xcscheme_^#shared#^_ orderHint - 2 + 1 Associations (Playground) 1.xcscheme isShown orderHint - 5 + 15 Associations (Playground) 2.xcscheme isShown orderHint - 6 + 16 Associations (Playground) 3.xcscheme @@ -49,7 +49,7 @@ isShown orderHint - 4 + 14 ExtensionMac.xcscheme_^#shared#^_ @@ -66,6 +66,11 @@ orderHint 5 + MacLibrary.xcscheme_^#shared#^_ + + orderHint + 5 + MessageExtension.xcscheme_^#shared#^_ orderHint @@ -76,14 +81,14 @@ isShown orderHint - 11 + 9 MyPlayground (Playground) 2.xcscheme isShown orderHint - 12 + 10 MyPlayground (Playground) 3.xcscheme @@ -111,7 +116,7 @@ isShown orderHint - 10 + 8 SFA.xcscheme_^#shared#^_ @@ -123,15 +128,20 @@ orderHint 0 + SFM.System.xcscheme_^#shared#^_ + + orderHint + 2 + SFM.xcscheme_^#shared#^_ orderHint - 1 + 4 SystemExtension.xcscheme_^#shared#^_ orderHint - 16 + 3 Test.xcscheme_^#shared#^_ @@ -143,14 +153,14 @@ isShown orderHint - 8 + 6 Tour (Playground) 2.xcscheme isShown orderHint - 9 + 7 Tour (Playground) 3.xcscheme @@ -178,21 +188,21 @@ isShown orderHint - 7 + 5 TransactionObserver (Playground) 1.xcscheme isShown orderHint - 14 + 12 TransactionObserver (Playground) 2.xcscheme isShown orderHint - 15 + 13 TransactionObserver (Playground) 3.xcscheme @@ -220,7 +230,7 @@ isShown orderHint - 13 + 11 mactest.xcscheme_^#shared#^_