Documentation
¶
Overview ¶
Package hosts discovers the user's machines without connecting to any of them.
Candidates come from `tailscale status --json` (phones and expired nodes dropped, machines shared by other people marked) and from `~/.ssh/config` aliases (following Include; Match blocks are left to ssh). The two lists are merged by address and name. Consent and host-key trust are recorded elsewhere (config and package transport); a machine is contacted only after the user allows it.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Alias ¶
type Alias struct {
Names []string // every name on the Host line
HostName string
User string
Port string
}
Alias is one concrete Host entry from ssh config (wildcard patterns are skipped).
func SSHConfigAliases ¶
SSHConfigAliases lists concrete Host aliases from an ssh config file and the files it Includes. Real connection settings are always resolved later with `ssh -G`, which handles Match, ProxyJump and every other directive exactly like ssh.
type Candidate ¶
type Candidate struct {
Name string `json:"name"` // short label
Destination string `json:"destination"` // what ssh is given
Via []string `json:"via"` // tailscale, ssh-config
OS string `json:"os,omitempty"`
Online *bool `json:"online,omitempty"` // tailscale's view, if known
DNSName string `json:"dnsName,omitempty"`
IPs []string `json:"ips,omitempty"`
Owner string `json:"owner,omitempty"`
OtherOwner bool `json:"otherOwner,omitempty"` // shared into the tailnet by someone else
SSHHostKeys []string `json:"sshHostKeys,omitempty"`
Self bool `json:"self,omitempty"`
LastSeen string `json:"lastSeen,omitempty"`
}
Candidate is a machine found by discovery. Discovery never connects to anything.