@wenbin_wb/dsh-bridge 2.2.4 → 2.2.6
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.md +70 -6
- package/README.zh-CN.md +70 -6
- package/client/client.js +542 -183
- package/client/index.js +475 -165
- package/docs/qq-usage.md +385 -0
- package/lib/bridge-rpc-constants.js +1 -0
- package/lib/bridge-rpc.js +5 -0
- package/lib/index.js +88 -8
- package/lib/platform/conversation-bridge.js +5 -3
- package/lib/qq/index.js +2 -0
- package/lib/tunnel-client.mjs +0 -3
- package/lib/wechat/node.js +42 -16
- package/package.json +3 -2
package/lib/wechat/node.js
CHANGED
|
@@ -147,7 +147,7 @@ export class WechatConversationNode extends ConversationBridge {
|
|
|
147
147
|
continue
|
|
148
148
|
}
|
|
149
149
|
|
|
150
|
-
const aesKey = img.aeskey || img.aes_key || img.media?.aes_key
|
|
150
|
+
const aesKey = img.aeskey || img.aes_key || img.media?.aes_key || img.media?.aeskey
|
|
151
151
|
if (!aesKey) {
|
|
152
152
|
const fields = Object.keys(img).join(', ')
|
|
153
153
|
const msg = `图片缺 aes_key,字段: ${fields}`
|
|
@@ -156,14 +156,20 @@ export class WechatConversationNode extends ConversationBridge {
|
|
|
156
156
|
continue
|
|
157
157
|
}
|
|
158
158
|
|
|
159
|
-
// 从 image_item.media 对象提取 CDN 下载参数
|
|
159
|
+
// 从 image_item 或 image_item.media 对象提取 CDN 下载参数
|
|
160
160
|
const mediaObj = img.media
|
|
161
|
-
const encryptedParam =
|
|
162
|
-
|
|
161
|
+
const encryptedParam = img.encrypt_query_param
|
|
162
|
+
|| img.encrypted_query_param
|
|
163
|
+
|| mediaObj?.encrypt_query_param
|
|
164
|
+
|| mediaObj?.encrypted_query_param
|
|
165
|
+
|| mediaObj?.encrypt_query_param_full
|
|
166
|
+
|| (typeof mediaObj === 'string' ? mediaObj : undefined)
|
|
167
|
+
const fullUrl = img.full_url || img.url || mediaObj?.full_url || mediaObj?.url
|
|
168
|
+
debugInfo.push(`media 类型: ${typeof mediaObj}, param=${!!encryptedParam}`)
|
|
163
169
|
|
|
164
170
|
const file = await this._downloadMediaItem({
|
|
165
|
-
encryptedQueryParam:
|
|
166
|
-
fullUrl
|
|
171
|
+
encryptedQueryParam: encryptedParam,
|
|
172
|
+
fullUrl,
|
|
167
173
|
aesKeyBase64: aesKey,
|
|
168
174
|
sender,
|
|
169
175
|
mediaType: 'image',
|
|
@@ -181,15 +187,25 @@ export class WechatConversationNode extends ConversationBridge {
|
|
|
181
187
|
debugInfo.push(`文件项缺少 file_item`)
|
|
182
188
|
continue
|
|
183
189
|
}
|
|
184
|
-
const aesKey = fileItem.aes_key || fileItem.media?.aes_key
|
|
185
|
-
const encryptedParam = fileItem.
|
|
186
|
-
|
|
187
|
-
|
|
190
|
+
const aesKey = fileItem.aes_key || fileItem.aeskey || fileItem.media?.aes_key || fileItem.media?.aeskey
|
|
191
|
+
const encryptedParam = fileItem.encrypt_query_param
|
|
192
|
+
|| fileItem.encrypted_query_param
|
|
193
|
+
|| fileItem.media?.encrypt_query_param
|
|
194
|
+
|| fileItem.media?.encrypted_query_param
|
|
195
|
+
|| (typeof fileItem.media === 'string' ? fileItem.media : undefined)
|
|
196
|
+
const fullUrl = fileItem.full_url || fileItem.url || fileItem.media?.full_url || fileItem.media?.url
|
|
197
|
+
|
|
198
|
+
if (!encryptedParam && !fullUrl) {
|
|
199
|
+
debugInfo.push(`文件缺 media/encrypt_query_param,字段: ${Object.keys(fileItem).join(', ')}`)
|
|
200
|
+
continue
|
|
201
|
+
}
|
|
202
|
+
if (!aesKey) {
|
|
203
|
+
debugInfo.push(`文件缺 aes_key,字段: ${Object.keys(fileItem).join(', ')}`)
|
|
188
204
|
continue
|
|
189
205
|
}
|
|
190
206
|
const file = await this._downloadMediaItem({
|
|
191
207
|
encryptedQueryParam: encryptedParam,
|
|
192
|
-
fullUrl
|
|
208
|
+
fullUrl,
|
|
193
209
|
aesKeyBase64: aesKey,
|
|
194
210
|
sender,
|
|
195
211
|
mediaType: 'file',
|
|
@@ -210,15 +226,25 @@ export class WechatConversationNode extends ConversationBridge {
|
|
|
210
226
|
debugInfo.push(`视频项缺少 video_item`)
|
|
211
227
|
continue
|
|
212
228
|
}
|
|
213
|
-
const aesKey = video.aes_key || video.media?.aes_key
|
|
214
|
-
const encryptedParam = video.
|
|
215
|
-
|
|
216
|
-
|
|
229
|
+
const aesKey = video.aes_key || video.aeskey || video.media?.aes_key || video.media?.aeskey
|
|
230
|
+
const encryptedParam = video.encrypt_query_param
|
|
231
|
+
|| video.encrypted_query_param
|
|
232
|
+
|| video.media?.encrypt_query_param
|
|
233
|
+
|| video.media?.encrypted_query_param
|
|
234
|
+
|| (typeof video.media === 'string' ? video.media : undefined)
|
|
235
|
+
const fullUrl = video.full_url || video.url || video.media?.full_url || video.media?.url
|
|
236
|
+
|
|
237
|
+
if (!encryptedParam && !fullUrl) {
|
|
238
|
+
debugInfo.push(`视频缺 media/encrypt_query_param,字段: ${Object.keys(video).join(', ')}`)
|
|
239
|
+
continue
|
|
240
|
+
}
|
|
241
|
+
if (!aesKey) {
|
|
242
|
+
debugInfo.push(`视频缺 aes_key,字段: ${Object.keys(video).join(', ')}`)
|
|
217
243
|
continue
|
|
218
244
|
}
|
|
219
245
|
const file = await this._downloadMediaItem({
|
|
220
246
|
encryptedQueryParam: encryptedParam,
|
|
221
|
-
fullUrl
|
|
247
|
+
fullUrl,
|
|
222
248
|
aesKeyBase64: aesKey,
|
|
223
249
|
sender,
|
|
224
250
|
mediaType: 'video',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wenbin_wb/dsh-bridge",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.6",
|
|
4
4
|
"description": "手机扫码即可在移动端/公网继续用 DeepSeek Harness,人不在电脑前也能接着干。一键局域网二维码、Cloudflare 公网隧道、自建隧道与微信 Bot(多工作区/会话持久化/媒体/审批),无需自己搭公网服务器。",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -20,7 +20,8 @@
|
|
|
20
20
|
"LICENSE",
|
|
21
21
|
"docs/banner.jpg",
|
|
22
22
|
"docs/custom-tunnel.md",
|
|
23
|
-
"docs/wechat-usage.md"
|
|
23
|
+
"docs/wechat-usage.md",
|
|
24
|
+
"docs/qq-usage.md"
|
|
24
25
|
],
|
|
25
26
|
"scripts": {
|
|
26
27
|
"build:client": "node client/build.mjs",
|