Live data from Hacker News

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

github.com

121–130 of 262 posts

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

#121

Earlier quoted context omitted.

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

You cant make a p2p connection over a NAT without exposing a port on the public side of the NAT.

You aren't guaranteed to be able to do that but in practice most times you can.

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

#122

I wasn't yet planning for it, but what the heck. https://zynk.it is a new project I've been working on together with a small team aimed at delivering a truly easy, fast, efficient, unlimited, privacy-respecting and pain free file-sharing experience. It’s peer-to-peer, E2EE and avoids centralized storage, aligning with the ethos of control and transparency we often discuss here. It allows users to send and receive any…

hrmph...

Form no work on FF.

Form only Works on chrome - but just gives me signup: https://i.imgur.com/ePcBVBE.png

Page has zero meat to the info...

No screenshots, all cartoons. No talk of price/model/package/install/ etc...

No confirmation email with info...

Nice blurb - but needs work.

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

#123

Earlier quoted context omitted.

The wormhole transit protocol will attempt to arrange a direct connection and avoid transferring data through the relay.

Is there a switch to fail rather than fall back on relay?

Not really.. the closest approximation would be if both sides set their `--transit-helper` to an unusable port like `tcp:localhost:9`. That would effectively remove the relay helpers from the negotiation list, leaving just the direct connection hints.

But you can't currently force that from one side: if you do that, but the other side doesn't override it too, then you'll both include their relay hint in the list.

Note that using the relay doesn't affect the security of the transfer: there's nothing the relay can do to violate your confidentiality (learn what you're sending) or integrity (cause you to receive something other than what the sender intended). The worst the relay can do is to prevent your transfer from happening entirely, or make it go slowly.

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

#125

Earlier quoted context omitted.

Yes, it relies on two servers, both of which I run. All connections use the "mailbox server", to exchange short messages, which are used to do the cryptographic negotiation, and then trade instructions like "I want to send you a file, please tell me what IP addresses to try". Then, to send the bulk data, if the two sides can't establish a direct connection, they fall back to the "transit relay helper" server. You onl…

Can you turn the magic wormhole into an API for receiving a JSON payload directly into your magic wormhole ontop of whatever youre running in a fastAPI to route that incoming wormhole listener?

There's a `wormhole send --text BLOB`, which doesn't bother with a bulk-data "transit" connection, and just drops a chunk of text on the receiving side's stdout.

You can also import the wormhole library directly and use its API to run whatever protocol you want. That mode uses the same kinds of codes as the file-sending tool, but with a different "application ID" so they aren't competing for the same short code numbers. https://github.com/magic-wormhole/magic-wormhole/blob/master... has details.

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

#126

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 end up using a combination of scp, LocalSend, magic wormhole and sharedrop.io. Occasionally `python -m http.server` in a pinch for local downloads. It's unfortunate that this xkcd comic is still as relevant as it was in 2011: https://xkcd.com/949/

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

#127

author here.. happy to answer any questions!

I use wormhole a lot, but I've been too lazy to figure out if it's as secure as ssh/scp, so I always gpg the file I'm transferring before putting it into wormhole.

Is that paranoid behavior?

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

#128

Earlier quoted context omitted.

I've used https://file.pizza a bunch before, only because of the memorable name

It was useless for large files when I tried it, at least on Firefox. It seemed to be trying to pull the entire file into RAM.

As someone who's been working on a file upload service for a while, this is the only real way to download very large files on Firefox.

The file system access API is a great way to write chunks of a file at a gime, but for now Firefox doesn't support it

https://wicg.github.io/file-system-access/ https://mozilla.github.io/standards-positions/#native-file-s...

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

#129

Earlier quoted context omitted.

scp/rsync are great tools, but they require pre-coordination of keys. One side is the client, the other is the server. The client needs an account on the server machine (so the human on the client machine must provide an ssh pubkey to the human on the server machine, who must be root, and create a new account with `adduser`, and populate the ~/.ssh/authorized_keys file). And the client needs to know the server's corr…

But if you already have ssh set up for the target machine, is there any advantage such as speed or recoverability vs scp?

Mostly no. ssh/rsync is compiled C code, so might be slightly faster than a Python-based `wormhole`, if you have a really fast connection to take advantage of. And rsync provides that lovely continue-from-interrupted-transfer feature that magic-wormhole currently lacks.

But wormhole has turned out to be more usable in some cases. I've had days where I'm sshed into a bastion host, then sshed from there into a server, then cd'd into a deep directory with lots of spaces and quotes and shell metacharacters in the path, and then found a file that I wanted to copy out. To do that with ssh, I have to first configure ProxyJump to let me reach the internal machine with a single ssh command, and then figure out how to escape the pathname correctly (which somehow never works for me). With `wormhole send` I get to skip all of that, at the cost of having to do it once per file.

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

#130
post #35

Earlier quoted context omitted.

And then we'll have 11.

Pretty sure that was the intended joke, as many people came across the XKCD [1] already. [1] https://xkcd.com/927/

not to mention https://xkcd.com/949 which inspired many and more of these
Post reply on HN