dsh-remote-plugin 0.8.3 → 0.8.4

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.
Files changed (48) hide show
  1. package/apk/dsh-remote.apk +0 -0
  2. package/approval-summary.mjs +115 -0
  3. package/gateway.cjs +642 -16
  4. package/index.mjs +12 -0
  5. package/insights.mjs +1 -1
  6. package/package.json +2 -1
  7. package/plugin-center.mjs +88 -17
  8. package/plugin-transaction.mjs +19 -3
  9. package/public/admin.html +30 -28
  10. package/public/admin.js +1 -1
  11. package/public/announcements.json +31 -0
  12. package/public/app.js +40 -47
  13. package/public/approval-summary.js +78 -0
  14. package/public/build.json +2 -2
  15. package/public/cache-upgrade.js +51 -0
  16. package/public/chat-copy.js +34 -21
  17. package/public/desktop/desktop.css +18 -39
  18. package/public/desktop/desktop.html +70 -96
  19. package/public/desktop/desktop.js +15 -42
  20. package/public/e2ee-transport.js +147 -0
  21. package/public/extensions.js +6 -6
  22. package/public/history.js +48 -1
  23. package/public/index.html +74 -93
  24. package/public/md.js +36 -18
  25. package/public/motion.js +1 -1
  26. package/public/plugin-center.css +1 -0
  27. package/public/plugin-center.js +92 -11
  28. package/public/plugin.html +25 -24
  29. package/public/relay-devices.js +74 -0
  30. package/public/relay-settings.css +7 -0
  31. package/public/relay-settings.js +11 -4
  32. package/public/session-deck.css +7 -1
  33. package/public/session-deck.js +1 -1
  34. package/public/skins/blue-fish/preview.html +3 -2
  35. package/public/skins/bocchi/preview.html +5 -4
  36. package/public/skins/kita/preview.html +6 -5
  37. package/public/skins/nijika/preview.html +6 -5
  38. package/public/skins/penguin/preview.html +3 -2
  39. package/public/skins/ryo/preview.html +6 -5
  40. package/public/sponsor-entry.js +20 -21
  41. package/public/styles.css +24 -24
  42. package/public/teams.js +2 -2
  43. package/public/update.json +8 -8
  44. package/public/version.json +1 -1
  45. package/public/workflow.js +3 -4
  46. package/skills/dsh-remote-doctor/references/wiki/plugins.md +1 -1
  47. package/task-board.mjs +2 -2
  48. package/teams.mjs +7 -2
package/index.mjs CHANGED
@@ -16,6 +16,7 @@ import { fileURLToPath } from 'node:url'
16
16
  import { randomUUID } from 'node:crypto'
17
17
  import { createPluginCenter, detectProfile } from './plugin-center.mjs'
18
18
  import { readCostInsights } from './insights.mjs'
19
+ import { readApprovalSummary } from './approval-summary.mjs'
19
20
  import { readTeamInsights } from './teams.mjs'
20
21
  import { readTaskBoard } from './task-board.mjs'
21
22
  import { readPeakReminders } from './peak-reminders.mjs'
@@ -1296,6 +1297,17 @@ async function serveStatic(req, res, ctx) {
1296
1297
  res.setHeader('cache-control', 'no-store')
1297
1298
  return sendJson(res, result.status, result.body)
1298
1299
  }
