Live data from Hacker News

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

github.com

231–240 of 262 posts

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

#232
post #231

What ever happened with just setting up ssh or sftp?

"I don't get why people use syncthing, can't they use bluetooth file transfer and USB cables like us oldschool peeps?"

read the doc.

SSH requires previous arrangement (you need to transfer the SSH key to your friend), magic wormhole is a way to arrange such a meeting without physical proximity.

or requires typing a password into a phone.

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

#233
post #91

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-…

> 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. The lack of improvement in these tools is pretty devastating. There was a flurry of activity around PAKEs like 6 years ago now, but we're still missing: * reliable hole punching so you don't need a slow relay server * multiple simultaneous TCP streams (or a carefu…

As a protocol tcp should be able to utilize a long fat pipe with a large enough receive window. You might want to check what window scaling factor is used and look for a tunable. I accept that some implementations may have limits beyond the protocol level. And even low levels of packet loss can severely affect throughput of a single stream.

A bigger reason you want multiple streams is because most network providers use a stream identifier like the 5-tuple hash to spread traffic, and support single-stream bandwidth much lower than whatever aggregate they may advertise.

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

#234
post #82

Earlier quoted context omitted.

Syncthing also does relaying like that, NAT traversal, bridges, etc. all automatically. If it can, it will use local IP connections and go blazing fast. If for some reason your network configuration(s) don't allow for any valid connections, it will use a relay or bridge - either a default or one you setup - and work relatively fast as well.

"Connectivity" here needs to be taken at large: syncthing needs to have a folder already shared between two machines. There's some setup involved that is not automatic. The entire setup phase of magic wormhole is "copy those 3 words" and boom you're done.

I think a lot of people talking about Synchthing must have used it in a different way in the past. It has a QR code now that encodes that 16-digit number or whatever that is used for the same purposes of key exchange and initial handshaking.

I use it with my wifes phone to transfer files between her drawing tablet and her Linux system she uses for Blender every day.

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

#235

author here.. happy to answer any questions!

Hi, i have indeed some questions!

* is there an app for it? where i can share the password via qrcode? for when the data is to big for qrcodes? * what do you plan on doing regarding quantum computation? switching to some pqsafe cryptography, also to be safe before save-now-decrypt-later-attack? * is it possible to extend your protocol over more generic proxies like turn servers?

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

#236
post #163

Is it better or more appropriate than rsync in certain use cases?

Better than rsync (over SSH):

  - You do not need an existing trust relationship (or trust on first use)
  - Easier to punch holes through NAT/firewalls
  - Easier for non-technical users
Worse than rsync (over SSH):

  - Multi-file support is poor (basically it .zips up everything before even starting to transfer)
  - Zero support for incremental transfers
  - Cannot reuse existing trust relationships (and thus cannot be used non-interactively)
  - Easier DoSed
  - 1/65536 chance of connection being hijacked (by default)
  - Higher CPU usage

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

#237
If you already have node and npm installed, and are happy running random binaries from the internet, you can `npx magic-wormhole` to run this without any further setup. It just wraps wormhole-william, which is the go implementation of magic-wormhole.

I put it on npm primarily so I could send things to other JS developers an absolute minimum of fuss: one command, total, instead of installing a tool and then running the command.

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

#238

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-…

I just read this out in your voice

Heh and I was able to do some of that work in service of the dumb but fun test of Internet vs Pigeon data transfer speeds.

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

#239
post #91

Earlier quoted context omitted.

> 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. The lack of improvement in these tools is pretty devastating. There was a flurry of activity around PAKEs like 6 years ago now, but we're still missing: * reliable hole punching so you don't need a slow relay server * multiple simultaneous TCP streams (or a carefu…

As a protocol tcp should be able to utilize a long fat pipe with a large enough receive window. You might want to check what window scaling factor is used and look for a tunable. I accept that some implementations may have limits beyond the protocol level. And even low levels of packet loss can severely affect throughput of a single stream. A bigger reason you want multiple streams is because most network providers u…

> with a large enough receive window

Yeah, that's the issue. I didn't have root permissions on either side. Moreover, a transfer tool should just work without requiring its users to have expert knowledge like this.

In this case, I checked the roundtrip ping time and multiplied it by the buffer size, and it agreed with the speeds I was seeing within ~5%, so it was not an issue with throttling. Actually, if I were a network provider interested in doing this, I would throttle on the 2-tuple as well.

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

#240

Earlier quoted context omitted.

^ found the astronomer

I (Electrical + Software Engineer) once worked for a physicist who believed that anything less than an order of magnitude was merely an engineering problem. He was usually correct.

An order of magnitude isn't a defined quantity, it depends on what base you're working in.
Post reply on HN