Skip to content

Fix tunnel edit preservation and configuration restore - #68

Closed
dr-hoseyn wants to merge 4 commits into
AminMGMT:mainfrom
dr-hoseyn:codex/fix-issue-59-config-routing
Closed

dr-hoseyn wants to merge 4 commits into
AminMGMT:mainfrom
dr-hoseyn:codex/fix-issue-59-config-routing

Conversation

@dr-hoseyn

@dr-hoseyn dr-hoseyn commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Unrelated edits could reset a working route or FEC ratio, leave an invalid direct configuration on disk, and make configuration-history restore fail after a JavaScript round trip. This fixes all six findings in #59.

  • Preserve the existing FEC ratio when its switch stays enabled, send only changed direct fields, and reject malformed data/parity shard indices before indexing receiver state.
  • Merge setup-link updates into the existing reverse-client specification, retaining its proxy, edge address, local bind, interface, socket mark, and local operating settings.
  • Carry history timestamps as exact decimal strings; restore also accepts exact legacy integer input.
  • Validate direct edits with the same configuration mapping as engine startup, then use transactional application for readiness checks, rollback and history. Preserve unrelated top-level configuration sections.
  • Preserve manual dial/retry timing and TCP socket-buffer pinning through load/edit/render.
  • Support settings and editing for existing layer-4 [direct] tunnels, with their own fields, CLI-matching performance presets and validation.

Validation: complete Linux validation for the exact PR revision passed the full suite, full race detector, global/per-package coverage floors, static analysis, vulnerability scan, parser fuzzing, compatibility, sustained traffic and amd64/arm64 builds. Runtime regressions for all six findings, the FEC index panic, and the layer-4 preset menu/application passed three times under race detection. The actual browser form helpers were also exercised locally for changed/reverted fields, layer-4 controls and exact JSON history timestamps.

Final combined validation with #66, #67 and #69 also passed the full suite, race detection on interacting packages, runtime regressions and the other Linux checks. All seven reviewed PR revisions (#60, #63, #65, #66, #67, #68 and #69) merged without conflicts in a temporary checkout and its Linux build passed. Direct restart failure/success checks use a systemctl fixture; they do not claim a live systemd deployment or real proxy routing.

Changes are confined to 12 existing production files. No files or tests were added.

Fixes #59

AminMGMT commented Oct 9, 2026

Copy link
Copy Markdown
Owner

Closing: this work is on main already, carried in by #85.

codex/fix-issue-59-config-routing is a git ancestor of codex/managed-xhttp-reality, and #85 even carries a commit named Merge PR 68 config preservation into managed carrier setup links. All six findings from #59 went in with 88b2900 — the setup-link merge into the existing reverse-client spec is in internal/manage/linkapply.go on main now.

Since #85 was squash-merged, re-merging this branch would three-way merge its earlier version of linkapply.go against the refined one on main, so it is closed rather than merged.


Generated by Claude Code

@AminMGMT AminMGMT closed this Oct 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Daily-use bugs: FEC crash after edits, lost client routing, and broken config restore

2 participants