mac: tidy menu and gateway support

This commit is contained in:
Peter Steinberger
2025-12-10 01:00:53 +00:00
parent 5ed1d4e178
commit 70fb4d452e
18 changed files with 198 additions and 98 deletions

View File

@@ -11,12 +11,16 @@ actor RemoteTunnelManager {
func ensureControlTunnel() async throws -> UInt16 {
let settings = CommandResolver.connectionSettings()
guard settings.mode == .remote else {
throw NSError(domain: "RemoteTunnel", code: 1, userInfo: [NSLocalizedDescriptionKey: "Remote mode is not enabled"])
throw NSError(
domain: "RemoteTunnel",
code: 1,
userInfo: [NSLocalizedDescriptionKey: "Remote mode is not enabled"])
}
if let tunnel = self.controlTunnel,
tunnel.process.isRunning,
let local = tunnel.localPort {
let local = tunnel.localPort
{
return local
}