cli/set: add printout when web client started

Prints a helpful message with the web UI's address when running
tailscale set --webclient.

Updates tailscale/corp#16345

Signed-off-by: Sonia Appasamy <sonia@tailscale.com>
will/webclient-csrf
Sonia Appasamy 11 months ago committed by Sonia Appasamy
parent 4ce33c9758
commit ea9c7f991a

@ -12,6 +12,7 @@ import (
"os/exec" "os/exec"
"github.com/peterbourgon/ff/v3/ffcli" "github.com/peterbourgon/ff/v3/ffcli"
"tailscale.com/client/web"
"tailscale.com/clientupdate" "tailscale.com/clientupdate"
"tailscale.com/ipn" "tailscale.com/ipn"
"tailscale.com/net/netutil" "tailscale.com/net/netutil"
@ -193,7 +194,15 @@ func runSet(ctx context.Context, args []string) (retErr error) {
} }
_, err = localClient.EditPrefs(ctx, maskedPrefs) _, err = localClient.EditPrefs(ctx, maskedPrefs)
return err if err != nil {
return err
}
if setArgs.runWebClient && len(st.TailscaleIPs) > 0 {
printf("\nWeb interface now running at %s:%d", st.TailscaleIPs[0], web.ListenPort)
}
return nil
} }
// calcAdvertiseRoutesForSet returns the new value for Prefs.AdvertiseRoutes based on the // calcAdvertiseRoutesForSet returns the new value for Prefs.AdvertiseRoutes based on the

Loading…
Cancel
Save