@wenbin_wb/dsh-bridge 2.6.1 → 2.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md ADDED
@@ -0,0 +1,127 @@
1
+ # 更新日志 (Changelog)
2
+
3
+ 所有关键版本的更新历史均记录于此。
4
+
5
+ ---
6
+
7
+ ## [v2.7.0] - 2026-08-25
8
+
9
+ ### 📊 运维监控看板、网络诊断与会话重命名
10
+ - **📊 宿主系统与运行看板**:实时监控 CPU 核心与型号、DSH 运行时间(Uptime)、Node 堆内存占用与系统总内存彩色占用条;
11
+ - **🔍 网络连通性一键诊断**:全面探测本地反向代理端口、局域网 IPv4、Cloudflare Anycast 边缘网络、自建隧道部署服务器与国内 npmmirror 镜像源连通性及延迟;
12
+ - **🗄️ 全局配置备份与恢复**:支持一键导出/导入插件配置 JSON 文件(涵盖平台凭证、白名单与安全认证规则),支持跨设备迁移;
13
+ - **🔄 DSH 服务平滑重启**:升级后或运维面板内支持一键平滑重启 DSH 进程,前端自动健康探测轮询并在重启成功后无缝重连刷新;
14
+ - **🏷️ IM 机器人会话重命名**:微信、QQ、飞书、Telegram 均支持 `/rename <新标题>` 指令,实时修改当前活动会话标题并同步更新 Web 抽屉;
15
+ - **🎨 界面与体验打磨**:Tab 栏彻底隐藏原生灰色横向滚动条保留流畅滑动手势,卡片间距规范化防重叠,深色模式原生深度适配;
16
+ - **🛡️ 并发与竞态保护**:Telegram/WeChat/QQ 网关 start/stop 增加 in-flight 串行化防抖锁,ConversationBridge 增加会话恢复并发竞态防重锁。
17
+
18
+ ---
19
+
20
+ ## [v2.6.1] - 2026-08-25
21
+
22
+ ### 🌐 公网隧道与专属域名重大升级
23
+ - **🔄 隧道开机自启与状态记忆**:记录 Cloudflare 隧道与自建隧道运行状态,DSH 重启后自动无感拉起;
24
+ - **🌐 Cloudflare 固定域名(Token 模式)**:支持 Cloudflare Named Tunnel(Zero Trust Token),绑定自定义专属域名(如 `dsh.yourdomain.com`),**重启后 URL 永久固定不变**;
25
+ - **⚡ 零门槛临时模式兼容**:未配置 Token 时维持 1 秒极速免登录临时随机域名;
26
+ - **⚙️ 控制台开关**:公网隧道卡片右上角新增「随 DSH 启动自动开启」复选框与折叠式高级 Token 配置。
27
+
28
+ ---
29
+
30
+ ## [v2.6.0] - 2026-08-24
31
+
32
+ ### 📱 移动端触控交互全面升级
33
+ - **🎨 顶栏与输入框重构**:极简通透顶栏,大圆角胶囊输入框,提供原生 App 般的丝滑手感;
34
+ - **🖐️ 长按(Long Press)呼出菜单**:侧边栏会话行支持长按(≥380ms)触觉震动反馈并自动呼出操作菜单(重命名/分叉/归档),支持边缘手势滑动开闭抽屉;
35
+ - **💊 状态药丸防换行**:全面修复手机小屏幕下「运行中」等状态药丸徽标断行换行问题;
36
+ - **✨ 更新日志预览**:版本更新检查卡片直观渲染新版本特性亮点(Release Notes)。
37
+
38
+ ---
39
+
40
+ ## [v2.5.5] - 2026-08-23
41
+
42
+ ### 🛠️ 缺陷修复与稳定性提升
43
+ - **💓 心跳泄漏修复**:修复 IM 任务结束后心跳定时器未彻底注销的潜在泄漏问题;
44
+ - **🧹 生命周期清理**:强化平台会话节点(Conversation Node)生命周期管理,连接断开时自动清理关联资源;
45
+ - **🛡️ 稳健长连接**:提升微信、QQ、飞书与 Telegram 机器人在长周期运行时的并发稳定性。
46
+
47
+ ---
48
+
49
+ ## [v2.5.4] - 2026-08-23
50
+
51
+ ### 📦 依赖规范化
52
+ - **🧩 规范化依赖**:将 DSH 共享宿主包依赖调整为 `peerDependencies`,杜绝多实例冗余依赖问题;
53
+ - **📉 体积瘦身**:进一步优化 npm 包体积与生态集成规范;
54
+ - **📖 文档同步**:同步更新快速安装命令与版本号指引。
55
+
56
+ ---
57
+
58
+ ## [v2.5.3] - 2026-08-23
59
+
60
+ ### 🚀 稳定性与依赖优化
61
+ - **📦 内置预编译飞书 SDK**:内置预打包编译飞书 SDK(消除 `protobufjs` postinstall build script 报错);
62
+ - **⚡ 纯净安装**:在 pnpm 11、npm 及 yarn 下实现 100% 纯净、无告警的一键秒级安装体验;
63
+ - **🛠️ 隧道服务端脚本增强**:优化一键部署脚本国内镜像源容错机制。
64
+
65
+ ---
66
+
67
+ ## [v2.5.2] - 2026-08-23
68
+
69
+ ### ✨ 核心更新与优化
70
+ - **🔑 本地管理免密直通**:优化 Localhost 物理回环访问判定逻辑,提升本地开发与管理体验;
71
+ - **🔐 交互式解锁弹窗**:新增统一的管理员解锁弹窗组件,支持密码解锁与状态实时同步;
72
+ - **📱 移动端 Polyfill**:增强移动设备浏览器环境兼容性;
73
+ - **📸 视觉与文档**:更新全套控制台高清界面实机截图与架构说明。
74
+
75
+ ---
76
+
77
+ ## [v2.5.1] - 2026-08-23
78
+
79
+ ### 🛡️ 深度加固安全防护与修复潜在风险
80
+ - **🔐 Secret Token 严格脱敏**:控制台公开状态彻底隔离,未授权访客不可见明文;
81
+ - **🚫 token_only 模式严格禁止密码登录**;
82
+ - **🛡️ RPC 服务端管理员权限校验**:强化关键配置修改与敏感操作鉴权;
83
+ - **⚡ Scope 防护范围 Header 伪造防范**。
84
+
85
+ ---
86
+
87
+ ## [v2.5.0] - 2026-08-23
88
+
89
+ ### 🔐 全新访问安全认证体系与 Tab 面板
90
+ - **🛡️ 双密码管理**:访客密码与管理员独立密码;
91
+ - **🚨 三重容灾保命体系**:支持 Localhost 物理特权免密、应急 reset-auth 文件恢复机制;
92
+ - **🎛️ Tab 结构升级**:局域网、公网隧道、IM 机器人、安全认证独立 Tab 组织。
93
+
94
+ ---
95
+
96
+ ## [v2.4.0] - 2026-08-23
97
+
98
+ ### ✈️ 接入 Telegram 官方机器人
99
+ - 支持 Telegram Bot API、打字机流式输出、原生指令菜单与交互卡片。
100
+
101
+ ---
102
+
103
+ ## [v2.3.0 ~ v2.3.3] - 2026-08-22
104
+
105
+ ### 🐦 接入飞书官方长连接机器人
106
+ - 支持 Card 2.0 原生流式打字机、双端并发审批、多平台统一消息架构重构。
107
+
108
+ ---
109
+
110
+ ## [v2.2.0 ~ v2.2.9] - 2026-08-20 ~ 2026-08-21
111
+
112
+ ### 🐧 QQ 官方机器人全面升级
113
+ - 支持 OpenAPI v2、指令面板、自定义菜单、全回复流式 Markdown 与群聊交互。
114
+
115
+ ---
116
+
117
+ ## [v2.0.0] - 2026-08-20
118
+
119
+ ### 🚀 多平台架构重构
120
+ - 引入统一 Platform 抽象基类与 ConversationBridge。
121
+
122
+ ---
123
+
124
+ ## [v1.0.0 ~ v1.2.3] - 2026-08-19
125
+
126
+ ### 💬 微信 Bot 初代上线
127
+ - 支持微信 ClawBot/iLink、局域网访问、Cloudflare 临时公网隧道与自建隧道。
package/README.en.md CHANGED
@@ -41,17 +41,21 @@
41
41
  - **2nd Line of Defense (Admin Console Guard)**: Separated administrator password and visitor password; global console lockout for remote devices to prevent unauthorized configuration changes (Password Unlock / Local Host Only / Open);
