nexus-fca 2.1.7 → 2.1.8
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/CHANGELOG.md +13 -0
- package/lib/safety/FacebookSafety.js +12 -7
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.1.8] - 2025-09-02 - Extended Safe Refresh Window
|
|
4
|
+
### Changed
|
|
5
|
+
- Safe session refresh interval widened to 3–5h (adaptive: 1–1.5h when risk=high) to reduce token churn and mitigate premature cookie expiry heuristics.
|
|
6
|
+
|
|
7
|
+
### Rationale
|
|
8
|
+
- Frequent refreshes can accelerate cookie rotation patterns → earlier invalidation.
|
|
9
|
+
- Longer, randomized window maintains stealth while heartbeats, ghost detection, and adaptive reconnect still ensure liveness.
|
|
10
|
+
|
|
11
|
+
### Notes
|
|
12
|
+
- Lightweight mid‑session fb_dtsg poke (≈6h ±40m) retained; heavy refresh cadence now sparser.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
3
16
|
## [2.1.7] - 2025-09-01 - Session Stability Patch
|
|
4
17
|
### Added
|
|
5
18
|
- User-Agent continuity (anchored single UA for entire session via safety module; eliminates mid-session UA drift increasing 20–22h expiry risk).
|
|
@@ -268,15 +268,20 @@ class FacebookSafety {
|
|
|
268
268
|
clearTimeout(this._safeRefreshTimer);
|
|
269
269
|
this._safeRefreshTimer = null;
|
|
270
270
|
}
|
|
271
|
-
//
|
|
272
|
-
// risk
|
|
271
|
+
// USER REQUEST: widen refresh window to random 3–5 hours (stealth longevity)
|
|
272
|
+
// Previous risk-tier windows (25–60m) replaced per instruction.
|
|
273
273
|
const schedule = () => {
|
|
274
274
|
if (this._destroyed) return;
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
275
|
+
// Base window 3h–5h. If risk escalates HIGH, clamp to 1h–1.5h for safety.
|
|
276
|
+
let minMs, maxMs;
|
|
277
|
+
if (this.sessionMetrics.riskLevel === 'high') {
|
|
278
|
+
minMs = 60 * 60 * 1000; // 1h
|
|
279
|
+
maxMs = 90 * 60 * 1000; // 1.5h
|
|
280
|
+
} else {
|
|
281
|
+
minMs = 3 * 60 * 60 * 1000; // 3h
|
|
282
|
+
maxMs = 5 * 60 * 60 * 1000; // 5h
|
|
283
|
+
}
|
|
284
|
+
const interval = minMs + Math.random() * (maxMs - minMs);
|
|
280
285
|
this._safeRefreshTimer = setTimeout(async () => {
|
|
281
286
|
await this.refreshSafeSession();
|
|
282
287
|
schedule();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nexus-fca",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.8",
|
|
4
4
|
"description": "A modern, safe, and advanced Facebook Chat API for Node.js with fully integrated Nexus Login System. NPM-ready with ID/password/2FA support, ultra-low ban rate protection, and zero external dependencies.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"repository": {
|