mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-11 05:07:33 +00:00
tsconnect: add flag to specify control server (#5294)
To improve the local development experience, this change allows a control url to be passed in with the `--dev-control=` flag. If the flag is passed in when not specifying dev, an error is returned. If no flag is passed, the default remains the Tailscale controlled control server set by `ipn.DefaultControlURL`. Co-authored-by: Maisem Ali <maisem@tailscale.com> Signed-off-by: Charlotte Brandhorst-Satzkorn <charlotte@tailscale.com>
This commit is contained in:

committed by
GitHub

parent
f371a1afd9
commit
5055e00cf1
@@ -42,6 +42,9 @@ import (
|
||||
"tailscale.com/words"
|
||||
)
|
||||
|
||||
// ControlURL defines the URL to be used for connection to Control.
|
||||
var ControlURL = ipn.DefaultControlURL
|
||||
|
||||
func main() {
|
||||
js.Global().Set("newIPN", js.FuncOf(func(this js.Value, args []js.Value) interface{} {
|
||||
if len(args) != 1 {
|
||||
@@ -244,7 +247,7 @@ func (i *jsIPN) run(jsCallbacks js.Value) {
|
||||
err := i.lb.Start(ipn.Options{
|
||||
StateKey: "wasm",
|
||||
UpdatePrefs: &ipn.Prefs{
|
||||
ControlURL: ipn.DefaultControlURL,
|
||||
ControlURL: ControlURL,
|
||||
RouteAll: false,
|
||||
AllowSingleHosts: true,
|
||||
WantRunning: true,
|
||||
|
Reference in New Issue
Block a user