42
42
  - **Fail-safe Recovery System (Triple Protection)**: Host machine (`127.0.0.1`) enjoys permanent physical privileges (never locked out) + terminal command `touch ~/.dsh/dsh-bridge/reset-auth` for instant emergency recovery + built-in "Forgot Password" guides;
43
43
  - **Financial-grade Security Engine**: PBKDF2 + SHA-256 salted password hashing, 30-day HttpOnly SameSite session protection, IP brute-force rate limiter (5 failed attempts trigger 60s cooldown).
44
- - **📱 Mobile Browser & Touch Adaptation**: Specially crafted layout for smartphone viewports. Clean header with drawer & quick-new button, touch gestures, and responsive settings cards without text-wrapping issues
44
+ - **📱 PWA Standalone Full-Screen App & Touch Adaptation**: Add to mobile home screen for a 100% standalone native app experience (no browser address bar or bottom navigation); clean header, drawer gestures, and responsive settings cards
45
+ - **🔍 Real-Time Network Diagnostic Tool**: 1-click diagnosis of local proxy port, LAN IPv4, Cloudflare Anycast edge latency, and npmmirror registry reachability
46
+ - **🗄️ 1-Click Configuration Backup & Restore**: Export/import complete settings `.json` backup including tokens, allowlists, and tunnel configurations in the Security tab
47
+ - **📊 Host System Resource Monitor**: Real-time overview of CPU model/cores, system memory usage percentage, Node process memory (Heap/RSS), and DSH process uptime
48
+ - **🏷️ Session Renaming Command `/rename <new title>`**: Rename active sessions anytime via WeChat, QQ, Feishu, or Telegram, updating the Web drawer in real time
45
49
  - **LAN Access**: Scan QR code with your smartphone/tablet, direct access on the same Wi-Fi — keep the conversation going from your phone
