mirror of
https://github.com/tailscale/tailscale.git
synced 2025-04-22 17:01:43 +00:00
ipn/ipnstate: put SSH Host Keys in ipnstate.PeerStatus
Updates #3802 Change-Id: I47ba3b4545b25988f375bd867aecd98bb0da8d79 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
parent
42ee4c917d
commit
cceacda5eb
ipn
@ -472,6 +472,7 @@ func (b *LocalBackend) populatePeerStatusLocked(sb *ipnstate.StatusBuilder) {
|
|||||||
ShareeNode: p.Hostinfo.ShareeNode(),
|
ShareeNode: p.Hostinfo.ShareeNode(),
|
||||||
ExitNode: p.StableID != "" && p.StableID == b.prefs.ExitNodeID,
|
ExitNode: p.StableID != "" && p.StableID == b.prefs.ExitNodeID,
|
||||||
ExitNodeOption: exitNodeOption,
|
ExitNodeOption: exitNodeOption,
|
||||||
|
SSH_HostKeys: p.Hostinfo.SSH_HostKeys().AsSlice(),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -145,6 +145,9 @@ type PeerStatus struct {
|
|||||||
PeerAPIURL []string
|
PeerAPIURL []string
|
||||||
Capabilities []string `json:",omitempty"`
|
Capabilities []string `json:",omitempty"`
|
||||||
|
|
||||||
|
// SSH_HostKeys are the node's SSH host keys, if known.
|
||||||
|
SSH_HostKeys []string `json:"sshHostKeys,omitempty"`
|
||||||
|
|
||||||
// ShareeNode indicates this node exists in the netmap because
|
// ShareeNode indicates this node exists in the netmap because
|
||||||
// it's owned by a shared-to user and that node might connect
|
// it's owned by a shared-to user and that node might connect
|
||||||
// to us. These nodes should be hidden by "tailscale status"
|
// to us. These nodes should be hidden by "tailscale status"
|
||||||
@ -284,6 +287,9 @@ func (sb *StatusBuilder) AddPeer(peer key.NodePublic, st *PeerStatus) {
|
|||||||
if v := st.OS; v != "" {
|
if v := st.OS; v != "" {
|
||||||
e.OS = st.OS
|
e.OS = st.OS
|
||||||
}
|
}
|
||||||
|
if v := st.SSH_HostKeys; v != nil {
|
||||||
|
e.SSH_HostKeys = v
|
||||||
|
}
|
||||||
if v := st.Addrs; v != nil {
|
if v := st.Addrs; v != nil {
|
||||||
e.Addrs = v
|
e.Addrs = v
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user