Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"express-session": "^1.18.0",
"jszip": "^3.10.1",
"mime-types": "^3.0.2",
"playwright": "^1.53.1",
"playwright": "1.59.1",
"ws": "^8.17.0"
},
"devDependencies": {
Expand Down
6 changes: 6 additions & 0 deletions scripts/auth/saveAuth.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ const path = require("path");
// Load environment variables from .env file
require("dotenv").config({ path: path.resolve(__dirname, "..", "..", ".env") });

const FIREFOX_DOH_DISABLED_PREFS = {
"network.trr.mode": 5,
"network.trr.uri": "",
};

// Initialize language from environment variable passed by setupAuth.js
const normalizeLanguage = value => {
const normalized = String(value || "")
Expand Down Expand Up @@ -926,6 +931,7 @@ const autoFillRecoveryEmailIfRequired = async (page, recoveryEmail, randomWait)

const browser = await firefox.launch({
executablePath: browserExecutablePath,
firefoxUserPrefs: FIREFOX_DOH_DISABLED_PREFS,
headless: runtimeOptions.headless,
...(proxyConfig ? { proxy: proxyConfig } : {}),
});
Expand Down
6 changes: 6 additions & 0 deletions src/core/BrowserManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ const {
} = require("../utils/CustomErrors");

const WS_INIT_TIMEOUT_MS = 120000;
const FIREFOX_DOH_DISABLED_PREFS = {
"network.trr.mode": 5,
"network.trr.uri": "",
};

/**
* Browser Manager Module
Expand Down Expand Up @@ -107,6 +111,7 @@ class BrowserManager {
"network.dns.disablePrefetch": true, // Disable DNS prefetching
"network.http.speculative-parallel-limit": 0, // Disable speculative connections
"network.prefetch-next": false, // Disable link prefetching
...FIREFOX_DOH_DISABLED_PREFS, // Disable DoH/TRR to respect system DNS/hosts
"permissions.default.geo": 0, // 0 = Always deny geolocation
"services.sync.enabled": false, // Disable Firefox Sync
"toolkit.cosmeticAnimations.enabled": false, // Disable UI animations
Expand Down Expand Up @@ -1343,6 +1348,7 @@ class BrowserManager {
...extraArgs.env,
},
executablePath: this.browserExecutablePath,
firefoxUserPrefs: FIREFOX_DOH_DISABLED_PREFS,
headless: false,
...(proxyConfig ? { proxy: proxyConfig } : {}),
});
Expand Down
Loading