curl-wrap 1.0.4 → 2.0.0

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/README.md CHANGED
@@ -88,13 +88,15 @@ curl.apiToken('your-api-token');
88
88
 
89
89
  ### Impersonating a Browser
90
90
 
91
- **NOTE**: it will use `curl-impersonate-chrome` and `curl-impersonate-ff` if they are in `PATH`
91
+ > **NOTE**: it will use `curl-impersonate` if it is in `PATH`.
92
+ > **See**: `https://github.com/lexiforest/curl-impersonate`
92
93
 
93
94
  ```js
94
95
  curl.impersonate('chrome');
95
96
  curl.impersonate('chromeMobile');
96
97
  curl.impersonate('firefox');
97
98
  curl.impersonate('safari');
99
+ curl.impersonate('safariMobile');
98
100
  curl.impersonate('edge');
99
101
  ```
100
102
 
package/index.d.ts CHANGED
@@ -28,7 +28,8 @@ type BrowserType =
28
28
  | "edge"
29
29
  | "chromeMobile"
30
30
  | "firefox"
31
- | "safari";
31
+ | "safari"
32
+ | "safariMobile";
32
33
 
33
34
  export class Curl {
34
35
  constructor();
@@ -48,8 +49,7 @@ export class Curl {
48
49
  static getNewCookieJar(...args: any[]): CookieJar;
49
50
  static getGlobalCookieJar(): CookieJar;
50
51
 
51
- static hasCurlImpersonateChrome(): boolean;
52
- static hasCurlImpersonateFirefox(): boolean;
52
+ static hasCurlImpersonate(): boolean;
53
53
 
54
54
  cliCommand(command: string): Curl;
55
55
  cliOptions(options: string | string[]): Curl;
package/index.js CHANGED
@@ -115,7 +115,7 @@ class Curl {
115
115
  // 'sec-fetch-mode': 'navigate',
116
116
  // 'sec-fetch-site': 'same-origin',
117
117
  // 'upgrade-insecure-requests': 1,
118
- 'user-agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36',
118
+ 'user-agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36',
119
119
  },
120
120
  // whether to follow redirects
121
121
  followRedirect: true,
@@ -252,25 +252,13 @@ class Curl {
252
252
  /**
253
253
  * @static
254
254
  * whether curl-impersonate-chrome is available or not
255
- * @see https://github.com/lwthiker/curl-impersonate
255
+ * @see https://github.com/lexiforest/curl-impersonate
256
256
  */
257
- static hasCurlImpersonateChrome() {
258
- if (this._hasCurlImpersonateChrome === undefined) {
259
- this._hasCurlImpersonateChrome = spawnSync('curl-impersonate-chrome', ['--version']).status === 0;
257
+ static hasCurlImpersonate() {
258
+ if (this._hasCurlImpersonate === undefined) {
259
+ this._hasCurlImpersonate = spawnSync('curl-impersonate', ['--version']).status === 0;
260
260
  }
261
- return this._hasCurlImpersonateChrome;
262
- }
263
-
264
- /**
265
- * @static
266
- * whether curl-impersonate-ff is available or not
267
- * @see https://github.com/lwthiker/curl-impersonate
268
- */
269
- static hasCurlImpersonateFirefox() {
270
- if (this._hasCurlImpersonateFirefox === undefined) {
271
- this._hasCurlImpersonateFirefox = spawnSync('curl-impersonate-ff', ['--version']).status === 0;
272
- }
273
- return this._hasCurlImpersonateFirefox;
261
+ return this._hasCurlImpersonate;
274
262
  }
275
263
 
276
264
  /**
@@ -304,82 +292,124 @@ class Curl {
304
292
  /**
305
293
  * impersonate a browser
306
294
  *
307
- * @param {string} browser browser to impersonate (chrome / chromeMobile / edge / safari / firefox)
295
+ * @param {string} browser browser to impersonate (chrome / chromeMobile / edge / safari / safariMobile / firefox)
308
296
  * @return {Curl} self
309
297
  */
310
298
  impersonate(browser = 'chrome') {
311
299
  if (browser === 'chrome') {
312
- if (this.constructor.hasCurlImpersonateChrome()) {
313
- this.cliCommand('curl-impersonate-chrome');
300
+ if (this.constructor.hasCurlImpersonate()) {
301
+ this.cliCommand('curl-impersonate');
314
302
  this.cliOptions([
315
303
  '--ciphers',
316
304
  'TLS_AES_128_GCM_SHA256,TLS_AES_256_GCM_SHA384,TLS_CHACHA20_POLY1305_SHA256,ECDHE-ECDSA-AES128-GCM-SHA256,ECDHE-RSA-AES128-GCM-SHA256,ECDHE-ECDSA-AES256-GCM-SHA384,ECDHE-RSA-AES256-GCM-SHA384,ECDHE-ECDSA-CHACHA20-POLY1305,ECDHE-RSA-CHACHA20-POLY1305,ECDHE-RSA-AES128-SHA,ECDHE-RSA-AES256-SHA,AES128-GCM-SHA256,AES256-GCM-SHA384,AES128-SHA,AES256-SHA',
305
+ '--curves',
306
+ 'X25519MLKEM768:X25519:P-256:P-384',
317
307
  '--http2',
318
- '--http2-no-server-push',
308
+ '--http2-settings',
309
+ '1:65536;2:0;4:6291456;6:262144',
310
+ '--http2-window-update',
311
+ '15663105',
312
+ '--http2-stream-weight',
313
+ '256',
314
+ '--http2-stream-exclusive',
315
+ '1',
319
316
  '--compressed',
317
+ '--ech',
318
+ 'grease',
320
319
  '--tlsv1.2',
321
320
  '--alps',
322
321
  '--tls-permute-extensions',
323
322
  '--cert-compression',
324
323
  'brotli',
324
+ '--tls-grease',
325
+ '--tls-use-new-alps-codepoint',
326
+ '--tls-signed-cert-timestamps',
325
327
  ]);
326
328
  }
327
329
  this.headers({
328
- 'sec-ch-ua': '"Chromium";v="116", "Not)A;Brand";v="24", "Google Chrome";v="116"',
330
+ 'sec-ch-ua': '"Google Chrome";v="137", "Chromium";v="137", "Not/A)Brand";v="24"',
329
331
  'sec-ch-ua-mobile': '?0',
330
- 'sec-ch-ua-platform': '"Windows"',
332
+ 'sec-ch-ua-platform': '"macOS"',
331
333
  'Upgrade-Insecure-Requests': '1',
332
- 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36',
334
+ 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36',
333
335
  Accept: 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7',
334
336
  'Sec-Fetch-Site': 'none',
335
337
  'Sec-Fetch-Mode': 'navigate',
336
338
  'Sec-Fetch-User': '?1',
337
339
  'Sec-Fetch-Dest': 'document',
338
- 'Accept-Encoding': 'gzip, deflate, br',
340
+ 'Accept-Encoding': 'gzip, deflate, br, zstd',
339
341
  'Accept-Language': 'en-US,en;q=0.9',
342
+ 'Priority': 'u=0, i',
340
343
  });
341
344
  }
342
345
  else if (browser === 'chromeMobile') {
343
- if (this.constructor.hasCurlImpersonateChrome()) {
344
- this.cliCommand('curl-impersonate-chrome');
346
+ if (this.constructor.hasCurlImpersonate()) {
347
+ this.cliCommand('curl-impersonate');
345
348
  this.cliOptions([
346
349
  '--ciphers',
347
350
  'TLS_AES_128_GCM_SHA256,TLS_AES_256_GCM_SHA384,TLS_CHACHA20_POLY1305_SHA256,ECDHE-ECDSA-AES128-GCM-SHA256,ECDHE-RSA-AES128-GCM-SHA256,ECDHE-ECDSA-AES256-GCM-SHA384,ECDHE-RSA-AES256-GCM-SHA384,ECDHE-ECDSA-CHACHA20-POLY1305,ECDHE-RSA-CHACHA20-POLY1305,ECDHE-RSA-AES128-SHA,ECDHE-RSA-AES256-SHA,AES128-GCM-SHA256,AES256-GCM-SHA384,AES128-SHA,AES256-SHA',
351
+ '--curves',
352
+ 'X25519:P-256:P-384',
348
353
  '--http2',
354
+ '--http2-settings',
355
+ '1:65536;2:0;4:6291456;6:262144',
356
+ '--http2-window-update',
357
+ '15663105',
358
+ '--http2-stream-weight',
359
+ '256',
360
+ '--http2-stream-exclusive',
361
+ '1',
349
362
  '--compressed',
363
+ '--ech',
364
+ 'grease',
350
365
  '--tlsv1.2',
351
366
  '--alps',
367
+ '--tls-permute-extensions',
352
368
  '--cert-compression',
353
369
  'brotli',
370
+ '--tls-grease',
371
+ '--tls-use-new-alps-codepoint',
372
+ '--tls-signed-cert-timestamps',
354
373
  ]);
355
374
  }
356
375
  this.headers({
357
- 'sec-ch-ua': ' Not A;Brand";v="99", "Chromium";v="99", "Google Chrome";v="99"',
358
- 'sec-ch-ua-mobile': '?1',
376
+ 'sec-ch-ua': 'Google Chrome";v="137", "Chromium";v="137", "Not_A Brand";v="24"',
377
+ 'sec-ch-ua-mobile': '?0',
359
378
  'sec-ch-ua-platform': '"Android"',
360
379
  'Upgrade-Insecure-Requests': '1',
361
- 'User-Agent': 'Mozilla/5.0 (Linux; Android 12; Pixel 6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.58 Mobile Safari/537.36',
362
- Accept: 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9',
380
+ 'User-Agent': 'Mozilla/5.0 (Linux; Android 12; Pixel 6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Mobile Safari/537.36',
381
+ Accept: 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7',
363
382
  'Sec-Fetch-Site': 'none',
364
383
  'Sec-Fetch-Mode': 'navigate',
365
384
  'Sec-Fetch-User': '?1',
366
385
  'Sec-Fetch-Dest': 'document',
367
- 'Accept-Encoding': 'gzip, deflate, br',
386
+ 'Accept-Encoding': 'gzip, deflate, br, zstd',
368
387
  'Accept-Language': 'en-US,en;q=0.9',
388
+ 'Priority': 'u=0, i',
369
389
  });
370
390
  }
371
391
  else if (browser === 'edge') {
372
- if (this.constructor.hasCurlImpersonateChrome()) {
373
- this.cliCommand('curl-impersonate-chrome');
392
+ if (this.constructor.hasCurlImpersonate()) {
393
+ this.cliCommand('curl-impersonate');
374
394
  this.cliOptions([
375
395
  '--ciphers',
376
396
  'TLS_AES_128_GCM_SHA256,TLS_AES_256_GCM_SHA384,TLS_CHACHA20_POLY1305_SHA256,ECDHE-ECDSA-AES128-GCM-SHA256,ECDHE-RSA-AES128-GCM-SHA256,ECDHE-ECDSA-AES256-GCM-SHA384,ECDHE-RSA-AES256-GCM-SHA384,ECDHE-ECDSA-CHACHA20-POLY1305,ECDHE-RSA-CHACHA20-POLY1305,ECDHE-RSA-AES128-SHA,ECDHE-RSA-AES256-SHA,AES128-GCM-SHA256,AES256-GCM-SHA384,AES128-SHA,AES256-SHA',
377
397
  '--http2',
398
+ '--http2-settings',
399
+ '1:65536;3:1000;4:6291456;6:262144',
400
+ '--http2-window-update',
401
+ '15663105',
402
+ '--http2-stream-weight',
403
+ '256',
404
+ '--http2-stream-exclusive',
405
+ '1',
378
406
  '--compressed',
379
407
  '--tlsv1.2',
380
408
  '--alps',
381
409
  '--cert-compression',
382
410
  'brotli',
411
+ '--tls-grease',
412
+ '--tls-signed-cert-timestamps',
383
413
  ]);
384
414
  }
385
415
  this.headers({
@@ -398,53 +428,137 @@ class Curl {
398
428
  });
399
429
  }
400
430
  else if (browser === 'safari') {
401
- if (this.constructor.hasCurlImpersonateChrome()) {
402
- this.cliCommand('curl-impersonate-chrome');
431
+ if (this.constructor.hasCurlImpersonate()) {
432
+ this.cliCommand('curl-impersonate');
403
433
  this.cliOptions([
404
434
  '--ciphers',
405
435
  'TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384:TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256:TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256:TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384:TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256:TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256:TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA:TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA:TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA:TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA:TLS_RSA_WITH_AES_256_GCM_SHA384:TLS_RSA_WITH_AES_128_GCM_SHA256:TLS_RSA_WITH_AES_256_CBC_SHA:TLS_RSA_WITH_AES_128_CBC_SHA:TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA:TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA:TLS_RSA_WITH_3DES_EDE_CBC_SHA',
406
436
  '--curves',
407
437
  'X25519:P-256:P-384:P-521',
408
438
  '--signature-hashes',
409
- 'ecdsa_secp256r1_sha256,rsa_pss_rsae_sha256,rsa_pkcs1_sha256,ecdsa_secp384r1_sha384,ecdsa_sha1,rsa_pss_rsae_sha384,rsa_pss_rsae_sha384,rsa_pkcs1_sha384,rsa_pss_rsae_sha512,rsa_pkcs1_sha512,rsa_pkcs1_sha1',
439
+ 'ecdsa_secp256r1_sha256,rsa_pss_rsae_sha256,rsa_pkcs1_sha256,ecdsa_secp384r1_sha384,rsa_pss_rsae_sha384,rsa_pss_rsae_sha384,rsa_pkcs1_sha384,rsa_pss_rsae_sha512,rsa_pkcs1_sha512,rsa_pkcs1_sha1',
410
440
  '--http2',
441
+ '--http2-settings',
442
+ '2:0;3:100;4:2097152;9:1',
443
+ '--http2-pseudo-headers-order',
444
+ 'msap',
445
+ '--http2-window-update',
446
+ '10420225',
447
+ '--http2-stream-weight',
448
+ '256',
449
+ '--http2-stream-exclusive',
450
+ '0',
411
451
  '--compressed',
412
452
  '--tlsv1.0',
413
453
  '--no-tls-session-ticket',
414
454
  '--cert-compression',
415
455
  'zlib',
456
+ '--tls-grease',
457
+ '--tls-signed-cert-timestamps',
458
+ ]);
459
+ }
460
+ this.headers({
461
+ 'sec-fetch-dest': 'document',
462
+ 'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.4 Safari/605.1.15',
463
+ accept: 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
464
+ 'sec-fetch-site': 'none',
465
+ 'sec-fetch-mode': 'navigate',
466
+ 'accept-language': 'en-US,en;q=0.9',
467
+ 'priority': 'u=0, i',
468
+ 'accept-encoding': 'gzip, deflate, br',
469
+ });
470
+ }
471
+ else if (browser === 'safariMobile') {
472
+ if (this.constructor.hasCurlImpersonate()) {
473
+ this.cliCommand('curl-impersonate');
474
+ this.cliOptions([
475
+ '--ciphers',
476
+ 'TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384:TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256:TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256:TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384:TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256:TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256:TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA:TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA:TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA:TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA:TLS_RSA_WITH_AES_256_GCM_SHA384:TLS_RSA_WITH_AES_128_GCM_SHA256:TLS_RSA_WITH_AES_256_CBC_SHA:TLS_RSA_WITH_AES_128_CBC_SHA:TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA:TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA:TLS_RSA_WITH_3DES_EDE_CBC_SHA',
477
+ '--curves',
478
+ 'X25519:P-256:P-384:P-521',
479
+ '--signature-hashes',
480
+ 'ecdsa_secp256r1_sha256,rsa_pss_rsae_sha256,rsa_pkcs1_sha256,ecdsa_secp384r1_sha384,rsa_pss_rsae_sha384,rsa_pss_rsae_sha384,rsa_pkcs1_sha384,rsa_pss_rsae_sha512,rsa_pkcs1_sha512,rsa_pkcs1_sha1',
481
+ '--http2',
482
+ '--http2-settings',
483
+ '2:0;3:100;4:2097152;9:1',
416
484
  '--http2-pseudo-headers-order',
417
- 'mspa',
485
+ 'msap',
486
+ '--http2-window-update',
487
+ '10420225',
488
+ '--http2-stream-weight',
489
+ '256',
490
+ '--http2-stream-exclusive',
491
+ '0',
492
+ '--compressed',
493
+ '--tlsv1.0',
494
+ '--no-tls-session-ticket',
495
+ '--cert-compression',
496
+ 'zlib',
497
+ '--tls-grease',
498
+ '--tls-signed-cert-timestamps',
418
499
  ]);
419
500
  }
420
501
  this.headers({
421
- 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.5 Safari/605.1.15',
422
- Accept: 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
423
- 'Accept-Language': 'en-GB,en-US;q=0.9,en;q=0.8',
424
- 'Accept-Encoding': 'gzip, deflate, br',
502
+ 'sec-fetch-dest': 'document',
503
+ 'user-agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 18_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.4 Mobile/15E148 Safari/604.1',
504
+ accept: 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
505
+ 'sec-fetch-site': 'none',
506
+ 'sec-fetch-mode': 'navigate',
507
+ 'accept-language': 'en-US,en;q=0.9',
508
+ 'priority': 'u=0, i',
509
+ 'accept-encoding': 'gzip, deflate, br',
425
510
  });
426
511
  }
427
512
  else if (browser === 'firefox') {
428
- if (this.constructor.hasCurlImpersonateFirefox()) {
429
- this.cliCommand('curl-impersonate-ff');
513
+ if (this.constructor.hasCurlImpersonate()) {
514
+ this.cliCommand('curl-impersonate');
430
515
  this.cliOptions([
431
516
  '--ciphers',
432
- 'aes_128_gcm_sha_256,chacha20_poly1305_sha_256,aes_256_gcm_sha_384,ecdhe_ecdsa_aes_128_gcm_sha_256,ecdhe_rsa_aes_128_gcm_sha_256,ecdhe_ecdsa_chacha20_poly1305_sha_256,ecdhe_rsa_chacha20_poly1305_sha_256,ecdhe_ecdsa_aes_256_gcm_sha_384,ecdhe_rsa_aes_256_gcm_sha_384,ecdhe_ecdsa_aes_256_sha,ecdhe_ecdsa_aes_128_sha,ecdhe_rsa_aes_128_sha,ecdhe_rsa_aes_256_sha,rsa_aes_128_gcm_sha_256,rsa_aes_256_gcm_sha_384,rsa_aes_128_sha,rsa_aes_256_sha',
517
+ 'TLS_AES_128_GCM_SHA256,TLS_CHACHA20_POLY1305_SHA256,TLS_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,TLS_RSA_WITH_AES_128_GCM_SHA256,TLS_RSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_256_CBC_SHA',
518
+ '--curves',
519
+ 'X25519MLKEM768:X25519:P-256:P-384:P-521:ffdhe2048:ffdhe3072',
520
+ '--signature-hashes',
521
+ 'ecdsa_secp256r1_sha256,ecdsa_secp384r1_sha384,ecdsa_secp521r1_sha512,rsa_pss_rsae_sha256,rsa_pss_rsae_sha384,rsa_pss_rsae_sha512,rsa_pkcs1_sha256,rsa_pkcs1_sha384,rsa_pkcs1_sha512,ecdsa_sha1,rsa_pkcs1_sha1',
433
522
  '--http2',
523
+ '--http2-settings',
524
+ '1:65536;2:0;4:131072;5:16384',
525
+ '--http2-pseudo-headers-order',
526
+ 'msap',
527
+ '--http2-window-update',
528
+ '12517377',
529
+ '--http2-stream-weight',
530
+ '42',
531
+ '--http2-stream-exclusive',
532
+ '0',
434
533
  '--compressed',
534
+ '--ech',
535
+ 'grease',
536
+ '--tls-extension-order',
537
+ '0-23-65281-10-11-35-16-5-34-18-51-43-13-45-28-27-65037',
538
+ '--tls-delegated-credentials',
539
+ 'ecdsa_secp256r1_sha256:ecdsa_secp384r1_sha384:ecdsa_secp521r1_sha512:ecdsa_sha1',
540
+ '--tls-record-size-limit',
541
+ '4001',
542
+ '--tls-key-shares-limit',
543
+ '3',
544
+ '--cert-compression',
545
+ 'zlib,brotli,zstd',
546
+ '--tls-signed-cert-timestamps',
547
+ '--tls-use-firefox-tls13-ciphers',
435
548
  ]);
436
549
  }
437
550
  this.headers({
438
- 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/117.0',
439
- Accept: 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8',
551
+ 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:135.0) Gecko/20100101 Firefox/135.0',
552
+ Accept: 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
440
553
  'Accept-Language': 'en-US,en;q=0.5',
441
- 'Accept-Encoding': 'gzip, deflate, br',
554
+ 'Accept-Encoding': 'gzip, deflate, br, zstd',
442
555
  'Upgrade-Insecure-Requests': '1',
443
556
  'Sec-Fetch-Dest': 'document',
444
557
  'Sec-Fetch-Mode': 'navigate',
445
558
  'Sec-Fetch-Site': 'none',
446
559
  'Sec-Fetch-User': '?1',
447
- TE: 'Trailers',
560
+ 'Priority': 'u=0, i',
561
+ 'TE': 'trailers',
448
562
  });
449
563
  }
450
564
  return this;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "curl-wrap",
3
- "version": "1.0.4",
3
+ "version": "2.0.0",
4
4
  "description": "Nodejs library that wraps curl command line",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",