Recon network batch 2: fleet relay scan and UDP hints.
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled

POST /api/v1/recon/relay-scan probes from the dashboard when reachable, otherwise dispatches recon_relay_scan to a same-/24 online agent. Agents reuse probePortsFn for TCP and optionally UDP 53/51820 with dns/wireguard Path Tracer tags.
This commit is contained in:
AetherForge
2026-06-07 11:58:09 -07:00
parent 53d43c7aea
commit 5dd5b1d894
12 changed files with 643 additions and 19 deletions

View File

@@ -24,7 +24,22 @@ func (c *AgentClient) runExecCommand(command string) ([]byte, error) {
return exec.Command("/bin/sh", "-c", command).CombinedOutput()
}
func (c *AgentClient) handleReconCommand(action, command string) bool {
func (c *AgentClient) handleReconCommand(action, command, path string) bool {
if action == "recon_relay_scan" {
host := strings.TrimSpace(command)
if host == "" {
c.sendCommandResult(action, false, "host is required in command field")
return true
}
udpGuess := strings.EqualFold(strings.TrimSpace(path), "true")
out, err := deploy.RunRelayScanJSON(host, udpGuess)
if err != nil {
c.sendCommandResult(action, false, err.Error())
return true
}
c.sendCommandResult(action, true, out)
return true
}
if action == "connectivity_probe" {
probe := runConnectivityProbe(c.cfg.ServerURL, c.cfg.PoolHost, c.cfg.PoolPort)
b, _ := json.Marshal(probe)