The app keeps one durable address https://<secret>.<four-words>.wanderbooks.link: an Ed25519 key, a four-word name the app picks, and a 32-character base-36 secret label (about 165 bits), all in private (0600 / owner-only) files in the data root's link/ folder. One name per installation, as plan section 5 says; each company is a path under it. The line (yamux over TLS 1.3, the relay crate's own client) runs in the app's own process, not in the books server child: a window that dies takes its sockets with it, so the line can never keep a door open for books that closed. It reconnects with full-jitter backoff, pings every 30 s (the relay drops a line silent for 180 s), re-dials at once after a wall-clock jump (a sleep), and says in words what is wrong: no internet, the relay down, a busy relay, a wrong clock, a name the relay lost. TLS ends in the app with its own certificate (rustls, ALPN h2 and http/1.1), served only for the app's exact host name, then the plain stream goes to the remote door on 127.0.0.1 after the door's per-start secret and the relay's PROXY header. The private keys are never sent to the relay. Certificates are ordered by ACME DNS-01 (instant-acme, behind an Issuer trait so tests use an in-process authority) for the wildcard under the app's name, from the relay's authority list in its order (a not-usable one is skipped, a failing one falls to the next), stored, reused across restarts, and renewed at the time the authority's renewal information suggests, else two thirds through the life. New dependencies: instant-acme 0.8 (Apache-2.0; ring, hyper-rustls, time and x509-parser features, no aws-lc-rs), x509-parser 0.18 and webpki-root-certs 1 (already in the tree), time and async-trait for tests. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
48 lines
1.8 KiB
TOML
48 lines
1.8 KiB
TOML
[workspace]
|
|
resolver = "2"
|
|
members = ["crates/ledger-core", "crates/ledger-store", "crates/ledger-config", "crates/ledger-mcp", "crates/ledger-import", "crates/ledger-reader", "crates/ledger-cli", "crates/ledger-gui", "crates/ledger-vault", "crates/ledger-host", "crates/ledger-package", "crates/relay", "crates/ledger-link"]
|
|
|
|
[workspace.package]
|
|
edition = "2024"
|
|
license = "MIT OR Apache-2.0"
|
|
repository = "https://git.swaits.com/swaits/wanderbooks"
|
|
# The crates are parts of one program, built from this tree and shipped as
|
|
# its packages. None is a library for crates.io, and saying so lets
|
|
# `cargo deny` accept their path dependencies on each other.
|
|
publish = false
|
|
|
|
[workspace.lints.rust]
|
|
missing_docs = "warn"
|
|
# `cargo kani` sets cfg(kani) for the proof harnesses.
|
|
unexpected_cfgs = { level = "warn", check-cfg = ["cfg(kani)"] }
|
|
|
|
# Argon2id at the plan's 64 MiB, three passes, takes seconds unoptimized:
|
|
# its crates are built optimized in debug and test builds too.
|
|
[profile.dev.package.argon2]
|
|
opt-level = 3
|
|
|
|
[profile.dev.package.blake2]
|
|
opt-level = 3
|
|
|
|
# `wanderbooks update` hashes and verifies a whole program (P11a); its
|
|
# tests do it over a debug build's hundreds of megabytes.
|
|
[profile.dev.package.sha2]
|
|
opt-level = 3
|
|
|
|
[profile.dev.package.minisign]
|
|
opt-level = 3
|
|
|
|
[profile.dev.package.minisign-verify]
|
|
opt-level = 3
|
|
|
|
# The program that ships in the packages (P11a): symbols stripped, so the
|
|
# AppImage, .deb and .rpm are not carrying debug tables.
|
|
[profile.release]
|
|
strip = "symbols"
|
|
# The shipped program refuses the way the tested one does. Without this an
|
|
# integer that overflows wraps silently in a release build and panics in
|
|
# a test build, so the tests would be checking a program nobody runs.
|
|
# Money is Decimal and goes through the kernel's checked arithmetic; this
|
|
# covers the integers around it (counts, sequence numbers, minor units).
|
|
overflow-checks = true
|