{"_id":"node-tls-client","_rev":"15-ac1ca04eeeb34c561ea33b963fb6f96f","name":"node-tls-client","dist-tags":{"latest":"2.1.0"},"versions":{"1.0.2":{"name":"node-tls-client","version":"1.0.2","keywords":["tls-client","node-tls-client","javascript","typescript","tls client","tls"],"author":{"name":"Sahil1337"},"license":"GNU-3.0","_id":"node-tls-client@1.0.2","maintainers":[{"name":"sahil1337","email":"technicalintegration1@gmail.com"}],"homepage":"https://github.com/Sahil1337/node-tls-client#readme","bugs":{"url":"https://github.com/Sahil1337/node-tls-client/issues"},"dist":{"shasum":"c8d654be22e8dcc478703929ae2a19aa1e5d5b97","tarball":"https://registry.npmjs.org/node-tls-client/-/node-tls-client-1.0.2.tgz","fileCount":28,"integrity":"sha512-P+ubjUHC/UuSIfqVTAvmR5U2br+gV4GaGkel/QgD5dY1H2h6s+wWZRzWSpF4Taas+tuIMFaXN2cpzkMXQdS7hA==","signatures":[{"sig":"MEQCIG0pQuZj0zqTfAfnBr3gb7I7009EMtdUKSsvxU7kcm+hAiAI9z5dkJ14cWn2FczEUaSHia7dg4lpGUFr2sRbbeHfew==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":92054279},"main":"dist/index.js","gitHead":"0fe518d871144e53f89fbbd8b1910b150abfdb30","private":false,"scripts":{"docs":"typedoc --out docs src/index.ts","build":"tsc"},"typings":"typings/index.d.ts","_npmUser":{"name":"sahil1337","email":"technicalintegration1@gmail.com"},"repository":{"url":"git+https://github.com/Sahil1337/node-tls-client.git","type":"git"},"_npmVersion":"10.5.0","description":"Advanced library based on node-fetch and tls-client.","directories":{},"_nodeVersion":"20.12.1","dependencies":{"koffi":"^2.8.9","tslib":"^2.6.2","tough-cookie":"^4.1.4"},"_hasShrinkwrap":false,"devDependencies":{"typedoc":"^0.25.13","typescript":"^5.4.5","@types/node":"^20.12.12","@types/tough-cookie":"^4.0.5"},"_npmOperationalInternal":{"tmp":"tmp/node-tls-client_1.0.2_1717314021101_0.9323016424887025","host":"s3://npm-registry-packages"}},"1.1.0":{"name":"node-tls-client","version":"1.1.0","keywords":["tls-client","node-tls-client","javascript","typescript","tls client","tls"],"author":{"name":"Sahil1337"},"license":"GPL-3.0","_id":"node-tls-client@1.1.0","maintainers":[{"name":"sahil1337","email":"technicalintegration1@gmail.com"}],"homepage":"https://github.com/Sahil1337/node-tls-client#readme","bugs":{"url":"https://github.com/Sahil1337/node-tls-client/issues"},"dist":{"shasum":"633a1eee3f7be2edd01a3498cb6f095b18e8559a","tarball":"https://registry.npmjs.org/node-tls-client/-/node-tls-client-1.1.0.tgz","fileCount":28,"integrity":"sha512-DarKDrLdJvYkFrMlLvw2Xpii2/TonCWUFtxv5hXZwPyAKT3hnpROtbXGpbZaKoQWWLyOFtuRIXxWQk/j3K6YYw==","signatures":[{"sig":"MEUCIHowkM0Fqk+0MvTlsYrFnNzV/N0hIinCkEtuUGeX4KSFAiEA6gJr0wBscwrsSFqF89E6PcNX5+pMGSeWgbxzt9VSC4M=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":92055011},"main":"dist/index.js","gitHead":"0fe518d871144e53f89fbbd8b1910b150abfdb30","private":false,"scripts":{"docs":"typedoc --out docs src/index.ts","build":"tsc"},"typings":"typings/index.d.ts","_npmUser":{"name":"sahil1337","email":"technicalintegration1@gmail.com"},"repository":{"url":"git+https://github.com/Sahil1337/node-tls-client.git","type":"git"},"_npmVersion":"10.5.0","description":"Advanced library based on node-fetch and tls-client.","directories":{},"_nodeVersion":"20.12.1","dependencies":{"koffi":"^2.8.9","tslib":"^2.6.2","tough-cookie":"^4.1.4"},"_hasShrinkwrap":false,"devDependencies":{"typedoc":"^0.25.13","typescript":"^5.4.5","@types/node":"^20.12.12","@types/tough-cookie":"^4.0.5"},"_npmOperationalInternal":{"tmp":"tmp/node-tls-client_1.1.0_1717355225268_0.0007962685084159649","host":"s3://npm-registry-packages"}},"1.1.1":{"name":"node-tls-client","version":"1.1.1","keywords":["tls-client","node-tls-client","javascript","typescript","tls client","tls"],"author":{"name":"Sahil1337"},"license":"GPL-3.0","_id":"node-tls-client@1.1.1","maintainers":[{"name":"sahil1337","email":"technicalintegration1@gmail.com"}],"homepage":"https://github.com/Sahil1337/node-tls-client#readme","bugs":{"url":"https://github.com/Sahil1337/node-tls-client/issues"},"dist":{"shasum":"1a3c014cfcdc73a00c026d5597a635b91302ddad","tarball":"https://registry.npmjs.org/node-tls-client/-/node-tls-client-1.1.1.tgz","fileCount":27,"integrity":"sha512-jf6SPfZ6wQBv0crN6Tg6PP29k6Xrkm3bqO1Yc/eif8Kx57nwf8en2RRFhcmBc8BgwuAeK88W0Enshuu9jx1Wlg==","signatures":[{"sig":"MEQCIF+Kn2BEes0LQ+lCSqAc9PtWflSbk2CImsxrL3Z38KfeAiA7gzsn1BvCLheE15gFAGS+3nGgFM7Qj49iTNeKVoZjfQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":97705},"main":"dist/index.js","gitHead":"ccb59453fbefeaa80e37700d5badc6c550e2d420","private":false,"scripts":{"docs":"typedoc --out docs src/index.ts","build":"tsc"},"typings":"typings/index.d.ts","_npmUser":{"name":"sahil1337","email":"technicalintegration1@gmail.com"},"repository":{"url":"git+https://github.com/Sahil1337/node-tls-client.git","type":"git"},"_npmVersion":"10.5.0","description":"Advanced library based on node-fetch and tls-client.","directories":{},"_nodeVersion":"20.12.1","dependencies":{"koffi":"^2.8.9","tslib":"^2.6.2","tough-cookie":"^4.1.4"},"_hasShrinkwrap":false,"devDependencies":{"typedoc":"^0.25.13","typescript":"^5.4.5","@types/node":"^20.12.12","@types/tough-cookie":"^4.0.5"},"_npmOperationalInternal":{"tmp":"tmp/node-tls-client_1.1.1_1717527159372_0.34017098071200413","host":"s3://npm-registry-packages"}},"1.1.2":{"name":"node-tls-client","version":"1.1.2","keywords":["tls-client","node-tls-client","javascript","typescript","tls client","tls"],"author":{"name":"Sahil1337"},"license":"GPL-3.0","_id":"node-tls-client@1.1.2","maintainers":[{"name":"sahil1337","email":"technicalintegration1@gmail.com"}],"homepage":"https://github.com/Sahil1337/node-tls-client#readme","bugs":{"url":"https://github.com/Sahil1337/node-tls-client/issues"},"dist":{"shasum":"4e345b923c8ef447d0d6c1c7f11af00ae0f3d60f","tarball":"https://registry.npmjs.org/node-tls-client/-/node-tls-client-1.1.2.tgz","fileCount":39,"integrity":"sha512-zVXq7RvEv6wrjJ48KGsOEnD2mllg3GgTlr/A1tZjX+6ohZV/utYujpv5fU2btZAH1dddPjSFHkCDZQ5B2WOobg==","signatures":[{"sig":"MEQCIAIH2kslTO70GQGdC3+WgxXc8tL+sbVRr6JNtRvlMpZ/AiB+v+fJKa8Qeea4YKdKw6o1rtspmiJ9Zcw0GyypZbftEA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":114459},"main":"dist/index.js","gitHead":"a2704dbfe5b6a87df8bc7600b997ffe7f6b88454","private":false,"scripts":{"docs":"typedoc --out docs src/index.ts","build":"tsc"},"typings":"typings/index.d.ts","_npmUser":{"name":"sahil1337","email":"technicalintegration1@gmail.com"},"repository":{"url":"git+https://github.com/Sahil1337/node-tls-client.git","type":"git"},"_npmVersion":"10.5.0","description":"Advanced library based on node-fetch and tls-client.","directories":{},"_nodeVersion":"20.12.1","dependencies":{"koffi":"^2.8.9","tslib":"^2.6.2","tough-cookie":"^4.1.4"},"_hasShrinkwrap":false,"devDependencies":{"typedoc":"^0.25.13","typescript":"^5.4.5","@types/node":"^20.12.12","@types/tough-cookie":"^4.0.5"},"_npmOperationalInternal":{"tmp":"tmp/node-tls-client_1.1.2_1717949172739_0.7320347455092306","host":"s3://npm-registry-packages"}},"1.1.3":{"name":"node-tls-client","version":"1.1.3","keywords":["tls-client","node-tls-client","javascript","typescript","tls client","tls"],"author":{"name":"Sahil1337"},"license":"GPL-3.0","_id":"node-tls-client@1.1.3","maintainers":[{"name":"sahil1337","email":"technicalintegration1@gmail.com"}],"homepage":"https://github.com/Sahil1337/node-tls-client#readme","bugs":{"url":"https://github.com/Sahil1337/node-tls-client/issues"},"dist":{"shasum":"6203a67543137921b6d0a24c00684185ee7a02b6","tarball":"https://registry.npmjs.org/node-tls-client/-/node-tls-client-1.1.3.tgz","fileCount":28,"integrity":"sha512-xxFlRdt9eY46Q2JJ4RNdAk2N8DPQTJmyb+dEzuBP62GXWU4belZ42dNEJvt/DSQ+qz/Tl6srjbdAXG6I9BZ2PA==","signatures":[{"sig":"MEYCIQDWlPc9rnMRn1/3zWKwnwPb8/KO/7GQDcSC+a4/A5cwhAIhAOpDCjzws9WJToiBeDJ9FEUSgcF0F6TiBi1DYuR3Y8Tw","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":105968},"main":"dist/index.js","gitHead":"a2704dbfe5b6a87df8bc7600b997ffe7f6b88454","private":false,"scripts":{"docs":"typedoc --out docs src/index.ts","build":"tsc"},"typings":"typings/index.d.ts","_npmUser":{"name":"sahil1337","email":"technicalintegration1@gmail.com"},"repository":{"url":"git+https://github.com/Sahil1337/node-tls-client.git","type":"git"},"_npmVersion":"10.5.0","description":"Advanced library based on node-fetch and tls-client.","directories":{},"_nodeVersion":"20.12.1","dependencies":{"koffi":"^2.8.9","tslib":"^2.6.2","tough-cookie":"^4.1.4"},"_hasShrinkwrap":false,"devDependencies":{"typedoc":"^0.25.13","typescript":"^5.4.5","@types/node":"^20.12.12","@types/tough-cookie":"^4.0.5"},"_npmOperationalInternal":{"tmp":"tmp/node-tls-client_1.1.3_1718275360992_0.5570043131031086","host":"s3://npm-registry-packages"}},"1.1.4":{"name":"node-tls-client","version":"1.1.4","keywords":["tls-client","node-tls-client","javascript","typescript","tls client","tls","cloudflare"],"author":{"name":"Sahil1337"},"license":"GPL-3.0","_id":"node-tls-client@1.1.4","maintainers":[{"name":"sahil1337","email":"technicalintegration1@gmail.com"}],"homepage":"https://github.com/Sahil1337/node-tls-client#readme","bugs":{"url":"https://github.com/Sahil1337/node-tls-client/issues"},"dist":{"shasum":"a462ad7ef353cdf6ce45e4e2ea1070815b15449d","tarball":"https://registry.npmjs.org/node-tls-client/-/node-tls-client-1.1.4.tgz","fileCount":57,"integrity":"sha512-xscrp2PBlKVS/YnR9kkozPUK5D4BQr1vShKscxYxArZI/LlHlB/m/JzzeqFxq6V1dxnQqAMgEZX1aiXOf1HGKw==","signatures":[{"sig":"MEUCIDUdbyzwaZj0P6+uDKAT2+5FSYLem4YJ2cg+OH4Ujw6XAiEAopUyx3ZXJcXRan0Euz1jXxsuStWvWJzBChgkap9qR7U=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":173816},"main":"dist/index.js","gitHead":"4a0e05ebc28db18d8c8831f9eec94723e03f8a90","private":false,"scripts":{"docs":"typedoc --out docs src/index.ts","build":"tsc"},"typings":"typings/index.d.ts","_npmUser":{"name":"sahil1337","email":"technicalintegration1@gmail.com"},"repository":{"url":"git+https://github.com/Sahil1337/node-tls-client.git","type":"git"},"_npmVersion":"10.8.1","description":"Advanced library based on node-fetch and tls-client.","directories":{},"_nodeVersion":"22.3.0","dependencies":{"koffi":"^2.8.9","tslib":"^2.6.2","tough-cookie":"^4.1.4"},"_hasShrinkwrap":false,"devDependencies":{"typedoc":"^0.25.13","typescript":"^5.4.5","@types/node":"^20.12.12","@types/tough-cookie":"^4.0.5"},"_npmOperationalInternal":{"tmp":"tmp/node-tls-client_1.1.4_1722193218737_0.7128444230979949","host":"s3://npm-registry-packages"}},"2.0.0":{"name":"node-tls-client","version":"2.0.0","keywords":["tls-client","node-tls-client","javascript","typescript","tls client","tls","cloudflare"],"author":{"name":"Sahil1337"},"license":"GPL-3.0","_id":"node-tls-client@2.0.0","maintainers":[{"name":"sahil1337","email":"technicalintegration1@gmail.com"}],"homepage":"https://github.com/Sahil1337/node-tls-client#readme","bugs":{"url":"https://github.com/Sahil1337/node-tls-client/issues"},"dist":{"shasum":"386d979905ada055df08dc6b1532af655b1b57b7","tarball":"https://registry.npmjs.org/node-tls-client/-/node-tls-client-2.0.0.tgz","fileCount":41,"integrity":"sha512-wDoVVQPfcvAnK3X77c5t2W7LXZaLL7+DzHWOX+e9I0UleEOswKeO/7Ollk+lpwy+3BVWwf6Z2mP99scW9f2/7w==","signatures":[{"sig":"MEUCIEf5loaeYcf2H8cLH31LpOKFzjz7OLp49/GabyFcc7HxAiEA17E1YVEmwz1Sv2BSmjvMSnxh4KKFhulXRMsLpdxXxvA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":125225},"main":"dist/index.js","gitHead":"91357be0fc229685ec5d8cf28cdb1bc8159bee92","private":false,"scripts":{"docs":"typedoc --out docs src/index.ts","build":"tsc"},"typings":"typings/index.d.ts","_npmUser":{"name":"sahil1337","email":"technicalintegration1@gmail.com"},"repository":{"url":"git+https://github.com/Sahil1337/node-tls-client.git","type":"git"},"_npmVersion":"9.2.0","description":"Advanced library based on node-fetch and tls-client.","directories":{},"_nodeVersion":"18.19.0","dependencies":{"koffi":"^2.8.9","tslib":"^2.6.2","workerpool":"^9.2.0","tough-cookie":"^4.1.4"},"_hasShrinkwrap":false,"devDependencies":{"typedoc":"^0.25.13","typescript":"^5.4.5","@types/node":"^20.12.12","@types/tough-cookie":"^4.0.5"},"_npmOperationalInternal":{"tmp":"tmp/node-tls-client_2.0.0_1734205686894_0.8594168118503502","host":"s3://npm-registry-packages-npm-production"}},"2.1.0":{"name":"node-tls-client","version":"2.1.0","description":"Advanced library based on node-fetch and tls-client.","main":"dist/index.js","typings":"typings/index.d.ts","repository":{"type":"git","url":"git+https://github.com/Sahil1337/node-tls-client.git"},"author":{"name":"Sahil1337"},"license":"GPL-3.0","private":false,"scripts":{"build":"tsc","docs":"typedoc --out docs src/index.ts"},"keywords":["tls-client","node-tls-client","javascript","typescript","tls client","tls","cloudflare"],"devDependencies":{"@types/node":"^20.12.12","@types/tough-cookie":"^4.0.5","@types/cookie-parser":"^1.4.9","typedoc":"^0.25.13","typescript":"^5.4.5"},"dependencies":{"cookie-parser":"^1.4.7","koffi":"^2.8.9","piscina":"^5.1.1","tough-cookie":"^4.1.4"},"_id":"node-tls-client@2.1.0","gitHead":"7e679e0f197b9d86ae3e2096a6630782eafff048","bugs":{"url":"https://github.com/Sahil1337/node-tls-client/issues"},"homepage":"https://github.com/Sahil1337/node-tls-client#readme","_nodeVersion":"23.6.1","_npmVersion":"10.9.2","dist":{"integrity":"sha512-b1Y2WFdQ7BJXa5CT6qRafCFeaNiTsZP+UFqNy+8hrHExlPHe3ccEtFkKt3WDGzGIfNvb4Ws9EEQmzFS9Jztisg==","shasum":"54e5adde06c90689f06da86b7d2c8cefd7433567","tarball":"https://registry.npmjs.org/node-tls-client/-/node-tls-client-2.1.0.tgz","fileCount":43,"unpackedSize":117846,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDY+jUgVVklmgAP00GeQsOzwwbfiLHCVDP1DhCDIml1zQIhAIdOOirG4+mYDdw0ATMtdShWhb58yc6Hh3ZwIE6kVAF2"}]},"_npmUser":{"name":"sahil1337","email":"technicalintegration1@gmail.com","actor":{"name":"sahil1337","email":"technicalintegration1@gmail.com","type":"user"}},"directories":{},"maintainers":[{"name":"sahil1337","email":"technicalintegration1@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/node-tls-client_2.1.0_1750523873379_0.3483700086690742"},"_hasShrinkwrap":false}},"time":{"created":"2024-06-02T07:40:21.100Z","modified":"2025-06-21T16:37:53.743Z","0.0.1":"2023-01-08T23:41:38.651Z","1.0.0":"2023-06-29T08:45:15.451Z","1.0.1":"2024-06-01T06:22:18.071Z","1.0.2":"2024-06-02T07:40:21.734Z","1.1.0":"2024-06-02T19:07:05.873Z","1.1.1":"2024-06-04T18:52:39.519Z","1.1.2":"2024-06-09T16:06:12.903Z","1.1.3":"2024-06-13T10:42:41.139Z","1.1.4":"2024-07-28T19:00:18.912Z","2.0.0":"2024-12-14T19:48:07.090Z","2.1.0":"2025-06-21T16:37:53.560Z"},"bugs":{"url":"https://github.com/Sahil1337/node-tls-client/issues"},"author":{"name":"Sahil1337"},"license":"GPL-3.0","homepage":"https://github.com/Sahil1337/node-tls-client#readme","keywords":["tls-client","node-tls-client","javascript","typescript","tls client","tls","cloudflare"],"repository":{"type":"git","url":"git+https://github.com/Sahil1337/node-tls-client.git"},"description":"Advanced library based on node-fetch and tls-client.","maintainers":[{"name":"sahil1337","email":"technicalintegration1@gmail.com"}],"readme":"<div align=\"center\">\r\n  <h1>node-tls-client</h1>\r\n  <p>Advanced library based on node-fetch syntax and tls-client.</p>\r\n  <p>\r\n    <a href=\"https://www.npmjs.com/package/node-tls-client\"><img src=\"https://img.shields.io/npm/v/node-tls-client?maxAge=3600\" alt=\"NPM version\" /></a>\r\n    <a href=\"https://www.npmjs.com/package/node-tls-client\"><img src=\"https://img.shields.io/npm/dt/node-tls-client?maxAge=3600\" alt=\"NPM downloads\" /></a>\r\n  </p>\r\n  <p>\r\n    <a href=\"https://www.npmjs.com/package/node-tls-client\"><img src=\"https://nodei.co/npm/node-tls-client.png?downloads=true&stars=true\" alt=\"NPM Banner\"></a>\r\n  </p>\r\n</div>\r\n\r\n<div align=\"center\"> <p> <b> What is TLS Fingerprinting? </b> </p>\r\nSome people think it is enough to change the user-agent header of a request to let the server think that the client requesting a resource is a specific browser. Nowadays this is not enough, because the server might use a technique to detect the client browser which is called TLS Fingerprinting. <b>This library aims to defeat it.</b> </p></div>\r\n\r\n## Installation\r\n\r\n```sh\r\nnpm install node-tls-client\r\n# (or)\r\nyarn add node-tls-client\r\n# (or)\r\npnpm add node-tls-client\r\n```\r\n\r\n## Example\r\n\r\n```javascript\r\nconst {\r\n  Session,\r\n  ClientIdentifier,\r\n  initTLS,\r\n  destroyTLS,\r\n} = require(\"node-tls-client\");\r\n\r\n/**\r\n * @description Demonstrates using the node-tls-client library to make HTTP requests with a specified timeout.\r\n * Note: The timeout is set per session and cannot be changed during the session.\r\n *\r\n * @see {@link https://sahil1337.github.io/node-tls-client/interfaces/SessionOptions.html SessionOptions} for more details.\r\n */\r\n(async () => {\r\n  await initTLS();\r\n\r\n  const session = new Session({\r\n    clientIdentifier: ClientIdentifier.chrome_103,\r\n    timeout: 3000,\r\n  });\r\n\r\n  try {\r\n    const response = await session.get(\"https://website.com/\");\r\n\r\n    console.log(response.status, await response.text());\r\n  } catch (error) {\r\n    console.error(\"An error occurred:\", error);\r\n  } finally {\r\n    await session.close();\r\n    await destroyTLS();\r\n  }\r\n})();\r\n```\r\n\r\n## Advanced example\r\n\r\n```javascript\r\nconst { Session, initTLS, destroyTLS } = require(\"node-tls-client\");\r\n\r\n/**\r\n * @description Demonstrates an advanced usage scenario with the node-tls-client library, showcasing custom TLS client configuration.\r\n *\r\n * This example illustrates the creation of a TLS session with tailored settings and the execution of a GET request.\r\n *\r\n * Custom TLS settings encompass a wide array of configurations, including:\r\n * - JA3 string specification\r\n * - Fine-tuning HTTP/2 settings\r\n * - Defining supported signature algorithms\r\n * - Specifying ALPN (Application-Layer Protocol Negotiation) protocols\r\n * - Declaring supported TLS versions\r\n * - Setting key share curves for cryptographic key exchange\r\n * - Choosing a certificate compression algorithm\r\n * - Configuring connection and header flow parameters\r\n * - Defining the order of headers and priority frames\r\n * - Providing default headers for HTTP requests\r\n *\r\n * @see {@link https://sahil1337.github.io/node-tls-client/interfaces/SessionOptions.html SessionOptions} for more details on session options.\r\n */\r\n\r\n(async () => {\r\n  await initTLS();\r\n\r\n  const session = new Session({\r\n    ja3string:\r\n      \"771,2570-4865-4866-4867-49195-49199-49196-49200-52393-52392-49171-49172-156-157-47-53,2570-0-23-65281-10-11-35-16-5-13-18-51-45-43-27-17513-2570-21,2570-29-23-24,0\",\r\n    h2Settings: {\r\n      HEADER_TABLE_SIZE: 65536,\r\n      MAX_CONCURRENT_STREAMS: 1000,\r\n      INITIAL_WINDOW_SIZE: 6291456,\r\n      MAX_HEADER_LIST_SIZE: 262144,\r\n    },\r\n    h2SettingsOrder: [\r\n      \"HEADER_TABLE_SIZE\",\r\n      \"MAX_CONCURRENT_STREAMS\",\r\n      \"INITIAL_WINDOW_SIZE\",\r\n      \"MAX_HEADER_LIST_SIZE\",\r\n    ],\r\n    supportedSignatureAlgorithms: [\r\n      \"ECDSAWithP256AndSHA256\",\r\n      \"PSSWithSHA256\",\r\n      \"PKCS1WithSHA256\",\r\n      \"ECDSAWithP384AndSHA384\",\r\n      \"PSSWithSHA384\",\r\n      \"PKCS1WithSHA384\",\r\n      \"PSSWithSHA512\",\r\n      \"PKCS1WithSHA512\",\r\n    ],\r\n    alpnProtocols: [\"h2\", \"http/1.1\"],\r\n    alpsProtocols: [\"h2\"],\r\n    supportedVersions: [\"GREASE\", \"1.3\", \"1.2\"],\r\n    keyShareCurves: [\"GREASE\", \"X25519\"],\r\n    certCompressionAlgo: \"brotli\",\r\n    pseudoHeaderOrder: [\":method\", \":authority\", \":scheme\", \":path\"],\r\n    connectionFlow: 15663105,\r\n    headerOrder: [\"accept\", \"user-agent\", \"accept-encoding\", \"accept-language\"],\r\n    priorityFrames: [\r\n      {\r\n        streamID: 1,\r\n        priorityParam: {\r\n          streamDep: 1,\r\n          exclusive: true,\r\n          weight: 1,\r\n        },\r\n      },\r\n    ],\r\n    headerPriority: {\r\n      streamDep: 1,\r\n      exclusive: true,\r\n      weight: 1,\r\n    },\r\n    headers: {\r\n      accept:\r\n        \"application/json,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\",\r\n      \"user-agent\":\r\n        \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36\",\r\n      \"accept-encoding\": \"gzip, deflate, br\",\r\n      \"accept-language\": \"de-DE,de;q=0.9,en-US;q=0.8,en;q=0.7\",\r\n    },\r\n  });\r\n\r\n  const response = await session.get(\"http://localhost:3000/\");\r\n  console.log(response.status, await response.text());\r\n  await session.close();\r\n\r\n  await destroyTLS();\r\n})();\r\n```\r\n\r\n## More examples\r\n```javascript\r\nconst { Session, ClientIdentifier, initTLS, destroyTLS } = require(\"node-tls-client\");\r\n\r\n(async () => {\r\n  await initTLS();\r\n\r\n  const session = new Session({\r\n    clientIdentifier: ClientIdentifier.chrome_120, //client identifier\r\n    timeout: 30 * 1000, //timeout in *milliseconds*, applies for each requests, checkout examples/timeout.js for using different timeouts.\r\n    insecureSkipVerify: false,\r\n  });\r\n    \r\n  const response = await session.get(\"https://example.com\", {\r\n    proxy: `http://user:pass@ip:port`, //proxy format: http://user:pass@ip:port or http://ip:port\r\n    cookies: { parameter: \"value\" }, //cookies\r\n    followRedirects: true, //follow redirected urls\r\n    headers: { authorization: \"test\" }, //request headers\r\n  });\r\n\r\n  console.log(response.status);\r\n\r\n  await session.close();\r\n  await destroyTLS();\r\n})();\r\n  //more details: https://sahil1337.github.io/node-tls-client/hierarchy.html#BaseRequestOptions\r\n```\r\n\r\n## Session\r\n\r\n<div id=\"session-options\">\r\n\r\n## Session Options\r\n\r\n| Property                       | Type                                                                                                                                    | Description                                                            |\r\n| ------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------- |\r\n| `sessionId`                    | string                                                                                                                                  | A unique identifier for the session.                                   |\r\n| `headers`                      | IncomingHttpHeaders                                                                                                                     | An object containing custom headers to send with the request.          |\r\n| `proxy`                        | string                                                                                                                                  | A proxy server URL to use for the request. [format: 'http://user:pass@ip:port or http://ip:port']\r\n| `isRotatingProxy`                        | boolean                                                                                                                                  | Whether the proxy is of rotating type or not.                      |\r\n| `clientIdentifier`             | [ClientIdentifier](https://sahil1337.github.io/node-tls-client/enums/ClientIdentifier.html)                                                                                                                                  | A string identifier for the client, e.g., `\"chrome_120\"`.              |\r\n| `ja3string`                    | string                                                                                                                                  | A string representing JA3 fingerprinting configuration.                |\r\n| `h2Settings`                   | [h2Settings](https://sahil1337.github.io/node-tls-client/interfaces/H2Settings.html)[]                                       | An object specifying HTTP/2 settings.                                  |\r\n| `h2SettingsOrder`              | [h2Settings](https://sahil1337.github.io/node-tls-client/interfaces/H2Settings.html)[]                                       | An array specifying the order of HTTP/2 settings.                      |\r\n| `supportedSignatureAlgorithms` | [supportedSignatureAlgorithms](https://sahil1337.github.io/node-tls-client/types/SupportedSignatureAlgorithms.html)[] | An array of supported signature algorithms.                            |\r\n| `supportedVersions`            | [supportedVersions](https://sahil1337.github.io/node-tls-client/types/SupportedVersions.html)[]                        | An array of supported TLS versions.                                    |\r\n| `keyShareCurves`               | [keyShareCurves](https://sahil1337.github.io/node-tls-client/types/KeyShareCurves.html)[]                               | An array of key share curves.                                          |\r\n| `certCompressionAlgo`          | [certCompressionAlgo](https://sahil1337.github.io/node-tls-client/types/CertCompressionAlgo.html)                  | A certificate compression algorithm, e.g., `\"brotli\"`.                 |\r\n| `pseudoHeaderOrder`            | [pseudoHeaderOrder](https://sahil1337.github.io/node-tls-client/types/PseudoHeaderOrder.html)[]                                                                                                                     | An array specifying the order of pseudo-headers.                       |\r\n| `connectionFlow`               | number                                                                                                                                  | A number specifying the connection flow control window size.           |\r\n| `priorityFrames`               | [priorityFrame](https://sahil1337.github.io/node-tls-client/interfaces/PriorityFrames.html)[]                                | An array of priority frames to send with the request.                  |\r\n| `headerOrder`                  | string[]                                                                                                                                | An array specifying the order of headers.                              |\r\n| `alpnProtocols`                | string[]                                                                                                                                | An array of Application-Layer Protocol Negotiation (ALPN) protocols.   |\r\n| `alpsProtocols`                | string[]                                                                                                                                | An array of Application Layer Protocol Settings (ALPS) protocols.      |\r\n| `headerPriority`               | [priorityParam](https://sahil1337.github.io/node-tls-client/interfaces/PriorityParam.html)                                   | An object specifying header priority parameters.                       |\r\n| `randomTlsExtensionOrder`      | boolean                                                                                                                                 | A boolean indicating whether to use a random order for TLS extensions. |\r\n| `forceHttp1`                   | boolean                                                                                                                                 | A boolean indicating whether to force the use of HTTP/1.1.             |\r\n| `debug`                        | boolean                                                                                                                                 | A boolean indicating whether to enable debug mode.                     |\r\n| `insecureSkipVerify`           | boolean                                                                                                                                 | A boolean indicating whether to skip SSL certificate verification.     |\r\n\r\n</div>\r\n\r\n<div id=\"session-methods\">\r\n\r\n## Session methods\r\n\r\n| Method                                          | Description                                                                                       |\r\n| ----------------------------------------------- | ------------------------------------------------------------------------------------------------- |\r\n| `get(url: string, options: RequestOptions)`     | Sends a GET request to the specified URL and returns the response.                                |\r\n| `put(url: string, options: RequestOptions)`     | Sends a PUT request to the specified URL with the provided options and returns the response.      |\r\n| `delete(url: string, options: RequestOptions)`  | Sends a DELETE request to the specified URL with the provided options and returns the response.   |\r\n| `options(url: string, options: RequestOptions)` | Sends an OPTIONS request to the specified URL with the provided options and returns the response. |\r\n| `head(url: string, options: RequestOptions)`    | Sends a HEAD request to the specified URL with the provided options and returns the response.     |\r\n| `post(url: string, options: RequestOptions)`    | Sends a POST request to the specified URL with the provided options and returns the response.     |\r\n| `patch(url: string, options: RequestOptions)`   | Sends a PATCH request to the specified URL with the provided options and returns the response.    |\r\n| `close()`                                       | Closes the session.                                                                               |\r\n| `cookies()`                                       | Returns an promise that resolves with an object containing the session cookies.                                                 |\r\n\r\n<div id=\"request\">\r\n\r\n## Request Options\r\n\r\n| Parameter            | Description                                                                                     |\r\n| -------------------- | ----------------------------------------------------------------------------------------------- |\r\n| `body`               | The body of the request, if applicable. This can be a string, a buffer, or an object.           |\r\n| `headers`            | An object containing the request headers.                                                       |\r\n| `followRedirects`           | A boolean value indicating whether to follow redirects.                                         |\r\n| `additionalDecode`   | A boolean value indicating whether to perform additional decoding of the response content.      |\r\n| `proxy`              | The URL of the proxy server to be used for the request. [format: 'http://user:pass@ip:port or http://ip:port']                                                                                                                |\r\n| `isRotatingProxy`                        |  Whether the proxy is of rotating type or not.                      |\r\n| `cookies`            | An object containing cookies to be sent with the request.                                       |\r\n\r\n</div>\r\n\r\n<div id=\"response\">\r\n\r\n## Response\r\n\r\n| Properties | Description                                                                                                                                                                                       |\r\n| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\r\n| `ok`       | This boolean value indicates whether the request was successful or not. It returns \"true\" if the response status is within the range 200-299, indicating success. Otherwise, it returns \"false\".` |\r\n| `headers`  | This object contains the response headers returned by the server.                                                                                                                                 |\r\n| `status`   | This integer represents the HTTP status code of the response.                                                                                                                                     |\r\n| `url`      | This is the URL to which the request was made.                                                                                                                                                    |\r\n| `cookies`   | Returns an object containing the cookies for that URL.    \r\n\r\n| Methods     | Description                                                                          |\r\n| ----------- | ------------------------------------------------------------------------------------ |\r\n| `text()`    | Returns a promise that resolves with the response body as plain text.                                            |\r\n| `json()`    | Returns a promise that resolves with the response body parsed as JSON.                                           |\r\n\r\n</div>\r\n\r\n\r\n\r\n## Acknowledgements\r\nThis library is based on [bogdanfinn's](https://github.com/bogdanfinn) tls client in golang. A big thanks to him.\r\n","readmeFilename":"readme.md"}