@wenbin_wb/dsh-bridge 2.4.0 → 2.5.1

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/README.en.md CHANGED
@@ -14,6 +14,11 @@ Seamlessly extend your local DeepSeek Harness to mobile phones, tablets, public
14
14
 
15
15
  ## Features
16
16
 
17
+ - **🔐 Enterprise Access Security & Admin Guard (v2.5.0 Major Release)**:
18
+ - **1st Line of Defense (Visitor Access Guard)**: Auto-injected 256-bit security Token in QR codes for 1-click passwordless login; manual IP/domain visits enforce password verification; granular channel scoping (All / Public Tunnels Only / LAN Only);
19
+ - **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);
20
+ - **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;
21
+ - **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).
17
22
  - **LAN Access**: Scan QR code with your smartphone/tablet, direct access on the same Wi-Fi — keep the conversation going from your phone
18
23
  - **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
19
24
  - **Custom Tunnel**: Connect to your own tunnel server with a fixed domain ([Setup Guide](docs/custom-tunnel.md))
@@ -24,7 +29,6 @@ Seamlessly extend your local DeepSeek Harness to mobile phones, tablets, public
24
29
  - **Official Brand SVG Icons**: Authentic vector brand icons for WeChat, QQ, Feishu, Telegram with real-time status indicators
25
30
  - **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
26
31
  - **Dark Mode Support**: Deep integration with DeepSeek Harness Design Tokens (`--dsw-alias-*`), QR code background protection for safe dark mode scanning
27
- - **Security Alerts**: URLs and QR codes with access warnings to prevent accidental sharing
28
32
 
