This commit introduces the Tunnel view model object which has support for asking for permission, starting and stopping the tunnel. It automatically updates its state and publishes changes as an ObservableObject.
18 lines
344 B
Swift
18 lines
344 B
Swift
import NetworkExtension
|
|
import SwiftUI
|
|
|
|
@main
|
|
@MainActor
|
|
struct BurrowApp: App {
|
|
|
|
static let tunnel = Tunnel { manager, proto in
|
|
proto.serverAddress = "hackclub.com"
|
|
manager.localizedDescription = "Burrow"
|
|
}
|
|
|
|
var body: some Scene {
|
|
WindowGroup {
|
|
TunnelView(tunnel: Self.tunnel)
|
|
}
|
|
}
|
|
}
|