The options bag accepted by WebSocketStream should be extended to accept a Deno.HttpClient object. This would enable trusting specific TLS server certificates, and also Mutual TLS / Client Certificate support. There's also a proxy field in Deno.CreateHttpClientOptions which presumably also applies to WebSockets.
For context, both APIs here are currently unstable in Deno. The upstream WebSocketStream spec does not allow for customizing TLS as it is intended for a web browser context, like fetch.
The options bag accepted by
WebSocketStream
should be extended to accept aDeno.HttpClient
object. This would enable trusting specific TLS server certificates, and also Mutual TLS / Client Certificate support. There's also a proxy field inDeno.CreateHttpClientOptions
which presumably also applies to WebSockets.For context, both APIs here are currently unstable in Deno. The upstream
WebSocketStream
spec does not allow for customizing TLS as it is intended for a web browser context, likefetch
.Brief example code: