psanford / wormhole-william

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

add websocket support to transit relay client #49

Closed bryanchriswhite closed 2 years ago

bryanchriswhite commented 3 years ago

Our team intends to use this as our project's client library in the browser via a WASM wrapper. This PR adds support for websocket transport for 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).

The the transit relay hasn't canonically supported a browser compatible transport. We have implemented such a ws relay transport here and this PR updates the client accordingly.

psanford commented 3 years ago

Are you planning on opening a PR in the magic wormhole protocols repo to get this transport officially supported? https://github.com/magic-wormhole/magic-wormhole-protocols

bryanchriswhite commented 3 years ago

Yes we are, we have been in touch with the original author and our team now has access to the official magic-wormhole org.

bryanchriswhite commented 3 years ago

@psanford thanks for the feedback, and my apologies for the delay on my end. I'll be getting back to this beginning next week.

bryanchriswhite commented 3 years ago

@psanford We added deprecation warnings to the old fields as suggested.

Regarding the wormhole-protocols repo, File Tansfers -> Future Extensions mentions WebSockets. Is there some specific change you'd like to see in that repo?

bryanchriswhite commented 3 years ago

I would like to see some consensus on the protocol addition with the broader Magic Wormhole community in: https://github.com/magic-wormhole/magic-wormhole-protocols

We've opened this PR to document the transit relay protocol changes.

Jacalz commented 2 years ago

Was this intended to be closed? This is something that would have been great to see merged.

piegamesde commented 2 years ago

I'd like to take the opportunity to point to https://github.com/magic-wormhole/magic-wormhole-protocols/pull/16 for encoding the new transit hints. Feedback welcome.

bryanchriswhite commented 2 years ago

Was this intended to be closed? This is something that would have been great to see merged.

@Jacalz yes, we're re-organizing our fork, including merging upstream changes. I'll re-open this after we've sorted out our fork, perhaps it will get some more attention then.

bryanchriswhite commented 2 years ago

Reorganized and re-opened as https://github.com/psanford/wormhole-william/pull/63