Remove BepInEx client patcher (DorkNet.ClientPatch)

MelonLoader (DorkNet.ClientMod) is the sole client patcher now, so drop
the BepInEx plugin and its BepInEx-only installer:

- delete the DorkNet.ClientPatch project + tools/install-plugin.ps1
- drop the project from DorkNet.sln
- README / architecture / deploy docs: present DorkNet.ClientMod
  (install-melon.ps1) as the patcher instead of the BepInEx plugin
- fix install-melon.ps1 fallback hint that pointed at the deleted
  install-plugin.ps1
- tidy stray 'BepInEx port' comments in Mod.cs / PhotonCustomAuthController

Legacy-cleanup paths that REMOVE an old BepInEx install (install-legacy-client.ps1,
the old_plugin_paths entry in build-patcher-zip.ps1) are kept intentionally.
This commit is contained in:
Alexa
2026-05-30 01:50:26 +03:00
parent dfd0d44641
commit 43fe3572c9
13 changed files with 46 additions and 3399 deletions
+7 -10
View File
@@ -16,23 +16,20 @@ files in this folder.
DorkNet.sln
├── DorkNet.Server ASP.NET Core 9 backend — the bulk of the code
├── DorkNet.Models Shared DTO + serialization types
├── DorkNet.ClientMod MelonLoader plugin (portable / experimental)
└── DorkNet.ClientPatch BepInEx 6 IL2CPP plugin (production)
└── DorkNet.ClientMod MelonLoader 6 IL2CPP mod — the client patcher
```
| Project | Responsibility | Target |
|---|---|---|
| `DorkNet.Server` | REST API, SignalR hub, admin SPA host, static-site host, image CDN, matchmaking, persistence | .NET 9 |
| `DorkNet.Models` | DTOs the wire protocol speaks. No project dependencies. | .NET 9 |
| `DorkNet.ClientMod` | MelonLoader 0.6.x port — same patches as ClientPatch, JSON config | .NET 6 |
| `DorkNet.ClientPatch` | BepInEx 6 IL2CPP plugin — the standard client patcher, TOML config | .NET 6 |
| `DorkNet.ClientMod` | MelonLoader 0.6.x IL2CPP mod — the client patcher, JSON config | .NET 6 |
`ClientMod` and `ClientPatch` are intentional twins: both apply the
same patches (URI rewrite `.rec.net` → configured apex, Photon AppId
override, TLS trust bypass, auth injection) against different mod
loaders. ClientPatch is the supported deployment; ClientMod exists for
contributors who already have MelonLoader installed and don't want to
swap loaders.
`ClientMod` applies the client-side patches needed to point the 2020
watch at a DorkNet server: URI rewrite (`.rec.net` → configured apex),
Photon AppId override, and TLS trust bypass. It loads under
MelonLoader 0.6.x and reads its settings from a JSON config under
`MelonLoader/UserData/`.
---
+16 -23
View File
@@ -227,40 +227,33 @@ With "Reject if Auth Failed" ON, every Photon connect would fail with
NameServer 32736 — same symptom we tried to solve. With it OFF, the
client connects fine, the endpoint exists for future client patching.
### Patching the watch to send AuthValues — `DorkNet.ClientPatch/`
### Patching the watch to send AuthValues — `DorkNet.ClientMod/`
The vanilla 2020 watch never sets `PhotonNetwork.AuthValues` (verified
by an exhaustive grep across both `Assembly-CSharp.dll` and the
Photon `Assembly-CSharp-firstpass.dll` library). To make Photon
forward `userid` + `LoginLock` to our `/photon/customauth` endpoint we
ship a **BepInEx 6 IL2CPP plugin** that patches
`NetworkingPeer.OpAuthenticate` and attaches the values in flight.
forward `userid` + `LoginLock` to our `/photon/customauth` endpoint a
Harmony patch on the watch's Photon auth path has to attach the values
in flight. That hook lives in the **MelonLoader IL2CPP mod**
(`DorkNet.ClientMod`); the AuthValues injector itself is currently
parked (see `DorkNet.ClientMod/attic/AuthValuesInjector.cs.attic` and
the notes in `Mod.cs`) since the `/photon/customauth` endpoint runs in
permissive mode.
Source + build instructions: [DorkNet.ClientPatch/README.md](../DorkNet.ClientPatch/README.md).
End-to-end install on a tester's machine:
Install the mod on a tester's machine with:
```pwsh
.\tools\patch-client.ps1 `
.\tools\install-melon.ps1 `
-RecRoomPath "C:\…\RecRoom\Recroom_Release_Data" `
-PhotonAppId cb0880d9-… `
-InstallBepInEx "C:\Downloads\BepInEx_unix_x86_64_6.0.0-be.696_…zip"
-PhotonAppId cb0880d9-…
```
The patcher will:
The script unpacks MelonLoader, builds `DorkNet.ClientMod.dll`, and
drops it into the client's `Mods/` folder. On the first run it prints
"launch the game once" so MelonLoader can generate its IL2CPP
assemblies; relaunch the script with `-ResumeBuild` to finish.
1. Do its usual asset/hosts/cert work.
2. Extract BepInEx into the client folder (skipped if already
present).
3. If `BepInEx/interop/` exists, build
`DorkNet.ClientPatch.dll` against it and drop it into
`BepInEx/plugins/`.
4. If `interop/` doesn't exist yet (BepInEx never launched), prompt
the operator to launch the game once so BepInEx generates interop
assemblies, then re-run the patcher with the same `-InstallBepInEx`
path to finish step 3.
Once the plugin is in production:
Once AuthValues injection is re-enabled in the mod and in production:
1. Flip [`PhotonCustomAuthController`](../DorkNet.Server/Controllers/Auth/PhotonCustomAuthController.cs)
from permissive-mode (`ResultCode 1` always) back to strict —