rsocket / rsocket-rust

RSocket Rust Implementation using Tokio
Apache License 2.0
199 stars 20 forks source link

Websocket TLS Support (wss) #61

Closed hplewis closed 1 year ago

hplewis commented 1 year ago

Motivation

TLS is an important feature for a network library to support and required for nearly any real world use-case.

Desired solution

Add the native-tls feature for tokio-tungstenite and wrap any TcpStreams with MaybeTlsStream<TcpStream>.

Considered alternatives

None considered at the moment.

Additional context

I have a very simple proof-of-concept branch here, but it would need a bit more work before it's mergeable. I'm unsure how much time I'll have to get it cleaned up, but if I do, I'll submit it as a PR.

hplewis commented 1 year ago

The POC branch does seem to require a rework of the request + header modification system. It seems that the the more recommended way now is to use something like into_client_request() on a URL or the like and then modify headers from there.

jjeffcaii commented 1 year ago

Thanks for reporting. PR is always welcome. 😄

hplewis commented 1 year ago

PR: #62

It was actually a lot less work to make it PR-ready than anticipated.