You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to set node-fetch with both a proxy and including TLS configurations to pass a limited ciphers list so the client won't negotiate with the default (long) list of ciphers.
I've set the proxy using 'proxy-agent' library, but it seemed the ciphers values and other TLS infromation was missing when trying using it (verified using Wireshark).
The only way I was able to achieve the expected result was by modifying the node-fetch code, however I was wondering if anyone can provide an alternate/existing solution.
@avshabavsha You'll need to adjust the tls.DEFAULT_CIPHERS and tls.DEFAULT_MIN_VERSION constants globally in your program. If you have control of the arguments passed to node, you can add --tls-cipher-list=TLS_AES_256_GCM_SHA384:ECDHE-RSA-AES256-GCM-SHA384 --tls-min-v1.2. If not, you can use the following bit of code:
Hello,
I'm trying to set node-fetch with both a proxy and including TLS configurations to pass a limited ciphers list so the client won't negotiate with the default (long) list of ciphers.
I've set the proxy using 'proxy-agent' library, but it seemed the ciphers values and other TLS infromation was missing when trying using it (verified using Wireshark).
The only way I was able to achieve the expected result was by modifying the node-fetch code, however I was wondering if anyone can provide an alternate/existing solution.
Example Code
Specs:
node-fetch version: 2.6.1
proxy-agent version: 4.0.0
node version: v12.18.3
Changes Done
In order to 'force' passing the ciphers to the low level code I've done the following change in the node-fetch library:
Code prior to change:
Code after change (for simplicity didn't add condition to check TLS params existence):
I basically take the values I've passed as part of the proxy agent object and pass them to be part of the newly created request options.
Thanks!
The text was updated successfully, but these errors were encountered: