RynthCore as of 2026-09-27 (internal d359eee): items past the old object-id range, no idle logoff, overlay popups without the panel flash, UI hidden at character select, vendor trading (API 67), Settings rows and Vendoring tab, release 2026.9.27.2

This commit is contained in:
Tom Bohar 2026-09-27 20:25:45 -04:00
commit 9b5e2765b7
43 changed files with 4216 additions and 62 deletions

View file

@ -58,9 +58,9 @@ internal sealed class AgentConfig
/// netsh urlacl or running elevated). Must end in '/'.</summary>
[JsonPropertyName("ServePrefix")] public string ServePrefix { get; set; } = "http://127.0.0.1:8740/";
/// <summary>Optional shared secret. When set, GET /status requires
/// <c>Authorization: Bearer &lt;token&gt;</c> or <c>?token=</c>. Empty = open
/// (fine for a 127.0.0.1 / private-tailnet bind).</summary>
/// <summary>Shared secret, required when <see cref="ServeHttp"/> is on: every route but
/// /healthz needs <c>Authorization: Bearer &lt;token&gt;</c> or <c>?token=</c>. Empty =
/// the server stays off, on any bind (it can stream the screens and click in them).</summary>
[JsonPropertyName("ServeToken")] public string ServeToken { get; set; } = "";
/// <summary>When true, also write the latest rollup to

View file

@ -1,6 +1,7 @@
using System.Collections.Concurrent;
using System.Net;
using System.Net.WebSockets;
using System.Security.Cryptography;
using System.Text;
using System.Text.Json;
@ -74,6 +75,14 @@ internal sealed class LocalStatusServer : IDisposable
public bool TryStart(out string error)
{
// Never serve without a token, loopback included: every route but /healthz is behind it.
if (_token == null)
{
error = "no ServeToken set";
Running = false;
return false;
}
try
{
_listener.Start();
@ -741,13 +750,17 @@ internal sealed class LocalStatusServer : IDisposable
{
string? header = req.Headers["Authorization"];
if (header != null && header.StartsWith("Bearer ", StringComparison.OrdinalIgnoreCase) &&
string.Equals(header.Substring("Bearer ".Length).Trim(), _token, StringComparison.Ordinal))
TokenMatches(header.Substring("Bearer ".Length).Trim()))
return true;
string? q = req.QueryString["token"];
return q != null && string.Equals(q, _token, StringComparison.Ordinal);
return q != null && TokenMatches(q);
}
private bool TokenMatches(string candidate)
=> _token != null && CryptographicOperations.FixedTimeEquals(
Encoding.UTF8.GetBytes(candidate), Encoding.UTF8.GetBytes(_token));
private static void Write(HttpListenerResponse res, int status, string contentType, byte[] body)
{
try

View file

@ -57,7 +57,15 @@ else
LocalStatusServer? server = null;
WebRtcVideoService? video = null; // HD WebRTC video mode (opt-in); disposed in finally
IconService? icons = null; // item-icon decoder (GET /icon); disposed in finally
if (cfg.ServeHttp)
if (cfg.ServeHttp && string.IsNullOrWhiteSpace(cfg.ServeToken))
{
// Same rule as DrakBot's remote: no token, no server, loopback included. The server can show
// the game screens, click in them and close clients.
AgentLog.Warn("ServeHttp is on but ServeToken is empty, so the status server stays off.");
AgentLog.Warn($"Set \"ServeToken\" in {configPath} and restart the agent. Use the same token as your");
AgentLog.Warn("DrakBot remote and one DrakRemote entry shows both.");
}
else if (cfg.ServeHttp)
{
string? commandDir = cfg.EnableRemoteControl ? Path.Combine(cfg.StatusDirectory, "commands") : null;
VideoSocketService? videoSocket = null;

View file

@ -25,8 +25,9 @@
<ItemGroup>
<!-- Screen-stream capture (GDI BitBlt + JPEG encode). Windows-only; the agent is net*-windows. -->
<PackageReference Include="System.Drawing.Common" Version="9.0.0" />
<!-- WebRTC HD video mode: pure-managed RTCPeerConnection + H.264 RTP packetisation (proven in the spike). -->
<PackageReference Include="SIPSorcery" Version="8.0.14" />
<!-- WebRTC HD video mode: pure-managed RTCPeerConnection + H.264 RTP packetisation (proven in the spike).
10.0.14 is the floor: it fixes GHSA-jwjp-4649-v8jp (SCTP SACK) and GHSA-28gm-jrmw-xx93 (RTP/STUN). -->
<PackageReference Include="SIPSorcery" Version="10.0.14" />
</ItemGroup>
</Project>