29
33
  ![npm](https://img.shields.io/npm/v/@wenbin_wb/dsh-bridge?label=npm)
30
34
  ![npm downloads](https://img.shields.io/npm/dt/@wenbin_wb/dsh-bridge?label=downloads)
@@ -37,12 +41,12 @@ Seamlessly extend your local DeepSeek Harness to mobile phones, tablets, public
37
41
 
38
42
  | Target | Description | Status |
39
43
  |--------|-------------|--------|
44
+ | **Access Security** | Visitor Access Auth Guard + Admin Console Anti-Tamper + Fail-safe Recovery | ✅ **Completed** (v2.5.0) |
45
+ | **Telegram** | IM channel suited for self-hosting and overseas (Long Polling / Proxy / Native Menu / Inline Cards / Streaming) | ✅ **Completed** (v2.4.0) |
46
+ | **Feishu** | Feishu / Lark official persistent WebSocket bot (No-public-IP WS / Card Approvals) | ✅ **Completed** (v2.3.0) |
47
+ | **QQ Bot** | QQ bot integration for group/private chat (Markdown / buttons / rich media) | ✅ **Completed** (v2.1.0) |
48
+ | **WeChat** | Chat with your Agent directly in WeChat (workspaces / persisted sessions / media / approvals) | ✅ **Completed** (v1.0.0) |
40
49
  | **Platform Abstraction** | Platform-agnostic core (sessions / approvals / commands / digest) shared across IM channels | ✅ **Completed** (v2.0.0) |
41
- | **WeChat** | Chat with your Agent directly in WeChat | ✅ Supported (workspaces / persisted sessions / media / approvals) |
42
- | **QQ Bot** | QQ bot integration for group/private chat | ✅ **Completed** (v2.1.0) — Markdown / buttons / rich media |
43
- | **Feishu** | Feishu / Lark official persistent WebSocket bot | ✅ **Completed** (v2.3.0) — No-public-IP WS / Card Approvals |
44
- | **Telegram** | IM channel suited for self-hosting and overseas | ✅ **Completed** (v2.4.0) — Long Polling / Proxy / Native Menu / Inline Cards / Streaming |
45
- | **OpenClaw** | Connect with the OpenClaw ecosystem | Planned |
46
50
 
47
51
  ---
48
52
 
@@ -82,8 +86,8 @@ npm install -g @deepseek-ai/dsh
82
86
  # Install the latest version
83
87
  dsh plugin --profile web add @wenbin_wb/dsh-bridge
84
88
 
85
- # Or specify a version (e.g. 2.2.6)
86
- dsh plugin --profile web add @wenbin_wb/dsh-bridge@2.2.6
89
+ # Or specify a version (e.g. 2.5.0)
90
+ dsh plugin --profile web add @wenbin_wb/dsh-bridge@2.5.0
87
91
  ```
88
92
 
89
93
  > 💡 **No global install permission?** Use `npx`:
@@ -127,6 +131,39 @@ After upgrading, restart DSH, perform a **hard refresh** in your browser (Window
127
131
 
128
132
  ## Usage
129
133
 
134
+ ### 🔐 Access Security & Admin Guard (v2.5.0 Major Release)
135
+
136
+ Go to Settings -> "Remote Access" -> "**Security**" tab to enable enterprise-grade protection with a single click.
137
+
138
+ #### 1. 🛡️ 1st Line of Defense: Visitor Access Guard (Protects Web UI Entry)
139
+ - **Flexible Scope Control**:
140
+ - `Protect All Channels`: LAN and all public tunnels require authentication;
141
+ - `Protect Public Tunnels Only (Recommended)`: LAN keeps zero-friction passwordless access, while public internet exposure requires authentication;
142
+ - `Protect LAN Only`: Enforces guard exclusively on local network.
143
+ - **Three Verification Modes**:
144
+ - 🟢 **Scan QR Code Passwordless + Password Verification (Recommended)**: Console-generated QR codes automatically inject a 256-bit secure Token for instant 1-second passwordless access. Visitors manually typing IP/domain must enter the visitor access password;
145
+ - 🔑 **Password / PIN Only**: All external devices must manually enter the password;
146
+ - 🎫 **Secure Token Only**: Only devices with valid QR codes or Token links can enter.
147
+ - **1-Click Token Rotation**: Click "🔄 Reset Security Token" to immediately invalidate all previously shared QR codes and URLs.
148
+
149
+ #### 2. 🔒 2nd Line of Defense: Admin Console Anti-Tamper Guard (Protects Plugin Settings)
150
+ - **Separated Admin Password**: Independent administrator password decoupled from visitor password; guests with access passwords cannot tamper with tunnels, bots, or tokens;
151
+ - **Three Admin Policies**:
152
+ - 🔑 **Password Unlock (Recommended)**: Remote devices see a full-screen lock until the admin password is entered for a temporary session;
153
+ - 🛡️ **Host Computer Only (Highest Security)**: Remote devices are strictly blocked from viewing or changing network/bot/security settings — management is only allowed from the physical host (`127.0.0.1`);
154
+ - 🌐 **Open Mode**: Remote authenticated users can directly manage settings.
155
+
156
+ #### 3. 🛟 Fail-safe Recovery System (Never Locked Out)
157
+ - **Physical Host Privileges**: Host computer running DSH (`127.0.0.1` / `localhost`) has permanent physical privileges — **never requires access password, settings panel is never locked**;
158
+ - **Emergency Terminal Command**: On headless Linux servers or in case of forgotten passwords, run a single command in your terminal:
159
+ ```bash
160
+ touch ~/.dsh/dsh-bridge/reset-auth
161
+ ```
162
+ The plugin instantly detects the marker, wipes all passwords and locks, deletes the marker, and restores default passwordless access;
163
+ - **Built-in Recovery Guides**: Both visitor login pages and admin lock screens provide expandable `❓ Forgot Password?` help cards.
164
+
165
+ ---
166
+
130
167
  ### LAN Access
131
168
 
132
169
  Automatically active when the plugin starts, zero configuration needed. Open Settings -> "Remote Access", and scan the QR code with your phone.
@@ -142,7 +179,7 @@ Automatically active when the plugin starts, zero configuration needed. Open Set
142
179
 
143
180
  ### Custom Tunnel
144
181
 
145
- Requires a server with a public IP. See the [Custom Tunnel Setup Guide](docs/custom-tunnel.md) for detailed steps.
182
+ Requires a server with a public IP (server environment requires Node.js >= 18, recommended Node.js 22 LTS). See the [Custom Tunnel Setup Guide](docs/custom-tunnel.md) for detailed steps.
146
183
 
147
184
  1. Deploy the tunnel server on your server following the guide
148
185
  2. Enter the WebSocket URL (`wss://...`) and access token in the "Custom Tunnel" card
package/README.md CHANGED
@@ -14,6 +14,11 @@
14
14
 
15
15
  ## 功能特性
16
16
 
17
+ - **🔐 全套访问安全认证与后台防篡改(v2.5.0 重磅)**:
18
+ - **第一道防线(外部访问门禁)**:二维码自带专属 Token 扫码一秒免密直入;手动输入 IP 或公网域名强制验证密码;支持「全部防护 / 仅公网 / 仅局域网」精准通道分流;
19
+ - **第二道防线(管理控制台防篡改)**:独立管理员密码,远程设备进入控制台全局锁定网络配置与 IM 机器人密钥,支持「需密码解锁 / 仅电脑本机管理 / 宽松直管」;
20
+ - **三重容灾保命体系**:电脑本机(`127.0.0.1`)永久最高物理特权(永不自锁) + 终端 `touch ~/.dsh/dsh-bridge/reset-auth` 一秒救急重置 + 全界面忘记密码求助引导;
21
+ - **金融级安全引擎**:PBKDF2 + SHA-256 加盐哈希安全存储、30 天 HttpOnly SameSite 会话、单 IP 连续 5 次错误封禁 60 秒防暴力破解。
17
22
  - **局域网访问**:手机/平板扫码,同一 Wi-Fi 直接访问,躺着也能在手机上接着聊
18
23
  - **Cloudflare 隧道**:一键暴露公网地址,随时随地连接,出差在外、不在家也能接着干,无需自建公网服务器
19
24
  - **自建隧道**:连接自己的隧道服务器,获得固定域名([搭建教程](docs/custom-tunnel.md))
@@ -24,7 +29,6 @@
24
29
  - **IM 官方品牌矢量图标**:微信、QQ、飞书、Telegram 官方矢量图标与状态展示,直接在聊天软件里呼唤你的 Agent
25
30
  - **极速版本检查与一键升级**:国内高速镜像(npmmirror)优先 + 官方源毫秒级双通道检查,检测到新版本支持**界面一键直接升级**,无需手动打开终端
26
31
  - **深色模式深度适配**:完美适配 DeepSeek Harness 设计系统明暗主题切换,二维码自带白底安全垫,暗光下手机扫码 100% 极速识别
27
- - **安全提示**:URL 和二维码带访问警告,防止误分享
28
32
 
29
33
  ![npm](https://img.shields.io/npm/v/@wenbin_wb/dsh-bridge?label=npm)
30
34
  ![npm downloads](https://img.shields.io/npm/dt/@wenbin_wb/dsh-bridge?label=downloads)
@@ -37,12 +41,12 @@
37
41
 
38
42
  | 目标 | 说明 | 状态 |
39
43
  |------|------|------|
44
+ | **访问安全认证** | 外部访问门禁拦截 + 管理后台防篡改锁 + 三重容灾保命体系 | ✅ **已完成**(v2.5.0) |
45
+ | **Telegram** | 适合自托管与海外的 IM 渠道(免公网长轮询 / 代理支持 / 原生菜单 / Inline 卡片 / 流式打字机) | ✅ **已完成**(v2.4.0) |
46
+ | **飞书** | 飞书开放平台长连接机器人,办公场景直接调用(免公网 WS / 卡片审批) | ✅ **已完成**(v2.3.0) |
47
+ | **QQ Bot** | 接入 QQ 机器人,群聊/私聊唤起 Agent(Markdown / 按钮 / 富媒体) | ✅ **已完成**(v2.1.0) |
48
+ | **微信** | 在微信里直接与你的 Agent 对话(多工作区 / 会话持久化 / 媒体 / 审批) | ✅ **已完成**(v1.0.0) |
40
49
  | **平台抽象层** | 平台无关的核心(会话/审批/命令/digest)跨 IM 渠道复用 | ✅ **已完成**(v2.0.0) |
41
- | **微信** | 在微信里直接与你的 Agent 对话 | ✅ 已支持(多工作区 / 会话持久化 / 媒体 / 审批) |
42
- | **QQ Bot** | 接入 QQ 机器人,群聊/私聊唤起 Agent | ✅ **已完成**(v2.1.0)— Markdown / 按钮 / 富媒体 |
43
- | **飞书** | 飞书开放平台长连接机器人,办公场景直接调用 | ✅ **已完成**(v2.3.0)— 免公网 WS / 卡片审批 |
44
- | **Telegram** | 适合自托管与海外的 IM 渠道 | ✅ **已完成**(v2.4.0)— 免公网长轮询 / 代理支持 / 原生菜单 / Inline 卡片 / 流式打字机 |
45
- | **OpenClaw** | 与 OpenClaw 生态打通 | 规划中 |
46
50
 
47
51
  ---
48
52
 
@@ -82,8 +86,8 @@ npm install -g @deepseek-ai/dsh
82
86
  # 安装最新版
83
87
  dsh plugin --profile web add @wenbin_wb/dsh-bridge
84
88
 
85
- # 或指定版本(如 2.2.6
86
- dsh plugin --profile web add @wenbin_wb/dsh-bridge@2.2.6
89
+ # 或指定版本(如 2.5.0
90
+ dsh plugin --profile web add @wenbin_wb/dsh-bridge@2.5.0
87
91
  ```
88
92
 
89
93
  > 💡 **没有全局安装权限?** 使用 `npx` 方式:
@@ -127,6 +131,39 @@ dsh plugin --profile web add @wenbin_wb/dsh-bridge@latest
127
131
 
128
132
  ## 使用
129
133
 
134
+ ### 🔐 访问安全认证与后台防篡改(v2.5.0 重磅)
135
+
136
+ 打开设置页「远程访问」→「**安全认证**」Tab 即可一键启用全方位安全守护。
137
+
138
+ #### 1. 🛡️ 第一道防线:外部访问门禁(保护谁能进 Web 界面)
139
+ - **多通道分流生效**:
140
+ - `全部通道开启防护`:局域网与所有公网隧道均需认证;
141
+ - `仅公网隧道开启防护 (推荐)`:局域网同一 Wi-Fi 内保持免密,暴露至公网的隧道强制开启认证门禁;
142
+ - `仅局域网开启防护`:仅对局域网进行门禁拦截。
143
+ - **三种灵活验证模式**:
144
+ - 🟢 **扫码免密 + 密码认证 (默认推荐)**:控制台生成的二维码已自动注入 256-bit 专属安全 Token,手机扫码即可免密秒进;直接在浏览器手动输入 IP 或公网域名的访客,需输入您设置的访客访问密码;
145
+ - 🔑 **仅密码 / PIN 码**:所有外部设备一律要求输入访问密码;
146
+ - 🎫 **仅专属 Token 免密**:仅允许通过控制台生成的二维码或带 Token 的专属链接进入。
147
+ - **一键轮换凭据**:点击「🔄 重置安全 Token」即可使之前分享的旧二维码和链接立即全部失效。
148
+
149
+ #### 2. 🔒 第二道防线:管理后台防篡改(保护谁能改插件设置)
150
+ - **独立管理员密码**:访客访问密码与管理控制密码彻底分离,即使将访问密码告诉外部朋友,对方也无法查看或篡改您的插件设置;
151
+ - **三种后台权限策略**:
152
+ - 🔑 **需密码解锁 (默认推荐)**:远程设备进入控制台时全屏锁定,输入管理密码后解锁临时会话;
153
+ - 🛡️ **仅限电脑本机管理 (最高安全)**:远程设备一律禁止查看与修改任何网络、机器人配置与 Token,仅允许在电脑本机(`127.0.0.1`)操作;
154
+ - 🌐 **宽松模式**:允许通过访客认证的远程设备直接管理。
155
+
156
+ #### 3. 🛟 三重容灾保命体系(永不自锁)
157
+ - **物理机免密直通**:运行 DSH 的宿主电脑(`127.0.0.1` / `localhost`)享有全局最高物理特权,**永不要求输入访问密码,设置面板永不会被锁定**;
158
+ - **服务器一键救急指令**:无头 Linux 服务器或极端忘记密码时,在宿主电脑终端执行单行命令:
159
+ ```bash
160
+ touch ~/.dsh/dsh-bridge/reset-auth
161
+ ```
162
+ 插件将在毫秒级自动清空密码与策略并删除标记,瞬间恢复初始免密状态;
163
+ - **全界面忘记密码指引**:访客登录页与锁屏页均提供 `❓ 忘记密码?` 救助展开卡片。
164
+
165
+ ---
166
+
130
167
  ### 局域网访问
131
168
 
132
169
  插件启动后自动开启,无需任何配置。打开设置页「远程访问」,用手机扫描二维码即可访问。
@@ -142,7 +179,7 @@ dsh plugin --profile web add @wenbin_wb/dsh-bridge@latest
142
179
 
143
180
  ### 自建隧道
144
181
 
145
- 需要一台有公网 IP 的服务器。详细搭建步骤见 [自建隧道教程](docs/custom-tunnel.md)。
182
+ 需要一台有公网 IP 的服务器(服务端环境要求 Node.js >= 18,推荐 Node.js 22 LTS)。详细搭建步骤见 [自建隧道教程](docs/custom-tunnel.md)。
146
183
 
147
184
  1. 按教程在服务器上部署隧道服务端
148
185
  2. 在「自建隧道」卡片中填写 WebSocket 地址(`wss://...`)和访问令牌