Repository navigation
Add Android support (launcher, on-device server, client mods) - #76
Fokiiiiiii wants to merge 4 commits into
Conversation
1adf0e4 to
68f7baa
Compare
reiserFSs
left a comment
There was a problem hiding this comment.
Thanks for putting this together — this is a ton of solid work and really nice to see on-device Android support coming together. Before we can merge, there are a few blockers to address:
Required before merge
- Reverse-proxy auth bypass / account enumeration (
AscNet.SDKServer/Controllers/AccountController.cs:141-155, 240-241):
/api/AscNet/android/playersand/api/AscNet/android/playeronly checkIPAddress.IsLoopback(RemoteIpAddress). On any hosted server behind a local reverse proxy (Nginx/Caddy/cloudflared), remote requests arrive from127.0.0.1, allowing anyone to enumerate all usernames and hijack Android gate fallback even whenASCNET_GATE_FALLBACK_USERNAMEis unset. Please gate both endpoints (andandroidPlayUserfallback) behind an explicit opt-in env flag (e.g.ASCNET_ANDROID_LOCAL_MODE=1) thatsetup.shsets for on-device runs. - Server update skips extracting payload (
Scripts/android/setup.sh:84-108):
guest_install()returns early when$app/AscNet.dllandmongodalready exist, soupdate-runtime.sh→setup.sh install server-arm64.tar.gznever extracts the newAscNet.dll,relay.py,Configs/, ortable/even though the app marks the update complete. Please ensure updates actually extract the new payload. - Prebuilt binaries checked into git:
Please remove the prebuilt binaries from the repo and build/fetch them in CI/packaging instead:Scripts/android/runtime/moddetect-aarch64(the Rust source is already inScripts/android/moddetect/)Scripts/android/runtime/rish/rish_shizuku.dexScripts/android/runtime/wheels/unitypy-1.25.2-cp312-cp312-linux_aarch64.whl
Minor cleanups
Scripts/android/launcher/gradle.properties:3: defaultupdateRepositorytoreiserFSs/InfiniteLoopinstead ofFokiiiiiii/Cradle.Scripts/android/setup.sh:243: change the defaultASCNET_GATE_FALLBACK_USERNAME='foki'to a generic default (e.g.player/android).AscNet.SDKServer/Controllers/AccountController.cs:107-109:ctx.Request.Path != "/api/Login/Login-cn"should also exclude/api/Login/Login-cn-android(or checkClientRegions.FromGatePath).- Please add brief
AscNet.Testcoverage forAndroidNotifyLoginSerializer,/android/config.tab, and the gated/api/AscNet/android/player(s)endpoints soServer CIverifies them on every PR.
Once these are updated and Server CI is green, happy to merge!
68f7baa to
8ced513
Compare
8ced513 to
dcb7be1
Compare
|
Thanks for the review. All three blockers and the minor items are addressed in the updated commit: Required
Minor
Not run yet: the new ARM64 jobs of the release workflow (they only run on a release) and the DB-backed tests on my side. Server CI should exercise the latter. |
|
Thanks for the quick turnaround — all three previous blockers and the minor cleanups look great! Just two tiny things before I approve CI and merge:
Once those two are tweaked, I'll approve the CI workflows and merge as soon as they're green! |
The android-compat-only switch was joined with a literal "\n", so bash passed "n" to the test harness. The install test now builds a payload tarball because guest_install always extracts it.
|
Fixed both in
That test is skipped on my Windows setup (no real symlinks), so CI is the first real run. |
# Conflicts: # AscNet.SDKServer/Controllers/AccountController.cs
# Conflicts: # AscNet.GameServer/Handlers/AccountModule.cs
Adds Android support (1.0.0): run the server on the phone itself and play the Android client against it. No root needed.
Scripts/android/launcher): setup wizard (Termux, then server), PLAY, start/stop, region from the installed client, Export Logs (app, server, relay, MongoDB, game logcat).setup.sh,relay.py): AscNet, MongoDB and a mitmproxy relay inside Termux's proot-distro; the app routes the game to it through a local VpnService.runtime/modctl.py,moddetect,Scripts/pgr_gm_bundle.py,Mods/*): GM Menu / Lua Mods applied through Shizuku. The server sendsClient.Debugso the game loads them..github/workflows/android-release.yml, tagandroid-v<version>.ClientRegions,AccountModule,AccountController,AndroidNotifyLoginSerializer), Debug flag in the remote config.Tests: launcher unit tests (
gradle testDebugUnitTest) andScripts/android/tests. The only failures are the existing Windows-only ones. Verified on device.