feat: 公网反代部署漂移与全量重部署,仪表盘补公网穿透/系统资源/中国 IP 段/通知通道(v1.2.3)
仪表盘:新增「公网穿透」卡与运行状态「公网反代」行(新增 GET /api/frpmulti/routes/summary 逐台聚合);「性能」面板(今日异常/平均响应)与「流量 Top 5」;新增一行三卡「系统资源 / 中国 IP 段 / 通知通道」,系统资源来自新增跨平台采集 internal/sysinfo 仪表盘:「服务」卡不再写死「正常」,按 Fonu/Nginx/DDNS/证书四项实际状态聚合;/api/status 每 15 秒刷新并按页面可见性暂停轮询;删除死样式 公网反代:部署漂移清单(未部署/孤儿配置/未生效/内容不一致)+ 重新部署全部(逐条下发、单条失败不中断) 公网 Agent:端口矩阵补端口含义;frps 启动一致性核对;证书徽标补证书来源 FRP:frpc 版本探测失败时回落按二进制目录名推导,并逐台服务端探测 文档:新增 docs/agent-capability-plan.md(agent 能力扩展方案);VERSION 提升到 1.2.3
This commit is contained in:
@@ -70,7 +70,13 @@
|
||||
<div class="stat-card">
|
||||
<n-icon :component="SwapHorizontalOutline" class="stat-card__icon" :class="portIconClass" aria-hidden="true" />
|
||||
<div class="port-list">
|
||||
<span v-for="port in watchedPorts" :key="port" class="port-item" :class="{ 'port-item--on': portOn(port) }">
|
||||
<span
|
||||
v-for="port in watchedPorts"
|
||||
:key="port"
|
||||
class="port-item"
|
||||
:class="{ 'port-item--on': portOn(port) }"
|
||||
:title="portMeaning(port)"
|
||||
>
|
||||
{{ port }} {{ portOn(port) ? '✓' : '✗' }}
|
||||
</span>
|
||||
</div>
|
||||
@@ -123,7 +129,9 @@
|
||||
<div><label>二进制路径</label><span class="mono mono-wrap">{{ agentStatus?.frps_binary || '—' }}</span></div>
|
||||
<div><label>配置文件</label><span class="mono mono-wrap">{{ agentStatus?.frps_config_path || '—' }}</span></div>
|
||||
<div class="field-grid__wide"><label>启动命令</label><span class="mono mono-wrap">{{ agentStatus?.frps_unit_exec || '—' }}</span></div>
|
||||
<div><label>启动一致性</label><span class="field-tags"><StatusBadge :kind="frpsConsistency.kind" :text="frpsConsistency.text" /></span></div>
|
||||
</div>
|
||||
<p v-if="!frpsConsistency.ok && frpsConsistency.detail" class="form-hint">{{ frpsConsistency.detail }}</p>
|
||||
</div>
|
||||
</FonuCard>
|
||||
</section>
|
||||
@@ -282,6 +290,34 @@ let timer: number | undefined
|
||||
|
||||
const watchedPorts = ['80', '443', '7000', '8080'] as const
|
||||
|
||||
// 端口含义(P0-1):让端口矩阵直接可读,不用再去查哪个端口是谁的
|
||||
const portMeanings: Record<string, string> = {
|
||||
'80': '公网 HTTP 入口(Nginx)',
|
||||
'443': '公网 HTTPS 入口(Nginx)',
|
||||
'7000': 'frps 控制端口(frpc 连接用)',
|
||||
'8080': 'frps vhost HTTP 端口(Nginx 回源到 frps)',
|
||||
}
|
||||
|
||||
function portMeaning(port: string) {
|
||||
return `${portMeanings[port] ?? '端口'}:${portOn(port) ? '正在监听' : '未监听'}`
|
||||
}
|
||||
|
||||
// frps 运行一致性(P0-3):systemd 实际执行的启动命令,是否用的是 Fonu 下发的二进制与配置文件。
|
||||
// 不一致意味着:手工改过 unit,或者 Fonu 写入的 frps.toml 并不是 frps 实际加载的那一份。
|
||||
const frpsConsistency = computed(() => {
|
||||
const exec = agentStatus.value?.frps_unit_exec ?? ''
|
||||
if (!exec) return { ok: false, kind: 'warning' as const, text: '未获取', detail: '' }
|
||||
const binary = agentStatus.value?.frps_binary ?? ''
|
||||
const config = agentStatus.value?.frps_config_path ?? ''
|
||||
const problems: string[] = []
|
||||
if (binary && !exec.includes(binary)) problems.push(`启动命令未使用配置的二进制(${binary})`)
|
||||
if (config && !exec.includes(config)) problems.push(`启动命令未使用 Fonu 下发的配置文件(${config})`)
|
||||
if (problems.length > 0) {
|
||||
return { ok: false, kind: 'warning' as const, text: '不一致', detail: problems.join(';') }
|
||||
}
|
||||
return { ok: true, kind: 'success' as const, text: '一致', detail: '启动命令与配置的二进制、配置文件一致' }
|
||||
})
|
||||
|
||||
const server = computed(() => servers.value.find((item) => item.id === selectedId.value) ?? null)
|
||||
const serverOptions = computed(() => servers.value
|
||||
.filter((item) => item.agent_configured || item.ssh_configured)
|
||||
|
||||
Reference in New Issue
Block a user