From dcb0f189cc774e23b149d283fa16233217e754cf Mon Sep 17 00:00:00 2001 From: Kristoffer Dalby Date: Fri, 21 Jun 2024 11:48:06 +0200 Subject: [PATCH] cmd/proxy-to-grafana: add flag for alternative control server Fixes #12571 Signed-off-by: Kristoffer Dalby --- cmd/proxy-to-grafana/proxy-to-grafana.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cmd/proxy-to-grafana/proxy-to-grafana.go b/cmd/proxy-to-grafana/proxy-to-grafana.go index 35bebdbad..f1c67bad5 100644 --- a/cmd/proxy-to-grafana/proxy-to-grafana.go +++ b/cmd/proxy-to-grafana/proxy-to-grafana.go @@ -46,6 +46,7 @@ var ( backendAddr = flag.String("backend-addr", "", "Address of the Grafana server served over HTTP, in host:port format. Typically localhost:nnnn.") tailscaleDir = flag.String("state-dir", "./", "Alternate directory to use for Tailscale state storage. If empty, a default is used.") useHTTPS = flag.Bool("use-https", false, "Serve over HTTPS via your *.ts.net subdomain if enabled in Tailscale admin.") + loginServer = flag.String("login-server", "", "URL to alternative control server. If empty, the default Tailscale control is used.") ) func main() { @@ -57,8 +58,9 @@ func main() { log.Fatal("missing --backend-addr") } ts := &tsnet.Server{ - Dir: *tailscaleDir, - Hostname: *hostname, + Dir: *tailscaleDir, + Hostname: *hostname, + ControlURL: *loginServer, } // TODO(bradfitz,maisem): move this to a method on tsnet.Server probably.