46
- - **Cloudflare Tunnel**: One-click public internet exposure, connect from anywhere without a public server of your own keep working even when you're away from home
50
+ - **Cloudflare Tunnel**: One-click public internet exposure with Named Tunnel token mode for fixed custom domain and auto-start on DSH boot
47
51
  - **Custom Tunnel**: Connect to your own tunnel server with a fixed domain ([Setup Guide](docs/custom-tunnel.md))
48
52
  - **WeChat Bot (ClawBot / iLink)**: Scan a QR code to log in a WeChat personal account, then chat with, control, and approve your DeepSeek Harness agents right inside WeChat. **Multi-workspace selection, restart-persistent sessions, grouped session listing with titles, media (image/file/voice) transfer, and permission approvals** — over Tencent's official iLink Bot API, no public server or tunnel required ([Usage Guide](docs/wechat-usage.md))
49
53
  - **QQ Bot (OpenAPI v2)**: Connect your QQ Bot to receive private/group messages, send Markdown, button keyboards, and rich media. **Full event coverage (C2C / GROUP_AT_MESSAGE_CREATE), auto token refresh, reconnection with backoff, message deduplication** — over Tencent's official QQ Bot OpenAPI v2 ([Usage Guide](docs/qq-usage.md))
50
54
  - **Feishu / Lark Bot (Official WebSocket)**: Connect enterprise self-built apps via Feishu's official WebSocket protocol. **No public IP / no Webhook required, Markdown table formatting, native interactive card permission approvals with 1-click button actions** ([Usage Guide](docs/feishu-usage.md))
51
55
  - **Telegram Bot (Official Bot API + Proxy Support)**: Connect official Telegram bots for private and group interactions. **No public IP required (Long Polling getUpdates), built-in zero-dependency HTTP/HTTPS proxy tunnel, smooth typewriter streaming output, native command menu (Menu button), and Inline Keyboard interactive approval cards** ([Usage Guide](docs/telegram-usage.md))
52
56
  - **Official Brand SVG Icons**: Authentic vector brand icons for WeChat, QQ, Feishu, Telegram with real-time status indicators
53
- - **Fast Version Check & 1-Click Upgrade**: Dual-channel registry check (npmmirror + npmjs fallback in ~200ms) with seamless **1-click in-app upgrade**, no terminal copying required
54
- - **Dark Mode Support**: Deep integration with DeepSeek Harness Design Tokens (`--dsw-alias-*`), QR code background protection for safe dark mode scanning
57
+ - **Fast Version Check, 1-Click Upgrade & 1-Click Restart**: Dual-channel registry check (npmmirror + npmjs fallback in ~200ms) with seamless **1-click in-app upgrade and graceful DSH restart with automatic reconnect polling**
58
+ - **Native Dark Mode Support**: Deep integration with DeepSeek Harness Design Tokens (`--dsw-alias-*`), QR code background protection for safe dark mode scanning
55
59
 
56
60
  ---
57
61
 
@@ -59,6 +63,9 @@
59
63
 
60
64
  | Target | Description | Status |
61
65
  |--------|-------------|--------|
66
+ | **Mobile & DevOps** | PWA Standalone App + Network Diagnostics + Config Backup/Restore + System Resource Monitor | ✅ **Completed** |
67
+ | **Session Renaming** | Support `/rename <new title>` across WeChat, QQ, Feishu, Telegram | ✅ **Completed** |
68
+ | **Tunnel AutoStart & Fixed Domain** | Cloudflare Named Tunnel token mode + autoStart persistence | ✅ **Completed** |
62
69
  | **Access Security** | Visitor Access Auth Guard + Admin Console Anti-Tamper + Fail-safe Recovery | ✅ **Completed** (v2.5.0) |
63
70
  | **Telegram** | IM channel suited for self-hosting and overseas (Long Polling / Proxy / Native Menu / Inline Cards / Streaming) | ✅ **Completed** (v2.4.0) |
64
71
  | **Feishu** | Feishu / Lark official persistent WebSocket bot (No-public-IP WS / Card Approvals) | ✅ **Completed** (v2.3.0) |
@@ -496,29 +503,42 @@ dsh plugin --profile web add .
496
503
  ## FAQ (Frequently Asked Questions)
497
504
 
498
505
  <details>
499
- <summary><b>Q1: Getting "Failed to load provider directory: settings are unavailable in this browser" when accessing remotely?</b></summary>
506
+ <summary><b>Q1: How can I prevent unauthorized external access after connecting via QR code or public tunnel?</b></summary>
500
507
  <br/>
501
508
 
502
- - **Reason**: This is an upstream security feature in DeepSeek Harness (DSH). To prevent malicious network devices from intercepting API keys and model credentials, DSH restricts the provider catalog & credential modification API exclusively to loopback (`127.0.0.1`).
503
- - **Recommendations**:
504
- 1. **Recommended Workflow**: Configure your LLM models & API keys once on your desktop computer (`127.0.0.1:3080`). Afterward, you can create sessions, chat, and control agents from your mobile device with 100% full functionality;
505
- 2. **Cloudflare Tunnel**: Accessing through the built-in Cloudflare Tunnel (`https://*.trycloudflare.com`) provides a secure HTTPS context for maximum mobile browser compatibility;
506
- 3. **SSH Port Forwarding**: If you must modify API keys remotely from a phone, use SSH local port forwarding (`ssh -L 3082:127.0.0.1:3082 user@ip`) to map the connection to localhost.
509
+ - **Answer**:
510
+ 1. Navigate to the **"Security"** tab in the console and enable Global Access Password or Secret Token gatekeeper;
511
+ 2. Once enabled, visitors accessing through LAN IP or public tunnels must authenticate with the password or token before accessing any interface;
512
+ 3. Host computer loopback (`127.0.0.1`) enjoys physical loopback privileges with automatic passwordless direct access.
507
513
  </details>
508
514
 
509
515
  <details>
510
- <summary><b>Q2: Prompted with "Admin permission required" or settings locked when modifying config remotely?</b></summary>
516
+ <summary><b>Q2: How is message security handled for WeChat / QQ / Feishu / Telegram bots? Can unauthorized senders trigger agents?</b></summary>
511
517
  <br/>
512
518
 
