help icon indicating copy to clipboard operation
help copied to clipboard

How to disable SNI for HTTPS requests?

Open sboys3 opened this issue 9 years ago • 3 comments

  • Node.js Version:6.9.5
  • OS: windows
  • Scope (install, code, runtime, meta, other?):code
  • Module (and version) (if relevant):https

How can I disable the SNI(Server Name Indication) TLS extension for https.request ?

sboys3 avatar Oct 19 '17 00:10 sboys3

Perhaps if you pass a custom .createConnection function to https.request() that calls tls.connect() without setting the .servername property.

Untested though, and why would you want to disable it in the first place?

bnoordhuis avatar Oct 19 '17 10:10 bnoordhuis

I agree with @bnoordhuis querying the motivation, however, there may still be an increasingly small proportion of cases remaining where SNI does impose a limitation interacting with old browsers and legacy OSes/mobile (IoT?) devices.

Apart from the approach suggested above, you might still consider the continuing validity of options in an old thread such as this and the sufficiency, or otherwise of process.features.tls_sn = false?

shellberg avatar Oct 19 '17 11:10 shellberg

Using a custom .createConnection without the servername property can disable SNI.

sboys3 avatar Oct 20 '17 00:10 sboys3