网络页焕新:IP 画像/质量检测、链路诊断与功能开关

新增 /ip_profile、/ip_quality API 与网络 UI 组件,默认隐藏摄像头/拉流导航;同步更新 README。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-07-08 12:47:53 +08:00
parent 119e52cfe9
commit ae9531f2c2
23 changed files with 6966 additions and 543 deletions

22
web2_feature_flags.py Normal file
View File

@@ -0,0 +1,22 @@
"""功能开关:隐藏/屏蔽 UI 与 API保留底层实现文件。"""
SHOW_CAMERA_FEATURE = False
SHOW_PULL_STREAM_FEATURE = False
def is_disabled_stream_worker_pm2(name: str) -> bool:
low = (name or "").strip().lower()
if not SHOW_CAMERA_FEATURE and low.startswith("camera"):
return True
if not SHOW_PULL_STREAM_FEATURE and low.startswith("pull_stream"):
return True
return False
def is_disabled_stream_worker_script(script: str) -> bool:
stem = (script or "").strip().lower().removesuffix(".py")
if not SHOW_CAMERA_FEATURE and stem.startswith("camera"):
return True
if not SHOW_PULL_STREAM_FEATURE and stem.startswith("pull_stream"):
return True
return False