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
+12 -3
View File
@@ -10,7 +10,10 @@ commits follow Conventional Commits (release notes are generated from them by `C
(owner review 3). The admin panel's Settings › Network and TLS listed the container's ports (8080, 8443) as if
clients used them. In a container it now shows them read-only as *Container HTTP port* and *Container HTTPS port*,
followed by *Public HTTP port* and *Public HTTPS port* (the host ports; empty: the same as the listening ports) and
a *Client address* with Copy: exactly what to type in Chronos and in the Uploader.
a *Client address* with Copy: exactly what to type in Chronos and in the Uploader. Opened over HTTPS, the client
address uses the port the page came through, and when the saved one differs a *Use …* button fills it in as the
Public HTTPS port. Saving a Public HTTPS port other than that one asks first, since the panel's link follows it at
once.
- An address typed without a port (`192.168.1.20`, `nas.local`) now means port 8443, as the placeholder shows;
`https://name` alone still means 443 (a reverse proxy), and a typed port is kept. Addresses saved earlier keep their
port.
@@ -18,13 +21,16 @@ commits follow Conventional Commits (release notes are generated from them by `C
sign-in page, a 404 or 401, JSON of another kind) now says *No Chronos server answers at …; check the port*, naming
the address with its port. Before, JSON of another kind passed as a server (the Uploader then sent it the
password), a 401 read as a wrong password, and another service's self-signed certificate was offered for trust;
that certificate is now never offered.
that certificate is now never offered (redirects of any kind, error pages, JSON errors without Chronos's header and
oversized answers included). The HTTP port typed without a scheme (`192.168.1.20:8087`) gives the same message
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 (`fe80::1%12`) is refused as an invalid address instead of losing its zone.
### Changed
- The public ports are server settings: edited in the admin panel and applied at once to LAN discovery and the
redirect to HTTPS, or set by `CHRONOS_PUBLIC_HTTP_PORT` / `CHRONOS_PUBLIC_HTTPS_PORT`, which lock them. In a
container the listening ports change only through `CHRONOS_HTTP_PORT` / `CHRONOS_HTTPS_PORT`; a port saved for them
in `server.json` is ignored, with a warning in the log.
in `server.json` is ignored, with a warning in the log, and removed at the next save of the settings.
- The Unraid template and the compose file have *Public HTTP port* (`CHRONOS_PUBLIC_HTTP_PORT`) next to *Public HTTPS
port*; the port descriptions say to enter the same host port there. LAN discovery's tooltip, the template and the
user guide say that discovery leaves a container only with network type *Host*: on *Bridge*, type the client
@@ -35,6 +41,9 @@ commits follow Conventional Commits (release notes are generated from them by `C
HTTP port* and *Public HTTPS port* to the host ports the template maps (for example 8087 and 8444), or, after the
update, enter them in the admin panel's Settings › Network and TLS. Then connect Chronos and the Uploader to the
*Client address* shown there (for example `https://192.168.1.20:8444`).
- Network type *Host* (for LAN discovery) ignores the port mappings: the server listens on the host's 8080 and 8443.
If another service uses either, add the variable `CHRONOS_HTTP_PORT` or `CHRONOS_HTTPS_PORT` with a free port first,
and leave the public ports empty.
## [0.1.0-rc.8] — 2026-11-03
+7 -2
View File
@@ -615,7 +615,12 @@ One line per decision: date · decision · alternative · reason.
| 2026-11-04 | `ServerSettingsDto` gains `PublicHttpPort`, `PublicHttpsPort` and `InContainer`, appended as optional positional members. In a request a null public port keeps the saved value and 0 clears it; responses send null when unset. | null clears | A client or script of the earlier shape sends no public ports: with null as "clear" every save from it would drop them, or be refused as `setting_locked` when a variable fixes them. |
| 2026-11-04 | In a container (`DOTNET_RUNNING_IN_CONTAINER=true`, read in `ServerOptions.Load`; tests set `ServerOptions.InContainer`) the listening ports are locked (listed in `Locked`, `lockedBy` `DOTNET_RUNNING_IN_CONTAINER` unless a `CHRONOS_HTTP(S)_PORT` sets them) and a `server.json` value for them is ignored with a warning at start; the variables still change them. | Keep honouring server.json | The template publishes the default container ports: a port saved from the panel before would leave the container unreachable after a restart. Host networking users who need other ports set the variables. |
| 2026-11-04 | Listening ports are validated only when a request changes them. | Always validate | A value the panel cannot change (a container's, the test server's 0) must never block saving the other settings. |
| 2026-11-04 | The admin panel's client address is computed in the browser from the saved settings: `https://` + `location.hostname` (IPv6 in brackets) + `:` + public HTTPS port or HTTPS port (no port when 443); `location.origin` in TLS mode proxy. No other page shows a pairing code or a connect hint, so it appears only in Settings › Network and TLS. | Server-side address | Only the browser knows the host name the LAN uses for the server (an IP, a NAS name); the server sees its container address. |
| 2026-11-04 | The admin panel's client address is computed in the browser: `https://` + `location.hostname` (IPv6 in brackets) + `:` + the port the page came through when the browser speaks HTTPS to the server itself, else (plain HTTP, only from the server's own machine) the public HTTPS port or HTTPS port (no port when 443); `location.origin` in TLS mode proxy. When the page's HTTPS port is not the saved one (a container's 8443 published as 8444, Public HTTPS port still empty), a *Use 8444* button next to Public HTTPS port fills it in. No other page shows a pairing code or a connect hint, so it appears only in Settings › Network and TLS. | Server-side address | Only the browser knows the host name the LAN uses for the server (an IP, a NAS name); the server sees its container address. |
| 2026-11-04 | One address rule for both clients, `Chronos.Protocol.Client.ChronosAddress` (both apps reference Chronos.Protocol, which builds on Linux): no scheme and no port means https on 8443, `https://host` keeps 443, a typed port is kept, a bare IPv6 address is bracketed. Saved addresses carry their scheme, so they keep their port. | A copy per app | The placeholder and the error text say `nas.local:8443`; "192.168.30.23" meant port 443. |
| 2026-11-04 | `ChronosClient.GetInfoAsync` throws `NotChronosServerException` for an HTML or redirected page, JSON without a Chronos `ServerInfo` (name, version, API version, lists, limits), or a 4xx without a Chronos error; on an untrusted certificate it reads `server/info` once more with certificate checks off and no token, and only a Chronos answer leads to the fingerprint question. Nothing is trusted or stored by that read. | Ask about the fingerprint first | Before, `{}` was accepted as a server (the Uploader then sent the password to it), a 401 read as a wrong password, and the self-signed certificate of another service on port 8443 was offered for trust. |
| 2026-11-04 | `ChronosClient.GetInfoAsync` throws `NotChronosServerException` when `server/info` is not Chronos's: any 3xx (Chronos never redirects it), any answer that is not JSON whatever its status, more than 1 MB, JSON without a Chronos `ServerInfo` (name, version, API version, lists, limits), or an error without the `X-Chronos-Api` header every Chronos response carries and a Chronos error code. A busy answer (408, 429, 502-504) with JSON or no body cannot tell. On an untrusted certificate it reads `server/info` once more with certificate checks off, no token, no cookies and no redirects, under the same rules, and only a Chronos answer leads to the fingerprint question. Nothing is trusted or stored by that read. | Ask about the fingerprint first | Before, `{}` was accepted as a server (the Uploader then sent the password to it), a 401 read as a wrong password, and the self-signed certificate of another service on port 8443 was offered for trust. |
| 2026-11-04 | The not-Chronos error names the normalised address (port included) in new keys `Server.Error.NotChronosAt` and `Uploader.Connect.Error.NotChronosAt`; the old keys stay as they are. | Add {0} to the old keys | The 36 other cultures translate the old keys without the placeholder; changing it would fail the i18n check until they are translated again. |
| 2026-11-04 | Saving a public HTTPS port (or clearing it to the listening one) other than both the saved one and the port this page came through over HTTPS asks first (*Send clients to port 8445?*); the server does not check it. | Server-side warning in the log | The HTTPS redirect follows the saved port at once, so a typo would send the panel's link to a dead port or another service's sign-in page; only the browser knows which port really reached the server. Saving other settings never asks. |
| 2026-11-04 | `GetInfoAsync`: when TLS fails on an HTTPS address and no certificate was refused (the port speaks plain HTTP: the HTTP port typed without a scheme, `192.168.30.23:8087`), it reads `server/info` over `http://` on the same authority, without credentials; any answer gives `NotChronosServerException` (check the port, the client address), no answer rethrows (unreachable). | Report it as unreachable | The server did answer; the useful advice is the port and the panel's client address. |
| 2026-11-04 | In a container, the first save of the settings removes `HttpPort` and `HttpsPort` from `server.json` (also when nothing else changed); the start-up warning says so. | Remove them at load | Load only reads; the panel cannot edit locked ports, so without this the warning came back at every start. |
| 2026-11-04 | Host networking: the guide, README and compose comments say the port mappings do nothing there, the server listens on the host's 8080/8443 and `CHRONOS_HTTP_PORT` / `CHRONOS_HTTPS_PORT` move it off ports another service uses (public ports empty). No template entries for them. | Advanced template entries *Listening HTTP/HTTPS port* | On Bridge such an entry would unmap the template's ports; Host users add a variable, which Unraid offers on every container. |
| 2026-11-04 | `ChronosAddress` refuses a link-local IPv6 address with a zone index (`fe80::1%12`): *Invalid address*. | Keep the zone as `%25` | `Uri` and the connection would drop the zone, failing later with a less clear error; the LAN address or name works. |