Live data from Hacker News

Magic Wormhole: get things from one computer to another, safely

github.com

61–70 of 262 posts

Re: Magic Wormhole: get things from one computer to another, safely

#61
post #33

Earlier quoted context omitted.

That is something I want to know too. Do these various "wormhole" apps use any common protocol between them or do they just all use the same words and branding for different things?

Magic Wormhole is the first, and is its own thing. It's called "Magic" Wormhole for a reason: it tends to blow people away the first time they use it. So lots of people have copied the UX, and some of them have copied the name as well. What you should use is Magic Wormhole itself, or, if you want a non-Python runtime for some reason, wormhole-william.

Do they share any underlying protocol standard or something?

Re: Magic Wormhole: get things from one computer to another, safely

#63

I realize this is a dumb question, but what's a good way to do this between an iPhone and a MacBook? Airdrop is disabled (by policy), iCloud storage is full (because I'm lazy), and I use syncthing on every other device, but I haven't found a client I can use on my work iPhone.

I've been using sharedrop.io which also is open-source [1] and it works quite nice, I particularly like this one because I don't have to install any third-party app on any of the devices.

I think on mac Safari usually doesn't work as well as in Chrome, but I've been able to transfer from Windows to iOS, Windows to macOS and macOS to iOS without installing a thing.

[1] https://github.com/szimek/sharedrop

Re: Magic Wormhole: get things from one computer to another, safely

#64

I've used this for years when passing large files between systems in weird network environments, it's almost always flawless. For some more exotic testing, I was able to run my own magic wormhole relay[1], which let me tweak some things for faster/more reliable huge file copies. I still hate how often Google Drive will fall over when you throw a 10s-of-GB file at it. [1] https://www.jeffgeerling.com/blog/2023/my-own-…

> you need a machine that can handle whatever link speeds you need

I would have expected the relay server only being used for initial handshake to punch through NAT, after which the transfer is P2P. Only in the case of some network restrictions the data really flows through the relay. How could they afford running the free relay otherwise?

Re: Magic Wormhole: get things from one computer to another, safely

#65

I've used this for years when passing large files between systems in weird network environments, it's almost always flawless. For some more exotic testing, I was able to run my own magic wormhole relay[1], which let me tweak some things for faster/more reliable huge file copies. I still hate how often Google Drive will fall over when you throw a 10s-of-GB file at it. [1] https://www.jeffgeerling.com/blog/2023/my-own-…

> you need a machine that can handle whatever link speeds you need I would have expected the relay server only being used for initial handshake to punch through NAT, after which the transfer is P2P. Only in the case of some network restrictions the data really flows through the relay. How could they afford running the free relay otherwise?

There are two servers. The "mailbox server" helps with handshakes and metadata transfers, and is super-low bandwidth, a few hundred bytes per connection. The "transit relay helper" is the one that handles the bulk data transfer iff the two sides were unable to establish a direct connection.

I've been meaning to find the time to add NAT-hole-punching for years, but haven't managed it yet. We'd use the mailbox server messages to help the two sides learn about the IP addresses to use. That would increase the percentage of transfers that avoid the relay, but the last I read, something like 20% of peer-pairs would still need the relay, because their NATs are too restrictive.

The relay usage hasn't been expensive enough to worry about, but if it gets more popular, that might change.

Re: Magic Wormhole: get things from one computer to another, safely

#67

I've used wormhole once to move a 70 GB file. Couldn't possibly do that before. And yes, I know I used the bandwidth of the relay server, I donated to Debian immediately afterwards (they run the relay for the version in the apt package).

It took this far down in the comments to get to some inkling of the meat of this.

It relys on some singular or small set of donated servers?

NAT NAT traversal is obviously the biggest motivator, since otherwise you just scp or rsync or sftp if you don't have the dual barrier.

Is the relay server configurable? Seemed to be implied it is somewhat hardcoded.

Re: Magic Wormhole: get things from one computer to another, safely

#68
I wonder if magic-wormhole could be implemented as a layer on top of Syncthing:

- Generate a short code

- Use the code as the seed to deterministically generate a Syncthing device key + config

Since the Syncthing device key could be generated deterministically, sharing the code with both sides would be enough to complete a dir/file transfer and then discard the keys.

Post reply on HN