LeastAuthority / Transfer

File transfer app that uses the magic wormhole protocol
MIT License
11 stars 3 forks source link

Interoperability with magic-wormhole commandline clients #32

Open vu3rdd opened 3 years ago

vu3rdd commented 3 years ago

The web client should interoperate with command line Go client as well as with python client via the websocket relay server.

A few possibilities:

  1. Go: cmdline client to cmdline client, both talking via relay server TCP port.
  2. Go: cmdline client to cmdline client, both talking via relay server websocket port.
  3. Go: cmdline client to cmdline client, one talking to tcp port of the relay server, other talking to websocket port.
  4. Browser client to Go cmdline client, browser connected to websocket port of relay server and cmdline client connected to tcp port.
  5. Browser client to Go cmdline client, browser connected to websocket port of relay server and cmdline client connected to websocket port. (browser sending, cmdline client receiving and vice versa)
  6. All the above with Python command line client instead of the Go commandline client.
meejah commented 3 years ago

As I understand it, the current difficulties are around the hints? That is, this will only ever hint at "websocket to a relay" and the {Python,Go} clients don't know that they can do "tcp to the same relay" to make the connection...?

vu3rdd commented 3 years ago

The Go client built from https://github.com/LeastAuthority/wormhole-william/pull/20 works fine with web client.

vu3rdd commented 3 years ago

I implemented some very minimal parsing of websocket urls etc on the python client. It does not yet support connecting to a websocket based relay, but if the relay server is listening on both tcp and websocket ports, then python client is able to connect to it via TCP while the other side connects to it via websocket, do handshakes and transfer the file.