Reformat code
This commit is contained in:
@@ -12,8 +12,8 @@ struct PacketTunnelView: View {
|
|||||||
@State private var excludeLocalNetworks = false
|
@State private var excludeLocalNetworks = false
|
||||||
@State private var enforceRoutes = false
|
@State private var enforceRoutes = false
|
||||||
|
|
||||||
public init() {}
|
init() {}
|
||||||
public var body: some View {
|
var body: some View {
|
||||||
viewBuilder {
|
viewBuilder {
|
||||||
if isLoading {
|
if isLoading {
|
||||||
ProgressView().onAppear {
|
ProgressView().onAppear {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import Libbox
|
|||||||
import Library
|
import Library
|
||||||
|
|
||||||
struct StartServiceIntent: AppIntent {
|
struct StartServiceIntent: AppIntent {
|
||||||
public static var title: LocalizedStringResource = "Start sing-box"
|
static var title: LocalizedStringResource = "Start sing-box"
|
||||||
|
|
||||||
static var description =
|
static var description =
|
||||||
IntentDescription("Start or reload sing-box servie with specified profile")
|
IntentDescription("Start or reload sing-box servie with specified profile")
|
||||||
|
|||||||
@@ -219,7 +219,7 @@ public class ExtensionPlatformInterface: NSObject, LibboxPlatformInterfaceProtoc
|
|||||||
tunnel.writeMessage(message)
|
tunnel.writeMessage(message)
|
||||||
}
|
}
|
||||||
|
|
||||||
private var nwMonitor: NWPathMonitor? = nil
|
private var nwMonitor: NWPathMonitor?
|
||||||
|
|
||||||
public func startDefaultInterfaceMonitor(_ listener: LibboxInterfaceUpdateListenerProtocol?) throws {
|
public func startDefaultInterfaceMonitor(_ listener: LibboxInterfaceUpdateListenerProtocol?) throws {
|
||||||
guard let listener else {
|
guard let listener else {
|
||||||
@@ -287,7 +287,7 @@ public class ExtensionPlatformInterface: NSObject, LibboxPlatformInterfaceProtoc
|
|||||||
iterator = array.makeIterator()
|
iterator = array.makeIterator()
|
||||||
}
|
}
|
||||||
|
|
||||||
private var nextValue: LibboxNetworkInterface? = nil
|
private var nextValue: LibboxNetworkInterface?
|
||||||
|
|
||||||
func hasNext() -> Bool {
|
func hasNext() -> Bool {
|
||||||
nextValue = iterator.next()
|
nextValue = iterator.next()
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import NetworkExtension
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
open class ExtensionProvider: NEPacketTunnelProvider {
|
open class ExtensionProvider: NEPacketTunnelProvider {
|
||||||
public var username: String? = nil
|
public var username: String?
|
||||||
private var commandServer: LibboxCommandServer!
|
private var commandServer: LibboxCommandServer!
|
||||||
private var boxService: LibboxBoxService!
|
private var boxService: LibboxBoxService!
|
||||||
private var systemProxyAvailable = false
|
private var systemProxyAvailable = false
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import Library
|
|||||||
import MacLibrary
|
import MacLibrary
|
||||||
|
|
||||||
class StandaloneApplicationDelegate: ApplicationDelegate {
|
class StandaloneApplicationDelegate: ApplicationDelegate {
|
||||||
public func applicationWillFinishLaunching(_: Notification) {
|
func applicationWillFinishLaunching(_: Notification) {
|
||||||
Variant.useSystemExtension = true
|
Variant.useSystemExtension = true
|
||||||
Variant.isBeta = false
|
Variant.isBeta = false
|
||||||
Task {
|
Task {
|
||||||
|
|||||||
Reference in New Issue
Block a user