Localtunnel hosting + admin panel + AppData db

- Default hosting mode is now Localtunnel — public *.loca.lt URL,
  no account, auto-fetched on first run. Replaces the prototyped
  Tailscale mode.
- Tailscale code purged from launcher + CLI; docs swapped to
  Localtunnel throughout (easy-setup, joining-a-server, server-cli,
  troubleshooting, faq, READMEs).
- Launcher sidebar gains an Open admin panel button — opens
  https://admin.<apex> in the browser once the server is live.
- SQLite db moves to %APPDATA%\DorkNet\dorknet.db (server reads
  Database__SqlitePath env var, launcher passes it). Existing dbs
  under <serverDir>\data\ are migrated on first run.
- CLI Program.cs: --mode default flips from tailscale to localtunnel;
  csproj links in LocaltunnelTunnel + LocaltunnelInstaller.
- New Backend files: LauncherNameServer, LocaltunnelInstaller,
  LocaltunnelTunnel, SingleOriginServiceMap.
- .gitignore: exclude installer/out/.
This commit is contained in:
Alexa
2026-05-28 01:39:38 +03:00
parent 7852b410ee
commit f5ad4b59ef
30 changed files with 942 additions and 184 deletions
+22 -1
View File
@@ -61,7 +61,17 @@ public static class ErrorTranslator
private static FriendlyError? TryMatch(Exception ex)
{
// Network — GitHub releases, Tunnelto tunnel API, etc.
if (ex.Message.Contains("localtunnel", StringComparison.OrdinalIgnoreCase) ||
ex.Message.Contains("loca.lt", StringComparison.OrdinalIgnoreCase))
{
return new FriendlyError(
"Localtunnel couldn't get a URL.",
TrimToSentence(ex.Message) +
" Localtunnel sometimes rate-limits or blips. Retry in a minute, or switch hosting mode to LAN if your friends are local.",
"Retry");
}
// Network — GitHub releases, legacy tunnel APIs, etc.
if (ex is HttpRequestException http)
{
return new FriendlyError(
@@ -80,6 +90,17 @@ public static class ErrorTranslator
"Retry");
}
if (ex is TimeoutException timeout)
{
var title = timeout.Message.Contains("Tunnelto", StringComparison.OrdinalIgnoreCase)
? "Tunnelto tunnel timed out."
: "Download timed out.";
return new FriendlyError(
title,
TrimToSentence(timeout.Message) + " Try again in a minute; if it repeats, Tunnelto or GitHub may be blocked on this network.",
"Retry");
}
if (ex is SocketException sock)
{
return new FriendlyError(