diff --git a/tailcfg/tailcfg.go b/tailcfg/tailcfg.go index 4b57de4aa..0908c15ad 100644 --- a/tailcfg/tailcfg.go +++ b/tailcfg/tailcfg.go @@ -219,6 +219,10 @@ type Node struct { MachineAuthorized bool `json:",omitempty"` // TODO(crawshaw): replace with MachineStatus + // Tailscale cert domain used to represent the alias applied whether by default, shared or custom. + // Combination of a TCD prefix that is default, tails-scales or custom with the ts.net public suffix. + TailnetName string `json:",omitempty"` // ??.ts.net + // Capabilities are capabilities that the node has. // They're free-form strings, but should be in the form of URLs/URIs // such as: @@ -234,7 +238,6 @@ type Node struct { ComputedName string `json:",omitempty"` // MagicDNS base name (for normal non-shared-in nodes), FQDN (without trailing dot, for shared-in nodes), or Hostname (if no MagicDNS) computedHostIfDifferent string // hostname, if different than ComputedName, otherwise empty ComputedNameWithHost string `json:",omitempty"` // either "ComputedName" or "ComputedName (computedHostIfDifferent)", if computedHostIfDifferent is set - TailnetName string `json:",omitempty"` // SSO Tailnet name } // DisplayName returns the user-facing name for a node which should diff --git a/tailcfg/tailcfg_clone.go b/tailcfg/tailcfg_clone.go index 13257661b..a0e6e4699 100644 --- a/tailcfg/tailcfg_clone.go +++ b/tailcfg/tailcfg_clone.go @@ -91,11 +91,11 @@ var _NodeCloneNeedsRegeneration = Node(struct { Online *bool KeepAlive bool MachineAuthorized bool + TailnetName string Capabilities []string ComputedName string computedHostIfDifferent string ComputedNameWithHost string - TailnetName string }{}) // Clone makes a deep copy of Hostinfo. diff --git a/tailcfg/tailcfg_view.go b/tailcfg/tailcfg_view.go index 956b7d4c2..a89076517 100644 --- a/tailcfg/tailcfg_view.go +++ b/tailcfg/tailcfg_view.go @@ -170,10 +170,10 @@ func (v NodeView) Online() *bool { func (v NodeView) KeepAlive() bool { return v.ж.KeepAlive } func (v NodeView) MachineAuthorized() bool { return v.ж.MachineAuthorized } +func (v NodeView) TailnetName() string { return v.ж.TailnetName } func (v NodeView) Capabilities() views.Slice[string] { return views.SliceOf(v.ж.Capabilities) } func (v NodeView) ComputedName() string { return v.ж.ComputedName } func (v NodeView) ComputedNameWithHost() string { return v.ж.ComputedNameWithHost } -func (v NodeView) TailnetName() string { return v.ж.TailnetName } func (v NodeView) Equal(v2 NodeView) bool { return v.ж.Equal(v2.ж) } // A compilation failure here means this code must be regenerated, with the command at the top of this file. @@ -200,11 +200,11 @@ var _NodeViewNeedsRegeneration = Node(struct { Online *bool KeepAlive bool MachineAuthorized bool + TailnetName string Capabilities []string ComputedName string computedHostIfDifferent string ComputedNameWithHost string - TailnetName string }{}) // View returns a readonly view of Hostinfo.