Edited the existing view so that if running on an iOS device it would provide a basic UI with a toggle switch that will allow the user to connect/disconnect from the VPN.
21 lines
418 B
Swift
21 lines
418 B
Swift
import SwiftUI
|
|
|
|
@main
|
|
@MainActor
|
|
struct BurrowApp: App {
|
|
static let tunnel = Tunnel { manager, proto in
|
|
proto.serverAddress = "hackclub.com"
|
|
manager.localizedDescription = "Burrow"
|
|
}
|
|
|
|
#if os(macOS)
|
|
@NSApplicationDelegateAdaptor(AppDelegate.self)
|
|
var delegate
|
|
#endif
|
|
|
|
var body: some Scene {
|
|
WindowGroup {
|
|
TunnelView(tunnel: Self.tunnel)
|
|
}
|
|
}
|
|
}
|