wip: checkpoint connection gate diagnostics

This commit is contained in:
funman300
2026-08-07 12:03:21 -07:00
parent 3649c3d6f0
commit 0f581ebef3
3 changed files with 192 additions and 9 deletions
+69
View File
@@ -1218,3 +1218,72 @@ Mirrors the existing `install_force_connect`. Enable by uncommenting the call in
bridge override (openfut-poke arm --host 127.0.0.1 --port 8443), relaunch FIFA. Compiles
clean for the Windows target. Expected: hook.log shows PUMP lines, conn flips to '+onl',
and a dial to 127.0.0.1:8443 (the Blaze handshake start).
---
## `LoginReasonCode` may be a string enum, not an int (2026-07-28)
External cross-check of our LSX event encodings against **`ploxxxy/origin-sdk`**
(github.com/ploxxxy/origin-sdk, MIT) — a third-party clean-room Rust implementation of
the Origin SDK's LSX protocol, RE'd from observing SDK **9.12.1.7 / 10.6.1.8**. Not EA
source; same provenance class as our own anadius64.dll disassembly, so clean-room holds.
**What it confirms** (independent second derivation of things we RE'd alone):
| Our finding | origin-sdk |
|---|---|
| LSX session crypto is AES-128-ECB + PKCS#7 | same |
| `CRandom` = MSVC LCG (`214013` / `2531011`) | same constants |
| `AES_KEY` `000102…0f` is real, not a placeholder | same — it is the `seed == 0` key |
| Seed from first 2 chars of the ChallengeAccepted response | same derivation |
| `GetAuthCode` → `<AuthCode value="…"/>` | same element + `@value` |
| `Facility` service names in `GetConfig` | same set, incl. `ONLINE_STATUS_EVENT` |
**What it contradicts.** We typed `LoginReasonCode` as an **int** (read off the `LoginT`
deserializer's field layout) and pushed `LoginReasonCode="0"`. origin-sdk types it as a
**string enum**:
```
UNDEFINED | USER_INITIATED | ALREADY_ONLINE | NETWORK_ERROR
| INVALID_CREDENTIALS | ACCESSTOKEN_REFRESH_ERROR
```
**Why this is worth a run.** If FIFA string-compares this field the way it does `isOnline`
(which had to be the literal `true`, never `1`) and `GetGameInfo`'s fixed `GameInfo`
attribute, then `"0"` matches no arm, falls through to the default, and leaves the cached
login state incomplete — while the deserializer still reports success. That is precisely
the observed behaviour: `Login.deser` fired 44× and returned success, and FIFA never
advanced. It is also the **third instance of the same bug class** in this codebase, both
prior instances having the identical signature (delivered, parsed, no behavioural change).
This bears directly on the gate as stated above: the EASFC controller polls a *combined*
online-readiness condition that our flags do not satisfy. An incompletely-populated login
state is a candidate missing term in that condition.
**Status: UNCONFIRMED, both encodings still open.** The int layout came from FIFA 23's own
deserializer; the enum from a different SDK version. Both can be true simultaneously if
FIFA parses a string into an int slot. This is a cheap experiment, not a solved problem —
and it does not supersede the NetConn-pump work above, which remains the
highest-confidence next step.
**How to run it.** Default is now `USER_INITIATED`; sweep candidates without a rebuild:
```bash
cargo run # USER_INITIATED (new default)
OPENFUT_LOGIN_REASON_CODE=ALREADY_ONLINE cargo run
OPENFUT_LOGIN_REASON_CODE=UNDEFINED cargo run
OPENFUT_LOGIN_REASON_CODE=0 cargo run # control — previous behaviour
```
The bridge logs `LSX: Login event LoginReasonCode=<value>` at startup, so each FIFA run's
log records which encoding drove it.
**Success signal** (unchanged): FIFA issues `GetAuthCode` over LSX, or resolves
`spring18.gosredirector.ea.com`. Both are already logged. **Negative result is also worth
recording** — it closes the encoding question and re-focuses everything on the EASFC poll.
**Other reusable prior art found in the same sweep** (not yet adopted, listed for M3/M4):
`jacobtread/blaze-ssl-async` (minimal SSLv3, RC4-SHA/MD5 — built for exactly ProtoSSL's
constraints), `tdf` + `BlazePK-rs` (Blaze packet framing/TDF), and `futapi/fut` +
`trydis/FIFA-Ultimate-Team-Toolkit` (working `fut.ea.com` REST clients — would replace the
SPECULATIVE endpoint shapes in `mapper.rs`/`shaper.rs` with observed ones).