Skip to content

cmd/tailcat: serve Unix-domain sockets - #104

Open
atirna wants to merge 2 commits into
tailscale:mainfrom
atirna:feat/serve-unix-sockets
Open

atirna wants to merge 2 commits into
tailscale:mainfrom
atirna:feat/serve-unix-sockets

Conversation

@atirna

@atirna atirna commented Sep 6, 2026

Copy link
Copy Markdown

Summary

  • Add tailcat serve --unix-socket=<path> for a local Unix-domain stream socket.
  • Each inbound tailcat stream gets a fresh connection to that socket on port 1, leaving the socket's existing filesystem permissions unchanged.

Why

This lets a local Unix-socket service be reached directly without first exposing it on a TCP port.

Testing

  • Before: current main has no --unix-socket serve option.
  • After: go test ./cmd/tailcat -run '^TestServeUnixSocket$' -count=1

Fixes #93

Comment thread README.md Outdated
Signed-off-by: Atirna <288419661+atirna@users.noreply.github.com>
Port 1 stays the default (the destination-less dial port), but the socket
can now be served on any port: --unix-socket=/run/x/socket,8022.
@atirna
atirna force-pushed the feat/serve-unix-sockets branch from 9f8c01b to be4b69e Compare September 19, 2026 20:16
@atirna

atirna commented Sep 19, 2026

Copy link
Copy Markdown
Author

added: --unix-socket now takes an optional ,port suffix (port 1 stays the default), the packet filter and dispatch key on the parsed port, and the README shows the forward command for reaching a custom port. ,8022 with an empty pathname is rejected at startup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for serving unix domain sockets

2 participants