Skip to content

Commit

Permalink
fix: SNI disabled with tls+ssh
Browse files Browse the repository at this point in the history
Fix a bug in the ssh base client where not specifying the tlsServerName (as is the default) caused SNI to be disabled
  • Loading branch information
Roy Razon committed Feb 12, 2024
1 parent 66c0be3 commit ed206b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/common/src/ssh/base-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const connectTls = (
{ hostname: host, port, tlsServerName, insecureSkipVerify }: Pick<SshTlsConnectionConfig, 'hostname' | 'port' | 'tlsServerName' | 'insecureSkipVerify'>
) => new Promise<TLSSocket>((resolve, reject) => {
const socket: TLSSocket = tls.connect({
servername: tlsServerName,
servername: tlsServerName ?? host, // setting the servername to undefined will disable SNI
rejectUnauthorized: !insecureSkipVerify,
ALPNProtocols: ['ssh'],
host,
Expand Down

0 comments on commit ed206b9

Please sign in to comment.