arn-browser 0.1.24 → 0.1.26
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/package.json
CHANGED
|
@@ -776,6 +776,27 @@ async function braveLauncher({ profilePath, proxy, CapSolver, timezoneId, humani
|
|
|
776
776
|
console.warn("░░░░░ Could not modify Brave preferences:", e.message);
|
|
777
777
|
}
|
|
778
778
|
|
|
779
|
+
// ======================================================
|
|
780
|
+
// Disable P3A analytics in Local State (root of profile dir)
|
|
781
|
+
// Brave stores P3A prefs in Local State, NOT Default/Preferences
|
|
782
|
+
// This suppresses "Brave uses completely private product analytics..." banner
|
|
783
|
+
// ======================================================
|
|
784
|
+
try {
|
|
785
|
+
const localStatePath = path.join(activePath, "Local State");
|
|
786
|
+
let localState = {};
|
|
787
|
+
if (fs.existsSync(localStatePath)) {
|
|
788
|
+
localState = JSON.parse(fs.readFileSync(localStatePath, "utf-8"));
|
|
789
|
+
}
|
|
790
|
+
if (!localState.brave) localState.brave = {};
|
|
791
|
+
if (!localState.brave.p3a) localState.brave.p3a = {};
|
|
792
|
+
localState.brave.p3a.enabled = false;
|
|
793
|
+
localState.brave.p3a.notice_acknowledged = true;
|
|
794
|
+
|
|
795
|
+
fs.writeFileSync(localStatePath, JSON.stringify(localState, null, 2), "utf-8");
|
|
796
|
+
} catch (e) {
|
|
797
|
+
console.warn("░░░░░ Could not modify Brave Local State:", e.message);
|
|
798
|
+
}
|
|
799
|
+
|
|
779
800
|
const args = [
|
|
780
801
|
"--test-type",
|
|
781
802
|
// --- Stealth & Anti-Detection ---
|
|
@@ -384,7 +384,7 @@ async function braveLauncher({ profilePath, proxy, extraArgs, spoof_fingerprint,
|
|
|
384
384
|
if (_launchLogs) console.log(`░░░░░ Starting Brave [${isPersistent ? "Persistent" : "Temp"}]: ${activePath}`);
|
|
385
385
|
|
|
386
386
|
// ======================================================
|
|
387
|
-
// Disable Brave Sidebar via Preferences
|
|
387
|
+
// Disable Brave Sidebar & P3A via Preferences + Local State
|
|
388
388
|
// ======================================================
|
|
389
389
|
const prefsFilePath = path.join(activePath, "Default", "Preferences");
|
|
390
390
|
const prefsDir = path.dirname(prefsFilePath);
|
|
@@ -412,6 +412,27 @@ async function braveLauncher({ profilePath, proxy, extraArgs, spoof_fingerprint,
|
|
|
412
412
|
console.warn("░░░░░ Could not modify Brave preferences:", e.message);
|
|
413
413
|
}
|
|
414
414
|
|
|
415
|
+
// ======================================================
|
|
416
|
+
// Disable P3A analytics in Local State (root of profile dir)
|
|
417
|
+
// Brave stores P3A prefs in Local State, NOT Default/Preferences
|
|
418
|
+
// This suppresses "Brave uses completely private product analytics..." banner
|
|
419
|
+
// ======================================================
|
|
420
|
+
try {
|
|
421
|
+
const localStatePath = path.join(activePath, "Local State");
|
|
422
|
+
let localState = {};
|
|
423
|
+
if (fs.existsSync(localStatePath)) {
|
|
424
|
+
localState = JSON.parse(fs.readFileSync(localStatePath, "utf-8"));
|
|
425
|
+
}
|
|
426
|
+
if (!localState.brave) localState.brave = {};
|
|
427
|
+
if (!localState.brave.p3a) localState.brave.p3a = {};
|
|
428
|
+
localState.brave.p3a.enabled = false;
|
|
429
|
+
localState.brave.p3a.notice_acknowledged = true;
|
|
430
|
+
|
|
431
|
+
fs.writeFileSync(localStatePath, JSON.stringify(localState, null, 2), "utf-8");
|
|
432
|
+
} catch (e) {
|
|
433
|
+
console.warn("░░░░░ Could not modify Brave Local State:", e.message);
|
|
434
|
+
}
|
|
435
|
+
|
|
415
436
|
const binaryPath = getBinaryPath("brave");
|
|
416
437
|
const braveArgs = [
|
|
417
438
|
"--disable-features=Translate,BraveRewards,BraveWallet,BraveNews,Sidebar,SidePanel,BraveNTPBrandedWallpaper,NTPBackgroundImages",
|