Feature: Add offline hosts, batch reads and MCP hardening
Expose hosts the server already knows about. list_all_hosts enumerates both live contexts and the historical records in the client list, with authStatus as a three-state string instead of a boolean. search_hosts now honours online=false instead of returning an empty list, while the default stays online-only so existing callers see the same results. get_host_detail falls back to the last known record for an offline host rather than failing with -32002. Let read-only tools take an ids array of up to 50 hosts in one call. The batch path reuses the single-host dispatcher and pages per host, so behaviour cannot drift; write tools reject ids with -32602 so a mistake cannot fan out across machines. Add get_keylog behind its own McpKeylog switch. It drives the client's existing keylogger sub-connection, accumulates the streamed text for a bounded window and byte cap, then closes the sub-connection and returns UTF-8 lines. The client pushes its buffered history first, so a result contains both history and fresh keystrokes; the tool description says so. Harden the endpoint. Failed bearer checks are counted per source IP and ten failures within a minute block the IP for fifteen minutes. Auth failures and tool calls append to logs\mcp_audit.log with metadata only: no token, no arguments, no response bodies, and rotation at 5 MB. Loopback sources are audited but never blocked, because the built-in frp tunnel makes every remote request arrive from 127.0.0.1 and banning that address would lock out legitimate clients along with the attacker. Give list-style tools one pagination contract (limit/offset plus total/totalAll/hasMore) and fix the generated schemas so id and ids are genuine alternatives: the stale required:[id] left over from the single-host schema would otherwise reject ids-only calls. Co-Authored-By: deepseek-flash
This commit is contained in:
1 parent
cc0e4bbd7a
commit
ac5b174b5f
12 files changed
+1191
-86
No files matched your search
@@ -2012,6 +2012,8 @@ Token=Token
|
||||
启用远程交谈(AI 与用户对话)=Fernchat aktivieren (KI spricht mit dem Benutzer)
|
||||
MCP远程交谈=MCP-Fernchat
|
||||
远程交谈开关的改动需重启程序生效。=Aenderungen am Fernchat-Schalter werden nach einem Neustart wirksam.
|
||||
启用键盘记录(AI 采集击键)=Keylogger aktivieren (KI-Tastenaufzeichnung)
|
||||
键盘记录开关的改动需重启程序生效。=Aenderungen am Keylogger-Schalter werden erst nach einem Neustart wirksam.
|
||||
主机管理的写操作需只读模式关闭;冻结/解冻进程、停止/重启服务还需启用危险主机操作。=Schreiboperationen der Maschinenverwaltung erfordern deaktivierten Nur-Lesen-Modus; Einfrieren/Auftauen von Prozessen und Stoppen/Neustarten von Diensten erfordern zusaetzlich gefaehrliche Maschinenoperationen.
|
||||
第 %d 个钱包地址不合法!=Wallet-Adresse #%d ist ungueltig!
|
||||
%d 新连接\r\n=%d Neue Verbindung\r\n
|
||||
|
||||
Reference in new issue
Block a user