Add raw TCP serve mode - #2
Merged
Merged
Conversation
Adds a fourth serve mode, TCP, so non-web services (LND, electrs, Bitcoin P2P, ...) can be exposed over the tailnet — previously only interfaces that advertise HTTP(S) could be served. - serveConfig.ts: `tcp` joins the mode enum; serveModeLabel renders "TCP". - addExposureFromUrl.ts: the "Serve On Tailscale" form resolves the target interface and adapts — HTTP(S) interfaces still offer HTTPS/HTTP/Funnel/TCP (default HTTPS), while a non-web interface offers TCP alone (default TCP). The handler exempts TCP from the HTTP-advertisement check. - main.ts: TCP routes apply `tailscale serve --tcp=<port> tcp://localhost:<localPort>`, reusing the existing per-serve socat forwarder unchanged (it is already raw TCP). - utils.ts/sync.ts: buildTailnetUrl/exportPort handle TCP; the url-v0 export renders the served endpoint as `<magicdns>:<port>` (no scheme prefix), with the same Stop-Serve remove button. Funnel is not offered for TCP — Tailscale does not Funnel raw TCP. - i18n (es_ES/de_DE/pl_PL/fr_FR), README, instructions, TODO, and release notes updated. Builds, typechecks, and packs (v1.96.5:1). The signed-in `serve --tcp` apply needs a real Tailscale account to exercise, same as the HTTP serve path. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This was referenced Jun 29, 2026
Open
MattDHill
approved these changes
Jun 30, 2026
Author
|
Thanks for the review and merge, @MattDHill 🙏 |
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.
Adds a fourth serve mode — TCP — so non-web StartOS services (LND, electrs, Bitcoin P2P, …) can be exposed over the tailnet. Previously only interfaces advertising HTTP(S) could be served, which is the gap raised in #1.
How it works
tailscale serve --tcp=<port> tcp://localhost:<localPort>, reusing the existing per-servesocatforwarder unchanged (it is already raw TCP).<magicdns>:<port>(no scheme prefix), with the same Stop Tailscale Serve remove button.Scope / notes
serve --tcpapply needs a real Tailscale account to exercise end-to-end, same constraint as the existing HTTP serve path.Refs #1.
🤖 Generated with Claude Code