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

@@ -500,6 +500,8 @@ func NewRouter(database *db.Database, wsHub *WSHub, configHandler *ConfigHandler
version = serverVersion[0]
}
reconHandler := NewReconHandler(database, wsHub, publicURLOverride)
r := chi.NewRouter()
// Middleware (global)
@@ -552,8 +554,10 @@ func NewRouter(database *db.Database, wsHub *WSHub, configHandler *ConfigHandler
vulnHandler := NewVulnHandler()
r.Get("/vuln/catalog", vulnHandler.Catalog)
reconHandler := NewReconHandler(database, wsHub)
r.Post("/recon/scan", reconHandler.Scan)
r.Post("/recon/relay-scan", reconHandler.RelayScan)
subnetDiscoveryHandler := NewSubnetDiscoveryHandler(database, wsHub)
r.Get("/recon/discovered-hosts", subnetDiscoveryHandler.GetDiscoveredHosts)
// Agents
r.Get("/agents", h.ListAgents)
@@ -820,6 +824,8 @@ func NewRouter(database *db.Database, wsHub *WSHub, configHandler *ConfigHandler
r.Get("/api/download/agent-mac", serveAgentBinary("mac"))
r.Get("/api/download/agent-linux", serveAgentBinary("linux"))
r.Get("/recon/ping/{scan_id}", reconHandler.CanaryPing)
// Serve frontend SPA
if webRoot != "" {
// Check if webroot directory exists