diff --git a/model/model.go b/model/model.go index 14a3e02..c1351f2 100644 --- a/model/model.go +++ b/model/model.go @@ -82,6 +82,10 @@ type Site struct { Tags []string `json:"tags,omitempty"` // labels for grouping and filtering in the dashboard + // What the agent last said about its SSH server (see SiteReport.SSH and SSHRelay). + SSH string `json:"ssh,omitempty"` + SSHRelay bool `json:"sshRelay,omitempty"` + TunnelIP string `json:"tunnelIp,omitempty"` // the site's address inside the tunnel network PublicKey string `json:"publicKey,omitempty"` // WireGuard public key, reported by the agent @@ -462,6 +466,11 @@ type SiteConfig struct { Edges []EdgeRef `json:"edges"` UpdateID string `json:"updateId,omitempty"` // an administrator asked this agent to update itself now; echoed back in its report + // Terminals lists terminal sessions waiting for this agent. For each, the agent opens a connection + // to hammerhead at /site/terminal/ and joins it to its own SSH server, so a shell can be opened + // from the dashboard without any port being open on an edge. + Terminals []string `json:"terminals,omitempty"` + MailEgress []MailSpec `json:"mailEgress"` } @@ -476,6 +485,10 @@ type SiteReport struct { AutoUpdate bool `json:"autoUpdate,omitempty"` UpdateMsg string `json:"updateMsg,omitempty"` UpdateID string `json:"updateId,omitempty"` + // SSH is where this machine's SSH server listens ("" when it is not running). SSHRelay says this + // agent can answer SiteConfig.Terminals, which is how an agent that is too old to relay shows itself. + SSH string `json:"ssh,omitempty"` + SSHRelay bool `json:"sshRelay,omitempty"` // progress of that update, for the dashboard's progress bar and log UpdateStage string `json:"updateStage,omitempty"` UpdatePct int `json:"updatePct,omitempty"`