magic-wormhole.rs
magic-wormhole.rs copied to clipboard
async-tungstenite: Make TLS features optional
The included TLS features are only required for wss connections to the mailbox server which not required by the protocol and only really useful for wasm builds.
Closes #216
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 39.24%. Comparing base (
6082d8b
) to head (7366377
).
Additional details and impacted files
@@ Coverage Diff @@
## master #222 +/- ##
=======================================
Coverage 39.24% 39.24%
=======================================
Files 18 18
Lines 3088 3088
=======================================
Hits 1212 1212
Misses 1876 1876
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Either way we need a way to select the backend here. I would personally choose native TLS for example, to get rid of rustls and ring. I can make it a default feature instead.
wss support doesn't really give us much though, does it? What advantage do we have from connecting to a server via wss? From what I gathered the reason for wss support is mostly due to wasm requirements?
wss support doesn't really give us much though, does it?
Not really, it's already end-to-end encrypted in the protocol itself (and authenticated).
I believe at least part of the point of the default server being TCP-only is to prove this point (although I've not seen this written down anywhere by Brian).
I'll leave it out of default features for now. Cargo doesn't support target-specific default features so we can't auto-enable it on wasm either (wasm being the only place where it makes sense to both enable it by default, and native tls doesn't exist)
Yes, typically WASM will require wss://