mirror of
https://github.com/DorkSquadRR/DorkNet.git
synced 2026-10-26 15:38:45 -07:00
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:
@@ -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,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user