psanford / wormhole-william

End-to-end encrypted file transfer. A magic wormhole CLI and API in Go (golang).
MIT License
1.07k stars 54 forks source link

Add websocket transport to transit relay #63

Closed bryanchriswhite closed 1 year ago

bryanchriswhite commented 2 years ago

Our team has been using wormhole-william as our project's client library in the browser via a WASM wrapper. This PR adds support for websocket transport to the transit relay. The transit relay needs to use a transport that is compatible with browser environments. Websockets seem to be the obvious solution here; foregoing any webrtc-based approaches (which we're not interested in pursuing right now).

piegamesde commented 2 years ago

For compatibility, I'd like to keep implementations in sync with the specification. At the moment, the latest draft spec for this is https://github.com/magic-wormhole/magic-wormhole-protocols/pull/16. I implemented the client part in the Rust client and am rather satisfied, but feel free to propose changes or alternatives that better match what you have in mind. I think everything except the new hints encoding should be rather uncontroversial.

Jacalz commented 2 years ago

I'll try to review this as soon as I can. Wasm support in Fyne is nearing completion, so I'll want to try and get wormhole-gui running there as soon as possible.

Jacalz commented 2 years ago

I think it would be good if the changes weren't force-pushed every time. It makes it very hard to see changes between commits (if not impossible).

piegamesde commented 2 years ago

I had to rebase onto latest master in order to get some of the bug fixes for testing. For force pushes that are just amends and no rebases, you can click on the "force-pushed" in the GitHub UI to get the difference between both commits.