@decentnetwork/lan 0.1.31 → 0.1.32
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/bin/tun-helper-darwin-amd64 +0 -0
- package/bin/tun-helper-darwin-arm64 +0 -0
- package/bin/tun-helper-linux-amd64 +0 -0
- package/bin/tun-helper-linux-arm64 +0 -0
- package/dist/carrier/peer-manager.d.ts +9 -0
- package/dist/carrier/peer-manager.js +13 -0
- package/dist/daemon/server.js +1 -0
- package/package.json +2 -2
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -73,6 +73,15 @@ export declare class PeerManager extends EventEmitter {
|
|
|
73
73
|
* Status shape.
|
|
74
74
|
*/
|
|
75
75
|
getSessionStatus(pubkey: string): ReturnType<Peer["sessionStatus"]> | null;
|
|
76
|
+
/**
|
|
77
|
+
* DHT health snapshot — surfaces the underlying-network layers that
|
|
78
|
+
* have to work for UDP holepunch to succeed. Surfaced via
|
|
79
|
+
* `agentnet diag` so an operator can tell at a glance whether the
|
|
80
|
+
* "every session stuck on tcp-relay" pain is due to DHT discovery
|
|
81
|
+
* failing (selfAnnounceStoredOn=0), UDP socket missing
|
|
82
|
+
* (udpLocalPort=null), or just the relay-only path doing its job.
|
|
83
|
+
*/
|
|
84
|
+
getDhtHealth(): ReturnType<Peer["dhtHealth"]> | null;
|
|
76
85
|
/**
|
|
77
86
|
* Check if a specific friend is currently online (direct UDP path established).
|
|
78
87
|
* Returns false for unknown pubkeys.
|
|
@@ -197,6 +197,19 @@ export class PeerManager extends EventEmitter {
|
|
|
197
197
|
return null;
|
|
198
198
|
return this.peer.sessionStatus(pubkey);
|
|
199
199
|
}
|
|
200
|
+
/**
|
|
201
|
+
* DHT health snapshot — surfaces the underlying-network layers that
|
|
202
|
+
* have to work for UDP holepunch to succeed. Surfaced via
|
|
203
|
+
* `agentnet diag` so an operator can tell at a glance whether the
|
|
204
|
+
* "every session stuck on tcp-relay" pain is due to DHT discovery
|
|
205
|
+
* failing (selfAnnounceStoredOn=0), UDP socket missing
|
|
206
|
+
* (udpLocalPort=null), or just the relay-only path doing its job.
|
|
207
|
+
*/
|
|
208
|
+
getDhtHealth() {
|
|
209
|
+
if (!this.peer)
|
|
210
|
+
return null;
|
|
211
|
+
return this.peer.dhtHealth();
|
|
212
|
+
}
|
|
200
213
|
/**
|
|
201
214
|
* Check if a specific friend is currently online (direct UDP path established).
|
|
202
215
|
* Returns false for unknown pubkeys.
|
package/dist/daemon/server.js
CHANGED
|
@@ -244,6 +244,7 @@ export class DaemonServer {
|
|
|
244
244
|
identity: this.peerManager?.getIdentity(),
|
|
245
245
|
tun: this.tunDevice?.getConfig(),
|
|
246
246
|
allocatedIp: this.doraIntegration?.getAllocatedIp() ?? this.config.network.ip,
|
|
247
|
+
dht: this.peerManager?.getDhtHealth() ?? null,
|
|
247
248
|
dns: this.dnsServer
|
|
248
249
|
? { domain: this.dnsServer.getDomain(), port: this.dnsServer.getBoundPort() }
|
|
249
250
|
: null,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@decentnetwork/lan",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.32",
|
|
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",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
},
|
|
75
75
|
"dependencies": {
|
|
76
76
|
"@decentnetwork/dora": "^0.1.0",
|
|
77
|
-
"@decentnetwork/peer": "^0.1.
|
|
77
|
+
"@decentnetwork/peer": "^0.1.6",
|
|
78
78
|
"js-yaml": "^4.1.0",
|
|
79
79
|
"yargs": "^17.7.2"
|
|
80
80
|
},
|