herdr-remote 0.2.0 → 0.2.1

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/LICENSE CHANGED
File without changes
package/README.md CHANGED
File without changes
File without changes
package/dist/tui.mjs CHANGED
@@ -59,6 +59,7 @@ var require_config = __commonJS({
59
59
  }
60
60
  var PACKAGE_ROOT = findPackageRoot(__dirname);
61
61
  var ACCESS_MODES2 = ["local", "lan", "remote"];
62
+ var OFFICIAL_RELAY_URL2 = "wss://herdr-remote.564616.xyz";
62
63
  var LANGUAGES = ["auto", "zh", "en"];
63
64
  var KEEPALIVE_MANAGERS = ["auto", "systemd", "launchd", "supervisor", "none"];
64
65
  var DEFAULTS = {
@@ -325,6 +326,7 @@ var require_config = __commonJS({
325
326
  PACKAGE_ROOT,
326
327
  DEFAULTS,
327
328
  ACCESS_MODES: ACCESS_MODES2,
329
+ OFFICIAL_RELAY_URL: OFFICIAL_RELAY_URL2,
328
330
  LANGUAGES,
329
331
  KEEPALIVE_MANAGERS,
330
332
  configDir,
@@ -391,9 +393,11 @@ var require_en = __commonJS({
391
393
  "nav.about": "Language & about",
392
394
  "mode.local": "This machine only",
393
395
  "mode.lan": "Local network / Tailscale",
396
+ "mode.official": "Official relay (no server needed)",
394
397
  "mode.remote": "Self-hosted relay",
395
398
  "mode.local.description": "The relay listens on 127.0.0.1. Only a browser on this machine can reach it.",
396
399
  "mode.lan.description": "The relay listens on 0.0.0.0 (every interface), so phones on your LAN or tailnet can reach it.",
400
+ "mode.official.description": "Reach this machine from anywhere through the relay run by the Herdr Remote project. Nothing to deploy. Your terminal traffic passes through a server you do not control, and only devices you pair can open it.",
397
401
  "mode.remote.description": "No local relay. The workstation dials a relay you run, which is the only way in from outside your network.",
398
402
  "overview.title": "Status",
399
403
  "overview.mode": "Access mode",
@@ -597,9 +601,11 @@ var require_zh = __commonJS({
597
601
  "nav.about": "\u8BED\u8A00\u4E0E\u5173\u4E8E",
598
602
  "mode.local": "\u4EC5\u672C\u673A",
599
603
  "mode.lan": "\u5C40\u57DF\u7F51 / Tailscale",
604
+ "mode.official": "\u5B98\u65B9 relay\uFF08\u65E0\u9700\u81EA\u5EFA\u670D\u52A1\u5668\uFF09",
600
605
  "mode.remote": "\u81EA\u5EFA relay",
601
606
  "mode.local.description": "relay \u76D1\u542C 127.0.0.1\uFF0C\u53EA\u6709\u672C\u673A\u6D4F\u89C8\u5668\u80FD\u8BBF\u95EE\u3002",
602
607
  "mode.lan.description": "relay \u76D1\u542C 0.0.0.0\uFF08\u6240\u6709\u7F51\u5361\uFF09\uFF0C\u5C40\u57DF\u7F51\u6216 tailnet \u91CC\u7684\u624B\u673A\u90FD\u80FD\u8BBF\u95EE\u3002",
608
+ "mode.official.description": "\u901A\u8FC7 Herdr Remote \u5B98\u65B9 relay \u4ECE\u4EFB\u610F\u7F51\u7EDC\u8BBF\u95EE\u672C\u673A\uFF0C\u65E0\u9700\u90E8\u7F72\u4EFB\u4F55\u670D\u52A1\u5668\u3002\u7EC8\u7AEF\u6D41\u91CF\u4F1A\u7ECF\u8FC7\u4E00\u53F0\u4F60\u65E0\u6CD5\u63A7\u5236\u7684\u670D\u52A1\u5668\uFF0C\u4F46\u53EA\u6709\u4F60\u914D\u5BF9\u8FC7\u7684\u8BBE\u5907\u624D\u80FD\u6253\u5F00\u7EC8\u7AEF\u3002",
603
609
  "mode.remote.description": "\u4E0D\u542F\u52A8\u672C\u5730 relay\u3002\u672C\u673A\u8FDE\u63A5\u4F60\u81EA\u5EFA\u7684 relay\uFF0C\u8FD9\u662F\u4ECE\u5916\u7F51\u8BBF\u95EE\u7684\u552F\u4E00\u65B9\u5F0F\u3002",
604
610
  "overview.title": "\u72B6\u6001",
605
611
  "overview.mode": "\u8BBF\u95EE\u65B9\u5F0F",
@@ -3059,14 +3065,23 @@ function RelayScreen({ ctx }) {
3059
3065
  return /* @__PURE__ */ jsx7(Panel, { title: t("field.mode"), children: /* @__PURE__ */ jsx7(
3060
3066
  ChoiceList,
3061
3067
  {
3062
- options: ["local", "lan", "remote"].map((mode) => ({
3063
- id: mode,
3064
- label: t(`mode.${mode}`),
3065
- description: t(`mode.${mode}.description`)
3066
- })),
3067
- current: draft.relay.mode,
3068
- onPick: (mode) => {
3069
- applyField("mode", mode);
3068
+ options: [
3069
+ ...["local", "lan"].map((mode) => ({
3070
+ id: mode,
3071
+ label: t(`mode.${mode}`),
3072
+ description: t(`mode.${mode}.description`)
3073
+ })),
3074
+ { id: "official", label: t("mode.official"), description: t("mode.official.description") },
3075
+ { id: "remote", label: t("mode.remote"), description: t("mode.remote.description") }
3076
+ ],
3077
+ current: draft.relay.mode === "remote" && draft.relay.remoteUrl === import_config.OFFICIAL_RELAY_URL ? "official" : draft.relay.mode,
3078
+ onPick: (choice) => {
3079
+ if (choice === "official") {
3080
+ if (applyField("mode", "remote")) applyField("remoteUrl", import_config.OFFICIAL_RELAY_URL);
3081
+ ctx.setEditing(null);
3082
+ return;
3083
+ }
3084
+ applyField("mode", choice);
3070
3085
  ctx.setEditing(null);
3071
3086
  },
3072
3087
  onCancel: () => ctx.setEditing(null)
@@ -3489,7 +3504,7 @@ function About({ ctx }) {
3489
3504
  },
3490
3505
  option.id
3491
3506
  )) }),
3492
- /* @__PURE__ */ jsx10(Row, { label: t("about.version"), children: /* @__PURE__ */ jsx10(Text9, { color: theme.muted, children: "0.2.0" }) }),
3507
+ /* @__PURE__ */ jsx10(Row, { label: t("about.version"), children: /* @__PURE__ */ jsx10(Text9, { color: theme.muted, children: "0.2.1" }) }),
3493
3508
  /* @__PURE__ */ jsx10(Row, { label: t("about.configPath"), children: /* @__PURE__ */ jsx10(Text9, { color: theme.muted, children: (0, import_config.configPath)() }) }),
3494
3509
  /* @__PURE__ */ jsx10(Row, { label: t("about.statePath"), children: /* @__PURE__ */ jsx10(Text9, { color: theme.muted, children: (0, import_config.stateDir)() }) }),
3495
3510
  /* @__PURE__ */ jsx10(Box9, { marginTop: 1, children: /* @__PURE__ */ jsx10(Text9, { color: theme.muted, children: t("about.docs") }) }),
@@ -3592,14 +3607,36 @@ function Wizard({ ctx, onDone }) {
3592
3607
  /* @__PURE__ */ jsx11(
3593
3608
  ChoiceList,
3594
3609
  {
3595
- options: ["local", "lan", "remote"].map((mode) => ({
3596
- id: mode,
3597
- label: t(`mode.${mode}`),
3598
- description: t(`mode.${mode}.description`)
3599
- })),
3600
- current: draft.relay.mode,
3601
- onPick: (mode) => {
3602
- if (apply("mode", mode)) advance("access", stepsFor(mode));
3610
+ options: [
3611
+ ...["local", "lan"].map((mode) => ({
3612
+ id: mode,
3613
+ label: t(`mode.${mode}`),
3614
+ description: t(`mode.${mode}.description`)
3615
+ })),
3616
+ // Offered ahead of the self-hosted option because it is the one
3617
+ // that needs no server. It is still a separate, explicit choice:
3618
+ // it routes the terminal through a relay this user does not own.
3619
+ {
3620
+ id: "official",
3621
+ label: t("mode.official"),
3622
+ description: t("mode.official.description")
3623
+ },
3624
+ {
3625
+ id: "remote",
3626
+ label: t("mode.remote"),
3627
+ description: t("mode.remote.description")
3628
+ }
3629
+ ],
3630
+ current: draft.relay.mode === "remote" && draft.relay.remoteUrl === import_config.OFFICIAL_RELAY_URL ? "official" : draft.relay.mode,
3631
+ onPick: (choice) => {
3632
+ if (choice === "official") {
3633
+ if (!apply("mode", "remote")) return;
3634
+ if (!apply("remoteUrl", import_config.OFFICIAL_RELAY_URL)) return;
3635
+ (0, import_service.setRelayPassword)("");
3636
+ advance("access", ["language", "access", "finish"]);
3637
+ return;
3638
+ }
3639
+ if (apply("mode", choice)) advance("access", stepsFor(choice));
3603
3640
  },
3604
3641
  onCancel: back
3605
3642
  }
package/herdr-plugin.toml CHANGED
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "herdr-remote",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Remote browser access to your Herdr terminal workspaces: Herdr plugin, host connector, and bilingual configuration TUI",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -42,7 +42,7 @@
42
42
  "start": "node bin/herdr-remote.js"
43
43
  },
44
44
  "dependencies": {
45
- "herdr-remote-relay": "^0.2.0",
45
+ "herdr-remote-relay": "^0.2.1",
46
46
  "ink": "^7.1.1",
47
47
  "node-pty": "^1.1.0",
48
48
  "qrcode": "^1.5.4",
package/src/config.js CHANGED
@@ -38,6 +38,13 @@ const PACKAGE_ROOT = findPackageRoot(__dirname);
38
38
  // remote — no local relay; the host connector dials an operator-run relay,
39
39
  // which is the only way in from outside the local network.
40
40
  const ACCESS_MODES = ['local', 'lan', 'remote'];
41
+
42
+ // The relay this project runs for people who do not want to host one. Offered
43
+ // as a one-keystroke choice during setup; it is never selected automatically,
44
+ // because routing a terminal through someone else's server has to be a
45
+ // deliberate decision. It is a plain public relay: no join password, and each
46
+ // workstation stays reachable only through its own host token.
47
+ const OFFICIAL_RELAY_URL = 'wss://herdr-remote.564616.xyz';
41
48
  const LANGUAGES = ['auto', 'zh', 'en'];
42
49
  const KEEPALIVE_MANAGERS = ['auto', 'systemd', 'launchd', 'supervisor', 'none'];
43
50
 
@@ -385,6 +392,7 @@ module.exports = {
385
392
  PACKAGE_ROOT,
386
393
  DEFAULTS,
387
394
  ACCESS_MODES,
395
+ OFFICIAL_RELAY_URL,
388
396
  LANGUAGES,
389
397
  KEEPALIVE_MANAGERS,
390
398
  configDir,
package/src/exit-codes.js CHANGED
File without changes
File without changes
File without changes
File without changes
package/src/i18n/en.js CHANGED
@@ -41,9 +41,11 @@ module.exports = {
41
41
 
42
42
  'mode.local': 'This machine only',
43
43
  'mode.lan': 'Local network / Tailscale',
44
+ 'mode.official': 'Official relay (no server needed)',
44
45
  'mode.remote': 'Self-hosted relay',
45
46
  'mode.local.description': 'The relay listens on 127.0.0.1. Only a browser on this machine can reach it.',
46
47
  'mode.lan.description': 'The relay listens on 0.0.0.0 (every interface), so phones on your LAN or tailnet can reach it.',
48
+ 'mode.official.description': 'Reach this machine from anywhere through the relay run by the Herdr Remote project. Nothing to deploy. Your terminal traffic passes through a server you do not control, and only devices you pair can open it.',
47
49
  'mode.remote.description': 'No local relay. The workstation dials a relay you run, which is the only way in from outside your network.',
48
50
 
49
51
  'overview.title': 'Status',
package/src/i18n/index.js CHANGED
File without changes
package/src/i18n/zh.js CHANGED
@@ -40,9 +40,11 @@ module.exports = {
40
40
 
41
41
  'mode.local': '仅本机',
42
42
  'mode.lan': '局域网 / Tailscale',
43
+ 'mode.official': '官方 relay(无需自建服务器)',
43
44
  'mode.remote': '自建 relay',
44
45
  'mode.local.description': 'relay 监听 127.0.0.1,只有本机浏览器能访问。',
45
46
  'mode.lan.description': 'relay 监听 0.0.0.0(所有网卡),局域网或 tailnet 里的手机都能访问。',
47
+ 'mode.official.description': '通过 Herdr Remote 官方 relay 从任意网络访问本机,无需部署任何服务器。终端流量会经过一台你无法控制的服务器,但只有你配对过的设备才能打开终端。',
46
48
  'mode.remote.description': '不启动本地 relay。本机连接你自建的 relay,这是从外网访问的唯一方式。',
47
49
 
48
50
  'overview.title': '状态',
package/src/keepalive.js CHANGED
File without changes
package/src/lifecycle.js CHANGED
File without changes
File without changes
File without changes
package/src/service.js CHANGED
File without changes
File without changes
File without changes
package/src/state.js CHANGED
File without changes
package/src/supervisor.js CHANGED
File without changes
File without changes