channel-worker 1.3.6 → 1.3.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/lib/nst-manager.js +22 -6
- package/package.json +1 -1
package/lib/nst-manager.js
CHANGED
|
@@ -80,10 +80,22 @@ class NstManager {
|
|
|
80
80
|
platform: 'Windows',
|
|
81
81
|
kernelMilestone: '132',
|
|
82
82
|
fingerprint: {
|
|
83
|
-
flags: {
|
|
83
|
+
flags: {
|
|
84
|
+
audio: 'Noise',
|
|
85
|
+
canvas: 'Noise',
|
|
86
|
+
fonts: 'Masked',
|
|
87
|
+
gpu: 'Allow',
|
|
88
|
+
webgl: 'Noise',
|
|
89
|
+
localization: 'Custom',
|
|
90
|
+
},
|
|
84
91
|
hardwareConcurrency: 8,
|
|
85
92
|
deviceMemory: 8,
|
|
86
|
-
|
|
93
|
+
localization: {
|
|
94
|
+
basedOnProxy: false,
|
|
95
|
+
languages: ['en-US', 'en'],
|
|
96
|
+
locale: 'en-US',
|
|
97
|
+
timezone: 'America/New_York',
|
|
98
|
+
},
|
|
87
99
|
},
|
|
88
100
|
}),
|
|
89
101
|
});
|
|
@@ -119,18 +131,22 @@ class NstManager {
|
|
|
119
131
|
return { profileId, alreadyRunning: true };
|
|
120
132
|
}
|
|
121
133
|
|
|
122
|
-
// Update profile language to en-US before launch
|
|
134
|
+
// Update profile language to en-US (Custom) before launch
|
|
123
135
|
try {
|
|
124
136
|
for (const method of ['PATCH', 'PUT']) {
|
|
125
137
|
const res = await fetch(`${this.baseUrl}/profiles/${profileId}`, {
|
|
126
138
|
method,
|
|
127
139
|
headers: { 'Content-Type': 'application/json', 'x-api-key': this.apiKey },
|
|
128
|
-
body: JSON.stringify({
|
|
140
|
+
body: JSON.stringify({
|
|
141
|
+
fingerprint: {
|
|
142
|
+
flags: { localization: 'Custom' },
|
|
143
|
+
localization: { basedOnProxy: false, languages: ['en-US', 'en'], locale: 'en-US' },
|
|
144
|
+
},
|
|
145
|
+
}),
|
|
129
146
|
});
|
|
130
|
-
if (res.ok) { console.log(`[nst] Profile language set to en-US (${method})`); break; }
|
|
147
|
+
if (res.ok) { console.log(`[nst] Profile language set to en-US Custom (${method})`); break; }
|
|
131
148
|
}
|
|
132
149
|
} catch {}
|
|
133
|
-
// Also set via connect args as fallback
|
|
134
150
|
|
|
135
151
|
// Set proxy before launch
|
|
136
152
|
if (options.proxy) {
|