@decentnetwork/lan 0.1.251 → 0.1.253

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.
@@ -9,40 +9,70 @@ const DEFAULT_CONFIG_FILE = resolve(DEFAULT_CONFIG_DIR, "config.yaml");
9
9
  // Mirrored from peer SDK's legacy-bootstraps.mjs
10
10
  // 45.207.220.155 omitted — observed timing out repeatedly during testing,
11
11
  // causing relay#2 to flap which knocks the friend connection offline.
12
- // Ordered with US relays first so a US↔US session (the common case)
13
- // doesn't land on a China relay just because it was first in the list.
14
- // Observed in the wild: both Vultr (US public IP) and a Mac (US
15
- // residential) connected to 47.100.103.201 (Alibaba Cloud Shanghai)
16
- // as their sole TCP relay every packet between them transited
17
- // China, ~600ms RTT, and net_crypto handshakes often dropped because
18
- // the path was lossy. Reordering puts AWS US-East/US-West first so
19
- // the SDK's "connect to top-N relays" path naturally picks closer
20
- // nodes. The China + Singapore nodes stay in the list as fallback for
21
- // peers actually in those regions.
12
+ //
13
+ // ORDER IS LOAD-BEARING, and more than the old comment implied. The SDK's TCP
14
+ // relay pool takes the FIRST 3 entries positionally (TcpRelayPool.start(),
15
+ // DECENT_TCP_MAX_RELAYS default 3) not a random sample, not by health. So
16
+ // every node running the same release dials the SAME three hosts, and those
17
+ // three are effectively the fleet's rendezvous set. Two consequences:
18
+ //
19
+ // 1. A host in the top 3 that doesn't accept TCP burns one of only three
20
+ // relay slots on every node in the world. That is exactly what happened
21
+ // when gojipower was added at position 2 in 0.1.249: air-wli went from 6
22
+ // connected relays to 2 after picking up the new list, because gojipower's
23
+ // ufw has no rule for 33445 (verified 2026-07-25 — `ufw status` shows the
24
+ // port absent while ela-bootstrapd LISTENs locally: alive != serving).
25
+ // 2. A China relay in the top 3 puts a US<->US session on a China path.
26
+ // Observed in the wild: a Vultr US box and a US residential Mac both
27
+ // landed on 47.100.103.201 (Alibaba Shanghai) as their sole relay —
28
+ // ~600ms RTT and lossy enough to drop net_crypto handshakes.
29
+ //
30
+ // So: positions 1-3 are US-reachable hosts whose TCP relay port is CONFIRMED
31
+ // open; everything after is DHT-bootstrap breadth and the reserve pool that
32
+ // the dynamic-relay-add path draws from when a friend advertises one.
33
+ // TCP-relay reachability below was measured from a US vantage point on
34
+ // 2026-07-25. "TCP filtered" does NOT mean dead — several still answer UDP
35
+ // DHT, and CN-side reachability was not re-tested (see docs/BOOTSTRAP-FLEET.md
36
+ // on why a single vantage point must not be used to prune).
22
37
  export const DEFAULT_BOOTSTRAP_NODES = [
38
+ // --- Rendezvous set: the three every node dials. Relay handshake verified
39
+ // with `node scripts/relay-probe.mjs` on 2026-07-25 — not just an open port.
40
+ // US-East — the historical workhorse, and the relay mac-dev has held
41
+ // continuously through every incident this month. AWS legacy infra we don't
42
+ // control, kept here for provider diversity against the two Vultr boxes.
43
+ { host: "13.58.208.50", port: 33445, pk: "89vny8MrKdDKs7Uta9RdVmspPjnRMdwMmaiEW27pZ7gh" },
23
44
  // lens (Vultr US) — OUR OWN ela-bootstrapd, same box as the express relay.
24
45
  // It was in the iOS app's bootstrap list but missing here, which is a big
25
46
  // part of why natives could always bootstrap while JS peers struggled
26
47
  // (2026-07-25 discovery-outage postmortem: docs/BOOTSTRAP-FLEET.md).
27
48
  { host: "144.202.113.167", port: 33445, pk: "EfT4YMq6qfHdDsCiBCgsEmA78E2NxVYVKVUS9bD6w9GH" },
28
- // gojipower (Vultr US) — ours, deployed 2026-07-25, systemd + rcvbuf tuned.
49
+ // gojipower (Vultr US) — ours. Was demoted in 0.1.252 because its ufw had no
50
+ // rule for 33445; firewall opened and relay handshake now verified (192ms),
51
+ // so it takes the third slot over the legacy AWS nodes: we can monitor and
52
+ // fix our own boxes, and 18.216.102.47 / 54.193.141.205 have already gone
53
+ // dark without notice.
29
54
  { host: "149.28.98.141", port: 33445, pk: "81PPfuEyzSovgxymxr2ifiCWXdB5CGaiofx5MrxnhYV7" },
55
+ // --- Reserve pool. Relay handshake verified; reached via the
56
+ // dynamic-relay-add path when a friend advertises them, and used for DHT
57
+ // bootstrap breadth.
58
+ { host: "18.216.6.197", port: 33445, pk: "H8sqhRrQuJZ6iLtP2wanxt4LzdNrN2NNFnpPdq1uJ9n2" }, // US-East
59
+ { host: "52.57.248.163", port: 33445, pk: "CfJLve8FNQPQJ9xYQ8oEVkPxeAPCN7iSdhnYFkWmWgLn" }, // eu-central
60
+ { host: "35.179.41.220", port: 33445, pk: "6u2vKadPa9wqDf531QaZy7FJN3c7Wzntm7dKXxXqvyNB" }, // eu-west
61
+ { host: "52.63.19.190", port: 33445, pk: "EeNenbyS4sx3qtu82esT1V1NMe9dZib5LyQmYGM6fboK" }, // ap-southeast
62
+ // CN — ours. Nearest for peers actually in China; deliberately NOT in the
63
+ // top 3 so US<->US traffic can't land here as its only relay.
64
+ { host: "47.100.103.201", port: 33445, pk: "CX1XH419p4xJ5SV4KvDxBeKYSRdMJW9QpdWJY8owUxHd" }, // sh
30
65
  // gfax (Aliyun CN) — ours, running since 2026-07-02, moved under systemd
31
- // 2026-07-25 (identity preserved). Nearest bootstrap for CN peers.
66
+ // 2026-07-25 (identity preserved).
32
67
  { host: "139.129.193.117", port: 33445, pk: "67UQhssARwMky1YgFA2oDGZ1RiQYQmS6JqWFHxtopKq5" },
33
- // US-East closest for typical North-American peers.
34
- { host: "13.58.208.50", port: 33445, pk: "89vny8MrKdDKs7Uta9RdVmspPjnRMdwMmaiEW27pZ7gh" },
68
+ // --- No relay handshake from the US as of 2026-07-25 (7/16). Kept, NOT
69
+ // pruned: several may still answer UDP DHT, and CN-side reachability was not
70
+ // retested — a single vantage point must not be used to declare a node dead
71
+ // (docs/BOOTSTRAP-FLEET.md). They must simply never occupy a relay slot.
35
72
  { host: "18.216.102.47", port: 33445, pk: "G5z8MqiNDFTadFUPfMdYsYtkUDbX5mNCMVHMZtsCnFeb" },
36
- { host: "18.216.6.197", port: 33445, pk: "H8sqhRrQuJZ6iLtP2wanxt4LzdNrN2NNFnpPdq1uJ9n2" },
37
- // US-West.
38
73
  { host: "54.193.141.205", port: 33445, pk: "7TfZWZNV8vnBxxWzJXuvKgX2QyKkLpg2oXx3LQ5tg8LW" },
39
- // Unknown / global.
40
74
  { host: "154.64.235.176", port: 33445, pk: "GdNtV2N74fZnLjhH7NhQ18nGdxb1k8jRM9dQaK7WnxmL" },
41
- // Asia-Pacific (Singapore + China). Kept as fallback so peers
42
- // actually in CN/SG can use a nearby relay. Peers in the US should
43
- // not be hitting these for normal traffic.
44
75
  { host: "52.74.215.181", port: 33445, pk: "Xv6d34WaUw9bPn7YihzVAFw7D2igbQJZ3jwmzzfYVFV" },
45
- { host: "47.100.103.201", port: 33445, pk: "CX1XH419p4xJ5SV4KvDxBeKYSRdMJW9QpdWJY8owUxHd" },
46
76
  { host: "52.83.171.135", port: 443, pk: "5tuHgK1Q4CYf4K5PutsEPK5E3Z7cbtEBdx7LwmdzqXHL" },
47
77
  { host: "52.83.191.228", port: 33445, pk: "3khtxZo89SBScAMaHhTvD68pPHiKxgZT6hTCSZZVgNEm" },
48
78
  ];
