dsh-remote-plugin 0.6.11 → 0.6.13
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 +3 -2
- package/README.md +3 -2
- package/apk/dsh-remote.apk +0 -0
- package/gateway.cjs +760 -82
- package/index.mjs +32 -6
- package/package.json +1 -1
- package/public/admin.html +157 -8
- package/public/admin.js +264 -5
- package/public/announcements.json +35 -0
- package/public/app.js +475 -55
- package/public/desktop/desktop.css +5 -0
- package/public/desktop/desktop.html +4 -2
- package/public/desktop/desktop.js +103 -14
- package/public/index.html +79 -16
- package/public/styles.css +64 -2
- package/public/update.json +13 -13
- package/public/version.json +1 -1
package/index.mjs
CHANGED
|
@@ -151,8 +151,9 @@ function runExit(cmd, args) {
|
|
|
151
151
|
}
|
|
152
152
|
|
|
153
153
|
const GATEWAY_ENV_KEYS = [
|
|
154
|
-
'TOKEN', 'TOKEN_FILE', 'DSH_REMOTE_TOKEN', 'DSH_REMOTE_FS_ROOT', 'DSH_REMOTE_FS_MAX_UPLOAD',
|
|
155
|
-
'DSH_REMOTE_NOTES', 'DSH_REMOTE_WORKBENCH', 'DSH_REMOTE_DSH_SERVICE', '
|
|
154
|
+
'TOKEN', 'TOKEN_FILE', 'DSH_REMOTE_TOKEN', 'DSH_REMOTE_DEVICE_KEYS', 'DSH_REMOTE_FS_ROOT', 'DSH_REMOTE_FS_WORKSPACE_CACHE_MS', 'DSH_REMOTE_FS_MAX_UPLOAD',
|
|
155
|
+
'DSH_REMOTE_NOTES', 'DSH_REMOTE_WORKBENCH', 'DSH_REMOTE_DSH_SERVICE', 'DSH_REMOTE_SYSTEMCTL',
|
|
156
|
+
'DSH_REMOTE_DSH_CONTROL_TIMEOUT_MS', 'DSH_REMOTE_DSH_CONTROL_POLL_MS', 'DSH_REMOTE_FEEDBACK_URL',
|
|
156
157
|
'UPDATE_CHECK_URL', 'UPDATE_INTERVAL_MS', 'UPDATE_PROXY', 'DSH_HEALTH_PATH',
|
|
157
158
|
'GATEWAY_WS_IDLE_MS', 'GATEWAY_WS_PING_MS', 'GATEWAY_WS_PONG_TIMEOUT_MS',
|
|
158
159
|
'GATEWAY_WS_UPGRADE_TIMEOUT_MS', 'GATEWAY_UPSTREAM_TIMEOUT_MS', 'GATEWAY_EVENT_BUFFER_MAX',
|
|
@@ -533,32 +534,57 @@ async function serveStatic(req, res, ctx) {
|
|
|
533
534
|
version,
|
|
534
535
|
token: localToken || '',
|
|
535
536
|
gatewayInstalled,
|
|
537
|
+
platform: process.platform,
|
|
536
538
|
hostname: hostname(),
|
|
537
539
|
lanIPs: lanIPs(),
|
|
538
540
|
startedAt: Date.now() - Math.floor(process.uptime() * 1000),
|
|
539
541
|
uptimeSec: Math.floor(process.uptime()),
|
|
540
542
|
host: dshListen.host,
|
|
541
543
|
port: dshListen.port,
|
|
544
|
+
protocol: { version: 1 },
|
|
545
|
+
capabilities: {
|
|
546
|
+
wsTicket: 0,
|
|
547
|
+
eventPolling: 0,
|
|
548
|
+
workspaceFiles: 0,
|
|
549
|
+
imagePromptTransport: 0,
|
|
550
|
+
dshLifecycle: 0,
|
|
551
|
+
centralAnnouncements: 0,
|
|
552
|
+
feedback: 0,
|
|
553
|
+
deviceKeys: 0,
|
|
554
|
+
},
|
|
555
|
+
deviceKeys: { supported: false, enabled: false, entries: [] },
|
|
542
556
|
upstream: { url: 'DSH 内嵌(同进程, 无需网关)', reachable: true },
|
|
543
557
|
latest: { version, newer: false },
|
|
544
558
|
onlineCount: 0,
|
|
545
559
|
deviceCount: 0,
|
|
546
560
|
totalRequests: 0,
|
|
547
561
|
authFailures: 0,
|
|
562
|
+
events: {
|
|
563
|
+
mux: { connected: false, attempt: 0, lastError: '网关未运行' },
|
|
564
|
+
host: { connected: false, attempt: 0, lastError: '网关未运行' },
|
|
565
|
+
},
|
|
548
566
|
devices: [],
|
|
549
567
|
})
|
|
550
568
|
return
|
|
551
569
|
}
|
|
552
|
-
|
|
570
|
+
const gatewayAdminMutations = new Map([
|
|
571
|
+
[`${MOUNT}/admin/api/note`, '/note'],
|
|
572
|
+
[`${MOUNT}/admin/api/kick`, '/kick'],
|
|
573
|
+
[`${MOUNT}/admin/api/token/rotate`, '/token/rotate'],
|
|
574
|
+
[`${MOUNT}/admin/api/device-keys/mode`, '/device-keys/mode'],
|
|
575
|
+
[`${MOUNT}/admin/api/device-keys/create`, '/device-keys/create'],
|
|
576
|
+
[`${MOUNT}/admin/api/device-keys/note`, '/device-keys/note'],
|
|
577
|
+
[`${MOUNT}/admin/api/device-keys/rotate`, '/device-keys/rotate'],
|
|
578
|
+
[`${MOUNT}/admin/api/device-keys/revoke`, '/device-keys/revoke'],
|
|
579
|
+
])
|
|
580
|
+
if (gatewayAdminMutations.has(pathname)) {
|
|
553
581
|
if (req.method !== 'POST') {
|
|
554
582
|
res.writeHead(405, { allow: 'POST' })
|
|
555
583
|
res.end()
|
|
556
584
|
return
|
|
557
585
|
}
|
|
558
586
|
const body = await readBody(req, 4096)
|
|
559
|
-
const sub =
|
|
560
|
-
: pathname.endsWith('/kick') ? '/kick'
|
|
561
|
-
: '/token/rotate'
|
|
587
|
+
const sub = gatewayAdminMutations.get(pathname)
|
|
562
588
|
const proxied = await proxyGateway(`/admin/api${sub}`, 'POST', body)
|
|
563
589
|
if (proxied !== null) {
|
|
564
590
|
sendJson(res, proxied.status, proxied.json)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-remote-plugin",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.13",
|
|
4
4
|
"description": "DSH Remote 官方 bundle 插件:DSH 左侧原生边栏入口 + 右侧抽屉内嵌管理控制台;内置网关随 DSH 自动启停(systemd 独立单元),抽屉直显令牌与设备监控;网关提供 /fs/* 文件传输端点(列表/断点下载/上传),配合 Android App 远程操控会话/审批/提问/goal 与文件互传(多服务器测速切换、聊天记录离线缓存)。",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./index.mjs",
|
package/public/admin.html
CHANGED
|
@@ -79,6 +79,30 @@
|
|
|
79
79
|
.token-row code { flex: none; width: 100%; background: var(--dsr-bg); border: 1px solid var(--dsr-line); border-radius: 8px; padding: 8px 10px; font-size: 12px; white-space: nowrap; overflow-x: auto; }
|
|
80
80
|
.token-actions { display: flex; gap: 8px; flex-wrap: wrap; }
|
|
81
81
|
.token-actions .mini-btn { flex: 1 1 auto; text-align: center; padding: 6px 8px; font-size: 12.5px; }
|
|
82
|
+
.device-key-card { margin: 0 0 14px; }
|
|
83
|
+
.device-key-toggle { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 13px; border:1px solid var(--dsr-line); border-radius:16px; background:var(--dsr-panel); }
|
|
84
|
+
.device-key-toggle-copy { min-width:0; }
|
|
85
|
+
.device-key-toggle-title { display:flex; align-items:center; gap:8px; font-size:13px; font-weight:750; }
|
|
86
|
+
.device-key-toggle-desc { margin-top:3px; color:var(--dsr-muted); font-size:11px; line-height:1.45; }
|
|
87
|
+
.device-key-toggle-actions { display:flex; align-items:center; gap:8px; flex:none; }
|
|
88
|
+
.device-key-switch { position:relative; width:42px; height:24px; flex:none; }
|
|
89
|
+
.device-key-switch input { position:absolute; opacity:0; pointer-events:none; }
|
|
90
|
+
.device-key-switch span { position:absolute; inset:0; border:1px solid var(--dsr-line); border-radius:999px; background:var(--dsr-bg-2); cursor:pointer; transition:.18s ease; }
|
|
91
|
+
.device-key-switch span::after { content:''; position:absolute; width:18px; height:18px; left:2px; top:2px; border-radius:50%; background:var(--dsr-muted); transition:.18s ease; }
|
|
92
|
+
.device-key-switch input:checked + span { border-color:var(--dsr-accent-line); background:var(--dsr-accent-soft); }
|
|
93
|
+
.device-key-switch input:checked + span::after { transform:translateX(18px); background:var(--dsr-accent-strong); }
|
|
94
|
+
.device-key-switch input:focus-visible + span { outline:2px solid var(--dsr-accent-strong); outline-offset:2px; }
|
|
95
|
+
.device-key-panel { margin-top:10px; border:1px solid var(--dsr-line); border-radius:16px; overflow:hidden; background:var(--dsr-panel); }
|
|
96
|
+
.device-key-grid { display:grid; grid-template-columns:minmax(120px,.8fr) minmax(110px,.65fr) minmax(190px,1.4fr) auto; gap:10px; align-items:center; padding:10px 12px; }
|
|
97
|
+
.device-key-grid + .device-key-grid { border-top:1px solid var(--dsr-line); }
|
|
98
|
+
.device-key-grid.head { color:var(--dsr-muted); background:var(--dsr-bg-2); font-size:11px; font-weight:750; }
|
|
99
|
+
.device-key-grid code { display:block; min-width:0; overflow-x:auto; white-space:nowrap; padding:7px 9px; border:1px solid var(--dsr-line); border-radius:8px; background:var(--dsr-bg); font-size:11px; }
|
|
100
|
+
.device-key-note { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
|
|
101
|
+
.device-key-note button { margin-left:5px; padding:1px 6px; }
|
|
102
|
+
.device-key-actions { display:flex; gap:6px; flex-wrap:wrap; justify-content:flex-end; }
|
|
103
|
+
.device-key-actions .mini-btn { padding:5px 7px; font-size:11px; }
|
|
104
|
+
.device-key-ip { font-family:ui-monospace,SFMono-Regular,Consolas,monospace; font-size:11px; white-space:nowrap; }
|
|
105
|
+
.device-key-empty { padding:16px; color:var(--dsr-muted); font-size:12px; text-align:center; }
|
|
82
106
|
.gateway-port-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 14px; padding: 10px 12px; background: var(--dsr-panel); border: 1px solid var(--dsr-line); border-radius: var(--dsr-radius); }
|
|
83
107
|
.gateway-port-row label { font-size: 12px; color: var(--dsr-muted); flex: none; }
|
|
84
108
|
.gateway-port-row input { width: 92px; background: var(--dsr-bg); color: var(--dsr-text); border: 1px solid var(--dsr-line); border-radius: 8px; padding: 6px 8px; font: inherit; font-size: 13px; outline: none; }
|
|
@@ -228,6 +252,31 @@
|
|
|
228
252
|
.admin-hero-action { min-height:36px; padding:7px 13px; border-color:var(--dsr-accent-strong); background:var(--dsr-accent-strong); color:var(--dsr-on-accent); font-weight:700; }
|
|
229
253
|
.admin-hero.plugin .admin-hero-action { border-color:var(--dsr-accent-strong); background:var(--dsr-accent-strong); }
|
|
230
254
|
.admin-hero.offline .admin-hero-action { border-color:var(--dsr-accent-line); background:var(--dsr-accent-soft); color:var(--dsr-accent-strong); }
|
|
255
|
+
.doctor-card { margin:0 0 16px; border:1px solid var(--dsr-line); border-radius:20px; background:linear-gradient(145deg,var(--dsr-panel),var(--dsr-bg-2)); box-shadow:0 12px 30px var(--dsr-shadow); overflow:hidden; }
|
|
256
|
+
.doctor-head { width:100%; display:flex; align-items:center; gap:12px; padding:14px 16px; border:0; background:transparent; color:var(--dsr-text); text-align:left; cursor:pointer; font:inherit; }
|
|
257
|
+
.doctor-head:focus-visible { outline:2px solid var(--dsr-accent-strong); outline-offset:-3px; }
|
|
258
|
+
.doctor-title { min-width:0; flex:1; }
|
|
259
|
+
.doctor-title strong { display:block; font-size:14px; }
|
|
260
|
+
.doctor-title span { display:block; margin-top:3px; color:var(--dsr-muted); font-size:11px; line-height:1.45; }
|
|
261
|
+
.doctor-progress { flex:none; padding:4px 9px; border:1px solid var(--dsr-accent-line); border-radius:999px; color:var(--dsr-accent-strong); background:var(--dsr-accent-soft); font-size:11px; font-weight:750; }
|
|
262
|
+
.doctor-chevron { flex:none; color:var(--dsr-muted); transition:transform .18s ease; }
|
|
263
|
+
.doctor-card.expanded .doctor-chevron { transform:rotate(180deg); }
|
|
264
|
+
.doctor-body { display:none; padding:0 16px 16px; }
|
|
265
|
+
.doctor-card.expanded .doctor-body { display:block; }
|
|
266
|
+
.doctor-summary { margin:0 0 10px; padding:9px 11px; border-radius:11px; color:var(--dsr-muted); background:var(--dsr-bg); font-size:12px; line-height:1.5; }
|
|
267
|
+
.doctor-summary.ok { color:var(--dsr-success); background:var(--dsr-success-soft); }
|
|
268
|
+
.doctor-steps { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
|
|
269
|
+
.doctor-step { display:grid; grid-template-columns:24px minmax(0,1fr) auto; gap:9px; align-items:start; padding:11px; border:1px solid var(--dsr-line); border-radius:13px; background:var(--dsr-panel-2); }
|
|
270
|
+
.doctor-mark { width:22px; height:22px; display:grid; place-items:center; border-radius:50%; color:var(--dsr-muted); background:var(--dsr-bg); font-size:12px; font-weight:800; }
|
|
271
|
+
.doctor-step.pass .doctor-mark { color:var(--dsr-success); background:var(--dsr-success-soft); }
|
|
272
|
+
.doctor-step.fail .doctor-mark { color:var(--dsr-error); background:var(--dsr-error-soft); }
|
|
273
|
+
.doctor-step.warn .doctor-mark { color:var(--dsr-warning); background:var(--dsr-warning-soft); }
|
|
274
|
+
.doctor-copy { min-width:0; }
|
|
275
|
+
.doctor-copy strong { display:block; font-size:12px; }
|
|
276
|
+
.doctor-copy span { display:block; margin-top:3px; color:var(--dsr-muted); font-size:11px; line-height:1.45; overflow-wrap:anywhere; }
|
|
277
|
+
.doctor-action { align-self:center; padding:5px 8px; font-size:11px; }
|
|
278
|
+
.doctor-foot { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:10px; color:var(--dsr-muted); font-size:11px; }
|
|
279
|
+
.doctor-foot-actions { display:flex; gap:7px; flex-wrap:wrap; }
|
|
231
280
|
#stats { grid-template-columns:repeat(4,minmax(0,1fr)); }
|
|
232
281
|
#stats .stat-card:nth-child(n+5) { background:transparent; box-shadow:none; }
|
|
233
282
|
#stats .stat-card:nth-child(n+5) .v { font-size:20px; }
|
|
@@ -236,6 +285,7 @@
|
|
|
236
285
|
.admin-hero h2 { font-size:23px; }
|
|
237
286
|
.admin-hero-side { align-items:stretch; flex-direction:row; justify-content:space-between; }
|
|
238
287
|
.admin-hero-action { flex:0 0 auto; }
|
|
288
|
+
.doctor-steps { grid-template-columns:1fr; }
|
|
239
289
|
#stats { grid-template-columns:repeat(2,minmax(0,1fr)); }
|
|
240
290
|
#stats .stat-card:nth-child(n+5) { background:linear-gradient(145deg, var(--dsr-panel), var(--dsr-bg-2)); box-shadow:inset 0 1px var(--dsr-divider), 0 10px 26px var(--dsr-shadow); }
|
|
241
291
|
}
|
|
@@ -243,6 +293,13 @@
|
|
|
243
293
|
.token-row { display: flex; flex-direction: column; align-items: stretch; }
|
|
244
294
|
.token-actions { justify-content: stretch; }
|
|
245
295
|
.token-actions .mini-btn { flex: 1 1 auto; }
|
|
296
|
+
.device-key-toggle { align-items:flex-start; }
|
|
297
|
+
.device-key-toggle-actions { align-items:flex-end; flex-direction:column-reverse; }
|
|
298
|
+
.device-key-grid.head { display:none; }
|
|
299
|
+
.device-key-grid { grid-template-columns:1fr; gap:7px; padding:12px; }
|
|
300
|
+
.device-key-grid > *::before { content:attr(data-label); display:block; margin-bottom:3px; color:var(--dsr-muted); font:700 10px/1.3 system-ui,sans-serif; }
|
|
301
|
+
.device-key-actions { justify-content:stretch; }
|
|
302
|
+
.device-key-actions .mini-btn { flex:1 1 calc(50% - 6px); }
|
|
246
303
|
}
|
|
247
304
|
@media (max-width: 900px) {
|
|
248
305
|
.admin-title { display: grid; grid-template-columns: minmax(0, 1fr) auto; row-gap: 10px; }
|
|
@@ -315,14 +372,58 @@
|
|
|
315
372
|
</div>
|
|
316
373
|
</section>
|
|
317
374
|
|
|
318
|
-
<
|
|
319
|
-
<
|
|
320
|
-
|
|
321
|
-
<
|
|
322
|
-
<
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
<
|
|
375
|
+
<section id="doctor-card" class="doctor-card" aria-live="polite">
|
|
376
|
+
<button id="doctor-toggle" class="doctor-head" type="button" aria-expanded="false" aria-controls="doctor-body">
|
|
377
|
+
<span class="doctor-title"><strong data-i18n="doctor.title">首次连接向导 · Doctor</strong><span id="doctor-subtitle">正在检查连接链路</span></span>
|
|
378
|
+
<span id="doctor-progress" class="doctor-progress">0/6</span>
|
|
379
|
+
<span class="doctor-chevron" aria-hidden="true">⌄</span>
|
|
380
|
+
</button>
|
|
381
|
+
<div id="doctor-body" class="doctor-body">
|
|
382
|
+
<div id="doctor-summary" class="doctor-summary">正在读取诊断结果…</div>
|
|
383
|
+
<div id="doctor-steps" class="doctor-steps"></div>
|
|
384
|
+
<div class="doctor-foot">
|
|
385
|
+
<span data-i18n="doctor.security">安全提示:只在可信局域网或 Tailscale 中开放网关端口,不要把令牌公开。</span>
|
|
386
|
+
<span class="doctor-foot-actions">
|
|
387
|
+
<button id="doctor-copy-report" class="mini-btn" type="button" data-i18n="doctor.copyReport">复制诊断</button>
|
|
388
|
+
<button id="doctor-refresh" class="mini-btn" type="button" data-i18n="doctor.refresh">重新检查</button>
|
|
389
|
+
</span>
|
|
390
|
+
</div>
|
|
391
|
+
</div>
|
|
392
|
+
</section>
|
|
393
|
+
|
|
394
|
+
<div class="device-key-card">
|
|
395
|
+
<div id="device-key-toggle" class="device-key-toggle hidden">
|
|
396
|
+
<div class="device-key-toggle-copy">
|
|
397
|
+
<div class="device-key-toggle-title" data-i18n="deviceKeys.title">独立设备密钥</div>
|
|
398
|
+
<div class="device-key-toggle-desc" data-i18n="deviceKeys.desc">开启后每台设备使用独立令牌,可单独轮换或退出;原共享令牌仅用于网关管理。</div>
|
|
399
|
+
</div>
|
|
400
|
+
<div class="device-key-toggle-actions">
|
|
401
|
+
<button id="btn-gateway" class="mini-btn hidden" data-i18n="startGateway">启动网关</button>
|
|
402
|
+
<button id="btn-device-key-add" class="mini-btn hidden" type="button" data-i18n="deviceKeys.add">添加设备</button>
|
|
403
|
+
<label class="device-key-switch" title="独立设备密钥">
|
|
404
|
+
<input id="device-key-enabled" type="checkbox" role="switch" aria-label="独立设备密钥">
|
|
405
|
+
<span aria-hidden="true"></span>
|
|
406
|
+
</label>
|
|
407
|
+
<button id="btn-logout" class="mini-btn" data-i18n="signOut">退出</button>
|
|
408
|
+
</div>
|
|
409
|
+
</div>
|
|
410
|
+
<div id="shared-token-row" class="token-row">
|
|
411
|
+
<code id="token-full">—</code>
|
|
412
|
+
<div class="token-actions">
|
|
413
|
+
<button id="btn-qr" class="mini-btn hidden" data-i18n="qrCode">二维码</button>
|
|
414
|
+
<button id="btn-rotate" class="mini-btn hidden" data-i18n="rotateToken">轮换令牌</button>
|
|
415
|
+
<button id="btn-copy" class="mini-btn" data-i18n="copyToken">复制令牌</button>
|
|
416
|
+
</div>
|
|
417
|
+
</div>
|
|
418
|
+
<div id="device-key-panel" class="device-key-panel hidden">
|
|
419
|
+
<div class="device-key-grid head">
|
|
420
|
+
<span data-i18n="deviceKeys.note">备注内容</span>
|
|
421
|
+
<span data-i18n="deviceKeys.ip">IP</span>
|
|
422
|
+
<span>Token</span>
|
|
423
|
+
<span></span>
|
|
424
|
+
</div>
|
|
425
|
+
<div id="device-key-rows"></div>
|
|
426
|
+
<div id="device-key-empty" class="device-key-empty hidden" data-i18n="deviceKeys.empty">暂无设备密钥</div>
|
|
326
427
|
</div>
|
|
327
428
|
</div>
|
|
328
429
|
|
|
@@ -400,6 +501,17 @@
|
|
|
400
501
|
'admin': '管理',
|
|
401
502
|
'hero.eyebrow': 'GATEWAY CONTROL', 'hero.running': '网关运行正常', 'hero.attention': '网关需要关注', 'hero.plugin': 'DSH 插件已连接', 'hero.offline': '网关未运行', 'hero.checking': '正在检查网关',
|
|
402
503
|
'hero.runningDesc': '{online} 台设备在线 · {requests} 次请求', 'hero.attentionDesc': 'DSH 上游暂时不可达,请打开诊断', 'hero.pluginDesc': '插件已连接 DSH,网关可按需启动', 'hero.offlineDesc': '启动网关后即可接受 App 和桌面端连接', 'hero.openDevices': '查看设备', 'hero.startGateway': '启动网关', 'hero.copyToken': '复制令牌',
|
|
504
|
+
'doctor.title': '首次连接向导 · Doctor', 'doctor.checking': '正在检查连接链路', 'doctor.ready': '连接条件已就绪', 'doctor.needsWork': '还有 {n} 项需要处理',
|
|
505
|
+
'doctor.allGood': '所有关键检查均已通过,手机端可以稳定连接。', 'doctor.partial': '按顺序处理未通过项;页面每 5 秒自动复查。',
|
|
506
|
+
'doctor.security': '安全提示:只在可信局域网或 Tailscale 中开放网关端口,不要把令牌公开。', 'doctor.copyReport': '复制诊断', 'doctor.refresh': '重新检查',
|
|
507
|
+
'doctor.dsh': 'DSH 服务', 'doctor.dshPass': 'DSH 上游可访问', 'doctor.dshFail': 'DSH 上游不可达,请先启动或重启 DSH Web',
|
|
508
|
+
'doctor.gateway': '远程网关', 'doctor.gatewayPass': '网关正在 {host}:{port} 监听', 'doctor.gatewayFail': '网关尚未运行',
|
|
509
|
+
'doctor.network': '局域网地址', 'doctor.networkPass': '手机可填写 {base}', 'doctor.networkFail': '未发现可供手机访问的 IPv4 地址',
|
|
510
|
+
'doctor.firewall': '主机防火墙', 'doctor.firewallPass': '已有非管理设备成功接入,入站链路已验证', 'doctor.firewallWarn': '无法无权限确认规则;只对可信网络放行 TCP {port}',
|
|
511
|
+
'doctor.device': '终端配对', 'doctor.devicePass': '{n} 台 App / WebUI 在线', 'doctor.deviceWait': '扫码配对后,本项会自动变为通过',
|
|
512
|
+
'doctor.realtime': '实时消息通道', 'doctor.realtimePass': 'mux 与 host 通道均已连接', 'doctor.realtimeFail': '实时通道未全部建立;可先使用轮询,检查 DSH 后会自动恢复',
|
|
513
|
+
'doctor.start': '启动', 'doctor.showQr': '显示二维码', 'doctor.copyAddress': '复制地址', 'doctor.copyCommand': '复制命令',
|
|
514
|
+
'doctor.reportCopied': '诊断报告已复制', 'doctor.commandCopied': '防火墙命令已复制,请确认网络范围后手动执行', 'doctor.addressCopied': '服务器地址已复制',
|
|
403
515
|
'theme.default': '默认深空', 'theme.dark': '落日', 'theme.light': '易北爱乐厅', 'theme.neutral': '草原孤塔',
|
|
404
516
|
'theme.panelTitle': '选择配色', 'theme.close': '关闭',
|
|
405
517
|
'repo': '仓库',
|
|
@@ -425,6 +537,19 @@
|
|
|
425
537
|
'rotateToken': '轮换令牌',
|
|
426
538
|
'copyToken': '复制令牌',
|
|
427
539
|
'signOut': '退出',
|
|
540
|
+
'deviceKeys.title': '独立设备密钥', 'deviceKeys.desc': '开启后每台设备使用独立令牌,可单独轮换或退出;原共享令牌仅用于网关管理。',
|
|
541
|
+
'deviceKeys.add': '添加设备', 'deviceKeys.note': '备注内容', 'deviceKeys.ip': 'IP', 'deviceKeys.empty': '暂无设备密钥',
|
|
542
|
+
'deviceKeys.neverUsed': '尚未连接', 'deviceKeys.edit': '修改', 'deviceKeys.revoke': '退出',
|
|
543
|
+
'deviceKeys.enableConfirm': '开启后,当前手机和浏览器使用的共享令牌会失效,需要使用设备二维码重新配对。继续?',
|
|
544
|
+
'deviceKeys.disableConfirm': '关闭后,所有独立设备令牌会停止工作,需要重新使用共享令牌。继续?',
|
|
545
|
+
'deviceKeys.revokeConfirm': '让这个设备退出?该设备令牌会立即失效。',
|
|
546
|
+
'deviceKeys.rotateConfirm': '轮换这个设备的令牌?该设备会立即断开,需要重新扫码。',
|
|
547
|
+
'deviceKeys.notePrompt': '设备备注内容',
|
|
548
|
+
'deviceKeys.enabled': '独立设备密钥已开启,请使用设备二维码重新配对',
|
|
549
|
+
'deviceKeys.disabled': '独立设备密钥已关闭,客户端改用共享令牌',
|
|
550
|
+
'deviceKeys.created': '已创建设备密钥', 'deviceKeys.saved': '设备备注已保存',
|
|
551
|
+
'deviceKeys.rotated': '设备令牌已轮换', 'deviceKeys.revoked': '设备已退出',
|
|
552
|
+
'deviceKeys.failed': '设备密钥操作失败:{msg}',
|
|
428
553
|
'pairTitle': '手机 App 扫码配对',
|
|
429
554
|
'devices': '已连接设备',
|
|
430
555
|
'noDevices': '暂无设备记录',
|
|
@@ -485,6 +610,17 @@
|
|
|
485
610
|
'admin': 'Admin',
|
|
486
611
|
'hero.eyebrow': 'GATEWAY CONTROL', 'hero.running': 'Gateway is healthy', 'hero.attention': 'Gateway needs attention', 'hero.plugin': 'DSH plugin connected', 'hero.offline': 'Gateway is not running', 'hero.checking': 'Checking gateway',
|
|
487
612
|
'hero.runningDesc': '{online} devices online · {requests} requests', 'hero.attentionDesc': 'DSH upstream is unreachable; open diagnostics', 'hero.pluginDesc': 'The plugin is connected to DSH; start the gateway when needed', 'hero.offlineDesc': 'Start the gateway to accept App and desktop connections', 'hero.openDevices': 'View devices', 'hero.startGateway': 'Start gateway', 'hero.copyToken': 'Copy token',
|
|
613
|
+
'doctor.title': 'First connection · Doctor', 'doctor.checking': 'Checking the connection path', 'doctor.ready': 'Ready to connect', 'doctor.needsWork': '{n} checks need attention',
|
|
614
|
+
'doctor.allGood': 'All critical checks passed. Mobile clients can connect.', 'doctor.partial': 'Resolve the checks in order. This page rechecks every 5 seconds.',
|
|
615
|
+
'doctor.security': 'Security: expose the gateway only to a trusted LAN or Tailscale, and never publish the token.', 'doctor.copyReport': 'Copy report', 'doctor.refresh': 'Recheck',
|
|
616
|
+
'doctor.dsh': 'DSH service', 'doctor.dshPass': 'DSH upstream is reachable', 'doctor.dshFail': 'DSH upstream is unreachable. Start or restart DSH Web first.',
|
|
617
|
+
'doctor.gateway': 'Remote gateway', 'doctor.gatewayPass': 'Listening on {host}:{port}', 'doctor.gatewayFail': 'Gateway is not running',
|
|
618
|
+
'doctor.network': 'LAN address', 'doctor.networkPass': 'Use {base} on the phone', 'doctor.networkFail': 'No IPv4 address available to the phone',
|
|
619
|
+
'doctor.firewall': 'Host firewall', 'doctor.firewallPass': 'A non-admin client connected, confirming inbound access', 'doctor.firewallWarn': 'Rules cannot be confirmed without privilege. Allow TCP {port} only on trusted networks.',
|
|
620
|
+
'doctor.device': 'Client pairing', 'doctor.devicePass': '{n} App / WebUI clients online', 'doctor.deviceWait': 'Scan the QR code; this check updates automatically',
|
|
621
|
+
'doctor.realtime': 'Realtime channels', 'doctor.realtimePass': 'Both mux and host channels are connected', 'doctor.realtimeFail': 'Realtime channels are incomplete. Polling remains available and recovery is automatic.',
|
|
622
|
+
'doctor.start': 'Start', 'doctor.showQr': 'Show QR', 'doctor.copyAddress': 'Copy address', 'doctor.copyCommand': 'Copy command',
|
|
623
|
+
'doctor.reportCopied': 'Diagnostic report copied', 'doctor.commandCopied': 'Firewall command copied. Review the network scope before running it.', 'doctor.addressCopied': 'Server address copied',
|
|
488
624
|
'theme.default': 'Default', 'theme.dark': 'Sunset', 'theme.light': 'Elbphilharmonie', 'theme.neutral': 'Prairie Tower',
|
|
489
625
|
'theme.panelTitle': 'Choose theme', 'theme.close': 'Close',
|
|
490
626
|
'repo': 'Repo',
|
|
@@ -510,6 +646,19 @@
|
|
|
510
646
|
'rotateToken': 'Rotate token',
|
|
511
647
|
'copyToken': 'Copy token',
|
|
512
648
|
'signOut': 'Sign out',
|
|
649
|
+
'deviceKeys.title': 'Per-device keys', 'deviceKeys.desc': 'Give every device its own token so it can be rotated or signed out separately. The shared token remains admin-only.',
|
|
650
|
+
'deviceKeys.add': 'Add device', 'deviceKeys.note': 'Note', 'deviceKeys.ip': 'IP', 'deviceKeys.empty': 'No device keys',
|
|
651
|
+
'deviceKeys.neverUsed': 'Not connected yet', 'deviceKeys.edit': 'Edit', 'deviceKeys.revoke': 'Sign out',
|
|
652
|
+
'deviceKeys.enableConfirm': 'Existing phones and browsers using the shared token will disconnect and must pair again with a device QR code. Continue?',
|
|
653
|
+
'deviceKeys.disableConfirm': 'All per-device tokens will stop working and clients must use the shared token again. Continue?',
|
|
654
|
+
'deviceKeys.revokeConfirm': 'Sign out this device? Its token becomes invalid immediately.',
|
|
655
|
+
'deviceKeys.rotateConfirm': 'Rotate this device token? It will disconnect and must scan again.',
|
|
656
|
+
'deviceKeys.notePrompt': 'Device note',
|
|
657
|
+
'deviceKeys.enabled': 'Per-device keys enabled. Pair clients with a device QR code.',
|
|
658
|
+
'deviceKeys.disabled': 'Per-device keys disabled. Clients now use the shared token.',
|
|
659
|
+
'deviceKeys.created': 'Device key created', 'deviceKeys.saved': 'Device note saved',
|
|
660
|
+
'deviceKeys.rotated': 'Device token rotated', 'deviceKeys.revoked': 'Device signed out',
|
|
661
|
+
'deviceKeys.failed': 'Device key operation failed: {msg}',
|
|
513
662
|
'pairTitle': 'Pair with the mobile app',
|
|
514
663
|
'devices': 'Connected devices',
|
|
515
664
|
'noDevices': 'No devices yet',
|