-
Notifications
You must be signed in to change notification settings - Fork 0
📖 Scribe: Document meshguard connect command #65
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 | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -137,6 +137,29 @@ meshguard config show | |||||||||||||||||||||
|
|
||||||||||||||||||||||
| --- | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ## `meshguard connect` | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| Direct peer connection via token exchange (no seed node needed). Performs a coordinated UDP hole punch. | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ```bash | ||||||||||||||||||||||
| meshguard connect --generate [--in <minutes>] | ||||||||||||||||||||||
| meshguard connect --join <mg://token> | ||||||||||||||||||||||
| ``` | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| | Flag | Description | | ||||||||||||||||||||||
| | -------------- | ---------------------------------------------- | | ||||||||||||||||||||||
| | `--generate` | Generate an initial token to share with a peer | | ||||||||||||||||||||||
| | `--join` | Accept a token and generate a response token | | ||||||||||||||||||||||
| | `--in <mins>` | Delay until punch time (default: 1 minute) | | ||||||||||||||||||||||
|
Comment on lines
+149
to
+153
|
||||||||||||||||||||||
| | Flag | Description | | |
| | -------------- | ---------------------------------------------- | | |
| | `--generate` | Generate an initial token to share with a peer | | |
| | `--join` | Accept a token and generate a response token | | |
| | `--in <mins>` | Delay until punch time (default: 1 minute) | | |
| | Flag | Description | | |
| | ----------------- | --------------------------------------------------------------------------- | | |
| | `--generate` | Generate an initial token to share with a peer | | |
| | `--join` | Accept a token and generate a response token | | |
| | `--in <minutes>` | Initiator-only: delay punch time when using `--generate` (default: 1 minute) | |
Copilot
AI
Mar 6, 2026
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 connect flow mutates local trust/config on success (it auto-adds the peer to authorized_keys and saves the punched endpoint as a seed). This is security-relevant behavior and should be documented explicitly so users understand it’s not a purely ephemeral connection attempt.
| **Security note**: On successful connection, `meshguard connect` **persists trust state**: | |
| - The remote peer is added to your local trust/`authorized_keys` (or equivalent) store. | |
| - The discovered endpoint is saved as a seed for future connections. | |
| This is **not** a purely ephemeral connectivity test. Only run `connect` with peers you intend to trust, and clean up the corresponding entries if you want to revoke that trust later. |
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.
meshguard connectbinds the gossip UDP port (51821) and will fail if the daemon is already running (it only attempts to stop the systemd service). The docs should mention that the port must be free / meshguard should be stopped (or run as a service) before runningconnect, to avoid confusing bind errors.