mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-29 13:05:46 +00:00
ipn/ipnstate: include DNSName in tailscale status --json output
This commit is contained in:
parent
2bac125cad
commit
5acbb149a2
@ -45,6 +45,7 @@ func (s *Status) Peers() []key.Public {
|
|||||||
type PeerStatus struct {
|
type PeerStatus struct {
|
||||||
PublicKey key.Public
|
PublicKey key.Public
|
||||||
HostName string // HostInfo's Hostname (not a DNS name or necessarily unique)
|
HostName string // HostInfo's Hostname (not a DNS name or necessarily unique)
|
||||||
|
DNSName string
|
||||||
OS string // HostInfo.OS
|
OS string // HostInfo.OS
|
||||||
UserID tailcfg.UserID
|
UserID tailcfg.UserID
|
||||||
|
|
||||||
@ -166,6 +167,9 @@ func (sb *StatusBuilder) AddPeer(peer key.Public, st *PeerStatus) {
|
|||||||
if v := st.HostName; v != "" {
|
if v := st.HostName; v != "" {
|
||||||
e.HostName = v
|
e.HostName = v
|
||||||
}
|
}
|
||||||
|
if v := st.DNSName; v != "" {
|
||||||
|
e.DNSName = v
|
||||||
|
}
|
||||||
if v := st.Relay; v != "" {
|
if v := st.Relay; v != "" {
|
||||||
e.Relay = v
|
e.Relay = v
|
||||||
}
|
}
|
||||||
|
@ -166,6 +166,7 @@ func (b *LocalBackend) UpdateStatus(sb *ipnstate.StatusBuilder) {
|
|||||||
UserID: p.User,
|
UserID: p.User,
|
||||||
TailAddr: tailAddr,
|
TailAddr: tailAddr,
|
||||||
HostName: p.Hostinfo.Hostname,
|
HostName: p.Hostinfo.Hostname,
|
||||||
|
DNSName: p.Name,
|
||||||
OS: p.Hostinfo.OS,
|
OS: p.Hostinfo.OS,
|
||||||
KeepAlive: p.KeepAlive,
|
KeepAlive: p.KeepAlive,
|
||||||
Created: p.Created,
|
Created: p.Created,
|
||||||
|
Loading…
Reference in New Issue
Block a user