gologin 3.0.5 → 3.0.6
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/CHANGELOG.md +7 -0
- package/package.json +1 -1
- package/src/gologin.js +46 -3
- package/Orbita-Browser.app/Contents/MacOS/Orbita +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
Combined changelog for GoLogin node.js SDK
|
|
4
4
|
|
|
5
|
+
## [3.0.6] 2026-10-06
|
|
6
|
+
|
|
7
|
+
### Fixes
|
|
8
|
+
|
|
9
|
+
* Pass user-defined timezone and language to browser start when they are not filled from IP
|
|
10
|
+
* Removed the macOS override that forced the browser language to en-US
|
|
11
|
+
|
|
5
12
|
## [3.0.4] 2026-09-04
|
|
6
13
|
|
|
7
14
|
### Fixes
|
package/package.json
CHANGED
package/src/gologin.js
CHANGED
|
@@ -539,6 +539,7 @@ export class GoLogin {
|
|
|
539
539
|
}
|
|
540
540
|
|
|
541
541
|
this.proxy = proxy;
|
|
542
|
+
this.applyProfileLocale(profile);
|
|
542
543
|
|
|
543
544
|
await Promise.all([
|
|
544
545
|
withTiming({ name: 'resolveProfileBrowserVersion', promise: this.resolveProfileBrowserVersion(profile) }),
|
|
@@ -603,6 +604,13 @@ export class GoLogin {
|
|
|
603
604
|
preferences.gologin = {};
|
|
604
605
|
}
|
|
605
606
|
|
|
607
|
+
if (this.userTimezone && !this.timezone) {
|
|
608
|
+
this._tz = {
|
|
609
|
+
...(this._tz || {}),
|
|
610
|
+
timezone: this.userTimezone,
|
|
611
|
+
};
|
|
612
|
+
}
|
|
613
|
+
|
|
606
614
|
const gologin = this.getGologinPreferences(profile);
|
|
607
615
|
|
|
608
616
|
debug(`Writing profile for screenWidth ${profilePath}`, JSON.stringify(gologin));
|
|
@@ -610,11 +618,14 @@ export class GoLogin {
|
|
|
610
618
|
gologin.screenHeight = this.resolution.height;
|
|
611
619
|
debug('writeCookiesFromServer', this.writeCookiesFromServer);
|
|
612
620
|
|
|
613
|
-
const isMAC = OS_PLATFORM === 'darwin';
|
|
614
621
|
const checkAutoLangResult = checkAutoLang(gologin, this._tz, profile.autoLang);
|
|
615
622
|
const intlConfig = getIntlProfileConfig(profile, this._tz, profile.autoLang);
|
|
616
623
|
|
|
617
|
-
this.
|
|
624
|
+
if (this.userBrowserLang) {
|
|
625
|
+
this.browserLang = this.userBrowserLang;
|
|
626
|
+
} else {
|
|
627
|
+
this.browserLang = checkAutoLangResult;
|
|
628
|
+
}
|
|
618
629
|
const prefsToWrite = Object.assign(preferences, { gologin });
|
|
619
630
|
if (this.customChromeFrame === false) {
|
|
620
631
|
prefsToWrite.browser = {
|
|
@@ -863,6 +874,38 @@ export class GoLogin {
|
|
|
863
874
|
return port;
|
|
864
875
|
}
|
|
865
876
|
|
|
877
|
+
applyProfileLocale(profile) {
|
|
878
|
+
const timezoneConfig = profile.timezone || {};
|
|
879
|
+
const language = profile.navigator?.language || '';
|
|
880
|
+
const hasUserTimezone = timezoneConfig.fillBasedOnIp === false && Boolean(timezoneConfig.timezone);
|
|
881
|
+
const hasUserLanguage = profile.autoLang === false && Boolean(language);
|
|
882
|
+
const geolocation = profile.geolocation || {};
|
|
883
|
+
const geolocationFromIp = geolocation.fillBasedOnIp !== false;
|
|
884
|
+
|
|
885
|
+
if (hasUserTimezone) {
|
|
886
|
+
this.userTimezone = timezoneConfig.timezone;
|
|
887
|
+
}
|
|
888
|
+
|
|
889
|
+
if (hasUserLanguage) {
|
|
890
|
+
const primaryLanguage = language.split(',')[0] || '';
|
|
891
|
+
const browserLang = primaryLanguage.split(';')[0].trim();
|
|
892
|
+
if (browserLang) {
|
|
893
|
+
this.userBrowserLang = browserLang;
|
|
894
|
+
}
|
|
895
|
+
}
|
|
896
|
+
|
|
897
|
+
const canSkipTimezoneCheck = hasUserTimezone && hasUserLanguage && !geolocationFromIp;
|
|
898
|
+
if (!canSkipTimezoneCheck || this.timezone) {
|
|
899
|
+
return;
|
|
900
|
+
}
|
|
901
|
+
|
|
902
|
+
this.timezone = {
|
|
903
|
+
timezone: timezoneConfig.timezone,
|
|
904
|
+
ll: [geolocation.latitude, geolocation.longitude],
|
|
905
|
+
accuracy: geolocation.accuracy,
|
|
906
|
+
};
|
|
907
|
+
}
|
|
908
|
+
|
|
866
909
|
async getTimeZone(proxy) {
|
|
867
910
|
debug('getting timeZone proxy=', proxy);
|
|
868
911
|
|
|
@@ -1124,7 +1167,7 @@ export class GoLogin {
|
|
|
1124
1167
|
params.push(`--host-resolver-rules=${hr_rules}`);
|
|
1125
1168
|
}
|
|
1126
1169
|
|
|
1127
|
-
if (proxy
|
|
1170
|
+
if (proxy) {
|
|
1128
1171
|
params.push(`--proxy-server=${proxy}`);
|
|
1129
1172
|
}
|
|
1130
1173
|
|
|
File without changes
|