relay
diapason.succes.relay
¶
HTTPS relay helpers for Succès multi-device sync.
The Mac stays the source of truth. A guest device (another Diapason instance) talks to a user-chosen base URL that reaches the host — LAN, Tailscale, Cloudflare Tunnel, or any reverse proxy. Pairing and exchange authenticate with one-time / long-lived sync tokens, not the local Diapason API key.
normalize_relay_url(raw)
¶
Validate and normalize a user-provided sync relay base URL.
relay_post(base_url, path, payload)
¶
POST JSON to {base}{path} without a Diapason API key.
Guarded by the local-only contract: unlike opening a URL in the user's
own browser, this ships the user's OWN DATA (tasks, notes, habits) to a
remote host. local_only may never be overridden by a per-feature
switch, so syncing to a non-loopback relay requires turning it off — a
deliberate, informed decision, surfaced here in plain French rather than
failing with an opaque network error.