fix: use configured connectIp for tunnel chain diagnosis

- Pass connectIp through resolveChainProbeTarget in diagnosis stream start items
- Pass connectIp in appendChainHopDiagnosis for full chain probes
- Reconstruct tunnel state with connectIp field preserved
- Fix forward service config when bindIP already contains port
- Add contract tests for connectIp diagnosis scenarios
- Add unit test for bindIP with port in buildForwardServiceConfigs
- Update AGENTS.md with plan document rules

Entire-Checkpoint: 35a2e61c2431
This commit is contained in:
sagitchu
2026-03-03 14:17:36 +08:00
parent e38335973d
commit 1c10347357
7 changed files with 295 additions and 5 deletions
@@ -887,6 +887,7 @@ func (h *Handler) reconstructTunnelState(tunnelID int64) (*tunnelCreateState, er
Strategy: r.Strategy,
ChainType: 3,
Port: r.Port,
ConnectIP: r.ConnectIP,
})
state.NodeIDList = append(state.NodeIDList, r.NodeID)
}
@@ -901,6 +902,7 @@ func (h *Handler) reconstructTunnelState(tunnelID int64) (*tunnelCreateState, er
ChainType: 2,
Inx: int(r.Inx),
Port: r.Port,
ConnectIP: r.ConnectIP,
})
state.NodeIDList = append(state.NodeIDList, r.NodeID)
}