remote-dsh 0.8.0 → 0.9.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.
Files changed (2) hide show
  1. package/dist/bin.js +5 -7
  2. package/package.json +3 -3
package/dist/bin.js CHANGED
@@ -299,7 +299,7 @@ async function handleHostServe(_args, configPath) {
299
299
  if (config.mode === "join") {
300
300
  if (config.hub === undefined)
301
301
  throw new Error("host.json 缺 hub(join 模式);先 `rdsh host join <hub>`");
302
- await join({ hubUrl: config.hub, name: config.name, insecure: config.insecure, dshPath: config.dshPath, dshUiCompat: config.dshUiCompat });
302
+ await join({ hubUrl: config.hub, name: config.name, insecure: config.insecure, dshPath: config.dshPath, dshUiCompat: config.dshUiCompat, gateway: config.gateway });
303
303
  return;
304
304
  }
305
305
  await serve({ configPath: target });
@@ -583,8 +583,7 @@ async function handleHubUser(args, configPath) {
583
583
  case "add": {
584
584
  const name = args[1];
585
585
  if (name === undefined)
586
- throw new Error("usage: rdsh hub user add <name> [--no-password] [--role <user|readonly|operator|admin>]");
587
- const noPassword = args.includes("--no-password");
586
+ throw new Error("usage: rdsh hub user add <name> [--role <user|readonly|operator|admin>]");
588
587
  const roleIdx = args.indexOf("--role");
589
588
  const role = roleIdx >= 0 && args[roleIdx + 1] !== undefined ? args[roleIdx + 1] : "user";
590
589
  if (!["user", "readonly", "operator", "admin"].includes(role))
@@ -592,12 +591,11 @@ async function handleHubUser(args, configPath) {
592
591
  const hubConfigPath = resolveHubConfigPath(configPath);
593
592
  if (db.getUserByName(name) !== null)
594
593
  throw new Error(`user '${name}' already exists`);
595
- const user = noPassword
596
- ? db.createUser(name, "scrypt:disabled", new Date().toISOString(), true)
597
- : db.createUser(name, await hashPassword(await promptPasswordTwice(`password for ${name}: `)));
594
+ // 建号即设初始密码(安全修复 F1:不再提供 --no-password 公开首密码激活路径,防账号抢占)
595
+ const user = db.createUser(name, await hashPassword(await promptPasswordTwice(`password for ${name}: `)));
598
596
  if (role !== "user")
599
597
  db.setRole(user.id, role);
600
- console.log(`rdsh: user '${name}' created (role: ${role}${noPassword ? " — must set password on first sign-in" : ""})`);
598
+ console.log(`rdsh: user '${name}' created (role: ${role})`);
601
599
  return;
602
600
  }
603
601
  case "passwd": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "remote-dsh",
3
- "version": "0.8.0",
3
+ "version": "0.9.0",
4
4
  "description": "Secure remote access for DeepSeek Harness: rdsh serve / rdsh join / rdsh hub",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -23,8 +23,8 @@
23
23
  "node": ">=22"
24
24
  },
25
25
  "dependencies": {
26
- "rdsh-gateway": "0.6.0",
27
- "rdsh-hub": "0.5.0"
26
+ "rdsh-gateway": "0.7.0",
27
+ "rdsh-hub": "0.6.0"
28
28
  },
29
29
  "scripts": {
30
30
  "build": "tsc -p tsconfig.json",