@@ -22,6 +22,9 @@ type TSApp struct {
2222 // DefaultAuthKey is the default auth key to use for Tailscale if no other auth key is specified.
2323 DefaultAuthKey string `json:"auth_key,omitempty" caddy:"namespace=tailscale.auth_key"`
2424
25+ // ControlURL specifies the default control URL to use for nodes.
26+ ControlURL string `json:"control_url,omitempty" caddy:"namespace=tailscale.control_url"`
27+
2528 // Ephemeral specifies whether Tailscale nodes should be registered as ephemeral.
2629 Ephemeral bool `json:"ephemeral,omitempty" caddy:"namespace=tailscale.ephemeral"`
2730
@@ -38,6 +41,9 @@ type TSNode struct {
3841 // AuthKey is the Tailscale auth key used to register the node.
3942 AuthKey string `json:"auth_key,omitempty" caddy:"namespace=auth_key"`
4043
44+ // ControlURL specifies the control URL to use for the node.
45+ ControlURL string `json:"control_url,omitempty" caddy:"namespace=tailscale.control_url"`
46+
4147 // Ephemeral specifies whether the node should be registered as ephemeral.
4248 Ephemeral bool `json:"ephemeral,omitempty" caddy:"namespace=tailscale.ephemeral"`
4349
@@ -119,6 +125,11 @@ func parseTSNode(d *caddyfile.Dispenser) (TSNode, error) {
119125 return node , segment .ArgErr ()
120126 }
121127 node .AuthKey = segment .Val ()
128+ case "control_url" :
129+ if ! segment .NextArg () {
130+ return node , segment .ArgErr ()
131+ }
132+ node .ControlURL = segment .Val ()
122133 case "ephemeral" :
123134 node .Ephemeral = true
124135 default :
0 commit comments