mirror of
https://github.com/Corfirean/coa-server-manager.git
synced 2026-11-18 19:25:56 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8d2befd7f0 | ||
|
|
8d9dc47fed | ||
|
|
2e3f36d2fd | ||
|
|
8f39896f0c | ||
|
|
103c829539 | ||
|
|
20fb2391ed | ||
|
|
43de03eada | ||
|
|
5796cffb5e | ||
|
|
cda58cdcd1 | ||
|
|
112cb7e69c | ||
|
|
517e04dace | ||
|
|
e87cd0bb78 | ||
|
|
d22ff09ac6 | ||
|
|
407bfe3a4d | ||
|
|
5012f7b104 | ||
|
|
16c3b1ec57 | ||
|
|
57ec6892aa | ||
|
|
344d9772b0 | ||
|
|
f6eccf849f | ||
|
|
e27357d1b0 | ||
|
|
40213213bd | ||
|
|
0e62be5097 | ||
|
|
36d82ecc78 | ||
|
|
19791edb94 | ||
|
|
4537b2a826 | ||
|
|
4a88f696a0 | ||
|
|
354a7d83f8 | ||
|
|
86f5bcc007 | ||
|
|
d0d7639026 | ||
|
|
f40c0e1324 | ||
|
|
65df660484 | ||
|
|
2defb7b002 | ||
|
|
e3fbb2e4b6 | ||
|
|
a7b56d6aed | ||
|
|
cda7875a9a | ||
|
|
f53c7cb221 | ||
|
|
ca6bcf0052 | ||
|
|
d6a6384f9c | ||
|
|
21ddc1e7d8 | ||
|
|
16396407ad | ||
|
|
093dbfcadc | ||
|
|
dc323df681 | ||
|
|
46785f7978 | ||
|
|
97c024d95c | ||
|
|
52b80232fa | ||
|
|
be2f252593 | ||
|
|
24d593d787 | ||
|
|
4a9760b864 | ||
|
|
482bbfcdfd | ||
|
|
b45e2502ec | ||
|
|
6a955bd670 | ||
|
|
d5f441de0c | ||
|
|
4efc02e768 | ||
|
|
be9641254a | ||
|
|
c18daac228 | ||
|
|
89c62abf80 | ||
|
|
a6471d79d0 | ||
|
|
fd0eaafda2 | ||
|
|
fb1cc38773 | ||
|
|
7a950f234b | ||
|
|
2f1df13b7a | ||
|
|
be705329c1 | ||
|
|
7e70409ca0 | ||
|
|
9e6a650d13 | ||
|
|
0398a5a6f9 | ||
|
|
dd23e81dd4 | ||
|
|
ca2a555d7c | ||
|
|
8269a53db7 | ||
|
|
b97f86fc00 | ||
|
|
1a71f18def | ||
|
|
358f9f4f2b | ||
|
|
0c0d2db368 | ||
|
|
7d7bc530ec | ||
|
|
acd04fae2f | ||
|
|
106a532092 | ||
|
|
d86a1676fe | ||
|
|
53a05820c8 | ||
|
|
58c976a388 | ||
|
|
35c4d03bdc | ||
|
|
c45f962d02 | ||
|
|
f52bd8ba5f | ||
|
|
247159e56c | ||
|
|
cdd5be2365 | ||
|
|
7e170744bf | ||
|
|
10daa9b74d | ||
|
|
51ef88101e | ||
|
|
e60b5e2e5a | ||
|
|
ed7bf7262b | ||
|
|
7c866b116d | ||
|
|
4d8ca00e46 | ||
|
|
36bfc6d31e | ||
|
|
3fb4ee39c6 | ||
|
|
0250b61c62 | ||
|
|
dfd8a50975 | ||
|
|
90c308615b | ||
|
|
cfea54e203 | ||
|
|
57aa97da8a | ||
|
|
b9f89a4ae4 | ||
|
|
6fd2130fc4 | ||
|
|
346d97ee89 | ||
|
|
10a6744192 | ||
|
|
7557b347c5 | ||
|
|
2abd64dfe2 | ||
|
|
9ae5fb471b | ||
|
|
59036867d7 | ||
|
|
949614f11a | ||
|
|
9ee0e9f6af | ||
|
|
3405c89fe8 | ||
|
|
4c4d39f1de | ||
|
|
b101c79e96 | ||
|
|
3b7f77d92e | ||
|
|
0589722e71 | ||
|
|
a3717c08bb | ||
|
|
dc2bffc57e | ||
|
|
e34ab45443 | ||
|
|
40f9feab84 | ||
|
|
5b16842720 | ||
|
|
02843bb6d1 | ||
|
|
a9ab7ced7e | ||
|
|
77318895ae | ||
|
|
115c57f54e | ||
|
|
94fd5fb5b9 | ||
|
|
d828c982de | ||
|
|
453b870914 | ||
|
|
9d570b7688 | ||
|
|
e035f33fc0 | ||
|
|
2b95553168 | ||
|
|
94d4ade1c7 | ||
|
|
376f1dbb46 | ||
|
|
b0951dbee7 | ||
|
|
2561e85893 | ||
|
|
51e0f136d6 | ||
|
|
b69fa6b867 | ||
|
|
64b3511436 | ||
|
|
f6ac5c93d9 | ||
|
|
21d54c1431 | ||
|
|
ad39bd2020 | ||
|
|
65ace578f7 | ||
|
|
6e438cfe95 | ||
|
|
c743157b97 | ||
|
|
1dc212968d | ||
|
|
42c05c50e7 | ||
|
|
461ffddd0d | ||
|
|
2caa687490 | ||
|
|
71e1488336 | ||
|
|
6fa3c9ccf4 | ||
|
|
95ab5dd9ef | ||
|
|
e39cecb333 | ||
|
|
3e57d32c90 | ||
|
|
d968f6bfd6 | ||
|
|
1267bcc41e | ||
|
|
ec40f146aa | ||
|
|
d05bfe8b09 | ||
|
|
d41a7c7494 | ||
|
|
5abba832e5 | ||
|
|
aab0c28e1a | ||
|
|
c36aaeca74 | ||
|
|
9009550510 | ||
|
|
c2e4634367 | ||
|
|
ffb1df3fce | ||
|
|
426808527b | ||
|
|
297bd39101 | ||
|
|
35a2d5dea7 | ||
|
|
f6006edfaf | ||
|
|
843eb9b2eb | ||
|
|
b2b2009b0d | ||
|
|
cfcace8337 | ||
|
|
9870a3814c | ||
|
|
d64bb882fa | ||
|
|
ca46c1809b | ||
|
|
7f15ffe69f | ||
|
|
9210be98b5 | ||
|
|
e8f99c16b7 | ||
|
|
d971fd5e28 | ||
|
|
c590b82d27 | ||
|
|
adefa84885 | ||
|
|
efd4b8bbf2 | ||
|
|
9e84763f14 | ||
|
|
0527e045ba |
No files matched your search
@@ -0,0 +1,5 @@
|
||||
target
|
||||
**/target
|
||||
node_modules
|
||||
dist
|
||||
.git
|
||||
@@ -0,0 +1,14 @@
|
||||
name: changelog-fragments
|
||||
# Checks the changelog.d/ fragment files with the shared rules (https://github.com/Corfirean/coa-server-build/blob/main/changelog/GUIDE.md).
|
||||
on:
|
||||
push:
|
||||
paths: ['changelog.d/**']
|
||||
pull_request:
|
||||
paths: ['changelog.d/**']
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
check:
|
||||
uses: Corfirean/coa-server-build/.github/workflows/changelog-check.yml@main
|
||||
@@ -1,14 +1,47 @@
|
||||
name: changelog
|
||||
# Checks the changelog.d/ fragment files with the shared rules (https://github.com/Corfirean/coa-server-build/blob/main/changelog/GUIDE.md).
|
||||
on:
|
||||
push:
|
||||
paths: ['changelog.d/**']
|
||||
branches: [master]
|
||||
paths: [tools/sync_history.py, changelog/history.json, .github/workflows/changelog.yml]
|
||||
pull_request:
|
||||
paths: ['changelog.d/**']
|
||||
|
||||
paths: [tools/sync_history.py, tools/test_sync_history.py, changelog/history.json, .github/workflows/changelog.yml]
|
||||
release:
|
||||
types: [published, prereleased, released]
|
||||
workflow_run:
|
||||
workflows: [release]
|
||||
types: [completed]
|
||||
workflow_dispatch:
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
contents: write
|
||||
concurrency:
|
||||
group: component-changelog
|
||||
cancel-in-progress: false
|
||||
jobs:
|
||||
check:
|
||||
uses: Corfirean/coa-server-build/.github/workflows/changelog-check.yml@main
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
steps:
|
||||
- uses: actions/checkout@v7
|
||||
- run: python3 -m unittest discover -s tools -p test_sync_history.py
|
||||
sync:
|
||||
needs: test
|
||||
if: github.event_name != 'pull_request' && (github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success')
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
steps:
|
||||
- uses: actions/checkout@v7
|
||||
with:
|
||||
ref: ${{ github.event.repository.default_branch }}
|
||||
fetch-depth: 0
|
||||
- name: Synchronize this component from published immutable sources
|
||||
run: python3 tools/sync_history.py --sync-release-notes
|
||||
- name: Commit updated history
|
||||
run: |
|
||||
git config user.name 'github-actions[bot]'
|
||||
git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
|
||||
git add CHANGELOG.md changelog/history.json
|
||||
if git diff --cached --quiet; then exit 0; fi
|
||||
git commit -m 'Update published Manager changelog'
|
||||
git push origin HEAD:"${{ github.event.repository.default_branch }}"
|
||||
@@ -6,33 +6,114 @@ on:
|
||||
push:
|
||||
tags: ['v*']
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
publish_release:
|
||||
description: Publish the GitHub release (leave off to prepare signed artifacts)
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
release-intent:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
build: ${{ steps.intent.outputs.build }}
|
||||
steps:
|
||||
- id: intent
|
||||
name: Keep already published release assets immutable
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
REQUEST_PUBLISH: ${{ inputs.publish_release && 'true' || 'false' }}
|
||||
run: |
|
||||
python3 - <<'PY'
|
||||
import json, os, subprocess
|
||||
build = True
|
||||
if os.environ['GITHUB_EVENT_NAME'] == 'push' or os.environ.get('REQUEST_PUBLISH') == 'true':
|
||||
result = subprocess.run(['gh', 'api', 'repos/' + os.environ['GITHUB_REPOSITORY'] + '/releases/tags/' + os.environ['GITHUB_REF_NAME']], capture_output=True, text=True)
|
||||
if result.returncode == 0:
|
||||
build = json.loads(result.stdout)['draft']
|
||||
if not build:
|
||||
print('Published release already exists; preserve its assets and prerelease status.')
|
||||
elif 'HTTP 404' not in result.stderr:
|
||||
raise RuntimeError('Could not establish whether this release already exists: ' + result.stderr)
|
||||
with open(os.environ['GITHUB_OUTPUT'], 'a') as output:
|
||||
output.write('build=' + str(build).lower() + '\n')
|
||||
PY
|
||||
installer:
|
||||
needs: release-intent
|
||||
if: needs.release-intent.outputs.build == 'true'
|
||||
runs-on: windows-latest
|
||||
timeout-minutes: 60
|
||||
steps:
|
||||
- uses: actions/checkout@v7
|
||||
- name: Validate release version
|
||||
shell: pwsh
|
||||
run: |
|
||||
$version = (Get-Content package.json -Raw | ConvertFrom-Json).version
|
||||
if ($env:GITHUB_EVENT_NAME -eq 'push' -and $env:GITHUB_REF_NAME -ne "v$version") {
|
||||
throw 'The release tag does not match the application version.'
|
||||
}
|
||||
- name: Cache Rust dependencies and compiled targets
|
||||
uses: actions/cache@v6
|
||||
continue-on-error: true
|
||||
with:
|
||||
path: |
|
||||
~/.cargo/registry
|
||||
~/.cargo/git
|
||||
target
|
||||
key: manager-installer-${{ runner.os }}-${{ hashFiles('Cargo.lock') }}-${{ github.run_id }}
|
||||
restore-keys: manager-installer-${{ runner.os }}-${{ hashFiles('Cargo.lock') }}-
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
- run: npm ci
|
||||
- name: Tests
|
||||
run: cargo test --workspace -- --test-threads=1
|
||||
- name: Build, sign and publish
|
||||
- name: Build and sign (publish only when requested)
|
||||
id: tauri
|
||||
uses: tauri-apps/tauri-action@v0
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ github.token }}
|
||||
GITHUB_TOKEN: ${{ (github.event_name == 'push' || inputs.publish_release) && github.token || '' }}
|
||||
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
|
||||
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
|
||||
with:
|
||||
tagName: ${{ github.ref_name }}
|
||||
releaseName: CoA Server Manager ${{ github.ref_name }}
|
||||
tagName: ${{ (github.event_name == 'push' || inputs.publish_release) && 'v__VERSION__' || '' }}
|
||||
releaseName: CoA Server Manager v__VERSION__
|
||||
releaseBody: See the assets to download the installer. Existing installations update themselves.
|
||||
releaseDraft: false
|
||||
prerelease: false
|
||||
args: --bundles nsis
|
||||
includeUpdaterJson: true
|
||||
- name: Preserve the exact signed installer and updater metadata
|
||||
shell: pwsh
|
||||
env:
|
||||
MANAGER_ARTIFACTS: ${{ steps.tauri.outputs.artifactPaths }}
|
||||
run: |
|
||||
$paths = @($env:MANAGER_ARTIFACTS | ConvertFrom-Json)
|
||||
$installers = @($paths | Where-Object { $_ -like '*-setup.exe' })
|
||||
if ($installers.Count -ne 1) { throw 'Expected exactly one Windows NSIS installer.' }
|
||||
$installer = [IO.Path]::GetFullPath($installers[0])
|
||||
$workspace = [IO.Path]::GetFullPath((Get-Location).Path).TrimEnd('\') + '\'
|
||||
if (-not $installer.StartsWith($workspace, [StringComparison]::OrdinalIgnoreCase)) { throw 'Installer escaped the workspace.' }
|
||||
if (-not (Test-Path -LiteralPath "$installer.sig")) { throw 'The installer has no updater signature.' }
|
||||
$version = (Get-Content package.json -Raw | ConvertFrom-Json).version
|
||||
$name = [IO.Path]::GetFileName($installer).Replace(' ', '.')
|
||||
New-Item -ItemType Directory -Force _prepared-manager | Out-Null
|
||||
Copy-Item -LiteralPath $installer -Destination "_prepared-manager/$name"
|
||||
Copy-Item -LiteralPath "$installer.sig" -Destination "_prepared-manager/$name.sig"
|
||||
$platform = @{
|
||||
signature = (Get-Content -LiteralPath "$installer.sig" -Raw).Trim()
|
||||
url = "https://github.com/$env:GITHUB_REPOSITORY/releases/download/v$version/$([Uri]::EscapeDataString($name))"
|
||||
}
|
||||
@{ version = $version; notes = 'See the release notes.'; pub_date = [DateTime]::UtcNow.ToString('yyyy-MM-ddTHH:mm:ssZ'); platforms = @{ 'windows-x86_64' = $platform } } |
|
||||
ConvertTo-Json -Depth 8 | Set-Content _prepared-manager/latest.json -Encoding utf8NoBOM
|
||||
@{ schema = 1; version = $version; source = $env:GITHUB_SHA; run = $env:GITHUB_RUN_ID; installer = $name; sha256 = (Get-FileHash -LiteralPath $installer -Algorithm SHA256).Hash.ToLowerInvariant() } |
|
||||
ConvertTo-Json | Set-Content _prepared-manager/prepared-source.json -Encoding utf8NoBOM
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: prepared-manager-windows
|
||||
path: _prepared-manager/*
|
||||
if-no-files-found: error
|
||||
retention-days: 14
|
||||
@@ -4,3 +4,8 @@ dist
|
||||
*.log
|
||||
.env
|
||||
src-tauri/gen
|
||||
|
||||
# standalone service workspaces build into their own target folders
|
||||
services/*/target/
|
||||
# Disposable database fixtures and private recovery data
|
||||
.cache/
|
||||
@@ -3,8 +3,7 @@
|
||||
<!-- changelog:start (managed by coa-server-build/changelog/changelog.py sync-instructions) -->
|
||||
## Changelog (shared by all CoA repositories)
|
||||
|
||||
Every CoA project (server fork, bots, Content Scaling, Manager, renderer) feeds **one** changelog that is posted to the
|
||||
community. When you finish a change that a **player** or a **server owner** would notice (a new feature, a changed
|
||||
Every CoA project (server fork, bots, Content Scaling, Manager, renderer) uses the same fragment format. **Manager and server release histories are separate**; each repository publishes only its own shipped component changes. When you finish a change that a **player** or a **server owner** would notice (a new feature, a changed
|
||||
behaviour, a fix for something people ran into, a removed feature, a known issue), add **one small file to
|
||||
`changelog.d/` in the same commit**. Do not add one for internal work (refactors, tests, CI, documentation).
|
||||
|
||||
@@ -29,3 +28,26 @@ Optional: one short paragraph in plain English for the reader (at most 300 chara
|
||||
`python changelog.py new --area bots --type fixed --audience players --title "..."`.
|
||||
- Full guide with examples: https://github.com/Corfirean/coa-server-build/blob/main/changelog/GUIDE.md
|
||||
<!-- changelog:end -->
|
||||
|
||||
## Shared build and release workflow
|
||||
|
||||
Every published Manager version, including a clearly marked Pre-release, belongs in this repository's
|
||||
CHANGELOG.md and changelog/history.json. Its GitHub release notes use the same reviewed record.
|
||||
Promotion updates that entry without duplicating it; Manager and server histories remain separate.
|
||||
|
||||
Before preparing or publishing a Manager/server release, read the maintained
|
||||
[release runbook](https://github.com/Corfirean/coa-server-build/blob/main/docs/server-release.md)
|
||||
and [build agent instructions](https://github.com/Corfirean/coa-server-build/blob/main/AGENTS.md).
|
||||
Use the local build checkout when available; otherwise retrieve the current files from GitHub.
|
||||
|
||||
Recover the exact prepared run, source commit, version, hashes and artifact expiry before rebuilding.
|
||||
Prepare-only is not publication permission. A normal owner command to release the identified candidate
|
||||
includes its required stable promotion; do not stop at a server Pre-release or ask twice for the same action.
|
||||
Reuse signed prepared Manager installers after verifying their source metadata, SHA-256, updater JSON
|
||||
and signature against the matching source's updater public key. Do not rerun compilation just to upload
|
||||
already verified assets, or overwrite a published version with different bytes.
|
||||
|
||||
Server promotion uses the persistent Windows PC and the shared workflow's verified caches. Preserve
|
||||
production databases; run applicable local acceptance in disposable fixtures. Record the actual passed,
|
||||
failed and unrun checks. Verify both GitHub Latest and the public signed stable pointer before reporting
|
||||
that users can update. Leave the durable handoff described in the runbook for the next agent.
|
||||
+311
-15
@@ -1,25 +1,321 @@
|
||||
# CoA Server Manager changelog
|
||||
|
||||
Manager releases only. Updating the Manager does not update the server.
|
||||
|
||||
[Server changelog](https://github.com/Corfirean/coa-server-build/blob/main/CHANGELOG.md)
|
||||
|
||||
Published releases and previews. Pre-release entries do not change the stable update channel.
|
||||
|
||||
Dates follow GitHub publication (UTC); legacy records retain their archived dates. Newest releases first.
|
||||
|
||||
## 0.7.0 — 2026-10-21
|
||||
|
||||
Portable transfers into Warcraft Reborn are not supported yet.
|
||||
|
||||
**Portable Characters are experimental and may contain bugs.**
|
||||
|
||||
- Keep portable characters and their saved versions in the Manager, and use them on compatible realms.
|
||||
- Make an existing character portable from a connected realm.
|
||||
- Browse public realms and see their connection details.
|
||||
- Link an existing realm account or create one on hosts that allow it.
|
||||
- Switch between CoA, Wildcard and Warcraft Reborn realm profiles on supported server builds.
|
||||
- Adjust creature health for different locations and enemy types in Content Scaling.
|
||||
- Switch Custom Races patches faster, with visible feedback while changes are applied.
|
||||
- Handle Windows requests for administrator permission when launching the game.
|
||||
|
||||
[Release](https://github.com/Corfirean/coa-server-manager/releases/tag/v0.7.0) · [Source changes](https://github.com/Corfirean/coa-server-manager/compare/v0.6.22...v0.7.0)
|
||||
|
||||
[Player guides and screenshots](https://github.com/Corfirean/coa-server-manager/tree/d22ff09ac6fd7628aac14d90ec23f547cd9b4bf1/docs)
|
||||
|
||||
## 0.6.22 — 2026-10-19
|
||||
|
||||
- Updated Custom Races client patches to 1.8.
|
||||
- Included the updated race appearance and cursor addons.
|
||||
- Existing client files are preserved when installing or removing race patches.
|
||||
|
||||
[Release](https://github.com/Corfirean/coa-server-manager/releases/tag/v0.6.22) · [Source changes](https://github.com/Corfirean/coa-server-manager/compare/v0.6.21...v0.6.22)
|
||||
|
||||
## 0.6.21 — 2026-10-16
|
||||
|
||||
- Server updates apply migrations once after saving a recovery point.
|
||||
- Older server versions update directly without installing intermediate packages.
|
||||
- Update validation recognizes an already stopped server.
|
||||
- Recorded core SQL stays applied after old history tables are cleaned up.
|
||||
- Switching realms no longer repeats shared account database updates.
|
||||
- Update offers distinguish version support from database validation.
|
||||
|
||||
[Release](https://github.com/Corfirean/coa-server-manager/releases/tag/v0.6.21) · [Source changes](https://github.com/Corfirean/coa-server-manager/compare/v0.6.19...v0.6.21)
|
||||
|
||||
## 0.6.19 — 2026-10-16
|
||||
|
||||
- Update checks no longer download a server archive to compare its launcher.
|
||||
|
||||
[Release](https://github.com/Corfirean/coa-server-manager/releases/tag/v0.6.19) · [Source changes](https://github.com/Corfirean/coa-server-manager/compare/v0.6.18...v0.6.19)
|
||||
|
||||
## 0.6.18 — 2026-10-16
|
||||
|
||||
- Older servers find a tested intermediate update instead of being blocked.
|
||||
|
||||
[Release](https://github.com/Corfirean/coa-server-manager/releases/tag/v0.6.18) · [Source changes](https://github.com/Corfirean/coa-server-manager/compare/v0.6.17...v0.6.18)
|
||||
|
||||
## 0.6.17 — 2026-10-15
|
||||
|
||||
- Already running MySQL is recognized before startup readiness checks.
|
||||
- New servers install the current stable build directly.
|
||||
- Install the matching client patches for Grummle.
|
||||
- Failed repairs restore the previous server after final verification errors.
|
||||
- Failed server updates show an error on the Overview screen.
|
||||
- Private update checks show preparation stages and stop failure details.
|
||||
- Repair recovery copies preserve all bundled database objects and accounts.
|
||||
- Server checks report interrupted SQUID database imports.
|
||||
- Shutdown remains available when startup templates or database records are damaged.
|
||||
- Successful server repairs no longer block later server actions.
|
||||
|
||||
[Release](https://github.com/Corfirean/coa-server-manager/releases/tag/v0.6.17) · [Source changes](https://github.com/Corfirean/coa-server-manager/compare/v0.6.16...v0.6.17)
|
||||
|
||||
## 0.6.16 — 2026-10-13
|
||||
|
||||
- Linux Docker servers follow Settings, sharing and backups (experimental).
|
||||
- Local hosts can connect while sharing a server online.
|
||||
- Custom race client installation follows the current upstream release.
|
||||
- Docker friend mode requests a restart when remote client support changes.
|
||||
- Module cards show installed server revisions and the client race patch version.
|
||||
- Server updates accept long Windows paths inside the private test server.
|
||||
- Diagnostics record blocked startup requests and maintenance owner information.
|
||||
- Client race patches can be repaired and removed while preserving original files.
|
||||
- Checking an already installed server update no longer reports incompatibility.
|
||||
- Failed server startup shows service errors even when the launcher reported ready.
|
||||
- Starting the server waits for update checks and identifies ongoing maintenance.
|
||||
|
||||
[Release](https://github.com/Corfirean/coa-server-manager/releases/tag/v0.6.16) · [Source changes](https://github.com/Corfirean/coa-server-manager/compare/v0.6.15...v0.6.16)
|
||||
|
||||
## 0.6.15 — 2026-10-11
|
||||
|
||||
- Large server updates no longer repeatedly rewrite the recovery journal.
|
||||
|
||||
[Release](https://github.com/Corfirean/coa-server-manager/releases/tag/v0.6.15) · [Source changes](https://github.com/Corfirean/coa-server-manager/compare/v0.6.14...v0.6.15)
|
||||
|
||||
## 0.6.14 — 2026-10-11
|
||||
|
||||
- Fixed server update checks failing with long Windows paths.
|
||||
|
||||
[Release](https://github.com/Corfirean/coa-server-manager/releases/tag/v0.6.14) · [Source changes](https://github.com/Corfirean/coa-server-manager/compare/v0.6.13...v0.6.14)
|
||||
|
||||
## 0.6.13 — 2026-10-11
|
||||
|
||||
- Failed server startup after an update automatically restores the previous version.
|
||||
- Windows update recovery preserves database procedures triggers and views.
|
||||
- Custom races bot setting synchronizes Playerbots excluded race lists.
|
||||
- Blocked updates identify database objects that prevent automatic recovery.
|
||||
- Updates can follow signed channels that select a complete server release.
|
||||
- Server updates check startup privately before allowing players to connect.
|
||||
- Updates repair missing database defaults from the verified release schema.
|
||||
- Server updates no longer replay module installation scripts on existing databases.
|
||||
- Windows server updates are tested on a private copy before changing your installation.
|
||||
- Server updates can require a tested combination of platform and installed version.
|
||||
- Failed database checks keep a complete report after rollback.
|
||||
- Players can install custom race patches when connecting to a friend.
|
||||
|
||||
[Release](https://github.com/Corfirean/coa-server-manager/releases/tag/v0.6.13) · [Source changes](https://github.com/Corfirean/coa-server-manager/compare/v0.6.12...v0.6.13)
|
||||
|
||||
## 0.6.12 — 2026-10-10
|
||||
|
||||
- Background world servers no longer stop because the local console is closed.
|
||||
|
||||
[Release](https://github.com/Corfirean/coa-server-manager/releases/tag/v0.6.12) · [Source changes](https://github.com/Corfirean/coa-server-manager/compare/v0.6.11...v0.6.12)
|
||||
|
||||
## 0.6.11 — 2026-10-10
|
||||
|
||||
- Server and Bots settings open without a blank window.
|
||||
|
||||
[Release](https://github.com/Corfirean/coa-server-manager/releases/tag/v0.6.11) · [Source changes](https://github.com/Corfirean/coa-server-manager/compare/v0.6.10...v0.6.11)
|
||||
|
||||
## 0.6.10 — 2026-10-10
|
||||
|
||||
- Custom race client patches update to the latest races and appearances.
|
||||
|
||||
[Release](https://github.com/Corfirean/coa-server-manager/releases/tag/v0.6.10) · [Source changes](https://github.com/Corfirean/coa-server-manager/compare/v0.6.9...v0.6.10)
|
||||
|
||||
## 0.6.9 — 2026-10-10
|
||||
|
||||
- Custom races can be enabled and their client patches installed from Modules.
|
||||
|
||||
[Release](https://github.com/Corfirean/coa-server-manager/releases/tag/v0.6.9) · [Source changes](https://github.com/Corfirean/coa-server-manager/compare/v0.6.8...v0.6.9)
|
||||
|
||||
## 0.6.8 — 2026-10-10
|
||||
|
||||
- Linux: install from the install screen, play with Wine or Proton (experimental).
|
||||
- A failing database update is no longer reported as "database not running.
|
||||
- Unsaved settings are protected and crashed servers can restart automatically.
|
||||
|
||||
[Release](https://github.com/Corfirean/coa-server-manager/releases/tag/v0.6.8) · [Source changes](https://github.com/Corfirean/coa-server-manager/compare/v0.6.7...v0.6.8)
|
||||
|
||||
## 0.6.7 — 2026-10-08
|
||||
|
||||
- Choose where backups are stored, for example on another drive.
|
||||
- Bot settings with a fixed list of values show a drop-down.
|
||||
- The bot dashboard loads completely and can be opened in the browser.
|
||||
- Accounts of the SQUID bots are hidden from the Accounts list.
|
||||
- A Dashboard tab shows what the SQUID bots are doing.
|
||||
- A stopped server stays stopped after an update, unless you ask it to start.
|
||||
- Checking for updates no longer fails with "Something went wrong" after a crash.
|
||||
- Server updates no longer stop with "has a different checksum" on the Wildcard repair.
|
||||
- A world server started from the coa-bots folder is recognised.
|
||||
|
||||
[Release](https://github.com/Corfirean/coa-server-manager/releases/tag/v0.6.7) · [Source changes](https://github.com/Corfirean/coa-server-manager/compare/v0.6.6...v0.6.7)
|
||||
|
||||
## 0.6.6 — 2026-10-07
|
||||
|
||||
- Install a server from a package on Linux, running in Docker (experimental).
|
||||
- The Auction House Bot card no longer asks for a character GUID.
|
||||
- Choose and remember the local network address friends use to connect.
|
||||
- The NPC Enchanter card explains how to place and remove the NPC.
|
||||
- Diagnostic files with database checks stay readable after secrets are removed.
|
||||
- One button collects all diagnostics, including crashes and Windows crash records.
|
||||
- Problem reports go to the right project.
|
||||
|
||||
[Release](https://github.com/Corfirean/coa-server-manager/releases/tag/v0.6.6) · [Source changes](https://github.com/Corfirean/coa-server-manager/compare/v0.6.5...v0.6.6)
|
||||
|
||||
## 0.6.5 — 2026-10-06
|
||||
|
||||
- Imported SquidBots servers warn before replacing their original binary.
|
||||
- SquidBots settings follow the options shipped by the module.
|
||||
- SquidBots shows its bundled release and includes it in problem reports.
|
||||
- Server updates accept verified published migration variants without rerunning them.
|
||||
- Server updates replace older launchers adapted by the Manager for Wildcard.
|
||||
- Older server packages cannot replace a newer installation.
|
||||
- Checking again no longer offers an already installed launcher update.
|
||||
- Large SQUID database imports have more time to finish on first startup.
|
||||
- Update history conflicts are detected before server files change.
|
||||
- Pending database updates remain visible when the server version matches.
|
||||
|
||||
[Release](https://github.com/Corfirean/coa-server-manager/releases/tag/v0.6.5) · [Source changes](https://github.com/Corfirean/coa-server-manager/compare/v0.6.4...v0.6.5)
|
||||
|
||||
## 0.6.4 — 2026-10-05
|
||||
|
||||
- Start your installed server or client without downloading an available update.
|
||||
- Finish a server update that was blocked by a startup failure.
|
||||
|
||||
[Release](https://github.com/Corfirean/coa-server-manager/releases/tag/v0.6.4) · [Source changes](https://github.com/Corfirean/coa-server-manager/compare/v0.6.3...v0.6.4)
|
||||
|
||||
## 0.6.3 — 2026-10-04
|
||||
|
||||
- Configure partial dungeon parties and open-world life steal in module settings.
|
||||
- Download and update the game client without installing a server.
|
||||
|
||||
[Release](https://github.com/Corfirean/coa-server-manager/releases/tag/v0.6.3) · [Source changes](https://github.com/Corfirean/coa-server-manager/compare/v0.6.2...v0.6.3)
|
||||
|
||||
## 0.6.2 — 2026-10-04
|
||||
|
||||
- Choose which item types the auction bot sells.
|
||||
- Module settings now offer translated controls and an enemy damage slider.
|
||||
- Failed server updates restore databases and files together.
|
||||
- Configure SQUID Playerbots and prevent conflicting bot systems.
|
||||
- Server packages must include a complete database schema check.
|
||||
|
||||
[Release](https://github.com/Corfirean/coa-server-manager/releases/tag/v0.6.2) · [Source changes](https://github.com/Corfirean/coa-server-manager/compare/v0.6.1...v0.6.2)
|
||||
|
||||
## 0.6.1 — 2026-10-04
|
||||
|
||||
- PLAY launches only the client with the selected realmlist; starting the local server remains a separate action.
|
||||
- Server multipliers accept decimals typed with a dot or comma. Talent and rested experience descriptions now explain their actual behavior.
|
||||
- Added database and file checks, and Repair with backups and signed package verification. Unresolved schema damage is reported instead of guessed repairs.
|
||||
- Fixed character database rebuilds retaining migration history that could skip required SQL. Applied migration hash changes are now rejected.
|
||||
- Added optional simultaneous CoA and Wildcard worlds on Windows, with separate processes, ports and status indicators.
|
||||
- Server multipliers now accept decimals typed with a dot or comma.
|
||||
- Play launches only the game client without starting your local server.
|
||||
- Check database structure and repair server files with a safety backup.
|
||||
- Start CoA and Wildcard together from Settings.
|
||||
|
||||
[Release](https://github.com/Corfirean/coa-server-manager/releases/tag/v0.6.1) · [Source changes](https://github.com/Corfirean/coa-server-manager/compare/v0.6.0...v0.6.1)
|
||||
|
||||
## 0.6.0 — 2026-10-03
|
||||
|
||||
- Added Simplified Chinese for the interface and all server and bot settings.
|
||||
- The closed game client now follows the selected CoA or Wildcard realm. Play checks the saved realm before launching; existing settings are preserved and backed up.
|
||||
- Fixed GitHub reports opening Windows Explorer instead of the default browser. Long reports use the clipboard fallback.
|
||||
- Fixed configuration snapshots created in the same millisecond overwriting each other during restore.
|
||||
- Added experimental Linux startup: persistent state uses the XDG data folder, Tailscale detection supports Linux, and a Wayland rendering workaround respects existing user settings.
|
||||
- Added experimental start, stop and status controls for manually prepared Docker servers, with private database networking and a remote console bound to localhost.
|
||||
- Linux extraction restores executable permissions for ELF binaries and scripts, and paths retain case-sensitive filesystem semantics.
|
||||
- The game client follows the realm selected in the Manager.
|
||||
- Configuration snapshots no longer overwrite each other.
|
||||
- Experimental Linux startup and Docker server controls.
|
||||
- Problem reports open in the default browser.
|
||||
- Simplified Chinese is available in the Manager.
|
||||
|
||||
### Availability
|
||||
[Release](https://github.com/Corfirean/coa-server-manager/releases/tag/v0.6.0) · [Source changes](https://github.com/Corfirean/coa-server-manager/compare/v0.5.0...v0.6.0)
|
||||
|
||||
This release ships the Windows installer and signed updater assets. Linux support is a development preview, not a one-click installation flow. Docker installation/database setup, SQL operations and backups, updates, Wildcard realm profiles, and Wine/Proton client launching remain unfinished. Servers must be prepared manually and use Linux binaries built with the packaged configuration layout.
|
||||
## 0.5.0 — 2026-10-03
|
||||
|
||||
Server shutdown and starting-zone scaling issues require separate server releases and are not fixed by updating the Manager alone.
|
||||
- Imported servers get the module config files they lack.
|
||||
- Modules marked Soon stay greyed out.
|
||||
- The Bots page is hidden when the module is not on the server.
|
||||
- Updating the game client shows a progress bar on its button.
|
||||
- Switch between CoA and Wildcard while keeping separate characters and module settings.
|
||||
|
||||
[Release](https://github.com/Corfirean/coa-server-manager/releases/tag/v0.5.0) · [Source changes](https://github.com/Corfirean/coa-server-manager/compare/v0.4.0...v0.5.0)
|
||||
|
||||
## 0.4.0 — 2026-10-02
|
||||
|
||||
- Added module cards with switches and settings.
|
||||
- Added searchable server settings and appearance and collection controls.
|
||||
- Added account deletion with confirmation.
|
||||
- Fixed update checks offering an already installed version.
|
||||
|
||||
[Release](https://github.com/Corfirean/coa-server-manager/releases/tag/v0.4.0) · [Source changes](https://github.com/Corfirean/coa-server-manager/compare/v0.3.1...v0.4.0)
|
||||
|
||||
## 0.3.1 — 2026-10-01
|
||||
|
||||
- Added named realmlists and a switcher beside Play.
|
||||
- Added account management and a prefilled GitHub problem-report form.
|
||||
- Server updates continue when leaving the settings page.
|
||||
|
||||
[Release](https://github.com/Corfirean/coa-server-manager/releases/tag/v0.3.1) · [Source changes](https://github.com/Corfirean/coa-server-manager/compare/v0.3.0...v0.3.1)
|
||||
|
||||
## 0.3.0 — 2026-10-01
|
||||
|
||||
- Download and update the game client through the Manager while preserving custom files.
|
||||
- Server updates are checked automatically and offered on Overview.
|
||||
|
||||
[Release](https://github.com/Corfirean/coa-server-manager/releases/tag/v0.3.0) · [Source changes](https://github.com/Corfirean/coa-server-manager/compare/v0.2.0...v0.3.0)
|
||||
|
||||
## 0.2.0 — 2026-10-01
|
||||
|
||||
- Added companion creation progress and controls to stop creation, take bots offline or remove them.
|
||||
- Choose how many bots log in when the server starts.
|
||||
- Added a control to log out a chosen number of bots and reduce server load.
|
||||
|
||||
[Release](https://github.com/Corfirean/coa-server-manager/releases/tag/v0.2.0) · [Source changes](https://github.com/Corfirean/coa-server-manager/compare/v0.1.6...v0.2.0)
|
||||
|
||||
## 0.1.6 — 2026-09-30
|
||||
|
||||
- Overview shows world speed.
|
||||
- Improved companion setup, including requests made while the server is stopped.
|
||||
- Expanded translated settings and connection guides.
|
||||
|
||||
[Release](https://github.com/Corfirean/coa-server-manager/releases/tag/v0.1.6) · [Source changes](https://github.com/Corfirean/coa-server-manager/compare/v0.1.4...v0.1.6)
|
||||
|
||||
## 0.1.4 — 2026-09-30
|
||||
|
||||
- Sharing settings are reapplied before server startup.
|
||||
- Added a restart shortcut after enabling play with friends.
|
||||
|
||||
[Release](https://github.com/Corfirean/coa-server-manager/releases/tag/v0.1.4) · [Source changes](https://github.com/Corfirean/coa-server-manager/compare/v0.1.3...v0.1.4)
|
||||
|
||||
## 0.1.3 — 2026-09-30
|
||||
|
||||
- The interface scales with the window.
|
||||
- Each friend connection mode shows the realmlist line to use.
|
||||
|
||||
[Release](https://github.com/Corfirean/coa-server-manager/releases/tag/v0.1.3) · [Source changes](https://github.com/Corfirean/coa-server-manager/compare/v0.1.2...v0.1.3)
|
||||
|
||||
## 0.1.2 — 2026-09-30
|
||||
|
||||
- Manager updates download in the background and install when the app closes.
|
||||
- Missing module configuration files are created from the supplied defaults.
|
||||
|
||||
[Release](https://github.com/Corfirean/coa-server-manager/releases/tag/v0.1.2) · [Source changes](https://github.com/Corfirean/coa-server-manager/compare/v0.1.1...v0.1.2)
|
||||
|
||||
## 0.1.1 — 2026-09-30
|
||||
|
||||
- Added translations throughout setup, server updates, backups, diagnostics and settings.
|
||||
- Added clearer errors when server packages are unavailable or a server cannot be reached.
|
||||
|
||||
[Release](https://github.com/Corfirean/coa-server-manager/releases/tag/v0.1.1) · [Source changes](https://github.com/Corfirean/coa-server-manager/compare/v0.1.0...v0.1.1)
|
||||
|
||||
## 0.1.0 — 2026-09-30
|
||||
|
||||
- Initial Windows release: install or import a server and manage startup from one app.
|
||||
- Configure server and bot settings, manage accounts, create backups and restore saved data.
|
||||
- Launch the game client, set up sharing with friends and collect diagnostics.
|
||||
|
||||
[Release](https://github.com/Corfirean/coa-server-manager/releases/tag/v0.1.0)
|
||||
Generated
+376
-6
@@ -8,6 +8,41 @@ version = "2.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa"
|
||||
|
||||
[[package]]
|
||||
name = "aead"
|
||||
version = "0.5.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0"
|
||||
dependencies = [
|
||||
"crypto-common",
|
||||
"generic-array",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "aes"
|
||||
version = "0.8.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"cipher",
|
||||
"cpufeatures",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "aes-gcm"
|
||||
version = "0.10.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "831010a0f742e1209b3bcea8fab6a8e149051ba6099432c8cb2cc117dec3ead1"
|
||||
dependencies = [
|
||||
"aead",
|
||||
"aes",
|
||||
"cipher",
|
||||
"ctr",
|
||||
"ghash",
|
||||
"subtle",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "aho-corasick"
|
||||
version = "1.1.5"
|
||||
@@ -276,6 +311,15 @@ dependencies = [
|
||||
"serde_core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "blake2"
|
||||
version = "0.10.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "46502ad458c9a52b69d4d4d32775c788b7a1b85e8bc9d482d92250fc0e3f8efe"
|
||||
dependencies = [
|
||||
"digest",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "block-buffer"
|
||||
version = "0.10.4"
|
||||
@@ -477,6 +521,30 @@ version = "1.0.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4e7648175b45a9a48536d676f68d918270699102aa8dab5496df06904c914600"
|
||||
|
||||
[[package]]
|
||||
name = "chacha20"
|
||||
version = "0.9.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c3613f74bd2eac03dad61bd53dbe620703d4371614fe0bc3b9f04dd36fe4e818"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"cipher",
|
||||
"cpufeatures",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "chacha20poly1305"
|
||||
version = "0.10.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "10cd79432192d1c0f4e1a0fef9527696cc039165d729fb41b3f4f4f354c2dc35"
|
||||
dependencies = [
|
||||
"aead",
|
||||
"chacha20",
|
||||
"cipher",
|
||||
"poly1305",
|
||||
"zeroize",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "chrono"
|
||||
version = "0.4.45"
|
||||
@@ -489,20 +557,51 @@ dependencies = [
|
||||
"windows-link",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cipher"
|
||||
version = "0.4.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad"
|
||||
dependencies = [
|
||||
"crypto-common",
|
||||
"inout",
|
||||
"zeroize",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "coa-control-proto"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"base64 0.22.1",
|
||||
"coa-registry-proto",
|
||||
"ed25519-dalek",
|
||||
"hex",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"sha2",
|
||||
"snow",
|
||||
"thiserror 2.0.21",
|
||||
"uuid",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "coa-core"
|
||||
version = "0.6.9"
|
||||
version = "0.7.1"
|
||||
dependencies = [
|
||||
"base64 0.22.1",
|
||||
"chrono",
|
||||
"coa-control-proto",
|
||||
"coa-registry-proto",
|
||||
"dunce",
|
||||
"ed25519-dalek",
|
||||
"flate2",
|
||||
"fs4",
|
||||
"hex",
|
||||
"if-addrs",
|
||||
"num-bigint",
|
||||
"rand_core",
|
||||
"rand_core 0.6.4",
|
||||
"reqwest 0.12.28",
|
||||
"rusqlite",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"sha1",
|
||||
@@ -512,15 +611,30 @@ dependencies = [
|
||||
"thiserror 2.0.21",
|
||||
"tracing",
|
||||
"tracing-subscriber",
|
||||
"tungstenite",
|
||||
"uuid",
|
||||
"windows-sys 0.60.2",
|
||||
"zip 2.4.2",
|
||||
"zstd",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "coa-registry-proto"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"base64 0.22.1",
|
||||
"ed25519-dalek",
|
||||
"hex",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"sha2",
|
||||
"thiserror 2.0.21",
|
||||
"uuid",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "coa-release"
|
||||
version = "0.6.9"
|
||||
version = "0.7.1"
|
||||
dependencies = [
|
||||
"chrono",
|
||||
"coa-core",
|
||||
@@ -529,9 +643,11 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "coa-server-manager"
|
||||
version = "0.6.9"
|
||||
version = "0.7.1"
|
||||
dependencies = [
|
||||
"coa-control-proto",
|
||||
"coa-core",
|
||||
"coa-registry-proto",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"tauri",
|
||||
@@ -668,6 +784,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a"
|
||||
dependencies = [
|
||||
"generic-array",
|
||||
"rand_core 0.6.4",
|
||||
"typenum",
|
||||
]
|
||||
|
||||
@@ -700,6 +817,15 @@ version = "1.0.13"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "914a755b7c2d4af2bdcff7ce1739e2db9a1b81a9b07123d8015786ae03c0980d"
|
||||
|
||||
[[package]]
|
||||
name = "ctr"
|
||||
version = "0.9.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835"
|
||||
dependencies = [
|
||||
"cipher",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "curve25519-dalek"
|
||||
version = "4.1.3"
|
||||
@@ -761,6 +887,12 @@ dependencies = [
|
||||
"syn 3.0.6",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "data-encoding"
|
||||
version = "2.11.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4583a4551df46e2792f82ceeac45e850d2e2d5debba0b91f102385cda5b11f06"
|
||||
|
||||
[[package]]
|
||||
name = "dbus"
|
||||
version = "0.9.12"
|
||||
@@ -862,6 +994,7 @@ checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"
|
||||
dependencies = [
|
||||
"block-buffer",
|
||||
"crypto-common",
|
||||
"subtle",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1000,7 +1133,7 @@ checksum = "70e796c081cee67dc755e1a36a0a172b897fab85fc3f6bc48307991f64e4eca9"
|
||||
dependencies = [
|
||||
"curve25519-dalek",
|
||||
"ed25519",
|
||||
"rand_core",
|
||||
"rand_core 0.6.4",
|
||||
"serde",
|
||||
"sha2",
|
||||
"subtle",
|
||||
@@ -1101,6 +1234,18 @@ dependencies = [
|
||||
"pin-project-lite",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "fallible-iterator"
|
||||
version = "0.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2acce4a10f12dc2fb14a218589d4f1f62ef011b2d0cc4b3cb1bba8e94da14649"
|
||||
|
||||
[[package]]
|
||||
name = "fallible-streaming-iterator"
|
||||
version = "0.1.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7360491ce676a36bf9bb3c56c1aa791658183a54d2744120f27285738d90465a"
|
||||
|
||||
[[package]]
|
||||
name = "fastrand"
|
||||
version = "2.5.0"
|
||||
@@ -1460,6 +1605,16 @@ dependencies = [
|
||||
"r-efi 6.0.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ghash"
|
||||
version = "0.5.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f0d8a4362ccb29cb0b265253fb0a2728f592895ee6854fd9bc13f2ffda266ff1"
|
||||
dependencies = [
|
||||
"opaque-debug",
|
||||
"polyval",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "gio"
|
||||
version = "0.18.4"
|
||||
@@ -1614,11 +1769,32 @@ version = "0.12.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"
|
||||
|
||||
[[package]]
|
||||
name = "hashbrown"
|
||||
version = "0.16.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100"
|
||||
dependencies = [
|
||||
"foldhash",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "hashbrown"
|
||||
version = "0.17.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a"
|
||||
dependencies = [
|
||||
"foldhash",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "hashlink"
|
||||
version = "0.12.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a596f1b20ed2cc5ecac41a164aaebc7258057060f06c0cf7a2ba3991ee7990fb"
|
||||
dependencies = [
|
||||
"hashbrown 0.17.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "heck"
|
||||
@@ -1956,6 +2132,15 @@ dependencies = [
|
||||
"cfb",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "inout"
|
||||
version = "0.1.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "879f10e63c20629ecabbb64a8010319738c66a5cd0c29b02d63d272b03751d01"
|
||||
dependencies = [
|
||||
"generic-array",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ipnet"
|
||||
version = "2.12.2"
|
||||
@@ -2255,6 +2440,17 @@ dependencies = [
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "libsqlite3-sys"
|
||||
version = "0.38.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f1d20bef17f513b9b3004532233187769cd072d790971f4e4da0e346eb6401e8"
|
||||
dependencies = [
|
||||
"cc",
|
||||
"pkg-config",
|
||||
"vcpkg",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "linux-raw-sys"
|
||||
version = "0.12.1"
|
||||
@@ -2696,6 +2892,12 @@ version = "1.21.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
|
||||
|
||||
[[package]]
|
||||
name = "opaque-debug"
|
||||
version = "0.3.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381"
|
||||
|
||||
[[package]]
|
||||
name = "open"
|
||||
version = "5.4.4"
|
||||
@@ -2979,6 +3181,29 @@ dependencies = [
|
||||
"windows-sys 0.61.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "poly1305"
|
||||
version = "0.8.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8159bd90725d2df49889a078b54f4f79e87f1f8a8444194cdca81d38f5393abf"
|
||||
dependencies = [
|
||||
"cpufeatures",
|
||||
"opaque-debug",
|
||||
"universal-hash",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "polyval"
|
||||
version = "0.6.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9d1fe60d06143b2430aa532c94cfe9e29783047f06c0d7fd359a9a51b729fa25"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"cpufeatures",
|
||||
"opaque-debug",
|
||||
"universal-hash",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "portable-atomic"
|
||||
version = "1.15.0"
|
||||
@@ -3009,6 +3234,15 @@ version = "0.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391"
|
||||
|
||||
[[package]]
|
||||
name = "ppv-lite86"
|
||||
version = "0.2.21"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9"
|
||||
dependencies = [
|
||||
"zerocopy",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "precomputed-hash"
|
||||
version = "0.1.1"
|
||||
@@ -3107,6 +3341,26 @@ version = "6.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf"
|
||||
|
||||
[[package]]
|
||||
name = "rand"
|
||||
version = "0.9.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b9ef1d0d795eb7d84685bca4f72f3649f064e6641543d3a8c415898726a57b41"
|
||||
dependencies = [
|
||||
"rand_chacha",
|
||||
"rand_core 0.9.5",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rand_chacha"
|
||||
version = "0.9.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb"
|
||||
dependencies = [
|
||||
"ppv-lite86",
|
||||
"rand_core 0.9.5",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rand_core"
|
||||
version = "0.6.4"
|
||||
@@ -3116,6 +3370,15 @@ dependencies = [
|
||||
"getrandom 0.2.17",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rand_core"
|
||||
version = "0.9.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c"
|
||||
dependencies = [
|
||||
"getrandom 0.3.4",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "raw-window-handle"
|
||||
version = "0.6.2"
|
||||
@@ -3305,6 +3568,31 @@ dependencies = [
|
||||
"windows-sys 0.52.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rsqlite-vfs"
|
||||
version = "0.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c51c9ae4df8a7fba42103df5c621fa3c37eccf3a3c650879e90fc48b11cc192c"
|
||||
dependencies = [
|
||||
"hashbrown 0.16.1",
|
||||
"thiserror 2.0.21",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rusqlite"
|
||||
version = "0.40.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "23f2a97da3e3873c73cb2a2e71b35c40ff95e0b1eefa8d72d8499a6928c3b5b3"
|
||||
dependencies = [
|
||||
"bitflags 2.13.2",
|
||||
"fallible-iterator",
|
||||
"fallible-streaming-iterator",
|
||||
"hashlink",
|
||||
"libsqlite3-sys",
|
||||
"smallvec",
|
||||
"sqlite-wasm-rs",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rustc-hash"
|
||||
version = "2.1.3"
|
||||
@@ -3769,7 +4057,7 @@ version = "2.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de"
|
||||
dependencies = [
|
||||
"rand_core",
|
||||
"rand_core 0.6.4",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -3812,6 +4100,22 @@ version = "1.16.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f9395f0f0eee849a9b707b2f06bb92a6a422090e2123bb2ef8e87a0e61892a8e"
|
||||
|
||||
[[package]]
|
||||
name = "snow"
|
||||
version = "0.9.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "850948bee068e713b8ab860fe1adc4d109676ab4c3b621fd8147f06b261f2f85"
|
||||
dependencies = [
|
||||
"aes-gcm",
|
||||
"blake2",
|
||||
"chacha20poly1305",
|
||||
"curve25519-dalek",
|
||||
"rand_core 0.6.4",
|
||||
"rustc_version",
|
||||
"sha2",
|
||||
"subtle",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "socket2"
|
||||
version = "0.6.5"
|
||||
@@ -3880,6 +4184,18 @@ dependencies = [
|
||||
"der",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "sqlite-wasm-rs"
|
||||
version = "0.5.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "dc3efc0da82635d7e1ced0053bbbfa8c7ab9645d0bf36ceb4f7127bb85315d75"
|
||||
dependencies = [
|
||||
"cc",
|
||||
"js-sys",
|
||||
"rsqlite-vfs",
|
||||
"wasm-bindgen",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "stable_deref_trait"
|
||||
version = "1.2.1"
|
||||
@@ -4798,6 +5114,24 @@ version = "0.2.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b"
|
||||
|
||||
[[package]]
|
||||
name = "tungstenite"
|
||||
version = "0.26.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4793cb5e56680ecbb1d843515b23b6de9a75eb04b66643e256a396d43be33c13"
|
||||
dependencies = [
|
||||
"bytes",
|
||||
"data-encoding",
|
||||
"http",
|
||||
"httparse",
|
||||
"log",
|
||||
"native-tls",
|
||||
"rand",
|
||||
"sha1",
|
||||
"thiserror 2.0.21",
|
||||
"utf-8",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "typeid"
|
||||
version = "1.0.3"
|
||||
@@ -4833,6 +5167,16 @@ version = "1.13.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c6f5d3c3b1bf09027a88a6bc961fc00497d651009560b5463668dc81b0fa87a8"
|
||||
|
||||
[[package]]
|
||||
name = "universal-hash"
|
||||
version = "0.5.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea"
|
||||
dependencies = [
|
||||
"crypto-common",
|
||||
"subtle",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "untrusted"
|
||||
version = "0.9.0"
|
||||
@@ -4864,6 +5208,12 @@ dependencies = [
|
||||
"url",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "utf-8"
|
||||
version = "0.7.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9"
|
||||
|
||||
[[package]]
|
||||
name = "utf8_iter"
|
||||
version = "1.0.4"
|
||||
@@ -5758,6 +6108,26 @@ dependencies = [
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "zerocopy"
|
||||
version = "0.8.61"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "879fb705ce98c32e41ebdb970fbe1204f8492423b314c6ab0354c3e7b5542866"
|
||||
dependencies = [
|
||||
"zerocopy-derive",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "zerocopy-derive"
|
||||
version = "0.8.61"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "708882a28301d604fa039cc7727607a98d04c4b86dc76ec9cc683f805d709759"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.119",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "zerofrom"
|
||||
version = "0.1.8"
|
||||
|
||||
+3
-2
@@ -1,9 +1,10 @@
|
||||
[workspace]
|
||||
resolver = "2"
|
||||
members = ["crates/coa-core", "crates/coa-release", "src-tauri"]
|
||||
members = ["crates/coa-core", "crates/coa-release", "crates/coa-registry-proto", "crates/coa-control-proto", "src-tauri"]
|
||||
exclude = ["services/coa-registry", "services/coa-registry-e2e", "services/coa-coordinator", "services/coa-relay"]
|
||||
|
||||
[workspace.package]
|
||||
version = "0.6.9"
|
||||
version = "0.7.1"
|
||||
edition = "2021"
|
||||
license = "AGPL-3.0-only"
|
||||
|
||||
|
||||
@@ -1,12 +1,16 @@
|
||||
# CoA Server Manager
|
||||
|
||||
**Portable characters are experimental.** This feature is in active development and may contain bugs.
|
||||
|
||||
A Windows app that installs and runs your own **Conquest of Azeroth** server (AzerothCore) with a few clicks:
|
||||
no console, no config files, no database tools. Tauri 2 + Rust + React.
|
||||
|
||||

|
||||

|
||||
|
||||
## What it does
|
||||
|
||||
* **Portable characters (Experimental).** Keep saved characters in the Manager, review their saved versions and make an existing character portable from a realm you can access. See the [short guide](docs/PORTABLE-CHARACTERS.md).
|
||||
* **Find a realm.** Browse public realms and compare their game modes, level caps, rates, modules and population.
|
||||
* **One-click install.** Downloads a signed, verified server package (resumable, checked file by file), sets up the
|
||||
database and creates your first account. Or import a server you already have.
|
||||
* **Start / Stop / PLAY.** One button for the whole server (database, auth, world) with live status, uptime and
|
||||
@@ -18,14 +22,14 @@ no console, no config files, no database tools. Tauri 2 + Rust + React.
|
||||
into **UPDATE**. Updates are authenticated (Ed25519), back up first, keep files you changed and can be rolled back.
|
||||
* **Backups.** Characters, accounts and settings on demand, automatically before every update; verify and restore
|
||||
from the app.
|
||||
* **CoA / Wildcard realms.** Choose the active realm on Overview. A server build with Wildcard support is required;
|
||||
* **CoA / Wildcard / Warcraft Reborn realms.** Choose the active realm on Overview. A server build supporting the selected realm is required;
|
||||
the first switch copies world data and creates an empty character database. Accounts are shared, characters and
|
||||
module settings are separate, and only one world runs. Switching a running server saves characters and restarts it.
|
||||
The closed client's saved realm follows this selection and is checked again before PLAY. If the client is open,
|
||||
the change is applied on the next launch through the Manager.
|
||||
CoA companions are unavailable on Wildcard; other optional modules are experimental. Backups include both realms,
|
||||
and database updates apply to both.
|
||||
See [realm profiles and validation](docs/WILDCARD.md).
|
||||
Bots are unavailable on Wildcard and Warcraft Reborn; other optional modules are experimental. Backups and
|
||||
database updates include every created realm. Simultaneous startup supports CoA + Wildcard only.
|
||||
See [Wildcard guide](docs/WILDCARD.md) and [Warcraft Reborn](docs/WARCRAFT-REBORN.md).
|
||||
* **Companions (bots).** Fill the world with level-appropriate bots, see progress, stop spawning, take them offline,
|
||||
despawn N to relieve the server, and choose how many log in at server start.
|
||||
* **Realmlist switcher.** Keep named realmlists (for example *Solo* and *PTR*) and switch the game client between them from a
|
||||
@@ -39,17 +43,22 @@ no console, no config files, no database tools. Tauri 2 + Rust + React.
|
||||
supports LAN, direct and private-network (Tailscale) play, with step-by-step guides and a package to send to friends.
|
||||
* **Updates to the Manager itself** download in the background and install when you close it. Your servers are never
|
||||
stopped or changed by a Manager update.
|
||||
* **Languages:** English, Russian, German, French, Spanish.
|
||||
* **Languages:** English, Russian, German, French, Spanish, Simplified Chinese.
|
||||
|
||||
| Install | Ready |
|
||||
|---------|-------|
|
||||
|  |  |
|
||||
## See the Manager
|
||||
|
||||
| Overview | Server updates |
|
||||
|----------|----------------|
|
||||
|  |  |
|
||||
| Portable characters (Experimental) | Public realms |
|
||||
|---|---|
|
||||
|  |  |
|
||||
|
||||

|
||||
| Companions | Backups |
|
||||
|---|---|
|
||||
|  |  |
|
||||
|
||||
The full gallery also covers setup, modules, game clients, playing with friends and making an existing character portable.
|
||||
|
||||
|
||||
[Browse the screenshot gallery](docs/SCREENSHOTS.md) · [Player and server owner guides](docs/README.md).
|
||||
|
||||
## Install
|
||||
|
||||
@@ -57,11 +66,20 @@ Download the installer from the [Releases](https://github.com/Corfirean/coa-serv
|
||||
and run it. You need about 10 GB of free disk space for the server. The game client (about 43 GB) is separate: point the
|
||||
Manager at the one you have, or let it download one for you.
|
||||
|
||||
## Changelog
|
||||
|
||||
[Manager release history](CHANGELOG.md) · [Server release history](https://github.com/Corfirean/coa-server-build/blob/main/CHANGELOG.md).
|
||||
Manager and server updates have separate version histories.
|
||||
|
||||
## Status
|
||||
|
||||
Phases 0–10 of the plan in [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) are done: foundation, import, start/stop,
|
||||
config engine, backups, clean install from signed packages, updates, companions, client launch, friends, polish.
|
||||
Remaining work (translation review by native speakers, optional extras) is listed in section 9 of that document. Translation notes: [docs/TRANSLATIONS.md](docs/TRANSLATIONS.md).
|
||||
**In active development.** Bugs may still occur. If you run into a problem, please [open an issue](https://github.com/Corfirean/coa-server-manager/issues/new/choose).
|
||||
|
||||
### Known Limitations
|
||||
* **Native client login prefill**: Ascension's 3.3.5 client does not accept command-line credentials; users type their password once or link an existing account.
|
||||
* **Non-Windows SecretStore**: Windows uses DPAPI (`CryptProtectData`) with domain separation entropy. On Linux/macOS, keys fall back to strict 0600 file permissions.
|
||||
* **Direct to Relay migration**: Established direct TCP sessions cannot migrate mid-stream to Relay; network breaks trigger automatic fallback on the next JOIN.
|
||||
* **WorkerThreads**: `CharacterDatabase.WorkerThreads` must be set to `1` (the default) for safe remote portable character imports.
|
||||
|
||||
## Develop
|
||||
```
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
area: manager
|
||||
type: added
|
||||
audience: admins
|
||||
title: Linux Docker servers follow Settings, sharing and backups (experimental)
|
||||
---
|
||||
Experimental. Settings the Docker backend fixes are hidden, friends sharing and logs work, the game data folder can be changed, and the realm no longer shows offline after a start.
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
area: manager
|
||||
type: changed
|
||||
audience: admins
|
||||
title: Failed server startup after an update automatically restores the previous version
|
||||
---
|
||||
The Manager restores server files and databases, then checks the recovered server. If recovery cannot be confirmed, it preserves the recovery point and blocks further startup until the problem is resolved.
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
area: manager
|
||||
type: fixed
|
||||
audience: admins
|
||||
title: Windows update recovery preserves database procedures triggers and views
|
||||
---
|
||||
A verified copy of stopped MySQL restores all databases and accounts together. Interrupted restoration can be retried, and the replaced database directory is retained.
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
area: manager
|
||||
type: fixed
|
||||
audience: admins
|
||||
title: Custom races bot setting synchronizes Playerbots excluded race lists
|
||||
---
|
||||
The "Bots can be custom races" setting now configures AiPlayerbot.ExcludedBotRaces in playerbots.conf. Off excludes all added races (recommended), while on allows stable added races (experimental).
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
area: manager
|
||||
type: changed
|
||||
audience: admins
|
||||
title: Custom race client patches update to the latest races and appearances
|
||||
---
|
||||
The module card offers an upgrade for older patches. Archive downloads are verified before installation.
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
area: manager
|
||||
type: fixed
|
||||
audience: admins
|
||||
title: Blocked updates identify database objects that prevent automatic recovery
|
||||
---
|
||||
Diagnostics include the complete list of unsupported database objects across the recovery point, helping resolve update failures without removing user data.
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
area: manager
|
||||
type: fixed
|
||||
audience: admins
|
||||
title: Background world servers no longer stop because the local console is closed
|
||||
---
|
||||
The Manager automatically disables the local interactive console before starting the world server. Its remote console remains available, and no manual configuration changes are needed.
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
area: manager
|
||||
type: added
|
||||
audience: admins
|
||||
title: Updates can follow signed channels that select a complete server release
|
||||
---
|
||||
The Manager checks the channel signature and downloads every package part from the same release. Existing installations continue using the previous download source until the new channel is published.
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
area: manager
|
||||
type: fixed
|
||||
audience: admins
|
||||
title: Server updates check startup privately before allowing players to connect
|
||||
---
|
||||
Startup checks use temporary local ports. Original settings are restored before opening the server, and interrupted checks retain a recovery journal.
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
area: manager
|
||||
type: fixed
|
||||
audience: admins
|
||||
title: Local hosts can connect while sharing a server online
|
||||
---
|
||||
The Manager no longer replaces the realm's local address with its public address when Friends mode is enabled.
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
area: manager
|
||||
type: fixed
|
||||
audience: admins
|
||||
title: Updates repair missing database defaults from the verified release schema
|
||||
---
|
||||
Only missing literal defaults are restored when column properties match. Existing rows, custom defaults, types and nullability are preserved; unresolved incompatibilities still block the update.
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
area: manager
|
||||
type: fixed
|
||||
audience: admins
|
||||
title: Server updates no longer replay module installation scripts on existing databases
|
||||
---
|
||||
Update packages contain incremental SQL only. Module table initialization and seed scripts remain available when preparing a clean installation, preventing existing content from being reset during updates.
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
area: manager
|
||||
type: added
|
||||
audience: admins
|
||||
title: Windows server updates are tested on a private copy before changing your installation
|
||||
---
|
||||
The Manager tests migrations and server startup using your databases and configurations. A failed rehearsal leaves the installed server unchanged and preserves a diagnostic report.
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
area: manager
|
||||
type: added
|
||||
audience: admins
|
||||
title: Server updates can require a tested combination of platform and installed version
|
||||
---
|
||||
Signed release metadata identifies core and module revisions, supported starting versions and database contracts. Incompatible packages are rejected before shutdown; changed schema contracts and incompatible databases block installation before migration.
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
area: manager
|
||||
type: fixed
|
||||
audience: admins
|
||||
title: Failed database checks keep a complete report after rollback
|
||||
---
|
||||
Schema errors show readable default values and save every detected difference for troubleshooting, including after the server is restored.
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
area: manager
|
||||
type: fixed
|
||||
audience: admins
|
||||
title: Server and Bots settings open without a blank window
|
||||
---
|
||||
Opening settings no longer crashes the interface after loading. Unsaved changes can still be saved or discarded before leaving the page.
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
area: manager
|
||||
type: added
|
||||
audience: players
|
||||
title: Players can install custom race patches when connecting to a friend
|
||||
---
|
||||
Install the custom race client patch directly from the Game client section without hosting a server.
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
area: manager
|
||||
type: fixed
|
||||
audience: admins
|
||||
title: Large server updates no longer repeatedly rewrite the recovery journal
|
||||
---
|
||||
Updates containing rebuilt navigation data now prepare all recovery copies before replacing files. Interrupted updates remain recoverable without rewriting the full journal for every file.
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
area: manager
|
||||
type: fixed
|
||||
audience: admins
|
||||
title: Normalize rehearsal server roots to prevent Windows path prefix errors
|
||||
---
|
||||
Server update rehearsals now canonicalize the installation root before collecting files, resolving a "prefix not found" error during rehearsal preparation on Windows.
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
area: client
|
||||
type: changed
|
||||
audience: admins
|
||||
title: Custom race client installation follows the current upstream release
|
||||
---
|
||||
The installer verifies the current race archives and includes the two additional MPQs. Legacy patch hashes remain available so upgrading never mistakes the old custom executable for an original launcher file.
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
area: manager
|
||||
type: fixed
|
||||
audience: admins
|
||||
title: Docker friend mode requests a restart when remote client support changes
|
||||
---
|
||||
Enabling remote CoA clients now requests a world restart even when the game ports were already open. Repeating the same unchanged setting does not request another restart.
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
area: manager
|
||||
type: added
|
||||
audience: admins
|
||||
title: Module cards show installed server revisions and the client race patch version
|
||||
---
|
||||
Module revisions come from the currently installed release metadata. The race card shows the client patch version separately; missing version metadata is reported honestly instead of showing a download version as installed.
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
area: manager
|
||||
type: fixed
|
||||
audience: admins
|
||||
title: Server updates accept long Windows paths inside the private test server
|
||||
---
|
||||
Long SQL file paths no longer fail the folder safety check during update rehearsals. Files outside the server folder remain blocked.
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
area: manager
|
||||
type: fixed
|
||||
audience: admins
|
||||
title: Diagnostics record blocked startup requests and maintenance owner information
|
||||
---
|
||||
A start refused before the launcher runs is now logged with its reason. Exported diagnostics include the last recorded maintenance owner, while clearly distinguishing old metadata from a currently held operating-system lock.
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
area: manager
|
||||
type: fixed
|
||||
audience: admins
|
||||
title: Client race patches can be repaired and removed while preserving original files
|
||||
---
|
||||
Every overwritten client file gets an original backup. Switching preserves newer launcher files; checksums detect missing or replaced assets. Repair and removal are always available, with rollback if a file operation fails.
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
area: manager
|
||||
type: fixed
|
||||
audience: admins
|
||||
title: Checking an already installed server update no longer reports incompatibility
|
||||
---
|
||||
The installed release can be checked again even when its compatibility list only names earlier releases. Platform checks and protection against downgrades still apply.
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
area: manager
|
||||
type: fixed
|
||||
audience: admins
|
||||
title: Failed server startup shows service errors even when the launcher reported ready
|
||||
---
|
||||
Update rehearsal and startup failures include recent world, authentication and database error lines. Missing tables and late startup failures are visible directly in the error details, with secrets redacted.
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
area: bots
|
||||
type: fixed
|
||||
audience: admins
|
||||
title: Disabling custom races for SQUID bots now excludes all nonstandard races
|
||||
---
|
||||
The standard-races preset keeps only the ten original playable races. High elves, worgen and other custom race IDs are excluded, and the displayed setting reads complete race IDs rather than matching number substrings.
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
area: manager
|
||||
type: fixed
|
||||
audience: admins
|
||||
title: Starting the server waits for update checks and identifies ongoing maintenance
|
||||
---
|
||||
Downloading an update manifest no longer blocks startup. A start waits up to 30 seconds for a check to finish; other active maintenance still blocks it safely and shows its operation, process and start time.
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
area: bots
|
||||
type: changed
|
||||
audience: admins
|
||||
title: The experimental SQUID race preset follows the current race release
|
||||
---
|
||||
Custom-race bots now use the upstream supported-race preset, excluding Test Race, Skyborne and Darkfallen. The standard-races preset continues to exclude all custom races.
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
area: manager
|
||||
type: fixed
|
||||
audience: admins
|
||||
title: Already running MySQL is recognized before startup readiness checks
|
||||
---
|
||||
A verified MySQL listener replaces a stale or supervisor-only launcher record before startup. Existing databases are reused instead of waiting for a port owned by a different process from the same executable.
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
area: manager
|
||||
type: changed
|
||||
audience: admins
|
||||
title: New servers install the current stable build directly
|
||||
---
|
||||
A clean installation downloads the complete package of the selected stable release, including its prepared database. It no longer installs an old base and asks for a separate update. Missing or mismatched full packages stop installation before changing the destination.
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
area: manager
|
||||
type: changed
|
||||
audience: players
|
||||
title: Install the matching client patches for Grummle
|
||||
---
|
||||
Custom race installation includes the new Grummle appearance and voices while retaining the existing race assets. Older installations can still be safely switched off or removed.
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
area: manager
|
||||
type: fixed
|
||||
audience: admins
|
||||
title: Failed repairs restore the previous server after final verification errors
|
||||
---
|
||||
Errors after file replacement now undo the repair using its verified recovery point, including final file or database check errors. If recovery fails, the journal retains the cause and further server actions remain blocked.
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
area: manager
|
||||
type: fixed
|
||||
audience: admins
|
||||
title: Failed server updates show an error on the Overview screen
|
||||
---
|
||||
The error stays visible after the progress bar disappears, with technical details and a copy button. Recovery-state errors are shown there too.
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
area: manager
|
||||
type: changed
|
||||
audience: admins
|
||||
title: Private update checks show preparation stages and stop failure details
|
||||
---
|
||||
Private-copy preparation reports checked and copied file counts, database tests and startup stages. Failed shutdown reports the server folder, remaining processes and launcher reason. Port conflicts identify the owning process and executable.
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
area: manager
|
||||
type: fixed
|
||||
audience: admins
|
||||
title: Repair recovery copies preserve all bundled database objects and accounts
|
||||
---
|
||||
Windows repairs now save a verified copy of stopped MySQL before changing server files or SQL. Recovery preserves procedures, triggers, views and database accounts as well as player rows.
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
area: manager
|
||||
type: fixed
|
||||
audience: admins
|
||||
title: Server checks report interrupted SQUID database imports
|
||||
---
|
||||
Check and Repair now report SQUID pending imports and missing bot character tables separately from package migrations. Interrupted imports retain their records and require verified database recovery.
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
area: manager
|
||||
type: fixed
|
||||
audience: admins
|
||||
title: Shutdown remains available when startup templates or database records are damaged
|
||||
---
|
||||
Stop uses existing shutdown settings instead of rendering startup templates. Missing or stale MySQL records are recovered only from the exact installed executable and its owned port; foreign processes are never adopted.
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
area: manager
|
||||
type: fixed
|
||||
audience: admins
|
||||
title: Successful server repairs no longer block later server actions
|
||||
---
|
||||
Repair verifies restored files before completing its recovery record. Older completed repair records are accepted only when every repaired file still matches its expected content.
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
area: manager
|
||||
type: changed
|
||||
audience: admins
|
||||
title: Server updates apply migrations once after saving a recovery point
|
||||
---
|
||||
Updates no longer build and start a second full server copy. The Manager checks both realms, saves recovery, applies pending SQL once and verifies startup. Failed SQL or startup restores the recovery point. Full-copy upgrade testing remains a release task.
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
area: manager
|
||||
type: changed
|
||||
audience: admins
|
||||
title: Older server versions update directly without installing intermediate packages
|
||||
---
|
||||
The Manager checks database history and applies missing SQL from the latest signed package. A version missing from the release test list no longer blocks the update. Unknown versions, interrupted migrations and downgrades remain blocked.
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
area: manager
|
||||
type: fixed
|
||||
audience: admins
|
||||
title: Update validation recognizes an already stopped server
|
||||
---
|
||||
Validation uses the same complete-server stop check as recovery instead of issuing redundant unconditional shutdown commands.
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
area: manager
|
||||
type: fixed
|
||||
audience: admins
|
||||
title: Older servers find a tested intermediate update instead of being blocked
|
||||
---
|
||||
When the latest release cannot update an older server directly, Manager offers a signed intermediate release from its compatibility matrix and explains how to continue to the latest version.
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
area: manager
|
||||
type: fixed
|
||||
audience: admins
|
||||
title: Update checks no longer download a server archive to compare its launcher
|
||||
---
|
||||
Manager recognizes its supported launcher edits against the signed file hash locally. Overlapping checks wait briefly for one another, and the private update copy checks combined program and database space before copying.
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
area: manager
|
||||
type: fixed
|
||||
audience: admins
|
||||
title: Recorded core SQL stays applied after old history tables are cleaned up
|
||||
---
|
||||
Existing core migration records are preserved in Manager history. Unknown legacy checksums remain explicitly unknown, and interrupted or changed migrations are still rejected.
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
area: manager
|
||||
type: fixed
|
||||
audience: admins
|
||||
title: Switching realms no longer repeats shared account database updates
|
||||
---
|
||||
Solo and Wildcard use one migration history for their shared account database. Previously applied records from either realm are recognized without running their SQL again.
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
area: manager
|
||||
type: fixed
|
||||
audience: admins
|
||||
title: Update offers distinguish version support from database validation
|
||||
---
|
||||
An available version sequence no longer claims that every database state has been tested. Database compatibility is checked during the update.
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
area: client
|
||||
type: added
|
||||
audience: players
|
||||
title: New dragon races and updated racial abilities are available
|
||||
---
|
||||
The custom race client includes Drakkin, Drakonid, updated appearances and cursor addons. Existing client files are preserved when installing or removing the patches.
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
area: manager
|
||||
type: fixed
|
||||
audience: admins
|
||||
title: Server stop errors remain readable while private connection codes stay hidden
|
||||
---
|
||||
The Manager keeps useful MySQL shutdown messages in diagnostics without exposing portable character connection codes.
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
area: manager
|
||||
type: fixed
|
||||
audience: players
|
||||
title: Characters on other servers show their CoA class names
|
||||
---
|
||||
The character list shows Barbarian, Necromancer and the other CoA classes instead of a class number.
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
area: manager
|
||||
type: fixed
|
||||
audience: players
|
||||
title: Play can launch Windows clients that require administrator approval
|
||||
---
|
||||
Windows now shows its normal permission prompt when the game requires elevation. Other launch errors retain their original details.
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
area: manager
|
||||
type: fixed
|
||||
audience: players
|
||||
title: Switching Custom Races patches is faster and shows when changes are being applied
|
||||
---
|
||||
The Manager avoids copying large patches when switching them and prevents repeated clicks while the operation is running.
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
area: manager
|
||||
type: changed
|
||||
audience: players
|
||||
title: Portable characters are now clearly marked as experimental
|
||||
---
|
||||
The experimental status is shown both in Characters and when making a character portable from another realm.
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
area: manager
|
||||
type: added
|
||||
audience: admins
|
||||
title: Module settings for Content Scaling include creature health
|
||||
---
|
||||
Adjust creature health for the open world, dungeons, raids, ordinary enemies and bosses. Values from 0.1 to 10 multiply the existing balance; 1 keeps it unchanged. Requires a server build with the matching Content Scaling settings.
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
area: manager
|
||||
type: added
|
||||
audience: admins
|
||||
title: Warcraft Reborn can now be created and selected as a separate realm
|
||||
---
|
||||
Warcraft Reborn has separate characters and settings, shares accounts, and is included in backups, updates and database checks. A server build with Warcraft Reborn support is required.
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
area: manager
|
||||
type: changed
|
||||
audience: players
|
||||
title: Custom Races client patches now use the latest complete package
|
||||
---
|
||||
Install or repair Custom Races client patches from the Modules page to get the updated package, including its latest appearance fixes and login screen artwork.
|
||||
@@ -1,7 +1,6 @@
|
||||
# changelog.d
|
||||
|
||||
One small Markdown file per change that a player or a server owner would notice. They are collected from every CoA
|
||||
repository when a release is made. The rules and the file format are in `AGENTS.md` (section "Changelog") and, in full,
|
||||
One small Markdown file per change that a player or a server owner would notice. Server and Manager releases collect only their own shipped changes from immutable sources; their public histories are separate. The rules and the file format are in `AGENTS.md` (section "Changelog") and, in full,
|
||||
in https://github.com/Corfirean/coa-server-build/blob/main/changelog/GUIDE.md
|
||||
|
||||
This README is ignored by the collector.
|
||||
@@ -0,0 +1,200 @@
|
||||
[
|
||||
{
|
||||
"tag": "v0.6.22",
|
||||
"date": "2026-10-19T07:49:11Z",
|
||||
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.6.22",
|
||||
"body": "## Manager\r\n- Updated Custom Races client patches to 1.8, including Drakkin, Drakonid and updated racial abilities\r\n- Added updated race appearances and cursor addons\r\n- Existing client files are preserved when installing or removing race patches\r\n\r\nPrepared from commit 65df6604846d5492e40a6b08a797199478666e24. Installer and updater signature were verified before publication.\r\n"
|
||||
},
|
||||
{
|
||||
"tag": "v0.6.21",
|
||||
"date": "2026-10-16T12:11:35Z",
|
||||
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.6.21",
|
||||
"body": "## Manager\n- Older server versions update directly to the latest signed package without installing intermediate releases.\n- The published source-version list records release test coverage; a missing entry no longer blocks an older installation by itself.\n- Apply only missing database migrations, preserving recorded AzerothCore history and sharing account migration history between Solo and Wildcard.\n- Save one complete recovery point, apply SQL once and check the database schema, startup, account and character identities. Restore files and databases on failure.\n- Keep unknown imported versions, interrupted migrations, changed SQL checksums, downgrades and incompatible packages blocked.\n- Remove the nested per-update server rehearsal and recursive intermediate-package lookup.\n\nInstalling this Manager does not update your server automatically. Unknown third-party repacks still require a verified starting state; this release does not guess which unrecorded SQL was applied manually.\r\n\nValidation: 11 package-based scenarios passed against Server 0.261015.58, including the earliest base and a repeated current-version check. A separate direct 800006 -> 58 upgrade on an isolated copy preserved all 133 account and 3123 character identities. No client login or gameplay acceptance was performed.\n\r\n"
|
||||
},
|
||||
{
|
||||
"tag": "v0.6.19",
|
||||
"date": "2026-10-16T02:37:16Z",
|
||||
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.6.19",
|
||||
"body": "## Manager\n- Update checks no longer download a full server package just to verify the launcher\n- Concurrent update checks wait briefly for the current check instead of immediately reporting another operation\n- Update rehearsals check the combined space required for program files and databases before creating the private copy\n\nIncludes the signed intermediate upgrade path from v0.6.18 for older server installations.\n\nThis release updates the Manager only. Existing server files and databases are not changed by installing it.\r\n"
|
||||
},
|
||||
{
|
||||
"tag": "v0.6.18",
|
||||
"date": "2026-10-16T00:33:21Z",
|
||||
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.6.18",
|
||||
"body": "## CoA Server Manager 0.6.18\n\n- Fixed update checks blocking older server versions when a tested intermediate release is available\n- Manager now offers the required intermediate update automatically and explains how to continue to the latest stable version\n- Intermediate packages must match the signatures and manifest hashes recorded in the target release's compatibility matrix\n- Unsupported source errors now identify the installed version, target version and directly supported versions\n\nFor servers on **0.261011.800006**, Manager offers **0.261013.54** first. After it completes, check for updates again to install **0.261015.58**. Clear any manually entered Advanced package source to use automatic selection.\n\nThe server package and stable channel have not changed. Existing data follows the normal backup and verified update process.\n"
|
||||
},
|
||||
{
|
||||
"tag": "v0.6.17",
|
||||
"date": "2026-10-15T16:51:52Z",
|
||||
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.6.17",
|
||||
"body": "## CoA Server Manager 0.6.17 / Server 0.261015.58\n\n### Manager\n\n- New servers now install the current stable build directly, without installing 2.0 first\n- Fixed completed repairs leaving the server stuck in a maintenance state\n- Servers can now stop even when startup templates or MySQL process records are damaged\n- Repair now preserves database accounts, views, procedures and triggers, with improved rollback after failures\n- Interrupted SQUID database imports are now reported by Check and Repair\n- Update errors remain visible on Overview, with technical details and a copy button\n- Improved update preparation progress and diagnostics for shutdown failures and port conflicts\n- Updated Custom Races client patches to 1.7 while preserving existing race assets\n\n### Server\n\n- Integrated 34 CoA upstream commits\n- Updated Custom Races to 1.7, adding playable Grummle and their racial abilities\n- Updated SQUID Playerbots to 2.3.1\n- Added complete installation packages for the current server release\n- Improved shutdown recovery and startup configuration errors\n\n### Content scaling\n\n- Creature health settings are now respected while Content Scaling is enabled\n"
|
||||
},
|
||||
{
|
||||
"tag": "v0.6.16",
|
||||
"date": "2026-10-13T12:39:15Z",
|
||||
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.6.16",
|
||||
"body": "**Manager** (for server owners)\n- Added: Linux Docker servers follow Settings, sharing and backups (experimental). Experimental. Settings the Docker backend fixes are hidden, friends sharing and logs work, the game data folder can be changed, and the realm no longer shows offline after a start.\n- Added: Updates can follow signed channels that select a complete server release. The Manager checks the channel signature and downloads every package part from the same release. Existing installations continue using the previous download source until the new channel is published.\n- Added: Windows server updates are tested on a private copy before changing your installation. The Manager tests migrations and server startup using your databases and configurations. A failed rehearsal leaves the installed server unchanged and preserves a diagnostic report.\n- Added: Server updates can require a tested combination of platform and installed version. Signed release metadata identifies core and module revisions, supported starting versions and database contracts. Incompatible packages are rejected before shutdown; changed schema contracts and incompatible databases block installation before migration.\n- Added: Module cards show installed server revisions and the client race patch version. Module revisions come from the currently installed release metadata. The race card shows the client patch version separately; missing version metadata is reported honestly instead of showing a download version as installed.\n- Changed: Failed server startup after an update automatically restores the previous version. The Manager restores server files and databases, then checks the recovered server. If recovery cannot be confirmed, it preserves the recovery point and blocks further startup until the problem is resolved.\n\n----- next message -----\n\n**Manager** (for server owners) (cont.)\n- Fixed: Windows update recovery preserves database procedures triggers and views. A verified copy of stopped MySQL restores all databases and accounts together. Interrupted restoration can be retried, and the replaced database directory is retained.\n- Fixed: Custom races bot setting synchronizes Playerbots excluded race lists. The \"Bots can be custom races\" setting now configures AiPlayerbot.ExcludedBotRaces in playerbots.conf. Off excludes all added races (recommended), while on allows stable added races (experimental).\n- Fixed: Blocked updates identify database objects that prevent automatic recovery. Diagnostics include the complete list of unsupported database objects across the recovery point, helping resolve update failures without removing user data.\n- Fixed: Server updates check startup privately before allowing players to connect. Startup checks use temporary local ports. Original settings are restored before opening the server, and interrupted checks retain a recovery journal.\n- Fixed: Local hosts can connect while sharing a server online. The Manager no longer replaces the realm's local address with its public address when Friends mode is enabled.\n- Fixed: Updates repair missing database defaults from the verified release schema. Only missing literal defaults are restored when column properties match. Existing rows, custom defaults, types and nullability are preserved; unresolved incompatibilities still block the update.\n- Fixed: Server updates no longer replay module installation scripts on existing databases. Update packages contain incremental SQL only. Module table initialization and seed scripts remain available when preparing a clean installation, preventing existing content from being reset during updates.\n\n----- next message -----\n\n**Manager** (for server owners) (cont.)\n- Fixed: Failed database checks keep a complete report after rollback. Schema errors show readable default values and save every detected difference for troubleshooting, including after the server is restored.\n- Fixed: Large server updates no longer repeatedly rewrite the recovery journal. Updates containing rebuilt navigation data now prepare all recovery copies before replacing files. Interrupted updates remain recoverable without rewriting the full journal for every file.\n- Fixed: Normalize rehearsal server roots to prevent Windows path prefix errors. Server update rehearsals now canonicalize the installation root before collecting files, resolving a \"prefix not found\" error during rehearsal preparation on Windows.\n- Fixed: SQUID imports character tables first and reports slow database imports. SQUID prepares character tables before its large travel data. Startup shows each base import and identifies a failed import without starting the world server or replaying an incomplete migration.\n- Fixed: Docker friend mode requests a restart when remote client support changes. Enabling remote CoA clients now requests a world restart even when the game ports were already open. Repeating the same unchanged setting does not request another Line truncated
|
||||
},
|
||||
{
|
||||
"tag": "v0.6.15",
|
||||
"date": "2026-10-11T23:10:59Z",
|
||||
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.6.15",
|
||||
"body": "## Fixes\n\n- Large server updates, including rebuilt maps, vmaps and mmaps, no longer rewrite the complete recovery journal for every file.\n- All recovery copies are prepared before replacing any server file. Interrupted updates still restore the previous files and remove newly created files only when their content matches the update.\n\nValidated by Windows and Linux CI, the full Manager test suite, and a regression covering power loss during file replacement and incomplete recovery-copy preparation.\n\nUpdate the Manager before installing the navigation refresh. Portable Characters and Portable Session Bridge are not included."
|
||||
},
|
||||
{
|
||||
"tag": "v0.6.14",
|
||||
"date": "2026-10-11T21:14:34Z",
|
||||
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.6.14",
|
||||
"body": "See the assets to download the installer. Existing installations update themselves."
|
||||
},
|
||||
{
|
||||
"tag": "v0.6.13",
|
||||
"date": "2026-10-11T14:03:44Z",
|
||||
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.6.13",
|
||||
"body": "See the assets to download the installer. Existing installations update themselves."
|
||||
},
|
||||
{
|
||||
"tag": "v0.6.12",
|
||||
"date": "2026-10-10T03:10:14Z",
|
||||
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.6.12",
|
||||
"body": "See the assets to download the installer. Existing installations update themselves."
|
||||
},
|
||||
{
|
||||
"tag": "v0.6.11",
|
||||
"date": "2026-10-10T03:05:20Z",
|
||||
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.6.11",
|
||||
"body": "See the assets to download the installer. Existing installations update themselves."
|
||||
},
|
||||
{
|
||||
"tag": "v0.6.10",
|
||||
"date": "2026-10-10T02:07:18Z",
|
||||
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.6.10",
|
||||
"body": "See the assets to download the installer. Existing installations update themselves."
|
||||
},
|
||||
{
|
||||
"tag": "v0.6.9",
|
||||
"date": "2026-10-10T01:50:51Z",
|
||||
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.6.9",
|
||||
"body": "See the assets to download the installer. Existing installations update themselves."
|
||||
},
|
||||
{
|
||||
"tag": "v0.6.8",
|
||||
"date": "2026-10-10T01:05:56Z",
|
||||
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.6.8",
|
||||
"body": "See the assets to download the installer. Existing installations update themselves."
|
||||
},
|
||||
{
|
||||
"tag": "v0.6.7",
|
||||
"date": "2026-10-08T04:59:31Z",
|
||||
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.6.7",
|
||||
"body": "See the assets to download the installer. Existing installations update themselves."
|
||||
},
|
||||
{
|
||||
"tag": "v0.6.6",
|
||||
"date": "2026-10-07T05:47:46Z",
|
||||
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.6.6",
|
||||
"body": "See the assets to download the installer. Existing installations update themselves."
|
||||
},
|
||||
{
|
||||
"tag": "v0.6.5",
|
||||
"date": "2026-10-06T06:17:21Z",
|
||||
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.6.5",
|
||||
"body": "# CoA Server Manager 0.6.5 / Server 0.261006.1\n\nUpdate CoA Server Manager to 0.6.5 first, then update the server. This server package requires Manager 0.6.5.\n\n## Server updates and recovery\n\n- Recognize known, signed historical migration checksums without rewriting migration history or replaying applied SQL.\n- Check migration history and SQL files before replacing server files. Interrupted or failed migrations still require recovery.\n- Preserve damaged update records and protect recovery points belonging to unfinished updates. Check saved copies before restoring them.\n- Refresh saved update status after update and recovery attempts, including failures.\n- Recognize launcher adjustments made by the Manager, including older Wildcard launchers. Custom edits still require a choice.\n- Stop offering an already installed launcher update after checking again.\n- Reject older server packages. Use the update's recovery point to undo an update.\n- Restore missing Wildcard card and specialization-cache tables through a new corrective migration, preserving existing tables and data.\n- Fix launcher integration imports when using the server's isolated Python runtime.\n\n## SQUID Playerbots\n\n- Include SQUID Playerbots v1.8.1 together with the matching core, launcher and Manager integration.\n- Provide translated bot settings, release information and controls for the active bot system. Prevent conflicting bot systems from starting together.\n- Include the SQUID database in recovery points when installed.\n- Keep servers with SQUID disabled independent of its database startup hooks.\n- Detect unfinished initial database imports instead of treating partially imported tables as complete.\n- Allow more time for large SQL imports and initial bot creation. The Manager startup deadline is up to 45 minutes when SQUID is enabled; ordinary startup deadlines are unchanged.\n- Preserve historical SQL files and migration history. Only new migrations are applied.\n- Require an explicit keep-or-replace decision when updating imported server binaries protected by their original launcher or updater.\n\n## Local candidate validation\n\nThe signed final package passed an update and startup of both CoA and Wildcard on a marked disposable installation. Selected account, character and inventory fields were preserved, historical migrations were skipped, and a repeated update check was clean. Fresh SQUID database import and repeated startup were checked using the same native binaries and SQL as the final package.\n"
|
||||
},
|
||||
{
|
||||
"tag": "v0.6.4",
|
||||
"date": "2026-10-05T09:22:40Z",
|
||||
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.6.4",
|
||||
"body": "Fixes server updates that failed to start with the repack's bundled Python runtime.\n\nIf an update is waiting for recovery, open Settings → Server updates and choose **Retry server startup**. Successful validation finishes the already applied update without replaying database migrations. Rollback remains available if validation fails.\n\n**Start without updating** and **Play without updating** let you use the installed server or client when a newer version is available. Interrupted server updates still require recovery.\n\n[Shared changelog](https://github.com/Corfirean/coa-server-build/blob/main/CHANGELOG.md)\n"
|
||||
},
|
||||
{
|
||||
"tag": "v0.6.3",
|
||||
"date": "2026-10-04T22:41:10Z",
|
||||
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.6.3",
|
||||
"body": "See the assets to download the installer. Existing installations update themselves."
|
||||
},
|
||||
{
|
||||
"tag": "v0.6.2",
|
||||
"date": "2026-10-04T21:54:32Z",
|
||||
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.6.2",
|
||||
"body": "## Manager 0.6.2\n\n- Server Update and Repair now back up databases before changes and recover databases, files and version metadata together after a failed update.\n- Database checks detect missing Wildcard tables even when migration history says the SQL ran. New server packages include the expected full database schema.\n- Interrupted or failed SQL is not blindly replayed; unresolved recovery is reported before another update or server start.\n- Checks cover race/class starting data and existing character visibility.\n- Adds the bot and module settings included in the reviewed dependency, including SQUID settings and translated controls.\n- Includes the latest Docker database-access changes.\n\nInstall/update Manager first, then update the server package. Run Settings → Check files and database if an existing installation reports database problems. Already lost database rows require a backup; restoring table structure cannot recreate them.\n\nValidation: 233 core tests passed locally after merging current master; workspace check and frontend build passed. Release package verification used disposable MySQL and a signed server package.\r\n\n\nShared release changelog: https://github.com/Corfirean/coa-server-build/blob/main/CHANGELOG.md\n\r\n"
|
||||
},
|
||||
{
|
||||
"tag": "v0.6.1",
|
||||
"date": "2026-10-04T10:58:56Z",
|
||||
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.6.1",
|
||||
"body": "## Changes\n\n- PLAY launches only the game client with the selected realmlist. Use START SERVER separately for your local server.\n- Decimal server multipliers can be typed with either a dot or a comma.\n- Talent settings explain that the standard AzerothCore multiplier does not affect CoA talent points; rested experience settings describe accumulation correctly.\n- Added file/database checks and Repair with backups, verified official packages and reports of unresolved schema damage.\n- Fixed stale character migration history after rebuilding a character database and reject changed hashes of already applied migrations.\n- Added optional simultaneous CoA and Wildcard worlds on Windows, with separate processes, ports, logs and status indicators.\n\n## Notes\n\nRepair requires a stopped server and matching currently published packages. It preserves player data and settings; unsupported schema repairs are reported for corrective migrations.\n\nSimultaneous worlds require a compatible Wildcard server build. Existing Linux/Docker support remains experimental; simultaneous worlds are Windows-only.\n\nDownload the Windows installer below, or let an existing Manager installation update automatically. Server packages are updated separately.\r\n"
|
||||
},
|
||||
{
|
||||
"tag": "v0.6.0",
|
||||
"date": "2026-10-03T18:06:31Z",
|
||||
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.6.0",
|
||||
"body": "# CoA Server Manager changelog\r\n\r\n## 0.6.0 — 2026-10-03\r\n\r\n- Added Simplified Chinese for the interface and all server and bot settings.\r\n- The closed game client now follows the selected CoA or Wildcard realm. Play checks the saved realm before launching; existing settings are preserved and backed up.\r\n- Fixed GitHub reports opening Windows Explorer instead of the default browser. Long reports use the clipboard fallback.\r\n- Fixed configuration snapshots created in the same millisecond overwriting each other during restore.\r\n- Added experimental Linux startup: persistent state uses the XDG data folder, Tailscale detection supports Linux, and a Wayland rendering workaround respects existing user settings.\r\n- Added experimental start, stop and status controls for manually prepared Docker servers, with private database networking and a remote console bound to localhost.\r\n- Linux extraction restores executable permissions for ELF binaries and scripts, and paths retain case-sensitive filesystem semantics.\r\n\r\n### Availability\r\n\r\nThis release ships the Windows installer and signed updater assets. Linux support is a development preview, not a one-click installation flow. Docker installation/database setup, SQL operations and backups, updates, Wildcard realm profiles, and Wine/Proton client launching remain unfinished. Servers must be prepared manually and use Linux binaries built with the packaged configuration layout.\r\n\r\nServer shutdown and starting-zone scaling issues require separate server releases and are not fixed by updating the Manager alone.\r\n"
|
||||
},
|
||||
{
|
||||
"tag": "v0.5.0",
|
||||
"date": "2026-10-03T06:26:08Z",
|
||||
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.5.0",
|
||||
"body": "## CoA and Wildcard realm profiles\n\nChoose CoA or Wildcard on Overview. The first Wildcard switch creates a separate world and empty character database; accounts are shared. Only one world runs at a time. Switching a running server saves characters and restarts it, and returning to CoA restores its module settings.\n\n- Requires a server build and database migrations with Wildcard support. Existing destination databases or realm ID 2 are preserved and block automatic creation.\n- CoA companion bots are unavailable on Wildcard. Content Scaling and other optional modules remain experimental there.\n- Backups cover both realms; restores identify their realm. Server migrations update both realms and shared auth once.\n- Configuration switches support recovery after interruption.\n\nValidation: 178 Rust tests, frontend build and translation checks, native isolated-fixture creation/start/switch, full backup, restore and migration checks. Final real-clock Wildcard gameplay verification: four scenarios passed with zero failures and zero isolated reruns (first login, level rolls, skill-card rolls, stats). Module gameplay compatibility beyond those scenarios remains unverified.\n\nDownload the Windows installer below. Existing Manager installations receive the signed update automatically. [Details and demo](https://github.com/Corfirean/coa-server-manager/blob/v0.5.0/docs/WILDCARD.md).\r\n\r\n"
|
||||
},
|
||||
{
|
||||
"tag": "v0.4.0",
|
||||
"date": "2026-10-02T16:51:50Z",
|
||||
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.4.0",
|
||||
"body": "See the assets to download the installer. Existing installations update themselves."
|
||||
},
|
||||
{
|
||||
"tag": "v0.3.1",
|
||||
"date": "2026-10-01T11:44:28Z",
|
||||
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.3.1",
|
||||
"body": "See the assets to download the installer. Existing installations update themselves."
|
||||
},
|
||||
{
|
||||
"tag": "v0.3.0",
|
||||
"date": "2026-10-01T03:13:59Z",
|
||||
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.3.0",
|
||||
"body": "See the assets to download the installer. Existing installations update themselves."
|
||||
},
|
||||
{
|
||||
"tag": "v0.2.0",
|
||||
"date": "2026-10-01T00:58:01Z",
|
||||
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.2.0",
|
||||
"body": "See the assets to download the installer. Existing installations update themselves."
|
||||
},
|
||||
{
|
||||
"tag": "v0.1.6",
|
||||
"date": "2026-09-30T18:16:06Z",
|
||||
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.1.6",
|
||||
"body": "See the assets to download the installer. Existing installations update themselves."
|
||||
},
|
||||
{
|
||||
"tag": "v0.1.4",
|
||||
"date": "2026-09-30T15:04:30Z",
|
||||
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.1.4",
|
||||
"body": "See the assets to download the installer. Existing installations update themselves."
|
||||
},
|
||||
{
|
||||
"tag": "v0.1.3",
|
||||
"date": "2026-09-30T14:55:17Z",
|
||||
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.1.3",
|
||||
"body": "See the assets to download the installer. Existing installations update themselves."
|
||||
},
|
||||
{
|
||||
"tag": "v0.1.2",
|
||||
"date": "2026-09-30T11:06:53Z",
|
||||
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.1.2",
|
||||
"body": "See the assets to download the installer. Existing installations update themselves."
|
||||
},
|
||||
{
|
||||
"tag": "v0.1.1",
|
||||
"date": "2026-09-30T07:40:42Z",
|
||||
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.1.1",
|
||||
"body": "See the assets to download the installer. Existing installations update themselves."
|
||||
},
|
||||
{
|
||||
"tag": "v0.1.0",
|
||||
"date": "2026-09-30T07:03:22Z",
|
||||
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.1.0",
|
||||
"body": "See the assets to download the installer. Existing installations update themselves."
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,608 @@
|
||||
{
|
||||
"schema": 1,
|
||||
"component": "manager",
|
||||
"repository": "Corfirean/coa-server-manager",
|
||||
"consumedFragments": [
|
||||
"Corfirean/coa-server-manager:20261002-collections-tab-with-transmog-vanity-riding-and.md",
|
||||
"Corfirean/coa-server-manager:20261002-companion-bots-are-recognised-from-their-default.md",
|
||||
"Corfirean/coa-server-manager:20261002-delete-an-account-from-the-players-page.md",
|
||||
"Corfirean/coa-server-manager:20261002-importing-a-server-suggests-the-right-folder-whe.md",
|
||||
"Corfirean/coa-server-manager:20261002-modules-page-with-cards-status-badges-and-per-mo.md",
|
||||
"Corfirean/coa-server-manager:20261002-report-a-problem-collects-more-and-ignores-repea.md",
|
||||
"Corfirean/coa-server-manager:20261002-server-settings-in-one-panel-with-search-tabs-an.md",
|
||||
"Corfirean/coa-server-manager:20261002-the-update-check-says-you-are-up-to-date-instead.md",
|
||||
"Corfirean/coa-server-manager:20261003-client-realm-sync.md",
|
||||
"Corfirean/coa-server-manager:20261003-config-snapshot-restore.md",
|
||||
"Corfirean/coa-server-manager:20261003-imported-servers-get-the-module-config-files-the.md",
|
||||
"Corfirean/coa-server-manager:20261003-linux-preview.md",
|
||||
"Corfirean/coa-server-manager:20261003-modules-marked-soon-stay-greyed-out.md",
|
||||
"Corfirean/coa-server-manager:20261003-report-browser.md",
|
||||
"Corfirean/coa-server-manager:20261003-simplified-chinese.md",
|
||||
"Corfirean/coa-server-manager:20261003-the-bots-page-is-hidden-when-the-module-is-not-o.md",
|
||||
"Corfirean/coa-server-manager:20261003-updating-the-game-client-shows-a-progress-bar-on.md",
|
||||
"Corfirean/coa-server-manager:20261003-wildcard-realm-profiles.md",
|
||||
"Corfirean/coa-server-manager:20261004-auction-item-types.md",
|
||||
"Corfirean/coa-server-manager:20261004-fractional-settings.md",
|
||||
"Corfirean/coa-server-manager:20261004-independent-client-launch.md",
|
||||
"Corfirean/coa-server-manager:20261004-module-settings.md",
|
||||
"Corfirean/coa-server-manager:20261004-recover-server-updates.md",
|
||||
"Corfirean/coa-server-manager:20261004-repair-and-database-validation.md",
|
||||
"Corfirean/coa-server-manager:20261004-scaling-lfg-leech-settings.md",
|
||||
"Corfirean/coa-server-manager:20261004-simultaneous-realms.md",
|
||||
"Corfirean/coa-server-manager:20261004-squid-playerbots.md",
|
||||
"Corfirean/coa-server-manager:20261005-connect-without-server.md",
|
||||
"Corfirean/coa-server-manager:20261005-imported-squid-warning.md",
|
||||
"Corfirean/coa-server-manager:20261005-launch-without-updating.md",
|
||||
"Corfirean/coa-server-manager:20261005-linux-docker-server-installer.md",
|
||||
"Corfirean/coa-server-manager:20261005-linux-docker-server-settings.md",
|
||||
"Corfirean/coa-server-manager:20261005-linux-install-screen-and-client.md",
|
||||
"Corfirean/coa-server-manager:20261005-retry-update-startup.md",
|
||||
"Corfirean/coa-server-manager:20261005-squid-release-metadata.md",
|
||||
"Corfirean/coa-server-manager:20261005-squid-version-reports.md",
|
||||
"Corfirean/coa-server-manager:20261005-update-history-hotfix.md",
|
||||
"Corfirean/coa-server-manager:20261005-update-legacy-realm-launcher.md",
|
||||
"Corfirean/coa-server-manager:20261005-validate-release-database.md",
|
||||
"Corfirean/coa-server-manager:20261006-ah-bot-needs-no-character-guid.md",
|
||||
"Corfirean/coa-server-manager:20261006-lan-address-selector.md",
|
||||
"Corfirean/coa-server-manager:20261006-npc-enchanter-placement-hint.md",
|
||||
"Corfirean/coa-server-manager:20261006-prevent-server-downgrades.md",
|
||||
"Corfirean/coa-server-manager:20261006-recognize-managed-launcher.md",
|
||||
"Corfirean/coa-server-manager:20261006-squid-first-start-timeout.md",
|
||||
"Corfirean/coa-server-manager:20261006-update-preflight-and-recovery-guards.md",
|
||||
"Corfirean/coa-server-manager:20261006-update-sql-and-status-guards.md",
|
||||
"Corfirean/coa-server-manager:20261007-diagnostics-valid-json.md",
|
||||
"Corfirean/coa-server-manager:20261007-one-click-diagnostics.md",
|
||||
"Corfirean/coa-server-manager:20261007-report-routing.md",
|
||||
"Corfirean/coa-server-manager:20261008-backup-folder-and-bot-choices.md",
|
||||
"Corfirean/coa-server-manager:20261008-bot-settings-drop-down.md",
|
||||
"Corfirean/coa-server-manager:20261008-dashboard-delivery.md",
|
||||
"Corfirean/coa-server-manager:20261008-database-error-not-misread.md",
|
||||
"Corfirean/coa-server-manager:20261008-hide-squid-bot-accounts.md",
|
||||
"Corfirean/coa-server-manager:20261008-squid-dashboard-tab.md",
|
||||
"Corfirean/coa-server-manager:20261008-start-after-update-options.md",
|
||||
"Corfirean/coa-server-manager:20261008-update-check-survives-damaged-state.md",
|
||||
"Corfirean/coa-server-manager:20261008-wildcard-repair-checksum.md",
|
||||
"Corfirean/coa-server-manager:20261008-world-server-from-coa-bots-folder.md",
|
||||
"Corfirean/coa-server-manager:20261010-automatic-update-recovery.md",
|
||||
"Corfirean/coa-server-manager:20261010-complete-mysql-update-recovery.md",
|
||||
"Corfirean/coa-server-manager:20261010-custom-races-bot-exclusions.md",
|
||||
"Corfirean/coa-server-manager:20261010-custom-races-update.md",
|
||||
"Corfirean/coa-server-manager:20261010-custom-races.md",
|
||||
"Corfirean/coa-server-manager:20261010-database-recovery-diagnostics.md",
|
||||
"Corfirean/coa-server-manager:20261010-headless-world-startup.md",
|
||||
"Corfirean/coa-server-manager:20261010-immutable-update-channels.md",
|
||||
"Corfirean/coa-server-manager:20261010-isolated-update-validation.md",
|
||||
"Corfirean/coa-server-manager:20261010-local-host-while-sharing.md",
|
||||
"Corfirean/coa-server-manager:20261010-missing-database-defaults.md",
|
||||
"Corfirean/coa-server-manager:20261010-module-base-update-replay.md",
|
||||
"Corfirean/coa-server-manager:20261010-private-database-update-rehearsal.md",
|
||||
"Corfirean/coa-server-manager:20261010-release-compatibility.md",
|
||||
"Corfirean/coa-server-manager:20261010-schema-validation-report.md",
|
||||
"Corfirean/coa-server-manager:20261010-settings-blank-window.md",
|
||||
"Corfirean/coa-server-manager:20261010-unsaved-changes-and-crash-recovery.md",
|
||||
"Corfirean/coa-server-manager:20261011-player-race-patches.md",
|
||||
"Corfirean/coa-server-manager:20261012-bulk-navigation-update.md",
|
||||
"Corfirean/coa-server-manager:20261012-rehearsal-path-normalization.md",
|
||||
"Corfirean/coa-server-manager:20261013-custom-races-client-update.md",
|
||||
"Corfirean/coa-server-manager:20261013-docker-remote-client-restart.md",
|
||||
"Corfirean/coa-server-manager:20261013-installed-module-versions.md",
|
||||
"Corfirean/coa-server-manager:20261013-long-rehearsal-paths.md",
|
||||
"Corfirean/coa-server-manager:20261013-maintenance-diagnostic-export.md",
|
||||
"Corfirean/coa-server-manager:20261013-preserve-client-patches.md",
|
||||
"Corfirean/coa-server-manager:20261013-recheck-installed-release.md",
|
||||
"Corfirean/coa-server-manager:20261013-startup-error-details.md",
|
||||
"Corfirean/coa-server-manager:20261013-stock-bot-races.md",
|
||||
"Corfirean/coa-server-manager:20261013-update-check-start-contention.md",
|
||||
"Corfirean/coa-server-manager:20261013-upstream-bot-race-preset.md",
|
||||
"Corfirean/coa-server-manager:20261014-already-running-mysql-is-recognized-before-start.md",
|
||||
"Corfirean/coa-server-manager:20261014-current-clean-install.md",
|
||||
"Corfirean/coa-server-manager:20261014-custom-races-grummle-client.md",
|
||||
"Corfirean/coa-server-manager:20261014-failed-repairs-restore-the-previous-server-after.md",
|
||||
"Corfirean/coa-server-manager:20261014-overview-update-errors.md",
|
||||
"Corfirean/coa-server-manager:20261014-private-update-checks-show-preparation-stages-an.md",
|
||||
"Corfirean/coa-server-manager:20261014-repair-recovery-copies-preserve-all-bundled-data.md",
|
||||
"Corfirean/coa-server-manager:20261014-server-checks-report-interrupted-squid-database.md",
|
||||
"Corfirean/coa-server-manager:20261014-shutdown-remains-available-when-startup-template.md",
|
||||
"Corfirean/coa-server-manager:20261014-successful-server-repairs-no-longer-block-later.md",
|
||||
"Corfirean/coa-server-manager:20261016-consistent-update-migrations.md",
|
||||
"Corfirean/coa-server-manager:20261016-direct-database-upgrades.md",
|
||||
"Corfirean/coa-server-manager:20261016-idempotent-validation-stop.md",
|
||||
"Corfirean/coa-server-manager:20261016-intermediate-updates.md",
|
||||
"Corfirean/coa-server-manager:20261016-lightweight-update-checks.md",
|
||||
"Corfirean/coa-server-manager:20261016-preserve-core-migration-history.md",
|
||||
"Corfirean/coa-server-manager:20261016-shared-auth-migration-history.md",
|
||||
"Corfirean/coa-server-manager:20261016-update-compatibility-wording.md",
|
||||
"Corfirean/coa-server-manager:20261018-custom-races-client.md",
|
||||
"Corfirean/coa-server-manager:20261019-portable-stop-diagnostics.md",
|
||||
"Corfirean/coa-server-manager:20261019-remote-character-class-names.md",
|
||||
"Corfirean/coa-server-manager:20261020-client-elevation.md",
|
||||
"Corfirean/coa-server-manager:20261021-custom-races-switching.md",
|
||||
"Corfirean/coa-server-manager:20261021-portable-experimental.md",
|
||||
"Corfirean/coa-server-manager:20261021-scaling-health-settings.md",
|
||||
"Corfirean/coa-server-manager:20261021-warcraft-reborn-realm.md"
|
||||
],
|
||||
"releases": [
|
||||
{
|
||||
"tag": "v0.1.0",
|
||||
"version": "0.1.0",
|
||||
"date": "2026-09-30",
|
||||
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.1.0",
|
||||
"commit": "0a9be3d80030f8549a2925e176ab0ee829603c44",
|
||||
"notes": [
|
||||
"Initial Windows release: install or import a server and manage startup from one app",
|
||||
"Configure server and bot settings, manage accounts, create backups and restore saved data",
|
||||
"Launch the game client, set up sharing with friends and collect diagnostics"
|
||||
]
|
||||
},
|
||||
{
|
||||
"tag": "v0.1.1",
|
||||
"version": "0.1.1",
|
||||
"date": "2026-09-30",
|
||||
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.1.1",
|
||||
"commit": "f620f87432e5affb84bdc14ca0bb0f5a8bb5c534",
|
||||
"notes": [
|
||||
"Added translations throughout setup, server updates, backups, diagnostics and settings",
|
||||
"Added clearer errors when server packages are unavailable or a server cannot be reached"
|
||||
],
|
||||
"compare": "https://github.com/Corfirean/coa-server-manager/compare/v0.1.0...v0.1.1"
|
||||
},
|
||||
{
|
||||
"tag": "v0.1.2",
|
||||
"version": "0.1.2",
|
||||
"date": "2026-09-30",
|
||||
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.1.2",
|
||||
"commit": "0e1016e93c457c8aeea3ba31416be66a201a19ef",
|
||||
"notes": [
|
||||
"Manager updates download in the background and install when the app closes",
|
||||
"Missing module configuration files are created from the supplied defaults"
|
||||
],
|
||||
"compare": "https://github.com/Corfirean/coa-server-manager/compare/v0.1.1...v0.1.2"
|
||||
},
|
||||
{
|
||||
"tag": "v0.1.3",
|
||||
"version": "0.1.3",
|
||||
"date": "2026-09-30",
|
||||
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.1.3",
|
||||
"commit": "4eda03ab6355a6cf280865bca91ce8d2fc6167e7",
|
||||
"notes": [
|
||||
"The interface scales with the window",
|
||||
"Each friend connection mode shows the realmlist line to use"
|
||||
],
|
||||
"compare": "https://github.com/Corfirean/coa-server-manager/compare/v0.1.2...v0.1.3"
|
||||
},
|
||||
{
|
||||
"tag": "v0.1.4",
|
||||
"version": "0.1.4",
|
||||
"date": "2026-09-30",
|
||||
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.1.4",
|
||||
"commit": "db16d95558910d4cdc97edbce97ec78aaf535a83",
|
||||
"notes": [
|
||||
"Sharing settings are reapplied before server startup",
|
||||
"Added a restart shortcut after enabling play with friends"
|
||||
],
|
||||
"compare": "https://github.com/Corfirean/coa-server-manager/compare/v0.1.3...v0.1.4"
|
||||
},
|
||||
{
|
||||
"tag": "v0.1.6",
|
||||
"version": "0.1.6",
|
||||
"date": "2026-09-30",
|
||||
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.1.6",
|
||||
"commit": "f7d29b09efd54ab3a0f830d4d6891013038398e4",
|
||||
"notes": [
|
||||
"Overview shows world speed",
|
||||
"Improved companion setup, including requests made while the server is stopped",
|
||||
"Expanded translated settings and connection guides"
|
||||
],
|
||||
"compare": "https://github.com/Corfirean/coa-server-manager/compare/v0.1.4...v0.1.6"
|
||||
},
|
||||
{
|
||||
"tag": "v0.2.0",
|
||||
"version": "0.2.0",
|
||||
"date": "2026-10-01",
|
||||
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.2.0",
|
||||
"commit": "0940e9cf28759a9489d53dbd28882d6b46cb0076",
|
||||
"notes": [
|
||||
"Added companion creation progress and controls to stop creation, take bots offline or remove them",
|
||||
"Choose how many bots log in when the server starts",
|
||||
"Added a control to log out a chosen number of bots and reduce server load"
|
||||
],
|
||||
"compare": "https://github.com/Corfirean/coa-server-manager/compare/v0.1.6...v0.2.0"
|
||||
},
|
||||
{
|
||||
"tag": "v0.3.0",
|
||||
"version": "0.3.0",
|
||||
"date": "2026-10-01",
|
||||
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.3.0",
|
||||
"commit": "c8f6d61b98ceb0920ba605467eb73b1364d24404",
|
||||
"notes": [
|
||||
"Download and update the game client through the Manager while preserving custom files",
|
||||
"Server updates are checked automatically and offered on Overview"
|
||||
],
|
||||
"compare": "https://github.com/Corfirean/coa-server-manager/compare/v0.2.0...v0.3.0"
|
||||
},
|
||||
{
|
||||
"tag": "v0.3.1",
|
||||
"version": "0.3.1",
|
||||
"date": "2026-10-01",
|
||||
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.3.1",
|
||||
"commit": "d01e401f3ce5c5f9a7daeb721815e2cf5fe1d694",
|
||||
"notes": [
|
||||
"Added named realmlists and a switcher beside Play",
|
||||
"Added account management and a prefilled GitHub problem-report form",
|
||||
"Server updates continue when leaving the settings page"
|
||||
],
|
||||
"compare": "https://github.com/Corfirean/coa-server-manager/compare/v0.3.0...v0.3.1"
|
||||
},
|
||||
{
|
||||
"tag": "v0.4.0",
|
||||
"version": "0.4.0",
|
||||
"date": "2026-10-02",
|
||||
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.4.0",
|
||||
"commit": "53aa117ec2e2f4c0572a74829c41e99d5a4eedb6",
|
||||
"notes": [
|
||||
"Added module cards with switches and settings",
|
||||
"Added searchable server settings and appearance and collection controls",
|
||||
"Added account deletion with confirmation",
|
||||
"Fixed update checks offering an already installed version"
|
||||
],
|
||||
"compare": "https://github.com/Corfirean/coa-server-manager/compare/v0.3.1...v0.4.0"
|
||||
},
|
||||
{
|
||||
"tag": "v0.5.0",
|
||||
"version": "0.5.0",
|
||||
"date": "2026-10-03",
|
||||
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.5.0",
|
||||
"commit": "1bcef5f8c2e85b28eb466e720002d2fbf2b67161",
|
||||
"notes": [
|
||||
"Imported servers get the module config files they lack",
|
||||
"Modules marked Soon stay greyed out",
|
||||
"The Bots page is hidden when the module is not on the server",
|
||||
"Updating the game client shows a progress bar on its button",
|
||||
"Switch between CoA and Wildcard while keeping separate characters and module settings"
|
||||
],
|
||||
"compare": "https://github.com/Corfirean/coa-server-manager/compare/v0.4.0...v0.5.0"
|
||||
},
|
||||
{
|
||||
"tag": "v0.6.0",
|
||||
"version": "0.6.0",
|
||||
"date": "2026-10-03",
|
||||
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.6.0",
|
||||
"commit": "162bfd1e04ca4faa205b5c38432f56b07066c6be",
|
||||
"notes": [
|
||||
"The game client follows the realm selected in the Manager",
|
||||
"Configuration snapshots no longer overwrite each other",
|
||||
"Experimental Linux startup and Docker server controls",
|
||||
"Problem reports open in the default browser",
|
||||
"Simplified Chinese is available in the Manager"
|
||||
],
|
||||
"compare": "https://github.com/Corfirean/coa-server-manager/compare/v0.5.0...v0.6.0"
|
||||
},
|
||||
{
|
||||
"tag": "v0.6.1",
|
||||
"version": "0.6.1",
|
||||
"date": "2026-10-04",
|
||||
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.6.1",
|
||||
"commit": "2e3fb24e1af5c3ee9a787c345cbcce973739fe69",
|
||||
"notes": [
|
||||
"Server multipliers now accept decimals typed with a dot or comma",
|
||||
"Play launches only the game client without starting your local server",
|
||||
"Check database structure and repair server files with a safety backup",
|
||||
"Start CoA and Wildcard together from Settings"
|
||||
],
|
||||
"compare": "https://github.com/Corfirean/coa-server-manager/compare/v0.6.0...v0.6.1"
|
||||
},
|
||||
{
|
||||
"tag": "v0.6.2",
|
||||
"version": "0.6.2",
|
||||
"date": "2026-10-04",
|
||||
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.6.2",
|
||||
"commit": "b90b377fc308210abdf7fc63ea2f2ac1eac29f4a",
|
||||
"notes": [
|
||||
"Choose which item types the auction bot sells",
|
||||
"Module settings now offer translated controls and an enemy damage slider",
|
||||
"Failed server updates restore databases and files together",
|
||||
"Configure SQUID Playerbots and prevent conflicting bot systems",
|
||||
"Server packages must include a complete database schema check"
|
||||
],
|
||||
"compare": "https://github.com/Corfirean/coa-server-manager/compare/v0.6.1...v0.6.2"
|
||||
},
|
||||
{
|
||||
"tag": "v0.6.3",
|
||||
"version": "0.6.3",
|
||||
"date": "2026-10-04",
|
||||
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.6.3",
|
||||
"commit": "07ec22798f2b81f33e470837ece7fec693ac24bb",
|
||||
"notes": [
|
||||
"Configure partial dungeon parties and open-world life steal in module settings",
|
||||
"Download and update the game client without installing a server"
|
||||
],
|
||||
"compare": "https://github.com/Corfirean/coa-server-manager/compare/v0.6.2...v0.6.3"
|
||||
},
|
||||
{
|
||||
"tag": "v0.6.4",
|
||||
"version": "0.6.4",
|
||||
"date": "2026-10-05",
|
||||
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.6.4",
|
||||
"commit": "6c771fae20ac59870f5990a6495f8cd035caab65",
|
||||
"notes": [
|
||||
"Start your installed server or client without downloading an available update",
|
||||
"Finish a server update that was blocked by a startup failure"
|
||||
],
|
||||
"compare": "https://github.com/Corfirean/coa-server-manager/compare/v0.6.3...v0.6.4"
|
||||
},
|
||||
{
|
||||
"tag": "v0.6.5",
|
||||
"version": "0.6.5",
|
||||
"date": "2026-10-06",
|
||||
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.6.5",
|
||||
"commit": "277ebba847912e113657bcef4ed53e4e4e708161",
|
||||
"notes": [
|
||||
"Imported SquidBots servers warn before replacing their original binary",
|
||||
"SquidBots settings follow the options shipped by the module",
|
||||
"SquidBots shows its bundled release and includes it in problem reports",
|
||||
"Server updates accept verified published migration variants without rerunning them",
|
||||
"Server updates replace older launchers adapted by the Manager for Wildcard",
|
||||
"Older server packages cannot replace a newer installation",
|
||||
"Checking again no longer offers an already installed launcher update",
|
||||
"Large SQUID database imports have more time to finish on first startup",
|
||||
"Update history conflicts are detected before server files change",
|
||||
"Pending database updates remain visible when the server version matches"
|
||||
],
|
||||
"compare": "https://github.com/Corfirean/coa-server-manager/compare/v0.6.4...v0.6.5"
|
||||
},
|
||||
{
|
||||
"tag": "v0.6.6",
|
||||
"version": "0.6.6",
|
||||
"date": "2026-10-07",
|
||||
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.6.6",
|
||||
"commit": "fac6ce469a77c134437484a78e91e7811df8a389",
|
||||
"notes": [
|
||||
"Install a server from a package on Linux, running in Docker (experimental)",
|
||||
"The Auction House Bot card no longer asks for a character GUID",
|
||||
"Choose and remember the local network address friends use to connect",
|
||||
"The NPC Enchanter card explains how to place and remove the NPC",
|
||||
"Diagnostic files with database checks stay readable after secrets are removed",
|
||||
"One button collects all diagnostics, including crashes and Windows crash records",
|
||||
"Problem reports go to the right project"
|
||||
],
|
||||
"compare": "https://github.com/Corfirean/coa-server-manager/compare/v0.6.5...v0.6.6"
|
||||
},
|
||||
{
|
||||
"tag": "v0.6.7",
|
||||
"version": "0.6.7",
|
||||
"date": "2026-10-08",
|
||||
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.6.7",
|
||||
"commit": "7540527d3035660f1c45ea66497e0412cc65249c",
|
||||
"notes": [
|
||||
"Choose where backups are stored, for example on another drive",
|
||||
"Bot settings with a fixed list of values show a drop-down",
|
||||
"The bot dashboard loads completely and can be opened in the browser",
|
||||
"Accounts of the SQUID bots are hidden from the Accounts list",
|
||||
"A Dashboard tab shows what the SQUID bots are doing",
|
||||
"A stopped server stays stopped after an update, unless you ask it to start",
|
||||
"Checking for updates no longer fails with \"Something went wrong\" after a crash",
|
||||
"Server updates no longer stop with \"has a different checksum\" on the Wildcard repair",
|
||||
"A world server started from the coa-bots folder is recognised"
|
||||
],
|
||||
"compare": "https://github.com/Corfirean/coa-server-manager/compare/v0.6.6...v0.6.7"
|
||||
},
|
||||
{
|
||||
"tag": "v0.6.8",
|
||||
"version": "0.6.8",
|
||||
"date": "2026-10-10",
|
||||
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.6.8",
|
||||
"commit": "ee59708fbfcdb5f4e30c62f2e4aa952f82604cac",
|
||||
"notes": [
|
||||
"Linux: install from the install screen, play with Wine or Proton (experimental)",
|
||||
"A failing database update is no longer reported as \"database not running",
|
||||
"Unsaved settings are protected and crashed servers can restart automatically"
|
||||
],
|
||||
"compare": "https://github.com/Corfirean/coa-server-manager/compare/v0.6.7...v0.6.8"
|
||||
},
|
||||
{
|
||||
"tag": "v0.6.9",
|
||||
"version": "0.6.9",
|
||||
"date": "2026-10-10",
|
||||
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.6.9",
|
||||
"commit": "374a3f9c2322f30900f7f8a0549a643c8a511567",
|
||||
"notes": [
|
||||
"Custom races can be enabled and their client patches installed from Modules"
|
||||
],
|
||||
"compare": "https://github.com/Corfirean/coa-server-manager/compare/v0.6.8...v0.6.9"
|
||||
},
|
||||
{
|
||||
"tag": "v0.6.10",
|
||||
"version": "0.6.10",
|
||||
"date": "2026-10-10",
|
||||
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.6.10",
|
||||
"commit": "b0951dbee7516334d8ae3baa1c7bf7635f6cb202",
|
||||
"notes": [
|
||||
"Custom race client patches update to the latest races and appearances"
|
||||
],
|
||||
"compare": "https://github.com/Corfirean/coa-server-manager/compare/v0.6.9...v0.6.10"
|
||||
},
|
||||
{
|
||||
"tag": "v0.6.11",
|
||||
"version": "0.6.11",
|
||||
"date": "2026-10-10",
|
||||
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.6.11",
|
||||
"commit": "376f1dbb469ece197aa1caf68b3e5fdd73e3b277",
|
||||
"notes": [
|
||||
"Server and Bots settings open without a blank window"
|
||||
],
|
||||
"compare": "https://github.com/Corfirean/coa-server-manager/compare/v0.6.10...v0.6.11"
|
||||
},
|
||||
{
|
||||
"tag": "v0.6.12",
|
||||
"version": "0.6.12",
|
||||
"date": "2026-10-10",
|
||||
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.6.12",
|
||||
"commit": "94d4ade1c73c6a64018dc182fe3a3ba87607d7a2",
|
||||
"notes": [
|
||||
"Background world servers no longer stop because the local console is closed"
|
||||
],
|
||||
"compare": "https://github.com/Corfirean/coa-server-manager/compare/v0.6.11...v0.6.12"
|
||||
},
|
||||
{
|
||||
"tag": "v0.6.13",
|
||||
"version": "0.6.13",
|
||||
"date": "2026-10-11",
|
||||
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.6.13",
|
||||
"commit": "ed7bf7262bc43de109f17a2812bc41c34d99c51d",
|
||||
"notes": [
|
||||
"Failed server startup after an update automatically restores the previous version",
|
||||
"Windows update recovery preserves database procedures triggers and views",
|
||||
"Custom races bot setting synchronizes Playerbots excluded race lists",
|
||||
"Blocked updates identify database objects that prevent automatic recovery",
|
||||
"Updates can follow signed channels that select a complete server release",
|
||||
"Server updates check startup privately before allowing players to connect",
|
||||
"Updates repair missing database defaults from the verified release schema",
|
||||
"Server updates no longer replay module installation scripts on existing databases",
|
||||
"Windows server updates are tested on a private copy before changing your installation",
|
||||
"Server updates can require a tested combination of platform and installed version",
|
||||
"Failed database checks keep a complete report after rollback",
|
||||
"Players can install custom race patches when connecting to a friend"
|
||||
],
|
||||
"compare": "https://github.com/Corfirean/coa-server-manager/compare/v0.6.12...v0.6.13"
|
||||
},
|
||||
{
|
||||
"tag": "v0.6.14",
|
||||
"version": "0.6.14",
|
||||
"date": "2026-10-11",
|
||||
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.6.14",
|
||||
"commit": "58c976a388215bea8bbf232503810c6519a33562",
|
||||
"notes": [
|
||||
"Fixed server update checks failing with long Windows paths"
|
||||
],
|
||||
"compare": "https://github.com/Corfirean/coa-server-manager/compare/v0.6.13...v0.6.14"
|
||||
},
|
||||
{
|
||||
"tag": "v0.6.15",
|
||||
"version": "0.6.15",
|
||||
"date": "2026-10-11",
|
||||
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.6.15",
|
||||
"commit": "d86a1676fed98f9e4556617a603959e42bc401c8",
|
||||
"notes": [
|
||||
"Large server updates no longer repeatedly rewrite the recovery journal"
|
||||
],
|
||||
"compare": "https://github.com/Corfirean/coa-server-manager/compare/v0.6.14...v0.6.15"
|
||||
},
|
||||
{
|
||||
"tag": "v0.6.16",
|
||||
"version": "0.6.16",
|
||||
"date": "2026-10-13",
|
||||
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.6.16",
|
||||
"commit": "b45e2502ece1a5578555d7d5dfe36a95b374a58e",
|
||||
"notes": [
|
||||
"Linux Docker servers follow Settings, sharing and backups (experimental)",
|
||||
"Local hosts can connect while sharing a server online",
|
||||
"Custom race client installation follows the current upstream release",
|
||||
"Docker friend mode requests a restart when remote client support changes",
|
||||
"Module cards show installed server revisions and the client race patch version",
|
||||
"Server updates accept long Windows paths inside the private test server",
|
||||
"Diagnostics record blocked startup requests and maintenance owner information",
|
||||
"Client race patches can be repaired and removed while preserving original files",
|
||||
"Checking an already installed server update no longer reports incompatibility",
|
||||
"Failed server startup shows service errors even when the launcher reported ready",
|
||||
"Starting the server waits for update checks and identifies ongoing maintenance"
|
||||
],
|
||||
"compare": "https://github.com/Corfirean/coa-server-manager/compare/v0.6.15...v0.6.16"
|
||||
},
|
||||
{
|
||||
"tag": "v0.6.17",
|
||||
"version": "0.6.17",
|
||||
"date": "2026-10-15",
|
||||
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.6.17",
|
||||
"commit": "dc323df681ca77fb15ce4284da0feadfe83e0c7e",
|
||||
"notes": [
|
||||
"Already running MySQL is recognized before startup readiness checks",
|
||||
"New servers install the current stable build directly",
|
||||
"Install the matching client patches for Grummle",
|
||||
"Failed repairs restore the previous server after final verification errors",
|
||||
"Failed server updates show an error on the Overview screen",
|
||||
"Private update checks show preparation stages and stop failure details",
|
||||
"Repair recovery copies preserve all bundled database objects and accounts",
|
||||
"Server checks report interrupted SQUID database imports",
|
||||
"Shutdown remains available when startup templates or database records are damaged",
|
||||
"Successful server repairs no longer block later server actions"
|
||||
],
|
||||
"compare": "https://github.com/Corfirean/coa-server-manager/compare/v0.6.16...v0.6.17"
|
||||
},
|
||||
{
|
||||
"tag": "v0.6.18",
|
||||
"version": "0.6.18",
|
||||
"date": "2026-10-16",
|
||||
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.6.18",
|
||||
"commit": "16396407ad63c1b596dc4fd7e2672ef87cf23f56",
|
||||
"notes": [
|
||||
"Older servers find a tested intermediate update instead of being blocked"
|
||||
],
|
||||
"compare": "https://github.com/Corfirean/coa-server-manager/compare/v0.6.17...v0.6.18"
|
||||
},
|
||||
{
|
||||
"tag": "v0.6.19",
|
||||
"version": "0.6.19",
|
||||
"date": "2026-10-16",
|
||||
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.6.19",
|
||||
"commit": "cda7875a9a2061d4b576912cc6943220ff6fddba",
|
||||
"notes": [
|
||||
"Update checks no longer download a server archive to compare its launcher"
|
||||
],
|
||||
"compare": "https://github.com/Corfirean/coa-server-manager/compare/v0.6.18...v0.6.19"
|
||||
},
|
||||
{
|
||||
"tag": "v0.6.21",
|
||||
"version": "0.6.21",
|
||||
"date": "2026-10-16",
|
||||
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.6.21",
|
||||
"commit": "e3fbb2e4b6dbe40fa00264abcd12b4cfd9702305",
|
||||
"notes": [
|
||||
"Server updates apply migrations once after saving a recovery point",
|
||||
"Older server versions update directly without installing intermediate packages",
|
||||
"Update validation recognizes an already stopped server",
|
||||
"Recorded core SQL stays applied after old history tables are cleaned up",
|
||||
"Switching realms no longer repeats shared account database updates",
|
||||
"Update offers distinguish version support from database validation"
|
||||
],
|
||||
"compare": "https://github.com/Corfirean/coa-server-manager/compare/v0.6.19...v0.6.21"
|
||||
},
|
||||
{
|
||||
"tag": "v0.6.22",
|
||||
"version": "0.6.22",
|
||||
"date": "2026-10-19",
|
||||
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.6.22",
|
||||
"commit": "65df6604846d5492e40a6b08a797199478666e24",
|
||||
"notes": [
|
||||
"Updated Custom Races client patches to 1.8",
|
||||
"Included the updated race appearance and cursor addons",
|
||||
"Existing client files are preserved when installing or removing race patches"
|
||||
],
|
||||
"compare": "https://github.com/Corfirean/coa-server-manager/compare/v0.6.21...v0.6.22"
|
||||
},
|
||||
{
|
||||
"tag": "v0.7.0",
|
||||
"version": "0.7.0",
|
||||
"date": "2026-10-21",
|
||||
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.7.0",
|
||||
"notes": [
|
||||
"Keep portable characters and their saved versions in the Manager, and use them on compatible realms",
|
||||
"Make an existing character portable from a connected realm",
|
||||
"Browse public realms and see their connection details",
|
||||
"Link an existing realm account or create one on hosts that allow it",
|
||||
"Switch between CoA, Wildcard and Warcraft Reborn realm profiles on supported server builds",
|
||||
"Adjust creature health for different locations and enemy types in Content Scaling",
|
||||
"Switch Custom Races patches faster, with visible feedback while changes are applied",
|
||||
"Handle Windows requests for administrator permission when launching the game"
|
||||
],
|
||||
"commit": "d22ff09ac6fd7628aac14d90ec23f547cd9b4bf1",
|
||||
"experimentalFeatures": [
|
||||
"portable-characters"
|
||||
],
|
||||
"compare": "https://github.com/Corfirean/coa-server-manager/compare/v0.6.22...v0.7.0",
|
||||
"notice": "Portable transfers into Warcraft Reborn are not supported yet.",
|
||||
"links": [
|
||||
"[Player guides and screenshots](https://github.com/Corfirean/coa-server-manager/tree/d22ff09ac6fd7628aac14d90ec23f547cd9b4bf1/docs)"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
[package]
|
||||
name = "coa-control-proto"
|
||||
description = "Player <-> Host control protocol (Phase 12): coordinator framing, the end-to-end Noise channel, identity binding and the application messages. No I/O."
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
license = "AGPL-3.0-only"
|
||||
publish = false
|
||||
|
||||
[dependencies]
|
||||
coa-registry-proto = { path = "../coa-registry-proto" }
|
||||
serde = { version = "1", features = ["derive"] }
|
||||
serde_json = "1"
|
||||
sha2 = "0.10"
|
||||
hex = "0.4"
|
||||
base64 = "0.22"
|
||||
ed25519-dalek = "2"
|
||||
snow = "0.9"
|
||||
thiserror = "2"
|
||||
uuid = { version = "1", features = ["serde", "v4", "v7"] }
|
||||
@@ -0,0 +1,470 @@
|
||||
//! The application messages inside the end-to-end channel. One request, one response, in order. Nothing here is ever visible to the Coordinator.
|
||||
|
||||
use std::collections::BTreeMap;
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
use uuid::Uuid;
|
||||
|
||||
use crate::{invalid, ControlError, Result};
|
||||
|
||||
pub const MAX_CONTROL_REQUEST_BYTES: usize = 4096;
|
||||
pub const MAX_TRANSFER_REQUEST_BYTES: usize = 4 * 1024 * 1024; // 4 MiB
|
||||
pub const MAX_REQUEST_BYTES: usize = MAX_TRANSFER_REQUEST_BYTES;
|
||||
pub const MIN_USERNAME: usize = 3;
|
||||
pub const MAX_USERNAME: usize = 16;
|
||||
pub const MIN_PASSWORD: usize = 8;
|
||||
pub const MAX_PASSWORD: usize = 16;
|
||||
pub const MAX_CHARACTERS: usize = 200;
|
||||
|
||||
/// A game account name: 3 to 16 ASCII letters, digits or `_`, not beginning or ending with `_`.
|
||||
pub fn valid_username(s: &str) -> bool {
|
||||
(MIN_USERNAME..=MAX_USERNAME).contains(&s.len())
|
||||
&& s.bytes().all(|b| b.is_ascii_alphanumeric() || b == b'_')
|
||||
&& !s.starts_with('_')
|
||||
&& !s.ends_with('_')
|
||||
}
|
||||
|
||||
/// A game account password: 8 to 16 ASCII letters and digits (the game compares passwords case-insensitively, so letters carry no extra strength; digits and length do).
|
||||
pub fn valid_password(s: &str) -> bool {
|
||||
(MIN_PASSWORD..=MAX_PASSWORD).contains(&s.len()) && s.bytes().all(|b| b.is_ascii_alphanumeric())
|
||||
}
|
||||
|
||||
/// A password for a realm, 16 characters of `A-Z0-9` from the operating system's randomness (about 82 bits), unique per realm.
|
||||
pub fn generate_password() -> String {
|
||||
const ALPHABET: &[u8; 36] = b"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
|
||||
let mut out = String::with_capacity(16);
|
||||
while out.len() < 16 {
|
||||
for b in Uuid::new_v4().as_bytes() {
|
||||
// rejection sampling: 252 is the largest multiple of 36 below 256, so every symbol is equally likely
|
||||
if *b < 252 && out.len() < 16 {
|
||||
out.push(ALPHABET[(*b % 36) as usize] as char);
|
||||
}
|
||||
}
|
||||
}
|
||||
out
|
||||
}
|
||||
|
||||
/// The account name wanted, made fit for the game: letters and digits only, upper case, at most 16 characters.
|
||||
pub fn sanitize_username(wanted: &str) -> String {
|
||||
let base: String = wanted
|
||||
.chars()
|
||||
.filter(char::is_ascii_alphanumeric)
|
||||
.collect::<String>()
|
||||
.to_ascii_uppercase();
|
||||
let base: String = base.chars().take(MAX_USERNAME).collect();
|
||||
if base.len() >= MIN_USERNAME {
|
||||
base
|
||||
} else {
|
||||
format!("{base}PLAYER").chars().take(MAX_USERNAME).collect()
|
||||
}
|
||||
}
|
||||
|
||||
/// The stable alternative of an occupied name: `DMITRY` becomes `DMITRY_7K4M`. The suffix is derived from the player's id, so the same player gets the same alternative.
|
||||
pub fn alternative_username(base: &str, player: &Uuid, attempt: u32) -> String {
|
||||
const ALPHABET: &[u8; 32] = b"ABCDEFGHJKLMNPQRSTUVWXYZ23456789";
|
||||
let bytes = player.as_bytes();
|
||||
let mix = u32::from_be_bytes([bytes[12], bytes[13], bytes[14], bytes[15]])
|
||||
.wrapping_add(attempt.wrapping_mul(0x9E37_79B1));
|
||||
let suffix: String = (0..4)
|
||||
.map(|i| ALPHABET[((mix >> (i * 5)) & 31) as usize] as char)
|
||||
.collect();
|
||||
let keep = MAX_USERNAME - 5;
|
||||
let head: String = base.chars().take(keep).collect();
|
||||
format!("{head}_{suffix}")
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[serde(tag = "op", rename_all = "snake_case", deny_unknown_fields)]
|
||||
pub enum Request {
|
||||
Hello {
|
||||
protocol: u32,
|
||||
client: String,
|
||||
},
|
||||
/// Make the player's account on this realm, or reuse it. `password` is the one the player's Manager keeps for this realm; it travels only inside the channel.
|
||||
Provision {
|
||||
desired: Option<String>,
|
||||
password: String,
|
||||
have_credentials: bool,
|
||||
},
|
||||
ListCharacters,
|
||||
Claim {
|
||||
token: u32,
|
||||
},
|
||||
ClaimAck {
|
||||
character_id: Uuid,
|
||||
},
|
||||
/// Link an account the realm already has (one time).
|
||||
Link {
|
||||
login: String,
|
||||
password: String,
|
||||
},
|
||||
Route,
|
||||
/// Phase 12.1: Start or resume a remote portable character transfer.
|
||||
TransferOffer {
|
||||
transfer_id: Uuid,
|
||||
character_id: Uuid,
|
||||
canonical_revision: u64,
|
||||
content_hash: String,
|
||||
total_size: usize,
|
||||
collections: BTreeMap<String, Vec<u32>>,
|
||||
},
|
||||
/// A chunk of the encoded portable character snapshot payload.
|
||||
TransferChunk {
|
||||
transfer_id: Uuid,
|
||||
offset: usize,
|
||||
data: String,
|
||||
},
|
||||
/// Query status or resume progress of a transfer.
|
||||
TransferStatus {
|
||||
transfer_id: Uuid,
|
||||
},
|
||||
/// Commit the transferred payload into the realm and arm a session.
|
||||
TransferCommit {
|
||||
transfer_id: Uuid,
|
||||
},
|
||||
/// Acknowledge successful transfer and session arming.
|
||||
TransferAck {
|
||||
transfer_id: Uuid,
|
||||
character_id: Uuid,
|
||||
},
|
||||
/// Phase 13: Request a short-lived relay allocation for a relayed JOIN.
|
||||
AllocateRelay {
|
||||
player_id: Uuid,
|
||||
},
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
pub enum AppError {
|
||||
UnsupportedVersion,
|
||||
Invalid,
|
||||
ProvisioningOff,
|
||||
NoAccount,
|
||||
NotAtCharacterSelect,
|
||||
NotYours,
|
||||
AlreadyClaimed,
|
||||
NotEligible,
|
||||
WrongCredentials,
|
||||
AccountTaken,
|
||||
RateLimited,
|
||||
Unavailable,
|
||||
Incompatible,
|
||||
Conflict,
|
||||
RelayUnavailable,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
|
||||
#[serde(deny_unknown_fields)]
|
||||
pub struct CharacterEntry {
|
||||
/// Opaque to the player: the Host's handle for this character, valid for this realm.
|
||||
pub token: u32,
|
||||
pub name: String,
|
||||
pub class: u32,
|
||||
pub race: u32,
|
||||
pub level: u32,
|
||||
pub eligible: bool,
|
||||
pub reasons: Vec<String>,
|
||||
/// Already portable and claimed by this player.
|
||||
pub yours: bool,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[serde(tag = "op", rename_all = "snake_case")]
|
||||
pub enum Response {
|
||||
Welcome {
|
||||
realm_id: coa_registry_proto::RealmId,
|
||||
automatic: bool,
|
||||
existing_only: bool,
|
||||
route: Option<String>,
|
||||
},
|
||||
Provisioned {
|
||||
username: String,
|
||||
created: bool,
|
||||
reset: bool,
|
||||
},
|
||||
Characters {
|
||||
characters: Vec<CharacterEntry>,
|
||||
},
|
||||
/// The character as the Host exported it: `payload` is the base64 of the encoded portable snapshot, `sha256` the hash of its canonical JSON, `collections` the account's
|
||||
/// appearance and vanity ids the Host holds for the account (kind -> ids).
|
||||
Claimed {
|
||||
character_id: Uuid,
|
||||
sha256: String,
|
||||
payload: String,
|
||||
collections: BTreeMap<String, Vec<u32>>,
|
||||
},
|
||||
Linked {
|
||||
username: String,
|
||||
},
|
||||
Done,
|
||||
RouteInfo {
|
||||
address: Option<String>,
|
||||
},
|
||||
/// The Host is ready to receive transfer chunks (or indicates an offset to resume from).
|
||||
TransferReady {
|
||||
transfer_id: Uuid,
|
||||
received_offset: usize,
|
||||
},
|
||||
/// Acknowledgement of a transfer chunk.
|
||||
TransferChunkAck {
|
||||
transfer_id: Uuid,
|
||||
received_offset: usize,
|
||||
},
|
||||
/// Successful commit and session arm.
|
||||
TransferCommitted {
|
||||
transfer_id: Uuid,
|
||||
character_id: Uuid,
|
||||
local_guid: u32,
|
||||
session_id: Uuid,
|
||||
projected_level: Option<u32>,
|
||||
notes: Vec<String>,
|
||||
},
|
||||
/// Phase 13: Relay allocation details returned to the player.
|
||||
RelayAllocated {
|
||||
relay_host: String,
|
||||
auth_port: u16,
|
||||
world_port: u16,
|
||||
token: String,
|
||||
expires_at: i64,
|
||||
},
|
||||
Error {
|
||||
code: AppError,
|
||||
message: String,
|
||||
},
|
||||
}
|
||||
|
||||
pub fn encode_request(r: &Request) -> Vec<u8> {
|
||||
serde_json::to_vec(r).expect("a request serialises")
|
||||
}
|
||||
|
||||
pub fn decode_request(bytes: &[u8]) -> Result<Request> {
|
||||
if bytes.len() > MAX_TRANSFER_REQUEST_BYTES {
|
||||
return Err(ControlError::Limit("a request is too long".into()));
|
||||
}
|
||||
let r: Request = serde_json::from_slice(bytes)
|
||||
.map_err(|_| ControlError::Invalid("a request is not valid".into()))?;
|
||||
if !matches!(
|
||||
&r,
|
||||
Request::TransferOffer { .. } | Request::TransferChunk { .. }
|
||||
) && bytes.len() > MAX_CONTROL_REQUEST_BYTES
|
||||
{
|
||||
return Err(ControlError::Limit(
|
||||
"a standard control request exceeds 4096 bytes".into(),
|
||||
));
|
||||
}
|
||||
match &r {
|
||||
Request::Provision {
|
||||
desired, password, ..
|
||||
} => {
|
||||
if !valid_password(password)
|
||||
|| desired
|
||||
.as_deref()
|
||||
.is_some_and(|d| d.len() > 64 || d.chars().any(char::is_control))
|
||||
{
|
||||
return invalid("a provisioning request has an unusable password or name");
|
||||
}
|
||||
}
|
||||
Request::Link { login, password } => {
|
||||
if !valid_username(login) || !valid_password_for_link(password) {
|
||||
return invalid("a link request has an unusable login or password");
|
||||
}
|
||||
}
|
||||
Request::Hello { client, .. } if client.len() > 64 => {
|
||||
return invalid("the client name is too long")
|
||||
}
|
||||
Request::TransferOffer {
|
||||
content_hash,
|
||||
total_size,
|
||||
collections,
|
||||
..
|
||||
} => {
|
||||
if content_hash.len() != 64 || !content_hash.chars().all(|c| c.is_ascii_hexdigit()) {
|
||||
return invalid("transfer content hash must be 64 hex characters");
|
||||
}
|
||||
if *total_size > crate::noise::MAX_MESSAGE_BYTES {
|
||||
return Err(ControlError::Limit(
|
||||
"transfer total size is too large".into(),
|
||||
));
|
||||
}
|
||||
if collections.len() > 1000 {
|
||||
return Err(ControlError::Limit(
|
||||
"collections dictionary exceeds 1,000 keys".into(),
|
||||
));
|
||||
}
|
||||
let total_items: usize = collections.values().map(|v| v.len()).sum();
|
||||
if total_items > 100_000 {
|
||||
return Err(ControlError::Limit(
|
||||
"collection mapping exceeds 100,000 entries".into(),
|
||||
));
|
||||
}
|
||||
}
|
||||
Request::TransferChunk { offset, data, .. } => {
|
||||
if *offset > MAX_TRANSFER_REQUEST_BYTES {
|
||||
return Err(ControlError::Limit(
|
||||
"transfer chunk offset exceeds limit".into(),
|
||||
));
|
||||
}
|
||||
if data.len() > MAX_TRANSFER_REQUEST_BYTES {
|
||||
return Err(ControlError::Limit("transfer chunk is too large".into()));
|
||||
}
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
Ok(r)
|
||||
}
|
||||
|
||||
/// An existing account's password may be anything the game accepts (6 to 16 printable characters without spaces or quotes).
|
||||
pub fn valid_password_for_link(s: &str) -> bool {
|
||||
(6..=16).contains(&s.len())
|
||||
&& s.chars()
|
||||
.all(|c| c.is_ascii_graphic() && c != '"' && c != '\'' && c != '\\')
|
||||
}
|
||||
|
||||
pub fn encode_response(r: &Response) -> Vec<u8> {
|
||||
serde_json::to_vec(r).expect("a response serialises")
|
||||
}
|
||||
|
||||
pub fn decode_response(bytes: &[u8]) -> Result<Response> {
|
||||
if bytes.len() > MAX_TRANSFER_REQUEST_BYTES {
|
||||
return Err(ControlError::Limit("a response is too long".into()));
|
||||
}
|
||||
serde_json::from_slice(bytes)
|
||||
.map_err(|_| ControlError::Invalid("a response is not valid".into()))
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn passwords_are_random_unique_and_fit_the_game() {
|
||||
let a = generate_password();
|
||||
let b = generate_password();
|
||||
assert_ne!(a, b);
|
||||
assert!(
|
||||
valid_password(&a)
|
||||
&& a.len() == 16
|
||||
&& a.bytes()
|
||||
.all(|c| c.is_ascii_uppercase() || c.is_ascii_digit()),
|
||||
"{a}"
|
||||
);
|
||||
let mut seen = std::collections::HashSet::new();
|
||||
for _ in 0..200 {
|
||||
assert!(seen.insert(generate_password()), "no repeats");
|
||||
}
|
||||
let symbols: std::collections::HashSet<char> = (0..200)
|
||||
.flat_map(|_| generate_password().chars().collect::<Vec<_>>())
|
||||
.collect();
|
||||
assert_eq!(symbols.len(), 36, "every symbol occurs");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn names_are_made_fit_and_the_alternative_is_stable() {
|
||||
assert_eq!(sanitize_username("Dmitry"), "DMITRY");
|
||||
assert_eq!(sanitize_username("d m-i_t.r y"), "DMITRY");
|
||||
assert_eq!(sanitize_username("ab"), "ABPLAYER");
|
||||
assert_eq!(
|
||||
sanitize_username("a very long player name indeed"),
|
||||
"AVERYLONGPLAYERN"
|
||||
);
|
||||
assert_eq!(sanitize_username("<script>"), "SCRIPT");
|
||||
assert!(
|
||||
valid_username(&sanitize_username("")) && valid_username(&sanitize_username("日本語"))
|
||||
);
|
||||
let p = Uuid::now_v7();
|
||||
let alt = alternative_username("DMITRY", &p, 0);
|
||||
assert!(
|
||||
valid_username(&alt) && alt.starts_with("DMITRY_") && alt.len() == 11,
|
||||
"{alt}"
|
||||
);
|
||||
assert_eq!(
|
||||
alt,
|
||||
alternative_username("DMITRY", &p, 0),
|
||||
"stable for the same player"
|
||||
);
|
||||
assert_ne!(
|
||||
alt,
|
||||
alternative_username("DMITRY", &p, 1),
|
||||
"another attempt, another suffix"
|
||||
);
|
||||
assert_ne!(alt, alternative_username("DMITRY", &Uuid::now_v7(), 0));
|
||||
assert_eq!(
|
||||
alternative_username("ABCDEFGHIJKLMNOP", &p, 0).len(),
|
||||
16,
|
||||
"a long name is shortened to make room"
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn requests_are_strict() {
|
||||
let ok = encode_request(&Request::Provision {
|
||||
desired: Some("DMITRY".into()),
|
||||
password: generate_password(),
|
||||
have_credentials: false,
|
||||
});
|
||||
assert!(decode_request(&ok).is_ok());
|
||||
for bad in [
|
||||
br#"{"op":"provision","desired":null,"password":"short","have_credentials":false}"#.as_slice(),
|
||||
br#"{"op":"provision","desired":null,"password":"has space 123456","have_credentials":false}"#,
|
||||
br#"{"op":"claim","token":1,"extra":true}"#,
|
||||
br#"{"op":"link","login":"a b","password":"secret1"}"#,
|
||||
br#"{"op":"unknown"}"#,
|
||||
b"not json",
|
||||
] {
|
||||
assert!(decode_request(bad).is_err(), "{}", String::from_utf8_lossy(bad));
|
||||
}
|
||||
assert!(decode_request(&vec![b' '; MAX_REQUEST_BYTES + 1]).is_err());
|
||||
assert!(decode_request(br#"{"op":"list_characters"}"#).is_ok());
|
||||
assert!(
|
||||
valid_password_for_link("pa55-w0rd")
|
||||
&& !valid_password_for_link("has\"quote")
|
||||
&& !valid_password_for_link("short")
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn transfer_messages_roundtrip_and_validate() {
|
||||
let tid = Uuid::new_v4();
|
||||
let cid = Uuid::new_v4();
|
||||
let hash = "a".repeat(64);
|
||||
let offer = Request::TransferOffer {
|
||||
transfer_id: tid,
|
||||
character_id: cid,
|
||||
canonical_revision: 5,
|
||||
content_hash: hash.clone(),
|
||||
total_size: 1024,
|
||||
collections: BTreeMap::new(),
|
||||
};
|
||||
let encoded = encode_request(&offer);
|
||||
let decoded = decode_request(&encoded).unwrap();
|
||||
assert_eq!(offer, decoded);
|
||||
|
||||
let bad_hash = Request::TransferOffer {
|
||||
transfer_id: tid,
|
||||
character_id: cid,
|
||||
canonical_revision: 5,
|
||||
content_hash: "too_short".into(),
|
||||
total_size: 1024,
|
||||
collections: BTreeMap::new(),
|
||||
};
|
||||
assert!(decode_request(&encode_request(&bad_hash)).is_err());
|
||||
|
||||
let chunk = Request::TransferChunk {
|
||||
transfer_id: tid,
|
||||
offset: 0,
|
||||
data: "aGVsbG8=".into(),
|
||||
};
|
||||
assert_eq!(chunk, decode_request(&encode_request(&chunk)).unwrap());
|
||||
|
||||
let resp = Response::TransferCommitted {
|
||||
transfer_id: tid,
|
||||
character_id: cid,
|
||||
local_guid: 42,
|
||||
session_id: Uuid::new_v4(),
|
||||
projected_level: Some(60),
|
||||
notes: vec!["Projected".into()],
|
||||
};
|
||||
let resp_dec = decode_response(&encode_response(&resp)).unwrap();
|
||||
assert_eq!(resp, resp_dec);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,387 @@
|
||||
//! The Coordinator's own protocol. Text frames are JSON control messages; binary frames carry one end-to-end frame for one connection, prefixed with the
|
||||
//! connection number. The Coordinator routes by connection number and never looks inside.
|
||||
|
||||
use base64::engine::general_purpose::URL_SAFE_NO_PAD as B64;
|
||||
use base64::Engine;
|
||||
use coa_registry_proto::RealmId;
|
||||
use ed25519_dalek::{Signature, Signer, SigningKey, VerifyingKey};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use uuid::Uuid;
|
||||
|
||||
use crate::{invalid, ControlError, Result};
|
||||
|
||||
/// The largest end-to-end frame the Coordinator forwards (a Noise message with its tag fits in 64 KiB; chunks are much smaller).
|
||||
pub const MAX_FRAME_BYTES: usize = 20 * 1024;
|
||||
/// Bytes of the connection number in front of a binary frame.
|
||||
pub const CONN_PREFIX: usize = 4;
|
||||
pub const MAX_CONTROL_TEXT_BYTES: usize = 2048;
|
||||
pub const HELLO_TIMEOUT_SECS: u64 = 10;
|
||||
/// A Hello's timestamp must be this close to the Coordinator's clock.
|
||||
pub const MAX_HELLO_SKEW_SECS: i64 = 120;
|
||||
|
||||
/// Hard limits of the Coordinator (the defaults of its configuration).
|
||||
pub mod limits {
|
||||
/// Simultaneous Player connections routed to one Host.
|
||||
pub const PER_HOST_CONNECTIONS: usize = 16;
|
||||
/// Simultaneous connections from one address.
|
||||
pub const PER_IP_CONNECTIONS: usize = 8;
|
||||
/// New Player connections per minute per realm, and per address.
|
||||
pub const PER_REALM_PER_MINUTE: u32 = 60;
|
||||
pub const PER_IP_PER_MINUTE: u32 = 30;
|
||||
/// Bytes through one connection, in total.
|
||||
pub const BYTES_PER_CONNECTION: usize = 16 * 1024 * 1024;
|
||||
/// Seconds a connection may live, and may be silent.
|
||||
pub const CONNECTION_LIFETIME_SECS: u64 = 600;
|
||||
pub const IDLE_SECS: u64 = 60;
|
||||
/// Seconds the Host has to answer a new connection (the first frame back).
|
||||
pub const HOST_ANSWER_SECS: u64 = 10;
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
|
||||
#[serde(tag = "t", rename_all = "snake_case", deny_unknown_fields)]
|
||||
pub enum Frame {
|
||||
/// Coordinator -> anyone who connected: prove who you are with this.
|
||||
Challenge {
|
||||
protocol: u32,
|
||||
nonce: String,
|
||||
},
|
||||
/// Host -> Coordinator.
|
||||
HostHello {
|
||||
realm_id: RealmId,
|
||||
ts: i64,
|
||||
sig: String,
|
||||
},
|
||||
/// Player -> Coordinator (the realm it wants is in the URL and is signed).
|
||||
PlayerHello {
|
||||
player_id: Uuid,
|
||||
public_key: String,
|
||||
realm_id: RealmId,
|
||||
ts: i64,
|
||||
sig: String,
|
||||
},
|
||||
/// Coordinator -> Host: the Host is registered and these are the limits.
|
||||
HostReady {
|
||||
max_connections: u32,
|
||||
max_frame: u32,
|
||||
},
|
||||
/// Coordinator -> Host: a Player wants to talk; its frames will carry this number.
|
||||
Open {
|
||||
conn: u32,
|
||||
#[serde(default)]
|
||||
client_ip: Option<String>,
|
||||
},
|
||||
/// Either side of a connection ends it.
|
||||
Close {
|
||||
conn: u32,
|
||||
reason: Option<String>,
|
||||
},
|
||||
/// Coordinator -> Player: the Host accepted the connection; binary frames flow now.
|
||||
PlayerReady {
|
||||
conn: u32,
|
||||
max_frame: u32,
|
||||
},
|
||||
Error {
|
||||
code: ErrorCode,
|
||||
message: String,
|
||||
},
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
pub enum ErrorCode {
|
||||
BadHello,
|
||||
UnknownRealm,
|
||||
HostOffline,
|
||||
HostBusy,
|
||||
RateLimited,
|
||||
TooLarge,
|
||||
Timeout,
|
||||
Internal,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
|
||||
#[serde(deny_unknown_fields)]
|
||||
pub struct ProbePayload {
|
||||
pub ports: Vec<u16>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
|
||||
pub struct ProbeResponse {
|
||||
pub client_ip: String,
|
||||
pub results: std::collections::HashMap<u16, bool>,
|
||||
pub all_reachable: bool,
|
||||
}
|
||||
|
||||
pub fn challenge_nonce() -> String {
|
||||
let mut n = [0u8; 32];
|
||||
n[..16].copy_from_slice(Uuid::new_v4().as_bytes());
|
||||
n[16..].copy_from_slice(Uuid::new_v4().as_bytes());
|
||||
B64.encode(n)
|
||||
}
|
||||
|
||||
fn host_input(realm: &RealmId, nonce: &str, ts: i64) -> Vec<u8> {
|
||||
format!(
|
||||
"coa-coord-host-v1\n{}\n{realm}\n{nonce}\n{ts}",
|
||||
crate::CONTROL_PROTOCOL_VERSION
|
||||
)
|
||||
.into_bytes()
|
||||
}
|
||||
|
||||
fn player_input(player: &Uuid, public_key: &str, realm: &RealmId, nonce: &str, ts: i64) -> Vec<u8> {
|
||||
format!(
|
||||
"coa-coord-player-v1\n{}\n{}\n{public_key}\n{realm}\n{nonce}\n{ts}",
|
||||
crate::CONTROL_PROTOCOL_VERSION,
|
||||
player.hyphenated()
|
||||
)
|
||||
.into_bytes()
|
||||
}
|
||||
|
||||
pub fn sign_host_hello(key: &SigningKey, realm: &RealmId, nonce: &str, ts: i64) -> Frame {
|
||||
Frame::HostHello {
|
||||
realm_id: *realm,
|
||||
ts,
|
||||
sig: B64.encode(key.sign(&host_input(realm, nonce, ts)).to_bytes()),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn sign_player_hello(
|
||||
key: &SigningKey,
|
||||
player: &Uuid,
|
||||
realm: &RealmId,
|
||||
nonce: &str,
|
||||
ts: i64,
|
||||
) -> Frame {
|
||||
let public_key = B64.encode(key.verifying_key().as_bytes());
|
||||
let sig = B64.encode(
|
||||
key.sign(&player_input(player, &public_key, realm, nonce, ts))
|
||||
.to_bytes(),
|
||||
);
|
||||
Frame::PlayerHello {
|
||||
player_id: *player,
|
||||
public_key,
|
||||
realm_id: *realm,
|
||||
ts,
|
||||
sig,
|
||||
}
|
||||
}
|
||||
|
||||
fn decode_sig(sig: &str) -> Result<Signature> {
|
||||
if sig.len() != 86 {
|
||||
return invalid("the signature has the wrong length");
|
||||
}
|
||||
let bytes: [u8; 64] = B64
|
||||
.decode(sig)
|
||||
.map_err(|_| ControlError::Invalid("the signature is not base64url".into()))?
|
||||
.try_into()
|
||||
.map_err(|_| ControlError::Invalid("the signature is not 64 bytes".into()))?;
|
||||
Ok(Signature::from_bytes(&bytes))
|
||||
}
|
||||
|
||||
/// A Host's hello checked against the key the Registry holds for the realm.
|
||||
pub fn verify_host_hello(
|
||||
frame: &Frame,
|
||||
realm_key: &VerifyingKey,
|
||||
expect_realm: Option<&RealmId>,
|
||||
nonce: &str,
|
||||
now: i64,
|
||||
) -> Result<RealmId> {
|
||||
let Frame::HostHello { realm_id, ts, sig } = frame else {
|
||||
return Err(ControlError::Auth("not a host hello".into()));
|
||||
};
|
||||
if expect_realm.is_some_and(|r| r != realm_id) {
|
||||
return Err(ControlError::Auth("another realm".into()));
|
||||
}
|
||||
if (ts - now).abs() > MAX_HELLO_SKEW_SECS {
|
||||
return Err(ControlError::Auth(
|
||||
"the timestamp is outside the allowed skew".into(),
|
||||
));
|
||||
}
|
||||
realm_key
|
||||
.verify_strict(&host_input(realm_id, nonce, *ts), &decode_sig(sig)?)
|
||||
.map_err(|_| ControlError::Auth("the signature does not match".into()))?;
|
||||
Ok(*realm_id)
|
||||
}
|
||||
|
||||
/// A Player's hello checked against the key it presents (proof of possession; the Host decides whether it is a known player).
|
||||
pub fn verify_player_hello(
|
||||
frame: &Frame,
|
||||
nonce: &str,
|
||||
now: i64,
|
||||
) -> Result<(Uuid, RealmId, VerifyingKey)> {
|
||||
let Frame::PlayerHello {
|
||||
player_id,
|
||||
public_key,
|
||||
realm_id,
|
||||
ts,
|
||||
sig,
|
||||
} = frame
|
||||
else {
|
||||
return Err(ControlError::Auth("not a player hello".into()));
|
||||
};
|
||||
if (ts - now).abs() > MAX_HELLO_SKEW_SECS {
|
||||
return Err(ControlError::Auth(
|
||||
"the timestamp is outside the allowed skew".into(),
|
||||
));
|
||||
}
|
||||
let key = decode_public_key(public_key)?;
|
||||
key.verify_strict(
|
||||
&player_input(player_id, public_key, realm_id, nonce, *ts),
|
||||
&decode_sig(sig)?,
|
||||
)
|
||||
.map_err(|_| ControlError::Auth("the signature does not match".into()))?;
|
||||
Ok((*player_id, *realm_id, key))
|
||||
}
|
||||
|
||||
pub fn decode_public_key(text: &str) -> Result<VerifyingKey> {
|
||||
coa_registry_proto::sign::decode_public_key(text)
|
||||
.map_err(|e| ControlError::Invalid(e.to_string()))
|
||||
}
|
||||
|
||||
pub fn encode_public_key(key: &VerifyingKey) -> String {
|
||||
coa_registry_proto::sign::encode_public_key(key)
|
||||
}
|
||||
|
||||
/// `[connection number][end-to-end frame]`
|
||||
pub fn binary(conn: u32, frame: &[u8]) -> Vec<u8> {
|
||||
let mut out = Vec::with_capacity(CONN_PREFIX + frame.len());
|
||||
out.extend_from_slice(&conn.to_be_bytes());
|
||||
out.extend_from_slice(frame);
|
||||
out
|
||||
}
|
||||
|
||||
pub fn split_binary(data: &[u8]) -> Result<(u32, &[u8])> {
|
||||
if data.len() < CONN_PREFIX || data.len() > CONN_PREFIX + MAX_FRAME_BYTES {
|
||||
return Err(ControlError::Limit(
|
||||
"a frame is too short or too long".into(),
|
||||
));
|
||||
}
|
||||
Ok((
|
||||
u32::from_be_bytes(data[..CONN_PREFIX].try_into().expect("4 bytes")),
|
||||
&data[CONN_PREFIX..],
|
||||
))
|
||||
}
|
||||
|
||||
pub fn parse_text(text: &str) -> Result<Frame> {
|
||||
if text.len() > MAX_CONTROL_TEXT_BYTES {
|
||||
return Err(ControlError::Limit("a control message is too long".into()));
|
||||
}
|
||||
serde_json::from_str(text)
|
||||
.map_err(|_| ControlError::Invalid("a control message is not valid".into()))
|
||||
}
|
||||
|
||||
pub fn to_text(frame: &Frame) -> String {
|
||||
serde_json::to_string(frame).expect("a frame serialises")
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
fn key(n: u8) -> SigningKey {
|
||||
SigningKey::from_bytes(&[n; 32])
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn a_host_proves_its_realm_key_and_only_that() {
|
||||
let realm = RealmId::new();
|
||||
let nonce = challenge_nonce();
|
||||
let hello = sign_host_hello(&key(1), &realm, &nonce, 1000);
|
||||
assert_eq!(
|
||||
verify_host_hello(&hello, &key(1).verifying_key(), Some(&realm), &nonce, 1010).unwrap(),
|
||||
realm
|
||||
);
|
||||
assert!(
|
||||
verify_host_hello(&hello, &key(2).verifying_key(), Some(&realm), &nonce, 1010).is_err(),
|
||||
"another key"
|
||||
);
|
||||
assert!(
|
||||
verify_host_hello(
|
||||
&hello,
|
||||
&key(1).verifying_key(),
|
||||
Some(&RealmId::new()),
|
||||
&nonce,
|
||||
1010
|
||||
)
|
||||
.is_err(),
|
||||
"another realm"
|
||||
);
|
||||
assert!(
|
||||
verify_host_hello(
|
||||
&hello,
|
||||
&key(1).verifying_key(),
|
||||
None,
|
||||
&challenge_nonce(),
|
||||
1010
|
||||
)
|
||||
.is_err(),
|
||||
"another challenge: no replay"
|
||||
);
|
||||
assert!(
|
||||
verify_host_hello(&hello, &key(1).verifying_key(), None, &nonce, 5000).is_err(),
|
||||
"too old"
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn a_player_proves_possession_of_its_key() {
|
||||
let (player, realm, nonce) = (Uuid::now_v7(), RealmId::new(), challenge_nonce());
|
||||
let hello = sign_player_hello(&key(3), &player, &realm, &nonce, 50);
|
||||
let (p, r, k) = verify_player_hello(&hello, &nonce, 55).unwrap();
|
||||
assert_eq!(
|
||||
(p, r, k.to_bytes()),
|
||||
(player, realm, key(3).verifying_key().to_bytes())
|
||||
);
|
||||
let Frame::PlayerHello {
|
||||
player_id,
|
||||
public_key,
|
||||
realm_id,
|
||||
ts,
|
||||
sig,
|
||||
} = hello.clone()
|
||||
else {
|
||||
unreachable!()
|
||||
};
|
||||
let other_key = encode_public_key(&key(4).verifying_key());
|
||||
assert!(
|
||||
verify_player_hello(
|
||||
&Frame::PlayerHello {
|
||||
player_id,
|
||||
public_key: other_key,
|
||||
realm_id,
|
||||
ts,
|
||||
sig: sig.clone()
|
||||
},
|
||||
&nonce,
|
||||
55
|
||||
)
|
||||
.is_err(),
|
||||
"a key that did not sign"
|
||||
);
|
||||
assert!(
|
||||
verify_player_hello(
|
||||
&Frame::PlayerHello {
|
||||
player_id: Uuid::now_v7(),
|
||||
public_key,
|
||||
realm_id,
|
||||
ts,
|
||||
sig
|
||||
},
|
||||
&nonce,
|
||||
55
|
||||
)
|
||||
.is_err(),
|
||||
"another player id"
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn frames_are_strict_and_bounded() {
|
||||
assert!(parse_text(r#"{"t":"close","conn":1,"reason":null,"extra":1}"#).is_err());
|
||||
assert!(parse_text(&"x".repeat(5000)).is_err());
|
||||
assert!(parse_text(r#"{"t":"open","conn":7}"#).is_ok());
|
||||
let b = binary(9, b"abc");
|
||||
assert_eq!(split_binary(&b).unwrap(), (9, b"abc".as_slice()));
|
||||
assert!(split_binary(&[0, 0]).is_err());
|
||||
assert!(split_binary(&vec![0u8; CONN_PREFIX + MAX_FRAME_BYTES + 1]).is_err());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
//! The Player <-> Host control protocol (Phase 12), control plane only.
|
||||
//!
|
||||
//! ```text
|
||||
//! Player Manager --(WebSocket)--> Coordinator <--(WebSocket, opened by the Host)-- Host Manager
|
||||
//! \________ Noise_XX end-to-end channel, authenticated by Ed25519 signatures over its handshake hash ________/
|
||||
//! ```
|
||||
//!
|
||||
//! * [`coord`]: what the Coordinator sees and decides: who may connect (a Host proves its RealmId key, a Player proves a PlayerId key), how frames are routed, the limits.
|
||||
//! * [`noise`]: the end-to-end channel the Coordinator cannot read: the Noise handshake, the framing of long messages, and the binding of identities to it.
|
||||
//! * [`app`]: the application messages inside the channel (account provisioning, listing and claiming characters, linking an existing account, the route).
|
||||
//!
|
||||
//! The Coordinator never receives plaintext account passwords, character data or database/RA credentials: everything of that kind exists only inside the channel.
|
||||
|
||||
pub mod app;
|
||||
pub mod coord;
|
||||
pub mod noise;
|
||||
pub mod relay;
|
||||
|
||||
pub const CONTROL_PROTOCOL_VERSION: u32 = 1;
|
||||
|
||||
#[derive(Debug, thiserror::Error, PartialEq, Eq)]
|
||||
pub enum ControlError {
|
||||
#[error("{0}")]
|
||||
Invalid(String),
|
||||
#[error("the channel failed: {0}")]
|
||||
Channel(String),
|
||||
#[error("the peer could not prove who it is: {0}")]
|
||||
Auth(String),
|
||||
#[error("a limit was exceeded: {0}")]
|
||||
Limit(String),
|
||||
}
|
||||
|
||||
pub type Result<T> = std::result::Result<T, ControlError>;
|
||||
|
||||
pub(crate) fn invalid<T>(m: impl Into<String>) -> Result<T> {
|
||||
Err(ControlError::Invalid(m.into()))
|
||||
}
|
||||
@@ -0,0 +1,458 @@
|
||||
//! The end-to-end channel between a Player Manager and a Host Manager, over whatever carries frames between them (the Coordinator, later perhaps a direct socket).
|
||||
//!
|
||||
//! **Handshake: `Noise_XX_25519_ChaChaPoly_BLAKE2s`** (the Noise Protocol Framework, implemented by the `snow` crate; no primitive is invented here). Both sides use fresh
|
||||
//! random X25519 static keys for each channel, so the Noise layer gives confidentiality, integrity and forward secrecy but no identity. Identity is added the standard way,
|
||||
//! by **channel binding**: after the handshake each side signs the handshake hash `h` (unique to this channel) with its long-lived Ed25519 key.
|
||||
//!
|
||||
//! ```text
|
||||
//! Player -> Host msg1 (e)
|
||||
//! Host -> Player msg2 (e, ee, s, es)
|
||||
//! Player -> Host msg3 (s, se) channel is open; h = the handshake hash
|
||||
//! Host -> Player HostProof Ed25519_realm_key("coa-ctl-host-v1\0" || h || realm_id) the Player checks it against the key the Registry publishes
|
||||
//! Player -> Host PlayerProof Ed25519_player_key("coa-ctl-player-v1\0" || h || realm_id || player_id) sent only after the Host's proof was good
|
||||
//! ```
|
||||
//!
|
||||
//! A Coordinator that relays the frames can neither read nor alter them (Noise authenticates every message), and cannot impersonate either side: a signature over `h`
|
||||
//! for one channel is useless on another.
|
||||
|
||||
use base64::engine::general_purpose::URL_SAFE_NO_PAD as B64;
|
||||
use base64::Engine;
|
||||
use coa_registry_proto::RealmId;
|
||||
use ed25519_dalek::{Signature, Signer, SigningKey, VerifyingKey};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use snow::{Builder, HandshakeState, TransportState};
|
||||
use uuid::Uuid;
|
||||
|
||||
use crate::{ControlError, Result};
|
||||
|
||||
pub const NOISE_PARAMS: &str = "Noise_XX_25519_ChaChaPoly_BLAKE2s";
|
||||
/// Plaintext bytes per transport frame (a frame is this plus one flag byte plus the 16-byte tag).
|
||||
pub const CHUNK: usize = 16 * 1024;
|
||||
/// The largest application message (reassembled).
|
||||
pub const MAX_MESSAGE_BYTES: usize = 8 * 1024 * 1024;
|
||||
const MAX_HANDSHAKE_BYTES: usize = 1024;
|
||||
|
||||
fn channel_err(e: snow::Error) -> ControlError {
|
||||
ControlError::Channel(e.to_string())
|
||||
}
|
||||
|
||||
fn builder() -> Result<Builder<'static>> {
|
||||
Ok(Builder::new(NOISE_PARAMS.parse().map_err(channel_err)?))
|
||||
}
|
||||
|
||||
/// The Player's side of the handshake.
|
||||
pub struct Initiator {
|
||||
hs: HandshakeState,
|
||||
}
|
||||
|
||||
impl Initiator {
|
||||
/// The state and the first message to send.
|
||||
pub fn start() -> Result<(Self, Vec<u8>)> {
|
||||
let b = builder()?;
|
||||
let key = b.generate_keypair().map_err(channel_err)?;
|
||||
let mut hs = b
|
||||
.local_private_key(&key.private)
|
||||
.build_initiator()
|
||||
.map_err(channel_err)?;
|
||||
let mut buf = vec![0u8; MAX_HANDSHAKE_BYTES];
|
||||
let n = hs.write_message(&[], &mut buf).map_err(channel_err)?;
|
||||
buf.truncate(n);
|
||||
Ok((Self { hs }, buf))
|
||||
}
|
||||
|
||||
/// Read the Host's answer; returns the third message to send and the open channel.
|
||||
pub fn finish(mut self, msg2: &[u8]) -> Result<(Vec<u8>, Channel)> {
|
||||
if msg2.len() > MAX_HANDSHAKE_BYTES {
|
||||
return Err(ControlError::Limit(
|
||||
"a handshake message is too long".into(),
|
||||
));
|
||||
}
|
||||
let mut buf = vec![0u8; MAX_HANDSHAKE_BYTES];
|
||||
self.hs.read_message(msg2, &mut buf).map_err(channel_err)?;
|
||||
let n = self.hs.write_message(&[], &mut buf).map_err(channel_err)?;
|
||||
buf.truncate(n);
|
||||
if !self.hs.is_handshake_finished() {
|
||||
return Err(ControlError::Channel("the handshake did not finish".into()));
|
||||
}
|
||||
Ok((buf, Channel::from(self.hs)?))
|
||||
}
|
||||
}
|
||||
|
||||
/// The Host's side of the handshake.
|
||||
pub struct Responder {
|
||||
hs: HandshakeState,
|
||||
}
|
||||
|
||||
impl Responder {
|
||||
/// Read the first message; returns the state and the second message to send.
|
||||
pub fn start(msg1: &[u8]) -> Result<(Self, Vec<u8>)> {
|
||||
if msg1.len() > MAX_HANDSHAKE_BYTES {
|
||||
return Err(ControlError::Limit(
|
||||
"a handshake message is too long".into(),
|
||||
));
|
||||
}
|
||||
let b = builder()?;
|
||||
let key = b.generate_keypair().map_err(channel_err)?;
|
||||
let mut hs = b
|
||||
.local_private_key(&key.private)
|
||||
.build_responder()
|
||||
.map_err(channel_err)?;
|
||||
let mut buf = vec![0u8; MAX_HANDSHAKE_BYTES];
|
||||
hs.read_message(msg1, &mut buf).map_err(channel_err)?;
|
||||
let n = hs.write_message(&[], &mut buf).map_err(channel_err)?;
|
||||
buf.truncate(n);
|
||||
Ok((Self { hs }, buf))
|
||||
}
|
||||
|
||||
pub fn finish(mut self, msg3: &[u8]) -> Result<Channel> {
|
||||
if msg3.len() > MAX_HANDSHAKE_BYTES {
|
||||
return Err(ControlError::Limit(
|
||||
"a handshake message is too long".into(),
|
||||
));
|
||||
}
|
||||
let mut buf = vec![0u8; MAX_HANDSHAKE_BYTES];
|
||||
self.hs.read_message(msg3, &mut buf).map_err(channel_err)?;
|
||||
if !self.hs.is_handshake_finished() {
|
||||
return Err(ControlError::Channel("the handshake did not finish".into()));
|
||||
}
|
||||
Channel::from(self.hs)
|
||||
}
|
||||
}
|
||||
|
||||
/// An open channel: messages go out as one or more encrypted frames and come back reassembled.
|
||||
pub struct Channel {
|
||||
transport: TransportState,
|
||||
hash: Vec<u8>,
|
||||
partial: Vec<u8>,
|
||||
}
|
||||
|
||||
impl Channel {
|
||||
fn from(hs: HandshakeState) -> Result<Self> {
|
||||
let hash = hs.get_handshake_hash().to_vec();
|
||||
Ok(Self {
|
||||
transport: hs.into_transport_mode().map_err(channel_err)?,
|
||||
hash,
|
||||
partial: Vec::new(),
|
||||
})
|
||||
}
|
||||
|
||||
/// The handshake hash: unique to this channel, the same on both ends.
|
||||
pub fn handshake_hash(&self) -> &[u8] {
|
||||
&self.hash
|
||||
}
|
||||
|
||||
/// Encrypt one application message into frames (in order).
|
||||
pub fn seal(&mut self, message: &[u8]) -> Result<Vec<Vec<u8>>> {
|
||||
if message.len() > MAX_MESSAGE_BYTES {
|
||||
return Err(ControlError::Limit("a message is too long".into()));
|
||||
}
|
||||
let chunks: Vec<&[u8]> = if message.is_empty() {
|
||||
vec![&[][..]]
|
||||
} else {
|
||||
message.chunks(CHUNK).collect()
|
||||
};
|
||||
let mut frames = Vec::with_capacity(chunks.len());
|
||||
for (i, chunk) in chunks.iter().enumerate() {
|
||||
let mut plain = Vec::with_capacity(chunk.len() + 1);
|
||||
plain.push(u8::from(i + 1 < chunks.len()));
|
||||
plain.extend_from_slice(chunk);
|
||||
let mut out = vec![0u8; plain.len() + 16];
|
||||
let n = self
|
||||
.transport
|
||||
.write_message(&plain, &mut out)
|
||||
.map_err(channel_err)?;
|
||||
out.truncate(n);
|
||||
frames.push(out);
|
||||
}
|
||||
Ok(frames)
|
||||
}
|
||||
|
||||
/// Decrypt one frame. `Some(message)` when it completed a message; `None` when more frames follow. A frame that does not authenticate ends the channel.
|
||||
pub fn open_frame(&mut self, frame: &[u8]) -> Result<Option<Vec<u8>>> {
|
||||
if frame.len() < 17 || frame.len() > CHUNK + 17 {
|
||||
return Err(ControlError::Limit(
|
||||
"a frame is too short or too long".into(),
|
||||
));
|
||||
}
|
||||
let mut plain = vec![0u8; frame.len()];
|
||||
let n = self
|
||||
.transport
|
||||
.read_message(frame, &mut plain)
|
||||
.map_err(channel_err)?;
|
||||
plain.truncate(n);
|
||||
let (&more, chunk) = plain
|
||||
.split_first()
|
||||
.ok_or_else(|| ControlError::Channel("an empty frame".into()))?;
|
||||
if self.partial.len() + chunk.len() > MAX_MESSAGE_BYTES {
|
||||
self.partial.clear();
|
||||
return Err(ControlError::Limit("a message is too long".into()));
|
||||
}
|
||||
self.partial.extend_from_slice(chunk);
|
||||
match more {
|
||||
0 => Ok(Some(std::mem::take(&mut self.partial))),
|
||||
1 => Ok(None),
|
||||
_ => {
|
||||
self.partial.clear();
|
||||
Err(ControlError::Channel("a frame has an unknown flag".into()))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ---- identity bound to the channel --------------------------------------------------------------------------------------------
|
||||
|
||||
fn host_input(h: &[u8], realm: &RealmId) -> Vec<u8> {
|
||||
let mut v = b"coa-ctl-host-v1\0".to_vec();
|
||||
v.extend_from_slice(h);
|
||||
v.extend_from_slice(realm.to_string().as_bytes());
|
||||
v
|
||||
}
|
||||
|
||||
fn player_input(h: &[u8], realm: &RealmId, player: &Uuid) -> Vec<u8> {
|
||||
let mut v = b"coa-ctl-player-v1\0".to_vec();
|
||||
v.extend_from_slice(h);
|
||||
v.extend_from_slice(realm.to_string().as_bytes());
|
||||
v.extend_from_slice(player.hyphenated().to_string().as_bytes());
|
||||
v
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
|
||||
#[serde(deny_unknown_fields)]
|
||||
pub struct HostProof {
|
||||
pub realm_id: RealmId,
|
||||
pub sig: String,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
|
||||
#[serde(deny_unknown_fields)]
|
||||
pub struct PlayerProof {
|
||||
pub player_id: Uuid,
|
||||
pub public_key: String,
|
||||
pub sig: String,
|
||||
}
|
||||
|
||||
fn decode_sig(sig: &str) -> Result<Signature> {
|
||||
let bytes: [u8; 64] = B64
|
||||
.decode(sig)
|
||||
.ok()
|
||||
.and_then(|b| b.try_into().ok())
|
||||
.ok_or_else(|| ControlError::Auth("a signature is not 64 bytes of base64url".into()))?;
|
||||
Ok(Signature::from_bytes(&bytes))
|
||||
}
|
||||
|
||||
pub fn host_proof(key: &SigningKey, realm: &RealmId, channel: &Channel) -> HostProof {
|
||||
HostProof {
|
||||
realm_id: *realm,
|
||||
sig: B64.encode(
|
||||
key.sign(&host_input(channel.handshake_hash(), realm))
|
||||
.to_bytes(),
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
/// The Player checks that the peer holds the key the Registry publishes for the realm it asked for, on this very channel.
|
||||
pub fn verify_host_proof(
|
||||
proof: &HostProof,
|
||||
realm_key: &VerifyingKey,
|
||||
expected_realm: &RealmId,
|
||||
channel: &Channel,
|
||||
) -> Result<()> {
|
||||
if proof.realm_id != *expected_realm {
|
||||
return Err(ControlError::Auth(
|
||||
"the peer answers for another realm".into(),
|
||||
));
|
||||
}
|
||||
realm_key
|
||||
.verify_strict(
|
||||
&host_input(channel.handshake_hash(), expected_realm),
|
||||
&decode_sig(&proof.sig)?,
|
||||
)
|
||||
.map_err(|_| ControlError::Auth("the peer is not the realm's Host".into()))
|
||||
}
|
||||
|
||||
pub fn player_proof(
|
||||
key: &SigningKey,
|
||||
realm: &RealmId,
|
||||
player: &Uuid,
|
||||
channel: &Channel,
|
||||
) -> PlayerProof {
|
||||
PlayerProof {
|
||||
player_id: *player,
|
||||
public_key: crate::coord::encode_public_key(&key.verifying_key()),
|
||||
sig: B64.encode(
|
||||
key.sign(&player_input(channel.handshake_hash(), realm, player))
|
||||
.to_bytes(),
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
/// The Host learns which player key signed this channel; whether that key is the one it knows for the player id is the Host's decision.
|
||||
pub fn verify_player_proof(
|
||||
proof: &PlayerProof,
|
||||
realm: &RealmId,
|
||||
channel: &Channel,
|
||||
) -> Result<VerifyingKey> {
|
||||
let key = crate::coord::decode_public_key(&proof.public_key)?;
|
||||
key.verify_strict(
|
||||
&player_input(channel.handshake_hash(), realm, &proof.player_id),
|
||||
&decode_sig(&proof.sig)?,
|
||||
)
|
||||
.map_err(|_| ControlError::Auth("the player's proof does not match this channel".into()))?;
|
||||
Ok(key)
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
fn pair() -> (Channel, Channel) {
|
||||
let (init, m1) = Initiator::start().unwrap();
|
||||
let (resp, m2) = Responder::start(&m1).unwrap();
|
||||
let (m3, player) = init.finish(&m2).unwrap();
|
||||
let host = resp.finish(&m3).unwrap();
|
||||
(player, host)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn the_channel_carries_messages_of_any_size_in_both_directions() {
|
||||
let (mut player, mut host) = pair();
|
||||
assert_eq!(
|
||||
player.handshake_hash(),
|
||||
host.handshake_hash(),
|
||||
"both ends hold the same channel binding"
|
||||
);
|
||||
for len in [
|
||||
0usize,
|
||||
1,
|
||||
100,
|
||||
CHUNK - 1,
|
||||
CHUNK,
|
||||
CHUNK + 1,
|
||||
5 * CHUNK + 7,
|
||||
600_000,
|
||||
] {
|
||||
let msg: Vec<u8> = (0..len).map(|i| (i * 31 % 251) as u8).collect();
|
||||
let frames = player.seal(&msg).unwrap();
|
||||
assert!(
|
||||
frames.iter().all(|f| f.len() <= CHUNK + 17),
|
||||
"every frame fits the coordinator's limit"
|
||||
);
|
||||
let mut got = None;
|
||||
for f in &frames {
|
||||
got = host.open_frame(f).unwrap();
|
||||
}
|
||||
assert_eq!(got.as_deref(), Some(msg.as_slice()), "{len}");
|
||||
let back = host.seal(&msg).unwrap();
|
||||
let mut got = None;
|
||||
for f in &back {
|
||||
got = player.open_frame(f).unwrap();
|
||||
}
|
||||
assert_eq!(got.as_deref(), Some(msg.as_slice()));
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn what_a_relay_sees_is_not_the_message_and_what_it_changes_is_refused() {
|
||||
let (mut player, mut host) = pair();
|
||||
let secret = b"the password of this account is HUNTER2HUNTER2";
|
||||
let frames = player.seal(secret).unwrap();
|
||||
assert!(
|
||||
!frames[0]
|
||||
.windows(7)
|
||||
.any(|w| w == b"HUNTER2" || w == b"account"),
|
||||
"ciphertext carries no plaintext"
|
||||
);
|
||||
let mut tampered = frames[0].clone();
|
||||
tampered[20] ^= 1;
|
||||
assert!(
|
||||
host.open_frame(&tampered).is_err(),
|
||||
"a changed frame does not authenticate"
|
||||
);
|
||||
let (mut p2, mut h2) = pair();
|
||||
let f = p2.seal(b"x").unwrap();
|
||||
assert!(h2.open_frame(&f[0]).is_ok());
|
||||
assert!(
|
||||
h2.open_frame(&f[0]).is_err(),
|
||||
"a replayed frame is refused (the nonce moved on)"
|
||||
);
|
||||
let (mut p3, mut h3) = pair();
|
||||
let (mut p4, _h4) = pair();
|
||||
let foreign = p4.seal(b"x").unwrap();
|
||||
assert!(
|
||||
h3.open_frame(&foreign[0]).is_err(),
|
||||
"a frame of another channel is refused"
|
||||
);
|
||||
let _ = &mut p3;
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn a_message_that_is_too_long_or_a_frame_that_is_malformed_is_a_limit_error() {
|
||||
let (mut player, mut host) = pair();
|
||||
assert!(player.seal(&vec![0u8; MAX_MESSAGE_BYTES + 1]).is_err());
|
||||
assert!(host.open_frame(&[0u8; 5]).is_err());
|
||||
assert!(host.open_frame(&vec![0u8; CHUNK + 40]).is_err());
|
||||
assert!(Responder::start(&vec![0u8; 5000]).is_err());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn identities_are_bound_to_one_channel() {
|
||||
let (player_ch, host_ch) = pair();
|
||||
let (other_player_ch, _other_host_ch) = pair();
|
||||
let realm = RealmId::new();
|
||||
let (realm_key, player_key) = (
|
||||
SigningKey::from_bytes(&[5; 32]),
|
||||
SigningKey::from_bytes(&[6; 32]),
|
||||
);
|
||||
let player_id = Uuid::now_v7();
|
||||
|
||||
let proof = host_proof(&realm_key, &realm, &host_ch);
|
||||
verify_host_proof(&proof, &realm_key.verifying_key(), &realm, &player_ch).unwrap();
|
||||
assert!(
|
||||
verify_host_proof(
|
||||
&proof,
|
||||
&SigningKey::from_bytes(&[9; 32]).verifying_key(),
|
||||
&realm,
|
||||
&player_ch
|
||||
)
|
||||
.is_err(),
|
||||
"an impostor with another key"
|
||||
);
|
||||
assert!(
|
||||
verify_host_proof(
|
||||
&proof,
|
||||
&realm_key.verifying_key(),
|
||||
&RealmId::new(),
|
||||
&player_ch
|
||||
)
|
||||
.is_err(),
|
||||
"another realm"
|
||||
);
|
||||
assert!(
|
||||
verify_host_proof(&proof, &realm_key.verifying_key(), &realm, &other_player_ch)
|
||||
.is_err(),
|
||||
"a proof captured on another channel is useless (no relay can replay it)"
|
||||
);
|
||||
|
||||
let pp = player_proof(&player_key, &realm, &player_id, &player_ch);
|
||||
let key = verify_player_proof(&pp, &realm, &host_ch).unwrap();
|
||||
assert_eq!(key.to_bytes(), player_key.verifying_key().to_bytes());
|
||||
assert!(verify_player_proof(&pp, &RealmId::new(), &host_ch).is_err());
|
||||
assert!(
|
||||
verify_player_proof(
|
||||
&PlayerProof {
|
||||
player_id: Uuid::now_v7(),
|
||||
..pp.clone()
|
||||
},
|
||||
&realm,
|
||||
&host_ch
|
||||
)
|
||||
.is_err(),
|
||||
"another player id under the same signature"
|
||||
);
|
||||
let (_, third_host) = pair();
|
||||
assert!(
|
||||
verify_player_proof(&pp, &realm, &third_host).is_err(),
|
||||
"another channel"
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,318 @@
|
||||
//! Game Relay protocol (Phase 13):
|
||||
//! Host-to-Relay multiplexed tunnel protocol, allocation messaging,
|
||||
//! challenge-response authentication, and WoW 3.3.5 REALM_LIST address rewrite helper.
|
||||
|
||||
use coa_registry_proto::RealmId;
|
||||
use ed25519_dalek::{Signature, Signer, SigningKey, VerifyingKey};
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use uuid::Uuid;
|
||||
|
||||
pub const RELAY_PROTOCOL_VERSION: u32 = 1;
|
||||
|
||||
/// Default local targets that the Host opens for game traffic.
|
||||
pub const LOCAL_AUTH_PORT: u16 = 3724;
|
||||
pub const LOCAL_WORLD_PORT: u16 = 8085;
|
||||
|
||||
/// Predefined targets that the Relay can request over the Host tunnel.
|
||||
/// Arbitrary destinations are strictly forbidden.
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
pub enum RelayTarget {
|
||||
Auth,
|
||||
World,
|
||||
}
|
||||
|
||||
impl RelayTarget {
|
||||
pub fn local_port(&self) -> u16 {
|
||||
match self {
|
||||
RelayTarget::Auth => std::env::var("COA_OVERRIDE_LOCAL_AUTH_PORT")
|
||||
.ok()
|
||||
.and_then(|p| p.parse().ok())
|
||||
.unwrap_or(LOCAL_AUTH_PORT),
|
||||
RelayTarget::World => std::env::var("COA_OVERRIDE_LOCAL_WORLD_PORT")
|
||||
.ok()
|
||||
.and_then(|p| p.parse().ok())
|
||||
.unwrap_or(LOCAL_WORLD_PORT),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||
#[serde(deny_unknown_fields)]
|
||||
pub struct RelayChallenge {
|
||||
pub nonce: String,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||
#[serde(deny_unknown_fields)]
|
||||
pub struct HostHello {
|
||||
pub realm_id: RealmId,
|
||||
pub signature: String,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||
#[serde(deny_unknown_fields)]
|
||||
pub struct RelayWelcome {
|
||||
pub ok: bool,
|
||||
pub message: String,
|
||||
}
|
||||
|
||||
/// Messages multiplexed across the Host <-> Relay tunnel.
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
|
||||
#[serde(tag = "cmd", rename_all = "snake_case", deny_unknown_fields)]
|
||||
pub enum TunnelMsg {
|
||||
/// Host asks Relay to allocate a game session for a player.
|
||||
Allocate {
|
||||
request_id: u64,
|
||||
player_id: Uuid,
|
||||
#[serde(default)]
|
||||
expected_client_ip: Option<String>,
|
||||
},
|
||||
/// Relay responds to Host with allocation details.
|
||||
AllocateOk {
|
||||
request_id: u64,
|
||||
token: String,
|
||||
relay_host: String,
|
||||
auth_port: u16,
|
||||
world_port: u16,
|
||||
expires_at: i64,
|
||||
},
|
||||
AllocateErr {
|
||||
request_id: u64,
|
||||
error: String,
|
||||
},
|
||||
|
||||
/// Relay asks Host to open a local connection to `target` (Auth or World) for an incoming player connection.
|
||||
Connect {
|
||||
stream_id: u32,
|
||||
target: RelayTarget,
|
||||
token: String,
|
||||
},
|
||||
/// Host confirms local connection established.
|
||||
ConnectOk {
|
||||
stream_id: u32,
|
||||
},
|
||||
/// Connect failed.
|
||||
ConnectErr {
|
||||
stream_id: u32,
|
||||
error: String,
|
||||
},
|
||||
|
||||
/// Stream data chunk (base64 encoded).
|
||||
Data {
|
||||
stream_id: u32,
|
||||
chunk: String,
|
||||
},
|
||||
/// Stream clean half-close / EOF.
|
||||
Close {
|
||||
stream_id: u32,
|
||||
},
|
||||
/// Stream abrupt abort / error.
|
||||
Reset {
|
||||
stream_id: u32,
|
||||
},
|
||||
/// Keepalive ping.
|
||||
Ping,
|
||||
/// Keepalive pong.
|
||||
Pong,
|
||||
}
|
||||
|
||||
fn relay_input(realm: &RealmId, nonce: &str) -> Vec<u8> {
|
||||
format!(
|
||||
"coa-relay-host-v1\n{}\n{realm}\n{nonce}",
|
||||
RELAY_PROTOCOL_VERSION
|
||||
)
|
||||
.into_bytes()
|
||||
}
|
||||
|
||||
/// Create a signature over (realm_id, nonce) using the realm's signing key.
|
||||
pub fn sign_relay_challenge(key: &SigningKey, realm_id: &RealmId, nonce: &str) -> String {
|
||||
let sig: Signature = key.sign(&relay_input(realm_id, nonce));
|
||||
hex::encode(sig.to_bytes())
|
||||
}
|
||||
|
||||
/// Verify a signature over (realm_id, nonce) using the realm's verifying key.
|
||||
pub fn verify_relay_challenge(
|
||||
key: &VerifyingKey,
|
||||
realm_id: &RealmId,
|
||||
nonce: &str,
|
||||
sig_hex: &str,
|
||||
) -> bool {
|
||||
let Ok(sig_bytes) = hex::decode(sig_hex) else {
|
||||
return false;
|
||||
};
|
||||
let Ok(sig) = Signature::from_slice(&sig_bytes) else {
|
||||
return false;
|
||||
};
|
||||
key.verify_strict(&relay_input(realm_id, nonce), &sig)
|
||||
.is_ok()
|
||||
}
|
||||
|
||||
/// Rewrites the realm address in a WoW 3.3.5 REALM_LIST response packet (Opcode 0x10).
|
||||
///
|
||||
/// In WoW 3.3.5 client protocol:
|
||||
/// - Byte 0: 0x10 (REALM_LIST)
|
||||
/// - Bytes 1..2: uint16 LE payload length (total size after byte 2)
|
||||
/// - Bytes 3..6: uint32 LE unused (0)
|
||||
/// - Bytes 7..8: uint16 LE realm count
|
||||
/// - For each realm:
|
||||
/// - uint8 type (1 byte)
|
||||
/// - uint8 lock (1 byte)
|
||||
/// - uint8 flag (1 byte)
|
||||
/// - name: null-terminated C string
|
||||
/// - address: null-terminated C string ("host:port\0")
|
||||
/// - population: 4 bytes float
|
||||
/// - characters: 1 byte uint8
|
||||
/// - timezone: 1 byte uint8
|
||||
/// - realm_id: 1 byte uint8
|
||||
/// - if flag & 0x04 (SPECIFYBUILD): 5 bytes build info
|
||||
/// - Footer: 2 bytes (0x10, 0x00)
|
||||
///
|
||||
/// Replaces the address of the first realm (or matches) with `new_host_port` and adjusts
|
||||
/// the uint16 length at bytes 1..2 by the byte length delta.
|
||||
pub fn rewrite_realm_list_address(
|
||||
pkt: &[u8],
|
||||
new_host_port: &str,
|
||||
) -> Result<Option<Vec<u8>>, String> {
|
||||
if pkt.is_empty() || pkt[0] != 0x10 {
|
||||
return Ok(None);
|
||||
}
|
||||
if pkt.len() < 9 {
|
||||
return Err("packet too short for REALM_LIST header".into());
|
||||
}
|
||||
let body_len = u16::from_le_bytes([pkt[1], pkt[2]]) as usize;
|
||||
if pkt.len() < 3 + body_len {
|
||||
return Err("truncated REALM_LIST packet".into());
|
||||
}
|
||||
let realm_count = u16::from_le_bytes([pkt[7], pkt[8]]) as usize;
|
||||
if realm_count == 0 {
|
||||
return Ok(Some(pkt.to_vec()));
|
||||
}
|
||||
|
||||
let mut pos = 9;
|
||||
if pos + 3 > pkt.len() {
|
||||
return Err("malformed realm header".into());
|
||||
}
|
||||
pos += 3; // type, lock, flag
|
||||
|
||||
let name_end = pkt[pos..]
|
||||
.iter()
|
||||
.position(|&b| b == 0)
|
||||
.ok_or("unterminated realm name")?
|
||||
+ pos;
|
||||
pos = name_end + 1;
|
||||
|
||||
let addr_start = pos;
|
||||
let addr_end = pkt[pos..]
|
||||
.iter()
|
||||
.position(|&b| b == 0)
|
||||
.ok_or("unterminated realm address")?
|
||||
+ pos;
|
||||
let old_addr = &pkt[addr_start..addr_end];
|
||||
|
||||
if new_host_port.len() > 255 {
|
||||
return Err("new host:port exceeds maximum address length".into());
|
||||
}
|
||||
let diff = new_host_port.len() as isize - old_addr.len() as isize;
|
||||
let new_body_len_isize = body_len as isize + diff;
|
||||
if !(0..=u16::MAX as isize).contains(&new_body_len_isize) {
|
||||
return Err("adjusted body length out of bounds".into());
|
||||
}
|
||||
let new_body_len = new_body_len_isize as u16;
|
||||
|
||||
let mut out = Vec::with_capacity(pkt.len() + new_host_port.len() + 1);
|
||||
out.extend_from_slice(&pkt[..addr_start]);
|
||||
out.extend_from_slice(new_host_port.as_bytes());
|
||||
out.extend_from_slice(&pkt[addr_end..]);
|
||||
out[1..3].copy_from_slice(&new_body_len.to_le_bytes());
|
||||
|
||||
Ok(Some(out))
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn challenge_signature_roundtrip() {
|
||||
let seed = [42u8; 32];
|
||||
let key = SigningKey::from_bytes(&seed);
|
||||
|
||||
let realm = RealmId::new();
|
||||
let nonce = "test-challenge-nonce-123";
|
||||
|
||||
let sig = sign_relay_challenge(&key, &realm, nonce);
|
||||
assert!(verify_relay_challenge(
|
||||
&key.verifying_key(),
|
||||
&realm,
|
||||
nonce,
|
||||
&sig
|
||||
));
|
||||
|
||||
// Wrong nonce
|
||||
assert!(!verify_relay_challenge(
|
||||
&key.verifying_key(),
|
||||
&realm,
|
||||
"other-nonce",
|
||||
&sig
|
||||
));
|
||||
// Wrong realm
|
||||
assert!(!verify_relay_challenge(
|
||||
&key.verifying_key(),
|
||||
&RealmId::new(),
|
||||
nonce,
|
||||
&sig
|
||||
));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn rewrite_realm_list_address_works() {
|
||||
// Build a mock REALM_LIST packet for WoW 3.3.5
|
||||
let mut pkt = Vec::new();
|
||||
pkt.push(0x10); // Opcode
|
||||
pkt.extend_from_slice(&[0, 0]); // Placeholder for body_len
|
||||
pkt.extend_from_slice(&[0, 0, 0, 0]); // Unused uint32
|
||||
pkt.extend_from_slice(&1u16.to_le_bytes()); // Realm count = 1
|
||||
|
||||
// Realm 0
|
||||
pkt.push(1); // Type
|
||||
pkt.push(0); // Lock
|
||||
pkt.push(0); // Flags
|
||||
pkt.extend_from_slice(b"CoA Test Realm\0"); // Name
|
||||
pkt.extend_from_slice(b"127.0.0.1:8085\0"); // Old Address
|
||||
pkt.extend_from_slice(&0.5f32.to_le_bytes()); // Population
|
||||
pkt.push(1); // Characters
|
||||
pkt.push(1); // Timezone
|
||||
pkt.push(1); // Realm ID
|
||||
|
||||
// Footer
|
||||
pkt.push(0x10);
|
||||
pkt.push(0x00);
|
||||
|
||||
let body_len = (pkt.len() - 3) as u16;
|
||||
pkt[1..3].copy_from_slice(&body_len.to_le_bytes());
|
||||
|
||||
// Rewrite
|
||||
let new_target = "coa-manager.duckdns.org:40005";
|
||||
let res = rewrite_realm_list_address(&pkt, new_target)
|
||||
.unwrap()
|
||||
.expect("rewritten");
|
||||
|
||||
assert_eq!(res[0], 0x10);
|
||||
let new_len = u16::from_le_bytes([res[1], res[2]]) as usize;
|
||||
assert_eq!(res.len(), 3 + new_len);
|
||||
|
||||
// Address in res must be new_target
|
||||
let old_addr = b"127.0.0.1:8085";
|
||||
let new_addr = b"coa-manager.duckdns.org:40005";
|
||||
assert!(!res.windows(old_addr.len()).any(|w| w == old_addr));
|
||||
assert!(res.windows(new_addr.len()).any(|w| w == new_addr));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn non_realm_list_ignored() {
|
||||
let pkt = vec![0x00, 0x01, 0x02];
|
||||
assert_eq!(rewrite_realm_list_address(&pkt, "test:8085"), Ok(None));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,266 @@
|
||||
//! Adversarial, property and hostile-input fuzz tests for Phase 15.
|
||||
//! Verifies that malformed or malicious inputs never panic, integer operations
|
||||
//! do not wrap, allocations remain bounded, and invalid states fail closed.
|
||||
|
||||
use coa_control_proto::app::{
|
||||
decode_request, decode_response, encode_request, Request, MAX_TRANSFER_REQUEST_BYTES,
|
||||
};
|
||||
use coa_control_proto::coord::{
|
||||
parse_text, split_binary, Frame, ProbePayload, CONN_PREFIX, MAX_FRAME_BYTES,
|
||||
};
|
||||
use coa_control_proto::noise::{Initiator, Responder, CHUNK};
|
||||
use coa_control_proto::relay::{
|
||||
rewrite_realm_list_address, sign_relay_challenge, verify_relay_challenge, TunnelMsg,
|
||||
};
|
||||
use coa_registry_proto::sign::RealmId;
|
||||
use ed25519_dalek::SigningKey;
|
||||
use std::collections::BTreeMap;
|
||||
use uuid::Uuid;
|
||||
|
||||
#[test]
|
||||
fn test_cmd_realm_list_rewriter_adversarial_and_bounds() {
|
||||
let dummy_target = "127.0.0.1:8085";
|
||||
|
||||
// 1. Truncated inputs
|
||||
assert!(rewrite_realm_list_address(&[], dummy_target)
|
||||
.unwrap()
|
||||
.is_none());
|
||||
assert!(rewrite_realm_list_address(&[0x10], dummy_target).is_err());
|
||||
assert!(rewrite_realm_list_address(&[0x10, 0x05, 0x00], dummy_target).is_err());
|
||||
assert!(
|
||||
rewrite_realm_list_address(&[0x10, 0x10, 0x00, 0, 0, 0, 0, 1, 0], dummy_target).is_err()
|
||||
);
|
||||
|
||||
// 2. Non-0x10 opcodes ignored safely
|
||||
assert!(rewrite_realm_list_address(&[0x00, 0x01], dummy_target)
|
||||
.unwrap()
|
||||
.is_none());
|
||||
assert!(rewrite_realm_list_address(&[0xFF; 20], dummy_target)
|
||||
.unwrap()
|
||||
.is_none());
|
||||
|
||||
// 3. Zero realms handled safely
|
||||
let zero_realms = [
|
||||
0x10, // Opcode
|
||||
0x06, 0x00, // Length: 6 bytes follow
|
||||
0x00, 0x00, 0x00, 0x00, // Unused
|
||||
0x00, 0x00, // Realm count: 0
|
||||
];
|
||||
let res = rewrite_realm_list_address(&zero_realms, dummy_target).unwrap();
|
||||
assert_eq!(res.unwrap(), zero_realms);
|
||||
|
||||
// 4. Missing null terminators in realm string
|
||||
let unterminated_name = [
|
||||
0x10, 0x20, 0x00, 0, 0, 0, 0, 1, 0, // Header (count = 1)
|
||||
1, 0, 0, // type, lock, flag
|
||||
b'R', b'e', b'a', b'l', b'm', // no null byte!
|
||||
];
|
||||
assert!(rewrite_realm_list_address(&unterminated_name, dummy_target).is_err());
|
||||
|
||||
// 5. Excessive new address (> 255 bytes) rejected
|
||||
let giant_addr = "a".repeat(256);
|
||||
let valid_packet = make_valid_realm_list_pkt("1.2.3.4:1234");
|
||||
assert!(rewrite_realm_list_address(&valid_packet, &giant_addr).is_err());
|
||||
|
||||
// 6. Valid rewrite preserves packet structure
|
||||
let rewritten = rewrite_realm_list_address(&valid_packet, "99.88.77.66:30000")
|
||||
.unwrap()
|
||||
.unwrap();
|
||||
assert_eq!(rewritten[0], 0x10);
|
||||
let s = String::from_utf8_lossy(&rewritten);
|
||||
assert!(s.contains("99.88.77.66:30000"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_app_request_hostile_limits_and_validation() {
|
||||
// 1. Oversized control request (> 4096 bytes)
|
||||
let big_client = "A".repeat(5000);
|
||||
let big_hello = format!(r#"{{"op":"hello","protocol":1,"client":"{big_client}"}}"#);
|
||||
assert!(decode_request(big_hello.as_bytes()).is_err());
|
||||
|
||||
// 2. Unknown fields rejected
|
||||
let extra_field = r#"{"op":"claim","token":1,"unknown_admin_flag":true}"#;
|
||||
assert!(decode_request(extra_field.as_bytes()).is_err());
|
||||
|
||||
// 3. Giant collection count in TransferOffer rejected
|
||||
let mut collections = BTreeMap::new();
|
||||
for i in 0..1500 {
|
||||
collections.insert(format!("cat_{i}"), vec![1, 2, 3]);
|
||||
}
|
||||
let offer = Request::TransferOffer {
|
||||
transfer_id: Uuid::now_v7(),
|
||||
character_id: Uuid::now_v7(),
|
||||
canonical_revision: 1,
|
||||
content_hash: "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef".into(),
|
||||
total_size: 1024,
|
||||
collections,
|
||||
};
|
||||
let offer_bytes = encode_request(&offer);
|
||||
assert!(
|
||||
decode_request(&offer_bytes).is_err(),
|
||||
"offers with > 1000 categories must be rejected"
|
||||
);
|
||||
|
||||
// 4. Invalid content hash (not 64 hex chars)
|
||||
let bad_hash_offer = Request::TransferOffer {
|
||||
transfer_id: Uuid::now_v7(),
|
||||
character_id: Uuid::now_v7(),
|
||||
canonical_revision: 1,
|
||||
content_hash: "not_a_valid_hex_hash".into(),
|
||||
total_size: 1024,
|
||||
collections: BTreeMap::new(),
|
||||
};
|
||||
assert!(decode_request(&encode_request(&bad_hash_offer)).is_err());
|
||||
|
||||
// 5. TransferChunk offset out of bounds
|
||||
let bad_offset_chunk = Request::TransferChunk {
|
||||
transfer_id: Uuid::now_v7(),
|
||||
offset: MAX_TRANSFER_REQUEST_BYTES + 1,
|
||||
data: "abc".into(),
|
||||
};
|
||||
assert!(decode_request(&encode_request(&bad_offset_chunk)).is_err());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_coordinator_text_and_binary_adversarial() {
|
||||
// 1. Oversized text frame (> 2048 bytes)
|
||||
let giant_text = format!(
|
||||
r#"{{"t":"close","conn":1,"reason":"{}"}}"#,
|
||||
"x".repeat(3000)
|
||||
);
|
||||
assert!(parse_text(&giant_text).is_err());
|
||||
|
||||
// 2. Binary frame bounds
|
||||
assert!(split_binary(&[]).is_err());
|
||||
assert!(split_binary(&[0, 1, 2]).is_err()); // less than 4 bytes
|
||||
let max_allowed = vec![0u8; CONN_PREFIX + MAX_FRAME_BYTES];
|
||||
assert!(split_binary(&max_allowed).is_ok());
|
||||
let too_large = vec![0u8; CONN_PREFIX + MAX_FRAME_BYTES + 1];
|
||||
assert!(split_binary(&too_large).is_err());
|
||||
|
||||
// 3. ProbePayload unknown fields rejected
|
||||
let bad_probe = r#"{"ports":[8085],"admin":true}"#;
|
||||
assert!(serde_json::from_str::<ProbePayload>(bad_probe).is_err());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_noise_frame_reassembly_adversarial() {
|
||||
let (init, msg1) = Initiator::start().unwrap();
|
||||
let (resp, msg2) = Responder::start(&msg1).unwrap();
|
||||
let (msg3, mut client_chan) = init.finish(&msg2).unwrap();
|
||||
let mut server_chan = resp.finish(&msg3).unwrap();
|
||||
|
||||
// 1. Normal message seals and opens
|
||||
let frames = client_chan.seal(b"hello world").unwrap();
|
||||
assert_eq!(frames.len(), 1);
|
||||
let opened = server_chan.open_frame(&frames[0]).unwrap().unwrap();
|
||||
assert_eq!(opened, b"hello world");
|
||||
|
||||
// 2. Corrupted ciphertext ends/fails without panicking
|
||||
let mut corrupted = frames[0].clone();
|
||||
corrupted[10] ^= 0xFF;
|
||||
assert!(server_chan.open_frame(&corrupted).is_err());
|
||||
|
||||
// 3. Truncated frame (< 17 bytes)
|
||||
assert!(server_chan.open_frame(&[0u8; 16]).is_err());
|
||||
|
||||
// 4. Oversized frame (> CHUNK + 17)
|
||||
let giant_frame = vec![0u8; CHUNK + 18];
|
||||
assert!(server_chan.open_frame(&giant_frame).is_err());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_relay_protocol_adversarial() {
|
||||
let key = SigningKey::from_bytes(&[42u8; 32]);
|
||||
let realm_id = RealmId::new();
|
||||
let nonce = "challenge_nonce_12345";
|
||||
|
||||
let sig = sign_relay_challenge(&key, &realm_id, nonce);
|
||||
assert!(verify_relay_challenge(
|
||||
&key.verifying_key(),
|
||||
&realm_id,
|
||||
nonce,
|
||||
&sig
|
||||
));
|
||||
|
||||
// Tampered nonce
|
||||
assert!(!verify_relay_challenge(
|
||||
&key.verifying_key(),
|
||||
&realm_id,
|
||||
"different_nonce",
|
||||
&sig
|
||||
));
|
||||
// Tampered realm_id
|
||||
assert!(!verify_relay_challenge(
|
||||
&key.verifying_key(),
|
||||
&RealmId::new(),
|
||||
nonce,
|
||||
&sig
|
||||
));
|
||||
// Corrupted signature
|
||||
assert!(!verify_relay_challenge(
|
||||
&key.verifying_key(),
|
||||
&realm_id,
|
||||
nonce,
|
||||
"not_valid_hex"
|
||||
));
|
||||
|
||||
// TunnelMsg unknown fields rejected
|
||||
let bad_tunnel = r#"{"cmd":"close","stream_id":1,"extra":true}"#;
|
||||
assert!(serde_json::from_str::<TunnelMsg>(bad_tunnel).is_err());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_fuzz_smoke_never_panics_on_arbitrary_bytes() {
|
||||
// Deterministic pseudo-random bytes
|
||||
let mut seed: u64 = 0xDEADBEEFCAFEBABE;
|
||||
let mut next_bytes = |len: usize| -> Vec<u8> {
|
||||
let mut v = Vec::with_capacity(len);
|
||||
for _ in 0..len {
|
||||
seed = seed.wrapping_mul(6364136223846793005).wrapping_add(1);
|
||||
v.push((seed >> 33) as u8);
|
||||
}
|
||||
v
|
||||
};
|
||||
|
||||
for len in [0, 1, 2, 3, 4, 8, 16, 32, 64, 128, 256, 1024, 4096] {
|
||||
for _ in 0..50 {
|
||||
let sample = next_bytes(len);
|
||||
// Must not panic on any random input:
|
||||
let _ = decode_request(&sample);
|
||||
let _ = decode_response(&sample);
|
||||
let _ = split_binary(&sample);
|
||||
let _ = rewrite_realm_list_address(&sample, "127.0.0.1:8085");
|
||||
if let Ok(s) = std::str::from_utf8(&sample) {
|
||||
let _ = parse_text(s);
|
||||
let _ = serde_json::from_str::<TunnelMsg>(s);
|
||||
let _ = serde_json::from_str::<Frame>(s);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn make_valid_realm_list_pkt(addr: &str) -> Vec<u8> {
|
||||
let name = b"CoA Realm\0";
|
||||
let addr_bytes = format!("{addr}\0").into_bytes();
|
||||
let body_len = 4 + 2 + 3 + name.len() + addr_bytes.len() + 4 + 1 + 1 + 1 + 2;
|
||||
|
||||
let mut pkt = Vec::new();
|
||||
pkt.push(0x10); // Opcode
|
||||
pkt.extend_from_slice(&(body_len as u16).to_le_bytes()); // Length
|
||||
pkt.extend_from_slice(&0u32.to_le_bytes()); // Unused
|
||||
pkt.extend_from_slice(&1u16.to_le_bytes()); // Realm count = 1
|
||||
|
||||
// Realm info:
|
||||
pkt.extend_from_slice(&[1, 0, 0]); // type, lock, flag
|
||||
pkt.extend_from_slice(name);
|
||||
pkt.extend_from_slice(&addr_bytes);
|
||||
pkt.extend_from_slice(&[0, 0, 0, 0]); // pop
|
||||
pkt.extend_from_slice(&[0]); // chars
|
||||
pkt.extend_from_slice(&[1]); // timezone
|
||||
pkt.extend_from_slice(&[1]); // realm id
|
||||
|
||||
// Footer:
|
||||
pkt.extend_from_slice(&[0x10, 0x00]);
|
||||
pkt
|
||||
}
|
||||
@@ -10,7 +10,7 @@ serde_json = "1"
|
||||
sha2 = "0.10"
|
||||
hex = "0.4"
|
||||
thiserror = "2"
|
||||
uuid = { version = "1", features = ["v4", "serde"] }
|
||||
uuid = { version = "1", features = ["v4", "v7", "serde"] }
|
||||
chrono = { version = "0.4", default-features = false, features = ["clock", "serde", "std"] }
|
||||
dunce = "1"
|
||||
fs4 = "0.13"
|
||||
@@ -22,17 +22,22 @@ reqwest = { version = "0.12", default-features = false, features = ["blocking",
|
||||
tar = "0.4"
|
||||
num-bigint = "0.4"
|
||||
zip = { version = "2", default-features = false, features = ["deflate"] }
|
||||
flate2 = "1.0"
|
||||
sha1 = "0.10"
|
||||
tracing-subscriber = { version = "0.3", default-features = false, features = ["fmt", "std"] }
|
||||
tempfile = "3"
|
||||
rusqlite = { version = "0.40.2", features = ["bundled"] }
|
||||
if-addrs = "0.15"
|
||||
coa-registry-proto = { path = "../coa-registry-proto" }
|
||||
coa-control-proto = { path = "../coa-control-proto" }
|
||||
tungstenite = { version = "0.26", default-features = false, features = ["handshake", "native-tls"] }
|
||||
|
||||
[dev-dependencies]
|
||||
rand_core = { version = "0.6", features = ["getrandom"] }
|
||||
ed25519-dalek = { version = "2", features = ["rand_core"] }
|
||||
|
||||
[target.'cfg(windows)'.dependencies]
|
||||
windows-sys = { version = "0.60", features = ["Win32_Foundation", "Win32_Storage_FileSystem", "Win32_System_Threading", "Win32_System_SystemInformation", "Win32_System_Diagnostics_ToolHelp", "Win32_NetworkManagement_IpHelper", "Win32_Networking_WinSock"] }
|
||||
windows-sys = { version = "0.60", features = ["Win32_Foundation", "Win32_Storage_FileSystem", "Win32_System_Threading", "Win32_System_SystemInformation", "Win32_System_Diagnostics_ToolHelp", "Win32_NetworkManagement_IpHelper", "Win32_Networking_WinSock", "Win32_Security_Cryptography", "Win32_UI_Shell", "Win32_System_Registry", "Win32_UI_WindowsAndMessaging"] }
|
||||
|
||||
[features]
|
||||
testkit = []
|
||||
@@ -3,15 +3,37 @@ use coa_core::backup::{self, Kind, Trigger};
|
||||
use std::path::Path;
|
||||
|
||||
fn main() {
|
||||
let root = std::env::args().nth(1).expect("usage: backup_e2e <fixture folder>");
|
||||
assert!(root.to_lowercase().contains("fixture"), "refusing: not a fixture folder");
|
||||
let root = std::env::args()
|
||||
.nth(1)
|
||||
.expect("usage: backup_e2e <fixture folder>");
|
||||
assert!(
|
||||
root.to_lowercase().contains("fixture"),
|
||||
"refusing: not a fixture folder"
|
||||
);
|
||||
let root = Path::new(&root);
|
||||
let meta = coa_core::registry::metadata_dir_for(root).unwrap();
|
||||
std::fs::create_dir_all(&meta).unwrap();
|
||||
|
||||
let t = std::time::Instant::now();
|
||||
let point = backup::create(root, &meta, Kind::Quick, Trigger::Manual, Some("e2e".into()), &|s| println!(" .. {s}")).expect("backup");
|
||||
println!("quick backup {} in {:?}: {:?}", point.id, t.elapsed(), point.components.iter().map(|c| (&c.name, c.bytes, c.tables)).collect::<Vec<_>>());
|
||||
let point = backup::create(
|
||||
root,
|
||||
&meta,
|
||||
Kind::Quick,
|
||||
Trigger::Manual,
|
||||
Some("e2e".into()),
|
||||
&|s| println!(" .. {s}"),
|
||||
)
|
||||
.expect("backup");
|
||||
println!(
|
||||
"quick backup {} in {:?}: {:?}",
|
||||
point.id,
|
||||
t.elapsed(),
|
||||
point
|
||||
.components
|
||||
.iter()
|
||||
.map(|c| (&c.name, c.bytes, c.tables))
|
||||
.collect::<Vec<_>>()
|
||||
);
|
||||
assert!(backup::verify(&meta, &point.id).unwrap().ok);
|
||||
|
||||
// Change live state after the backup.
|
||||
@@ -23,22 +45,44 @@ fn main() {
|
||||
.unwrap();
|
||||
|
||||
let r = backup::restore_database(root, &meta, &point.id, "characters").expect("restore");
|
||||
println!("restored {} tables; previous database kept as {}; safety backup {}", r.tables_restored, r.previous_schema, r.safety_backup);
|
||||
println!(
|
||||
"restored {} tables; previous database kept as {}; safety backup {}",
|
||||
r.tables_restored, r.previous_schema, r.safety_backup
|
||||
);
|
||||
|
||||
backup::with_database(root, |db| {
|
||||
let live = db.tables("acore_characters")?;
|
||||
assert!(!live.contains(&"manager_marker".to_string()), "marker must be gone from the restored database");
|
||||
assert!(
|
||||
!live.contains(&"manager_marker".to_string()),
|
||||
"marker must be gone from the restored database"
|
||||
);
|
||||
let old = db.tables(&r.previous_schema)?;
|
||||
assert!(old.contains(&"manager_marker".to_string()), "the replaced database keeps the marker");
|
||||
assert_eq!(db.query(&format!("SELECT id FROM {}.manager_marker;", r.previous_schema))?, "42");
|
||||
assert!(
|
||||
old.contains(&"manager_marker".to_string()),
|
||||
"the replaced database keeps the marker"
|
||||
);
|
||||
assert_eq!(
|
||||
db.query(&format!(
|
||||
"SELECT id FROM {}.manager_marker;",
|
||||
r.previous_schema
|
||||
))?,
|
||||
"42"
|
||||
);
|
||||
assert_eq!(live.len(), r.tables_restored);
|
||||
println!("OK: live tables {}, old schema tables {}", live.len(), old.len());
|
||||
println!(
|
||||
"OK: live tables {}, old schema tables {}",
|
||||
live.len(),
|
||||
old.len()
|
||||
);
|
||||
Ok(())
|
||||
})
|
||||
.unwrap();
|
||||
|
||||
// A rejected restore (server "running" is simulated by a damaged backup) must change nothing.
|
||||
let victim = meta.join("backups").join(&point.id).join("characters.sql.zst");
|
||||
let victim = meta
|
||||
.join("backups")
|
||||
.join(&point.id)
|
||||
.join("characters.sql.zst");
|
||||
let mut bytes = std::fs::read(&victim).unwrap();
|
||||
bytes[10] ^= 0xFF;
|
||||
std::fs::write(&victim, bytes).unwrap();
|
||||
|
||||
@@ -7,25 +7,69 @@ use coa_core::download::{Cancel, HttpTransport};
|
||||
|
||||
fn main() {
|
||||
let full = clientdl::fetch_latest().expect("manifest");
|
||||
println!("version {} · {} files · {:.1} GB", full.version, full.files.len(), full.total_bytes() as f64 / 1e9);
|
||||
println!(
|
||||
"version {} · {} files · {:.1} GB",
|
||||
full.version,
|
||||
full.files.len(),
|
||||
full.total_bytes() as f64 / 1e9
|
||||
);
|
||||
let mut small = full.files.clone();
|
||||
small.sort_by_key(|f| f.size);
|
||||
let skip: usize = std::env::var("PROBE_SKIP").ok().and_then(|v| v.parse().ok()).unwrap_or(0);
|
||||
let skip: usize = std::env::var("PROBE_SKIP")
|
||||
.ok()
|
||||
.and_then(|v| v.parse().ok())
|
||||
.unwrap_or(0);
|
||||
let small: Vec<_> = small.into_iter().skip(skip).take(6).collect();
|
||||
let manifest = Manifest { version: full.version.clone(), published_at: None, files: small };
|
||||
let manifest = Manifest {
|
||||
version: full.version.clone(),
|
||||
published_at: None,
|
||||
files: small,
|
||||
};
|
||||
|
||||
let dir = std::env::temp_dir().join(format!("coa-client-probe-{}", std::process::id()));
|
||||
std::fs::create_dir_all(&dir).unwrap();
|
||||
let cancel = Cancel::default();
|
||||
let plan = clientdl::plan(&dir, &manifest, &Default::default(), &cancel, &|_| {}).unwrap();
|
||||
println!("plan: {} files, {} bytes", plan.items.len(), plan.download_bytes);
|
||||
println!(
|
||||
"plan: {} files, {} bytes",
|
||||
plan.items.len(),
|
||||
plan.download_bytes
|
||||
);
|
||||
let transport = HttpTransport::new().unwrap();
|
||||
clientdl::apply(
|
||||
&Apply { client: &dir, manifest: &manifest, plan: &plan, keep_modified: false, transport: &transport, objects_url: clientdl::OBJECTS_URL, cancel: &cancel },
|
||||
&|s| println!("{} {}/{} {}", s.phase, s.done, s.total, s.file.unwrap_or_default()),
|
||||
&Apply {
|
||||
client: &dir,
|
||||
manifest: &manifest,
|
||||
plan: &plan,
|
||||
keep_modified: false,
|
||||
transport: &transport,
|
||||
objects_url: clientdl::OBJECTS_URL,
|
||||
cancel: &cancel,
|
||||
},
|
||||
&|s| {
|
||||
println!(
|
||||
"{} {}/{} {}",
|
||||
s.phase,
|
||||
s.done,
|
||||
s.total,
|
||||
s.file.unwrap_or_default()
|
||||
)
|
||||
},
|
||||
)
|
||||
.expect("apply");
|
||||
let again = clientdl::plan(&dir, &manifest, &clientdl::load_state(&dir).unwrap(), &cancel, &|_| {}).unwrap();
|
||||
println!("second plan: {} to do, {} up to date, version {:?}", again.items.len(), again.up_to_date_files, clientdl::local(&dir).version);
|
||||
let again = clientdl::plan(
|
||||
&dir,
|
||||
&manifest,
|
||||
&clientdl::load_state(&dir).unwrap(),
|
||||
&cancel,
|
||||
&|_| {},
|
||||
)
|
||||
.unwrap();
|
||||
println!(
|
||||
"second plan: {} to do, {} up to date, version {:?}",
|
||||
again.items.len(),
|
||||
again.up_to_date_files,
|
||||
clientdl::local(&dir).version
|
||||
);
|
||||
std::fs::remove_dir_all(&dir).unwrap();
|
||||
}
|
||||
@@ -1,4 +1,8 @@
|
||||
fn main() {
|
||||
let p = std::env::args().nth(1).expect("client folder");
|
||||
println!("{}", serde_json::to_string_pretty(&coa_core::client::detect(std::path::Path::new(&p), None)).unwrap());
|
||||
println!(
|
||||
"{}",
|
||||
serde_json::to_string_pretty(&coa_core::client::detect(std::path::Path::new(&p), None))
|
||||
.unwrap()
|
||||
);
|
||||
}
|
||||
@@ -5,12 +5,24 @@ use coa_core::db::{Account, Db};
|
||||
fn main() {
|
||||
let a: Vec<String> = std::env::args().skip(1).collect();
|
||||
let root = std::path::PathBuf::from(&a[0]);
|
||||
assert!(a[0].to_lowercase().contains("installtest"), "refusing to touch a server that is not a disposable test install");
|
||||
assert!(
|
||||
a[0].to_lowercase().contains("installtest"),
|
||||
"refusing to touch a server that is not a disposable test install"
|
||||
);
|
||||
let count: u32 = a[1].parse().unwrap();
|
||||
let db = Db::from_repack(&root, Account::Admin).expect("db");
|
||||
println!("templates before: {}", coa_core::companions::template_count(&db).unwrap());
|
||||
println!("added: {}", coa_core::companions::ensure_templates(&db).unwrap());
|
||||
println!("templates after: {}", coa_core::companions::template_count(&db).unwrap());
|
||||
println!(
|
||||
"templates before: {}",
|
||||
coa_core::companions::template_count(&db).unwrap()
|
||||
);
|
||||
println!(
|
||||
"added: {}",
|
||||
coa_core::companions::ensure_templates(&db).unwrap()
|
||||
);
|
||||
println!(
|
||||
"templates after: {}",
|
||||
coa_core::companions::template_count(&db).unwrap()
|
||||
);
|
||||
let t = std::time::Instant::now();
|
||||
match coa_core::companions::offline_create(&root, &root.join("companions-e2e.log"), count) {
|
||||
Ok(tail) => println!("offline create ok in {:?}:\n{tail}", t.elapsed()),
|
||||
|
||||
@@ -3,12 +3,16 @@ use coa_core::config::{self, parser::ConfFile, Scope};
|
||||
use std::path::Path;
|
||||
|
||||
fn main() {
|
||||
let root = std::env::args().nth(1).expect("usage: config_check <server folder>");
|
||||
let root = std::env::args()
|
||||
.nth(1)
|
||||
.expect("usage: config_check <server folder>");
|
||||
let root = Path::new(&root);
|
||||
|
||||
let mut files = 0;
|
||||
for dir in ["Core/configs", "Core/configs/modules", "Settings"] {
|
||||
let Ok(rd) = std::fs::read_dir(root.join(dir)) else { continue };
|
||||
let Ok(rd) = std::fs::read_dir(root.join(dir)) else {
|
||||
continue;
|
||||
};
|
||||
for e in rd.flatten() {
|
||||
let p = e.path();
|
||||
let name = p.file_name().unwrap().to_string_lossy().to_lowercase();
|
||||
@@ -18,7 +22,12 @@ fn main() {
|
||||
let bytes = std::fs::read(&p).unwrap();
|
||||
match ConfFile::parse_bytes(&bytes) {
|
||||
Ok(c) => {
|
||||
assert_eq!(c.to_text().as_bytes(), &bytes[..], "round-trip mismatch: {}", p.display());
|
||||
assert_eq!(
|
||||
c.to_text().as_bytes(),
|
||||
&bytes[..],
|
||||
"round-trip mismatch: {}",
|
||||
p.display()
|
||||
);
|
||||
files += 1;
|
||||
}
|
||||
Err(e) => println!("skipped {}: {e}", p.display()),
|
||||
@@ -31,16 +40,34 @@ fn main() {
|
||||
match config::load(root, scope) {
|
||||
Ok(v) => {
|
||||
let present = v.settings.iter().filter(|s| s.present).count();
|
||||
let problems: Vec<_> = v.settings.iter().filter(|s| s.problem.is_some()).map(|s| (&s.meta.key, s.problem.clone().unwrap())).collect();
|
||||
let missing: Vec<_> = v.settings.iter().filter(|s| !s.present).map(|s| s.meta.key.as_str()).collect();
|
||||
let non_default = v.settings.iter().filter(|s| s.present && !s.is_default).count();
|
||||
let problems: Vec<_> = v
|
||||
.settings
|
||||
.iter()
|
||||
.filter(|s| s.problem.is_some())
|
||||
.map(|s| (&s.meta.key, s.problem.clone().unwrap()))
|
||||
.collect();
|
||||
let missing: Vec<_> = v
|
||||
.settings
|
||||
.iter()
|
||||
.filter(|s| !s.present)
|
||||
.map(|s| s.meta.key.as_str())
|
||||
.collect();
|
||||
let non_default = v
|
||||
.settings
|
||||
.iter()
|
||||
.filter(|s| s.present && !s.is_default)
|
||||
.count();
|
||||
println!(
|
||||
"{scope:?}: {} settings, {present} present, {non_default} non-default, {} unknown keys, drift {:?}\n problems {:?}\n missing {:?}",
|
||||
v.settings.len(), v.unknown_keys, v.drift_keys, problems, missing
|
||||
);
|
||||
for p in scope.presets() {
|
||||
let pv = config::preview_preset(root, scope, &p.id).unwrap();
|
||||
println!(" preset {:<14} would change {} settings", p.id, pv.changes.len());
|
||||
println!(
|
||||
" preset {:<14} would change {} settings",
|
||||
p.id,
|
||||
pv.changes.len()
|
||||
);
|
||||
}
|
||||
}
|
||||
Err(e) => println!("{scope:?}: {e}"),
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
use coa_core::{
|
||||
manifest::{Kind, Manifest},
|
||||
package::{self, BuildOptions},
|
||||
pkgsource::{self, Source},
|
||||
release, signing, Result,
|
||||
};
|
||||
use std::{fs, path::PathBuf};
|
||||
use coa_core::{manifest::{Kind, Manifest}, package::{self, BuildOptions}, pkgsource::{self, Source}, release, signing, Result};
|
||||
|
||||
fn main() -> Result<()> {
|
||||
let args: Vec<String> = std::env::args().skip(1).collect();
|
||||
@@ -9,30 +14,61 @@ fn main() -> Result<()> {
|
||||
if args[0] == "extract" {
|
||||
assert!(!tree.exists(), "Use a new release tree");
|
||||
package::extract(&PathBuf::from(&args[1]), &previous, &tree, &|_, _| {})?;
|
||||
println!("Verified and extracted {}: {} historical migrations", previous.version, previous.migrations.len());
|
||||
println!(
|
||||
"Verified and extracted {}: {} historical migrations",
|
||||
previous.version,
|
||||
previous.migrations.len()
|
||||
);
|
||||
return Ok(());
|
||||
}
|
||||
assert_eq!(args[0], "pack");
|
||||
let out = PathBuf::from(&args[3]);
|
||||
assert!(!out.exists(), "Release addresses must be immutable");
|
||||
for migration in &previous.migrations {
|
||||
let entry = previous.files.iter().find(|file| file.path.starts_with("_migrations/") && file.sha256 == migration.sha256).expect("Historical SQL entry");
|
||||
assert_eq!(coa_core::fsx::sha256_file(&tree.join(&entry.path))?, entry.sha256, "Historical SQL changed: {}", migration.id);
|
||||
let entry = previous
|
||||
.files
|
||||
.iter()
|
||||
.find(|file| file.path.starts_with("_migrations/") && file.sha256 == migration.sha256)
|
||||
.expect("Historical SQL entry");
|
||||
assert_eq!(
|
||||
coa_core::fsx::sha256_file(&tree.join(&entry.path))?,
|
||||
entry.sha256,
|
||||
"Historical SQL changed: {}",
|
||||
migration.id
|
||||
);
|
||||
}
|
||||
let mut manifest = package::build(&tree, &out, &BuildOptions {
|
||||
kind: Kind::Update, version: args[4].clone(), core_commit: Some(args[5].clone()),
|
||||
bots_commit: previous.bots.and_then(|revision| revision.commit),
|
||||
built_at: chrono::Utc::now().to_rfc3339(), part_size: package::DEFAULT_PART_SIZE,
|
||||
migrations: previous.migrations.clone(),
|
||||
}, &|line| println!("{line}"))?;
|
||||
let mut manifest = package::build(
|
||||
&tree,
|
||||
&out,
|
||||
&BuildOptions {
|
||||
kind: Kind::Update,
|
||||
version: args[4].clone(),
|
||||
core_commit: Some(args[5].clone()),
|
||||
bots_commit: previous.bots.and_then(|revision| revision.commit),
|
||||
built_at: chrono::Utc::now().to_rfc3339(),
|
||||
part_size: package::DEFAULT_PART_SIZE,
|
||||
migrations: previous.migrations.clone(),
|
||||
},
|
||||
&|line| println!("{line}"),
|
||||
)?;
|
||||
manifest.min_manager_version = "0.6.5".into();
|
||||
manifest.validate()?;
|
||||
coa_core::fsx::atomic_write(&out.join("manifest.json"), &serde_json::to_vec_pretty(&manifest)?)?;
|
||||
let key_path = PathBuf::from(std::env::var("USERPROFILE").unwrap()).join(".coa-manager/signing/manifest-signing.key");
|
||||
coa_core::fsx::atomic_write(
|
||||
&out.join("manifest.json"),
|
||||
&serde_json::to_vec_pretty(&manifest)?,
|
||||
)?;
|
||||
let key_path = PathBuf::from(std::env::var("USERPROFILE").unwrap())
|
||||
.join(".coa-manager/signing/manifest-signing.key");
|
||||
release::sign_manifest(&out, &fs::read_to_string(key_path)?)?;
|
||||
coa_core::release_schema::verify_package(&out, signing::EMBEDDED_PUBLIC_KEY)?;
|
||||
let reread: Manifest = serde_json::from_slice(&fs::read(out.join("manifest.json"))?)?;
|
||||
assert_eq!(serde_json::to_value(reread.migrations)?, serde_json::to_value(previous.migrations)?);
|
||||
println!("PASS: signed {}; all historical migration bytes, checksums, aliases and order preserved", manifest.version);
|
||||
assert_eq!(
|
||||
serde_json::to_value(reread.migrations)?,
|
||||
serde_json::to_value(previous.migrations)?
|
||||
);
|
||||
println!(
|
||||
"PASS: signed {}; all historical migration bytes, checksums, aliases and order preserved",
|
||||
manifest.version
|
||||
);
|
||||
Ok(())
|
||||
}
|
||||
@@ -1,64 +1,131 @@
|
||||
use std::path::{Path, PathBuf};
|
||||
use coa_core::{backup, driver, fsx, Result};
|
||||
use std::path::{Path, PathBuf};
|
||||
|
||||
fn set(root: &Path, filename: &str, values: &[(&str, &str)]) -> Result<()> {
|
||||
let path = root.join("Core/configs/modules").join(filename);
|
||||
let mut config = coa_core::config::parser::ConfFile::parse_bytes(&std::fs::read(&path)?)?;
|
||||
for (key, value) in values { config.set(key, value, &[]); }
|
||||
for (key, value) in values {
|
||||
config.set(key, value, &[]);
|
||||
}
|
||||
fsx::atomic_write(&path, config.to_text().as_bytes())
|
||||
}
|
||||
|
||||
fn ledgers(root: &Path) -> Result<Vec<String>> {
|
||||
backup::with_database(root, |db| ["acore_playerbots", "acore_world", "acore_characters"].into_iter()
|
||||
.map(|schema| db.query(&format!("SELECT path,sha256 FROM `{schema}`.coa_squid_migrations ORDER BY path;"))).collect())
|
||||
backup::with_database(root, |db| {
|
||||
["acore_playerbots", "acore_world", "acore_characters"]
|
||||
.into_iter()
|
||||
.map(|schema| {
|
||||
db.query(&format!(
|
||||
"SELECT path,sha256 FROM `{schema}`.coa_squid_migrations ORDER BY path;"
|
||||
))
|
||||
})
|
||||
.collect()
|
||||
})
|
||||
}
|
||||
|
||||
fn exercise(root: &Path) -> Result<()> {
|
||||
let meta = coa_core::registry::metadata_dir_for(root)?;
|
||||
let point = backup::create(root, &meta, backup::Kind::Full, backup::Trigger::Manual, Some("Disposable SQUID acceptance".into()), &|stage| println!("{stage}"))?;
|
||||
let point = backup::create(
|
||||
root,
|
||||
&meta,
|
||||
backup::Kind::Full,
|
||||
backup::Trigger::Manual,
|
||||
Some("Disposable SQUID acceptance".into()),
|
||||
&|stage| println!("{stage}"),
|
||||
)?;
|
||||
assert!(backup::verify(&meta, &point.id)?.ok);
|
||||
let result = std::panic::catch_unwind(std::panic::AssertUnwindSafe(|| -> Result<()> {
|
||||
backup::with_database(root, |db| db.query("DROP DATABASE IF EXISTS acore_playerbots;").map(|_| ()))?;
|
||||
assert!(driver::run(root, driver::Verb::StartAll)?.ok, "Disabled SQUID must start without its database");
|
||||
backup::with_database(root, |db| {
|
||||
db.query("DROP DATABASE IF EXISTS acore_playerbots;")
|
||||
.map(|_| ())
|
||||
})?;
|
||||
assert!(
|
||||
driver::run(root, driver::Verb::StartAll)?.ok,
|
||||
"Disabled SQUID must start without its database"
|
||||
);
|
||||
assert!(driver::run(root, driver::Verb::StopAll)?.ok);
|
||||
coa_core::multiworld::set_enabled(root, false)?;
|
||||
coa_core::realms::select(root, coa_core::realms::Mode::Coa)?;
|
||||
set(root, "mod_coa_playerbots.conf", &[("CoaBots.Enable", "0")])?;
|
||||
set(root, "playerbots.conf", &[("AiPlayerbot.Enabled", "1"), ("AiPlayerbot.RandomBotAutologin", "0"), ("AiPlayerbot.MinRandomBots", "0"), ("AiPlayerbot.MaxRandomBots", "0"), ("AiPlayerbot.RandomBotGuildCount", "0"), ("AiPlayerbot.RandomBotAccountCount", "0")])?;
|
||||
set(
|
||||
root,
|
||||
"playerbots.conf",
|
||||
&[
|
||||
("AiPlayerbot.Enabled", "1"),
|
||||
("AiPlayerbot.RandomBotAutologin", "0"),
|
||||
("AiPlayerbot.MinRandomBots", "0"),
|
||||
("AiPlayerbot.MaxRandomBots", "0"),
|
||||
("AiPlayerbot.RandomBotGuildCount", "0"),
|
||||
("AiPlayerbot.RandomBotAccountCount", "0"),
|
||||
],
|
||||
)?;
|
||||
let started = driver::run(root, driver::Verb::StartAll)?;
|
||||
assert!(started.ok, "Fresh SQUID startup: {}", coa_core::diag::redact(&started.output));
|
||||
assert!(
|
||||
started.ok,
|
||||
"Fresh SQUID startup: {}",
|
||||
coa_core::diag::redact(&started.output)
|
||||
);
|
||||
let before = ledgers(root)?;
|
||||
assert!(!before[0].is_empty(), "Fresh SQUID history missing");
|
||||
assert!(driver::run(root, driver::Verb::StopAll)?.ok);
|
||||
let started = driver::run(root, driver::Verb::StartAll)?;
|
||||
assert!(started.ok, "Repeated SQUID startup: {}", coa_core::diag::redact(&started.output));
|
||||
assert_eq!(ledgers(root)?, before, "SQUID replay changed its migration history");
|
||||
assert!(
|
||||
started.ok,
|
||||
"Repeated SQUID startup: {}",
|
||||
coa_core::diag::redact(&started.output)
|
||||
);
|
||||
assert_eq!(
|
||||
ledgers(root)?,
|
||||
before,
|
||||
"SQUID replay changed its migration history"
|
||||
);
|
||||
println!("PASS: SQUID-disabled dual startup without its database; fresh enabled SQUID import and startup; repeated startup preserves all three histories");
|
||||
Ok(())
|
||||
}));
|
||||
assert!(driver::run(root, driver::Verb::StopAll)?.ok);
|
||||
restore(root, &meta, &point)?;
|
||||
result.map_err(|_| coa_core::Error::Invalid("SQUID acceptance failed; disposable databases and configurations restored".into()))?
|
||||
result.map_err(|_| {
|
||||
coa_core::Error::Invalid(
|
||||
"SQUID acceptance failed; disposable databases and configurations restored".into(),
|
||||
)
|
||||
})?
|
||||
}
|
||||
|
||||
fn restore(root: &Path, meta: &Path, point: &backup::RecoveryPoint) -> Result<()> {
|
||||
assert!(backup::verify(meta, &point.id)?.ok);
|
||||
assert!(driver::run(root, driver::Verb::StopAll)?.ok);
|
||||
coa_core::realms::select(root, point.realm)?;
|
||||
for component in point.components.iter().filter(|component| component.name != "configs") {
|
||||
for component in point
|
||||
.components
|
||||
.iter()
|
||||
.filter(|component| component.name != "configs")
|
||||
{
|
||||
backup::restore_database(root, meta, &point.id, &component.name)?;
|
||||
}
|
||||
backup::restore_configs(root, meta, &point.id)?;
|
||||
assert!(driver::run(root, driver::Verb::StopAll)?.ok);
|
||||
println!("PASS: disposable SQUID acceptance databases and original realm configurations restored");
|
||||
println!(
|
||||
"PASS: disposable SQUID acceptance databases and original realm configurations restored"
|
||||
);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn main() -> Result<()> {
|
||||
let root = PathBuf::from(std::env::args().nth(1).unwrap());
|
||||
assert!(root.file_name().unwrap().to_string_lossy().starts_with("coa-schema-fixture-chaos-064-transition-"));
|
||||
assert_eq!(std::fs::read(root.join(".transition-fixture"))?, b"disposable published-064 transition fixture");
|
||||
assert!(!root.join("Data").symlink_metadata()?.file_type().is_symlink());
|
||||
assert!(root
|
||||
.file_name()
|
||||
.unwrap()
|
||||
.to_string_lossy()
|
||||
.starts_with("coa-schema-fixture-chaos-064-transition-"));
|
||||
assert_eq!(
|
||||
std::fs::read(root.join(".transition-fixture"))?,
|
||||
b"disposable published-064 transition fixture"
|
||||
);
|
||||
assert!(!root
|
||||
.join("Data")
|
||||
.symlink_metadata()?
|
||||
.file_type()
|
||||
.is_symlink());
|
||||
assert!(driver::run(&root, driver::Verb::StopAll)?.ok);
|
||||
if let Some(id) = std::env::args().nth(2) {
|
||||
let meta = coa_core::registry::metadata_dir_for(&root)?;
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
use coa_core::{
|
||||
backup, driver,
|
||||
registry::MetaDir,
|
||||
update::{self, RepackEnv},
|
||||
Result,
|
||||
};
|
||||
use std::{collections::BTreeMap, path::PathBuf};
|
||||
use coa_core::{backup, driver, registry::MetaDir, update::{self, RepackEnv}, Result};
|
||||
|
||||
fn players(db: &coa_core::db::Db) -> Result<String> {
|
||||
db.query("SELECT CONCAT(id,':',username,':',HEX(salt),':',HEX(verifier)) FROM acore_auth.account WHERE id=900001; SELECT CONCAT(guid,':',account,':',name,':',level,':',money) FROM acore_characters.characters WHERE guid=900001; SELECT CONCAT(guid,':',itemEntry,':',owner_guid,':',enchantments) FROM acore_characters.item_instance WHERE guid=900001; SELECT CONCAT(guid,':',bag,':',slot,':',item) FROM acore_characters.character_inventory WHERE guid=900001;")
|
||||
@@ -8,22 +13,73 @@ fn players(db: &coa_core::db::Db) -> Result<String> {
|
||||
fn exercise(root: &std::path::Path, package: &str) -> Result<()> {
|
||||
let meta_dir = coa_core::registry::metadata_dir_for(root)?;
|
||||
let (_, meta) = MetaDir::open(&meta_dir)?;
|
||||
let expected = backup::with_database(root, |db| [coa_core::realms::Mode::Coa, coa_core::realms::Mode::Wildcard].into_iter().map(|mode| players(&db.clone().for_realm(mode))).collect::<Result<Vec<_>>>())?;
|
||||
let expected = backup::with_database(root, |db| {
|
||||
[
|
||||
coa_core::realms::Mode::Coa,
|
||||
coa_core::realms::Mode::Wildcard,
|
||||
]
|
||||
.into_iter()
|
||||
.map(|mode| players(&db.clone().for_realm(mode)))
|
||||
.collect::<Result<Vec<_>>>()
|
||||
})?;
|
||||
assert!(driver::run(root, driver::Verb::StopAll)?.ok);
|
||||
let source = coa_core::pkgsource::Source::Dir(package.into());
|
||||
let preview = update::preview(root, &meta, &source, coa_core::signing::EMBEDDED_PUBLIC_KEY, &BTreeMap::new())?;
|
||||
assert_eq!(preview.pending_migrations, 0, "Historical SQL must not replay");
|
||||
assert!(!preview.items.iter().any(|item| item.action == update::Action::Conflict), "Unresolved candidate files: {:?}", preview.items);
|
||||
let environment = RepackEnv { root, meta_dir: &meta_dir };
|
||||
let outcome = update::apply(&update::Params {
|
||||
root, meta_dir: &meta_dir, source, trusted_key: coa_core::signing::EMBEDDED_PUBLIC_KEY,
|
||||
resolutions: BTreeMap::new(), cancel: Default::default(), env: &environment, fail_after_ops: None,
|
||||
}, &|stage, progress| println!("{progress}% {stage}"))?;
|
||||
assert_eq!(outcome.txn.state, update::State::Committed, "{:?}", outcome.txn);
|
||||
let preview = update::preview(
|
||||
root,
|
||||
&meta,
|
||||
&source,
|
||||
coa_core::signing::EMBEDDED_PUBLIC_KEY,
|
||||
&BTreeMap::new(),
|
||||
)?;
|
||||
assert_eq!(
|
||||
preview.pending_migrations, 0,
|
||||
"Historical SQL must not replay"
|
||||
);
|
||||
assert!(
|
||||
!preview
|
||||
.items
|
||||
.iter()
|
||||
.any(|item| item.action == update::Action::Conflict),
|
||||
"Unresolved candidate files: {:?}",
|
||||
preview.items
|
||||
);
|
||||
let environment = RepackEnv {
|
||||
root,
|
||||
meta_dir: &meta_dir,
|
||||
};
|
||||
let outcome = update::apply(
|
||||
&update::Params {
|
||||
root,
|
||||
meta_dir: &meta_dir,
|
||||
source,
|
||||
trusted_key: coa_core::signing::EMBEDDED_PUBLIC_KEY,
|
||||
resolutions: BTreeMap::new(),
|
||||
cancel: Default::default(),
|
||||
env: &environment,
|
||||
fail_after_ops: None,
|
||||
},
|
||||
&|stage, progress| println!("{progress}% {stage}"),
|
||||
)?;
|
||||
assert_eq!(
|
||||
outcome.txn.state,
|
||||
update::State::Committed,
|
||||
"{:?}",
|
||||
outcome.txn
|
||||
);
|
||||
backup::with_database(root, |db| {
|
||||
for (index, mode) in [coa_core::realms::Mode::Coa, coa_core::realms::Mode::Wildcard].into_iter().enumerate() {
|
||||
for (index, mode) in [
|
||||
coa_core::realms::Mode::Coa,
|
||||
coa_core::realms::Mode::Wildcard,
|
||||
]
|
||||
.into_iter()
|
||||
.enumerate()
|
||||
{
|
||||
let realm = db.clone().for_realm(mode);
|
||||
assert_eq!(players(&realm)?, expected[index], "Player data changed in {mode:?}");
|
||||
assert_eq!(
|
||||
players(&realm)?,
|
||||
expected[index],
|
||||
"Player data changed in {mode:?}"
|
||||
);
|
||||
let problems = coa_core::schema_check::check(&realm, root)?;
|
||||
assert!(problems.is_empty(), "{problems:?}");
|
||||
}
|
||||
@@ -33,9 +89,22 @@ fn exercise(root: &std::path::Path, package: &str) -> Result<()> {
|
||||
println!("SQUID metadata: {release:?}");
|
||||
assert_eq!(coa_core::squid::fields(root)?.len(), 40);
|
||||
let (_, installed) = MetaDir::open(&meta_dir)?;
|
||||
let repeated = update::preview(root, &installed, &coa_core::pkgsource::Source::Dir(package.into()), coa_core::signing::EMBEDDED_PUBLIC_KEY, &BTreeMap::new())?;
|
||||
let repeated = update::preview(
|
||||
root,
|
||||
&installed,
|
||||
&coa_core::pkgsource::Source::Dir(package.into()),
|
||||
coa_core::signing::EMBEDDED_PUBLIC_KEY,
|
||||
&BTreeMap::new(),
|
||||
)?;
|
||||
assert_eq!(repeated.pending_migrations, 0);
|
||||
assert!(repeated.items.iter().all(|item| item.action == update::Action::Skip), "{:?}", repeated.items);
|
||||
assert!(
|
||||
repeated
|
||||
.items
|
||||
.iter()
|
||||
.all(|item| item.action == update::Action::Skip),
|
||||
"{:?}",
|
||||
repeated.items
|
||||
);
|
||||
println!("PASS: coordinated update committed, both realms started, player fields preserved, historical SQL skipped, repeated preview clean");
|
||||
Ok(())
|
||||
}
|
||||
@@ -43,12 +112,30 @@ fn exercise(root: &std::path::Path, package: &str) -> Result<()> {
|
||||
fn main() -> Result<()> {
|
||||
let args: Vec<String> = std::env::args().skip(1).collect();
|
||||
let root = PathBuf::from(&args[0]);
|
||||
assert!(root.file_name().unwrap().to_string_lossy().starts_with("coa-schema-fixture-chaos-064-transition-"));
|
||||
assert_eq!(std::fs::read(root.join(".transition-fixture"))?, b"disposable published-064 transition fixture");
|
||||
assert_eq!(std::fs::read(root.join(".release-schema-fixture"))?, b"disposable release-schema fixture");
|
||||
assert!(!root.join("Data").symlink_metadata()?.file_type().is_symlink());
|
||||
assert!(root
|
||||
.file_name()
|
||||
.unwrap()
|
||||
.to_string_lossy()
|
||||
.starts_with("coa-schema-fixture-chaos-064-transition-"));
|
||||
assert_eq!(
|
||||
std::fs::read(root.join(".transition-fixture"))?,
|
||||
b"disposable published-064 transition fixture"
|
||||
);
|
||||
assert_eq!(
|
||||
std::fs::read(root.join(".release-schema-fixture"))?,
|
||||
b"disposable release-schema fixture"
|
||||
);
|
||||
assert!(!root
|
||||
.join("Data")
|
||||
.symlink_metadata()?
|
||||
.file_type()
|
||||
.is_symlink());
|
||||
assert!(driver::run(&root, driver::Verb::StopAll)?.ok);
|
||||
let outcome = std::panic::catch_unwind(std::panic::AssertUnwindSafe(|| exercise(&root, &args[1])));
|
||||
assert!(driver::run(&root, driver::Verb::StopAll)?.ok, "Fixture shutdown failed");
|
||||
let outcome =
|
||||
std::panic::catch_unwind(std::panic::AssertUnwindSafe(|| exercise(&root, &args[1])));
|
||||
assert!(
|
||||
driver::run(&root, driver::Verb::StopAll)?.ok,
|
||||
"Fixture shutdown failed"
|
||||
);
|
||||
outcome.map_err(|_| coa_core::Error::Invalid("Disposable coordinated acceptance failed; stopped services and retained recovery copies".into()))?
|
||||
}
|
||||
@@ -1,7 +1,14 @@
|
||||
fn main() {
|
||||
let a: Vec<String> = std::env::args().skip(1).collect();
|
||||
let job = coa_core::download::Job { url: a[0].clone(), dest: a[1].clone().into(), sha256: a[2].clone(), size: a[3].parse().unwrap() };
|
||||
let job = coa_core::download::Job {
|
||||
url: a[0].clone(),
|
||||
dest: a[1].clone().into(),
|
||||
sha256: a[2].clone(),
|
||||
size: a[3].parse().unwrap(),
|
||||
};
|
||||
let t = std::time::Instant::now();
|
||||
let r = coa_core::download::fetch(&job, &Default::default(), &|p| eprintln!("{}/{}", p.downloaded, p.total));
|
||||
let r = coa_core::download::fetch(&job, &Default::default(), &|p| {
|
||||
eprintln!("{}/{}", p.downloaded, p.total)
|
||||
});
|
||||
println!("{r:?} in {:?}", t.elapsed());
|
||||
}
|
||||
@@ -9,13 +9,35 @@ use std::path::PathBuf;
|
||||
|
||||
fn main() {
|
||||
let a: Vec<String> = std::env::args().skip(1).collect();
|
||||
assert!(a.len() == 4, "usage: docker_install <package folder> <destination> <game data folder> <public key>");
|
||||
assert!(
|
||||
a.len() == 4,
|
||||
"usage: docker_install <package folder> <destination> <game data folder> <public key>"
|
||||
);
|
||||
let registry = Registry::at(std::env::temp_dir().join("coa-docker-install/installs.json"));
|
||||
let t = std::time::Instant::now();
|
||||
let done = install(
|
||||
&Params { source: Source::Dir(PathBuf::from(&a[0])), dest: PathBuf::from(&a[1]), data_dir: PathBuf::from(&a[2]), trusted_key: &a[3], registry: ®istry, cancel: Cancel::default() },
|
||||
&|s| eprintln!(" {:>3}% {} {}", s.percent, s.step, s.detail.unwrap_or_default()),
|
||||
&Params {
|
||||
source: Source::Dir(PathBuf::from(&a[0])),
|
||||
dest: PathBuf::from(&a[1]),
|
||||
data_dir: PathBuf::from(&a[2]),
|
||||
trusted_key: &a[3],
|
||||
registry: ®istry,
|
||||
cancel: Cancel::default(),
|
||||
},
|
||||
&|s| {
|
||||
eprintln!(
|
||||
" {:>3}% {} {}",
|
||||
s.percent,
|
||||
s.step,
|
||||
s.detail.unwrap_or_default()
|
||||
)
|
||||
},
|
||||
)
|
||||
.unwrap_or_else(|e| panic!("install failed: {e}"));
|
||||
println!("installed {} at {} in {:?}", done.version, done.path, t.elapsed());
|
||||
println!(
|
||||
"installed {} at {} in {:?}",
|
||||
done.version,
|
||||
done.path,
|
||||
t.elapsed()
|
||||
);
|
||||
}
|
||||
@@ -2,7 +2,9 @@ use std::path::Path;
|
||||
|
||||
fn main() {
|
||||
let mut args = std::env::args().skip(1);
|
||||
let root = args.next().expect("usage: drive <server folder> <start|stop>");
|
||||
let root = args
|
||||
.next()
|
||||
.expect("usage: drive <server folder> <start|stop>");
|
||||
let verb = match args.next().as_deref() {
|
||||
Some("start") => coa_core::driver::Verb::StartAll,
|
||||
Some("mysql") => coa_core::driver::Verb::StartMysql,
|
||||
|
||||
@@ -1,11 +1,27 @@
|
||||
//! Verify published checksum compatibility on a disposable real database, without running SQL migrations.
|
||||
use std::{path::{Path, PathBuf}, sync::atomic::{AtomicUsize, Ordering}};
|
||||
use coa_core::{backup, db::Db, migrations::{self, LedgerRow, Status, Store}, pkgsource::{self, Source}, Result};
|
||||
use coa_core::{
|
||||
backup,
|
||||
db::Db,
|
||||
migrations::{self, LedgerRow, Status, Store},
|
||||
pkgsource::{self, Source},
|
||||
Result,
|
||||
};
|
||||
use std::{
|
||||
path::{Path, PathBuf},
|
||||
sync::atomic::{AtomicUsize, Ordering},
|
||||
};
|
||||
|
||||
struct Observed<'a> { db: &'a Db, executions: AtomicUsize }
|
||||
struct Observed<'a> {
|
||||
db: &'a Db,
|
||||
executions: AtomicUsize,
|
||||
}
|
||||
impl Store for Observed<'_> {
|
||||
fn load(&self) -> Result<Vec<LedgerRow>> { self.db.load() }
|
||||
fn put(&self, row: &LedgerRow) -> Result<()> { self.db.put(row) }
|
||||
fn load(&self) -> Result<Vec<LedgerRow>> {
|
||||
self.db.load()
|
||||
}
|
||||
fn put(&self, row: &LedgerRow) -> Result<()> {
|
||||
self.db.put(row)
|
||||
}
|
||||
fn run_file(&self, _: &str, _: &Path) -> Result<()> {
|
||||
self.executions.fetch_add(1, Ordering::SeqCst);
|
||||
panic!("Historical SQL must never be replayed");
|
||||
@@ -15,62 +31,149 @@ impl Store for Observed<'_> {
|
||||
fn main() -> Result<()> {
|
||||
let args: Vec<_> = std::env::args().skip(1).collect();
|
||||
let root = PathBuf::from(&args[0]);
|
||||
assert!(root.file_name().unwrap().to_string_lossy().starts_with("coa-schema-fixture-chaos-"));
|
||||
assert_eq!(std::fs::read(root.join(".coa-chaos-fixture"))?, b"disposable update chaos fixture");
|
||||
assert_eq!(std::fs::read(root.join(".release-schema-fixture"))?, b"disposable release-schema fixture");
|
||||
assert!(root
|
||||
.file_name()
|
||||
.unwrap()
|
||||
.to_string_lossy()
|
||||
.starts_with("coa-schema-fixture-chaos-"));
|
||||
assert_eq!(
|
||||
std::fs::read(root.join(".coa-chaos-fixture"))?,
|
||||
b"disposable update chaos fixture"
|
||||
);
|
||||
assert_eq!(
|
||||
std::fs::read(root.join(".release-schema-fixture"))?,
|
||||
b"disposable release-schema fixture"
|
||||
);
|
||||
let source = Source::Dir(PathBuf::from(&args[1]));
|
||||
let package = pkgsource::fetch_manifest(&source, coa_core::signing::EMBEDDED_PUBLIC_KEY)?.0;
|
||||
let staging = tempfile::tempdir()?;
|
||||
let parts = pkgsource::fetch_parts(&source, &package, &staging.path().join("download"), &Default::default(), &|_, _| {})?;
|
||||
let parts = pkgsource::fetch_parts(
|
||||
&source,
|
||||
&package,
|
||||
&staging.path().join("download"),
|
||||
&Default::default(),
|
||||
&|_, _| {},
|
||||
)?;
|
||||
coa_core::package::extract(&parts, &package, &staging.path().join("tree"), &|_, _| {})?;
|
||||
migrations::verify_files(&package.migrations, &staging.path().join("tree/_migrations"))?;
|
||||
println!("PASS: all {} signed-package SQL artifacts verified before any database mutation", package.migrations.len());
|
||||
let migration = package.migrations.iter().find(|m| m.id == "manager_repair__20261005_missing_wildcard_tables").unwrap();
|
||||
let hashes = ["c1d8dbf2271234283a48a39e4b4aea1106b83b70581f1e3c4aa9fff438e8e4d2", "9e4a36245c3f83255415c122c01f08ceb3e3b83898d3d427ac4e2fbcf61e9638"];
|
||||
for hash in hashes { assert!(migration.sha256 == hash || migration.compatible_sha256.iter().any(|h| h == hash)); }
|
||||
migrations::verify_files(
|
||||
&package.migrations,
|
||||
&staging.path().join("tree/_migrations"),
|
||||
)?;
|
||||
println!(
|
||||
"PASS: all {} signed-package SQL artifacts verified before any database mutation",
|
||||
package.migrations.len()
|
||||
);
|
||||
let migration = package
|
||||
.migrations
|
||||
.iter()
|
||||
.find(|m| m.id == "manager_repair__20261005_missing_wildcard_tables")
|
||||
.unwrap();
|
||||
let hashes = [
|
||||
"c1d8dbf2271234283a48a39e4b4aea1106b83b70581f1e3c4aa9fff438e8e4d2",
|
||||
"9e4a36245c3f83255415c122c01f08ceb3e3b83898d3d427ac4e2fbcf61e9638",
|
||||
];
|
||||
for hash in hashes {
|
||||
assert!(migration.sha256 == hash || migration.compatible_sha256.iter().any(|h| h == hash));
|
||||
}
|
||||
let fixture_meta = coa_core::registry::metadata_dir_for(&root)?;
|
||||
let test_meta = tempfile::tempdir()?;
|
||||
coa_core::fsx::atomic_write(&test_meta.path().join("install.json"), &std::fs::read(fixture_meta.join("install.json"))?)?;
|
||||
coa_core::fsx::atomic_write(
|
||||
&test_meta.path().join("install.json"),
|
||||
&std::fs::read(fixture_meta.join("install.json"))?,
|
||||
)?;
|
||||
coa_core::registry::MetaDir::open(test_meta.path())?;
|
||||
std::fs::create_dir_all(test_meta.path().join("updates"))?;
|
||||
let result = backup::with_database(&root, |db| {
|
||||
let mut modes = vec![coa_core::realms::Mode::Coa];
|
||||
if coa_core::realms::state(&root)?.wildcard_created { modes.push(coa_core::realms::Mode::Wildcard); }
|
||||
if coa_core::realms::state(&root)?.wildcard_created {
|
||||
modes.push(coa_core::realms::Mode::Wildcard);
|
||||
}
|
||||
for mode in modes {
|
||||
let db = db.clone().for_realm(mode);
|
||||
let saved = db.load()?.into_iter().find(|row| row.id == migration.id && row.db == migration.db).expect("Published repair must already be applied");
|
||||
let saved = db
|
||||
.load()?
|
||||
.into_iter()
|
||||
.find(|row| row.id == migration.id && row.db == migration.db)
|
||||
.expect("Published repair must already be applied");
|
||||
assert_eq!(saved.status, Status::Applied);
|
||||
let counts = db.query("SELECT CONCAT((SELECT COUNT(*) FROM acore_characters.characters),':',(SELECT COUNT(*) FROM acore_characters.item_instance),':',(SELECT COUNT(*) FROM acore_auth.account));")?;
|
||||
let check = || -> Result<()> {
|
||||
for hash in hashes {
|
||||
db.put(&LedgerRow { sha256: hash.into(), ..saved.clone() })?;
|
||||
let observed = Observed { db: &db, executions: AtomicUsize::new(0) };
|
||||
db.put(&LedgerRow {
|
||||
sha256: hash.into(),
|
||||
..saved.clone()
|
||||
})?;
|
||||
let observed = Observed {
|
||||
db: &db,
|
||||
executions: AtomicUsize::new(0),
|
||||
};
|
||||
migrations::preflight(&db, std::slice::from_ref(migration))?;
|
||||
let report = migrations::apply_pending(&observed, std::slice::from_ref(migration), &root.join(".unused-hotfix-sql"), &|| panic!("Already applied SQL needs no snapshot"))?;
|
||||
let report = migrations::apply_pending(
|
||||
&observed,
|
||||
std::slice::from_ref(migration),
|
||||
&root.join(".unused-hotfix-sql"),
|
||||
&|| panic!("Already applied SQL needs no snapshot"),
|
||||
)?;
|
||||
assert!(report.applied.is_empty());
|
||||
assert_eq!(observed.executions.load(Ordering::SeqCst), 0);
|
||||
assert_eq!(db.load()?.into_iter().find(|r| r.id == migration.id && r.db == migration.db).unwrap().sha256, hash);
|
||||
assert_eq!(
|
||||
db.load()?
|
||||
.into_iter()
|
||||
.find(|r| r.id == migration.id && r.db == migration.db)
|
||||
.unwrap()
|
||||
.sha256,
|
||||
hash
|
||||
);
|
||||
}
|
||||
let meta = test_meta.path();
|
||||
let file_hash = coa_core::fsx::sha256_file(&root.join("Core/worldserver.exe"))?;
|
||||
let install_hash = coa_core::fsx::sha256_file(&meta.join("install.json"))?;
|
||||
let transaction_count = std::fs::read_dir(meta.join("updates"))?.count();
|
||||
for status in [Status::Running, Status::Failed] {
|
||||
db.put(&LedgerRow { status, ..saved.clone() })?;
|
||||
let env = coa_core::update::RepackEnv { root: &root, meta_dir: meta };
|
||||
let rejected = coa_core::update::apply(&coa_core::update::Params {
|
||||
root: &root, meta_dir: meta, source: Source::Dir(PathBuf::from(&args[1])),
|
||||
trusted_key: coa_core::signing::EMBEDDED_PUBLIC_KEY, cancel: Default::default(),
|
||||
resolutions: Default::default(), env: &env, fail_after_ops: None,
|
||||
}, &|_, _| {});
|
||||
db.put(&LedgerRow {
|
||||
status,
|
||||
..saved.clone()
|
||||
})?;
|
||||
let env = coa_core::update::RepackEnv {
|
||||
root: &root,
|
||||
meta_dir: meta,
|
||||
};
|
||||
let rejected = coa_core::update::apply(
|
||||
&coa_core::update::Params {
|
||||
root: &root,
|
||||
meta_dir: meta,
|
||||
source: Source::Dir(PathBuf::from(&args[1])),
|
||||
trusted_key: coa_core::signing::EMBEDDED_PUBLIC_KEY,
|
||||
cancel: Default::default(),
|
||||
resolutions: Default::default(),
|
||||
env: &env,
|
||||
fail_after_ops: None,
|
||||
},
|
||||
&|_, _| {},
|
||||
);
|
||||
let message = rejected.unwrap_err().to_string();
|
||||
assert!(message.contains("partially applied"), "Unexpected rejection: {message}");
|
||||
assert_eq!(std::fs::read_dir(meta.join("updates"))?.count(), transaction_count);
|
||||
assert_eq!(coa_core::fsx::sha256_file(&root.join("Core/worldserver.exe"))?, file_hash);
|
||||
assert_eq!(coa_core::fsx::sha256_file(&meta.join("install.json"))?, install_hash);
|
||||
assert!(
|
||||
message.contains("partially applied"),
|
||||
"Unexpected rejection: {message}"
|
||||
);
|
||||
assert_eq!(
|
||||
std::fs::read_dir(meta.join("updates"))?.count(),
|
||||
transaction_count
|
||||
);
|
||||
assert_eq!(
|
||||
coa_core::fsx::sha256_file(&root.join("Core/worldserver.exe"))?,
|
||||
file_hash
|
||||
);
|
||||
assert_eq!(
|
||||
coa_core::fsx::sha256_file(&meta.join("install.json"))?,
|
||||
install_hash
|
||||
);
|
||||
}
|
||||
db.put(&saved)?;
|
||||
let env = coa_core::update::RepackEnv { root: &root, meta_dir: meta };
|
||||
let env = coa_core::update::RepackEnv {
|
||||
root: &root,
|
||||
meta_dir: meta,
|
||||
};
|
||||
let pending_before = env.pending_migrations(&package)?;
|
||||
db.query("DELETE FROM acore_world.coa_manager_migrations WHERE db='characters' AND id='manager_repair__20261005_missing_wildcard_tables';")?;
|
||||
assert_eq!(env.pending_migrations(&package)?, pending_before + 1,
|
||||
@@ -81,7 +184,12 @@ fn main() -> Result<()> {
|
||||
};
|
||||
let result = std::panic::catch_unwind(std::panic::AssertUnwindSafe(check));
|
||||
db.put(&saved)?;
|
||||
result.map_err(|_| coa_core::Error::Invalid("History regression assertion failed; the injected ledger row was restored.".into()))??;
|
||||
result.map_err(|_| {
|
||||
coa_core::Error::Invalid(
|
||||
"History regression assertion failed; the injected ledger row was restored."
|
||||
.into(),
|
||||
)
|
||||
})??;
|
||||
assert_eq!(db.query("SELECT CONCAT((SELECT COUNT(*) FROM acore_characters.characters),':',(SELECT COUNT(*) FROM acore_characters.item_instance),':',(SELECT COUNT(*) FROM acore_auth.account));")?, counts);
|
||||
println!("PASS: {} published checksums; Running/Failed rejected before staging; missing migration counted; zero SQL replays; history and player counts preserved", mode.name());
|
||||
}
|
||||
|
||||
@@ -1,16 +1,43 @@
|
||||
//! Read-only update preview against the marked disposable acceptance fixture.
|
||||
use std::{collections::BTreeMap,path::PathBuf};
|
||||
fn main()->coa_core::Result<()> {
|
||||
let args:Vec<_>=std::env::args().skip(1).collect();
|
||||
let root=PathBuf::from(&args[0]);
|
||||
assert!(root.file_name().unwrap().to_string_lossy().starts_with("coa-schema-fixture-chaos-064-transition-"));
|
||||
assert_eq!(std::fs::read(root.join(".transition-fixture"))?,b"disposable published-064 transition fixture");
|
||||
let meta_dir=coa_core::registry::metadata_dir_for(&root)?;
|
||||
let (_,meta)=coa_core::registry::MetaDir::open(&meta_dir)?;
|
||||
let preview=coa_core::update::preview(&root,&meta,&coa_core::pkgsource::Source::Dir(args[1].clone().into()),coa_core::signing::EMBEDDED_PUBLIC_KEY,&BTreeMap::new())?;
|
||||
assert_eq!(preview.from_version.as_deref(),Some(preview.to_version.as_str()));
|
||||
assert_eq!(preview.pending_migrations,0);
|
||||
assert!(preview.items.iter().all(|item|item.action==coa_core::update::Action::Skip),"{:?}",preview.items.iter().filter(|item|item.action!=coa_core::update::Action::Skip).collect::<Vec<_>>());
|
||||
use std::{collections::BTreeMap, path::PathBuf};
|
||||
fn main() -> coa_core::Result<()> {
|
||||
let args: Vec<_> = std::env::args().skip(1).collect();
|
||||
let root = PathBuf::from(&args[0]);
|
||||
assert!(root
|
||||
.file_name()
|
||||
.unwrap()
|
||||
.to_string_lossy()
|
||||
.starts_with("coa-schema-fixture-chaos-064-transition-"));
|
||||
assert_eq!(
|
||||
std::fs::read(root.join(".transition-fixture"))?,
|
||||
b"disposable published-064 transition fixture"
|
||||
);
|
||||
let meta_dir = coa_core::registry::metadata_dir_for(&root)?;
|
||||
let (_, meta) = coa_core::registry::MetaDir::open(&meta_dir)?;
|
||||
let preview = coa_core::update::preview(
|
||||
&root,
|
||||
&meta,
|
||||
&coa_core::pkgsource::Source::Dir(args[1].clone().into()),
|
||||
coa_core::signing::EMBEDDED_PUBLIC_KEY,
|
||||
&BTreeMap::new(),
|
||||
)?;
|
||||
assert_eq!(
|
||||
preview.from_version.as_deref(),
|
||||
Some(preview.to_version.as_str())
|
||||
);
|
||||
assert_eq!(preview.pending_migrations, 0);
|
||||
assert!(
|
||||
preview
|
||||
.items
|
||||
.iter()
|
||||
.all(|item| item.action == coa_core::update::Action::Skip),
|
||||
"{:?}",
|
||||
preview
|
||||
.items
|
||||
.iter()
|
||||
.filter(|item| item.action != coa_core::update::Action::Skip)
|
||||
.collect::<Vec<_>>()
|
||||
);
|
||||
println!("PASS: real fixture repeated preview: {} files unchanged, zero pending SQL, no update offered",preview.items.len());
|
||||
Ok(())
|
||||
}
|
||||
@@ -1,23 +1,48 @@
|
||||
//! Real signed-package transition on an independent, explicitly marked disposable copy.
|
||||
//! The Env wrapper instruments only launcher isolation; migration/backup/update code is production code.
|
||||
use std::{collections::BTreeMap, path::{Path, PathBuf}};
|
||||
use coa_core::{backup, driver, fsx, migrations, pkgsource::{self, Source}, registry::{InstallMeta, MetaDir}, update::{self, Env, RepackEnv}, Result};
|
||||
use coa_core::{
|
||||
backup, driver, fsx, migrations,
|
||||
pkgsource::{self, Source},
|
||||
registry::{InstallMeta, MetaDir},
|
||||
update::{self, Env, RepackEnv},
|
||||
Result,
|
||||
};
|
||||
use std::{
|
||||
collections::BTreeMap,
|
||||
path::{Path, PathBuf},
|
||||
};
|
||||
|
||||
struct Offline<'a>(RepackEnv<'a>);
|
||||
impl Env for Offline<'_> {
|
||||
fn ensure_stopped(&self) -> Result<()> { self.0.ensure_stopped() }
|
||||
fn preflight(&self, m: &coa_core::manifest::Manifest) -> Result<()> { self.0.preflight(m) }
|
||||
fn verify_snapshot(&self, id: &str) -> Result<()> { self.0.verify_snapshot(id) }
|
||||
fn snapshot(&self) -> Result<String> { self.0.snapshot() }
|
||||
fn restore_snapshot(&self, id: &str) -> Result<()> { self.0.restore_snapshot(id) }
|
||||
fn migrate(&self, m: &coa_core::manifest::Manifest, p: &Path) -> Result<migrations::ApplyReport> { self.0.migrate(m,p) }
|
||||
fn ensure_stopped(&self) -> Result<()> {
|
||||
self.0.ensure_stopped()
|
||||
}
|
||||
fn preflight(&self, m: &coa_core::manifest::Manifest) -> Result<()> {
|
||||
self.0.preflight(m)
|
||||
}
|
||||
fn verify_snapshot(&self, id: &str) -> Result<()> {
|
||||
self.0.verify_snapshot(id)
|
||||
}
|
||||
fn snapshot(&self) -> Result<String> {
|
||||
self.0.snapshot()
|
||||
}
|
||||
fn restore_snapshot(&self, id: &str) -> Result<()> {
|
||||
self.0.restore_snapshot(id)
|
||||
}
|
||||
fn migrate(
|
||||
&self,
|
||||
m: &coa_core::manifest::Manifest,
|
||||
p: &Path,
|
||||
) -> Result<migrations::ApplyReport> {
|
||||
self.0.migrate(m, p)
|
||||
}
|
||||
fn validate(&self) -> Result<()> {
|
||||
let path=self.0.root.join("Scripts/manage.py");
|
||||
let source=std::fs::read_to_string(&path)?.replace("\r\n", "\n");
|
||||
let path = self.0.root.join("Scripts/manage.py");
|
||||
let source = std::fs::read_to_string(&path)?.replace("\r\n", "\n");
|
||||
// Explicit test instrumentation prevents relay transmissions and binds services locally.
|
||||
let guarded=source.replace("def spawn(name, command, cwd, log):\n", "def spawn(name, command, cwd, log):\n for filename in ('worldserver.conf', 'authserver.conf'):\n path = ROOT / 'Core/configs' / filename\n if path.exists():\n text = path.read_text(encoding='utf-8-sig')\n for key, value in (('BindIP', '\"127.0.0.1\"'), ('Ra.IP', '\"127.0.0.1\"'), ('SOAP.Enabled', '0')):\n text = re.sub(r'(?m)^\\s*' + re.escape(key) + r'\\s*=.*$', '', text)\n text += '\\n' + key + ' = ' + value + '\\n'\n path.write_text(text, encoding='utf-8')\n").replace("def relay_worker():\n", "def relay_worker():\n save_process('relay-ready', os.getpid())\n while not (STATE / 'stop-relay').exists():\n time.sleep(0.5)\n return\n");
|
||||
assert_ne!(source,guarded,"Fixture launcher isolation failed");
|
||||
fsx::atomic_write(&path,guarded.as_bytes())?;
|
||||
assert_ne!(source, guarded, "Fixture launcher isolation failed");
|
||||
fsx::atomic_write(&path, guarded.as_bytes())?;
|
||||
self.0.validate()
|
||||
}
|
||||
}
|
||||
@@ -25,138 +50,261 @@ fn players(db: &coa_core::db::Db) -> Result<String> {
|
||||
db.query("SELECT CONCAT(id,':',username,':',HEX(salt),':',HEX(verifier)) FROM acore_auth.account WHERE id=900001; SELECT CONCAT(guid,':',account,':',name,':',level,':',money) FROM acore_characters.characters WHERE guid=900001; SELECT CONCAT(guid,':',itemEntry,':',owner_guid,':',enchantments) FROM acore_characters.item_instance WHERE guid=900001; SELECT CONCAT(guid,':',bag,':',slot,':',item) FROM acore_characters.character_inventory WHERE guid=900001;")
|
||||
}
|
||||
fn main() -> Result<()> {
|
||||
let args:Vec<_>=std::env::args().skip(1).collect();
|
||||
let root=PathBuf::from(&args[0]);
|
||||
assert!(root.file_name().unwrap().to_string_lossy().starts_with("coa-schema-fixture-chaos-064-transition-"));
|
||||
assert_eq!(std::fs::read(root.join(".transition-fixture"))?,b"disposable published-064 transition fixture");
|
||||
if args.get(3).is_some_and(|mode| mode=="legacy-recovery") {
|
||||
return run_fixture(&root,||legacy_recovery(&root));
|
||||
let args: Vec<_> = std::env::args().skip(1).collect();
|
||||
let root = PathBuf::from(&args[0]);
|
||||
assert!(root
|
||||
.file_name()
|
||||
.unwrap()
|
||||
.to_string_lossy()
|
||||
.starts_with("coa-schema-fixture-chaos-064-transition-"));
|
||||
assert_eq!(
|
||||
std::fs::read(root.join(".transition-fixture"))?,
|
||||
b"disposable published-064 transition fixture"
|
||||
);
|
||||
if args.get(3).is_some_and(|mode| mode == "legacy-recovery") {
|
||||
return run_fixture(&root, || legacy_recovery(&root));
|
||||
}
|
||||
assert!(!root.join(".transition-started").exists(),"Use a new independent fixture");
|
||||
fsx::atomic_write(&root.join(".transition-started"),b"started")?;
|
||||
let meta=coa_core::registry::metadata_dir_for(&root)?;
|
||||
assert!(!meta.exists(),"Do not reuse experimental or user metadata");
|
||||
run_fixture(&root,||exercise(&root,&meta,&args[1],&args[2]))
|
||||
assert!(
|
||||
!root.join(".transition-started").exists(),
|
||||
"Use a new independent fixture"
|
||||
);
|
||||
fsx::atomic_write(&root.join(".transition-started"), b"started")?;
|
||||
let meta = coa_core::registry::metadata_dir_for(&root)?;
|
||||
assert!(!meta.exists(), "Do not reuse experimental or user metadata");
|
||||
run_fixture(&root, || exercise(&root, &meta, &args[1], &args[2]))
|
||||
}
|
||||
fn run_fixture(root:&Path,operation:impl FnOnce()->Result<()>)->Result<()> {
|
||||
let result=std::panic::catch_unwind(std::panic::AssertUnwindSafe(operation));
|
||||
assert!(driver::run(root,driver::Verb::StopAll)?.ok,"Fixture shutdown failed");
|
||||
fn run_fixture(root: &Path, operation: impl FnOnce() -> Result<()>) -> Result<()> {
|
||||
let result = std::panic::catch_unwind(std::panic::AssertUnwindSafe(operation));
|
||||
assert!(
|
||||
driver::run(root, driver::Verb::StopAll)?.ok,
|
||||
"Fixture shutdown failed"
|
||||
);
|
||||
result.map_err(|_|coa_core::Error::Invalid("Disposable acceptance assertion failed; services were stopped and recovery copies retained.".into()))?
|
||||
}
|
||||
fn legacy_recovery(root:&Path)->Result<()> {
|
||||
let meta=coa_core::registry::metadata_dir_for(root)?;
|
||||
assert!(driver::run(root,driver::Verb::StopAll)?.ok);
|
||||
let expected=backup::with_database(root,|db| [coa_core::realms::Mode::Coa,coa_core::realms::Mode::Wildcard].into_iter().map(|mode|players(&db.clone().for_realm(mode))).collect::<Result<Vec<_>>>())?;
|
||||
assert!(driver::run(root,driver::Verb::StopAll)?.ok);
|
||||
let dirs=std::fs::read_dir(meta.join("updates"))?.collect::<std::io::Result<Vec<_>>>()?;
|
||||
assert_eq!(dirs.len(),1,"Requires exactly the preceding successful disposable transition");
|
||||
let txn_dir=dirs[0].path();
|
||||
let journal=txn_dir.join("txn.json");
|
||||
let mut legacy:serde_json::Value=fsx::read_json(&journal)?;
|
||||
assert_eq!(legacy["state"],"committed");
|
||||
let point=legacy["recovery_point"].as_str().unwrap().to_string();
|
||||
let point_path=meta.join("backups").join(&point).join("backup.json");
|
||||
let mut point_json:serde_json::Value=fsx::read_json(&point_path)?;
|
||||
point_json["manager_version"]="0.6.4".into();
|
||||
for component in point_json["components"].as_array_mut().unwrap() { component.as_object_mut().unwrap().remove("file_sha256"); }
|
||||
fsx::atomic_write_json(&point_path,&point_json)?;
|
||||
fn legacy_recovery(root: &Path) -> Result<()> {
|
||||
let meta = coa_core::registry::metadata_dir_for(root)?;
|
||||
assert!(driver::run(root, driver::Verb::StopAll)?.ok);
|
||||
let expected = backup::with_database(root, |db| {
|
||||
[
|
||||
coa_core::realms::Mode::Coa,
|
||||
coa_core::realms::Mode::Wildcard,
|
||||
]
|
||||
.into_iter()
|
||||
.map(|mode| players(&db.clone().for_realm(mode)))
|
||||
.collect::<Result<Vec<_>>>()
|
||||
})?;
|
||||
assert!(driver::run(root, driver::Verb::StopAll)?.ok);
|
||||
let dirs = std::fs::read_dir(meta.join("updates"))?.collect::<std::io::Result<Vec<_>>>()?;
|
||||
assert_eq!(
|
||||
dirs.len(),
|
||||
1,
|
||||
"Requires exactly the preceding successful disposable transition"
|
||||
);
|
||||
let txn_dir = dirs[0].path();
|
||||
let journal = txn_dir.join("txn.json");
|
||||
let mut legacy: serde_json::Value = fsx::read_json(&journal)?;
|
||||
assert_eq!(legacy["state"], "committed");
|
||||
let point = legacy["recovery_point"].as_str().unwrap().to_string();
|
||||
let point_path = meta.join("backups").join(&point).join("backup.json");
|
||||
let mut point_json: serde_json::Value = fsx::read_json(&point_path)?;
|
||||
point_json["manager_version"] = "0.6.4".into();
|
||||
for component in point_json["components"].as_array_mut().unwrap() {
|
||||
component.as_object_mut().unwrap().remove("file_sha256");
|
||||
}
|
||||
fsx::atomic_write_json(&point_path, &point_json)?;
|
||||
legacy.as_object_mut().unwrap().remove("recovery_hashes");
|
||||
legacy.as_object_mut().unwrap().remove("databases_started");
|
||||
legacy["state"]="applied".into();
|
||||
fsx::atomic_write_json(&journal,&legacy)?;
|
||||
assert!(update::ensure_recovered(&meta).is_err(),"Legacy unfinished update must block startup");
|
||||
let id=legacy["id"].as_str().unwrap();
|
||||
let env=RepackEnv {root,meta_dir:&meta};
|
||||
legacy["state"] = "applied".into();
|
||||
fsx::atomic_write_json(&journal, &legacy)?;
|
||||
assert!(
|
||||
update::ensure_recovered(&meta).is_err(),
|
||||
"Legacy unfinished update must block startup"
|
||||
);
|
||||
let id = legacy["id"].as_str().unwrap();
|
||||
let env = RepackEnv {
|
||||
root,
|
||||
meta_dir: &meta,
|
||||
};
|
||||
println!("Recovering legacy-format transaction and recovery point on disposable installation");
|
||||
assert_eq!(update::rollback(root,&meta,id,&env)?.state,update::State::RolledBack);
|
||||
assert_eq!(
|
||||
update::rollback(root, &meta, id, &env)?.state,
|
||||
update::State::RolledBack
|
||||
);
|
||||
for op in legacy["ops"].as_array().unwrap() {
|
||||
let relative=op["path"].as_str().unwrap();
|
||||
if op["had_previous"]==true {
|
||||
assert_eq!(fsx::sha256_file(&fsx::safe_join(root,relative)?)?,fsx::sha256_file(&fsx::safe_join(&txn_dir.join("before"),relative)?)?,"Legacy file restoration mismatch: {relative}");
|
||||
} else { assert!(!fsx::safe_join(root,relative)?.exists()); }
|
||||
let relative = op["path"].as_str().unwrap();
|
||||
if op["had_previous"] == true {
|
||||
assert_eq!(
|
||||
fsx::sha256_file(&fsx::safe_join(root, relative)?)?,
|
||||
fsx::sha256_file(&fsx::safe_join(&txn_dir.join("before"), relative)?)?,
|
||||
"Legacy file restoration mismatch: {relative}"
|
||||
);
|
||||
} else {
|
||||
assert!(!fsx::safe_join(root, relative)?.exists());
|
||||
}
|
||||
}
|
||||
assert_eq!(std::fs::read(meta.join("install.json"))?,std::fs::read(txn_dir.join("before/manager-install.json"))?);
|
||||
backup::with_database(root,|db| {
|
||||
for (index,mode) in [coa_core::realms::Mode::Coa,coa_core::realms::Mode::Wildcard].into_iter().enumerate() {
|
||||
let db=db.clone().for_realm(mode);
|
||||
assert_eq!(players(&db)?,expected[index]);
|
||||
assert_eq!(
|
||||
std::fs::read(meta.join("install.json"))?,
|
||||
std::fs::read(txn_dir.join("before/manager-install.json"))?
|
||||
);
|
||||
backup::with_database(root, |db| {
|
||||
for (index, mode) in [
|
||||
coa_core::realms::Mode::Coa,
|
||||
coa_core::realms::Mode::Wildcard,
|
||||
]
|
||||
.into_iter()
|
||||
.enumerate()
|
||||
{
|
||||
let db = db.clone().for_realm(mode);
|
||||
assert_eq!(players(&db)?, expected[index]);
|
||||
assert_eq!(db.query("SELECT COUNT(*) FROM acore_world.coa_manager_migrations WHERE id IN ('manager_repair__20261005_reconcile_wildcard_tables','manager_repair__20261005_reconcile_missing_class_starts');")?,"0");
|
||||
assert_eq!(db.query("SELECT sha256 FROM acore_world.coa_manager_migrations WHERE id='manager_repair__20261005_missing_wildcard_tables';")?,"9e4a36245c3f83255415c122c01f08ceb3e3b83898d3d427ac4e2fbcf61e9638");
|
||||
}
|
||||
Ok(())
|
||||
})?;
|
||||
assert!(driver::run(root,driver::Verb::StopAll)?.ok);
|
||||
assert!(driver::run(root, driver::Verb::StopAll)?.ok);
|
||||
assert!(update::pending_checked(&meta)?.is_none());
|
||||
assert!(update::rollback(root,&meta,id,&env).is_err(),"Completed recovery must not run again");
|
||||
assert!(
|
||||
update::rollback(root, &meta, id, &env).is_err(),
|
||||
"Completed recovery must not run again"
|
||||
);
|
||||
println!("PASS: legacy journal blocked startup; old files, metadata, migration histories and player fields restored; completed recovery rejects replay. Original baseline had a missing table, so healthy startup is not claimed after rollback.");
|
||||
Ok(())
|
||||
}
|
||||
fn exercise(root:&Path,meta:&Path,baseline:&str,candidate:&str)->Result<()> {
|
||||
let mut install:InstallMeta=fsx::read_json(&PathBuf::from("C:/games/coa-schema-fixture-chaos-20261005-v1.manager/install.json"))?;
|
||||
install.server_path=root.to_string_lossy().into_owned();
|
||||
install.id=uuid::Uuid::new_v4().to_string();
|
||||
install.manager_version="0.6.4".into();
|
||||
MetaDir::create(root,&install)?;
|
||||
fn exercise(root: &Path, meta: &Path, baseline: &str, candidate: &str) -> Result<()> {
|
||||
let mut install: InstallMeta = fsx::read_json(&PathBuf::from(
|
||||
"C:/games/coa-schema-fixture-chaos-20261005-v1.manager/install.json",
|
||||
))?;
|
||||
install.server_path = root.to_string_lossy().into_owned();
|
||||
install.id = uuid::Uuid::new_v4().to_string();
|
||||
install.manager_version = "0.6.4".into();
|
||||
MetaDir::create(root, &install)?;
|
||||
// Private ports, and no inherited PID records or paths to the source database.
|
||||
let mut cfg:serde_json::Value=fsx::read_json(&root.join("Settings/repack.json"))?;
|
||||
let mut listeners=Vec::new();
|
||||
for key in ["mysqlPort","authPort","worldPort","raPort"] {
|
||||
let listener=std::net::TcpListener::bind("127.0.0.1:0")?;
|
||||
cfg[key]=listener.local_addr()?.port().into(); listeners.push(listener);
|
||||
let mut cfg: serde_json::Value = fsx::read_json(&root.join("Settings/repack.json"))?;
|
||||
let mut listeners = Vec::new();
|
||||
for key in ["mysqlPort", "authPort", "worldPort", "raPort"] {
|
||||
let listener = std::net::TcpListener::bind("127.0.0.1:0")?;
|
||||
cfg[key] = listener.local_addr()?.port().into();
|
||||
listeners.push(listener);
|
||||
}
|
||||
fsx::atomic_write_json(&root.join("Settings/repack.json"),&cfg)?;
|
||||
let mut profile:serde_json::Value=fsx::read_json(&root.join("Settings/realm-profile.json"))?;
|
||||
for key in ["secondary_world_port","secondary_ra_port"] {
|
||||
let listener=std::net::TcpListener::bind("127.0.0.1:0")?;
|
||||
profile[key]=listener.local_addr()?.port().into(); listeners.push(listener);
|
||||
fsx::atomic_write_json(&root.join("Settings/repack.json"), &cfg)?;
|
||||
let mut profile: serde_json::Value = fsx::read_json(&root.join("Settings/realm-profile.json"))?;
|
||||
for key in ["secondary_world_port", "secondary_ra_port"] {
|
||||
let listener = std::net::TcpListener::bind("127.0.0.1:0")?;
|
||||
profile[key] = listener.local_addr()?.port().into();
|
||||
listeners.push(listener);
|
||||
}
|
||||
fsx::atomic_write_json(&root.join("Settings/realm-profile.json"),&profile)?;
|
||||
fsx::atomic_write_json(&root.join("Settings/realm-profile.json"), &profile)?;
|
||||
drop(listeners);
|
||||
let state=root.join(".state");
|
||||
if state.exists() { std::fs::remove_dir_all(&state)?; }
|
||||
let secondary_state=root.join(".realms/secondary/.state");
|
||||
if secondary_state.exists() { std::fs::remove_dir_all(&secondary_state)?; }
|
||||
let source=Source::Dir(baseline.into());
|
||||
let (manifest,_)=pkgsource::fetch_manifest(&source,coa_core::signing::EMBEDDED_PUBLIC_KEY)?;
|
||||
let temp=tempfile::tempdir()?;
|
||||
let parts=pkgsource::fetch_parts(&source,&manifest,&temp.path().join("download"),&Default::default(),&|_,_|{})?;
|
||||
let tree=temp.path().join("tree");
|
||||
coa_core::package::extract(&parts,&manifest,&tree,&|_,_|{})?;
|
||||
let state = root.join(".state");
|
||||
if state.exists() {
|
||||
std::fs::remove_dir_all(&state)?;
|
||||
}
|
||||
let secondary_state = root.join(".realms/secondary/.state");
|
||||
if secondary_state.exists() {
|
||||
std::fs::remove_dir_all(&secondary_state)?;
|
||||
}
|
||||
let source = Source::Dir(baseline.into());
|
||||
let (manifest, _) = pkgsource::fetch_manifest(&source, coa_core::signing::EMBEDDED_PUBLIC_KEY)?;
|
||||
let temp = tempfile::tempdir()?;
|
||||
let parts = pkgsource::fetch_parts(
|
||||
&source,
|
||||
&manifest,
|
||||
&temp.path().join("download"),
|
||||
&Default::default(),
|
||||
&|_, _| {},
|
||||
)?;
|
||||
let tree = temp.path().join("tree");
|
||||
coa_core::package::extract(&parts, &manifest, &tree, &|_, _| {})?;
|
||||
for file in &manifest.files {
|
||||
if file.path.starts_with("_migrations/") {continue;}
|
||||
fsx::atomic_write(&fsx::safe_join(root,&file.path)?,&std::fs::read(fsx::safe_join(&tree,&file.path)?)?)?;
|
||||
install.original_hashes.insert(file.path.clone(),file.sha256.clone());
|
||||
if file.path.starts_with("_migrations/") {
|
||||
continue;
|
||||
}
|
||||
fsx::atomic_write(
|
||||
&fsx::safe_join(root, &file.path)?,
|
||||
&std::fs::read(fsx::safe_join(&tree, &file.path)?)?,
|
||||
)?;
|
||||
install
|
||||
.original_hashes
|
||||
.insert(file.path.clone(), file.sha256.clone());
|
||||
}
|
||||
install.core.version=Some(manifest.version);
|
||||
fsx::atomic_write_json(&meta.join("install.json"),&install)?;
|
||||
install.core.version = Some(manifest.version);
|
||||
fsx::atomic_write_json(&meta.join("install.json"), &install)?;
|
||||
// Both worlds must remain local, including generated secondary configuration.
|
||||
for relative in ["Settings/worldserver.conf.template","Settings/authserver.conf.template"] {
|
||||
let p=root.join(relative);
|
||||
let mut conf=coa_core::config::parser::ConfFile::parse_bytes(&std::fs::read(&p)?)?;
|
||||
conf.set("BindIP","\"127.0.0.1\"",&[]); conf.set("Ra.IP","\"127.0.0.1\"",&[]); conf.set("SOAP.Enabled","0",&[]);
|
||||
fsx::atomic_write(&p,conf.to_text().as_bytes())?;
|
||||
for relative in [
|
||||
"Settings/worldserver.conf.template",
|
||||
"Settings/authserver.conf.template",
|
||||
] {
|
||||
let p = root.join(relative);
|
||||
let mut conf = coa_core::config::parser::ConfFile::parse_bytes(&std::fs::read(&p)?)?;
|
||||
conf.set("BindIP", "\"127.0.0.1\"", &[]);
|
||||
conf.set("Ra.IP", "\"127.0.0.1\"", &[]);
|
||||
conf.set("SOAP.Enabled", "0", &[]);
|
||||
fsx::atomic_write(&p, conf.to_text().as_bytes())?;
|
||||
}
|
||||
let expected=backup::with_database(root,|db| {
|
||||
let mut saved=Vec::new();
|
||||
for mode in [coa_core::realms::Mode::Coa,coa_core::realms::Mode::Wildcard] {
|
||||
let db=db.clone().for_realm(mode);
|
||||
let expected = backup::with_database(root, |db| {
|
||||
let mut saved = Vec::new();
|
||||
for mode in [
|
||||
coa_core::realms::Mode::Coa,
|
||||
coa_core::realms::Mode::Wildcard,
|
||||
] {
|
||||
let db = db.clone().for_realm(mode);
|
||||
saved.push(players(&db)?);
|
||||
db.query("DROP TABLE IF EXISTS acore_characters.coa_wildcard_skill_card; DELETE FROM acore_world.coa_manager_migrations WHERE id IN ('manager_repair__20261005_reconcile_wildcard_tables','manager_repair__20261005_reconcile_missing_class_starts'); UPDATE acore_world.coa_manager_migrations SET sha256='9e4a36245c3f83255415c122c01f08ceb3e3b83898d3d427ac4e2fbcf61e9638' WHERE id='manager_repair__20261005_missing_wildcard_tables' AND status='applied';")?;
|
||||
}
|
||||
Ok(saved)
|
||||
})?;
|
||||
let source=Source::Dir(candidate.into());
|
||||
let candidate_manifest=pkgsource::fetch_manifest(&source,coa_core::signing::EMBEDDED_PUBLIC_KEY)?.0;
|
||||
let choices:BTreeMap<_,_>=update::plan(root,&install,&candidate_manifest,&BTreeMap::new(),None)?.into_iter().filter(|p|p.action==update::Action::Conflict).map(|p|(p.path,update::Resolution::Replace)).collect();
|
||||
let env=Offline(RepackEnv{root,meta_dir:meta});
|
||||
let outcome=update::apply(&update::Params {root,meta_dir:meta,source,trusted_key:coa_core::signing::EMBEDDED_PUBLIC_KEY,cancel:Default::default(),resolutions:choices,env:&env,fail_after_ops:None},&|stage,pct|println!("{pct}% {stage}"))?;
|
||||
assert_eq!(outcome.txn.state,update::State::Committed,"{:?}",outcome.txn.message);
|
||||
backup::with_database(root,|db| {
|
||||
for (index,mode) in [coa_core::realms::Mode::Coa,coa_core::realms::Mode::Wildcard].into_iter().enumerate() {
|
||||
let db=db.clone().for_realm(mode);
|
||||
assert_eq!(players(&db)?,expected[index],"Player data changed in {}",mode.name());
|
||||
assert!(coa_core::schema_check::check(&db,root)?.is_empty());
|
||||
assert_eq!(migrations::pending_count(&db,&candidate_manifest.migrations)?,0);
|
||||
let source = Source::Dir(candidate.into());
|
||||
let candidate_manifest =
|
||||
pkgsource::fetch_manifest(&source, coa_core::signing::EMBEDDED_PUBLIC_KEY)?.0;
|
||||
let choices: BTreeMap<_, _> =
|
||||
update::plan(root, &install, &candidate_manifest, &BTreeMap::new(), None)?
|
||||
.into_iter()
|
||||
.filter(|p| p.action == update::Action::Conflict)
|
||||
.map(|p| (p.path, update::Resolution::Replace))
|
||||
.collect();
|
||||
let env = Offline(RepackEnv {
|
||||
root,
|
||||
meta_dir: meta,
|
||||
});
|
||||
let outcome = update::apply(
|
||||
&update::Params {
|
||||
root,
|
||||
meta_dir: meta,
|
||||
source,
|
||||
trusted_key: coa_core::signing::EMBEDDED_PUBLIC_KEY,
|
||||
cancel: Default::default(),
|
||||
resolutions: choices,
|
||||
env: &env,
|
||||
fail_after_ops: None,
|
||||
},
|
||||
&|stage, pct| println!("{pct}% {stage}"),
|
||||
)?;
|
||||
assert_eq!(
|
||||
outcome.txn.state,
|
||||
update::State::Committed,
|
||||
"{:?}",
|
||||
outcome.txn.message
|
||||
);
|
||||
backup::with_database(root, |db| {
|
||||
for (index, mode) in [
|
||||
coa_core::realms::Mode::Coa,
|
||||
coa_core::realms::Mode::Wildcard,
|
||||
]
|
||||
.into_iter()
|
||||
.enumerate()
|
||||
{
|
||||
let db = db.clone().for_realm(mode);
|
||||
assert_eq!(
|
||||
players(&db)?,
|
||||
expected[index],
|
||||
"Player data changed in {}",
|
||||
mode.name()
|
||||
);
|
||||
assert!(coa_core::schema_check::check(&db, root)?.is_empty());
|
||||
assert_eq!(
|
||||
migrations::pending_count(&db, &candidate_manifest.migrations)?,
|
||||
0
|
||||
);
|
||||
}
|
||||
Ok(())
|
||||
})?;
|
||||
|
||||
@@ -11,47 +11,123 @@ use std::path::PathBuf;
|
||||
|
||||
fn main() {
|
||||
let a: Vec<String> = std::env::args().skip(1).collect();
|
||||
let (fixture, out, dest) = (PathBuf::from(&a[0]), PathBuf::from(&a[1]), PathBuf::from(&a[2]));
|
||||
assert!(a[0].to_lowercase().contains("fixture"), "refusing: source is not a fixture");
|
||||
assert!(std::fs::symlink_metadata(fixture.join("Data")).unwrap().file_type().is_symlink(), "Data junction must be skipped by the packager");
|
||||
let (fixture, out, dest) = (
|
||||
PathBuf::from(&a[0]),
|
||||
PathBuf::from(&a[1]),
|
||||
PathBuf::from(&a[2]),
|
||||
);
|
||||
assert!(
|
||||
a[0].to_lowercase().contains("fixture"),
|
||||
"refusing: source is not a fixture"
|
||||
);
|
||||
assert!(
|
||||
std::fs::symlink_metadata(fixture.join("Data"))
|
||||
.unwrap()
|
||||
.file_type()
|
||||
.is_symlink(),
|
||||
"Data junction must be skipped by the packager"
|
||||
);
|
||||
|
||||
let t = std::time::Instant::now();
|
||||
let m = build(&fixture, &out, &BuildOptions { kind: coa_core::manifest::Kind::Base, version: "0.1.0".into(), core_commit: None, built_at: chrono::Utc::now().to_rfc3339(), part_size: 256 * 1024 * 1024, bots_commit: None, migrations: vec![] }, &|s| eprintln!(" pack: {s}")).expect("build");
|
||||
let m = build(
|
||||
&fixture,
|
||||
&out,
|
||||
&BuildOptions {
|
||||
kind: coa_core::manifest::Kind::Base,
|
||||
version: "0.1.0".into(),
|
||||
core_commit: None,
|
||||
built_at: chrono::Utc::now().to_rfc3339(),
|
||||
part_size: 256 * 1024 * 1024,
|
||||
bots_commit: None,
|
||||
migrations: vec![],
|
||||
},
|
||||
&|s| eprintln!(" pack: {s}"),
|
||||
)
|
||||
.expect("build");
|
||||
let arch = m.archive.as_ref().unwrap();
|
||||
println!("packaged {} files, {:.2} GB -> {} parts, {:.2} GB in {:?}", m.files.len(), arch.unpacked_size as f64 / 1e9, arch.parts.len(), arch.parts.iter().map(|p| p.size).sum::<u64>() as f64 / 1e9, t.elapsed());
|
||||
println!(
|
||||
"packaged {} files, {:.2} GB -> {} parts, {:.2} GB in {:?}",
|
||||
m.files.len(),
|
||||
arch.unpacked_size as f64 / 1e9,
|
||||
arch.parts.len(),
|
||||
arch.parts.iter().map(|p| p.size).sum::<u64>() as f64 / 1e9,
|
||||
t.elapsed()
|
||||
);
|
||||
|
||||
let key_path = format!("{}/.coa-manager/signing/manifest-signing.key", std::env::var("USERPROFILE").unwrap());
|
||||
let seed: [u8; 32] = STANDARD.decode(std::fs::read_to_string(key_path).unwrap().trim()).unwrap().try_into().unwrap();
|
||||
let sig = SigningKey::from_bytes(&seed).sign(&std::fs::read(out.join("manifest.json")).unwrap());
|
||||
std::fs::write(out.join("manifest.json.sig"), STANDARD.encode(sig.to_bytes())).unwrap();
|
||||
let key_path = format!(
|
||||
"{}/.coa-manager/signing/manifest-signing.key",
|
||||
std::env::var("USERPROFILE").unwrap()
|
||||
);
|
||||
let seed: [u8; 32] = STANDARD
|
||||
.decode(std::fs::read_to_string(key_path).unwrap().trim())
|
||||
.unwrap()
|
||||
.try_into()
|
||||
.unwrap();
|
||||
let sig =
|
||||
SigningKey::from_bytes(&seed).sign(&std::fs::read(out.join("manifest.json")).unwrap());
|
||||
std::fs::write(
|
||||
out.join("manifest.json.sig"),
|
||||
STANDARD.encode(sig.to_bytes()),
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
let reg_dir = std::env::temp_dir().join("coa-install-e2e");
|
||||
let _ = std::fs::remove_dir_all(®_dir);
|
||||
let registry = Registry::at(reg_dir.join("installs.json"));
|
||||
let t = std::time::Instant::now();
|
||||
let installed = install_base(
|
||||
&Params { source: Source::Dir(out.clone()), dest: dest.clone(), trusted_key: coa_core::signing::EMBEDDED_PUBLIC_KEY, registry: ®istry, cancel: Cancel::default() },
|
||||
&|s| eprintln!(" install: {:>3}% {} {}", s.percent, s.step, s.detail.unwrap_or_default()),
|
||||
&Params {
|
||||
source: Source::Dir(out.clone()),
|
||||
dest: dest.clone(),
|
||||
trusted_key: coa_core::signing::EMBEDDED_PUBLIC_KEY,
|
||||
registry: ®istry,
|
||||
cancel: Cancel::default(),
|
||||
},
|
||||
&|s| {
|
||||
eprintln!(
|
||||
" install: {:>3}% {} {}",
|
||||
s.percent,
|
||||
s.step,
|
||||
s.detail.unwrap_or_default()
|
||||
)
|
||||
},
|
||||
)
|
||||
.unwrap_or_else(|e| panic!("install failed: {e:?}"));
|
||||
println!("installed {} at {} in {:?}", installed.version, installed.path, t.elapsed());
|
||||
println!(
|
||||
"installed {} at {} in {:?}",
|
||||
installed.version,
|
||||
installed.path,
|
||||
t.elapsed()
|
||||
);
|
||||
|
||||
assert!(!dest.with_file_name("coa-installtest.installing").exists());
|
||||
assert!(!dest.join("Settings/database.bootstrap.json").exists(), "bootstrap credentials are removed");
|
||||
assert!(
|
||||
!dest.join("Settings/database.bootstrap.json").exists(),
|
||||
"bootstrap credentials are removed"
|
||||
);
|
||||
assert!(dest.join("Core/worldserver.exe").is_file());
|
||||
assert!(dest.with_file_name("coa-installtest.manager/install.json").is_file());
|
||||
assert!(dest
|
||||
.with_file_name("coa-installtest.manager/install.json")
|
||||
.is_file());
|
||||
assert_eq!(registry.list().unwrap().len(), 1);
|
||||
|
||||
// The rotated credentials must differ from the packaged ones and work.
|
||||
let packaged: serde_json::Value = serde_json::from_slice(&std::fs::read(fixture.join("Settings/database.json")).unwrap()).unwrap();
|
||||
let now: serde_json::Value = serde_json::from_slice(&std::fs::read(dest.join("Settings/database.json")).unwrap()).unwrap();
|
||||
let packaged: serde_json::Value =
|
||||
serde_json::from_slice(&std::fs::read(fixture.join("Settings/database.json")).unwrap())
|
||||
.unwrap();
|
||||
let now: serde_json::Value =
|
||||
serde_json::from_slice(&std::fs::read(dest.join("Settings/database.json")).unwrap())
|
||||
.unwrap();
|
||||
assert_ne!(packaged["rootPassword"], now["rootPassword"]);
|
||||
assert_ne!(packaged["appPassword"], now["appPassword"]);
|
||||
coa_core::backup::with_database(&dest, |db: &Db| {
|
||||
assert!(db.ping());
|
||||
assert_eq!(db.tables("acore_auth")?.len() > 10, true);
|
||||
assert!(db.tables("acore_auth")?.len() > 10);
|
||||
let app = Db::from_repack(&dest, Account::App)?;
|
||||
assert!(app.query("SELECT 1;")? == "1", "the game account works with the new password");
|
||||
assert!(
|
||||
app.query("SELECT 1;")? == "1",
|
||||
"the game account works with the new password"
|
||||
);
|
||||
Ok(())
|
||||
})
|
||||
.expect("database after install");
|
||||
|
||||
@@ -5,9 +5,23 @@ use coa_core::registry::Registry;
|
||||
|
||||
fn main() {
|
||||
let a: Vec<String> = std::env::args().skip(1).collect();
|
||||
let reg = Registry::at(std::env::temp_dir().join("coa-install-pkg").join("installs.json"));
|
||||
let reg = Registry::at(
|
||||
std::env::temp_dir()
|
||||
.join("coa-install-pkg")
|
||||
.join("installs.json"),
|
||||
);
|
||||
let _ = std::fs::remove_dir_all(std::env::temp_dir().join("coa-install-pkg"));
|
||||
let t = std::time::Instant::now();
|
||||
let r = install_base(&Params { source: Source::Dir(a[0].clone().into()), dest: a[1].clone().into(), trusted_key: coa_core::signing::EMBEDDED_PUBLIC_KEY, registry: ®, cancel: Cancel::default() }, &|s| eprintln!(" {:>3}% {}", s.percent, s.step)).unwrap_or_else(|e| panic!("install failed: {e:?}"));
|
||||
let r = install_base(
|
||||
&Params {
|
||||
source: Source::Dir(a[0].clone().into()),
|
||||
dest: a[1].clone().into(),
|
||||
trusted_key: coa_core::signing::EMBEDDED_PUBLIC_KEY,
|
||||
registry: ®,
|
||||
cancel: Cancel::default(),
|
||||
},
|
||||
&|s| eprintln!(" {:>3}% {}", s.percent, s.step),
|
||||
)
|
||||
.unwrap_or_else(|e| panic!("install failed: {e:?}"));
|
||||
println!("installed {} at {} in {:?}", r.version, r.path, t.elapsed());
|
||||
}
|
||||
@@ -5,9 +5,23 @@ use coa_core::registry::Registry;
|
||||
|
||||
fn main() {
|
||||
let a: Vec<String> = std::env::args().skip(1).collect();
|
||||
let reg = Registry::at(std::env::temp_dir().join("coa-install-url").join("installs.json"));
|
||||
let reg = Registry::at(
|
||||
std::env::temp_dir()
|
||||
.join("coa-install-url")
|
||||
.join("installs.json"),
|
||||
);
|
||||
let _ = std::fs::remove_dir_all(std::env::temp_dir().join("coa-install-url"));
|
||||
let t = std::time::Instant::now();
|
||||
let r = install_base(&Params { source: Source::Url(a[0].clone()), dest: a[1].clone().into(), trusted_key: coa_core::signing::EMBEDDED_PUBLIC_KEY, registry: ®, cancel: Cancel::default() }, &|s| eprintln!(" {:>3}% {}", s.percent, s.step)).unwrap_or_else(|e| panic!("install failed: {e:?}"));
|
||||
let r = install_base(
|
||||
&Params {
|
||||
source: Source::Url(a[0].clone()),
|
||||
dest: a[1].clone().into(),
|
||||
trusted_key: coa_core::signing::EMBEDDED_PUBLIC_KEY,
|
||||
registry: ®,
|
||||
cancel: Cancel::default(),
|
||||
},
|
||||
&|s| eprintln!(" {:>3}% {}", s.percent, s.step),
|
||||
)
|
||||
.unwrap_or_else(|e| panic!("install failed: {e:?}"));
|
||||
println!("installed {} at {} in {:?}", r.version, r.path, t.elapsed());
|
||||
}
|
||||
@@ -5,14 +5,27 @@ use ed25519_dalek::SigningKey;
|
||||
use std::{fs, path::PathBuf};
|
||||
|
||||
fn main() {
|
||||
let private = PathBuf::from(std::env::var("USERPROFILE").expect("USERPROFILE")).join(".coa-manager/signing/manifest-signing.key");
|
||||
let public = PathBuf::from(std::env::args().nth(1).unwrap_or_else(|| "keys/manifest-signing.pub".into()));
|
||||
let private = PathBuf::from(std::env::var("USERPROFILE").expect("USERPROFILE"))
|
||||
.join(".coa-manager/signing/manifest-signing.key");
|
||||
let public = PathBuf::from(
|
||||
std::env::args()
|
||||
.nth(1)
|
||||
.unwrap_or_else(|| "keys/manifest-signing.pub".into()),
|
||||
);
|
||||
if private.exists() || public.exists() {
|
||||
panic!("a key already exists; refusing to overwrite");
|
||||
}
|
||||
fs::create_dir_all(private.parent().unwrap()).unwrap();
|
||||
let sk = SigningKey::generate(&mut rand_core::OsRng);
|
||||
fs::write(&private, STANDARD.encode(sk.to_bytes())).unwrap();
|
||||
fs::write(&public, format!("{}\n", STANDARD.encode(sk.verifying_key().to_bytes()))).unwrap();
|
||||
println!("private key: {}\npublic key: {}", private.display(), public.display());
|
||||
fs::write(
|
||||
&public,
|
||||
format!("{}\n", STANDARD.encode(sk.verifying_key().to_bytes())),
|
||||
)
|
||||
.unwrap();
|
||||
println!(
|
||||
"private key: {}\npublic key: {}",
|
||||
private.display(),
|
||||
public.display()
|
||||
);
|
||||
}
|
||||
@@ -8,14 +8,24 @@ use coa_core::migrations::{apply_pending, status, Status};
|
||||
use std::path::{Path, PathBuf};
|
||||
|
||||
fn sql_files(dir: &Path) -> Vec<PathBuf> {
|
||||
let mut v: Vec<PathBuf> = std::fs::read_dir(dir).map(|rd| rd.flatten().map(|e| e.path()).filter(|p| p.extension().map(|e| e == "sql").unwrap_or(false)).collect()).unwrap_or_default();
|
||||
let mut v: Vec<PathBuf> = std::fs::read_dir(dir)
|
||||
.map(|rd| {
|
||||
rd.flatten()
|
||||
.map(|e| e.path())
|
||||
.filter(|p| p.extension().map(|e| e == "sql").unwrap_or(false))
|
||||
.collect()
|
||||
})
|
||||
.unwrap_or_default();
|
||||
v.sort();
|
||||
v
|
||||
}
|
||||
|
||||
fn main() {
|
||||
let a: Vec<String> = std::env::args().skip(1).collect();
|
||||
assert!(a[0].to_lowercase().contains("fixture"), "refusing: not a fixture folder");
|
||||
assert!(
|
||||
a[0].to_lowercase().contains("fixture"),
|
||||
"refusing: not a fixture folder"
|
||||
);
|
||||
let (root, core) = (PathBuf::from(&a[0]), PathBuf::from(&a[1]));
|
||||
let staging = std::env::temp_dir().join("coa-migrate-e2e");
|
||||
let _ = std::fs::remove_dir_all(&staging);
|
||||
@@ -24,17 +34,37 @@ fn main() {
|
||||
let mut list: Vec<Migration> = Vec::new();
|
||||
let mut origin: std::collections::HashMap<(String, String), String> = Default::default();
|
||||
let mut add = |db: &str, id: String, src: &Path| {
|
||||
origin.insert((db.to_string(), id.clone()), src.strip_prefix(&core).unwrap().to_string_lossy().replace('\\', "/"));
|
||||
origin.insert(
|
||||
(db.to_string(), id.clone()),
|
||||
src.strip_prefix(&core)
|
||||
.unwrap()
|
||||
.to_string_lossy()
|
||||
.replace('\\', "/"),
|
||||
);
|
||||
let bytes = std::fs::read(src).unwrap();
|
||||
let dst = staging.join(db).join(format!("{id}.sql"));
|
||||
std::fs::create_dir_all(dst.parent().unwrap()).unwrap();
|
||||
std::fs::write(&dst, &bytes).unwrap();
|
||||
list.push(Migration { compatible_sha256: vec![], id, db: db.into(), sha256: fsx::sha256_bytes(&bytes), destructive: false });
|
||||
list.push(Migration {
|
||||
compatible_sha256: vec![],
|
||||
id,
|
||||
db: db.into(),
|
||||
sha256: fsx::sha256_bytes(&bytes),
|
||||
destructive: false,
|
||||
});
|
||||
};
|
||||
for (kind, dirs) in [("auth", ["db_auth", "pending_db_auth"]), ("characters", ["db_characters", "pending_db_characters"]), ("world", ["db_world", "pending_db_world"])] {
|
||||
for (kind, dirs) in [
|
||||
("auth", ["db_auth", "pending_db_auth"]),
|
||||
("characters", ["db_characters", "pending_db_characters"]),
|
||||
("world", ["db_world", "pending_db_world"]),
|
||||
] {
|
||||
for d in dirs {
|
||||
for f in sql_files(&core.join("data/sql/updates").join(d)) {
|
||||
add(kind, f.file_stem().unwrap().to_string_lossy().into_owned(), &f);
|
||||
add(
|
||||
kind,
|
||||
f.file_stem().unwrap().to_string_lossy().into_owned(),
|
||||
&f,
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -43,10 +73,21 @@ fn main() {
|
||||
for kind in ["auth", "characters", "world"] {
|
||||
let base = m.path().join(format!("data/sql/db-{kind}"));
|
||||
for f in sql_files(&base.join("base")) {
|
||||
add(kind, format!("mod_{mname}__base__{}", f.file_stem().unwrap().to_string_lossy()), &f);
|
||||
add(
|
||||
kind,
|
||||
format!(
|
||||
"mod_{mname}__base__{}",
|
||||
f.file_stem().unwrap().to_string_lossy()
|
||||
),
|
||||
&f,
|
||||
);
|
||||
}
|
||||
for f in sql_files(&base) {
|
||||
add(kind, format!("mod_{mname}__{}", f.file_stem().unwrap().to_string_lossy()), &f);
|
||||
add(
|
||||
kind,
|
||||
format!("mod_{mname}__{}", f.file_stem().unwrap().to_string_lossy()),
|
||||
&f,
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -54,29 +95,68 @@ fn main() {
|
||||
// table created by a module script that arrived earlier). The release pipeline computes exactly this.
|
||||
let out = std::process::Command::new("git")
|
||||
.current_dir(&core)
|
||||
.args(["log", "--reverse", "--diff-filter=A", "--name-only", "--pretty=format:", "--", "data/sql/updates", "modules"])
|
||||
.args([
|
||||
"log",
|
||||
"--reverse",
|
||||
"--diff-filter=A",
|
||||
"--name-only",
|
||||
"--pretty=format:",
|
||||
"--",
|
||||
"data/sql/updates",
|
||||
"modules",
|
||||
])
|
||||
.output()
|
||||
.unwrap();
|
||||
let mut rank = std::collections::HashMap::new();
|
||||
for (i, path) in String::from_utf8_lossy(&out.stdout).lines().filter(|l| l.ends_with(".sql")).enumerate() {
|
||||
for (i, path) in String::from_utf8_lossy(&out.stdout)
|
||||
.lines()
|
||||
.filter(|l| l.ends_with(".sql"))
|
||||
.enumerate()
|
||||
{
|
||||
rank.entry(path.to_string()).or_insert(i);
|
||||
}
|
||||
let key = |m: &Migration| -> usize {
|
||||
origin.get(&(m.db.clone(), m.id.clone())).and_then(|p| rank.get(p)).copied().unwrap_or(usize::MAX)
|
||||
origin
|
||||
.get(&(m.db.clone(), m.id.clone()))
|
||||
.and_then(|p| rank.get(p))
|
||||
.copied()
|
||||
.unwrap_or(usize::MAX)
|
||||
};
|
||||
list.sort_by_key(|m| key(m));
|
||||
println!("candidate migrations: {} ({} not found in history)", list.len(), list.iter().filter(|m| key(m) == usize::MAX).count());
|
||||
println!(
|
||||
"candidate migrations: {} ({} not found in history)",
|
||||
list.len(),
|
||||
list.iter().filter(|m| key(m) == usize::MAX).count()
|
||||
);
|
||||
|
||||
let admin = Db::from_repack(&root, Account::Admin).unwrap();
|
||||
let _ = &admin;
|
||||
let t = std::time::Instant::now();
|
||||
let report = backup::with_database(&root, |db| {
|
||||
let before = status(db, &list)?;
|
||||
let pending = before.iter().filter(|i| i.status == Status::Pending).count();
|
||||
println!("already recorded by the database: {}; pending: {pending}", list.len() - pending);
|
||||
let pending_list: Vec<Migration> = list.iter().zip(&before).filter(|(_, i)| i.status == Status::Pending).map(|(m, _)| m.clone()).collect();
|
||||
apply_pending(db, &pending_list, &staging, &|| Ok("(fixture: no backup)".into()))
|
||||
let pending = before
|
||||
.iter()
|
||||
.filter(|i| i.status == Status::Pending)
|
||||
.count();
|
||||
println!(
|
||||
"already recorded by the database: {}; pending: {pending}",
|
||||
list.len() - pending
|
||||
);
|
||||
let pending_list: Vec<Migration> = list
|
||||
.iter()
|
||||
.zip(&before)
|
||||
.filter(|(_, i)| i.status == Status::Pending)
|
||||
.map(|(m, _)| m.clone())
|
||||
.collect();
|
||||
apply_pending(db, &pending_list, &staging, &|| {
|
||||
Ok("(fixture: no backup)".into())
|
||||
})
|
||||
})
|
||||
.expect("apply");
|
||||
println!("applied {} in {:?}; failed: {:?}", report.applied.len(), t.elapsed(), report.failed);
|
||||
println!(
|
||||
"applied {} in {:?}; failed: {:?}",
|
||||
report.applied.len(),
|
||||
t.elapsed(),
|
||||
report.failed
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
//! Read-only audit, or explicit SQL checks on a disposable database fixture.
|
||||
use coa_core::{db::{Account, Db}, migrations::{self, Store}, manifest::Manifest, realms::Mode};
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let args: Vec<_> = std::env::args().collect();
|
||||
if args.len() < 3 { return Err("usage: migration_plan <root> <signed-manifest> [--apply|--sql-only <migration-directory>]".into()); }
|
||||
let root = std::path::Path::new(&args[1]);
|
||||
let bytes = std::fs::read(&args[2])?;
|
||||
let signature = std::fs::read_to_string(format!("{}.sig",args[2]))?;
|
||||
coa_core::signing::verify(&bytes, &signature, coa_core::signing::EMBEDDED_PUBLIC_KEY)?;
|
||||
let manifest = Manifest::parse(&bytes)?;
|
||||
for (index,mode) in [Mode::Coa, Mode::Wildcard].into_iter().enumerate() {
|
||||
let db = Db::from_repack(root, Account::Admin)?.for_realm(mode);
|
||||
let rows = db.load_readonly()?;
|
||||
let relevant: Vec<_> = rows.iter().filter(|r| r.id == "rev_20260903_01_live_class_baseline").map(|r| format!("{} {:?} {}",r.db,r.status,r.baseline)).collect();
|
||||
println!("{} baseline history: {:?}",mode.name(),relevant);
|
||||
let list: Vec<_> = manifest.migrations.iter().filter(|m|index==0 || m.db!="auth").cloned().collect();
|
||||
let plan = migrations::status(&db,&list)?;
|
||||
println!("{} pending: {:?}",mode.name(),plan.iter().filter(|m|m.status!=migrations::Status::Applied).map(|m|(&m.db,&m.id,m.status)).collect::<Vec<_>>());
|
||||
}
|
||||
if args.get(3).is_some_and(|s| s == "--apply" || s == "--sql-only") {
|
||||
assert!(root.file_name().unwrap().to_string_lossy().starts_with("update-database-diagnosis-") && root.join(".coa-update-fixture").is_file(), "Only disposable fixture roots may be changed");
|
||||
if args[3] == "--sql-only" {
|
||||
let db = Db::from_repack(root, Account::Admin)?.for_realm(Mode::Coa);
|
||||
let identity = || -> coa_core::Result<String> {
|
||||
let mut rows = String::new();
|
||||
for (schema,table,columns) in [("acore_auth","account","id,HEX(username)"),("acore_characters","characters","guid,account,HEX(name)"),("acore_characters_wildcard","characters","guid,account,HEX(name)")] {
|
||||
rows.push_str(schema);
|
||||
rows.push_str(&db.query(&format!("SELECT {columns} FROM {schema}.{table} ORDER BY 1;"))?);
|
||||
}
|
||||
Ok(coa_core::fsx::sha256_bytes(rows.as_bytes()))
|
||||
};
|
||||
let before = identity()?;
|
||||
migrations::verify_files(&manifest.migrations,std::path::Path::new(&args[4]))?;
|
||||
for (index,mode) in [Mode::Coa,Mode::Wildcard].into_iter().enumerate() {
|
||||
let realm_db = db.clone().for_realm(mode);
|
||||
let list: Vec<_> = manifest.migrations.iter().filter(|m|index==0 || m.db!="auth").cloned().collect();
|
||||
let result = migrations::apply_pending(&realm_db,&list,std::path::Path::new(&args[4]),&||Ok("disposable fixture".into()))?;
|
||||
println!("{} SQL result: {}",mode.name(),serde_json::to_string(&result)?);
|
||||
if result.failed.is_some() {return Err("SQL failed; fixture preserved".into());}
|
||||
}
|
||||
assert_eq!(before,identity()?,"Account or character identity changed");
|
||||
println!("Account and character identities preserved: {}",before);
|
||||
let capture = root.join("captured-schema");
|
||||
coa_core::schema_check::capture(&db,&capture)?;
|
||||
println!("Captured schema SHA256: {}",coa_core::fsx::sha256_file(&capture.join(coa_core::schema_check::CONTRACT))?);
|
||||
return Ok(());
|
||||
}
|
||||
if args.len() != 5 { return Err("Migration directory required".into()); }
|
||||
use coa_core::update::{Env, RepackEnv};
|
||||
let meta = coa_core::registry::metadata_dir_for(root)?;
|
||||
let env = RepackEnv { root, meta_dir: &meta };
|
||||
let result = env.migrate(&manifest, std::path::Path::new(&args[4]));
|
||||
let _ = coa_core::driver::run(root, coa_core::driver::Verb::StopAll);
|
||||
println!("Application result: {}",serde_json::to_string(&result?)?);
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
@@ -7,19 +7,48 @@ use ed25519_dalek::{Signer, SigningKey};
|
||||
fn main() {
|
||||
let a: Vec<String> = std::env::args().skip(1).collect();
|
||||
let out = std::path::PathBuf::from(&a[0]);
|
||||
let src = out.with_file_name(format!("{}-src", out.file_name().unwrap().to_string_lossy()));
|
||||
let src = out.with_file_name(format!(
|
||||
"{}-src",
|
||||
out.file_name().unwrap().to_string_lossy()
|
||||
));
|
||||
let _ = std::fs::remove_dir_all(&src);
|
||||
let _ = std::fs::remove_dir_all(&out);
|
||||
for spec in &a[2..] {
|
||||
let (p, c) = spec.split_once('=').expect("path=content");
|
||||
let f = src.join(p);
|
||||
std::fs::create_dir_all(f.parent().unwrap()).unwrap();
|
||||
std::fs::write(f, c.replace("\n", "\n")).unwrap();
|
||||
std::fs::write(f, c.replace("\\n", "\n")).unwrap();
|
||||
}
|
||||
build(&src, &out, &BuildOptions { kind: Kind::Update, version: a[1].clone(), core_commit: None, built_at: chrono::Utc::now().to_rfc3339(), part_size: 1 << 20, bots_commit: None, migrations: vec![] }, &|_| {}).unwrap();
|
||||
let key = format!("{}/.coa-manager/signing/manifest-signing.key", std::env::var("USERPROFILE").unwrap());
|
||||
let seed: [u8; 32] = STANDARD.decode(std::fs::read_to_string(key).unwrap().trim()).unwrap().try_into().unwrap();
|
||||
let sig = SigningKey::from_bytes(&seed).sign(&std::fs::read(out.join("manifest.json")).unwrap());
|
||||
std::fs::write(out.join("manifest.json.sig"), STANDARD.encode(sig.to_bytes())).unwrap();
|
||||
build(
|
||||
&src,
|
||||
&out,
|
||||
&BuildOptions {
|
||||
kind: Kind::Update,
|
||||
version: a[1].clone(),
|
||||
core_commit: None,
|
||||
built_at: chrono::Utc::now().to_rfc3339(),
|
||||
part_size: 1 << 20,
|
||||
bots_commit: None,
|
||||
migrations: vec![],
|
||||
},
|
||||
&|_| {},
|
||||
)
|
||||
.unwrap();
|
||||
let key = format!(
|
||||
"{}/.coa-manager/signing/manifest-signing.key",
|
||||
std::env::var("USERPROFILE").unwrap()
|
||||
);
|
||||
let seed: [u8; 32] = STANDARD
|
||||
.decode(std::fs::read_to_string(key).unwrap().trim())
|
||||
.unwrap()
|
||||
.try_into()
|
||||
.unwrap();
|
||||
let sig =
|
||||
SigningKey::from_bytes(&seed).sign(&std::fs::read(out.join("manifest.json")).unwrap());
|
||||
std::fs::write(
|
||||
out.join("manifest.json.sig"),
|
||||
STANDARD.encode(sig.to_bytes()),
|
||||
)
|
||||
.unwrap();
|
||||
println!("package {} at {}", a[1], out.display());
|
||||
}
|
||||
@@ -1,18 +1,40 @@
|
||||
//! Probe only a disposable fixture: enable both worlds, verify isolation, gracefully stop both.
|
||||
use coa_core::{Error, Result, driver::{self, Verb}, realms::{self, Mode}, multiworld, process::{self, ServiceState}};
|
||||
use coa_core::{
|
||||
driver::{self, Verb},
|
||||
multiworld,
|
||||
process::{self, ServiceState},
|
||||
realms::{self, Mode},
|
||||
Error, Result,
|
||||
};
|
||||
use std::path::PathBuf;
|
||||
|
||||
fn main() -> Result<()> {
|
||||
let root = PathBuf::from(std::env::args().nth(1).ok_or_else(|| Error::Invalid("fixture path required".into()))?);
|
||||
if !root.file_name().is_some_and(|n| n.to_string_lossy().contains("fixture")) { return Err(Error::Invalid("Refusing a non-fixture server.".into())); }
|
||||
let root = PathBuf::from(
|
||||
std::env::args()
|
||||
.nth(1)
|
||||
.ok_or_else(|| Error::Invalid("fixture path required".into()))?,
|
||||
);
|
||||
if !root
|
||||
.file_name()
|
||||
.is_some_and(|n| n.to_string_lossy().contains("fixture"))
|
||||
{
|
||||
return Err(Error::Invalid("Refusing a non-fixture server.".into()));
|
||||
}
|
||||
let action = std::env::args().nth(2).unwrap_or_else(|| "smoke".into());
|
||||
if action == "stop" { driver::run(&root, Verb::StopAll)?; return Ok(()); }
|
||||
if action == "stop" {
|
||||
driver::run(&root, Verb::StopAll)?;
|
||||
return Ok(());
|
||||
}
|
||||
driver::run(&root, Verb::StopAll)?;
|
||||
if action == "wildcard" { realms::select(&root, Mode::Wildcard)?; }
|
||||
if action == "wildcard" {
|
||||
realms::select(&root, Mode::Wildcard)?;
|
||||
}
|
||||
multiworld::set_enabled(&root, true)?;
|
||||
let result = (|| {
|
||||
let out = driver::run(&root, Verb::StartAll)?;
|
||||
if !out.ok { return Err(Error::Invalid(out.output)); }
|
||||
if !out.ok {
|
||||
return Err(Error::Invalid(out.output));
|
||||
}
|
||||
let first = process::observe(&root, &coa_core::layout::read_ports(&root));
|
||||
let second_root = multiworld::root(&root);
|
||||
let second = process::observe(&second_root, &coa_core::layout::read_ports(&second_root));
|
||||
@@ -22,21 +44,32 @@ fn main() -> Result<()> {
|
||||
assert_ne!(first.world.port, second.world.port);
|
||||
assert!(second.mysql.pid.is_none() && second.auth.pid.is_none());
|
||||
let db = coa_core::db::Db::from_repack(&root, coa_core::db::Account::Admin)?;
|
||||
let realms = db.query("SELECT id,port,flag FROM acore_auth.realmlist WHERE id IN (1,2) ORDER BY id;")?;
|
||||
let realms = db.query(
|
||||
"SELECT id,port,flag FROM acore_auth.realmlist WHERE id IN (1,2) ORDER BY id;",
|
||||
)?;
|
||||
println!("Two distinct world PIDs; shared auth/MySQL; realm rows:\n{realms}");
|
||||
for mode in [Mode::Coa, Mode::Wildcard] {
|
||||
let problems = coa_core::schema_check::check(&db.clone().for_realm(mode), &root)?;
|
||||
println!("{}: {} database problems", mode.name(), problems.len());
|
||||
for p in problems.iter().take(5) { println!("{}.{}.{}: {}", p.database, p.table, p.column, p.detail); }
|
||||
for p in problems.iter().take(5) {
|
||||
println!("{}.{}.{}: {}", p.database, p.table, p.column, p.detail);
|
||||
}
|
||||
}
|
||||
assert!(multiworld::set_enabled(&root, false).is_err());
|
||||
assert!(realms::select(&root, Mode::Wildcard).is_err());
|
||||
Ok(())
|
||||
})();
|
||||
let stopped = driver::run(&root, Verb::StopAll)?;
|
||||
if !stopped.ok { return Err(Error::Invalid(stopped.output)); }
|
||||
if !stopped.ok {
|
||||
return Err(Error::Invalid(stopped.output));
|
||||
}
|
||||
assert!(!multiworld::is_running(&root));
|
||||
assert_eq!(process::observe(&root, &coa_core::layout::read_ports(&root)).mysql.state, ServiceState::Stopped);
|
||||
assert_eq!(
|
||||
process::observe(&root, &coa_core::layout::read_ports(&root))
|
||||
.mysql
|
||||
.state,
|
||||
ServiceState::Stopped
|
||||
);
|
||||
result?;
|
||||
println!("Both worlds shut down before the shared database.");
|
||||
Ok(())
|
||||
|
||||
Loaded 100 of 479 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user