model: DiscoveredService, reported by site agents as suggested targets

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
VeillaxandClaude Sonnet 5.5 committed 2026-10-27 16:53:17 -06:00
1 parent 6663b268c8
commit 61cdc823d0
1 file changed
+21 -8
+21 -8
View File
@@ -323,6 +323,18 @@ type ContainerPort struct {
Type string `json:"type"` Type string `json:"type"`
} }
// DiscoveredService is a listening service an agent found on its own network (local sockets or an
// opt-in scan of configured subnets). Hammerhead offers these as suggested targets; nothing is
// proxied until an administrator picks one.
type DiscoveredService struct {
Host string `json:"host"` // address to dial, as seen from the agent
Port int `json:"port"`
Proto string `json:"proto"` // "tcp"
Service string `json:"service,omitempty"` // best guess: http, https, ssh, smtp, ftp, mysql, ... (empty = unknown)
Detail string `json:"detail,omitempty"` // banner or Server header, trimmed
Source string `json:"source"` // "local" (listening socket on the agent's host) or "scan"
}
// EdgeReport is what blacktip posts back. // EdgeReport is what blacktip posts back.
type EdgeReport struct { type EdgeReport struct {
IPs []string `json:"ips"` IPs []string `json:"ips"`
@@ -363,14 +375,15 @@ type SiteConfig struct {
// SiteReport is what bamboo posts back. // SiteReport is what bamboo posts back.
type SiteReport struct { type SiteReport struct {
PublicKey string `json:"publicKey"` // the agent's WireGuard public key PublicKey string `json:"publicKey"` // the agent's WireGuard public key
MailEgress map[string]string `json:"mailEgress"` // egress ID -> "" (listening) or an error MailEgress map[string]string `json:"mailEgress"` // egress ID -> "" (listening) or an error
Connected []string `json:"connected"` Connected []string `json:"connected"`
Containers []Container `json:"containers"` Containers []Container `json:"containers"`
Version string `json:"version,omitempty"` Discovered []DiscoveredService `json:"discovered,omitempty"`
AutoUpdate bool `json:"autoUpdate,omitempty"` Version string `json:"version,omitempty"`
UpdateMsg string `json:"updateMsg,omitempty"` AutoUpdate bool `json:"autoUpdate,omitempty"`
UpdateID string `json:"updateId,omitempty"` UpdateMsg string `json:"updateMsg,omitempty"`
UpdateID string `json:"updateId,omitempty"`
// progress of that update, for the dashboard's progress bar and log // progress of that update, for the dashboard's progress bar and log
UpdateStage string `json:"updateStage,omitempty"` UpdateStage string `json:"updateStage,omitempty"`
UpdatePct int `json:"updatePct,omitempty"` UpdatePct int `json:"updatePct,omitempty"`