fix(cfsetup): 隧道凭据文件校验 JSON 与 TunnelID,损坏或不匹配时移开并重新获取,失败页提示重试可收敛

This commit is contained in:
Lemon-miaow committed 2026-09-25 00:37:07 +08:00
1 parent 1141ebcd49
commit f0ac5b48ce
3 files changed
+163 -5

No files matched your search

+4
View File
@@ -437,6 +437,10 @@ func (m *edgeModel) errorView() string {
if m.lastErr != nil {
b.WriteString(tuiHint.Render(m.lastErr.Error()) + "\n")
}
// Nothing done above is rolled back, and nothing needs to be: every step finds what an
// earlier attempt created (the tunnel, its DNS route, the Access app and policy) and
// carries on from it.
b.WriteString("\n" + tuiHint.Render("Retrying is safe: it reuses the tunnel, DNS record and Access app created so far instead of making duplicates.") + "\n")
b.WriteString("\n" + tuiAction("enter", "retry", "esc", "edit"))
return b.String()
}