@decentnetwork/lan 0.1.181 → 0.1.183
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.
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -240,6 +240,20 @@ export function startMultiExitRouter(opts) {
|
|
|
240
240
|
// route kept failing get auto-promoted into the fallback region (and
|
|
241
241
|
// persisted). Explicit domain lists always win over learned entries.
|
|
242
242
|
const learner = new RouteLearner(opts.learnedRoutesPath, log);
|
|
243
|
+
// Auto-purge on startup: drop any EXISTING learned entry for a global host
|
|
244
|
+
// (google/gstatic/…) that older builds mislearned into an exit. So a user just
|
|
245
|
+
// updating + restarting is self-healed — no manual learned-routes cleanup.
|
|
246
|
+
{
|
|
247
|
+
let purged = 0;
|
|
248
|
+
for (const { host } of learner.entries()) {
|
|
249
|
+
if (NEVER_LEARN.test(host)) {
|
|
250
|
+
learner.unlearn(host);
|
|
251
|
+
purged++;
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
if (purged > 0)
|
|
255
|
+
log(`purged ${purged} stale global-host route(s) mislearned into an exit`);
|
|
256
|
+
}
|
|
243
257
|
const fallbackRegion = opts.fallbackRegion
|
|
244
258
|
?? regions.find((r) => opts.exits.some((e) => (e.region ?? "default") === r.name))?.name
|
|
245
259
|
?? null;
|
|
@@ -452,7 +466,11 @@ export function startMultiExitRouter(opts) {
|
|
|
452
466
|
// Mbps) and stalls/rebuffers. Keep such nodes OUT of rotation while a
|
|
453
467
|
// healthy-speed exit exists; unproven exits (null speed) stay in so they
|
|
454
468
|
// still get measured, and we never empty the pool.
|
|
455
|
-
|
|
469
|
+
// Skip the floor when hls-accel is on: parallel-prefetch AGGREGATION wants
|
|
470
|
+
// every exit contributing bandwidth (even a slow 0.4 Mbps one adds to the
|
|
471
|
+
// sum), so benching slow exits would REDUCE aggregate throughput — the
|
|
472
|
+
// opposite of what a bandwidth-heavy HD stream needs.
|
|
473
|
+
if (!opts.hlsAccel && measuredVals.length >= 2) {
|
|
456
474
|
const best = measuredVals[measuredVals.length - 1];
|
|
457
475
|
const floor = best * SLOW_EXIT_FLOOR_FRACTION;
|
|
458
476
|
const fast = pool.filter((e) => e.speedEwma === null || e.speedEwma >= floor);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@decentnetwork/lan",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.183",
|
|
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",
|