优化网络与系统检测为缓存优先,避免页面长时间停留在检测中。

将网络/IP 路由拆分并加入去重缓存,系统检测改为线程执行并支持强制刷新,前端改为先展示缓存快照后按需手动重测,降低阻塞与重复探测开销。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
eric
2026-07-08 14:38:59 -05:00
parent 1287b72193
commit 0661c33610
7 changed files with 375 additions and 126 deletions

View File

@@ -351,7 +351,13 @@ def _build_checks(
if client_lang and d.get("country_code"):
lang = client_lang.lower()
cc = (d.get("country_code") or "").lower()
lang_ok = (cc == "cn" and lang.startswith("zh")) or (cc == "us" and lang.startswith("en")) or True
if cc == "cn":
lang_ok = lang.startswith("zh")
elif cc == "us":
lang_ok = lang.startswith("en")
else:
# 非中美地区不做严格语言判定,避免误报。
lang_ok = True
add("lang_soft", "浏览器语言与 IP 地区不冲突", lang_ok, client_lang)
if webrtc_leak is not None: