dsh-bridge-gateway 0.1.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 +250 -0
- package/LICENSE +21 -0
- package/README.en.md +408 -0
- package/README.md +430 -0
- package/client/build.mjs +43 -0
- package/client/client.js +5209 -0
- package/client/index.js +4967 -0
- package/cordis.patch.yml +4 -0
- package/docs/banner.jpg +0 -0
- package/docs/custom-tunnel.md +220 -0
- package/docs/feishu-usage.md +116 -0
- package/docs/fix-tunnel-sse-and-session-list.md +134 -0
- package/docs/platform-abstraction-design.md +473 -0
- package/docs/qq-usage.md +387 -0
- package/docs/screenshots/admin-lock-screen.jpg +0 -0
- package/docs/screenshots/feishu-bot-config.jpg +0 -0
- package/docs/screenshots/feishu-chat.jpg +0 -0
- package/docs/screenshots/lan-access.jpg +0 -0
- package/docs/screenshots/mobile-chat.jpg +0 -0
- package/docs/screenshots/mobile-drawer.jpg +0 -0
- package/docs/screenshots/mobile-remote-settings.jpg +0 -0
- package/docs/screenshots/mobile-settings-im.jpg +0 -0
- package/docs/screenshots/mobile-settings-lan.jpg +0 -0
- package/docs/screenshots/mobile-settings-security.jpg +0 -0
- package/docs/screenshots/mobile-settings-tunnel.jpg +0 -0
- package/docs/screenshots/mobile-workspace-picker.jpg +0 -0
- package/docs/screenshots/qq-bot-config.jpg +0 -0
- package/docs/screenshots/qq-chat.jpg +0 -0
- package/docs/screenshots/qq-group.jpg +0 -0
- package/docs/screenshots/qr-scan.jpg +0 -0
- package/docs/screenshots/remote-auth-login.jpg +0 -0
- package/docs/screenshots/remote-web-mobile.jpg +0 -0
- package/docs/screenshots/security-auth-config.jpg +0 -0
- package/docs/screenshots/telegram-bot-config.jpg +0 -0
- package/docs/screenshots/tunnel-access.jpg +0 -0
- package/docs/screenshots/wechat-bot-config.jpg +0 -0
- package/docs/screenshots/wechat-chat.jpg +0 -0
- package/docs/telegram-usage.md +93 -0
- package/docs/wechat-usage.md +104 -0
- package/lib/auth/login-template.js +382 -0
- package/lib/auth/manager.js +470 -0
- package/lib/bridge-rpc-constants.js +55 -0
- package/lib/bridge-rpc.js +553 -0
- package/lib/cloudflared-manager.mjs +345 -0
- package/lib/feishu/gateway.js +550 -0
- package/lib/feishu/index.js +222 -0
- package/lib/feishu/lark-bundled.mjs +125547 -0
- package/lib/feishu/node.js +409 -0
- package/lib/gateway/cert.js +214 -0
- package/lib/index.js +1963 -0
- package/lib/platform/base.js +156 -0
- package/lib/platform/conversation-bridge.js +1570 -0
- package/lib/platform/index.js +10 -0
- package/lib/platform/manager.js +74 -0
- package/lib/qq/gateway.js +616 -0
- package/lib/qq/index.js +309 -0
- package/lib/qq/node.js +533 -0
- package/lib/security/path-validator.js +208 -0
- package/lib/security/rate-limiter.js +93 -0
- package/lib/telegram/gateway.js +630 -0
- package/lib/telegram/index.js +213 -0
- package/lib/telegram/node.js +351 -0
- package/lib/tunnel-client.mjs +402 -0
- package/lib/wechat/gateway.js +960 -0
- package/lib/wechat/index.js +241 -0
- package/lib/wechat/media.js +281 -0
- package/lib/wechat/node.js +350 -0
- package/package.json +102 -0
package/README.en.md
ADDED
|
@@ -0,0 +1,408 @@
|
|
|
1
|
+
# dsh-bridge
|
|
2
|
+
|
|
3
|
+
<p align="center">
|
|
4
|
+
<img src="docs/banner.jpg" alt="dsh-bridge banner" width="100%" />
|
|
5
|
+
</p>
|
|
6
|
+
|
|
7
|
+
<p align="center">
|
|
8
|
+
<a href="https://www.npmjs.com/package/@wenbin_wb/dsh-bridge"><img src="https://img.shields.io/npm/v/@wenbin_wb/dsh-bridge.svg?style=flat-square&color=38bdf8&logo=npm" alt="npm version" /></a>
|
|
9
|
+
<a href="https://www.npmjs.com/package/@wenbin_wb/dsh-bridge"><img src="https://img.shields.io/npm/dt/@wenbin_wb/dsh-bridge.svg?style=flat-square&color=fbbf24&logo=npm" alt="npm downloads" /></a>
|
|
10
|
+
<a href="https://github.com/wenbin-wb/dsh-bridge/releases"><img src="https://img.shields.io/github/v/release/wenbin-wb/dsh-bridge?style=flat-square&color=10b981&logo=github" alt="GitHub release" /></a>
|
|
11
|
+
<a href="https://github.com/wenbin-wb/dsh-bridge/stargazers"><img src="https://img.shields.io/github/stars/wenbin-wb/dsh-bridge?style=flat-square&color=f43f5e&logo=github" alt="GitHub stars" /></a>
|
|
12
|
+
<a href="https://nodejs.org/"><img src="https://img.shields.io/badge/Node.js-%E2%89%A522.19%20%7C%20%E2%89%A524-339933?style=flat-square&logo=node.js" alt="Node.js version" /></a>
|
|
13
|
+
<a href="LICENSE"><img src="https://img.shields.io/npm/l/@wenbin_wb/dsh-bridge?style=flat-square&color=a855f7" alt="license" /></a>
|
|
14
|
+
</p>
|
|
15
|
+
|
|
16
|
+
<p align="center">
|
|
17
|
+
<img src="https://img.shields.io/badge/Security-Access%20Auth%20%2B%20PBKDF2-6366f1?style=flat-square&logo=security" alt="Security" />
|
|
18
|
+
<img src="https://img.shields.io/badge/WeChat-ClawBot%20%7C%20iLink-07C160?style=flat-square&logo=wechat" alt="WeChat" />
|
|
19
|
+
<img src="https://img.shields.io/badge/QQ%20Bot-OpenAPI%20v2-12B7F5?style=flat-square&logo=tencentqq" alt="QQ" />
|
|
20
|
+
<img src="https://img.shields.io/badge/Feishu-WebSocket%202.0-00D6B9?style=flat-square&logo=lark" alt="Feishu" />
|
|
21
|
+
<img src="https://img.shields.io/badge/Telegram-Bot%20API-24A1DE?style=flat-square&logo=telegram" alt="Telegram" />
|
|
22
|
+
<img src="https://img.shields.io/badge/Cloudflare-Tunnel-F38020?style=flat-square&logo=cloudflare" alt="Cloudflare" />
|
|
23
|
+
</p>
|
|
24
|
+
|
|
25
|
+
<p align="center">
|
|
26
|
+
<a href="README.md">็ฎไฝไธญๆ</a> | <b>English</b>
|
|
27
|
+
</p>
|
|
28
|
+
|
|
29
|
+
> **Multi-Channel Remote Access & Comprehensive Security Gateway Plugin for DeepSeek Harness**
|
|
30
|
+
>
|
|
31
|
+
> Scan a QR code on your phone to continue using DeepSeek Harness anywhere. Whether relaxing on the sofa, commuting, or working across networksโno need to stay at your PC or set up complex servers.
|
|
32
|
+
>
|
|
33
|
+
> Seamlessly extends your local DeepSeek Harness instance to mobile web, standalone PWA app, secure public tunnels, and **WeChat / QQ / Feishu / Telegram** bot matrix. Drive AI coding, run tasks, approve operations, and manage workspaces anytime, anywhere.
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## Table of Contents
|
|
38
|
+
|
|
39
|
+
- [โจ Key Features](#-key-features)
|
|
40
|
+
- [๐ฆ Requirements & Installation](#-requirements--installation)
|
|
41
|
+
- [๐ Core Features & Usage Guide](#-core-features--usage-guide)
|
|
42
|
+
- [1. ๐ LAN Access & Multi-NIC Smart Selection](#1-๐-lan-access--multi-nic-smart-selection)
|
|
43
|
+
- [2. ๐ Public Tunnels (Cloudflare & Custom)](#2-๐-public-tunnels-cloudflare--custom)
|
|
44
|
+
- [3. ๐ฑ Mobile Experience & Standalone PWA](#3-๐ฑ-mobile-experience--standalone-pwa)
|
|
45
|
+
- [4. ๐๏ธ Web Remote Workspace Directory Picker](#4-๐๏ธ-web-remote-workspace-directory-picker)
|
|
46
|
+
- [5. ๐ Comprehensive Access Security & Admin Lock](#5-๐-comprehensive-access-security--admin-lock)
|
|
47
|
+
- [6. ๐ค All-in-One IM Bot Matrix (WeChat / QQ / Feishu / Telegram)](#6-๐ค-all-in-one-im-bot-matrix-wechat--qq--feishu--telegram)
|
|
48
|
+
- [7. ๐ Maintenance Dashboard & Graceful Restart](#7-๐-maintenance-dashboard--graceful-restart)
|
|
49
|
+
- [๐ฌ FAQ](#-faq)
|
|
50
|
+
- [๐ ๏ธ Development & Contribution](#๏ธ-development--contribution)
|
|
51
|
+
- [๐ License](#-license)
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## โจ Key Features
|
|
56
|
+
|
|
57
|
+
- **๐ Multi-NIC Smart Detection & Switching**: Automatically detects physical Wi-Fi, Ethernet, and virtual NICs (WSL/VMware/Docker); provides visual switching with persistent memory;
|
|
58
|
+
- **๐ Dual-Mode Cloudflare Public Tunnels**: Zero-login 1-click random temporary domains or Cloudflare Named Tunnel Token with auto-start on boot;
|
|
59
|
+
- **๐ฑ Native-Grade Mobile UI & PWA**: Centered session header, native drawer sidebar with `[|` fold icon, anti-overlap responsive layout, PWA install support;
|
|
60
|
+
- **๐๏ธ Web Remote Workspace Directory Picker**: Mobile/remote visits pop up responsive tree directory browser; localhost visits route to OS native dialogs; supports `/addworkspace` IM command;
|
|
61
|
+
- **๐ Comprehensive Access Security & Dual Defenses**: QR code secret Token login, visitor password gate, independent admin anti-tamper lock; host physical privilege (`127.0.0.1`) & emergency terminal reset (`reset-auth`);
|
|
62
|
+
- **๐ค All-in-One IM Bot Matrix (WeChat / QQ / Feishu / Telegram)**: Multi-workspace dispatching, cross-restart session persistence, streaming Markdown typewriter, Card 2.0 interactive approvals, and bidirectional file sharing;
|
|
63
|
+
- **๐ Maintenance & Smooth Upgrades**: Host CPU / RAM / Uptime metrics, 1-click network diagnosis, JSON configuration backup & restore, npmmirror fast check & graceful restart.
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## ๐ฆ Requirements & Installation
|
|
68
|
+
|
|
69
|
+
### Requirements
|
|
70
|
+
|
|
71
|
+
1. **Node.js โฅ 22** (DSH requires `^22.19.0` or `โฅ 24.0.0`)
|
|
72
|
+
2. **dsh CLI available** (runnable directly in terminal)
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
# Verify environment
|
|
76
|
+
node -v # v22.19+ or v24+
|
|
77
|
+
dsh --version
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### Installation
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
# Method 1: Install from npm (Recommended)
|
|
84
|
+
dsh plugin --profile web add @wenbin_wb/dsh-bridge
|
|
85
|
+
|
|
86
|
+
# Method 2: Global-permission-free npx installation
|
|
87
|
+
npx --yes @deepseek-ai/dsh plugin --profile web add @wenbin_wb/dsh-bridge
|
|
88
|
+
|
|
89
|
+
# Method 3: Install from source
|
|
90
|
+
git clone https://github.com/wenbin-wb/dsh-bridge.git
|
|
91
|
+
dsh plugin --profile web add ./dsh-bridge
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### Upgrade
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
# Recommended: Click "๐ 1-Click Upgrade & Restart" in Web Settings > Remote Access
|
|
98
|
+
|
|
99
|
+
# Or force install latest version via CLI:
|
|
100
|
+
dsh plugin --profile web add @wenbin_wb/dsh-bridge@latest
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## ๐ Core Features & Usage Guide
|
|
106
|
+
|
|
107
|
+
Launch DeepSeek Harness, open Settings in the left sidebar, and click **"Remote Access"**:
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
### 1. ๐ LAN Access & Multi-NIC Smart Selection
|
|
112
|
+
|
|
113
|
+
Starts **automatically with DSH service**, zero configuration required.
|
|
114
|
+
|
|
115
|
+
<p align="center">
|
|
116
|
+
<img src="docs/screenshots/lan-access.jpg" width="600" alt="LAN Access Console" />
|
|
117
|
+
</p>
|
|
118
|
+
|
|
119
|
+
* **Instant QR Code Scan**: Connect phone and PC to the same Wi-Fi, scan the QR code with phone camera to access mobile web UI;
|
|
120
|
+
* **Multi-NIC Detection & Switching**: Automatically detects multiple network interfaces (physical Wi-Fi, Ethernet, WSL, VMware, Docker) and presents **"๐ Network Interface / IP Selection"** dropdown; instantly regenerates QR codes upon selection and **persists choice across restarts**.
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
### 2. ๐ Public Tunnels (Cloudflare & Custom)
|
|
125
|
+
|
|
126
|
+
Access DeepSeek Harness from anywhere outside your home network without public IP or router port forwarding:
|
|
127
|
+
|
|
128
|
+
<p align="center">
|
|
129
|
+
<img src="docs/screenshots/tunnel-access.jpg" width="600" alt="Tunnel Access Configuration" />
|
|
130
|
+
</p>
|
|
131
|
+
|
|
132
|
+
- **Mode 1: Zero-Login Temporary Tunnel (Default)**:
|
|
133
|
+
- Click "Start"; automatically prepares `cloudflared` binary with permission self-healing;
|
|
134
|
+
- Instantly generates `https://*.trycloudflare.com` URL and QR code.
|
|
135
|
+
- **Mode 2: Cloudflare Token Fixed Domain (Permanent ยท Free)**:
|
|
136
|
+
- Create a Tunnel in [Cloudflare Zero Trust Console](https://one.dash.cloudflare.com/) and bind your custom domain;
|
|
137
|
+
- Enter Tunnel Token & hostname in Advanced Settings, enable **"Auto-start with DSH"** for permanent fixed URL!
|
|
138
|
+
- **Mode 3: Custom WebSocket Tunnel**:
|
|
139
|
+
- Connect to your personal VPS reverse proxy server ([View Setup Guide](docs/custom-tunnel.md)), equipped with per-message gzip and SSE optimization.
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
### 3. ๐ฑ Mobile Experience & Standalone PWA
|
|
144
|
+
|
|
145
|
+
Deeply optimized for mobile screens and touch interactions:
|
|
146
|
+
|
|
147
|
+
- **Clean Top Header**: Retains left drawer and right new session button, with centered dynamic session title;
|
|
148
|
+
- **Native Sidebar Drawer**: Full DSH history & workspace grouping with native `[|` fold icon and swipe gestures;
|
|
149
|
+
- **Standalone PWA Support**: Click "Add to Home Screen" in mobile browser to run as a 100% standalone fullscreen app;
|
|
150
|
+
- **Anti-Overlap Responsive Layout**: Bottom toolbar adapts to screen width, preventing button collision.
|
|
151
|
+
|
|
152
|
+
#### Mobile Chat & Workspace Experience
|
|
153
|
+
|
|
154
|
+
<p align="center">
|
|
155
|
+
<img src="docs/screenshots/remote-web-mobile.jpg" width="23%" alt="Mobile Home" />
|
|
156
|
+
|
|
157
|
+
<img src="docs/screenshots/mobile-chat.jpg" width="23%" alt="Mobile Chat" />
|
|
158
|
+
|
|
159
|
+
<img src="docs/screenshots/mobile-drawer.jpg" width="23%" alt="Mobile Drawer" />
|
|
160
|
+
|
|
161
|
+
<img src="docs/screenshots/mobile-workspace-picker.jpg" width="23%" alt="Mobile Workspace Picker" />
|
|
162
|
+
</p>
|
|
163
|
+
|
|
164
|
+
#### Remote Settings Center on Mobile
|
|
165
|
+
|
|
166
|
+
<p align="center">
|
|
167
|
+
<img src="docs/screenshots/mobile-settings-lan.jpg" width="23%" alt="LAN Settings" />
|
|
168
|
+
|
|
169
|
+
<img src="docs/screenshots/mobile-settings-tunnel.jpg" width="23%" alt="Tunnel Settings" />
|
|
170
|
+
|
|
171
|
+
<img src="docs/screenshots/mobile-settings-im.jpg" width="23%" alt="IM Bot Settings" />
|
|
172
|
+
|
|
173
|
+
<img src="docs/screenshots/mobile-settings-security.jpg" width="23%" alt="Security Settings" />
|
|
174
|
+
</p>
|
|
175
|
+
|
|
176
|
+
---
|
|
177
|
+
|
|
178
|
+
### 4. ๐๏ธ Web Remote Workspace Directory Picker
|
|
179
|
+
|
|
180
|
+
Solves the pain point of mobile browsers being unable to trigger PC native folder dialogs:
|
|
181
|
+
|
|
182
|
+
<p align="center">
|
|
183
|
+
<img src="docs/screenshots/mobile-workspace-picker.jpg" width="380" alt="Mobile Workspace Picker" />
|
|
184
|
+
</p>
|
|
185
|
+
|
|
186
|
+
* **Smart Routing**: PC localhost visits (`127.0.0.1`) invoke OS native file dialogs; mobile/remote visits pop up responsive bottom directory browser;
|
|
187
|
+
* **Quick Access**: 1-click access to Windows drives (C:, D:) and standard system folders (Desktop, Documents, Downloads, Projects).
|
|
188
|
+
|
|
189
|
+
---
|
|
190
|
+
|
|
191
|
+
### 5. ๐ Comprehensive Access Security & Admin Lock
|
|
192
|
+
|
|
193
|
+
Open **"Security"** tab to establish bank-grade protection for your local development environment:
|
|
194
|
+
|
|
195
|
+
<p align="center">
|
|
196
|
+
<img src="docs/screenshots/security-auth-config.jpg" width="600" alt="Security Config" />
|
|
197
|
+
</p>
|
|
198
|
+
|
|
199
|
+
#### 1. ๐ก๏ธ Line 1: External Access Gateway
|
|
200
|
+
- **QR Token Passwordless + Password Verification**: QR codes carry 256-bit encrypted Token for instant access; manual IP/domain visits require password;
|
|
201
|
+
- **Channel Isolation**: Choose between "All Channels / Public Tunnels Only (LAN Passwordless) / LAN Only".
|
|
202
|
+
|
|
203
|
+
<details>
|
|
204
|
+
<summary>๐ฑ Click to view Remote Access Login Page</summary>
|
|
205
|
+
<br/>
|
|
206
|
+
<p align="center">
|
|
207
|
+
<img src="docs/screenshots/remote-auth-login.jpg" width="500" alt="Remote Access Login Page" />
|
|
208
|
+
</p>
|
|
209
|
+
</details>
|
|
210
|
+
|
|
211
|
+
#### 2. ๐ Line 2: Admin Console Anti-Tamper Lock
|
|
212
|
+
- **Independent Admin Password**: Remote devices enter locked console, requiring admin password to view or modify tokens and bot configs;
|
|
213
|
+
- **Strict Host Policy**: Option to restrict management solely to host machine (`127.0.0.1`).
|
|
214
|
+
|
|
215
|
+
<details>
|
|
216
|
+
<summary>๐ฅ๏ธ Click to view Admin Console Lock Screen</summary>
|
|
217
|
+
<br/>
|
|
218
|
+
<p align="center">
|
|
219
|
+
<img src="docs/screenshots/admin-lock-screen.jpg" width="500" alt="Admin Console Lock Screen" />
|
|
220
|
+
</p>
|
|
221
|
+
</details>
|
|
222
|
+
|
|
223
|
+
#### 3. ๐ Triple Disaster Recovery (Never Locked Out)
|
|
224
|
+
- **Host Physical Privilege**: PC localhost (`127.0.0.1`) enjoys permanent highest privilege, never locked;
|
|
225
|
+
- **Terminal Emergency Reset**: Run `touch ~/.dsh-bridge/reset-auth` in terminal to reset passwords instantly;
|
|
226
|
+
- **Interactive Guidance**: Built-in interactive recovery guides on all auth pages.
|
|
227
|
+
|
|
228
|
+
---
|
|
229
|
+
|
|
230
|
+
### 6. ๐ค All-in-One IM Bot Matrix (WeChat / QQ / Feishu / Telegram)
|
|
231
|
+
|
|
232
|
+
Interact with local AI agents directly inside your favorite messaging apps without opening a browser:
|
|
233
|
+
|
|
234
|
+
---
|
|
235
|
+
|
|
236
|
+
#### ๐ข WeChat Bot (ClawBot / iLink)
|
|
237
|
+
|
|
238
|
+
Scan QR code with personal WeChat account to chat, manage sessions, and approve permissions via official Tencent servers without public IP.
|
|
239
|
+
|
|
240
|
+
<p align="center">
|
|
241
|
+
<img src="docs/screenshots/wechat-bot-config.jpg" width="600" alt="WeChat Bot Config" />
|
|
242
|
+
</p>
|
|
243
|
+
|
|
244
|
+
<details>
|
|
245
|
+
<summary>๐ฑ Click to view WeChat Chat & Approval</summary>
|
|
246
|
+
<br/>
|
|
247
|
+
<p align="center">
|
|
248
|
+
<img src="docs/screenshots/wechat-chat.jpg" width="380" alt="WeChat Chat" />
|
|
249
|
+
</p>
|
|
250
|
+
</details>
|
|
251
|
+
|
|
252
|
+
* **Quick Setup**: Remote Access > IM Bot > WeChat > Scan QR code > Send first message to auto-authorize. See [WeChat Guide](docs/wechat-usage.md).
|
|
253
|
+
|
|
254
|
+
---
|
|
255
|
+
|
|
256
|
+
#### ๐ง QQ Bot (OpenAPI v2)
|
|
257
|
+
|
|
258
|
+
Official QQ Bot with direct/group @chat, Markdown rendering, interactive button keyboards, and rich media transfers.
|
|
259
|
+
|
|
260
|
+
<p align="center">
|
|
261
|
+
<img src="docs/screenshots/qq-bot-config.jpg" width="600" alt="QQ Bot Config" />
|
|
262
|
+
</p>
|
|
263
|
+
|
|
264
|
+
<details>
|
|
265
|
+
<summary>๐ฑ Click to view QQ Direct & Group Chat</summary>
|
|
266
|
+
<br/>
|
|
267
|
+
<p align="center">
|
|
268
|
+
<img src="docs/screenshots/qq-chat.jpg" width="48%" alt="QQ Direct Chat" />
|
|
269
|
+
<img src="docs/screenshots/qq-group.jpg" width="48%" alt="QQ Group Chat" />
|
|
270
|
+
</p>
|
|
271
|
+
</details>
|
|
272
|
+
|
|
273
|
+
* **Quick Setup**: Create bot on [QQ Open Platform](https://q.qq.com), fill AppID & Secret > Send first message to auto-authorize. See [QQ Guide](docs/qq-usage.md).
|
|
274
|
+
|
|
275
|
+
---
|
|
276
|
+
|
|
277
|
+
#### ๐ฆ Feishu (Lark) Bot (WebSocket 2.0)
|
|
278
|
+
|
|
279
|
+
Enterprise self-built app via official full-duplex WebSocket long connectionโ**100% No Public IP / No Webhook required**.
|
|
280
|
+
|
|
281
|
+
<p align="center">
|
|
282
|
+
<img src="docs/screenshots/feishu-bot-config.jpg" width="600" alt="Feishu Bot Config" />
|
|
283
|
+
</p>
|
|
284
|
+
|
|
285
|
+
<details>
|
|
286
|
+
<summary>๐ฑ Click to view Feishu Chat & Card Approval</summary>
|
|
287
|
+
<br/>
|
|
288
|
+
<p align="center">
|
|
289
|
+
<img src="docs/screenshots/feishu-chat.jpg" width="380" alt="Feishu Chat" />
|
|
290
|
+
</p>
|
|
291
|
+
</details>
|
|
292
|
+
|
|
293
|
+
* **Quick Setup**: Create self-built app on [Feishu Open Platform](https://open.feishu.cn/app), enable long connection > Fill App ID & Secret. See [Feishu Guide](docs/feishu-usage.md).
|
|
294
|
+
|
|
295
|
+
---
|
|
296
|
+
|
|
297
|
+
#### โ๏ธ Telegram Bot (Bot API + Proxy Support)
|
|
298
|
+
|
|
299
|
+
Official Telegram Bot API with Long Polling and **built-in zero-dependency HTTP/HTTPS proxy tunnel**.
|
|
300
|
+
|
|
301
|
+
<p align="center">
|
|
302
|
+
<img src="docs/screenshots/telegram-bot-config.jpg" width="600" alt="Telegram Bot Config" />
|
|
303
|
+
</p>
|
|
304
|
+
|
|
305
|
+
* **Quick Setup**: Create bot with [@BotFather](https://t.me/BotFather) > Fill Bot Token (and optional proxy) > Send first message to auto-authorize. See [Telegram Guide](docs/telegram-usage.md).
|
|
306
|
+
|
|
307
|
+
---
|
|
308
|
+
|
|
309
|
+
#### Standardized IM Commands
|
|
310
|
+
|
|
311
|
+
| Command | Description |
|
|
312
|
+
| :--- | :--- |
|
|
313
|
+
| *(Direct Text)* | Drives current active agent to think and code |
|
|
314
|
+
| `/sessions` (or `/list`) | List all sessions grouped by workspace |
|
|
315
|
+
| `/use N` (or `/resume N`) | Switch context to session number N |
|
|
316
|
+
| `/rename <new title>` | Rename active session title |
|
|
317
|
+
| `/workspaces` | List all registered workspaces in DSH |
|
|
318
|
+
| `/addworkspace <path>` | Remotely register a local project folder |
|
|
319
|
+
| `/new <prompt>` | Start a new session in current workspace |
|
|
320
|
+
| `/new <prompt> @N` | Start a new session in workspace N |
|
|
321
|
+
| `/stop` | Immediately abort current running task |
|
|
322
|
+
| `/end` | End and suspend active session |
|
|
323
|
+
| `/yes` / `/no` (or `1`/`2`) | Respond to sensitive operation permission approvals |
|
|
324
|
+
| `/status` | View agent status and system summary |
|
|
325
|
+
| `/help` | View full command and shortcut button help |
|
|
326
|
+
|
|
327
|
+
---
|
|
328
|
+
|
|
329
|
+
### 7. ๐ Maintenance Dashboard & Graceful Restart
|
|
330
|
+
|
|
331
|
+
Open **"Maintenance"** tab to monitor health and manage operations:
|
|
332
|
+
|
|
333
|
+
<p align="center">
|
|
334
|
+
<img src="docs/screenshots/mobile-remote-settings.jpg" width="380" alt="Maintenance Dashboard" />
|
|
335
|
+
</p>
|
|
336
|
+
|
|
337
|
+
* **๐ Host System Metrics Dashboard**: Real-time CPU model, total/used RAM, Node heap memory, and DSH uptime;
|
|
338
|
+
* **๐ 1-Click Network Diagnostics**: Diagnoses reverse proxy port, LAN IPv4, Cloudflare Anycast edge, and npm mirror latency;
|
|
339
|
+
* **๐๏ธ Configuration Backup & Migration**: 1-click export/import of `.json` configuration files;
|
|
340
|
+
* **๐ Graceful Smooth Restart**: 1-click DSH service restart with automatic reconnect and page reload.
|
|
341
|
+
|
|
342
|
+
---
|
|
343
|
+
|
|
344
|
+
## ๐ฌ FAQ
|
|
345
|
+
|
|
346
|
+
<details>
|
|
347
|
+
<summary><b>Q1: Phone cannot connect after scanning QR code?</b></summary>
|
|
348
|
+
<br/>
|
|
349
|
+
|
|
350
|
+
1. **Wi-Fi Check**: Ensure phone and PC are on the same Wi-Fi network with AP isolation disabled;
|
|
351
|
+
2. **Multi-NIC Switching**: If WSL/VMware/VPN is enabled, switch to physical Wi-Fi/Ethernet IP in the **"๐ Network Interface / IP Selection"** dropdown;
|
|
352
|
+
3. **Firewall**: Ensure firewall allows Node.js on port `3082`;
|
|
353
|
+
4. **Use Public Tunnel**: Enable Cloudflare Tunnel if crossing network segments.
|
|
354
|
+
</details>
|
|
355
|
+
|
|
356
|
+
<details>
|
|
357
|
+
<summary><b>Q2: How is IM Bot security ensured? Can strangers trigger my agent?</b></summary>
|
|
358
|
+
<br/>
|
|
359
|
+
|
|
360
|
+
1. **Strict Allowlist**: Built-in sender allowlist; only authorized users can drive the Agent;
|
|
361
|
+
2. **Auto First Authorization**: Admin sending the first message after login automatically binds to allowlist;
|
|
362
|
+
3. **Silent Drop**: Unauthorized messages are dropped at the lowest layer (Never fed to LLM).
|
|
363
|
+
</details>
|
|
364
|
+
|
|
365
|
+
<details>
|
|
366
|
+
<summary><b>Q3: What is the difference between Temporary and Fixed Cloudflare Tunnels?</b></summary>
|
|
367
|
+
<br/>
|
|
368
|
+
|
|
369
|
+
1. **Temporary (Default)**: Zero-login random `*.trycloudflare.com` domain, ideal for quick outdoor access;
|
|
370
|
+
2. **Fixed (Token Mode)**: Uses Cloudflare Zero Trust Named Tunnel Token to bind your own domain with auto-start on boot.
|
|
371
|
+
</details>
|
|
372
|
+
|
|
373
|
+
<details>
|
|
374
|
+
<summary><b>Q4: Will chat sessions and configurations be lost after upgrading or restarting DSH?</b></summary>
|
|
375
|
+
<br/>
|
|
376
|
+
|
|
377
|
+
1. **Persistent Configuration**: All credentials, allowlists, and passwords persist in `~/.dsh-bridge/`;
|
|
378
|
+
2. **Session Context Recovery**: Session history is persisted by DSH core engine; resume conversations with `/resume` anytime;
|
|
379
|
+
3. **Backup & Migration**: 1-click `.json` export/import in Maintenance tab.
|
|
380
|
+
</details>
|
|
381
|
+
|
|
382
|
+
---
|
|
383
|
+
|
|
384
|
+
## ๐ ๏ธ Development & Contribution
|
|
385
|
+
|
|
386
|
+
Contributions are welcome! Feel free to submit an Issue or Pull Request.
|
|
387
|
+
|
|
388
|
+
```bash
|
|
389
|
+
# 1. Clone repo
|
|
390
|
+
git clone https://github.com/wenbin-wb/dsh-bridge.git
|
|
391
|
+
cd dsh-bridge
|
|
392
|
+
|
|
393
|
+
# 2. Install dependencies & build
|
|
394
|
+
npm install
|
|
395
|
+
npm run build:client
|
|
396
|
+
|
|
397
|
+
# 3. Run unit tests
|
|
398
|
+
npm test
|
|
399
|
+
|
|
400
|
+
# 4. Link to local DSH Web Profile
|
|
401
|
+
dsh plugin --profile web add .
|
|
402
|
+
```
|
|
403
|
+
|
|
404
|
+
---
|
|
405
|
+
|
|
406
|
+
## ๐ License
|
|
407
|
+
|
|
408
|
+
MIT ยฉ [wenbin-wb](https://github.com/wenbin-wb)
|