jscrambler 8.1.0 → 8.1.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # jscrambler
2
2
 
3
+ ## 8.1.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [5bb3289]: Added proxy protocol option
8
+
3
9
  ## 8.1.0
4
10
 
5
11
  ### Minor Changes
package/README.md CHANGED
@@ -284,6 +284,7 @@ If your requests need to go through a proxy, there is an option where you can sp
284
284
  ```
285
285
  {
286
286
  proxy: {
287
+ protocol: '', // 'http' by default
287
288
  host: '',
288
289
  port: 1234,
289
290
  auth: {
package/dist/client.js CHANGED
@@ -194,22 +194,12 @@ JScramblerClient.prototype.request = function (method, path) {
194
194
  }
195
195
  formattedAuth = "".concat(username, ":").concat(password);
196
196
  }
197
-
198
- /**
199
- * Monkey-patch to inject a custom Cert CA into TLS.connect
200
- * options.
201
- */
202
- if (agentOptions.ca) {
203
- const oriCallback = _httpsProxyAgent.default.prototype.callback;
204
- _httpsProxyAgent.default.prototype.callback = function (req, opts) {
205
- return oriCallback.call(this, req, _objectSpread(_objectSpread({}, opts), agentOptions));
206
- };
207
- }
208
197
  settings.proxy = false;
209
198
  const proxyConfig = _objectSpread({
210
199
  host,
211
200
  port,
212
- auth: formattedAuth
201
+ auth: formattedAuth,
202
+ protocol: proxy.protocol || "http"
213
203
  }, agentOptions);
214
204
  settings.httpsAgent = new _httpsProxyAgent.default(proxyConfig);
215
205
  settings.httpAgent = new _httpProxyAgent.default(proxyConfig);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "jscrambler",
3
3
  "description": "Jscrambler API client.",
4
- "version": "8.1.0",
4
+ "version": "8.1.1",
5
5
  "homepage": "https://github.com/jscrambler/jscrambler",
6
6
  "author": "Jscrambler <support@jscrambler.com>",
7
7
  "repository": {