DeepSeek Harness Tauri 桌面版 | Only 8mb installer, zero environment setup, preset plugins, Windows / macOS / Linux.
feat(ssh): 远端默认启动命令加 --skip-auth——iframe 第三方上下文免 cookie 鉴权
Menghuan191877dfa6eb0251
diff --git a/packages/dsh-tauri-ssh/src/host/service/bootstrap.test.ts b/packages/dsh-tauri-ssh/src/host/service/bootstrap.test.tsindex e6d28d66..744b91a6 100644--- a/packages/dsh-tauri-ssh/src/host/service/bootstrap.test.ts+++ b/packages/dsh-tauri-ssh/src/host/service/bootstrap.test.ts@@ -552,6 +552,8 @@ describe('component probe and launch commands', () => {expect(command).toContain(`--port "$4"`)expect(command).toContain('DSH_WEB_PORT=3080')expect(command).toContain('--no-open')+ // 远端实例仅经回环隧道可达:跳过浏览器 cookie 鉴权(iframe 第三方上下文存不下 cookie)+ expect(command).toContain('--skip-auth')expect(command).toContain('REMOTE_NOT_INSTALLED')expect(command).toContain('dsh-remote-web.log')})diff --git a/packages/dsh-tauri-ssh/src/host/service/bootstrap.ts b/packages/dsh-tauri-ssh/src/host/service/bootstrap.tsindex 42329329..fd91d0f3 100644--- a/packages/dsh-tauri-ssh/src/host/service/bootstrap.ts+++ b/packages/dsh-tauri-ssh/src/host/service/bootstrap.ts@@ -534,7 +534,10 @@ export function startCommandFor(profile: MachineProfile, plan?: RemoteInstallPla`mkdir -p "$LOG_DIR"`,`export PATH="$ROOT/runtime/bin:$PATH"`,`export DSH_TELEMETRY_DISABLED=1 NO_COLOR=1 DSH_WEB_PORT=${profile.remotePort}`,- `( sh -c 'echo $$ > "$1/.dsh-remote.pid"; exec "$2" "$3" web --host 127.0.0.1 --port "$4" --no-open' dsh-remote "$LOG_DIR" "$NODE" "$DSH_BIN" ${profile.remotePort} </dev/null >>"$LOG" 2>&1 & )`,+ // --skip-auth:远端实例只经本插件的回环隧道可达(两端 loopback),壳层+ // iframe 是第三方上下文、鉴权 cookie 会被浏览器拦截(实报 401);Host/+ // Origin 信任栏仍在。自定义 startCommand 由用户自负(token 提取兜底生效)。+ `( sh -c 'echo $$ > "$1/.dsh-remote.pid"; exec "$2" "$3" web --host 127.0.0.1 --port "$4" --no-open --skip-auth' dsh-remote "$LOG_DIR" "$NODE" "$DSH_BIN" ${profile.remotePort} </dev/null >>"$LOG" 2>&1 & )`,`echo "远端实例已拉起(日志: $LOG)"`,].join('\n')}