-
-
Notifications
You must be signed in to change notification settings - Fork 34.8k
Closed
Labels
tlsIssues and PRs related to the tls subsystem.Issues and PRs related to the tls subsystem.
Description
Version
v18.6.0
Platform
Darwin AirdeAlexandre 21.5.0 Darwin Kernel Version 21.5.0: Tue Apr 26 21:08:22 PDT 2022; root:xnu-8020.121.3~4/RELEASE_X86_64 x86_64
Subsystem
No response
What steps will reproduce the bug?
Run this:
const https = require('https')
const server = https.createServer()
server.on('tlsClientError', (exception, tlsSocket) => {
console.log(tlsSocket.address())
console.log(tlsSocket.localAddress, tlsSocket.localPort)
console.log(tlsSocket.remoteAddress, tlsSocket.remoteFamily, tlsSocket.remotePort)
console.log('remoteAddress' in tlsSocket)
})
server.listen(1111)Trigger it:
curl https://127.0.0.1:1111
How often does it reproduce? Is there a required condition?
Always.
What is the expected behavior?
{ address: '::ffff:127.0.0.1', family: 'IPv6', port: 1111 }
::ffff:127.0.0.1 1111
::ffff:127.0.0.1 IPv6 62538
true
What do you see instead?
{}
undefined undefined
undefined undefined undefined
true
Additional information
Use case: Log who’s hitting my server with an incorrect Server Name Indication (SNI) or with no SNI. I don’t think there’s a non-hacky way to do so otherwise.
Also happens in v16.15.1.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
tlsIssues and PRs related to the tls subsystem.Issues and PRs related to the tls subsystem.