Skip to content

Commit d78d040

Browse files
committed
feat: add controlURL via env
1 parent 07491c5 commit d78d040

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

module.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,12 @@ func getServer(_, addr string) (*tsnetServerDestructor, error) {
104104
},
105105
}
106106

107+
// Setting ControlURL to "TS_CONTROL_URL". If empty or not found will default to default of tsnet "https://controlplane.tailscale.com"
108+
controlUrl, controlUrlFound := os.LookupEnv("TS_CONTROL_URL")
109+
if controlUrlFound && controlUrl != "" {
110+
s.ControlURL = controlUrl
111+
}
112+
107113
if host != "" {
108114
// Set authkey to "TS_AUTHKEY_<HOST>". If empty,
109115
// fall back to "TS_AUTHKEY".

0 commit comments

Comments
 (0)