513
- - **Reason**: The plugin incorporates an Anti-Tamper Guard to prevent unauthorized visitors from viewing or tampering with tunnels and bot tokens.
514
- - **Solution**:
515
- 1. Enter your admin password in the interactive **"🔒 Unlock Admin Console"** dialog to unlock the session (if you haven't set a separate admin password, enter your initial access password);
516
- 2. **Host computer (127.0.0.1) access has permanent physical privileges** and is never locked;
517
- 3. In case of forgotten passwords, execute a single emergency command in your host terminal:
518
- ```bash
519
- touch ~/.dsh/dsh-bridge/reset-auth
520
- ```
521
- The plugin will instantly clear passwords and restore default passwordless access.
519
+ - **Answer**:
520
+ 1. **Strict Allowlist Mechanism**: The plugin incorporates an automatic and manual sender allowlist. Only messages from allowlisted users can drive the Agent;
521
+ 2. **First Sender Auto-Approval**: Upon first login or setup, the first message sent by the admin automatically binds their ID to the allowlist;
522
+ 3. **Silent Drop for Unknown Senders**: All messages from non-allowlisted individuals or unauthorized group members are silently dropped at the lowest layer (never fed to LLM), consuming zero tokens and executing zero commands.
523
+ </details>
524
+
525
+ <details>
526
+ <summary><b>Q3: What is the difference between Cloudflare Temporary URL and Fixed Domain (Token Mode)?</b></summary>
527
+ <br/>
528
+
529
+ - **Answer**:
530
+ 1. **Temporary Quick Tunnel (Default)**: Zero setup, no Cloudflare account needed. Generates a random `https://*.trycloudflare.com` URL with 1 click;
531
+ 2. **Fixed Named Tunnel (Token Mode)**: Create a Named Tunnel in Cloudflare Zero Trust and configure your custom domain (e.g. `dsh.yourdomain.com`). With "Auto-start with DSH" checked, the URL remains permanently fixed across reboots.
532
+ </details>
533
+
534
+ <details>
535
+ <summary><b>Q4: Will chat sessions and bot configurations be lost after plugin upgrade or DSH restart?</b></summary>
536
+ <br/>
537
+
538
+ - **Answer**:
539
+ 1. **Persistent Configuration**: All IM credentials, allowlists, auto-start preferences, and security settings are saved to `~/.dsh/dsh-bridge/`;
540
+ 2. **Seamless Session Re-attach**: Conversation history is managed natively by DSH persistence. After restart, sending a message or typing `/resume` instantly reconnects to the existing session;
541
+ 3. **1-Click Backup & Restore**: The "Ops & Monitoring" tab supports exporting/importing `.json` backup files for effortless migration between machines.
522
542
  </details>
523
543
 
524
544
  ---
package/README.md CHANGED
@@ -41,17 +41,21 @@
41
41
  - **第二道防线(管理控制台防篡改)**:独立管理员密码,远程设备进入控制台全局锁定网络配置与 IM 机器人密钥,支持「需密码解锁 / 仅电脑本机管理 / 宽松直管」;
42
42
  - **三重容灾保命体系**:电脑本机(`127.0.0.1`)永久最高物理特权(永不自锁) + 终端 `touch ~/.dsh/dsh-bridge/reset-auth` 一秒救急重置 + 全界面忘记密码求助引导;
43
43
  - **金融级安全引擎**:PBKDF2 + SHA-256 加盐哈希安全存储、30 天 HttpOnly SameSite 会话、单 IP 连续 5 次错误封禁 60 秒防暴力破解。
44
- - **📱 移动端与触控交互深度适配**:针对手机端排版与触控操作深度优化。极简轻量顶栏、快速新建、滑动手势抽屉,以及全自适应设置中心(彻底告别文字挤压折行)
44
+ - **📱 PWA 独立全屏 App 与移动端深度适配**:手机浏览器「添加到主屏幕」即可作为 100% 独立原生全屏 App 运行(无浏览器地址栏与底栏);极简顶栏、手势抽屉、防误触与全自适应设置中心
45
+ - **🔍 网络连通性一键实时诊断**:一键排查本地反向代理端口、局域网 IPv4、Cloudflare Anycast 边缘延迟与国内 npmmirror 连通性
46
+ - **🗄️ 全局配置一键备份与恢复**:在安全面板支持一键导出/导入包含 Token、白名单与隧道参数的 `.json` 备份包,换电脑迁移一键还原
47
+ - **📊 宿主系统运行监控看板**:实时掌控 CPU 核心与型号、系统总内存与实时占用率、Node 进程堆内存与 DSH 服务连续运行时间(Uptime)
48
+ - **🏷️ 会话重命名指令 `/rename <新标题>`**:在微信、QQ、飞书、Telegram 中随时修改当前会话名称并同步 Web 抽屉
45
49
  - **局域网访问**:手机/平板扫码,同一 Wi-Fi 直接访问,躺着也能在手机上接着聊
46
- - **Cloudflare 隧道**:一键暴露公网地址,随时随地连接,出差在外、不在家也能接着干,无需自建公网服务器
50
+ - **Cloudflare 隧道**:一键暴露公网地址,随时随地连接;支持固定域名(Token 模式)重启 URL 永不变更与随 DSH 开机自启
47
51
  - **自建隧道**:连接自己的隧道服务器,获得固定域名([搭建教程](docs/custom-tunnel.md))
48
52
  - **微信 Bot(ClawBot / iLink)**:扫码登录微信个人号后,直接在微信里对话、控制 DeepSeek Harness 的 agent。**支持多工作区选择、会话跨重启持久化、按工作区分组查看、媒体(图片/文件/语音)收发、权限审批**——走腾讯官方 iLink Bot API,无需公网([使用说明](docs/wechat-usage.md))
49
53
  - **QQ Bot(OpenAPI v2)**:接入 QQ 机器人,私聊/群聊接收消息,发送 Markdown、按钮键盘和富媒体。**完整事件覆盖(C2C / GROUP_AT_MESSAGE_CREATE)、Token 自动刷新、断线重连、消息去重**——走腾讯官方 QQ Bot OpenAPI v2([使用说明](docs/qq-usage.md))
50
54
  - **飞书 Bot(官方 WebSocket 长连接)**:接入飞书开放平台企业自建应用,私聊/群聊实时交互。**无需公网 IP / 无需 Webhook、支持飞书 Markdown 表格排版、原生交互卡片权限审批一键点击确认**——走飞书官方最新 WebSocket 长连接协议([使用说明](docs/feishu-usage.md))
51
55
  - **Telegram Bot(官方 Bot API + 代理支持)**:接入官方 Telegram 机器人,单聊/群聊实时交互。**无需公网 IP(长轮询 getUpdates)、内置零依赖 HTTP/HTTPS 代理隧道、打字机平滑流式输出、原生快捷指令菜单(Menu 按钮)与 Inline 交互卡片审批**([使用说明](docs/telegram-usage.md))
52
56
  - **IM 官方品牌矢量图标**:微信、QQ、飞书、Telegram 官方矢量图标与状态展示,直接在聊天软件里呼唤你的 Agent
53
- - **极速版本检查与一键升级**:国内高速镜像(npmmirror)优先 + 官方源毫秒级双通道检查,检测到新版本支持**界面一键直接升级**,无需手动打开终端
54
- - **深色模式深度适配**:完美适配 DeepSeek Harness 设计系统明暗主题切换,二维码自带白底安全垫,暗光下手机扫码 100% 极速识别
57
+ - **极速版本检查、一键升级与一键重启**:国内高速镜像(npmmirror)优先 + 官方源毫秒级双通道检查,检测到新版本支持**界面一键直接升级并一键重启 DSH 服务**,前端自动重连刷新
58
+ - **深色模式原生深度适配**:完美适配 DeepSeek Harness 设计系统明暗主题切换,二维码自带白底安全垫,暗光下手机扫码 100% 极速识别
55
59
 
56
60
  ---
57
61
 
@@ -59,6 +63,9 @@
59
63
 
60
64
  | 目标 | 说明 | 状态 |
61
65
  |------|------|------|
66
+ | **移动端体验 & 运维监控** | PWA 独立全屏 App + 网络实时诊断 + 配置备份恢复 + 系统监控看板 | ✅ **已完成** |
67
+ | **会话重命名** | 微信/QQ/飞书/Telegram 支持 `/rename <新标题>` 实时重命名 | ✅ **已完成** |
68
+ | **公网隧道开机自启 & Token 固定域名** | Cloudflare Named Tunnel Token 模式固定域名 + 隧道状态记忆与开机自启 | ✅ **已完成** |
62
69
  | **访问安全认证** | 外部访问门禁拦截 + 管理后台防篡改锁 + 三重容灾保命体系 | ✅ **已完成**(v2.5.0) |
63
70
  | **Telegram** | 适合自托管与海外的 IM 渠道(免公网长轮询 / 代理支持 / 原生菜单 / Inline 卡片 / 流式打字机) | ✅ **已完成**(v2.4.0) |
64
71
  | **飞书** | 飞书开放平台长连接机器人,办公场景直接调用(免公网 WS / 卡片审批) | ✅ **已完成**(v2.3.0) |
@@ -494,29 +501,42 @@ dsh plugin --profile web add .
494
501
  ## 常见问题 (FAQ)
495
502
 
496
503
  <details>
497
- <summary><b>Q1: 远程或局域网访问时提示「加载提供方目录失败: settings are unavailable in this browser」?</b></summary>
504
+ <summary><b>Q1: 手机扫码或公网连接后,如何确保外部人员无法随意访问我的 DSH 控制台?</b></summary>
498
505
  <br/>
499
506
 
500
- - **原因**:这是 DeepSeek Harness (DSH) 官方底层的安全机制。为了防止网络上的恶意设备窃取用户的 API Key 与模型凭据,DSH 将模型 Provider/Credentials 配置接口严格限制为仅限本地回环(`127.0.0.1`)调用。
501
- - **建议**:
502
- 1. **推荐使用方式**:在电脑本机(`127.0.0.1:3080`)一次性配置好模型与 API Key,之后在手机端/远程设备可以 100% 正常创建会话、聊天与指挥 Agent 干活;
503
- 2. **公网隧道访问**:使用插件自带的 Cloudflare 隧道(`https://*.trycloudflare.com`,自带 HTTPS 安全上下文)可获得最好的兼容性;
504
- 3. **SSH 端口转发**:如需在手机端修改 API 配置,可通过 SSH 隧道(`ssh -L 3082:127.0.0.1:3082 user@ip`)映射为本地 localhost 访问。
507
+ - **回答**:
508
+ 1. 在控制台「**安全认证**」Tab 中开启全局访问密码或安全 Token 门禁;
509
+ 2. 开启后,无论是局域网 IP 访问还是公网隧道访问,访客必须先输入密码或携带合法认证 Token,彻底杜绝未授权访问;
510
+ 3. 宿主电脑本机(`127.0.0.1`)享有物理特权,自动免密直通,不影响本地桌面端开发体验。
505
511
  </details>
506
512
 
507
513
  <details>
508
- <summary><b>Q2: 远程访问时修改配置提示「需要管理员权限」或被锁定?</b></summary>
514
+ <summary><b>Q2: 微信 / QQ / 飞书 / Telegram 机器人的消息安全如何保障?其他人给机器人发消息会被执行吗?</b></summary>
509
515
  <br/>
510
516
 
511
- - **原因**:插件内置了「管理后台防篡改」安全保护,防止外部访客窥探或篡改您的公网隧道和机器人 Token。
512
- - **解决方法**:
513
- 1. 在弹出的「🔒 解锁后台管理权限」对话框中输入您设置的后台管理密码即可解锁(若未单独设置管理密码,请输入初始访问密码);
514
- 2. **电脑本机(127.0.0.1)访问享有物理免锁特权**,自动免密直通;
515
- 3. 若极端情况下忘记密码,在服务器/宿主电脑终端执行单行救急指令:
516
- ```bash
517
- touch ~/.dsh/dsh-bridge/reset-auth
518
- ```
519
- 插件将在毫秒级自动清空密码恢复初始免密状态。
517
+ - **回答**:
518
+ 1. **严格白名单机制**:插件内置自动与手动发件人白名单(Allowlist)。只有处于授权白名单内的用户消息才会驱动 Agent 执行;
519
+ 2. **初次自动授权**:扫码或配置完成后,管理员向 Bot 发送第一条消息即自动完成白名单绑定;
520
+ 3. **陌生消息静默忽略**:所有非白名单人员或群聊内非授权成员的消息均会被底层静默丢弃(Never fed to LLM),绝不消耗 Token 也不会触发任何指令执行。
521
+ </details>
522
+
523
+ <details>
524
+ <summary><b>Q3: Cloudflare 隧道临时域名与固定域名(Token 模式)有什么区别?</b></summary>
525
+ <br/>
526
+
527
+ - **回答**:
528
+ 1. **临时免登录模式(默认)**:无需注册 Cloudflare 账号,一键开启即刻生成 `https://*.trycloudflare.com` 随机临时网址,适合临时外出时快速扫码连接;
529
+ 2. **固定域名模式(Token 模式)**:在 Cloudflare Zero Trust 控制台创建 Named Tunnel 并填入 Tunnel Token,可绑定您自己的专属域名(如 `dsh.yourdomain.com`)。开启「随 DSH 启动自动开启」后,重启电脑或服务域名永久固定不变。
530
+ </details>
531
+
532
+ <details>
533
+ <summary><b>Q4: DSH 升级插件或重启服务后,之前的聊天会话和机器人配置会丢失吗?</b></summary>
534
+ <br/>
535
+
536
+ - **回答**:
537
+ 1. **配置永久持久化**:所有 IM 平台凭证、授权白名单、公网隧道自启选项与安全认证规则均保存在本地系统目录(`~/.dsh/dsh-bridge/`),插件升级与 DSH 重启均不会影响已有配置;
538
+ 2. **会话无感恢复**:会话历史由 DSH 核心引擎持久化管理,重启后在聊天软件中发送消息或使用 `/resume` 命令即可自动恢复上下文并继续执行;
539
+ 3. **一键备份迁移**:在「**运维监控**」Tab 内支持一键导出全局配置 `.json` 备份文件,方便在重装系统或跨机器迁移时一键秒级恢复。
520
540
  </details>
521
541
 
522
542
  ---