1300
+ if (pathname === `${MOUNT}/api/approval-summary`) {
1301
+ res.setHeader('cache-control', 'no-store')
1302
+ if (!remoteCommandAuthorized(req)) return sendJson(res, 401, { ok: false, code: 'unauthorized' })
1303
+ if (req.method !== 'POST') return sendJson(res, 405, { ok: false, code: 'method-not-allowed' })
1304
+ if ([...new URL(req.url, 'http://x').searchParams].length) return sendJson(res, 400, { ok: false, code: 'invalid-query' })
1305
+ let body
1306
+ try { body = JSON.parse(await readBody(req, 4096)) }
1307
+ catch { return sendJson(res, 400, { ok: false, code: 'invalid-body' }) }
1308
+ const result = await readApprovalSummary(ctx, body)
1309
+ return sendJson(res, result.status, result.body)
1310
+ }
1299
1311
  if (pathname.startsWith(`${MOUNT}/api/plugins/`)) {
1300
1312
  res.setHeader('cache-control', 'no-store')
1301
1313
  if (!remoteCommandAuthorized(req)) return sendJson(res, 401, { ok: false, message: 'unauthorized' })
package/insights.mjs CHANGED
@@ -1,4 +1,4 @@
1
- // Read-only, bounded adapter for dsh-cost-meter 1.8.x. Never forward its config.
1
+ // Read-only, bounded adapter for dsh-cost-meter 1.8.x/1.9.x. Never forward its config.
2
2
  const states = new WeakMap()
3
3
  const record = value => value && typeof value === 'object' && !Array.isArray(value) ? value : {}
4
4
  const number = value => typeof value === 'number' && Number.isFinite(value) && value >= 0 ? value : null
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-remote-plugin",
3
- "version": "0.8.3",
3
+ "version": "0.8.4",
4
4
  "description": "DSH Remote 官方 bundle 插件:更多菜单中的手机连接入口、首次连接提示与浏览器管理控制台;内置网关自动启停,支持手机远程会话、审批、文件互传和设备管理。",
5
5
  "type": "module",
6
6
  "main": "./index.mjs",
@@ -23,6 +23,7 @@
23
23
  "plugin-transaction.mjs",
24
24
  "market.mjs",
25
25
  "insights.mjs",
26
+ "approval-summary.mjs",
26
27
  "teams.mjs",
27
28
  "task-board.mjs",
28
29
  "peak-reminders.mjs",
package/plugin-center.mjs CHANGED
@@ -4,7 +4,7 @@ import { dirname, basename, join, resolve } from 'node:path'
4
4
  import { fileURLToPath } from 'node:url'
5
5
  import { createHash } from 'node:crypto'
6
6
  import { spawn, execFile } from 'node:child_process'
7
- import { prepareReleasePlan, profileRevision, backupTransaction, writeWorkspace, mergeReleaseRules, releasePolicy, verifyInstalled, treeDigest, restoreTransaction, canonicalPath } from './plugin-transaction.mjs'
7
+ import { prepareReleasePlan, profileRevision, backupTransaction, writeWorkspace, mergeReleaseRules, releasePolicy, verifyInstalled, treeDigest, restoreTransaction, canonicalPath, replaceFile } from './plugin-transaction.mjs'
8
8
  import { createMarketAdapter, createReadmeReader } from './market.mjs'
9
9
 
10
10
  const REGISTRY = 'https://registry.npmjs.org'
@@ -16,11 +16,42 @@ const read = path => JSON.parse(readFileSync(path, 'utf8'))
16
16
  function atomic(path, value) {
17
17
  const tmp = path + '.' + process.pid + '.tmp'
18
18
  writeFileSync(tmp, JSON.stringify(value, null, 2) + '\n', { mode: 0o600 })
19
- renameSync(tmp, path)
19
+ replaceFile(tmp, path)
20
20
  }
21
21
  const fail = (message, status = 400) => Object.assign(new Error(message), { status })
22
22
  const protectedPackage = name => name === 'dsh-remote-plugin' || name.startsWith('@deepseek-ai/')
23
23
  const revision = path => createHash('sha256').update(readFileSync(path)).digest('hex')
24
+ const registryDependency = value => typeof value === 'string' && !/[:/\\]/.test(value) && !value.startsWith('.')
25
+ function newerVersion(next, previous) {
26
+ const parse = value => /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-([\w-]+(?:\.[\w-]+)*))?(?:\+[\w.-]+)?$/.exec(value || '')
27
+ const a = parse(next), b = parse(previous)
28
+ if (!a || !b || [a, b].some(parts => parts[4]?.split('.').some(v => /^0\d+$/.test(v)))) return false
29
+ const numeric = (x, y) => x.length !== y.length ? Math.sign(x.length - y.length) : x === y ? 0 : x < y ? -1 : 1
30
+ for (let i = 1; i <= 3; i++) { const order = numeric(a[i], b[i]); if (order) return order > 0 }
31
+ if (!a[4] || !b[4]) return !a[4] && !!b[4]
32
+ const x = a[4].split('.'), y = b[4].split('.')
33
+ for (let i = 0; i < Math.max(x.length, y.length); i++) {
34
+ if (x[i] === y[i]) continue
35
+ if (x[i] === undefined || y[i] === undefined) return y[i] === undefined
36
+ const nx = /^\d+$/.test(x[i]), ny = /^\d+$/.test(y[i])
37
+ return (nx && ny ? numeric(x[i], y[i]) : nx !== ny ? nx ? -1 : 1 : x[i] < y[i] ? -1 : 1) > 0
38
+ }
39
+ return false
40
+ }
41
+ function batchTargets(body, state) {
42
+ if (body.name !== 'all-plugins' || !Array.isArray(body.targets) || !body.targets.length || body.targets.length > 100) throw fail('无效的批量更新列表')
43
+ const names = new Set()
44
+ const targets = body.targets.map(target => {
45
+ if (!target || !packagePattern.test(target.name || '') || !versionPattern.test(target.version || '') || names.has(target.name)) throw fail('无效或重复的批量更新目标')
46
+ names.add(target.name)
47
+ const item = state.items.find(item => item.name === target.name)
48
+ if (!item || !(item.managed && item.bundle || item.selfUpdate) || !registryDependency(item.requested)) throw fail('批量更新只接受当前 profile 的 registry 插件:' + target.name, 409)
49
+ if (!newerVersion(target.version, item.version)) throw fail('批量更新不能重装、降级或替换未知版本:' + target.name, 409)
50
+ return { name: target.name, version: target.version, fromVersion: item.version, enabled: item.enabled }
51
+ })
52
+ return targets.sort((a, b) => (a.name === 'dsh-remote-plugin') - (b.name === 'dsh-remote-plugin') || a.name.localeCompare(b.name))
53
+ }
54
+ const targetIdentity = targets => JSON.stringify((Array.isArray(targets) ? targets : []).map(target => ({ name: target?.name, version: target?.version })).sort((a, b) => String(a.name).localeCompare(String(b.name))))
24
55
  function adapterInterfaces(ctx) {
25
56
  // Shape checks only: never query balances, read content or activate sessions.
26
57
  const result = {}
@@ -362,11 +393,17 @@ export function createPluginCenter(ctx, options = {}) {
362
393
  let submitting = false
363
394
  async function preflight(body) {
364
395
  if (!profile?.cli) throw fail('当前环境只读', 409)
365
- if (!body || !['install', 'update', 'remove'].includes(body.action) || !packagePattern.test(body.name || '') || (body.action !== 'remove' && !versionPattern.test(body.version || ''))) throw fail('Invalid operation')
396
+ if (!body || !['install', 'update', 'remove', 'update-all'].includes(body.action) || !packagePattern.test(body.name || '') || (!['remove', 'update-all'].includes(body.action) && !versionPattern.test(body.version || ''))) throw fail('Invalid operation')
366
397
  if (protectedPackage(body.name) && !(body.action === 'update' && body.name === 'dsh-remote-plugin')) throw fail('核心插件请通过主机维护流程管理', 409)
367
398
  if (body.revision !== revision(manifestPath)) throw fail('插件列表已变化,请刷新', 409)
368
399
  const state = await inventory()
369
400
  if (state.busy || state.profileLock && state.profileLock.state !== 'dead') throw fail('已有插件任务或配置锁,请等待后重试', 409)
401
+ if (body.action === 'update-all') {
402
+ body = { ...body, targets: batchTargets(body, state) }
403
+ for (let i = 0; i < body.targets.length; i += 6) await Promise.all(body.targets.slice(i, i + 6).map(async target => {
404
+ if (!(await details(target.name, target.version)).bundle) throw fail('该版本未声明 DSH bundle:' + target.name)
405
+ }))
406
+ }
370
407
  const plan = await prepareReleasePlan(profile.dir, body, options.publicationTimes || publicationTimes)
371
408
  const key = createHash('sha256').update(JSON.stringify(plan) + Math.random()).digest('hex')
372
409
  mkdirSync(storage, { recursive: true, mode: 0o700 })
@@ -418,7 +455,7 @@ export function createPluginCenter(ctx, options = {}) {
418
455
  busy: submitting || !!owner, busyReason: owner ? busyReason || '主机任务正在启动;可查看操作记录。' : '',
419
456
  profileLock: await profileLock(profile.dir, probe).then(lock => lock && ({ state: lock.state, message: lock.message })),
420
457
  recovery: legacyLock ? { id: owner.id, reason: '旧任务锁没有进程信息,需在主机核对后手动解除。' } : null,
421
- capabilities: { preflight: true, restore: true }, items, runtime, runtimeAvailable, operations }
458
+ capabilities: { preflight: true, restore: true, updateAll: true }, items, runtime, runtimeAvailable, operations }
422
459
  }
423
460
  function recoverLegacy(body) {
424
461
  if (!profile?.cli || submitting) throw fail('当前不能恢复任务', 409)
@@ -444,7 +481,7 @@ export function createPluginCenter(ctx, options = {}) {
444
481
  if (!profile?.cli) throw fail('Current DSH profile is read-only', 409)
445
482
  if (!body || typeof body !== 'object' || Array.isArray(body)) throw fail('Invalid operation')
446
483
  const { id, action, name, version } = body
447
- if (!idPattern.test(id || '') || !packagePattern.test(name || '') || !['install', 'update', 'remove', 'enable', 'disable', 'restore'].includes(action)) throw fail('Invalid operation')
484
+ if (!idPattern.test(id || '') || !packagePattern.test(name || '') || !['install', 'update', 'update-all', 'remove', 'enable', 'disable', 'restore'].includes(action)) throw fail('Invalid operation')
448
485
  const selfUpdate = name === 'dsh-remote-plugin' && action === 'update'
449
486
  if (protectedPackage(name) && !selfUpdate && action !== 'restore') throw fail('核心插件与 Remote 的卸载、启停请通过主机维护流程管理', 409)
450
487
  if (selfUpdate && body.confirmSelfUpdate !== true) throw fail('请确认 Remote 本体更新及重启后生效', 409)
@@ -453,7 +490,7 @@ export function createPluginCenter(ctx, options = {}) {
453
490
  const jobPath = join(storage, 'job-' + id + '.json')
454
491
  if (existsSync(jobPath)) {
455
492
  const previous = read(jobPath)
456
- if (previous.action !== action || previous.name !== name || previous.version !== (version || '') || (previous.restoreFrom || '') !== (body.restoreFrom || '') || (previous.planKey || '') !== (body.preflightKey || '')) throw fail('Operation id already used', 409)
493
+ if (previous.action !== action || previous.name !== name || previous.version !== (version || '') || (previous.restoreFrom || '') !== (body.restoreFrom || '') || (previous.planKey || '') !== (body.preflightKey || '') || action === 'update-all' && targetIdentity(previous.targets) !== targetIdentity(body.targets)) throw fail('Operation id already used', 409)
457
494
  return publicJob(previous)
458
495
  }
459
496
  if (submitting) throw fail('另一个插件操作正在准备中', 409)
@@ -462,7 +499,7 @@ export function createPluginCenter(ctx, options = {}) {
462
499
  if (revision(manifestPath) !== body.revision) throw fail('插件列表已变化,请刷新后重试', 409)
463
500
  const manifest = read(manifestPath)
464
501
  const installed = Object.hasOwn(manifest.dependencies || {}, name)
465
- if (action !== 'restore' && (action === 'install' && installed || action !== 'install' && !installed)) throw fail('安装状态已变化,请刷新', 409)
502
+ if (!['restore', 'update-all'].includes(action) && (action === 'install' && installed || action !== 'install' && !installed)) throw fail('安装状态已变化,请刷新', 409)
466
503
  let plan = null, restoreFrom = null
467
504
  if (body.preflightKey) {
468
505
  if (!/^[a-f0-9]{64}$/.test(body.preflightKey)) throw fail('无效的预检凭据')
@@ -472,6 +509,11 @@ export function createPluginCenter(ctx, options = {}) {
472
509
  if (plan.action !== action || plan.name !== name || plan.version !== (version || '') || plan.expiresAt < Date.now() || plan.revision !== profileRevision(profile.dir)) throw fail('预检已过期或配置已变化,请重新预检', 409)
473
510
  if ((plan.blockers.length || plan.ruleChanges.length) && body.confirmReleasePolicy !== true) throw fail('请明确批准预检中列出的精确版本豁免及重复规则合并', 409)
474
511
  }
512
+ if (action === 'update-all') {
513
+ if (!plan || targetIdentity(plan.targets) !== targetIdentity(body.targets)) throw fail('批量更新必须使用已确认的完整预检列表', 409)
514
+ batchTargets(body, await inventory())
515
+ if (plan.targets.some(target => target.name === 'dsh-remote-plugin') && body.confirmSelfUpdate !== true) throw fail('请确认批量更新包含 Remote 本体', 409)
516
+ }
475
517
  if (action === 'restore') {
476
518
  if (!idPattern.test(body.restoreFrom || '') || body.confirmRestore !== true) throw fail('请确认恢复失败前的插件和配置', 409)
477
519
  const source = read(join(storage, 'job-' + body.restoreFrom + '.json'))
@@ -493,6 +535,7 @@ export function createPluginCenter(ctx, options = {}) {
493
535
  try { writeFileSync(lock, JSON.stringify({ id, launcherPid: process.pid, createdAt: Date.now() }), { flag: 'wx', mode: 0o600 }) }
494
536
  catch (error) { if (error.code === 'EEXIST') throw fail('已有插件任务运行中;请查看操作记录', 409); throw error }
495
537
  const job = { id, action, name, version: version || '', revision: body.revision, profile: profile.name, phase: 'queued', stage: 'queued', startedAt: Date.now(), updatedAt: Date.now(), log: '', restartRequired: false,
538
+ ...(action === 'update-all' ? { targets: plan.targets.map(target => ({ ...target, phase: 'queued' })) } : {}),
496
539
  ...(plan ? { plan, planKey: body.preflightKey } : {}), ...(restoreFrom ? { restoreFrom } : {}) }
497
540
  try {
498
541
  atomic(jobPath, job)
@@ -522,7 +565,7 @@ export function createPluginCenter(ctx, options = {}) {
522
565
  ...(query.get('refresh') === '1' ? { refresh: true } : {}) })
523
566
  }
524
567
  if (method === 'POST' && sub === '/operations') {
525
- if (['install', 'update', 'remove'].includes(body.action) && !body.preflightKey) throw fail('请先预检并确认更新计划;旧版客户端需升级 Remote 页面', 409)
568
+ if (['install', 'update', 'update-all', 'remove'].includes(body.action) && !body.preflightKey) throw fail('请先预检并确认更新计划;旧版客户端需升级 Remote 页面', 409)
526
569
  return { ok: true, operation: await submit(body) }
527
570
  }
528
571
  if (method === 'POST' && sub === '/preflight') return preflight(body)
@@ -535,6 +578,7 @@ export function createPluginCenter(ctx, options = {}) {
535
578
  function publicJob(job) {
536
579
  const { id, action, name, version, profile, phase, stage, startedAt, endedAt, updatedAt, lastOutputAt, log, message, restartRequired } = job
537
580
  return { id, action, name, version, profile, phase, stage, startedAt, endedAt, updatedAt, lastOutputAt, log, message, restartRequired,
581
+ ...(job.targets ? { targets: job.targets.map(({ name, version, fromVersion, phase, message }) => ({ name, version, fromVersion, phase, message })) } : {}),
538
582
  canRestore: !!job.recoveryState && !job.restoredBy && ['failed', 'interrupted'].includes(phase), restoredBy: job.restoredBy || '' }
539
583
  }
540
584
 
@@ -587,6 +631,7 @@ export async function runWorker(dir, cli, id, execute = runCli, cliMode = 'node'
587
631
  heartbeat = setInterval(save, 4000); heartbeat.unref()
588
632
  if (job.revision !== revision(manifestPath)) throw fail('任务开始前 profile 已变化,请刷新后重试')
589
633
  disabled = new Set(existsSync(disabledPath) ? read(disabledPath) : [])
634
+ if (job.action === 'update-all') for (const target of job.targets) if (!target.enabled) disabled.add(target.name)
590
635
  const backup = join(storage, 'backup-' + id)
591
636
  mkdirSync(backup, { mode: 0o700 })
592
637
  for (const name of ['package.json', 'pnpm-lock.yaml', 'pnpm-workspace.yaml', 'cordis.patch.yml', 'cordis.yml', '.npmrc']) {
@@ -624,14 +669,32 @@ export async function runWorker(dir, cli, id, execute = runCli, cliMode = 'node'
624
669
  writeWorkspace(dir, job.plan.workspace)
625
670
  })
626
671
  }
627
- if (['install', 'update', 'remove'].includes(job.action)) {
672
+ if (['install', 'update', 'remove', 'update-all'].includes(job.action)) {
628
673
  progress('cli', '正在运行 DSH 插件命令,等待主机输出。')
629
- const args = job.action === 'remove' ? ['remove', job.name, '--config.ignore-scripts=true'] : ['add', job.name + '@' + job.version, '--save-exact', '--ignore-scripts', '--registry=' + REGISTRY]
630
- await execute(cli, ['plugin', '--profile', basename(dir), ...args], dir, chunk => {
631
- job.lastOutputAt = Date.now()
632
- job.log = (job.log + chunk.replace(/\x1b\[[0-9;]*m/g, '').replace(/(token|password|authorization)\s*[=:]\s*\S+/gi, '$1=[redacted]')).slice(-12000)
633
- save()
634
- }, pid => atomic(lock, { ...read(lock), cliPid: pid }), cliMode)
674
+ const targets = job.action === 'update-all' ? job.targets : [job]
675
+ let batchRevision = job.action === 'update-all' ? profileRevision(dir) : null
676
+ for (const target of targets) {
677
+ if (job.action === 'update-all') {
678
+ if (profileRevision(dir) !== batchRevision) throw fail('批量更新期间主机配置已被其他操作改变,已停止后续项。')
679
+ target.phase = 'running'; progress('cli', '正在更新 ' + target.name + '@' + target.version + '(' + (targets.indexOf(target) + 1) + '/' + targets.length + ')。')
680
+ }
681
+ const args = job.action === 'remove' ? ['remove', target.name, '--config.ignore-scripts=true'] : ['add', target.name + '@' + target.version, '--save-exact', '--ignore-scripts', '--registry=' + REGISTRY]
682
+ await execute(cli, ['plugin', '--profile', basename(dir), ...args], dir, chunk => {
683
+ job.lastOutputAt = Date.now()
684
+ job.log = (job.log + chunk.replace(/\x1b\[[0-9;]*m/g, '').replace(/(token|password|authorization)\s*[=:]\s*\S+/gi, '$1=[redacted]')).slice(-12000)
685
+ save()
686
+ }, pid => atomic(lock, { ...read(lock), cliPid: pid }), cliMode)
687
+ if (job.action === 'update-all') await guarded(() => {
688
+ const manifest = read(manifestPath)
689
+ manifest.dsh.profile.bundles = manifest.dsh.profile.bundles.filter(name => !disabled.has(name))
690
+ atomic(manifestPath, manifest); atomic(disabledPath, [...disabled])
691
+ const pkg = read(join(dir, 'node_modules', ...target.name.split('/'), 'package.json'))
692
+ if (pkg.version !== target.version || !pkg.dsh?.bundle?.patch || manifest.dependencies?.[target.name] !== target.version) throw fail('安装后的包版本、精确依赖或 bundle 校验失败:' + target.name)
693
+ verifyInstalled(dir, job)
694
+ batchRevision = profileRevision(dir)
695
+ target.phase = 'complete'; save()
696
+ })
697
+ }
635
698
  }
636
699
  const verify = () => {
637
700
  progress('verify', '正在保存配置并核验插件状态。')
@@ -643,7 +706,11 @@ export async function runWorker(dir, cli, id, execute = runCli, cliMode = 'node'
643
706
  atomic(manifestPath, manifest)
644
707
  atomic(disabledPath, [...disabled])
645
708
  const installed = Object.hasOwn(manifest.dependencies || {}, job.name)
646
- if (job.action === 'remove' ? installed : !installed) throw fail('操作后依赖状态与预期不符')
709
+ if (job.action !== 'update-all' && (job.action === 'remove' ? installed : !installed)) throw fail('操作后依赖状态与预期不符')
710
+ if (job.action === 'update-all') for (const target of job.targets) {
711
+ const pkg = read(join(dir, 'node_modules', ...target.name.split('/'), 'package.json'))
712
+ if (pkg.version !== target.version || manifest.dependencies?.[target.name] !== target.version) throw fail('批量更新最终版本不一致:' + target.name)
713
+ }
647
714
  if (['install', 'update'].includes(job.action)) {
648
715
  const pkg = read(join(dir, 'node_modules', ...job.name.split('/'), 'package.json'))
649
716
  if (pkg.version !== job.version || !pkg.dsh?.bundle?.patch) throw fail('安装后的包版本或 bundle 校验失败')
@@ -664,7 +731,11 @@ export async function runWorker(dir, cli, id, execute = runCli, cliMode = 'node'
664
731
  job.message = '配置已保存;重启 DSH 后生效。安装脚本未执行。'
665
732
  } catch (error) {
666
733
  job.phase = 'failed'; job.message = String(error.message || error)
667
- if(job.name==='dsh-remote-plugin' && /(?:ERR_PNPM_)?(?:EPERM|EBUSY)/.test(job.log) && /rename/i.test(job.log)) {
734
+ if (job.action === 'update-all') for (const target of job.targets) {
735
+ if (target.phase === 'running') { target.phase = 'failed'; target.message = job.message }
736
+ else if (target.phase === 'queued') { target.phase = 'interrupted'; target.message = '前项失败,未执行;请先核对或恢复本次备份。' }
737
+ }
738
+ if((job.name==='dsh-remote-plugin' || job.targets?.some(target => target.name === 'dsh-remote-plugin' && target.phase === 'failed')) && /(?:ERR_PNPM_)?(?:EPERM|EBUSY)/.test(job.log) && /rename/i.test(job.log)) {
668
739
  job.message = 'Windows 拒绝替换 Remote 插件目录,可能仍有旧网关或 DSH 进程占用。更新未完成,配置和旧包备份已保留;请退出对应 DSH Desktop 及其 Remote 网关后,使用同一 Desktop 安装自带的 CLI 在当前 profile 重装目标版本,再启动 DSH。不要删除插件目录或强行覆盖;不能假定失败后已自动回滚。'
669
740
  }
670
741
  const policyNotice = job.message === String(error.message || error) ? immatureReleaseNotice(job.log) : null
@@ -7,6 +7,20 @@ const pkgName = /^(?:@[a-z0-9][a-z0-9._-]*\/)?[a-z0-9][a-z0-9._-]*$/
7
7
  const semver = /^\d+\.\d+\.\d+(?:-[a-zA-Z0-9.-]+)?(?:\+[a-zA-Z0-9.-]+)?$/
8
8
  export const controlFiles = ['package.json', 'pnpm-lock.yaml', 'pnpm-workspace.yaml', 'cordis.patch.yml', 'cordis.yml', '.npmrc', '.remote-plugin-center/disabled.json']
9
9
  const error = message => Object.assign(new Error(message), { status: 409 })
10
+ // Windows can temporarily refuse replacement while a reader holds the target.
11
+ // The manager polls these ledger files, so a short bounded retry is
12
+ // safe: only the metadata rename is repeated, never an install command or any
13
+ // other result-uncertain write.
14
+ const retryCell = new Int32Array(new SharedArrayBuffer(4))
15
+ export function replaceFile(tmp, file) {
16
+ for (let attempt = 0; ; attempt++) {
17
+ try { return renameSync(tmp, file) }
18
+ catch (failure) {
19
+ if (!['EPERM', 'EACCES', 'EBUSY'].includes(failure.code) || attempt >= 20) throw failure
20
+ Atomics.wait(retryCell, 0, 0, 10)
21
+ }
22
+ }
23
+ }
10
24
  const text = file => existsSync(file) ? readFileSync(file, 'utf8') : null
11
25
  const hash = value => createHash('sha256').update(value).digest('hex')
12
26
  export function profileRevision(dir) { return hash(JSON.stringify(controlFiles.map(name => [name, text(join(dir, name))]))) }
@@ -116,6 +130,7 @@ export async function prepareReleasePlan(dir, operation, publishedTimes, env = p
116
130
  const policy = releasePolicy(workspace, env, text(join(dir, '.npmrc')) || '')
117
131
  const packages = lockPackages(text(join(dir, 'pnpm-lock.yaml')))
118
132
  if (operation.version) packages.push({ name: operation.name, version: operation.version })
133
+ if (operation.action === 'update-all') packages.push(...operation.targets.map(({ name, version }) => ({ name, version })))
119
134
  const pairs = [...new Map(packages.map(row => [row.name + '@' + row.version, row])).values()]
120
135
  const blockers = [], now = Date.now(), names = [...new Set(pairs.map(row => row.name))]
121
136
  let cursor = 0
@@ -147,7 +162,8 @@ export async function prepareReleasePlan(dir, operation, publishedTimes, env = p
147
162
  const merged = mergeReleaseRules(workspace, blockers)
148
163
  if (profileRevision(dir) !== before) throw error('预检期间主机配置已变化,请重新预检。')
149
164
  return { revision: before, minutes: policy.minutes, blockers, ruleChanges: merged.changes, workspace: merged.raw, baselineWarning,
150
- action: operation.action, name: operation.name, version: operation.version || '', expiresAt: Date.now() + 10 * 60000 }
165
+ action: operation.action, name: operation.name, version: operation.version || '',
166
+ ...(operation.action === 'update-all' ? { targets: operation.targets } : {}), expiresAt: Date.now() + 10 * 60000 }
151
167
  }
152
168
  export function canonicalPath(value) {
153
169
  let current = resolve(value)
@@ -216,7 +232,7 @@ export async function backupTransaction(dir, backup) {
216
232
  export function writeWorkspace(dir, raw) {
217
233
  if (raw === null) return
218
234
  const file = join(dir, 'pnpm-workspace.yaml'), tmp = file + '.remote-' + process.pid
219
- writeFileSync(tmp, raw, { mode: 0o600 }); renameSync(tmp, file)
235
+ writeFileSync(tmp, raw, { mode: 0o600 }); replaceFile(tmp, file)
220
236
  }
221
237
  export function verifyInstalled(dir, job) {
222
238
  const manifest = JSON.parse(text(join(dir, 'package.json'))), raw = text(join(dir, 'pnpm-lock.yaml'))
@@ -267,7 +283,7 @@ export async function restoreTransaction(dir, sourceBackup, failed, destination)
267
283
  if (profileRevision(dir) !== failed.revision || treeDigest(current) !== failed.installed) throw error('准备恢复时主机状态发生变化,已停止。')
268
284
  const previousFiles = Object.fromEntries(controlFiles.map(name => [name, text(join(dir, name))]))
269
285
  let moved = false, installed = false
270
- const put = (name, value) => { const file = join(dir, name); if (value === null) { if (existsSync(file)) unlinkSync(file) } else { writeFileSync(file + '.remote-' + process.pid, value, { mode: 0o600 }); renameSync(file + '.remote-' + process.pid, file) } }
286
+ const put = (name, value) => { const file = join(dir, name); if (value === null) { if (existsSync(file)) unlinkSync(file) } else { writeFileSync(file + '.remote-' + process.pid, value, { mode: 0o600 }); replaceFile(file + '.remote-' + process.pid, file) } }
271
287
  try {
272
288
  if (existsSync(current)) { renameSync(current, displaced); moved = true }
273
289
  if (record.installed !== null) { renameSync(staged, current); installed = true }
package/public/admin.html CHANGED
@@ -1,23 +1,24 @@
1
1
  <!doctype html>
2
2
  <html lang="zh-CN">
3
3
  <head>
4
+ <meta name="dsh-remote-build" content="d269ebf822f3b66656a0f760a7c3063abdcc46fd700f90edb9e8e6fdb8efb83e">
4
5
  <meta charset="utf-8">
5
6
  <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
6
7
  <meta name="theme-color" content="#0D1117">
7
8
  <title>DSH Remote · 管理</title>
8
9
  <script>/* 首帧前应用皮肤 */ (function(){try{var t=localStorage.getItem('dshTheme');if(t!=='default'&&t!=='dark'&&t!=='light'&&t!=='neutral'&&t!=='mono'&&t!=='fish'&&t!=='penguin'&&t!=='penguin-night'&&t!=='bocchi'&&t!=='nijika'&&t!=='ryo'&&t!=='kita'){t='fish'}}catch(e){t='fish'}document.documentElement.setAttribute('data-theme',t)})()</script>
9
- <link rel="stylesheet" href="../styles.css">
10
- <link rel="stylesheet" href="../relay-settings.css">
11
- <link rel="stylesheet" href="../insights.css">
12
- <link rel="stylesheet" href="../setup.css">
13
- <link rel="stylesheet" href="../doctor.css">
14
- <link rel="stylesheet" href="../skins/blue-fish/skin.css">
15
- <link rel="stylesheet" href="../skins/penguin/skin.css">
16
- <link rel="stylesheet" href="../skins/bocchi/skin.css">
17
- <link rel="stylesheet" href="../skins/kessoku/skin.css">
18
- <link rel="stylesheet" href="../skins/nijika/skin.css">
19
- <link rel="stylesheet" href="../skins/ryo/skin.css">
20
- <link rel="stylesheet" href="../skins/kita/skin.css">
10
+ <link rel="stylesheet" href="../styles.css?dsr-build=d269ebf822f3b66656a0f760a7c3063abdcc46fd700f90edb9e8e6fdb8efb83e">
11
+ <link rel="stylesheet" href="../relay-settings.css?dsr-build=d269ebf822f3b66656a0f760a7c3063abdcc46fd700f90edb9e8e6fdb8efb83e">
12
+ <link rel="stylesheet" href="../insights.css?dsr-build=d269ebf822f3b66656a0f760a7c3063abdcc46fd700f90edb9e8e6fdb8efb83e">
13
+ <link rel="stylesheet" href="../setup.css?dsr-build=d269ebf822f3b66656a0f760a7c3063abdcc46fd700f90edb9e8e6fdb8efb83e">
14
+ <link rel="stylesheet" href="../doctor.css?dsr-build=d269ebf822f3b66656a0f760a7c3063abdcc46fd700f90edb9e8e6fdb8efb83e">
15
+ <link rel="stylesheet" href="../skins/blue-fish/skin.css?dsr-build=d269ebf822f3b66656a0f760a7c3063abdcc46fd700f90edb9e8e6fdb8efb83e">
16
+ <link rel="stylesheet" href="../skins/penguin/skin.css?dsr-build=d269ebf822f3b66656a0f760a7c3063abdcc46fd700f90edb9e8e6fdb8efb83e">
17
+ <link rel="stylesheet" href="../skins/bocchi/skin.css?dsr-build=d269ebf822f3b66656a0f760a7c3063abdcc46fd700f90edb9e8e6fdb8efb83e">
18
+ <link rel="stylesheet" href="../skins/kessoku/skin.css?dsr-build=d269ebf822f3b66656a0f760a7c3063abdcc46fd700f90edb9e8e6fdb8efb83e">
19
+ <link rel="stylesheet" href="../skins/nijika/skin.css?dsr-build=d269ebf822f3b66656a0f760a7c3063abdcc46fd700f90edb9e8e6fdb8efb83e">
20
+ <link rel="stylesheet" href="../skins/ryo/skin.css?dsr-build=d269ebf822f3b66656a0f760a7c3063abdcc46fd700f90edb9e8e6fdb8efb83e">
21
+ <link rel="stylesheet" href="../skins/kita/skin.css?dsr-build=d269ebf822f3b66656a0f760a7c3063abdcc46fd700f90edb9e8e6fdb8efb83e">
21
22
  <style>
22
23
  .admin-wrap { max-width: 1180px; margin: 0 auto; padding: calc(env(safe-area-inset-top, 0px) + 14px) 14px 40px; }
23
24
  .admin-title {
@@ -347,8 +348,8 @@
347
348
  .admin-title .left { gap: 7px; }
348
349
  }
349
350
  </style>
350
- <link rel="stylesheet" href="../remote-ui.css">
351
- <link rel="stylesheet" href="../theme-picker.css">
351
+ <link rel="stylesheet" href="../remote-ui.css?dsr-build=d269ebf822f3b66656a0f760a7c3063abdcc46fd700f90edb9e8e6fdb8efb83e">
352
+ <link rel="stylesheet" href="../theme-picker.css?dsr-build=d269ebf822f3b66656a0f760a7c3063abdcc46fd700f90edb9e8e6fdb8efb83e">
352
353
  </head>
353
354
  <body>
354
355
  <div class="admin-wrap">
@@ -365,7 +366,7 @@
365
366
  <svg viewBox="0 0 16 16" aria-hidden="true"><path d="M8 0C3.58 0 0 3.58 0 8a8.01 8.01 0 0 0 5.47 7.59c.4.08.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27s1.36.09 2 .27c1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0 0 16 8c0-4.42-3.58-8-8-8Z"/></svg>
366
367
  <span class="gh-label" data-i18n="repo">仓库</span>
367
368
  </a>
368
- <button id="btn-donate" class="mini-btn tb-btn" data-i18n-title="donateTitle" data-i18n-aria="donateTitle"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M6 8h11v6a4 4 0 0 1-4 4H10a4 4 0 0 1-4-4Z"/><path d="M17 10h1.5a2.5 2.5 0 0 1 0 5H17M9 4c0 1 1 1.2 1 2M13 4c0 1 1 1.2 1 2M5 20h13"/></svg></button>
369
+ <button id="btn-support" class="mini-btn tb-btn" data-donate-open data-i18n="donateTitle">赞赏支持</button>
369
370
  <div class="fb-wrap">
370
371
  <button id="btn-feedback" class="mini-btn fb-btn tb-btn" data-i18n-title="feedbackTitle" data-i18n-aria="feedbackTitle" aria-haspopup="menu" aria-expanded="false">
371
372
  <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M21 12a8 8 0 0 1-8 8H5l-1.5 2L4 20a8 8 0 0 1-1-4 8 8 0 0 1 18-4Z"/></svg>
@@ -544,7 +545,6 @@
544
545
  </div>
545
546
 
546
547
  <!-- 赞赏支持模态 -->
547
- <script src="../sponsor-entry.js" defer></script>
548
548
  <div id="modal-donate" class="modal hidden" role="dialog" aria-modal="true">
549
549
  <div class="modal-card">
550
550
  <div class="modal-title" data-i18n="donateTitle">赞赏支持</div>
@@ -801,18 +801,20 @@
801
801
  }
802
802
  }
803
803
  </script>
804
- <script src="../setup.js"></script>
805
- <script src="../qrcode.min.js"></script>
806
- <script src="../i18n.js"></script>
807
- <script src="../theme.js"></script>
808
- <script src="../vendor/gsap/gsap.min.js"></script>
809
- <script src="../motion.js"></script>
810
- <script src="../remote-state.js"></script>
811
- <script src="../remote-ui.js"></script>
812
- <script src="../admin.js"></script>
813
- <script src="../doctor.js"></script>
814
- <script src="../doctor-entry.js"></script>
815
- <script src="../relay-settings.js"></script>
804
+ <script src="../setup.js?dsr-build=d269ebf822f3b66656a0f760a7c3063abdcc46fd700f90edb9e8e6fdb8efb83e"></script>
805
+ <script src="../qrcode.min.js?dsr-build=d269ebf822f3b66656a0f760a7c3063abdcc46fd700f90edb9e8e6fdb8efb83e"></script>
806
+ <script src="../i18n.js?dsr-build=d269ebf822f3b66656a0f760a7c3063abdcc46fd700f90edb9e8e6fdb8efb83e"></script>
807
+ <script src="../theme.js?dsr-build=d269ebf822f3b66656a0f760a7c3063abdcc46fd700f90edb9e8e6fdb8efb83e"></script>
808
+ <script src="../vendor/gsap/gsap.min.js?dsr-build=d269ebf822f3b66656a0f760a7c3063abdcc46fd700f90edb9e8e6fdb8efb83e"></script>
809
+ <script src="../motion.js?dsr-build=d269ebf822f3b66656a0f760a7c3063abdcc46fd700f90edb9e8e6fdb8efb83e"></script>
810
+ <script src="../remote-state.js?dsr-build=d269ebf822f3b66656a0f760a7c3063abdcc46fd700f90edb9e8e6fdb8efb83e"></script>
811
+ <script src="../remote-ui.js?dsr-build=d269ebf822f3b66656a0f760a7c3063abdcc46fd700f90edb9e8e6fdb8efb83e"></script>
812
+ <script src="../admin.js?dsr-build=d269ebf822f3b66656a0f760a7c3063abdcc46fd700f90edb9e8e6fdb8efb83e"></script>
813
+ <script src="../doctor.js?dsr-build=d269ebf822f3b66656a0f760a7c3063abdcc46fd700f90edb9e8e6fdb8efb83e"></script>
814
+ <script src="../doctor-entry.js?dsr-build=d269ebf822f3b66656a0f760a7c3063abdcc46fd700f90edb9e8e6fdb8efb83e"></script>
815
+ <script src="../sponsor-entry.js?dsr-build=d269ebf822f3b66656a0f760a7c3063abdcc46fd700f90edb9e8e6fdb8efb83e"></script>
816
+ <script src="../relay-devices.js?dsr-build=d269ebf822f3b66656a0f760a7c3063abdcc46fd700f90edb9e8e6fdb8efb83e"></script>
817
+ <script src="../relay-settings.js?dsr-build=d269ebf822f3b66656a0f760a7c3063abdcc46fd700f90edb9e8e6fdb8efb83e"></script>
816
818
  <script>window.mountAdminRelaySettings?.()</script>
817
819
  </body>
818
820
  </html>
package/public/admin.js CHANGED
@@ -1095,7 +1095,7 @@ $('btn-lang').addEventListener('click', () => {
1095
1095
 
1096
1096
  $('btn-theme').addEventListener('click', openThemePanel)
1097
1097
  // 赞赏支持
1098
- $('btn-donate').addEventListener('click', openDonateModal)
1098
+ $('btn-support').addEventListener('click', openDonateModal)
1099
1099
  $('donate-close').addEventListener('click', () => $('modal-donate').classList.add('hidden'))
1100
1100
  $('modal-donate').addEventListener('click', (e) => { if (e.target === $('modal-donate')) $('modal-donate').classList.add('hidden') })
1101
1101
  // 反馈
@@ -387,6 +387,37 @@
387
387
  "maxVersion": "",
388
388
  "publishedAt": "2026-10-26T06:28:38.293Z",
389
389
  "expiresAt": "2026-11-02T03:00:00.000Z"
390
+ },
391
+ {
392
+ "id": "2026-11-03-basic-relay-sponsorship-encryption-preview",
393
+ "title": "基础云中转试运营预告|赞助规则与加密接入说明",
394
+ "content": "想在出门后,用手机继续查看自己电脑上的 DSH、发送消息、处理审批和提问,却不方便配置远程网络?\n\nDSH Remote 正在完善基础云中转试运营,让有需要的朋友多一种连接方式,无需自行购买云服务器。\n\n目前,申请服务和云端加密支持已经上线,新版 Android 客户端仍在测试,尚未公开发布。本次先介绍赞助规则与接入准备,面向大家的正式开放通知、客户端和使用教程将另行公布。请等待后续通知,暂勿为此次新版接入提前付款。\n\n【01|计划采用什么规则?】\n\n单次赞助 1 元及以上,人工核验到账后,可获得 一个月基础中转使用资格:\n\n• 每个服务月 5GB 流量,上传与下载合计,对话图片预览计入额度;加密模式下,内层加密握手及传输开销也计入。\n• 绑定一台 Remote 网关,用于连接自己的 DSH 主机。更换电脑或重装丢失绑定时,需联系人工处理。\n• 支持远程对话、审批、提问及对话图片预览,不包含文件浏览、上传、下载和文件导出。\n• 使用期从审核通过时开始计算,具体到期时间会在开通邮件中说明。\n\n更高赞助金额不会增加期限、流量或网关数量,暂不接受多月预付。到期后,如试运营仍开放,可以重新申请。\n\n【02|加密接入进展】\n\n我们已部署端到端加密的云端支持,并使用 Android 测试客户端完成真实公网连接及设备撤销验证。目前仅在指定测试主机上启用,已有连接不会自动全部切换为加密模式。\n\n在使用支持该功能的新版 Android 客户端、完成可信配对并开启端到端加密后,对话、图片和访问凭证通过手机与自己主机之间的加密通道传输,中转服务器负责转发密文。加密连接失败时,不会自动关闭加密或退回旧连接方式。\n\n旧连接方式或主动关闭端到端加密时,中转方在技术上仍可接触传输内容及访问凭证。 加密也不能保护已经被控制的手机或电脑,请从可信来源安装客户端,妥善保管访问令牌与配对文件。\n\n首阶段以 Android 为主。新的配对加密入口暂不支持普通浏览器和鸿蒙客户端,后续适配进展另行说明。真实手机的切网、熄屏等场景仍需继续验收,目前不承诺固定延迟、耗电表现或持续可用性。\n\n【03|正式开放后如何申请与连接?】\n\n1. 按正式通知进入申请页,先获取申请编号,确认有名额后再付款。\n2. 按页面提示赞助,备注申请编号,并提交实际金额、付款成功截图和接收邮箱。\n3. 人工审核通过后,我们会人工发送中转开通密钥和连接说明。\n4. 使用新版 Android 加密接入时,还需在自己的主机本地创建设备配对,并通过可信方式导入对应手机。赞助开通密钥不能替代设备配对。\n\n付款前,申请编号预留名额 30 分钟。请按页面提示及时提交,并私下保存申请查询凭证。设备配对另有有效期,到期需重新配对,不会延长或重置中转使用期与流量额度。\n\n通过其他赞赏入口直接付款,无法自动获得中转资格。已付款但遇到编号过期、申请异常或无法开通时,请保留申请编号与付款截图,联系 2687104205@qq.com 核对,请勿重复付款。\n\n【04|使用前请了解】\n\n初期名额上限为 79 个,实际可申请情况以申请页为准;这个数字是名额上限,不代表同时在线人数或性能承诺。\n\n电脑仍需开机,DSH 和 Remote 网关需保持运行。中转不会代替电脑运行 DSH,连接体验也取决于手机、主机和中转线路。试运营期间会根据使用反馈继续调整,后续是否持续开放尚未确定。\n\n局域网、Tailscale 和自建连接方式仍可继续使用。赞助申请完全自愿,请根据自己的使用场景和隐私需求选择。感谢大家对 DSH Remote 的支持!",
395
+ "summary": "想在出门后,用手机继续查看自己电脑上的 DSH、发送消息、处理审批和提问,却不方便配置远程网络?\n\nDSH Remote 正在完善基础云中转试运营,让有需要的朋友多一种连接方式,无需自行购买云服务器。\n\n目前,申请服务和云端加密支持已经上线,新版 Android 客户端仍在测试,尚未公开发布。本次先介绍赞助规则与接入准备,面向大家的正式开放通知、客户端和使用教程将另行公布。请等待后续通知,暂勿为此次新版接入提前付款。",
396
+ "sections": [
397
+ {
398
+ "title": "计划采用什么规则?",
399
+ "content": "单次赞助 1 元及以上,人工核验到账后,可获得 一个月基础中转使用资格:\n\n• 每个服务月 5GB 流量,上传与下载合计,对话图片预览计入额度;加密模式下,内层加密握手及传输开销也计入。\n• 绑定一台 Remote 网关,用于连接自己的 DSH 主机。更换电脑或重装丢失绑定时,需联系人工处理。\n• 支持远程对话、审批、提问及对话图片预览,不包含文件浏览、上传、下载和文件导出。\n• 使用期从审核通过时开始计算,具体到期时间会在开通邮件中说明。\n\n更高赞助金额不会增加期限、流量或网关数量,暂不接受多月预付。到期后,如试运营仍开放,可以重新申请。",
400
+ "expanded": false
401
+ },
402
+ {
403
+ "title": "加密接入进展",
404
+ "content": "我们已部署端到端加密的云端支持,并使用 Android 测试客户端完成真实公网连接及设备撤销验证。目前仅在指定测试主机上启用,已有连接不会自动全部切换为加密模式。\n\n在使用支持该功能的新版 Android 客户端、完成可信配对并开启端到端加密后,对话、图片和访问凭证通过手机与自己主机之间的加密通道传输,中转服务器负责转发密文。加密连接失败时,不会自动关闭加密或退回旧连接方式。\n\n旧连接方式或主动关闭端到端加密时,中转方在技术上仍可接触传输内容及访问凭证。 加密也不能保护已经被控制的手机或电脑,请从可信来源安装客户端,妥善保管访问令牌与配对文件。\n\n首阶段以 Android 为主。新的配对加密入口暂不支持普通浏览器和鸿蒙客户端,后续适配进展另行说明。真实手机的切网、熄屏等场景仍需继续验收,目前不承诺固定延迟、耗电表现或持续可用性。",
405
+ "expanded": false
406
+ },
407
+ {
408
+ "title": "正式开放后如何申请与连接?",
409
+ "content": "1. 按正式通知进入申请页,先获取申请编号,确认有名额后再付款。\n2. 按页面提示赞助,备注申请编号,并提交实际金额、付款成功截图和接收邮箱。\n3. 人工审核通过后,我们会人工发送中转开通密钥和连接说明。\n4. 使用新版 Android 加密接入时,还需在自己的主机本地创建设备配对,并通过可信方式导入对应手机。赞助开通密钥不能替代设备配对。\n\n付款前,申请编号预留名额 30 分钟。请按页面提示及时提交,并私下保存申请查询凭证。设备配对另有有效期,到期需重新配对,不会延长或重置中转使用期与流量额度。\n\n通过其他赞赏入口直接付款,无法自动获得中转资格。已付款但遇到编号过期、申请异常或无法开通时,请保留申请编号与付款截图,联系 2687104205@qq.com 核对,请勿重复付款。",
410
+ "expanded": false
411
+ },
412
+ {
413
+ "title": "使用前请了解",
414
+ "content": "初期名额上限为 79 个,实际可申请情况以申请页为准;这个数字是名额上限,不代表同时在线人数或性能承诺。\n\n电脑仍需开机,DSH 和 Remote 网关需保持运行。中转不会代替电脑运行 DSH,连接体验也取决于手机、主机和中转线路。试运营期间会根据使用反馈继续调整,后续是否持续开放尚未确定。\n\n局域网、Tailscale 和自建连接方式仍可继续使用。赞助申请完全自愿,请根据自己的使用场景和隐私需求选择。感谢大家对 DSH Remote 的支持!",
415
+ "expanded": false
416
+ }
417
+ ],
418
+ "minVersion": "",
419
+ "maxVersion": "",
420
+ "publishedAt": "2026-11-03T01:40:44.207Z"
390
421
  }
391
422
  ]
392
423
  }