Merge branch 'main' into feature/pangolin-ios
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

# Conflicts:
#	client/lib/bridge/vpn_bridge_provider.dart
#	docs/index.html
This commit is contained in:
wangjia
2026-06-23 10:05:20 +08:00
23 changed files with 2208 additions and 459 deletions
+5 -1
View File
@@ -1,7 +1,8 @@
// vpn_bridge_provider.dart — VpnBridge 平台分派
//
// macOS / Linux / Windows → DesktopVpnBridge(真实子进程)
// 其他平台(iOS / Web / 测试)→ VpnBridgeMock
// Android / iOS → VpnNativeBridge(内嵌 libbox,走 pangolin/vpn 通道)
// 其他平台(Web / 测试)→ VpnBridgeMock
import 'package:flutter/foundation.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
@@ -24,6 +25,9 @@ final vpnBridgeProvider = Provider<VpnBridge>((ref) {
if (Platform.isMacOS && kUseNativeVpnMacOS) {
return VpnNativeBridge();
}
if (Platform.isAndroid) {
return VpnNativeBridge();
}
// iOS:NEPacketTunnelProvider 内嵌 libbox(B1/C1 已打通)。走原生 MethodChannel
// (pangolin/vpn → AppDelegate → VpnManager),不再用 mock。
if (Platform.isIOS) {