gologin 1.0.45 → 1.0.46
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/browser-checker.js +1 -1
- package/gologin.js +24 -8
- package/package.json +1 -1
package/browser-checker.js
CHANGED
|
@@ -53,7 +53,7 @@ class BrowserChecker {
|
|
|
53
53
|
executableFilePath = path.join(this.#browserPath, 'orbita-browser', 'chrome.exe');
|
|
54
54
|
}
|
|
55
55
|
this.#executableFilePath = executableFilePath;
|
|
56
|
-
console.log('executableFilePath:', executableFilePath);
|
|
56
|
+
// console.log('executableFilePath:', executableFilePath);
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
async checkBrowser(autoUpdateBrowser = false) {
|
package/gologin.js
CHANGED
|
@@ -47,7 +47,7 @@ class GoLogin {
|
|
|
47
47
|
this.autoUpdateBrowser = !!options.autoUpdateBrowser;
|
|
48
48
|
this.browserChecker = new BrowserChecker(options.skipOrbitaHashChecking);
|
|
49
49
|
this.uploadCookiesToServer = options.uploadCookiesToServer || false;
|
|
50
|
-
this.writeCookesFromServer = options.writeCookesFromServer
|
|
50
|
+
this.writeCookesFromServer = options.writeCookesFromServer;
|
|
51
51
|
this.remote_debugging_port = options.remote_debugging_port || 0;
|
|
52
52
|
this.timezone = options.timezone;
|
|
53
53
|
|
|
@@ -247,9 +247,19 @@ class GoLogin {
|
|
|
247
247
|
if (_.get(preferences, 'navigator.language')) {
|
|
248
248
|
preferences.language = _.get(preferences, 'navigator.language');
|
|
249
249
|
}
|
|
250
|
+
if (_.get(preferences, 'navigator.maxTouchPoints')) {
|
|
251
|
+
preferences.navigator.max_touch_points = _.get(preferences, 'navigator.maxTouchPoints');
|
|
252
|
+
}
|
|
250
253
|
|
|
251
254
|
if (_.get(preferences, 'isM1')) {
|
|
252
|
-
preferences.is_m1 = _.get(preferences, '
|
|
255
|
+
preferences.is_m1 = _.get(preferences, 'isM1');
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
preferences.mediaDevices = {
|
|
259
|
+
enable: preferences.mediaDevices.enableMasking,
|
|
260
|
+
videoInputs: preferences.mediaDevices.videoInputs,
|
|
261
|
+
audioInputs: preferences.mediaDevices.audioInputs,
|
|
262
|
+
audioOutputs: preferences.mediaDevices.audioOutputs,
|
|
253
263
|
}
|
|
254
264
|
|
|
255
265
|
return preferences;
|
|
@@ -462,10 +472,16 @@ class GoLogin {
|
|
|
462
472
|
};
|
|
463
473
|
|
|
464
474
|
debug('profile.webRtc=', profile.webRtc);
|
|
475
|
+
debug('profile.timezone=', profile.timezone);
|
|
476
|
+
debug('profile.mediaDevices=', profile.mediaDevices);
|
|
465
477
|
|
|
466
478
|
const audioContext = profile.audioContext || {};
|
|
467
479
|
const { mode: audioCtxMode = 'off', noise: audioCtxNoise } = audioContext;
|
|
468
|
-
profile.timezone
|
|
480
|
+
if(profile.timezone.fillBasedOnIp==false){
|
|
481
|
+
profile.timezone = { id: profile.timezone.timezone };
|
|
482
|
+
} else {
|
|
483
|
+
profile.timezone = { id: this._tz.timezone };
|
|
484
|
+
}
|
|
469
485
|
profile.webgl_noise_value = profile.webGL.noise;
|
|
470
486
|
profile.get_client_rects_noise = profile.webGL.getClientRectsNoise;
|
|
471
487
|
profile.canvasMode = profile.canvas.mode;
|
|
@@ -488,10 +504,10 @@ class GoLogin {
|
|
|
488
504
|
|
|
489
505
|
const gologin = this.convertPreferences(profile);
|
|
490
506
|
|
|
491
|
-
debug(`Writing profile for screenWidth ${profilePath}`, JSON.stringify(
|
|
507
|
+
debug(`Writing profile for screenWidth ${profilePath}`, JSON.stringify(gologin));
|
|
492
508
|
gologin.screenWidth = this.resolution.width;
|
|
493
509
|
gologin.screenHeight = this.resolution.height;
|
|
494
|
-
|
|
510
|
+
debug("writeCookesFromServer", this.writeCookesFromServer)
|
|
495
511
|
if (this.writeCookesFromServer) {
|
|
496
512
|
await this.writeCookiesToFile();
|
|
497
513
|
}
|
|
@@ -517,7 +533,7 @@ class GoLogin {
|
|
|
517
533
|
|
|
518
534
|
preferences.gologin.langHeader = gologin.language;
|
|
519
535
|
preferences.gologin.languages = languages;
|
|
520
|
-
|
|
536
|
+
// debug("convertedPreferences=", preferences.gologin)
|
|
521
537
|
await writeFile(path.join(profilePath, 'Default', 'Preferences'), JSON.stringify(_.merge(preferences, {
|
|
522
538
|
gologin
|
|
523
539
|
})));
|
|
@@ -713,7 +729,7 @@ class GoLogin {
|
|
|
713
729
|
this.port = remote_debugging_port;
|
|
714
730
|
|
|
715
731
|
const ORBITA_BROWSER = this.executablePath || this.browserChecker.getOrbitaPath;
|
|
716
|
-
|
|
732
|
+
console.log("ORBITA_BROWSER=", ORBITA_BROWSER)
|
|
717
733
|
const env = {};
|
|
718
734
|
Object.keys(process.env).forEach((key) => {
|
|
719
735
|
env[key] = process.env[key];
|
|
@@ -958,7 +974,7 @@ class GoLogin {
|
|
|
958
974
|
if (deviceMemory < 1) {
|
|
959
975
|
deviceMemory = 1;
|
|
960
976
|
}
|
|
961
|
-
navigator.deviceMemory = deviceMemory;
|
|
977
|
+
navigator.deviceMemory = deviceMemory*1024;
|
|
962
978
|
webGLMetadata.mode = webGLMetadata.mode === 'noise' ? 'mask' : 'off';
|
|
963
979
|
|
|
964
980
|
const json = {
|