Skip to content

cmd/tailcat: add a browse command and a forward --open-browser flag - #106

Merged
bradfitz merged 1 commit into
mainfrom
bradfitz/browse
Sep 9, 2026
Merged

cmd/tailcat: add a browse command and a forward --open-browser flag#106
bradfitz merged 1 commit into
mainfrom
bradfitz/browse

Conversation

@bradfitz

@bradfitz bradfitz commented Sep 9, 2026

Copy link
Copy Markdown
Member

Viewing a web server behind a tailcat server took two steps: run
"tailcat forward 0:80", then read the printed address off
stderr and paste it into a browser.

Add an --open-browser flag to forward that opens a web browser to the
local listener once it's listening, and a browse command that is an
alias for "forward --open-browser 0:80". The flag requires
exactly one port mapping, so there is no ambiguity about which
listener the browser should open. When the listener is bound to an
unspecified address such as 0.0.0.0, the browser opens 127.0.0.1
instead.

@bradfitz
bradfitz force-pushed the bradfitz/browse branch 2 times, most recently from 81dc564 to bc19277 Compare September 9, 2026 14:51
Viewing a web server behind a tailcat server took two steps: run
"tailcat forward <tc-addr> 0:80", then read the printed address off
stderr and paste it into a browser.

Add an --open-browser flag to forward that opens a web browser to the
local listener once it's listening, and a browse command that is an
alias for "forward --open-browser <tc-addr> 0:80". The flag requires
exactly one port mapping, so there is no ambiguity about which
listener the browser should open. When the listener is bound to an
unspecified address such as 0.0.0.0, the browser opens 127.0.0.1
instead.

Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
Change-Id: Idb189197f94e3588661e5cb170e041187c45be09
@bradfitz
bradfitz merged commit 91dc497 into main Sep 9, 2026
7 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