Repository navigation
Reach a machine's contexts from your other devices on Tailscale - #41
Merged
Merged
Conversation
- grove share gives every hostname the machine's name and serves them on the tailnet, standing down on any other - Never takes tailnet port 443 from another Serve handler such as t3code - doctor names whichever part of sharing is missing
- grove trust <host> fetches a sharing machine's root over its tailnet address and installs it - grove trust --send <device> delivers the root to a phone over Taildrop - The split DNS resolver answers over TCP too, which resolvers fall back to
- Port 443 held by a foreground tailscale serve is left alone - NODE_EXTRA_CA_CERTS carries trusted peer roots alongside this one
This was referenced Nov 1, 2026
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.
Grove only served loopback, so a worktree running on one machine couldn't be opened from a laptop or phone. This adds sharing over Tailscale, and the trust to open those hostnames without a warning.
Sharing
grove shareties a machine to the tailnet it's on. Every hostname gains the machine's name,app.grov.sitebecomingapp.<host>.grov.site, so the same worktree on two machines is two origins, and the origin is the same from every device, the machine itself included.*.<host>.grov.siteon its tailnet address (UDP and TCP) and forwards tailnet port 443 to itself through Tailscale Serve as raw TCP, so it still picks the route and certificate from the hostname.grove share --offtakes effect without a restart.grove shareprints. Answering on port 53 lowers the unprivileged port floor, offered the waygrove installoffers its own step.Trust
Each machine has its own root, so opening another machine's hostnames means trusting its root.
grove trust <host>fetches a sharing machine's root and installs it. It dials the peer's tailnet IP from Tailscale's peer list, never DNS, which WireGuard ties to that node's key, and refuses a root the served certificate doesn't chain to.grove trust --send <device>delivers this machine's root to a phone over Taildrop and prints the install steps for its OS.NODE_EXTRA_CA_CERTScarries trusted peer roots, anduninstallremoves the ones trust added.Doctor
A Sharing check names whichever part is missing: Tailscale disconnected, another tailnet, nothing answering DNS, the split DNS entry absent, or 443 held by something else.
Testing
go test -race -count=1 ./...,go vet ./...,gofmt -l ., a darwin cross-build, and the docs build and link check.cmd/grove'sTestMainnow gives the suite its own state directory, since a maintainer's own share record renamed every hostname the tests expect.grove trustand delivered with--send.Found along the way, not fixed here
On Linux, Tailscale in direct mode writes
/etc/resolv.confwhile nss resolves through systemd-resolved, which then races MagicDNS against the LAN's DNS and occasionally answers a grove name with127.0.0.4. Linking/etc/resolv.confto resolved's stub fixes it. Doctor can't yet tell this apart from a missing split DNS entry, and that, plus sharing stopping after a reboot until grove starts, are follow-ups.