mirror of
https://github.com/Sagit-chu/flvx.git
synced 2026-09-28 07:36:38 +08:00
931 B
931 B
028 - Sync Forward Ports On Tunnel Entry Change
Goal
When a tunnel's entry nodes change, automatically keep all forwards under that tunnel aligned by rebuilding forward_port rows to match the latest entry node set.
Scope
- Backend only: update tunnel mutation flow to sync forward entry mappings.
- Preserve existing forward port and bind IP behavior:
- Keep the existing forward port (choose the current min port in
forward_port). - Preserve
in_iponly when the tunnel has a single entry node; clearin_ipfor multi-entry tunnels.
- Keep the existing forward port (choose the current min port in
Checklist
- Capture old entry node IDs before tunnel update commits.
- After commit, compare old/new entry node sets.
- If changed, rebuild
forward_portfor all forwards in the tunnel. - Run
go test ./...ingo-backend.
Notes
- Runtime redeploy/downlink is handled elsewhere; this change focuses on DB-level consistency of forward entry mappings.