channel-worker 1.6.8 → 1.6.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.
- package/lib/nst-manager.js +3 -15
- package/package.json +1 -1
package/lib/nst-manager.js
CHANGED
|
@@ -158,22 +158,10 @@ class NstManager {
|
|
|
158
158
|
},
|
|
159
159
|
};
|
|
160
160
|
|
|
161
|
-
// Pass proxy in connect config
|
|
161
|
+
// Pass proxy as URL string in connect config (Nstbrowser API format)
|
|
162
162
|
if (options.proxy) {
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
connectConfig.proxy = {
|
|
166
|
-
proxyMethod: 'custom',
|
|
167
|
-
proxyType: proxyUrl.protocol.replace(':', '') || 'http',
|
|
168
|
-
host: proxyUrl.hostname,
|
|
169
|
-
port: proxyUrl.port,
|
|
170
|
-
username: decodeURIComponent(proxyUrl.username || ''),
|
|
171
|
-
password: decodeURIComponent(proxyUrl.password || ''),
|
|
172
|
-
};
|
|
173
|
-
console.log(`[nst] Proxy: ${proxyUrl.hostname}:${proxyUrl.port}`);
|
|
174
|
-
} catch (e) {
|
|
175
|
-
console.warn(`[nst] Invalid proxy URL: ${options.proxy}`);
|
|
176
|
-
}
|
|
163
|
+
connectConfig.proxy = options.proxy;
|
|
164
|
+
console.log(`[nst] Proxy: ${options.proxy}`);
|
|
177
165
|
}
|
|
178
166
|
|
|
179
167
|
if (options.extensionPath) {
|