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:
1 parent
9b24cf74fc
commit
369e754bec
33 files changed
+862
-82
No files matched your search
@@ -10,7 +10,7 @@ Companion to `docs/BRIEF.md` (scope, behaviour) and `docs/ui/DESIGN.md` (looks).
|
||||
| `src/Chronos.Core` | net10.0 | Engine shared by every program: metadata, codecs, imaging, analysis, advisor, motion, render, video containers and managed encoders, archive format, naming, import planning, packaging, localization runtime, diagnostics, brand mark |
|
||||
| `src/Chronos.Core.Windows` | net10.0-windows | WIC decoders and codec inventory, Media Foundation encoders, DXGI adapters, removable devices and volume free space, DPAPI, shell launcher, window chrome, power (P/Invoke/COM only) |
|
||||
| `src/Chronos.Data` | net10.0 | `IDatabase`, SQLite binding, PostgreSQL wire client, migrations, repositories, the job engine, the archive engine (`Archiving`), the analysis/render engine (`Processing`) and the client sync engine (`Sync`) |
|
||||
| `src/Chronos.Protocol` | net10.0 | API v1 DTOs, source-generated JSON context, typed `ChronosClient` with certificate pinning and bandwidth limiting |
|
||||
| `src/Chronos.Protocol` | net10.0 | API v1 DTOs, source-generated JSON context, typed `ChronosClient` with certificate pinning and bandwidth limiting, `ChronosAddress` (how both clients read a typed server address) |
|
||||
| `src/Chronos.Server` | net10.0 (Web SDK) | ASP.NET Core minimal API, auth, uploads, sync, jobs, render nodes, events, embedded admin panel, Windows service host |
|
||||
| `src/Chronos.Ui` | net10.0-windows (WPF) | Theme (DESIGN tokens), icons, standard and custom controls, visuals (charts, filmstrip, preview, curve editor, virtualizing grid), `Loc` markup extension, MVVM helpers, notification-area icon |
|
||||
| `src/Chronos.App` | WPF exe `Chronos.exe` | Desktop client |
|
||||
|
||||
+33
-5
@@ -1498,7 +1498,15 @@ Global job bar mirrors the active job.
|
||||
|
||||
First connection shows the certificate fingerprint (trust-on-first-use); login modal;
|
||||
per-sequence sync actions and states; conflict resolution only for settings JSON (keep
|
||||
mine / take server / save both).
|
||||
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
|
||||
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).
|
||||
|
||||
### 12.8 Settings
|
||||
|
||||
@@ -2119,7 +2127,14 @@ clean-up* schedule's age limit, R10), Logs (amended 2026-10-26, R11: file level
|
||||
level (Trace…None, default Information), keep logs (days), file size (MB), logs total (MB),
|
||||
rotation (daily or hourly, UTC), keep audit (days; the *Audit log clean-up* schedule's age
|
||||
limit, §14.6), diagnostics logs (MB), applied without a restart)). A field an environment
|
||||
variable fixes is read-only, its tooltip naming that variable (`lockedBy`, §14.3; R11). The
|
||||
variable fixes is read-only, its tooltip naming that variable (`lockedBy`, §14.3; R11).
|
||||
Network and TLS (amended 2026-11-04, owner review 3): HTTP port and HTTPS port (in a
|
||||
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
|
||||
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
|
||||
@@ -2270,10 +2285,19 @@ it has worked in between; uploads always check the archive's own volume, §14.4,
|
||||
conversion the tighter of the two, §14.3: amended 2026-10-26, R7),
|
||||
`CHRONOS_DB=postgres|sqlite` (Linux: postgres only), `CHRONOS_DB_HOST`, `CHRONOS_DB_PORT=5432`,
|
||||
`CHRONOS_DB_NAME`, `CHRONOS_DB_USER`, `CHRONOS_DB_PASSWORD`, `CHRONOS_DB_SSLMODE=prefer`,
|
||||
`CHRONOS_HTTP_PORT=8080`, `CHRONOS_HTTPS_PORT=8443`, `CHRONOS_TLS_MODE=auto|pem|proxy`,
|
||||
`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
|
||||
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;
|
||||
amended 2026-11-04, owner review 3), `CHRONOS_TLS_MODE=auto|pem|proxy`,
|
||||
`CHRONOS_TLS_CERT`, `CHRONOS_TLS_KEY`, `CHRONOS_SERVER_NAME`, `CHRONOS_LANG=en`,
|
||||
`CHRONOS_PARALLELISM` (photos the running job processes at once; `CHRONOS_WORKERS`, its former
|
||||
name, still sets it), `CHRONOS_PRIORITY_QUEUE=false`, `CHRONOS_DISCOVERY=true` (LAN UDP beacon),
|
||||
name, still sets it), `CHRONOS_PRIORITY_QUEUE=false`, `CHRONOS_DISCOVERY=true` (LAN UDP beacon; it leaves a
|
||||
container only with host networking, Unraid network type Host: amended 2026-11-04, owner
|
||||
review 3),
|
||||
`CHRONOS_LOG_LEVEL` (Trace|Debug|Information|Warning|Error|Critical|None, also `info`,
|
||||
`warn`, `off`; default Information: sets the level of the log files and of the console and
|
||||
locks both in the admin panel), `CHRONOS_LOG_CONSOLE_LEVEL` (the console alone, read after
|
||||
@@ -2536,7 +2560,10 @@ the log variables, *Log level* `CHRONOS_LOG_LEVEL` included, and *Audit retentio
|
||||
`CHRONOS_AUDIT_RETENTION_DAYS` are advanced and empty by default (each description gives
|
||||
the default), so the admin panel's Settings › Logs chooses them; a value given in the
|
||||
template locks its setting; TZ also sets the time zone of the schedules; amended
|
||||
2026-10-26, R10, R11), description ≤ 2 sentences.
|
||||
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
|
||||
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
|
||||
`https://gitea.encke-hake.ts.net/BalboSoft/Chronos/raw/branch/main/deploy/unraid/chronos.xml`,
|
||||
@@ -2735,6 +2762,7 @@ questions asked and the answers; DECISIONS rows give the reasons.
|
||||
| 2026-10-26 | Owner review 2, R7 (naming) | §7.1, §13, §14.3 | One naming rule for import, upload and Reorganize: the sequence's camera and lens, `{n}` its place, a frame without a time at the sequence's start; template rules everywhere a template is typed or sent (no folder level scans skip, one a value such as a title gives escaped with `_`; a file template keeps the extension, tells photos apart, holds no slash; long names shortened before `.{ext}`; titles as text), held to a template only when it is given anew; `invalid_template` names the rule. |
|
||||
| 2026-10-26 | Owner review 2, R7 (conversion) | §5, §7, §8.1, §8.3, §8.7, §9, §12.2, §12.4, §12.5, §13, §14.3, §14.4, §14.5, §14.8, §14.9 | Convert after import on the desktop (the Archive manager's set, the Library's selection) and the admin panel (the Library's selection): JPEG with a quality, TIFF-16 or linear DNG (the archival choice, scene-referred so a RAW's highlights above white and colours outside sRGB survive), Replace or New sequence chosen at every run and never remembered, behind a dry run that lists each sequence's photos, sizes and the photos that stay as they are with why, and the free space where the conversion writes; Replace confirmed by typing; the `convert` job (stored as 19) converts exactly the photos confirmed, one sequence at a time and all or nothing, resumable through its journals and staging, never twice at once; full-resolution decodes only (the managed decoders first, never a 16-bit file from an 8-bit RAW development; the server leaves what it cannot read to a PC), what Chronos reads from a photo never changed (profiles carried, a linear DNG of sRGB values only), Exif carried, every file verified by the server's decoders; Replace swaps the files of the frames in place under a crash-safe journal, the originals going into a replaced trash entry that Undo or Restore swaps back and that Empty erases only while the archive on disk shows each conversion intact, or deleted on its own word (a tombstone, the trash, an erasure record); import still copies byte for byte and the card keeps a converted photo's copy; sync and the ingest count every encoding of a photo as one; `POST /api/v1/archive/convert` with the plan cache it shares with Reorganize, `sequenceChanged` `converted` and `created`, the audit `archive_converted`. |
|
||||
| 2026-10-26 | Owner review 2, R8 (phase 5a: workspace and projects, local home) | §4.4, §5, §7, §12.2, §12.3, §12.6, §12.8, §14.5, §14.6 | A sequence's home (this PC's archive) keeps its projects: Main, mirrored both ways with the sequence's settings so older clients and sync keep working, and other named projects, each a linear history of immutable versions in the portable form (positions parked by photo, SHA-256 of canonical text), stored as sidecars in `.chronos/projects/` and indexed by migration 0009 (`projects`, `project_versions`, `renders.project_id`/`project_version_id`); deletions only on the archive's word, the trash read first; Edit opens only workspace projects: *Open in workspace* (project, proxies), the `workspace-copy` job (stored as 20, desktop only, hash-verified, resumable, space checked), the working state in a folder outside the library, the project button with its state chip and menu (Save version, Sync, History with Compare and Restore, Open, New, Rename, Delete, Remove local copy), push and pull with replay and field-level merge, conflicts only when both sides changed a setting (Keep mine, Take library's, Save both, Later), renders at the home with the settings embedded; Settings › Workspace (folder, sync, kept versions). The server home is phase 5b; originals, local render, clean-up and the rest of Settings › Workspace are phase 5c. |
|
||||
| 2026-11-04 | Owner review 3 (ports) | §12.7, §14.8, §14.9, §15, §19.6 | The public HTTP/HTTPS ports are server settings as well as variables (a variable locks them), applied at once; in a container the listening ports are locked to the template's; the admin panel's Network and TLS shows the container's ports, the public ports and the client address with Copy; clients read an address without scheme or port as port 8443 and report an address that answers as something else, never offering its certificate for trust; the Unraid template and compose gain *Public HTTP port*. |
|
||||
|
||||
## Appendix A — `CLAUDE.md` content (create verbatim in Phase 0, keep updated)
|
||||
|
||||
|
||||
@@ -5,6 +5,37 @@ commits follow Conventional Commits (release notes are generated from them by `C
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
### Fixed
|
||||
- Chronos and the Uploader could not reach a server in a container whose ports are published as other host ports
|
||||
(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.
|
||||
- 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.
|
||||
- An address that answers but is not a Chronos Server (another service on that port: a web page, a redirect to its
|
||||
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.
|
||||
|
||||
### 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.
|
||||
- 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
|
||||
address.
|
||||
|
||||
### Upgrade note for Unraid
|
||||
- Edit the container: set *Repository* from `…/chronos-server:nightly` to `…/chronos-server:latest`, and set *Public
|
||||
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`).
|
||||
|
||||
## [0.1.0-rc.8] — 2026-11-03
|
||||
|
||||
### Added
|
||||
|
||||
@@ -611,3 +611,11 @@ One line per decision: date · decision · alternative · reason.
|
||||
| 2026-11-03 | Workspace texts: the workspace's strings live in the existing Editor, Tooltips, Settings and Errors areas; the home is called "the library" (the server home will name its server), Main is shown in the UI language (it: Principale), and versions carry the bare PC name (`Environment.MachineName`; History strips `chronos@`, `server@`, `workspace@` and `Chronos on`). (Owner review 2, R8.) | A new Workspace area | No new resource files to translate; the wording matches the rest of the desktop. |
|
||||
| 2026-11-03 | `ProjectMenuViewModel` reaches the window only through `IWorkspaceUi` (dialogs, `ShowDialogWhenFree`, confirmations, toasts, opening and closing a project). A conflict found by an automatic sync waits for the open dialog and is asked once. (Owner review 2, R8.) | Depend on the shell; replace the open dialog | Its logic is tested without a window, and a background prompt never hides what the user is doing. |
|
||||
| 2026-11-03 | Leases: `LeaseFile.TryAcquire` and `AcquireAsync` take `createDirectory` (default true); the copy's clean-up passes false. `WorkspaceSync.OpenAsync` reads the working state and the media under the project's lease; a lease still busy after the wait is `Errors.Workspace.Busy`. (Owner review 2, R8, fix rounds 1, 2 and 5.) | Always create the folder; read without the lease | A clean-up must never make a removed project folder again, and the editor never reads a half-written working state. |
|
||||
| 2026-11-04 | Public ports are settings: `PublicHttpPort`/`PublicHttpsPort` in `server.json`, edited in Settings › Network and TLS, locked by `CHRONOS_PUBLIC_HTTP(S)_PORT`, applied at once by setting the shared `ServerOptions` that LAN discovery and the admin redirect read at every use. | Variables only | The owner read the container ports in the panel as the ports to use; the host ports must be settable where the ports are shown, and nothing caches them. |
|
||||
| 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 | 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 | 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. |
|
||||
Reference in new issue
Block a user