feat(scripts): P0 完成 — libbox 嵌入式核心构建脚本(方案B)

scripts/build-libbox.sh:用 sagernet/gomobile fork v0.1.12 + sing-box v1.13.13
+ 官方 build_libbox,一键编出 Libbox.xcframework(Apple)/ Libbox.aar(Android)。
已本地跑通 macOS:双架构(arm64+x86_64)xcframework,Headers 暴露 LibboxNewService /
LibboxCommandClient(状态·速率)等 API。产物不入 git(~204MB),按需重编。
docs/vpn-core-embedding.md 标记 P0 完成。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
wangjia
2026-06-19 10:07:02 +08:00
parent 28dd28c285
commit 236e33aef9
2 changed files with 55 additions and 2 deletions
+5 -2
View File
@@ -118,8 +118,11 @@ libbox CommandServer ──(gRPC/IPC)──▶ 原生订阅速率/状态 ──(
## 8. 分阶段迁移(PoC 全程保持可用,逐端切换)
1. **P0 · libbox Apple 产物 + 版本对齐**:编出 `Libbox.xcframework`,固定 sing-box 版本,
本地能 `NewService` 起一个最小配置(冒烟)。
1. **P0 · libbox Apple 产物 + 版本对齐**:编出 `Libbox.xcframework`,固定 sing-box 版本
**已完成**:`scripts/build-libbox.sh apple macos` 复现;用 sagernet/gomobile fork
v0.1.12 + sing-box v1.13.13 + 官方 `build_libbox` 编出双架构(arm64+x86_64)
`Libbox.xcframework`(~204MB),Headers 暴露 `LibboxNewService` / `LibboxCommandClient`
(状态·速率·连接)等 API。产物不入 git(体积大),按需用脚本重编 / 后续走 CI。
2. **P1 · macOS System Extension(主力)**:新增 sysex target + NEPacketTunnelProvider +
App Group + 签名公证;`NativeVpnBridge` 经 method channel 启停;连接页接 libbox 状态/速率。
**达标即 macOS 不再需要外部 sing-box / sudo。**