feat(share): zero-config onboarding — public relay as default transport - #24
Merged
Conversation
… transport `share init` → `share invite` now works out of the box: with nothing configured, the client talks to https://relay.terra-sandbox.ru. Baking the URL in is safe because the relay is blind — everything it carries is sealed and signed client-side, so which relay both sides use is coordination, not trust — and a built-in default is the one value two strangers already agree on. Explicit config still wins: SESSION_RECALL_RELAY_URL for your own relay, SESSION_RECALL_SHARE_TRANSPORT_DIR for a shared folder, and SESSION_RECALL_RELAY_URL=none for installs that must never speak to the network (with a folder configured, none disables only the relay). The relay URL is deliberately NOT taken from the pairing bundle: a bundle is peer-supplied data, and a URL inside it would let a malicious bundle point this client at an attacker's server. Changing relays stays manual. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Onboarding drops to
share init→share invite: with nothing configured the client useshttps://relay.terra-sandbox.ru. Safe to bake in because the relay is blind — everything it carries is sealed and signed client-side, so the relay choice is coordination, not trust, and a built-in default is the one value two strangers already agree on.Precedence:
SESSION_RECALL_RELAY_URL(own relay) →SESSION_RECALL_SHARE_TRANSPORT_DIR(shared folder) → default relay.SESSION_RECALL_RELAY_URL=none|offopts out of the network entirely (with a folder configured it disables only the relay).Rejected: carrying the relay URL in the pairing bundle — peer-supplied data must not choose where this client sends.
Tests: 274 passed.
🤖 Generated with Claude Code