Skip to content

cmd/tailcat: add port:target mappings to serve - #128

Merged
bradfitz merged 1 commit into
mainfrom
bradfitz/serve-target
Sep 21, 2026
Merged

bradfitz merged 1 commit into
mainfrom
bradfitz/serve-target

Conversation

@bradfitz

Copy link
Copy Markdown
Member

Served ports were always proxied to the same port on localhost. To
reach one service on another host on the server's network, such as an
Android device's adb port on the LAN, the only options were exit-node
mode, which exposes the whole network, or the exec service wrapping
socat.

A serve spec entry may now be "port:target", where the target is a
bare port meaning that port on localhost ("8080:80") or a host:port
elsewhere ("5555:10.2.200.213:5555", IPv6 in brackets). Mappings mix
with plain ports, ranges, and services in the same spec, join the
served-ports packet filter like any other port, and are announced at
startup with one "# Proxying port N to host:port" line each.

Served ports were always proxied to the same port on localhost. To
reach one service on another host on the server's network, such as an
Android device's adb port on the LAN, the only options were exit-node
mode, which exposes the whole network, or the exec service wrapping
socat.

A serve spec entry may now be "port:target", where the target is a
bare port meaning that port on localhost ("8080:80") or a host:port
elsewhere ("5555:10.2.200.213:5555", IPv6 in brackets). Mappings mix
with plain ports, ranges, and services in the same spec, join the
served-ports packet filter like any other port, and are announced at
startup with one "# Proxying port N to host:port" line each.

Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
@bradfitz
bradfitz merged commit 7241199 into main Sep 21, 2026
9 checks passed
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.

1 participant