@@ -665,29 +665,49 @@ import yaml from "js-yaml";
665
665
  var DEFAULT_CONFIG_DIR = resolve(homedir2(), ".agentnet");
666
666
  var DEFAULT_CONFIG_FILE = resolve(DEFAULT_CONFIG_DIR, "config.yaml");
667
667
  var DEFAULT_BOOTSTRAP_NODES = [
668
+ // --- Rendezvous set: the three every node dials. Relay handshake verified
669
+ // with `node scripts/relay-probe.mjs` on 2026-07-25 — not just an open port.
670
+ // US-East — the historical workhorse, and the relay mac-dev has held
671
+ // continuously through every incident this month. AWS legacy infra we don't
672
+ // control, kept here for provider diversity against the two Vultr boxes.
673
+ { host: "13.58.208.50", port: 33445, pk: "89vny8MrKdDKs7Uta9RdVmspPjnRMdwMmaiEW27pZ7gh" },
668
674
  // lens (Vultr US) — OUR OWN ela-bootstrapd, same box as the express relay.
669
675
  // It was in the iOS app's bootstrap list but missing here, which is a big
670
676
  // part of why natives could always bootstrap while JS peers struggled
671
677
  // (2026-07-25 discovery-outage postmortem: docs/BOOTSTRAP-FLEET.md).
672
678
  { host: "144.202.113.167", port: 33445, pk: "EfT4YMq6qfHdDsCiBCgsEmA78E2NxVYVKVUS9bD6w9GH" },
673
- // gojipower (Vultr US) — ours, deployed 2026-07-25, systemd + rcvbuf tuned.
679
+ // gojipower (Vultr US) — ours. Was demoted in 0.1.252 because its ufw had no
680
+ // rule for 33445; firewall opened and relay handshake now verified (192ms),
681
+ // so it takes the third slot over the legacy AWS nodes: we can monitor and
682
+ // fix our own boxes, and 18.216.102.47 / 54.193.141.205 have already gone
683
+ // dark without notice.
674
684
  { host: "149.28.98.141", port: 33445, pk: "81PPfuEyzSovgxymxr2ifiCWXdB5CGaiofx5MrxnhYV7" },
685
+ // --- Reserve pool. Relay handshake verified; reached via the
686
+ // dynamic-relay-add path when a friend advertises them, and used for DHT
687
+ // bootstrap breadth.
688
+ { host: "18.216.6.197", port: 33445, pk: "H8sqhRrQuJZ6iLtP2wanxt4LzdNrN2NNFnpPdq1uJ9n2" },
689
+ // US-East
690
+ { host: "52.57.248.163", port: 33445, pk: "CfJLve8FNQPQJ9xYQ8oEVkPxeAPCN7iSdhnYFkWmWgLn" },
691
+ // eu-central
692
+ { host: "35.179.41.220", port: 33445, pk: "6u2vKadPa9wqDf531QaZy7FJN3c7Wzntm7dKXxXqvyNB" },
693
+ // eu-west
694
+ { host: "52.63.19.190", port: 33445, pk: "EeNenbyS4sx3qtu82esT1V1NMe9dZib5LyQmYGM6fboK" },
695
+ // ap-southeast
696
+ // CN — ours. Nearest for peers actually in China; deliberately NOT in the
697
+ // top 3 so US<->US traffic can't land here as its only relay.
698
+ { host: "47.100.103.201", port: 33445, pk: "CX1XH419p4xJ5SV4KvDxBeKYSRdMJW9QpdWJY8owUxHd" },
699
+ // sh
675
700
  // gfax (Aliyun CN) — ours, running since 2026-07-02, moved under systemd
676
- // 2026-07-25 (identity preserved). Nearest bootstrap for CN peers.
701
+ // 2026-07-25 (identity preserved).
677
702
  { host: "139.129.193.117", port: 33445, pk: "67UQhssARwMky1YgFA2oDGZ1RiQYQmS6JqWFHxtopKq5" },
678
- // US-East closest for typical North-American peers.
679
- { host: "13.58.208.50", port: 33445, pk: "89vny8MrKdDKs7Uta9RdVmspPjnRMdwMmaiEW27pZ7gh" },
703
+ // --- No relay handshake from the US as of 2026-07-25 (7/16). Kept, NOT
704
+ // pruned: several may still answer UDP DHT, and CN-side reachability was not
705
+ // retested — a single vantage point must not be used to declare a node dead
706
+ // (docs/BOOTSTRAP-FLEET.md). They must simply never occupy a relay slot.
680
707
  { host: "18.216.102.47", port: 33445, pk: "G5z8MqiNDFTadFUPfMdYsYtkUDbX5mNCMVHMZtsCnFeb" },
681
- { host: "18.216.6.197", port: 33445, pk: "H8sqhRrQuJZ6iLtP2wanxt4LzdNrN2NNFnpPdq1uJ9n2" },
682
- // US-West.
683
708
  { host: "54.193.141.205", port: 33445, pk: "7TfZWZNV8vnBxxWzJXuvKgX2QyKkLpg2oXx3LQ5tg8LW" },
684
- // Unknown / global.
685
709
  { host: "154.64.235.176", port: 33445, pk: "GdNtV2N74fZnLjhH7NhQ18nGdxb1k8jRM9dQaK7WnxmL" },
686
- // Asia-Pacific (Singapore + China). Kept as fallback so peers
687
- // actually in CN/SG can use a nearby relay. Peers in the US should
688
- // not be hitting these for normal traffic.
689
710
  { host: "52.74.215.181", port: 33445, pk: "Xv6d34WaUw9bPn7YihzVAFw7D2igbQJZ3jwmzzfYVFV" },
690
- { host: "47.100.103.201", port: 33445, pk: "CX1XH419p4xJ5SV4KvDxBeKYSRdMJW9QpdWJY8owUxHd" },
691
711
  { host: "52.83.171.135", port: 443, pk: "5tuHgK1Q4CYf4K5PutsEPK5E3Z7cbtEBdx7LwmdzqXHL" },
692
712
  { host: "52.83.191.228", port: 33445, pk: "3khtxZo89SBScAMaHhTvD68pPHiKxgZT6hTCSZZVgNEm" }
693
713
  ];
@@ -1,4 +1,4 @@
1
- window.__DK_UI_VERSION="0.1.251";
1
+ window.__DK_UI_VERSION="0.1.253";
2
2
  const ICON_PATHS = {
3
3
  // ---- tab bar (the four must feel like one set) ----
4
4
  users: '<path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"/><circle cx="9" cy="7" r="4"/><path d="M22 21v-2a4 4 0 0 0-3-3.87"/><path d="M16 3.13a4 4 0 0 1 0 7.75"/>',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@decentnetwork/lan",
3
- "version": "0.1.251",
3
+ "version": "0.1.253",
4
4
  "description": "Private virtual LAN for self-hosted services and AI agents, built on Elastos Carrier. NAT-traversal, name service, ACL, all over a peer-to-peer mesh — no public IP required.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",