arn-browser 0.1.41 → 0.1.43
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
|
@@ -39,8 +39,8 @@ const osMap = {
|
|
|
39
39
|
const detectedOs = osMap[process.platform] || "windows";
|
|
40
40
|
|
|
41
41
|
// Default minimum browser versions for fingerprint generation
|
|
42
|
-
const DEFAULT_MIN_CHROME_VERSION =
|
|
43
|
-
const DEFAULT_MIN_FIREFOX_VERSION =
|
|
42
|
+
const DEFAULT_MIN_CHROME_VERSION = 146;
|
|
43
|
+
const DEFAULT_MIN_FIREFOX_VERSION = 148;
|
|
44
44
|
|
|
45
45
|
const MULTILOGIN_LAUNCHER_URL = "https://launcher.mlx.yt:45001";
|
|
46
46
|
const MULTILOGIN_FOLDER_ID = "bad9e7e1-cfab-4c8d-bd19-91aa82929711";
|
|
@@ -395,6 +395,7 @@ export async function pwLaunch({
|
|
|
395
395
|
case "multilogin":
|
|
396
396
|
browserInstance = await multiloginLauncher({
|
|
397
397
|
proxy,
|
|
398
|
+
timezoneId,
|
|
398
399
|
multilogin_options,
|
|
399
400
|
humanize_options: effectiveHumanizeOptions,
|
|
400
401
|
// Spoof Fingerprint not needed for Multilogin
|
|
@@ -975,7 +976,7 @@ async function camoufoxLauncher({ profilePath, proxy, timezoneId, camoufox_optio
|
|
|
975
976
|
// ==========================================================================
|
|
976
977
|
// 8. ENGINE: MULTILOGIN
|
|
977
978
|
// ==========================================================================
|
|
978
|
-
async function multiloginLauncher({ proxy, multilogin_options = {}, humanize_options = null }) {
|
|
979
|
+
async function multiloginLauncher({ proxy, timezoneId = null, multilogin_options = {}, humanize_options = null }) {
|
|
979
980
|
// Destructure defaults from multilogin_options
|
|
980
981
|
const {
|
|
981
982
|
profileId = null,
|
|
@@ -987,7 +988,7 @@ async function multiloginLauncher({ proxy, multilogin_options = {}, humanize_opt
|
|
|
987
988
|
} = multilogin_options;
|
|
988
989
|
|
|
989
990
|
if (profileId) {
|
|
990
|
-
return await launchExistingMultiloginProfile(profileId, humanize_options);
|
|
991
|
+
return await launchExistingMultiloginProfile(profileId, humanize_options, timezoneId);
|
|
991
992
|
}
|
|
992
993
|
|
|
993
994
|
// Resolve os_type: array → random pick, null → detect from process.platform
|
|
@@ -1009,6 +1010,7 @@ async function multiloginLauncher({ proxy, multilogin_options = {}, humanize_opt
|
|
|
1009
1010
|
return await launchQuickMultiloginProfile({
|
|
1010
1011
|
os_type: selectedOs,
|
|
1011
1012
|
proxy,
|
|
1013
|
+
timezoneId,
|
|
1012
1014
|
canvas_noise,
|
|
1013
1015
|
media_masking,
|
|
1014
1016
|
audio_masking,
|
|
@@ -1017,7 +1019,7 @@ async function multiloginLauncher({ proxy, multilogin_options = {}, humanize_opt
|
|
|
1017
1019
|
});
|
|
1018
1020
|
}
|
|
1019
1021
|
|
|
1020
|
-
async function launchExistingMultiloginProfile(profileId, humanize_options = null) {
|
|
1022
|
+
async function launchExistingMultiloginProfile(profileId, humanize_options = null, timezoneId = null) {
|
|
1021
1023
|
const startUrl = `${MULTILOGIN_LAUNCHER_URL}/api/v2/profile/f/${MULTILOGIN_FOLDER_ID}/p/${profileId}/start?automation_type=playwright&headless_mode=false`;
|
|
1022
1024
|
let browser, context, page;
|
|
1023
1025
|
|
|
@@ -1057,6 +1059,13 @@ async function launchExistingMultiloginProfile(profileId, humanize_options = nul
|
|
|
1057
1059
|
context = browser.contexts()[0];
|
|
1058
1060
|
page = context.pages()[0];
|
|
1059
1061
|
|
|
1062
|
+
// Apply timezone override via CDP if provided
|
|
1063
|
+
if (timezoneId && page) {
|
|
1064
|
+
const cdpSession = await context.newCDPSession(page);
|
|
1065
|
+
await cdpSession.send('Emulation.setTimezoneOverride', { timezoneId });
|
|
1066
|
+
if (_launchLogs) console.log(`░░░░░ Timezone set to ${timezoneId} for Multilogin profile ${profileId}`);
|
|
1067
|
+
}
|
|
1068
|
+
|
|
1060
1069
|
// Apply human cursor if options provided
|
|
1061
1070
|
if (humanize_options && page) {
|
|
1062
1071
|
page = createCursor(page, humanize_options);
|
|
@@ -1093,7 +1102,7 @@ async function launchExistingMultiloginProfile(profileId, humanize_options = nul
|
|
|
1093
1102
|
}
|
|
1094
1103
|
}
|
|
1095
1104
|
|
|
1096
|
-
async function launchQuickMultiloginProfile({ os_type, proxy, canvas_noise, media_masking, audio_masking, screen_masking, humanize_options = null }) {
|
|
1105
|
+
async function launchQuickMultiloginProfile({ os_type, proxy, timezoneId = null, canvas_noise, media_masking, audio_masking, screen_masking, humanize_options = null }) {
|
|
1097
1106
|
const createUrl = `${MULTILOGIN_LAUNCHER_URL}/api/v3/profile/quick`;
|
|
1098
1107
|
let browser, context, page, profileId;
|
|
1099
1108
|
|
|
@@ -1163,6 +1172,13 @@ async function launchQuickMultiloginProfile({ os_type, proxy, canvas_noise, medi
|
|
|
1163
1172
|
context = browser.contexts()[0];
|
|
1164
1173
|
page = context.pages()[0];
|
|
1165
1174
|
|
|
1175
|
+
// Apply timezone override via CDP if provided
|
|
1176
|
+
if (timezoneId && page) {
|
|
1177
|
+
const cdpSession = await context.newCDPSession(page);
|
|
1178
|
+
await cdpSession.send('Emulation.setTimezoneOverride', { timezoneId });
|
|
1179
|
+
if (_launchLogs) console.log(`░░░░░ Timezone set to ${timezoneId} for Multilogin quick profile`);
|
|
1180
|
+
}
|
|
1181
|
+
|
|
1166
1182
|
// Apply human cursor if options provided
|
|
1167
1183
|
if (humanize_options && page) {
|
|
1168
1184
|
page = createCursor(page, humanize_options);
|
|
@@ -43,7 +43,7 @@ let _cleanupLogs = false;
|
|
|
43
43
|
const detectedOs = process.platform === "win32" ? "windows" : process.platform === "darwin" ? "macos" : "linux";
|
|
44
44
|
|
|
45
45
|
// Default minimum browser version for fingerprint generation
|
|
46
|
-
const DEFAULT_MIN_CHROME_VERSION =
|
|
46
|
+
const DEFAULT_MIN_CHROME_VERSION = 146;
|
|
47
47
|
|
|
48
48
|
/**
|
|
49
49
|
* Maps OS to its device type.
|
|
@@ -354,6 +354,7 @@ export async function ppLaunch({
|
|
|
354
354
|
case "multilogin":
|
|
355
355
|
result = await multiloginLauncher({
|
|
356
356
|
proxy,
|
|
357
|
+
timezoneId,
|
|
357
358
|
multilogin_options,
|
|
358
359
|
});
|
|
359
360
|
break;
|
|
@@ -706,7 +707,7 @@ async function spawnAndConnect({ binaryPath, profilePath, isPersistent, proxy, t
|
|
|
706
707
|
// 7. ENGINE: MULTILOGIN (CDP via Puppeteer)
|
|
707
708
|
// ==========================================================================
|
|
708
709
|
|
|
709
|
-
async function multiloginLauncher({ proxy, multilogin_options = {} }) {
|
|
710
|
+
async function multiloginLauncher({ proxy, timezoneId = null, multilogin_options = {} }) {
|
|
710
711
|
const {
|
|
711
712
|
profileId = null,
|
|
712
713
|
os_type: rawOsType = null,
|
|
@@ -717,7 +718,7 @@ async function multiloginLauncher({ proxy, multilogin_options = {} }) {
|
|
|
717
718
|
} = multilogin_options;
|
|
718
719
|
|
|
719
720
|
if (profileId) {
|
|
720
|
-
return await launchExistingMultiloginProfile(profileId);
|
|
721
|
+
return await launchExistingMultiloginProfile(profileId, timezoneId);
|
|
721
722
|
}
|
|
722
723
|
|
|
723
724
|
// Resolve os_type: array → random pick, null → detect from process.platform
|
|
@@ -740,6 +741,7 @@ async function multiloginLauncher({ proxy, multilogin_options = {} }) {
|
|
|
740
741
|
return await launchQuickMultiloginProfile({
|
|
741
742
|
os_type: selectedOs,
|
|
742
743
|
proxy,
|
|
744
|
+
timezoneId,
|
|
743
745
|
canvas_noise,
|
|
744
746
|
media_masking,
|
|
745
747
|
audio_masking,
|
|
@@ -747,7 +749,7 @@ async function multiloginLauncher({ proxy, multilogin_options = {} }) {
|
|
|
747
749
|
});
|
|
748
750
|
}
|
|
749
751
|
|
|
750
|
-
async function launchExistingMultiloginProfile(profileId) {
|
|
752
|
+
async function launchExistingMultiloginProfile(profileId, timezoneId = null) {
|
|
751
753
|
const startUrl = `${MULTILOGIN_LAUNCHER_URL}/api/v2/profile/f/${MULTILOGIN_FOLDER_ID}/p/${profileId}/start?automation_type=playwright&headless_mode=false`;
|
|
752
754
|
let browser;
|
|
753
755
|
|
|
@@ -791,6 +793,12 @@ async function launchExistingMultiloginProfile(profileId) {
|
|
|
791
793
|
const pages = await browser.pages();
|
|
792
794
|
const page = pages[0] ?? (await browser.newPage());
|
|
793
795
|
|
|
796
|
+
// Apply timezone override via CDP if provided
|
|
797
|
+
if (timezoneId) {
|
|
798
|
+
await page.emulateTimezone(timezoneId);
|
|
799
|
+
if (_launchLogs) console.log(`░░░░░ Timezone set to ${timezoneId} for Multilogin profile ${profileId}`);
|
|
800
|
+
}
|
|
801
|
+
|
|
794
802
|
let closing = false;
|
|
795
803
|
const closeBrowser = async () => {
|
|
796
804
|
if (closing) return false;
|
|
@@ -822,7 +830,7 @@ async function launchExistingMultiloginProfile(profileId) {
|
|
|
822
830
|
}
|
|
823
831
|
}
|
|
824
832
|
|
|
825
|
-
async function launchQuickMultiloginProfile({ os_type, proxy, canvas_noise, media_masking, audio_masking, screen_masking }) {
|
|
833
|
+
async function launchQuickMultiloginProfile({ os_type, proxy, timezoneId = null, canvas_noise, media_masking, audio_masking, screen_masking }) {
|
|
826
834
|
const createUrl = `${MULTILOGIN_LAUNCHER_URL}/api/v3/profile/quick`;
|
|
827
835
|
let browser, profileId;
|
|
828
836
|
|
|
@@ -896,6 +904,12 @@ async function launchQuickMultiloginProfile({ os_type, proxy, canvas_noise, medi
|
|
|
896
904
|
const pages = await browser.pages();
|
|
897
905
|
const page = pages[0] ?? (await browser.newPage());
|
|
898
906
|
|
|
907
|
+
// Apply timezone override via CDP if provided
|
|
908
|
+
if (timezoneId) {
|
|
909
|
+
await page.emulateTimezone(timezoneId);
|
|
910
|
+
if (_launchLogs) console.log(`░░░░░ Timezone set to ${timezoneId} for Multilogin quick profile`);
|
|
911
|
+
}
|
|
912
|
+
|
|
899
913
|
let closing = false;
|
|
900
914
|
const closeBrowser = async () => {
|
|
901
915
|
if (closing) return false;
|