arn-browser 0.1.7 → 0.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/bin/install.js
CHANGED
|
@@ -6,6 +6,14 @@
|
|
|
6
6
|
* Works on Linux, macOS, and Windows.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
+
// ==========================================================================
|
|
10
|
+
// INSTALL TOGGLES — set to false to skip a browser
|
|
11
|
+
// ==========================================================================
|
|
12
|
+
const INSTALL_BRAVE = true;
|
|
13
|
+
const INSTALL_CAMOUFOX = true;
|
|
14
|
+
const INSTALL_CHROMIUM = true;
|
|
15
|
+
const INSTALL_FIREFOX = true;
|
|
16
|
+
|
|
9
17
|
import fs from "fs";
|
|
10
18
|
import path from "path";
|
|
11
19
|
import os from "os";
|
|
@@ -394,10 +402,10 @@ export async function installBrowsers() {
|
|
|
394
402
|
fs.mkdirSync(TEMP_DIR, { recursive: true });
|
|
395
403
|
|
|
396
404
|
try {
|
|
397
|
-
await installBrave(osName, arch);
|
|
398
|
-
await installCamoufox(osName, arch);
|
|
399
|
-
await installChromium(osName, arch);
|
|
400
|
-
await installFirefox(osName, arch);
|
|
405
|
+
if (INSTALL_BRAVE) await installBrave(osName, arch);
|
|
406
|
+
if (INSTALL_CAMOUFOX) await installCamoufox(osName, arch);
|
|
407
|
+
if (INSTALL_CHROMIUM) await installChromium(osName, arch);
|
|
408
|
+
if (INSTALL_FIREFOX) await installFirefox(osName, arch);
|
|
401
409
|
} finally {
|
|
402
410
|
// Cleanup temp directory
|
|
403
411
|
rmDir(TEMP_DIR);
|
package/package.json
CHANGED
|
@@ -217,10 +217,10 @@ export async function startProxyServer({
|
|
|
217
217
|
fetchProxyDetails(upstreamProxies.p2, ip2LocationKey),
|
|
218
218
|
]);
|
|
219
219
|
|
|
220
|
-
//
|
|
221
|
-
if (upstreamProxies.default && !defaultDetails)
|
|
222
|
-
if (upstreamProxies.p1 && !p1Details)
|
|
223
|
-
if (upstreamProxies.p2 && !p2Details)
|
|
220
|
+
// Return null if any configured proxy is unreachable
|
|
221
|
+
if (upstreamProxies.default && !defaultDetails) { console.warn("░░ Warning: DEFAULT_PROXY configured but unreachable."); return null; }
|
|
222
|
+
if (upstreamProxies.p1 && !p1Details) { console.warn("░░ Warning: PROXY_1 configured but unreachable."); return null; }
|
|
223
|
+
if (upstreamProxies.p2 && !p2Details) { console.warn("░░ Warning: PROXY_2 configured but unreachable."); return null; }
|
|
224
224
|
|
|
225
225
|
// 5. Stats
|
|
226
226
|
const stats = {
|