arn-browser 0.1.25 → 0.1.27
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 ---
|
|
@@ -124,6 +124,17 @@ export interface ProxyServerController {
|
|
|
124
124
|
|
|
125
125
|
/** Returns formatted statistics for hostnames per proxy channel */
|
|
126
126
|
getHostStats: () => Record<string, Record<string, TrafficStats>>;
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Dynamically update host routing at runtime.
|
|
130
|
+
* Only provided arrays are rebuilt — omitted ones stay unchanged.
|
|
131
|
+
* Affects all NEW connections; existing connections are untouched.
|
|
132
|
+
*/
|
|
133
|
+
updateHosts: (options?: {
|
|
134
|
+
PROXY_1_HOSTS?: string[];
|
|
135
|
+
PROXY_2_HOSTS?: string[];
|
|
136
|
+
NO_PROXY_HOSTS?: string[];
|
|
137
|
+
}) => void;
|
|
127
138
|
}
|
|
128
139
|
|
|
129
140
|
/**
|
|
@@ -464,5 +464,16 @@ export async function startProxyServer({
|
|
|
464
464
|
|
|
465
465
|
getProxyStats: getProxyStatsFormatted,
|
|
466
466
|
getHostStats: getHostStatsFormatted,
|
|
467
|
+
|
|
468
|
+
/**
|
|
469
|
+
* Dynamically update host routing at runtime.
|
|
470
|
+
* Only provided arrays are rebuilt — omitted ones stay unchanged.
|
|
471
|
+
* Affects all NEW connections; existing connections are untouched.
|
|
472
|
+
*/
|
|
473
|
+
updateHosts: ({ PROXY_1_HOSTS, PROXY_2_HOSTS, NO_PROXY_HOSTS } = {}) => {
|
|
474
|
+
if (PROXY_1_HOSTS) matchers.proxy1 = createHostMatcher([...PROXY_1_HOSTS, "proxy.multilogin.com", "multilogin.com"]);
|
|
475
|
+
if (PROXY_2_HOSTS) matchers.proxy2 = createHostMatcher([...PROXY_2_HOSTS, "proxy.multilogin.com", "multilogin.com"]);
|
|
476
|
+
if (NO_PROXY_HOSTS) matchers.noProxy = createHostMatcher([...NO_PROXY_HOSTS, "%brave.com%", "%gvt1.com%"]);
|
|
477
|
+
},
|
|
467
478
|
};
|
|
468
479
|
}
|