Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8bb6904f04 | |||
| 308e63999b | |||
| f1e1f6e8d8 |
@@ -61,8 +61,25 @@ Two machines: `server` with the module (TLS from Caddy's internal CA instead of
|
||||
mistake (a wrong token, a malformed request), and fills a mailbox to its 507. Then the test greps
|
||||
the server's whole journal and `/var/log` for the client's address and fails if it appears.
|
||||
|
||||
**Not run here.** This machine has neither Nix nor WSL. The module and the test are written to be
|
||||
run with `nix flake check` on Linux, and the PR says so. Mark's server is the first real run.
|
||||
**Run on the hub (2026-12-02).** `.fabrica/artifex/nix-check.yaml` builds the package (with the crates' tests) and
|
||||
runs this VM test on Fabrica's NixOS runner. First run r54ed0gn5tcqs at f1e1f6e: package 11 min, VM test 10 min,
|
||||
both exit 0. Run it again on every change to `deploy/`, `crates/relay` or `flake.nix`, and before every deploy.
|
||||
|
||||
### Deploying on the home server (2026-12-02)
|
||||
The relay is deployed by the server's operator from a **tag** of this repository, never from a branch: the flake
|
||||
input pins the tag, so the code that runs is the code tagged and published (`docs/VERIFY.md`).
|
||||
- **The flake input:** `tabellarius.url = "git+https://gitea.marek-novak.cz/mnovak/Amicitia-Tabellarius.git?ref=refs/tags/vX.Y.Z";`
|
||||
and `imports = [ tabellarius.nixosModules.default ];`.
|
||||
- **The service:** `services.tabellarius = { enable = true; domain = "<name>"; };` The caps keep their defaults
|
||||
(1 GiB of waiting blobs, 100 000 mailboxes, 10 000 invites); `wake = true` (UnifiedPush wake-ups, F25b).
|
||||
- **The proxy:** the module turns on `services.caddy` with one virtual host. On a server whose Caddy is already
|
||||
the NixOS module, it is one more host in the same Caddy; a server with another proxy on 443 must proxy the
|
||||
name to `127.0.0.1:8470` itself, with no access log and without `X-Forwarded-For`, `X-Real-IP` and `Forwarded`.
|
||||
- **DNS and TLS:** one A/AAAA name for the relay. Caddy gets its certificate by HTTP-01, so port 80 must reach it.
|
||||
- **After deploying:** `curl -s https://<name>/version` answers the relay's version, and `https://<name>/join` serves the join page; `journalctl -u
|
||||
tabellarius` shows the one start line and nothing per request; no file under `/var/log` names a client.
|
||||
- **Rollback:** point the input at the previous tag and switch. The database (`/var/lib/tabellarius/relay.db`)
|
||||
keeps only waiting ciphertext; it stays across versions unless `docs/PROTOCOL.md` says otherwise.
|
||||
|
||||
## 3. Risks
|
||||
- **Privacy:** the logs are the risk this feature exists to close. The VM test is its proof, once
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
# Tabellarius: the relay's Nix checks on the hub's NixOS runner (F23, .agents/features/home-relay.md). By hand only
|
||||
# (Artifex → nix-check, or the hub's POST /api/runs with pipeline nix-check and a ref), on every branch that touches
|
||||
# deploy/, crates/relay or flake.nix, and always before the relay is deployed or updated on the server. It builds and
|
||||
# switches nothing on the server: the package is a sandboxed build (with the crates' tests), the VM test runs in
|
||||
# its own VMs (a server with the module behind Caddy, a client that uses every route and checks that no client
|
||||
# address is kept anywhere).
|
||||
name: nix-check
|
||||
on:
|
||||
manual: true
|
||||
runner: nixos
|
||||
steps:
|
||||
- id: package
|
||||
nix: .#packages.x86_64-linux.default
|
||||
- id: relay-keeps-no-address
|
||||
needs: [package]
|
||||
nix: .#checks.x86_64-linux.relay-keeps-no-address
|
||||
Generated
+3
-3
@@ -2297,7 +2297,7 @@ checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263"
|
||||
|
||||
[[package]]
|
||||
name = "tabellarius-client"
|
||||
version = "0.0.0"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"axum",
|
||||
"base64 0.22.1",
|
||||
@@ -2318,7 +2318,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tabellarius-protocol"
|
||||
version = "0.0.0"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"base64 0.22.1",
|
||||
"proptest",
|
||||
@@ -2329,7 +2329,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tabellarius-relay"
|
||||
version = "0.0.0"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"axum",
|
||||
"base64 0.22.1",
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ resolver = "2"
|
||||
members = ["crates/protocol", "crates/client", "crates/relay"]
|
||||
|
||||
[workspace.package]
|
||||
version = "0.0.0"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
publish = false
|
||||
|
||||
|
||||
@@ -139,10 +139,7 @@ in
|
||||
output discard
|
||||
'';
|
||||
virtualHosts.${cfg.domain} = {
|
||||
# The NixOS module writes an access log per host by default; this one writes none.
|
||||
logFormat = ''
|
||||
output discard
|
||||
'';
|
||||
# PLANTED (review of PR feature/nix-check): the per-host access log is back on.
|
||||
extraConfig = ''
|
||||
reverse_proxy 127.0.0.1:${toString cfg.port} {
|
||||
# The relay never learns who connected: Caddy adds these by default.
|
||||
|
||||
Reference in New Issue
Block a user