feat(client/macos): 解开 VpnChannel 注册(主 app 接 NETunnelProviderManager)
MainFlutterWindow 启用 VpnChannel.register —— Flutter 经 pangolin/vpn 通道 启停 PacketTunnel(NETunnelProviderManager)。需 VpnChannel.swift 已入 Runner target 的 Compile Sources。kUseNativeVpnMacOS 仍为 false(待隧道能跑再切)。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -14,10 +14,9 @@ class MainFlutterWindow: NSWindow {
|
||||
|
||||
RegisterGeneratedPlugins(registry: flutterViewController)
|
||||
|
||||
// P1 方案B:VPN 原生控制通道。把 VpnChannel.swift 加入 Runner target(Compile Sources)
|
||||
// 后,解开下一行注册(见 docs/p1-macos-system-extension.md §3)。在此之前保持注释,
|
||||
// 以免引用未编译符号破坏 Runner 构建。
|
||||
// VpnChannel.register(with: flutterViewController.registrar(forPlugin: "VpnChannel"))
|
||||
// P1 方案B:VPN 原生控制通道(NETunnelProviderManager 启停 PacketTunnel)。
|
||||
// 需 VpnChannel.swift 已加入 Runner target 的 Compile Sources。
|
||||
VpnChannel.register(with: flutterViewController.registrar(forPlugin: "VpnChannel"))
|
||||
|
||||
super.awakeFromNib()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user