feat(android): libbox 隧道重写对接真实 1.13.12 API,APK 编译通过(Task 5)

原生层照 PoC 旧/想象 API 写,与真实 sing-box 1.13.12 libbox 差距是架构级:

- 包名 libbox(非 go.libbox);无 BoxService,改 Libbox.setup + CommandServer 模型

- PangolinVpnService 重写:实现完整 PlatformInterface(15法)+CommandServerHandler

- 新增 DefaultNetworkMonitor(上报默认接口,缺则报 no available network)

- openTun 适配真实 TunOptions(RoutePrefixIterator/getMTU/StringBox DNS)

- 统计/切节点经 CommandClient(uplinkTotal/selectOutbound);MainActivity 接线

构建环境矩阵打通:Gradle 8.7(Java21)+声明式插件迁移+AGP 8.6+Kotlin 2.2.0+占位图标

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
wangjia
2026-06-22 19:28:24 +08:00
parent 2a8426c357
commit 126c06833d
10 changed files with 512 additions and 381 deletions
@@ -0,0 +1,16 @@
<!-- 占位启动图标(vector,全 API 可用)。正式图标待设计接入后替换。 -->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path
android:fillColor="#0F1117"
android:pathData="M0,0h108v108h-108z" />
<path
android:fillColor="#E0884F"
android:pathData="M54,28 L80,82 L28,82 Z" />
<path
android:fillColor="#0F1117"
android:pathData="M54,52 L66,76 L42,76 Z" />
</vector>