update ci

This commit is contained in:
Fabian Freund
2026-05-26 17:15:27 +02:00
parent dd0a9d9850
commit 5a4a787a4e
4 changed files with 65 additions and 23 deletions
+20 -20
View File
@@ -13,23 +13,22 @@ Current state:
- Returns runtime endpoint metadata for Gecko container proxy integration.
- Exposes status/log callbacks.
- Starts libbox via reflection against the `io.nekohasekai.libbox.*` classes
shipped in the AAR — if the AAR is missing, the plugin still compiles but
`start` reports an `IllegalStateException` at runtime.
shipped in the combined WebLibre gomobile AAR.
## Building official sing-box libbox
## Building the Android gomobile runtime
The plugin does not commit binary AARs. Build them from the official sing-box
checkout before release/F-Droid builds:
The app uses one combined gomobile AAR for sing-box `libbox` and IPtProxy,
because multiple gomobile AARs in one Android app collide on generated runtime
symbols. Build it from the repository root before release/F-Droid builds:
```sh
packages/flutter_singbox_proxy/scripts/build-libbox-android.sh \
--source /path/to/sing-box
melos run build-go-runtime --no-select
```
By default the script looks for `../../../sing-box` relative to this package,
which matches the local workspace layout used during development. It copies
`libbox.aar` into `android/libs/`; Gradle consumes that AAR automatically when
present.
By default the script looks for sibling `../sing-box` and `../IPtProxy`
checkouts relative to this repository. It writes
`native/go_mobile_runtime/build/weblibre-go.aar`; Gradle requires that AAR
before compiling this plugin.
For F-Droid metadata, call the package-local prebuild script:
@@ -45,15 +44,16 @@ official SagerNet gomobile tools with `go install`.
### Version compatibility
The script pins `github.com/sagernet/gomobile/cmd/gomobile@v0.1.12` and
`gobind@v0.1.12`. The sing-box source itself is whatever you point `--source`
at; the runtime accesses `io.nekohasekai.libbox.*` via reflection, so API drift
across sing-box releases surfaces as a `NoSuchMethodException` at start time
rather than a build failure. When bumping sing-box:
The combined runtime pins sing-box, IPtProxy, dnstt, and gomobile in
`native/go_mobile_runtime/pins.env`. The runtime accesses
`io.nekohasekai.libbox.*` via reflection, so API drift across sing-box releases
surfaces as a `NoSuchMethodException` at start time rather than a build failure.
When bumping sing-box:
1. Rebuild the AAR with the new tag.
2. Smoke-test `start`/`stop` on a profile to catch missing/renamed setup
1. Update `native/go_mobile_runtime/pins.env`.
2. Rebuild the AAR with the new tag.
3. Smoke-test `start`/`stop` on a profile to catch missing/renamed setup
methods (notably `SetupOptions.setOomKillerDisabled` /
`setOomKillerEnabled` `LibboxRuntime` falls back between the two).
3. Update this README with the verified sing-box tag if relying on it for a
`setOomKillerEnabled` - `LibboxRuntime` falls back between the two).
4. Update this README with the verified sing-box tag if relying on it for a
release.