fix(server): public ports as settings, container port lock and client address; clients default to 8443 and name non-Chronos servers

The owner's Uploader could not connect: the panel showed the container's
listening ports (8080/8443) as if clients used them, the public ports were
only environment variables (CHRONOS_PUBLIC_HTTP_PORT not even in the Unraid
template), and the clients mapped a bare host to 443, where another service
answered.

- Public HTTP/HTTPS ports are settings (server.json, or locked by
  CHRONOS_PUBLIC_*) and apply at once; ServerSettingsDto gains appended
  PublicHttpPort, PublicHttpsPort and InContainer members.
- In a container the listening ports are fixed by the template: locked in the
  panel, and saved values from earlier versions are ignored with a warning.
- Settings > Network and TLS shows the client address with a Copy button; the
  discovery tooltip says a container needs network type Host.
- ChronosAddress (shared by Chronos and the Uploader): no scheme and no port is
  https on 8443, https:// keeps 443, a typed port is kept, IPv6 is bracketed.
- GetInfoAsync throws NotChronosServerException for answers that are not a
  Chronos server; another service's certificate is never offered for trust
  and no credentials are sent to it. Both clients name the address asked.
- Unraid template, compose file, user guide, README, BRIEF, DECISIONS,
  CHANGELOG (with an Unraid upgrade note) and ARCHITECTURE updated; en/it
  strings added.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Alby96andClaude Opus 5.5 committed 2026-11-04 09:53:49 +01:00
1 parent 9b24cf74fc
commit 369e754bec
33 files changed
+862 -82

No files matched your search

+11 -1
View File
@@ -10,6 +10,13 @@ namespace Chronos.Protocol;
/// <see cref="Parallelism"/> is how many photos the running job processes at once (jobs run one at a time), and
/// <see cref="PriorityQueue"/> with <see cref="JobPriorities"/> the priority queue (owner review 1); both apply at once, as
/// do <see cref="Logs"/> (owner review 2, R11; a request without them keeps them as they are).
/// <see cref="PublicHttpPort"/> and <see cref="PublicHttpsPort"/> (owner review 3) are the ports clients reach the server
/// on when the host publishes the listening ports as others (a container): null in a response when they are the
/// listening ports; in a request, null keeps them as they are (a client that predates them) and 0 clears them. They
/// apply at once (LAN discovery, the admin panel's HTTPS redirect). <see cref="InContainer"/> (responses only) says the
/// server runs in a container, whose listening ports the template fixes: they are then locked, named in
/// <see cref="Locked"/> with the variable <c>DOTNET_RUNNING_IN_CONTAINER</c> unless one of their own fixes them. The
/// members added since are last and optional, so clients and panels of the shape before them keep working.
/// </summary>
public sealed record ServerSettingsDto(
string ServerName,
@@ -32,7 +39,10 @@ public sealed record ServerSettingsDto(
IReadOnlyList<string> Locked,
IReadOnlyDictionary<string, string> LockedBy,
bool RestartRequired,
bool ProxyWarning);
bool ProxyWarning,
int? PublicHttpPort = null,
int? PublicHttpsPort = null,
bool InContainer = false);
/// <summary>
/// The log settings of <see cref="ServerSettingsDto"/> (owner review 2, R11): the least severe level of the files and of the