From bf7cd99dd781b5267eed166be8293f876611a2f3 Mon Sep 17 00:00:00 2001 From: 3970260761 <3970260761@qq.com> Date: Mon, 9 Nov 2026 09:44:20 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=BB=84=E7=BD=91=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E5=A4=9A=E4=B8=AA=E5=9C=B0=E5=9D=80(=E9=80=97=E5=8F=B7/?= =?UTF-8?q?=E6=8D=A2=E8=A1=8C=E5=88=86=E9=9A=94=EF=BC=8C=E4=BB=BB=E4=B8=80?= =?UTF-8?q?=E5=8F=AF=E8=BE=BE=E5=8D=B3=E7=94=A8)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.py | 46 +++++++++++++++++++++++++++------------------- index.html | 2 +- 2 files changed, 28 insertions(+), 20 deletions(-) diff --git a/app.py b/app.py index d79d14f..8f975d8 100644 --- a/app.py +++ b/app.py @@ -352,28 +352,36 @@ def run_check(): if done: connected.append({"type": "ipv6", "target": ip6, "domain": ", ".join(done)}) - # 2. EasyTier / group network (ping 检测,无需端口) - et_host = (cfg.get("easytier_host") or "").strip() - if not et_host: + # 2. EasyTier / group network (ping 检测,无需端口) — 支持多个地址,任一可达即用 + raw_et = cfg.get("easytier_host") or cfg.get("easytier_hosts") or "" + if isinstance(raw_et, list): + et_hosts = [str(x).strip() for x in raw_et if str(x).strip()] + else: + et_hosts = [x.strip() for x in str(raw_et).replace("\\n", ",").split(",") if x.strip()] + if not et_hosts: s.append("- 组网 未配置") else: - ok = ping_ok(et_host) - STATUS["easytier"] = {"ok": ok, "host": et_host} - if not ok: - s.append(f"✗ 组网 {et_host} 不可达") - elif not domains: - connected.append({"type": "easytier", "target": et_host, "domain": None}) - s.append(f"✓ 组网 {et_host} 可达") + reachable = [h for h in et_hosts if ping_ok(h)] + STATUS["easytier"] = {"ok": bool(reachable), "hosts": et_hosts, "reachable": reachable} + if not reachable: + s.append(f"✗ 组网 {', '.join(et_hosts)} 均不可达") else: - done, bad = [], [] - for d in domains: - (done if update_dns(cfg, d, et_host) else bad).append(d) - line = f"✓ 组网 {et_host} → {', '.join(done)}" if done else f"✗ 组网 {et_host} DNS更新失败" - if bad: - line += f" (失败: {', '.join(bad)})" - s.append(line) - if done: - connected.append({"type": "easytier", "target": et_host, "domain": ", ".join(done)}) + et_host = reachable[0] + if not domains: + connected.append({"type": "easytier", "target": et_host, "domain": None}) + s.append(f"✓ 组网 {et_host} 可达" + (f" (共{len(reachable)}/{len(et_hosts)}可达)" if len(et_hosts) > 1 else "")) + else: + done, bad = [], [] + for d in domains: + (done if update_dns(cfg, d, et_host) else bad).append(d) + line = f"✓ 组网 {et_host} → {', '.join(done)}" if done else f"✗ 组网 {et_host} DNS更新失败" + if bad: + line += f" (失败: {', '.join(bad)})" + if len(et_hosts) > 1: + line += f" [可达 {len(reachable)}/{len(et_hosts)}]" + s.append(line) + if done: + connected.append({"type": "easytier", "target": et_host, "domain": ", ".join(done)}) # 3. NPS nps_server = cfg.get("nps_server") diff --git a/index.html b/index.html index 01a6ca4..0e30de6 100644 --- a/index.html +++ b/index.html @@ -116,7 +116,7 @@ th,td{padding:9px 8px;border-bottom:1px solid #eee;text-align:left}

🔗 组网 (EasyTier) 备用线路 ① · ping 连通即解析 A 记录

- +

🚇 NPS 内网穿透 备用线路 ② · 最后兜底