channel-worker 1.3.5 → 1.3.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/lib/nst-manager.js +12 -1
- package/package.json +1 -1
package/lib/nst-manager.js
CHANGED
|
@@ -119,7 +119,18 @@ class NstManager {
|
|
|
119
119
|
return { profileId, alreadyRunning: true };
|
|
120
120
|
}
|
|
121
121
|
|
|
122
|
-
//
|
|
122
|
+
// Update profile language to en-US before launch
|
|
123
|
+
try {
|
|
124
|
+
for (const method of ['PATCH', 'PUT']) {
|
|
125
|
+
const res = await fetch(`${this.baseUrl}/profiles/${profileId}`, {
|
|
126
|
+
method,
|
|
127
|
+
headers: { 'Content-Type': 'application/json', 'x-api-key': this.apiKey },
|
|
128
|
+
body: JSON.stringify({ fingerprint: { language: 'en-US' } }),
|
|
129
|
+
});
|
|
130
|
+
if (res.ok) { console.log(`[nst] Profile language set to en-US (${method})`); break; }
|
|
131
|
+
}
|
|
132
|
+
} catch {}
|
|
133
|
+
// Also set via connect args as fallback
|
|
123
134
|
|
|
124
135
|
// Set proxy before launch
|
|
125
136
|
if (options.proxy) {
|