diff --git a/config/permissions/pending_requests.json b/config/permissions/pending_requests.json index 657a338..3c0e2da 100644 --- a/config/permissions/pending_requests.json +++ b/config/permissions/pending_requests.json @@ -526,5 +526,27 @@ "framework.command.execute" ], "timestamp": 35916.627558381 + }, + "b9fd53b0": { + "plugin_name": "example_plugin", + "permissions": [ + "plugin.example.read", + "plugin.example.write", + "plugin.example.execute", + "framework.event.subscribe", + "framework.command.execute" + ], + "timestamp": 36350.458260715 + }, + "930a37d0": { + "plugin_name": "sentinel", + "permissions": [ + "plugin.sentinel.read", + "plugin.sentinel.write", + "plugin.network.access", + "framework.event.subscribe", + "framework.command.execute" + ], + "timestamp": 36350.46484983 } } \ No newline at end of file diff --git a/config/plugins/commands.yaml b/config/plugins/commands.yaml index 6e214de..e2a310b 100644 --- a/config/plugins/commands.yaml +++ b/config/plugins/commands.yaml @@ -101,7 +101,7 @@ commands: permissions: - framework.command.test source: internal -last_updated: 35916.559043798 +last_updated: 36350.43103134 plugin_commands: example_plugin: echo: *id001 diff --git a/config/services/network_routes.yaml b/config/services/network_routes.yaml index 67f9a8a..c0de703 100644 --- a/config/services/network_routes.yaml +++ b/config/services/network_routes.yaml @@ -1,5 +1,5 @@ http_port: 4200 -last_updated: 35916.617063641 +last_updated: 36350.460163059 plugin_routes: example_plugin: - methods: diff --git a/plugins/sentinel/config.yaml b/plugins/sentinel/config.yaml index b7b4ec8..4d3bd0a 100644 --- a/plugins/sentinel/config.yaml +++ b/plugins/sentinel/config.yaml @@ -2,10 +2,10 @@ author: SenSu Team description: 🛡️ 多节点 SenSu 集群性能监控 — 实时仪表盘 + 节点管理 name: Sentinel nodes: -- api_key: sk-035259bb700b17ae51cfd50a717b27281b1a5347b2aa4723 +- api_key: '' enabled: true id: node-3733a070 - name: 本地容器 + name: PLK110 notes: LocalBian url: http://127.0.0.1:4200 settings: diff --git a/services/internet_service.py b/services/internet_service.py index 65d91f3..c41acec 100644 --- a/services/internet_service.py +++ b/services/internet_service.py @@ -48,11 +48,15 @@ class InternetService: self.http_runner = web.AppRunner(self.http_app) await self.http_runner.setup() + # SO_REUSEPORT: Linux/macOS only, Windows 不支持 + import sys as _sys + _reuse_port = _sys.platform != "win32" + # 1. 启动 HTTP 站点 try: self.site = web.TCPSite( - self.http_runner, self.http_host, self.http_port, - reuse_address=True, reuse_port=True + self.http_runner, self.http_host, self.http_port, + reuse_address=True, reuse_port=_reuse_port, ) await self.site.start() logger.info(f"✅ HTTP 服务已绑定: {self.http_host}:{self.http_port}") @@ -60,12 +64,12 @@ class InternetService: logger.error(f"❌ HTTP 端口 {self.http_port} 绑定失败: {e}") await self.http_runner.cleanup() return False - + # 2. 启动 WebSocket 站点 (独立端口) try: self.ws_site = web.TCPSite( - self.http_runner, self.ws_host, self.ws_port, - reuse_address=True, reuse_port=True + self.http_runner, self.ws_host, self.ws_port, + reuse_address=True, reuse_port=_reuse_port, ) await self.ws_site.start() logger.info(f"✅ WebSocket 服务已绑定: {self.ws_host}:{self.ws_port}") diff --git a/services/tui_service.py b/services/tui_service.py index 778a2a8..e3508be 100644 --- a/services/tui_service.py +++ b/services/tui_service.py @@ -425,7 +425,7 @@ class SystemMonitor(Static): def set_collector(self, c): self._collector = c - def refresh(self): + def refresh(self, **kwargs): """由外部 asyncio task 驱动刷新(比 set_interval 更抗 Android 挂起)""" self._refresh_stats() try: @@ -479,7 +479,7 @@ class PluginStatusPanel(Static): def set_plugin_service(self, svc): self._plugin_service = svc - def refresh(self): + def refresh(self, **kwargs): """由外部 asyncio task 驱动刷新""" self._refresh() diff --git a/static/web_panel/pages/plugins.html b/static/web_panel/pages/plugins.html index e036c92..2c75709 100644 --- a/static/web_panel/pages/plugins.html +++ b/static/web_panel/pages/plugins.html @@ -1,5 +1,5 @@
-

🔌 插件管理

+

插件管理

@@ -12,7 +12,7 @@
-
📦 导入 ZIP 包
+
导入 ZIP 包
@@ -21,7 +21,7 @@
-
📥 Git Clone 安装
+
Git Clone 安装
diff --git a/static/web_panel/pages/settings.html b/static/web_panel/pages/settings.html index 5b2b3c6..5e80e91 100644 --- a/static/web_panel/pages/settings.html +++ b/static/web_panel/pages/settings.html @@ -1,10 +1,10 @@
-

⚙ 框架设置

+

框架设置

-

🔄 版本与更新

+

版本与更新

@@ -17,7 +17,7 @@
-

📦 备份管理

+

备份管理

加载中...
@@ -27,7 +27,7 @@
-

🔑 API Key 管理

+

API Key 管理