From 4d2ace82734b5ef9d4ba50adc1a1a2a1d2ed62bd Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 8 Apr 2026 04:16:33 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20=E4=BB=A3=E7=A0=81=E5=AE=A1?= =?UTF-8?q?=E6=9F=A5=E4=BF=AE=E5=A4=8D:=20fallback=E8=BE=B9=E7=95=8C?= =?UTF-8?q?=E4=BF=9D=E6=8A=A4+=E6=B3=A8=E9=87=8A=E4=BC=98=E5=8C=96+?= =?UTF-8?q?=E5=B8=B8=E9=87=8F=E6=8F=90=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Agent-Logs-Url: https://github.com/qinfendebingshuo/guanghulab/sessions/a6f72ab2-7227-4382-920c-0e1aa91dba2e Co-authored-by: qinfendebingshuo <207279273+qinfendebingshuo@users.noreply.github.com> --- .github/workflows/proxy-dashboard-update.yml | 2 +- server/proxy/service/subscription-server-v3.js | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/proxy-dashboard-update.yml b/.github/workflows/proxy-dashboard-update.yml index f9828522..cad1dfb6 100644 --- a/.github/workflows/proxy-dashboard-update.yml +++ b/.github/workflows/proxy-dashboard-update.yml @@ -13,7 +13,7 @@ name: '📊 铸渊专线 · 仪表盘' on: schedule: - - cron: '0 */6 * * *' # 每6小时自动更新 (UTC 0/6/12/18 = 北京 8/14/20/2) + - cron: '0 */6 * * *' # 每6小时自动更新 (UTC 0/6/12/18 = 北京时间 8:00/14:00/20:00/次日2:00) workflow_dispatch: # 手动触发 push: branches: [main] diff --git a/server/proxy/service/subscription-server-v3.js b/server/proxy/service/subscription-server-v3.js index 85b9c74a..6c33b929 100644 --- a/server/proxy/service/subscription-server-v3.js +++ b/server/proxy/service/subscription-server-v3.js @@ -311,8 +311,11 @@ ${nodeNames} // 1. fallback组: 优先SV节点,SV不可用时自动回落到其他节点(解决"切不过去"问题) // 2. select组: 用户可手动选择具体走哪个节点 // 有SV节点时优先SV,无SV节点时自动使用现有节点 + const nonSvNodes = nodes.filter(n => n.region !== 'us-sv'); const claudeFallbackProxies = svNode - ? ` - "${svNode.name}"\n${nodes.filter(n => n.region !== 'us-sv').map(n => ` - "${n.name}"`).join('\n')}` + ? (nonSvNodes.length > 0 + ? ` - "${svNode.name}"\n${nonSvNodes.map(n => ` - "${n.name}"`).join('\n')}` + : ` - "${svNode.name}"`) : nodeNames; const claudeSelectProxies = svNode @@ -1139,9 +1142,10 @@ function refreshDashboard() { } // 页面加载后立即刷新一次仪表盘数据(确保刷新页面即拿到最新数据) +// 延迟避免与页面初始渲染竞争DOM元素 +var DASHBOARD_INIT_DELAY_MS = 100; if (dashToken) { - // 延迟100ms避免与页面渲染竞争 - setTimeout(refreshDashboard, 100); + setTimeout(refreshDashboard, DASHBOARD_INIT_DELAY_MS); } // 刷新加速状态 (从dashboard-api获取最新全量数据)