@fanboynz/network-scanner 2.0.56 → 2.0.57
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/.github/workflows/npm-publish.yml +3 -4
- package/lib/browserhealth.js +207 -179
- package/lib/ignore_similar.js +78 -209
- package/lib/post-processing.js +282 -356
- package/lib/smart-cache.js +347 -267
- package/nwss.js +7 -1
- package/package.json +3 -2
package/nwss.js
CHANGED
|
@@ -151,7 +151,7 @@ function detectPuppeteerVersion() {
|
|
|
151
151
|
// Enhanced redirect handling
|
|
152
152
|
const { navigateWithRedirectHandling, handleRedirectTimeout } = require('./lib/redirect');
|
|
153
153
|
// Ensure web browser is working correctly
|
|
154
|
-
const { monitorBrowserHealth, isBrowserHealthy, isQuicklyResponsive, performGroupWindowCleanup, performRealtimeWindowCleanup, trackPageForRealtime, updatePageUsage, cleanupPageBeforeReload } = require('./lib/browserhealth');
|
|
154
|
+
const { monitorBrowserHealth, isBrowserHealthy, isQuicklyResponsive, performGroupWindowCleanup, performRealtimeWindowCleanup, trackPageForRealtime, updatePageUsage, cleanupPageBeforeReload, purgeStaleTrackers } = require('./lib/browserhealth');
|
|
155
155
|
|
|
156
156
|
// --- Script Configuration & Constants ---
|
|
157
157
|
const VERSION = '2.0.33'; // Script version
|
|
@@ -1588,6 +1588,7 @@ function setupFrameHandling(page, forceDebug) {
|
|
|
1588
1588
|
wgDisconnectAll(forceDebug);
|
|
1589
1589
|
ovpnDisconnectAll(forceDebug);
|
|
1590
1590
|
cleanupCloudflareCache();
|
|
1591
|
+
purgeStaleTrackers();
|
|
1591
1592
|
}
|
|
1592
1593
|
|
|
1593
1594
|
let siteCounter = 0;
|
|
@@ -4107,6 +4108,7 @@ function setupFrameHandling(page, forceDebug) {
|
|
|
4107
4108
|
|
|
4108
4109
|
// Reset cleanup counter and add delay
|
|
4109
4110
|
urlsSinceLastCleanup = 0;
|
|
4111
|
+
purgeStaleTrackers();
|
|
4110
4112
|
await fastTimeout(TIMEOUTS.BROWSER_STABILIZE_DELAY);
|
|
4111
4113
|
}
|
|
4112
4114
|
|
|
@@ -4159,6 +4161,7 @@ function setupFrameHandling(page, forceDebug) {
|
|
|
4159
4161
|
browser = await createBrowser(proxyArgs);
|
|
4160
4162
|
currentProxyKey = batchProxyKey;
|
|
4161
4163
|
urlsSinceLastCleanup = 0;
|
|
4164
|
+
purgeStaleTrackers();
|
|
4162
4165
|
await fastTimeout(TIMEOUTS.BROWSER_STABILIZE_DELAY);
|
|
4163
4166
|
}
|
|
4164
4167
|
|
|
@@ -4190,6 +4193,7 @@ function setupFrameHandling(page, forceDebug) {
|
|
|
4190
4193
|
const timeoutProxyArgs = currentProxyKey ? getProxyArgs(currentBatch[0].config, forceDebug) : [];
|
|
4191
4194
|
browser = await createBrowser(timeoutProxyArgs);
|
|
4192
4195
|
urlsSinceLastCleanup = 0;
|
|
4196
|
+
purgeStaleTrackers();
|
|
4193
4197
|
} catch (restartErr) {
|
|
4194
4198
|
throw restartErr;
|
|
4195
4199
|
}
|
|
@@ -4308,6 +4312,7 @@ function setupFrameHandling(page, forceDebug) {
|
|
|
4308
4312
|
}
|
|
4309
4313
|
browser = await createBrowser(currentProxyKey ? getProxyArgs(currentBatch[0].config, forceDebug) : []);
|
|
4310
4314
|
urlsSinceLastCleanup = 0; // Reset counter
|
|
4315
|
+
purgeStaleTrackers();
|
|
4311
4316
|
await fastTimeout(TIMEOUTS.EMERGENCY_RESTART_DELAY); // Give browser time to stabilize
|
|
4312
4317
|
} catch (emergencyRestartErr) {
|
|
4313
4318
|
if (forceDebug) console.log(formatLogMessage('debug', `Emergency restart failed: ${emergencyRestartErr.message}`));
|
|
@@ -4320,6 +4325,7 @@ function setupFrameHandling(page, forceDebug) {
|
|
|
4320
4325
|
await handleBrowserExit(browser, { forceDebug, timeout: 5000, exitOnFailure: false, cleanTempFiles: true });
|
|
4321
4326
|
browser = await createBrowser(currentProxyKey ? getProxyArgs(currentBatch[0].config, forceDebug) : []);
|
|
4322
4327
|
urlsSinceLastCleanup = 0;
|
|
4328
|
+
purgeStaleTrackers();
|
|
4323
4329
|
forceRestartFlag = false; // Reset flag
|
|
4324
4330
|
await fastTimeout(TIMEOUTS.EMERGENCY_RESTART_DELAY);
|
|
4325
4331
|
if (forceDebug) console.log(formatLogMessage('debug', `Emergency hang detection restart completed`));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fanboynz/network-scanner",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.57",
|
|
4
4
|
"description": "A Puppeteer-based network scanner for analyzing web traffic, generating adblock filter rules, and identifying third-party requests. Features include fingerprint spoofing, Cloudflare bypass, content analysis with curl/grep, and multiple output formats.",
|
|
5
5
|
"main": "nwss.js",
|
|
6
6
|
"scripts": {
|
|
@@ -17,7 +17,8 @@
|
|
|
17
17
|
},
|
|
18
18
|
"overrides": {
|
|
19
19
|
"tar-fs": "3.1.1",
|
|
20
|
-
"ws": "8.18.3"
|
|
20
|
+
"ws": "8.18.3",
|
|
21
|
+
"yauzl": ">=3.2.1"
|
|
21
22
|
},
|
|
22
23
|
"keywords": [
|
|
23
24
|
"puppeteer",
|