Merge master into feat/portable-characters

This commit is contained in:
Дмитрий committed 2026-10-10 07:59:32 +05:00
commit 2b95553168
44 files changed
+2614 -108

No files matched your search

+23 -2
View File
@@ -401,8 +401,29 @@ hand over to `coa_core::docker`; nothing else needed to change for start, stop,
produces `Database/baseline` without anyone's live database. The migration checksums recorded in the base are those of
files checked out on Windows (CRLF line endings, `core.autocrlf`): the SQL of the core, the modules and SQUID must be
checked out the same way for the checksums to match, or every applied migration looks edited.
* **Not done yet**: wiring the installer into the screens, downloading the game data, updates, port conflict detection,
the firewall and exposure checks, the Wildcard realm profiles, and the client under Wine/Proton.
* **In the screens** the host is asked once per command (`coa_core::platform::flavor()`: repack on Windows, Docker
elsewhere) and the Docker half lives in `src-tauri/src/docker_install.rs`; the repack arm of each install command is the
code that was there. `install_environment` tells the install screen the kind of server, the suggested folder
(`~/CoaServer`) and why Docker cannot be used, if it cannot. On Docker the screen also asks for the game data folder and
the package, and there is no default package address until a signed Linux package is published. Packages are checked with
the embedded key; only a debug build (`tauri dev`) accepts another one, named in `COA_DEV_TRUSTED_KEY`, to try the
installer on a package signed with a throwaway key.
* **Updates are refused for a Docker server, never half done.** `update::preview`, `apply` and `rollback` refuse it: the
update packages are the repack's (executables, a bundled MySQL, a launcher) and applying one would put Windows files in a
Linux folder. Found by installing a server with the screen: the update check had read the Windows channel and offered one.
* **Realm profiles (CoA / Wildcard) work on a Docker server.** What the repack's patched launcher did at each start is done
by the Docker backend: finish an interrupted switch (`realms::before_start`), name the realms in the realm list, and give
the containers the databases of the selected realm (`acore_world_wildcard` ...). The switch itself (configuration swap,
database copy, journal) is the shared code; `prepare_launcher` has nothing to patch, and Wildcard support is read from
`Core/worldserver` as it is from `Core/worldserver.exe`.
* **The game client starts under Wine on a Linux host** (`wine.rs`; `client::launch` and `client::is_running` hand over):
umu-launcher with a Proton build when `umu-run` is installed (the newest GE-Proton found for Steam, or umu's own choice),
else plain Wine; `WINEPREFIX` defaults to `~/Games/umu/coa-client`; `WINEDLLOVERRIDES=divxtac=d` is always set, because
DivxTac.dll deadlocks the world loading screen under wine-mono. `COA_PROTONPATH`, `COA_WINEPREFIX` or
`client-launch.json` in the Manager's folder (`proton_path`, `prefix`, `runner`) override the detection. Whether the client
runs is read from `/proc` (under Wine the command line holds the Windows form of the path). Output goes to `client.log`.
* **Not done yet**: downloading the game data, updates, port conflict detection, the firewall and exposure checks, the
Wildcard realm profiles, and the client under Wine/Proton.
### D14. Keeping Windows and Linux apart
+15 -13
View File
@@ -6,7 +6,7 @@ This file never contains private keys, passwords, DB credentials, transfer PINs,
## Role
`coa-infra-01` (OVHcloud VPS, Ubuntu 24.04 LTS) is the shared infrastructure node for the planned services:
`coa-infra-01` (OVHcloud VPS, Ubuntu 24.04 LTS) is the shared infrastructure node for the deployed backend services:
```
Registry API Relay Coordinator PostgreSQL Caddy (ingress) monitoring
@@ -43,14 +43,16 @@ Rules:
- Game Relay publishes the dedicated TCP port range `40000:43999/tcp` for relayed WoW client game streams (Auth & World).
- No admin dashboards or the Docker API on public interfaces. Caddy's admin API is disabled.
## Public ports
## Public surface
| Port | Proto | Service |
|---|---|---|
| 22 | tcp | SSH, key only |
| 80 | tcp | Caddy HTTP (redirects to HTTPS) |
| 443 | tcp | Caddy HTTPS / WSS |
| 40000-43999 | tcp | Game Relay WoW game traffic (Auth & World) |
The public surface of `coa-infra-01` is strictly limited to:
| Port | Proto | Service | Access / Security |
|---|---|---|---|
| 22 | tcp | SSH | Key authentication only (Ed25519), root login disabled |
| 80 | tcp | Caddy HTTP | Redirects automatically to HTTPS (`443/tcp`) |
| 443 | tcp | Caddy HTTPS / WSS | Reverse proxy for Registry (`/registry/v2/`), Coordinator (`/coord/v1/`), Relay Host WS (`/relay/v1/host`) |
| 40000–43999 | tcp | Game Relay | Dynamic TCP port pool for client Auth & World game traffic (dumb byte forwarding) |
## Filesystem layout
@@ -141,11 +143,11 @@ cd /opt/coa/coordinator && sudo docker compose up -d
- Provider backup is not a substitute for application-level backups. What OVH actually includes for this plan
(automatic backup, snapshot, KVM/rescue) still has to be confirmed in the Control Panel.
- Planned (not implemented yet):
1. PostgreSQL logical backup: `pg_dump` to `/opt/coa/backups`, copied off the node.
2. Infrastructure config backup: `/opt/coa` except `secrets/` and volumes.
3. Secrets are backed up separately and never together with the config archive.
- Portable Characters are not backed up here: the VPS is not their source of truth.
- Automated PostgreSQL backup & restore (implemented in Phase 15, Gate 15.5 passed):
1. Logical database backup: `/opt/coa/registry/backup-db.sh` executes `pg_dump --format=custom --blobs` into `/opt/coa/backups`, verifies minimum size (> 1024 bytes), creates `.sha256` checksum file, touches `.complete` atomic marker, and prunes dumps older than 14 days.
2. Database restore: `/opt/coa/registry/restore-db.sh` verifies SHA-256 checksum, terminates existing database connections, and restores cleanly via `pg_restore --clean --if-exists --no-owner`. Disposable test restore verified with 100% table and schema integrity (Gate 15.5).
3. Secrets are backed up separately in `/opt/coa/secrets` (0700 root:root) and never placed in public repositories.
- Portable Characters are not backed up here: the VPS is not their source of truth (characters are stored canonically on their respective Owners/Hosts).
## Recovery
+1 -2
View File
@@ -80,8 +80,7 @@ sudo sh /opt/coa/registry/src/services/coa-registry/deploy/audit-db.sh
```
Logs are structured JSON: `realm`, `endpoint`, `status`, `error` (code), `latency_ms`, and the first 8 characters of the capabilities hash. They never contain keys,
signatures, headers, request bodies or the database credentials (checked: 0 occurrences of either password in any container's log). Backups: not yet automated
(`pg_dump coa_registry` to `/opt/coa/backups`, see INFRASTRUCTURE.md); the data is discovery metadata that every Host re-announces by itself within a heartbeat or two.
signatures, headers, request bodies or the database credentials (checked: 0 occurrences of either password in any container's log). Backups: automated via `backup-db.sh` into `/opt/coa/backups` with SHA-256 verification and atomic markers (verified in Gate 15.5; see INFRASTRUCTURE.md); the data is discovery metadata that every Host re-announces by itself within a heartbeat or two.
## The Phase-10 gate
+1 -2
View File
@@ -10,8 +10,7 @@ Copyright (C) 2026 CoA Project Contributors
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
the Free Software Foundation, version 3 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of