MONKEY: split AUTH_BUILD (realmd 7272) from CLIENT_BUILD (world 5875)
realmd's FindBuildInfo accepts only build >= 7272; mangosd's IsAcceptableClientBuild needs exactly 5875. Present 7272 to the auth challenge, 5875 to the world/login-screen. Catalogue entry in MONKEY-FORK.md marked LANDED. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
fab487dada
commit
7f4db0e879
@@ -47,9 +47,21 @@ Keep this list short; prefer moving logic into the crate.
|
||||
|
||||
| file | edit | why | status |
|
||||
|---|---|---|---|
|
||||
| `crates/benilla-protocol/src/lib.rs` | **split build:** `CLIENT_BUILD` = 5875 (world/mangosd + login-screen), new `AUTH_BUILD` = 7272 (realmd challenge, `lib.rs` call site) | the two servers demand different builds — realmd `FindBuildInfo` needs ≥ 7272, mangosd `IsAcceptableClientBuild` needs exactly 5875 (matches the twmoa client: reports 1.18.1 to realmd, 5875 engine to world). | **LANDED** |
|
||||
| `crates/benilla-app/src/lib.rs` (`run`) | `app.add_plugins(MonkeyPlugin)` | wire our plugin in (no public plugin-group entry yet) | **planned** |
|
||||
| `crates/benilla-ui` / `assets/ui` | publish `TargetLevelText` / `PlayerLevelText` regions | MonkeyCharsheet hooks these stock globals | **planned** |
|
||||
| (register `PlayerModel` frame type) | `CreateFrame("PlayerModel", …)` | BuildUI + ObjectBrowser 3D previews | **planned** |
|
||||
| `crates/benilla-protocol/src/auth.rs` | treat proof reply `0x00`+`0x09` as version-invalid | so a build/version mismatch reads clearly, not "got 0x0" | **idea** |
|
||||
|
||||
## Server-side requirements (Everwood realmd, not benilla edits)
|
||||
|
||||
To let benilla (or any non-original client) authenticate against `bin/Debug/realmd.conf`:
|
||||
- **`StrictVersionCheck = 0`** (default 1) + restart realmd — otherwise realmd checks the client
|
||||
integrity hash, which benilla (not the original binary) can't reproduce → "modified client".
|
||||
- Log in with a **non-GM account** (rank < `ForcePinAccountRank`, default 7) — GM-rank accounts are
|
||||
forced through a PIN benilla doesn't implement.
|
||||
- benilla must present **build 7272** (the `CLIENT_BUILD` patch above), which realmd's
|
||||
`ExpectedRealmdClientBuilds` requires.
|
||||
|
||||
## The ~10 functions to reimplement natively
|
||||
|
||||
|
||||
@@ -35,8 +35,18 @@ use benilla_srp::{NormalizedString, PublicKey, SrpClientChallenge, SESSION_KEY_L
|
||||
/// The realmd (auth/login) server port — the stock one a vmangos `realmd` listens on, which our
|
||||
/// deploy maps straight through (`3724:3724` in the compose file at `vmangos-deploy`).
|
||||
pub const AUTH_PORT: u16 = 3724;
|
||||
/// The 1.12.1 client build we present to the server.
|
||||
/// The engine build we present to the WORLD server (mangosd) and show on the login screen.
|
||||
// MONKEY: the two Everwood servers demand DIFFERENT builds. mangosd's IsAcceptableClientBuild
|
||||
// (src/game/Database/DBCStores.cpp) accepts ONLY 5875, and the twmoa client itself displays
|
||||
// "1.12.1 (5875)" — so the world/engine build stays 5875 (sending 7272 here → mangosd
|
||||
// "HandleAuthSession: version mismatch"). Upstream default was 5875 (unchanged).
|
||||
pub const CLIENT_BUILD: u16 = 5875;
|
||||
/// The build we present to the AUTH server (realmd) in the logon challenge.
|
||||
// MONKEY: realmd's FindBuildInfo (src/realmd/RealmList.cpp) accepts only build >= 7272 (twmoa
|
||||
// 1.18.1). Sending 5875 to realmd → CMD_AUTH_LOGON_CHALLENGE(0x00)+WOW_FAIL_VERSION_INVALID
|
||||
// ("got 0x0"). The twmoa client reports its 1.18.1 version to realmd but the 5875 engine build to
|
||||
// the world, so these two builds MUST differ.
|
||||
pub const AUTH_BUILD: u16 = 7272;
|
||||
/// How many logon challenges [`logon`] will ask for while looking for a `B` both serialization
|
||||
/// conventions read the same way (see the redial comment there). One dial in ~137 comes back
|
||||
/// ambiguous, so eight is already a probability of about 10⁻¹⁷ of running out.
|
||||
@@ -166,7 +176,8 @@ pub fn logon(host: &str, username: &str, password: &str) -> Result<Logon> {
|
||||
let mut dialed = None;
|
||||
for _ in 0..MAX_CHALLENGE_DIALS {
|
||||
let mut stream = dial(host, port)?;
|
||||
auth::write_logon_challenge(&mut stream, &username.to_uppercase(), CLIENT_BUILD)
|
||||
// MONKEY: AUTH_BUILD (7272) to realmd, not CLIENT_BUILD (5875) — see the const docs.
|
||||
auth::write_logon_challenge(&mut stream, &username.to_uppercase(), AUTH_BUILD)
|
||||
.context("sending logon challenge")?;
|
||||
let reply =
|
||||
auth::read_challenge_reply(&mut stream).context("reading logon challenge reply")?;
|
||||
|
||||
Reference in New Issue
Block a user