launcher: grandma-proof batch 1 — auto-detect + LAN mode

- RecRoomPicker.Detect: scan common manual-install paths (Documents/Recnet/dist, Downloads, C:\Games, etc.) on first run; never touches Steam libraries per policy
- RecRoomVersionDetector: three-signal cascade (version.txt -> PE timestamp -> file size) maps install to a manifest branch so version dropdown defaults correctly
- CloudflaredInstaller: download latest cloudflared-windows-amd64.exe from GitHub releases to %LOCALAPPDATA%\DorkNet on first host; resolves side-by-side -> cache -> PATH -> download
- LocalNetwork.GetLanIp + AppState.HostingMode (Internet|LocalNetwork) + Host view "WHO CAN JOIN?" radio: LAN-only mode skips Cloudflare entirely for families on one network
- OnHostStart branches on HostingMode; status text reflects local IP vs public tunnel URL
This commit is contained in:
Alexa
2026-05-27 11:03:00 +03:00
parent a5ae5da344
commit 65ca509fa8
8 changed files with 523 additions and 29 deletions
+23 -3
View File
@@ -14,9 +14,10 @@ public sealed class AppState
[JsonPropertyName("mode")]
public AppMode Mode { get; set; } = AppMode.Unset;
/// <summary>Path to the user's Recroom_Release_Data folder. Picked
/// via the folder dialog; never auto-detected per project policy
/// (no Steam library scanning).</summary>
/// <summary>Path to the user's Recroom_Release_Data folder. First
/// run auto-fills via <see cref="RecRoomPicker.Detect"/> (scans
/// common manual-install paths only, never Steam library); user
/// can override via the folder dialog.</summary>
[JsonPropertyName("recRoomPath")]
public string? RecRoomPath { get; set; }
@@ -38,6 +39,14 @@ public sealed class AppState
[JsonPropertyName("photonRegion")]
public string PhotonRegion { get; set; } = "us";
/// <summary>How the host exposes the server: <c>Internet</c> uses
/// a Cloudflare quick-tunnel (works for friends anywhere with the
/// join code); <c>LocalNetwork</c> binds the LAN IP and skips the
/// tunnel entirely (no internet dependency, joiners must be on
/// the same network).</summary>
[JsonPropertyName("hostingMode")]
public HostingMode HostingMode { get; set; } = HostingMode.Internet;
/// <summary>Host's server name shown in the join code. Empty until
/// the user fills it in on first-run host setup.</summary>
[JsonPropertyName("serverName")]
@@ -81,3 +90,14 @@ public enum AppMode
Host,
Join,
}
public enum HostingMode
{
/// <summary>Default — Cloudflare quick-tunnel, public over the
/// internet, works for joiners anywhere.</summary>
Internet,
/// <summary>LAN only — bind the machine's local IP, skip the
/// tunnel, no internet dependency. Joiners must be on the same
/// network.</summary>
LocalNetwork,
}