fix(relay): authenticate endpoints and fail closed on missing routes

This commit is contained in:
sagitchu
2026-11-08 23:31:08 +08:00
parent 46bfb86c1b
commit 7f0177491b
50 changed files with 5405 additions and 277 deletions
@@ -202,6 +202,13 @@ func (r *Repository) ListUsedPortsOnNode(nodeID int64) ([]int, error) {
}
}
pendingPorts, err := r.PendingTunnelCleanupPortsTx(nil, nodeID, 0)
if err != nil {
return nil, err
}
for _, port := range pendingPorts {
used[port] = struct{}{}
}
result := make([]int, 0, len(used))
for p := range used {
result = append(result, p)