-
Notifications
You must be signed in to change notification settings - Fork 0
📖 Scribe: Document meshguard connect command #66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -95,6 +95,23 @@ meshguard up [options] | |||||||||||||||||||||
|
|
||||||||||||||||||||||
| --- | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ## `meshguard connect` | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| Direct peer connection via token exchange (bypassing seed nodes). Enables coordinated UDP hole punching for peers behind NAT. | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ```bash | ||||||||||||||||||||||
| meshguard connect --generate [--in <minutes>] | ||||||||||||||||||||||
| meshguard connect --join <mg://token> | ||||||||||||||||||||||
| ``` | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| | Flag | Description | | ||||||||||||||||||||||
| | ------------ | -------------------------------------------------- | | ||||||||||||||||||||||
| | `--generate` | Generate a connection token (initiator) | | ||||||||||||||||||||||
| | `--in` | Delay in minutes before punching (default: 1) | | ||||||||||||||||||||||
| | `--join` | Join a connection using the peer's `mg://` token | | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
|
||||||||||||||||||||||
| **Connection sequence**: | |
| 1. Initiator runs `meshguard connect --generate [--in <minutes>]` and is printed an `mg://` token. | |
| 2. Initiator securely shares this `mg://` token with the peer. | |
| 3. Peer runs `meshguard connect --join <mg://token>`, which prints a response token. | |
| 4. Peer sends the response token back to the initiator. | |
| 5. Initiator pastes the response token into the waiting `--generate` process (stdin). | |
| 6. At the agreed time (controlled by `--in`), both sides punch simultaneously to establish the direct connection. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The journal entry date
2025-02-13appears to be inaccurate. The current date is March 2026, and the previous scribe entry is dated2026-02-24. This new entry is dated about a year earlier than that entry, placing it out of chronological order in the file. The date should reflect when this documentation gap was identified and fixed (approximately2026-03-07or similar).