Commit Graph

2 Commits

Author SHA1 Message Date
wangjia f298b207fe fix(android/kernel): gomobile 改用 SagerNet fork v0.1.12 + 补 linkname tags
原 pin golang.org/x/mobile@v0.0.0-20240604...70c4c5da7d30 是失效 revision;

对照 sing-box v1.13.12 go.mod 与 cmd/internal/build_libbox,官方用

github.com/sagernet/gomobile@v0.1.12;补 badlinkname,tfogo_checklinkname0

以适配 Go 1.24 的 //go:linkname 限制。Task 2 blocker 修复。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-22 18:48:58 +08:00
wangjia 618332906c feat(kernel): 搭建 app/kernel/ 构建管线 (AAR/XCFramework/桌面二进制)
新增 app/kernel/ 目录,包含四个文件:

- VERSION: 固定三个锚点 — sing-box v1.13.12、Go 1.24.3、
  gomobile v0.0.0-20240604150348-70c4c5da7d30;禁止脚本内硬编码

- build-android.sh: gomobile bind → dist/android/libbox.aar
  targets: arm64-v8a / armeabi-v7a / x86_64,-androidapi 21
  build tags: with_quic,with_utls,with_clash_api,with_gvisor(对齐 SFA)
  裁剪注释保留,幂等+--force 支持

- build-ios.sh: gomobile bind → dist/ios/Libbox.xcframework
  targets: ios + iossimulator(device+sim 双 slice)
  build tags 对齐 SFI;含 iOS NE 内存上限敏感说明(裁 grpc/gvisor 指引)

- fetch-desktop-bin.sh: 从 GitHub Release 下载桌面二进制
  支持 linux/darwin/windows × amd64/arm64
  从官方 checksums.txt 做 SHA256 校验;Windows 额外取 wintun.dll
  幂等:产物+校验文件均存在则跳过

dist/ 和 .build/ 加入 gitignore;所有脚本通过 shellcheck -S warning

任务: tsk_d8KmVEzJTCjl

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-13 14:30:56 +08:00