feat(client/macos): 主 app VPN 接线编译通过 — VpnChannel 入 Runner target
ci-pangolin / Lint — shellcheck (push) Has been cancelled
ci-pangolin / OpenAPI Sync Check (push) Has been cancelled
ci-pangolin / Redline Scan — 脱敏 (UI 文案) (push) Has been cancelled
ci-pangolin / Flutter — analyze + test (push) Has been cancelled

- VpnChannel.swift 加入 Runner target(Compile Sources)
- Logger→NSLog(Runner 部署目标 10.15,os.Logger 需 11)+ 去掉未用的
  SystemExtensions import
- 至此原生 VPN 控制链路全编译通过:主 app(NETunnelProviderManager 启停/
  状态)+ 扩展(libbox)。kUseNativeVpnMacOS 仍 false(待隧道能跑切换)。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
wangjia
2026-06-19 15:43:42 +08:00
parent c8df031741
commit 6a9a7c424e
2 changed files with 7 additions and 4 deletions
+3 -4
View File
@@ -12,10 +12,9 @@
import FlutterMacOS
import NetworkExtension
import SystemExtensions
import os
private let log = Logger(subsystem: "com.pangolin.pangolin", category: "vpn")
// NSLog (Runner < macOS 11,os.Logger )
private func vpnLog(_ message: String) { NSLog("[pangolin/vpn] %@", message) }
final class VpnChannel: NSObject {
private static let tunnelBundleId = "com.pangolin.pangolin.PacketTunnel"
@@ -76,7 +75,7 @@ final class VpnChannel: NSObject {
])
result(nil)
} catch {
log.error("start failed: \(error.localizedDescription)")
vpnLog("start failed: \(error.localizedDescription)")
result(FlutterError(code: "start_failed", message: error.localizedDescription, details: nil))
}
}