diff --git a/ApplicationLibrary/Views/Setting/PacketTunnelView.swift b/ApplicationLibrary/Views/Setting/PacketTunnelView.swift index 5196551..8de6396 100644 --- a/ApplicationLibrary/Views/Setting/PacketTunnelView.swift +++ b/ApplicationLibrary/Views/Setting/PacketTunnelView.swift @@ -12,8 +12,8 @@ struct PacketTunnelView: View { @State private var excludeLocalNetworks = false @State private var enforceRoutes = false - public init() {} - public var body: some View { + init() {} + var body: some View { viewBuilder { if isLoading { ProgressView().onAppear { diff --git a/IntentsExtension/Intents.swift b/IntentsExtension/Intents.swift index 7f00471..b5d261e 100644 --- a/IntentsExtension/Intents.swift +++ b/IntentsExtension/Intents.swift @@ -4,7 +4,7 @@ import Libbox import Library struct StartServiceIntent: AppIntent { - public static var title: LocalizedStringResource = "Start sing-box" + static var title: LocalizedStringResource = "Start sing-box" static var description = IntentDescription("Start or reload sing-box servie with specified profile") diff --git a/Library/Network/ExtensionPlatformInterface.swift b/Library/Network/ExtensionPlatformInterface.swift index 324c355..fcc00f2 100644 --- a/Library/Network/ExtensionPlatformInterface.swift +++ b/Library/Network/ExtensionPlatformInterface.swift @@ -219,7 +219,7 @@ public class ExtensionPlatformInterface: NSObject, LibboxPlatformInterfaceProtoc tunnel.writeMessage(message) } - private var nwMonitor: NWPathMonitor? = nil + private var nwMonitor: NWPathMonitor? public func startDefaultInterfaceMonitor(_ listener: LibboxInterfaceUpdateListenerProtocol?) throws { guard let listener else { @@ -287,7 +287,7 @@ public class ExtensionPlatformInterface: NSObject, LibboxPlatformInterfaceProtoc iterator = array.makeIterator() } - private var nextValue: LibboxNetworkInterface? = nil + private var nextValue: LibboxNetworkInterface? func hasNext() -> Bool { nextValue = iterator.next() diff --git a/Library/Network/ExtensionProvider.swift b/Library/Network/ExtensionProvider.swift index 8bcccc7..6d83ed1 100644 --- a/Library/Network/ExtensionProvider.swift +++ b/Library/Network/ExtensionProvider.swift @@ -9,7 +9,7 @@ import NetworkExtension #endif open class ExtensionProvider: NEPacketTunnelProvider { - public var username: String? = nil + public var username: String? private var commandServer: LibboxCommandServer! private var boxService: LibboxBoxService! private var systemProxyAvailable = false diff --git a/SFM.System/StandaloneApplicationDelegate.swift b/SFM.System/StandaloneApplicationDelegate.swift index bbf9303..ad90f82 100644 --- a/SFM.System/StandaloneApplicationDelegate.swift +++ b/SFM.System/StandaloneApplicationDelegate.swift @@ -4,7 +4,7 @@ import Library import MacLibrary class StandaloneApplicationDelegate: ApplicationDelegate { - public func applicationWillFinishLaunching(_: Notification) { + func applicationWillFinishLaunching(_: Notification) { Variant.useSystemExtension = true Variant.isBeta = false Task {