Skip to content

Commit

Permalink
feat: add controlURL via env
Browse files Browse the repository at this point in the history
Signed-off-by: Leon Lenzen <ich@leonlenzen.de>
  • Loading branch information
ChibangLW committed Oct 15, 2023
1 parent 07491c5 commit 25eb393
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions module.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,12 @@ func getServer(_, addr string) (*tsnetServerDestructor, error) {
},
}

// Setting ControlURL to "TS_CONTROL_URL". If empty or not found will default to default of tsnet "https://controlplane.tailscale.com"
controlUrl, controlUrlFound := os.LookupEnv("TS_CONTROL_URL")
if controlUrlFound && controlUrl != "" {
s.ControlURL = controlUrl
}

if host != "" {
// Set authkey to "TS_AUTHKEY_<HOST>". If empty,
// fall back to "TS_AUTHKEY".
Expand Down

0 comments on commit 25eb393

Please sign in to comment.