channel-worker 1.3.6 → 1.3.9

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.
@@ -80,10 +80,22 @@ class NstManager {
80
80
  platform: 'Windows',
81
81
  kernelMilestone: '132',
82
82
  fingerprint: {
83
- flags: { audio: 'Noise', canvas: 'Noise', fonts: 'Masked', gpu: 'Allow', webgl: 'Noise' },
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
- language: 'en-US',
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({ fingerprint: { language: 'en-US' } }),
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) {
package/lib/updater.js CHANGED
@@ -44,12 +44,20 @@ async function checkAndUpdate({ autoRestart = false } = {}) {
44
44
 
45
45
  if (autoRestart) {
46
46
  console.log('[updater] Restarting daemon...');
47
- // Spawn detached process with same args, then exit current
48
47
  const { spawn } = require('child_process');
49
- const child = spawn(process.argv[0], process.argv.slice(1), {
48
+ const isWindows = process.platform === 'win32';
49
+
50
+ // Use the global binary name instead of process.argv to pick up new version
51
+ const cmd = isWindows ? 'cmd' : 'sh';
52
+ const args = isWindows
53
+ ? ['/c', 'timeout /t 2 /nobreak >nul && channel-worker start']
54
+ : ['-c', 'sleep 2 && channel-worker start'];
55
+
56
+ const child = spawn(cmd, args, {
50
57
  detached: true,
51
58
  stdio: 'ignore',
52
59
  cwd: process.cwd(),
60
+ shell: false,
53
61
  });
54
62
  child.unref();
55
63
  process.exit(0);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "channel-worker",
3
- "version": "1.3.6",
3
+ "version": "1.3.9",
4
4
  "description": "Channel Manager worker daemon — runs on remote machines to execute video pipeline jobs",
5
5
  "main": "lib/daemon.js",
6
6
  "bin": {