channel-worker 1.3.5 → 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 +30 -3
- 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,7 +131,22 @@ class NstManager {
|
|
|
119
131
|
return { profileId, alreadyRunning: true };
|
|
120
132
|
}
|
|
121
133
|
|
|
122
|
-
//
|
|
134
|
+
// Update profile language to en-US (Custom) before launch
|
|
135
|
+
try {
|
|
136
|
+
for (const method of ['PATCH', 'PUT']) {
|
|
137
|
+
const res = await fetch(`${this.baseUrl}/profiles/${profileId}`, {
|
|
138
|
+
method,
|
|
139
|
+
headers: { 'Content-Type': 'application/json', 'x-api-key': this.apiKey },
|
|
140
|
+
body: JSON.stringify({
|
|
141
|
+
fingerprint: {
|
|
142
|
+
flags: { localization: 'Custom' },
|
|
143
|
+
localization: { basedOnProxy: false, languages: ['en-US', 'en'], locale: 'en-US' },
|
|
144
|
+
},
|
|
145
|
+
}),
|
|
146
|
+
});
|
|
147
|
+
if (res.ok) { console.log(`[nst] Profile language set to en-US Custom (${method})`); break; }
|
|
148
|
+
}
|
|
149
|
+
} catch {}
|
|
123
150
|
|
|
124
151
|
// Set proxy before launch
|
|
125
152
|
if (options.proxy) {
|