Files
DorkNet/client-mod
Alexa bcc5fe1bcb Add initial documentation and structure for DorkNet project
- Create README.md for project overview and setup instructions
- Add admin-ui/README.md for admin UI details and development setup
- Introduce client-mod/README.md explaining the MelonLoader mod functionality
- Establish docker/README.md for Docker setup and configuration
- Create docs/README.md to index project documentation
- Implement advanced-setup.md for Docker stack configuration
- Document architecture in architecture.md
- Provide easy-setup.md for hosting instructions
- Add FAQ.md for common questions and legal considerations
- Create joining-a-server.md for player connection instructions
- Establish troubleshooting.md for common issues and resolutions
- Introduce easy-app/README.md for the unified desktop application
- Add server/README.md for ASP.NET Core backend details
- Document tools/README.md for CLI helper scripts
2026-05-21 13:26:46 +03:00
..

client-mod/

MelonLoader 0.6.x mod that retargets the 2020 Rec Room client at a DorkNet server. Compiles to DorkNet.ClientMod.dll, which the patcher drops into the user's Recroom_Release/Mods/ folder.

What it does

Harmony patches applied at boot:

  • Uri ctor — rewrites every .rec.net URL to your configured server host. Catches every hardcoded API endpoint the watch ships with.
  • PhotonNetwork.ConnectUsingSettings — overrides the baked-in Photon Cloud AppId with yours.
  • NetworkingPeer.CallAuthenticate — injects userid + LoginLock into Photon's CustomAuth so your server can identify the player.
  • BouncyCastle.Tls.*NotifyServerCertificate — bypasses TLS chain validation. The 2020 client only trusts a baked-in cert set; we replace the verifier so any cert from your server is accepted. (Mitigated by also force-routing only to your configured host.)
  • PlayerEmotes.RemoveInvalidCharactersFromMessage — skips the TMP font-validation step that NREs when the font asset isn't loaded yet (private servers don't always have it cached at chat-send time).
  • AccountExtensions.CanLocalPlayerChat — forces chat-enabled for Junior / restricted accounts (single-tenant private server, no chat moderation needed).

See Mod.cs for the full patch list with citations to the Cpp2IL disassembly that justifies each one.

Config

The mod reads MelonLoader/UserData/dorknet-clientmod.json:

{
  "ServerHost": "abc-def.trycloudflare.com",
  "PhotonAppId": "your-photon-realtime-appid",
  "PhotonCloudRegion": "eu",
  "InjectAuthValues": true,
  "EnableTlsTrustBypass": true
}

The patcher (desktop app and CLI) writes this file as part of the patch flow — users don't normally edit it by hand.

Building

dotnet build -c Release
# → bin/Release/DorkNet.ClientMod.dll

Requires Il2Cpp interop assemblies from the user's MelonLoader install. Path defaults to dist/RecRoom-Clean-2020.03.10/MelonLoader/; override with -p:MelonLoaderDir=<path>.