fix(server): client address from the page's port, stricter Chronos identity, Host networking notes

Review fixes on top of the public ports change (owner review 3):

- Settings > Network and TLS: opened over HTTPS, the client address uses the port
  the page came through (a container's 8443 published as 8444 with Public HTTPS
  port still empty showed the wrong 8443), and a "Use <port>" button fills that
  port in. Saving a Public HTTPS port other than the page's asks first, since the
  HTTPS redirect follows it at once and a typo would lock the panel's link out.
- GetInfoAsync tells Chronos from other services by stricter rules on both the
  trusted and the untrusted-certificate path: any redirect, any answer that is not
  JSON, more than 1 MB, or an error without the X-Chronos-Api header is not
  Chronos. Another service's certificate is no longer offered for trust after a
  cross-scheme redirect, an error page or a JSON 401/403/404, and a JSON 401 over
  HTTP no longer reads as a wrong password.
- The HTTP port typed without a scheme (TLS to a plain HTTP port) now gives the
  not-Chronos error instead of "the server did not answer".
- The Uploader's certificate question names the address with its port.
- A link-local IPv6 address with a zone index is refused instead of losing it.
- In a container, the first save of the settings removes HttpPort/HttpsPort from
  server.json, so the start-up warning stops; the warning says so.
- Guide, README, compose and template: with network type Host the mappings do
  nothing and CHRONOS_HTTP_PORT / CHRONOS_HTTPS_PORT move the listening ports off
  ones another service uses; the template overview is back to two sentences.
- BRIEF, DECISIONS and CHANGELOG 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 10:28:08 +01:00
1 parent 369e754bec
commit 0aa2fb8135
19 files changed
+303 -67

No files matched your search

+17 -9
View File
@@ -1501,9 +1501,11 @@ per-sequence sync actions and states; conflict resolution only for settings JSON
mine / take server / save both). The address field, here and in the Uploader (§15), reads
one rule: no scheme means HTTPS, and then no port means 8443, the server's HTTPS port;
`https://<name>` alone keeps 443 (a reverse proxy); a typed port is kept; a bare IPv6
address gets its brackets. An address that answers but not as a Chronos Server (an HTML
page, a redirect to a sign-in page, a 4xx without a Chronos error, JSON of another shape)
fails with one sentence naming the address and the port to check; behind a certificate not
address gets its brackets; a link-local one with a zone index is refused. An address that
answers but not as a Chronos Server (any redirect, an answer that is not JSON, an error
without Chronos's `X-Chronos-Api` header and error code, JSON of another shape, more than
1 MB, or plain HTTP on a port reached over HTTPS) fails with one sentence naming the
address and the port to check; behind a certificate not
trusted yet, `server/info` is read once without checking it and without credentials, and only
a Chronos answer leads to the fingerprint question, so another service's certificate is never
offered for trust (amended 2026-11-04, owner review 3).
@@ -2132,9 +2134,12 @@ Network and TLS (amended 2026-11-04, owner review 3): HTTP port and HTTPS port (
container *Container HTTP/HTTPS port*, read-only: the template maps them to host ports),
*Public HTTP port* and *Public HTTPS port* (empty: the listening port, shown as placeholder;
applied at once to LAN discovery and the HTTPS redirect), and a read-only *Client address*
with Copy: `https://<the host name the browser used>:<public HTTPS port>`, the proxy's
address in TLS mode proxy, which is what users type in Chronos and the Uploader; the
discovery tooltip says that a container needs network type Host for it. The
with Copy: `https://<the host name the browser used>:<the HTTPS port the page came through,
else the public HTTPS port>`, the proxy's address in TLS mode proxy, which is what users type
in Chronos and the Uploader; when the page's HTTPS port is not the saved one, a *Use <port>*
button fills it in as the Public HTTPS port, and saving a Public HTTPS port other than the
page's asks first, as the redirect follows it at once; the discovery tooltip says that a
container needs network type Host for it. The
last group of Settings, About, is read-only: version, API version, database and uptime (the
server name and the fingerprint are in the groups above); an old `#/about` link opens Settings on it (amended 2026-10-26,
R4, R5). Same UI rules: tooltips only, light/dark, localised via `/api/v1/i18n`, keyboard
@@ -2287,8 +2292,9 @@ conversion the tighter of the two, §14.3: amended 2026-10-26, R7),
`CHRONOS_DB_NAME`, `CHRONOS_DB_USER`, `CHRONOS_DB_PASSWORD`, `CHRONOS_DB_SSLMODE=prefer`,
`CHRONOS_HTTP_PORT=8080`, `CHRONOS_HTTPS_PORT=8443` (in a container, where
`DOTNET_RUNNING_IN_CONTAINER=true`, the listening ports are the template's: only these
variables change them, the admin panel shows them read-only and a `server.json` value is
ignored with a warning), `CHRONOS_PUBLIC_HTTP_PORT` and `CHRONOS_PUBLIC_HTTPS_PORT` (the host
variables change them, which network type Host needs when another service uses 8080 or
8443; the admin panel shows them read-only and a `server.json` value is ignored with a
warning and removed at the next save), `CHRONOS_PUBLIC_HTTP_PORT` and `CHRONOS_PUBLIC_HTTPS_PORT` (the host
ports clients use when a container's ports are published as others: LAN discovery, the HTTPS
redirect and the admin panel's client address use them; also the admin panel's *Public
HTTP/HTTPS port*, `PublicHttpPort`/`PublicHttpsPort` in `server.json`, applied at once;
@@ -2562,7 +2568,9 @@ the default), so the admin panel's Settings › Logs chooses them; a value given
template locks its setting; TZ also sets the time zone of the schedules; amended
2026-10-26, R10, R11), *Public HTTP port* `CHRONOS_PUBLIC_HTTP_PORT` and *Public HTTPS port*
`CHRONOS_PUBLIC_HTTPS_PORT`, empty by default, next to the ports, whose descriptions say to
enter the same host port there when it changes; the overview names the client address and
enter the same host port there when it changes and that network type Host ignores the mapping (the
server then listens on 8080 and 8443 itself; the user guide says to add `CHRONOS_HTTP_PORT` /
`CHRONOS_HTTPS_PORT` when another service uses either); the overview names the client address and
that LAN discovery needs network type Host (amended 2026-11-04, owner review 3), description ≤ 2 sentences.
Registry and Project `https://gitea.encke-hake.ts.net/BalboSoft/Chronos`,
Support `https://gitea.encke-hake.ts.net/BalboSoft/Chronos/issues`, TemplateURL