Skip to content

feat(pairing): support mobile pairing through a distinct public hostname - #5674

Open
sazora wants to merge 1 commit into
block:mainfrom
sazora:pr-community-host-aliases
Open

feat(pairing): support mobile pairing through a distinct public hostname#5674
sazora wants to merge 1 commit into
block:mainfrom
sazora:pr-community-host-aliases

Conversation

@sazora

@sazora sazora commented Aug 12, 2026

Copy link
Copy Markdown

Problem

Deployments that serve the relay on a private hostname (VPN/tailnet, internal DNS) cannot complete mobile pairing: the pairing QR payload advertises the active workspace relay URL, which the mobile device may not be able to resolve from its network, and pointing a second public hostname at the relay does not resolve to the community (host lookup is exact-match).

Changes

  • Migration 0029 — community_host_aliases: multiple public hostnames can resolve to one durable community. lookup_community_by_host matches aliases case-insensitively and returns the canonical community host. Aliases cascade on community deletion and cannot resolve to archived communities.
  • Desktop — pairing payload relay URL override: BUZZ_PAIRING_PAYLOAD_RELAY_URL (runtime) or BUZZ_BUILD_PAIRING_PAYLOAD_RELAY_URL (build time) lets the QR payload advertise a publicly resolvable relay URL instead of the active workspace relay. Values are validated as absolute HTTP(S) URLs; default behavior is unchanged.
  • Compose — pairing-relay service: runs buzz-pair-relay on a loopback port (default 3500) with a websocket-handshake healthcheck, intended to sit behind the operator's TLS proxy. Documented in .env.example and the compose README. No change to existing services' required configuration.

Testing

  • cargo test -p buzz-db — 94 passed (includes new alias-lookup test, migration-count and migration-content assertions)
  • desktop cargo test --lib pairing — 16 passed (includes 2 new payload-resolution tests)
  • Running in production on our deployment: iPad pairs through a dedicated public pairing hostname while the workspace relay stays on a private tailnet hostname

🤖 Generated with Claude Code

Deployments that serve the relay on a private hostname (VPN/tailnet,
internal DNS) cannot complete mobile pairing today: the QR payload
advertises the workspace relay URL, which the mobile device may not be
able to resolve, and a second public hostname does not resolve to the
community.

- migration 0029: add community_host_aliases so multiple public
  hostnames resolve to one durable community; lookup_community_by_host
  now also matches aliases case-insensitively (alias rows return the
  canonical community host)
- desktop: allow overriding the pairing QR payload relay URL via
  BUZZ_PAIRING_PAYLOAD_RELAY_URL at runtime or
  BUZZ_BUILD_PAIRING_PAYLOAD_RELAY_URL at build time; validated as an
  absolute HTTP(S) URL, defaults to the active workspace relay
- compose: add a pairing-relay service running buzz-pair-relay on a
  loopback port with a websocket-handshake healthcheck, plus env and
  README documentation

Tests: buzz-db suite (94 passed) including new alias lookup and
migration assertions; desktop pairing suite (16 passed) including new
payload-resolution tests.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant