ghostdock 0.0.12 → 0.0.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/dist/cli.md CHANGED
@@ -515,6 +515,10 @@ ghostdock network disconnect
515
515
  may not use answers 403.
516
516
  - **Needs `wg-quick`** (`brew install wireguard-tools`, `apt install wireguard-tools`). macOS
517
517
  and Linux. On Windows, run the CLI in WSL: then only tools inside WSL reach sandboxes.
518
+ - **Tunnel MTU 1280**, so the tunnel works on networks with a smaller path than 1500 bytes
519
+ (DS-Lite, VPNs, mobile). A config written before 2026-10-20 has 1420: `network status` and
520
+ `network ls` then say *This machine's tunnel has MTU 1420, the network now uses 1280*. Run
521
+ `ghostdock network connect` again; until then TCP works, other large packets can be lost.
518
522
  - **One key per machine**, kept in `~/.config/ghostdock/network/`.
519
523
  Only the public key is sent. The device belongs to the login it was connected with:
520
524
  `ghostdock logout` takes it out of the network, and so does not connecting for 90 days.
package/dist/index.js CHANGED
@@ -8588,7 +8588,7 @@ function getCliName(argv = process.argv) {
8588
8588
  return CLI_NAMES.find((name) => name === invoked) ?? "ghostdock";
8589
8589
  }
8590
8590
  // package.json
8591
- var version = "0.0.12";
8591
+ var version = "0.0.13";
8592
8592
  var package_default = {
8593
8593
  name: "ghostdock",
8594
8594
  description: "Ghostdock CLI — device login and agent tool invocation from the command line",
@@ -9958,6 +9958,16 @@ function isDnsZone(zone) {
9958
9958
  function isIPv6Address(text) {
9959
9959
  return /^[0-9a-f:]{2,39}$/.test(text) && text.includes(":");
9960
9960
  }
9961
+ async function readConfigMtu(path = configPath()) {
9962
+ let contents;
9963
+ try {
9964
+ contents = await readFile3(path, "utf8");
9965
+ } catch {
9966
+ return null;
9967
+ }
9968
+ const match = /^MTU = (\d+)$/m.exec(contents);
9969
+ return match ? Number(match[1]) : null;
9970
+ }
9961
9971
  async function writeConfig(contents, path = configPath()) {
9962
9972
  await mkdir3(dirname3(path), { recursive: true, mode: 448 });
9963
9973
  await writeFile3(path, contents, { mode: 384 });
@@ -10110,25 +10120,38 @@ async function readConnection(deps) {
10110
10120
  const state = await readDeviceState(deps.dir);
10111
10121
  const up = deps.up();
10112
10122
  if (!state)
10113
- return { state, up, device: null, asked: true, provider: null };
10123
+ return { state, up, device: null, asked: true, provider: null, staleMtu: null };
10114
10124
  try {
10115
- const { devices } = await deps.request("/api/v1/network/devices");
10125
+ const { devices, mtu } = await deps.request("/api/v1/network/devices");
10116
10126
  const device = devices.find((d) => d.id === state.deviceId) ?? null;
10127
+ const config = await readConfigMtu(configPath(deps.dir));
10128
+ const staleMtu = config !== null && config !== mtu ? { config, current: mtu } : null;
10129
+ if (staleMtu) {
10130
+ deps.notice(`This machine's tunnel has MTU ${staleMtu.config}, the network now uses ${staleMtu.current}. ` + `Run \`${getCliName()} network connect\` again: until then, large packets other than TCP ` + "can be lost on the way.");
10131
+ }
10117
10132
  return {
10118
10133
  state,
10119
10134
  up,
10120
10135
  device,
10121
10136
  asked: true,
10122
- provider: up ? device?.gatewayProvider ?? null : null
10137
+ provider: up ? device?.gatewayProvider ?? null : null,
10138
+ staleMtu
10123
10139
  };
10124
10140
  } catch (err) {
10125
10141
  deps.notice(`Could not ask the app about this device: ${message(err)}`);
10126
- return { state, up, device: null, asked: false, provider: up ? state.gatewayProvider : null };
10142
+ return {
10143
+ state,
10144
+ up,
10145
+ device: null,
10146
+ asked: false,
10147
+ provider: up ? state.gatewayProvider : null,
10148
+ staleMtu: null
10149
+ };
10127
10150
  }
10128
10151
  }
10129
10152
  async function runNetworkStatus(deps = defaultDeps()) {
10130
- const { state, up, device, asked, provider } = await readConnection(deps);
10131
- printResult({ connected: up, device, provider }, () => {
10153
+ const { state, up, device, asked, provider, staleMtu } = await readConnection(deps);
10154
+ printResult({ connected: up, device, provider, staleMtu }, () => {
10132
10155
  if (!state) {
10133
10156
  return [eventLine("item", `Not set up. Run \`${getCliName()} network connect\`.`)];
10134
10157
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ghostdock",
3
3
  "description": "Ghostdock CLI — device login and agent tool invocation from the command line",
4
- "version": "0.0.12",
4
+ "version": "0.0.13",
5
5
  "type": "module",
6
6
  "bin": {
7
7
  "ghostdock": "dist/index.js",