Add support for starting and stopping the tunnel
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.
This commit is contained in:
parent
eeb0130156
commit
b3a540fc48
8 changed files with 277 additions and 28 deletions
|
|
@ -1,10 +1,18 @@
|
|||
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 {
|
||||
ContentView()
|
||||
TunnelView(tunnel: Self.tunnel)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue