fix: 收紧代理故障判定并修复自动恢复门控/日历/终态问题

This commit is contained in:
RuoJi6 committed 2026-10-31 16:23:28 +08:00
1 parent de6a0fa125
commit e878020c4d
15 files changed
+437 -26

No files matched your search

@@ -423,6 +423,7 @@ function TaskDetailInner() {
<div className="flex flex-wrap items-center gap-2 text-xs text-amber-600">
<span>暂停原因:{task.pause_reason === "paused_by_proxy" ? "全局代理异常" : task.pause_reason}</span>
{task.reconnect && <span>重连 {task.reconnect.attempt}/{task.reconnect.max} {task.reconnect.exhausted ? "已耗尽" : task.reconnect.next_at ? `下次 ${new Date(task.reconnect.next_at * 1000).toLocaleTimeString()}` : "探测中"}</span>}
{task.reconnect?.last_error && <span className="max-w-full truncate" title={task.reconnect.last_error}>原因:{task.reconnect.last_error}</span>}
{task.pause_reason === "paused_by_proxy" && <Button size="sm" variant="outline" onClick={() => api.testTaskProxy(task.id).then((r) => r.ok ? (toast.success("代理已恢复,任务将自动继续"), load()) : toast.error(r.error || "代理探测失败")).catch((e) => toast.error((e as Error).message))}>测试代理</Button>}
</div>
)}
+1 -1
View File
@@ -761,7 +761,7 @@ export default function SystemSettingsPage() {
</Button>
{/* 测表单里当前的值,不要求先保存。 */}
<Button type="button" variant="outline" onClick={testEgress} disabled={!loaded || egressTesting}>
{egressTesting ? "测试中…" : "测试"}
{egressTesting ? "测试中…" : "测试代理"}
</Button>
</div>
<p className="text-muted-foreground text-xs">