In `ClientParams`, `ssl` should be optional, or boolean as a shortcut. All `SSLConnectionParams` fields should be optional as supported by `tls.connect()` ```typescript export interface SSLConnectionParams { key?: string cert?: string ca?: string rejectUnauthorized?: boolean } ``` Pseudocode for the socket creation: ```typescript private createSocket() { const socket = this.params.ssl ? tls.connect(this.params.port, this.params.hostname, typeof this.params.ssl === Boolean ? {} : this.params.ssl) : new Socket().connect(this.params.port, this.params.hostname) if (this.params.socketTimeout) socket.setTimeout(this.params.socketTimeout) return socket } ``` This will also address https://github.com/coders51/rabbitmq-stream-js-client/issues/254