Warning
This version contains breaking changes.
- TLS Client Initialization Requirement
The new methodinitTLS()must be called before using any session methods.
You must also calldestroyTLS()when the session is no longer needed. - Refactor Cookies API
<session>.cookiesis no longer a synchronous getter.
It now returns aPromisethat resolves to a cookie object.
Usage: session-cookies.md - Redirect Handling Change
Theredirectoption inrequestOptionsis no longer supported. UsefollowRedirectsinstead.
-
Node.js Compatibility Fix
Theprocess.clearLine()bug has been resolved. Fixed issues #2 , #3 , #6 -
Shared Worker Pool (Performance Improvement)
A centralized shared worker pool has been introduced, leading to major performance gains across concurrent TLS sessions.Proof of concept:
-
New:
transportOptionsin SessionOptions
IntroducedtransportOptionsto customize low-level transport configuration.
Docs → transportOptions -
Additional Session Options Introduced
The following options provide extended control over stream output:serverNameOverwritestreamOutputBlockSizestreamOutputEOFSymbolstreamOutputPath
Docs → SessionOptions
-
Enhanced Documentation
Executable compatibility instructions and examples have been added to the documentation. Instructions -
Refactor byteRequest handling Taking into account the
Content-EncodingandContent-Transfer-Encodingheaders to determine if the response is a byte response. Accounting for pull request #8
Warning
This version contains breaking changes.
- Call
<session>.init()after setting up a session and before using any HTTP methods. (See the documentation for more details.) - Resolved memory leak issues by moving to workerpool.
- Added new profiles:
chrome_131,chrome_131_psk,firefox_132,firefox_133, andios_safari_18. The default profile is nowchrome_131(previouslychrome_124). - Introduced the
isRotatingProxyoption for handling rotating proxies. PS: SessionOptions
Important
This version includes significant updates and improvements.
response.cookiesis now a property instead of a method. [Note:response.cookies()has been removed and replaced withresponse.cookies.]
- Added
session.cookiesproperty to retrieve all session cookies. For detailed information, see examples/session-cookies.md. - Added
byteResponseoption in requestOptions. Setting this to true ensures that the response is treated as a byte response. For detailed information, see examples/images.js - Added functionality to send binary data. Note: Ensure that the appropriate headers are set before sending binary data in the body.
- Added
disableIPV6anddisableIPV4options inSessionOptions. For detailed information, see SessionOptions - Added
hostOverrideproperty in requestOptions. Used to override the Host header, typically needed when making requests directly to an IP address. chrome_124profile will be used when noclient_identifieris specified in session options.- Refactored cookies.ts and session typings for improved readability (internal change, no impact on existing use cases)
- Updated TlsResponse according to new changes.
Warning
This version contains breaking changes.
response.json()andresponse.text()methods now return aPromise.response.cookies()now returns an object of cookies instead of aPromise.session.methodsno longer include thetimeoutandrejectUnauthorizedoptions. Since timeout cannot be changed during a session, ensure to specifytimeout&rejectUnauthorizedin SessionOptions when creating a session.
fetch(fetchOptions)method have been added to use different timeouts & rejectUnauthorized values in each request. [examples/timeout.js] for more information.
- Fixed a typo that prevented timeout from working correctly.
- Introduced client profile types.
- Enhanced documentation for improved clarity and usability.
- Updated the README with minor adjustments.
- Refined interface definitions for better readability and understanding.
- Implemented dynamic methods for downloading shared files in "node-tls-client", eliminating the inclusion of prebuilt files.
- Path used for storing the shared library files is strictly set to tmpdir path.
- Reduces package size.
- Ensures better support for executables.
- Improved handling of shared library files:
- Only the shared library file matching the current operating system is preserved. All other shared library files are deleted.
- Added support for executables.
