Most active commenters
  • lotharrr(5)
  • freeopinion(4)
  • lysace(3)

←back to thread

816 points tosh | 38 comments | | HN request time: 0.619s | source | bottom
1. netsec_burn ◴[] No.41276529[source]
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).
replies(3): >>41276736 #>>41276769 #>>41277271 #
2. teruakohatu ◴[] No.41276736[source]
The wormhole transit protocol will attempt to arrange a direct connection and avoid transferring data through the relay.
replies(1): >>41278133 #
3. lotharrr ◴[] No.41276769[source]
(magic-wormhole author here)

Thanks for making a donation!

I run the relay server, but the Debian maintainer agreed to bake an alternate hostname into the packaged versions (a CNAME for the same address that the upstream git code uses), so we could change it easily if the cost ever got to be a burden. It hasn't been a problem so far, it moves 10-15 TB per month, but shares a bandwidth pool with other servers I'm renting anyways, so I've only ever had to pay an overage charge once. And TBH if someone made a donation to me, I'd just send it off to Debian anyways.

Every once in a while, somebody moves half a terabyte through it, and then I think I should either move to a slower-but-flat-rate provider, or implement some better rate-limiting code, or finally implement the protocol extension where clients state up front how much data they're going to transfer, and the server can say no. But so far it's never climbed the priority ranking high enough to take action on.

Thanks for using magic wormhole!

replies(4): >>41276923 #>>41276954 #>>41277403 #>>41281702 #
4. pyrolistical ◴[] No.41276923[source]
Seems like the only way to ensure wormhole to scale is to only to use relay server to setup direct connections.

I know this requires one of the ends to be able to open ports or whatever but that should be baked into the wormhole setup.

replies(1): >>41277879 #
5. password4321 ◴[] No.41276954[source]
> move to a slower-but-flat-rate provider

As I'm sure you're aware: https://www.scaleway.com/en/stardust-instances/ "up to 100Mbps" for $4/month

replies(3): >>41277059 #>>41277925 #>>41280603 #
6. lysace ◴[] No.41277059{3}[source]
32.4 TB for $4, or approximately 700 times cheaper than AWS. Neat.
replies(2): >>41277570 #>>41280408 #
7. AtlasBarfed ◴[] No.41277271[source]
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.

replies(2): >>41277716 #>>41282023 #
8. jancsika ◴[] No.41277403[source]
I remember at one point reading about webrtc and some kind of "introducer" server that would start the peer-to-peer connections between clients.

Does wormhole try something like that before acting as a relay?

replies(1): >>41277656 #
9. seinecle ◴[] No.41277570{4}[source]
Bare metal love
replies(1): >>41279100 #
10. lotharrr ◴[] No.41277656{3}[source]
Not yet. The "Dilation" protocol (which is about 80% implemented) is intended to support WebRTC as a transport layer. IIRC it requires a public server to tell you about your external IP address, but magic-wormhole already has a server that could play that role. Once a side learns its own address, it can send it to the peer (via the encrypted tunnel, through the relay server), and then the WebRTC hole-punching protocol tries to make connections to the peer's public address. When both sides do the same thing at the same time, sometimes you can get a direct connection through the NAT boxes.

We don't have that yet, but the two sides attempt direct connections first (to all the private addresses they can find, which will include a public address if they aren't behind NAT). They both wait a couple of seconds before trying the relay, and the first successful negotiation wins, so in most cases it will use a direct connection if at all possible.

11. lotharrr ◴[] No.41277716[source]
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 only need that one if both sides are behind NAT.

The client has addresses for both servers baked in, so everything works out-of-the-box, but you can override either one with CLI args or environment variables.

Both sides must use the same mailbox server. But they can use different transit relay helpers, since the helper's address just gets included in the "I want to send you a file" conversation. If I use `--transit-helper tcp:helperA.example.com:1234` and use use `--transit-helper tcp:helperB.example.com:1234`, then we'll both try all of:

* my public IP addresses * your public IP addresses * helperA (after a short delay) * helperB (after a short delay)

and the first one to negotiate successfully will get used.

> since otherwise you just scp or rsync or sftp if you don't have the dual barrier

True, but wormhole also means you don't have to set up pubkey ahead of time.

replies(2): >>41278437 #>>41300820 #
12. fullspectrumdev ◴[] No.41277879{3}[source]
Maybe hole punching or similar might be worth examining?
13. t0mas88 ◴[] No.41277925{3}[source]
Hetzner.de has 1 gbps unlimited or 10 gbps with a 20TB limit on their bare metal servers. And those can be bought very cheap if you don't need any special hardware.
14. bredren ◴[] No.41278133[source]
Is there a switch to fail rather than fall back on relay?
replies(1): >>41278629 #
15. samstave ◴[] No.41278437{3}[source]
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?
replies(2): >>41278642 #>>41279071 #
16. lotharrr ◴[] No.41278629{3}[source]
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.

17. lotharrr ◴[] No.41278642{4}[source]
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.

18. meejah ◴[] No.41279071{4}[source]
Yes.

A technique like this is used to do "invites" in Magic Folder, and also in Tahoe-LAFS. That is, they speak a custom protocol over just the Mailbox server in order to do some secrets-exchanging. They never set up a "bulk transport" link.

There is also a Haskell implementation, if that's of interest.

I love to learn about "non-file-transfer" use-cases for Magic Wormhole, so please connect via GitHub (or https://meejah.ca/contact)

19. gruez ◴[] No.41279100{5}[source]
It's clearly a VPS, not bare metal.
replies(1): >>41279178 #
20. lysace ◴[] No.41279178{6}[source]
I wonder what it would take for AWS to lower their outbound BW pricing to something that's not insane.

I'm beginning to think that the only feasible solution is changing the law.

replies(3): >>41279398 #>>41279412 #>>41279472 #
21. gruez ◴[] No.41279398{7}[source]
>I'm beginning to think that the only feasible solution is changing the law.

Do you also think we should legislate the price of BMWs? You're not forced to buy AWS, there's plenty of alternatives, and the prices that AWS charges is well known. I'm not sure why the government should be involved other than a vague sense of "I want cheap stuff".

22. freeopinion ◴[] No.41279412{7}[source]
Please don't suggest more laws like this. If you don't like AWS pricing, use something else. That's the only real way to develop alternatives.
replies(1): >>41279686 #
23. freeopinion ◴[] No.41279472{7}[source]
I'm suffering from fatigue from all the political commercials in which every single Democrat apparently single-handedly reduced the price of insulin. As if government-mandated pricing were a good thing.

If something is overpriced, somebody should jump in and take advantage of a business opportunity. If nobody is jumping in, perhaps the item is not overpriced. Or perhaps there is some systemic issue preventing willing competitors from jumping in. Imagine if somebody tackled the real issue and it unclogged the plumbing for producers of all sorts of medicine beside insulin at the same time.

If a government mandates the sale of an item below the cost of production, they drive out all producers and that product disappears from the market. That is, unless they create some government subsidy or other graft to compensate the government-appointed winners. Any way you slice it, it is a recipe for disaster.

If parties are allowed to compete fairly with each other, somebody will offer a cheaper price. This is already the case with AWS. Consumers may decide that the cheaper product is somehow inferior, but that is not a problem that lawmakers should interfere in.

replies(3): >>41279922 #>>41280161 #>>41281767 #
24. lysace ◴[] No.41279686{8}[source]
You disliked my idle thought so much that you needed to reply twice? :)

The various factors causing strong lock-in effects, their dominance, and the insanely high pricing of moving data out of AWS - I wouldn't be surprised if they got their antitrust moment within a few years.

replies(1): >>41280400 #
25. linsomniac ◴[] No.41279922{8}[source]
Interesting you should choose insulin, as it's made by ~3 companies, and 2002-2013 the price went up 6x, while the price of the inputs dropped. ISTR that right after that it went up another 3x to over $300/vial. Thankfully, I only needed a vial once every few months, it was for my cat.

"Evergreening", a process where the drug manufacturers slightly change the formula or delivery when one patent is running out, to gain a new patent, then stop manufacturing the old formula.

Not saying I want to see AWS bandwidth prices regulated (though I think they could come down and still make a massive profit). But in the case of insulin, the industry has left little choice but government intervention.

replies(3): >>41279991 #>>41280164 #>>41280383 #
26. freeopinion ◴[] No.41279991{9}[source]
So all the politicians pat themselves on the back without fixing the real problem. Instead, they just add one problem on top of another.
27. ekianjo ◴[] No.41280161{8}[source]
> If something is overpriced, somebody should jump in and take advantage of a business opportunity

insulin is off patent. anyone can in theory manufacture it, but the ROI is just not worth it even at the current prices. Manufacturing it is not easy, there are humongous amounts of regulations, you will probably need to do a couple of clinical trials too... so you end up with an oligopoly that are incumbents that nobody wants to challenge, and prices that are all aligned.

replies(2): >>41280516 #>>41284254 #
28. ekianjo ◴[] No.41280164{9}[source]
> But in the case of insulin, the industry has left little choice but government intervention.

drugs are not made without government approval or something. the FDA tells you what you can or cannot do.

29. AuryGlenz ◴[] No.41280383{9}[source]
Except in insulin’s case all they did was cap out of pocket costs, meaning insurance takes up the rest of the bill…which means the rest of us pay for it - and worse yet, it effectively stops any pressure on those companies to lower prices. That’s both political pressure and market pressure. Why the hell would anyone care or use cheaper insulin now?
30. freeopinion ◴[] No.41280400{9}[source]
Sorry. It wasn't personal. I just thought you deserved more than my initial terse response and some explanation of what bothered me: Layers of stupid laws on top of stupid laws that impede rational behavior instead of encouraging it.
31. apitman ◴[] No.41280408{4}[source]
It's unlikely they would let you run it full tilt the entire month. I'm not aware of any VPS providers that have a true unlimited data plan. Would love to be proven wrong.
32. tekknik ◴[] No.41280516{9}[source]
interesting. so the solution is to pile on more regulation yes? if a little is garbage and destroys the system then more must be better right?
33. KronisLV ◴[] No.41280603{3}[source]
Contabo also might be an option: https://contabo.com/en/vps/

Throttling after 32 TB: https://help.contabo.com/en/support/solutions/articles/10300...

Some commentary: https://hostingrevelations.com/contabo-bandwidth-limit/

I wouldn't say that they're super dependable or that the VPSes are very performant, but for the most part they work and are affordable.

Alternatively, there's also Hetzner, as sibling comments mentioned: https://www.hetzner.com/cloud/

They do have additional fees, though:

> You’ll get at least 20 TB of inclusive traffic for cloud servers at EU and US locations and 1 TB in Singapore. For each additional TB, we charge € 1.00 in the EU and US, and € 7.40 in Singapore. (Prices excl. VAT)

I also used to use Time4VPS, however they have gradually been rising prices and the traffic I'd get before being throttled would be less than that of Contabo.

34. floam ◴[] No.41281702[source]
Do you do NAT hole punching, and/or port traversal like uPNP, NAT-PMP? I think for all but the most hostile networks the use of the relay server can be almost always avoided.
35. dools ◴[] No.41281767{8}[source]
I think you’re forgetting that it is regulatory capture that has made medicine cost so much in the US in the first place.
36. grumbel ◴[] No.41282023[source]
> scp or rsync or sftp

All of them require an account on the other machine and aren't really suitable for quick transfer one-off file transfer from one computer to another that you don't own.

If I have a direct network connection I tend to go with:

    python3 -m http.server
or

    tar ...| nc
Neither of which is great, but at least you'll find them on many machines already preinstalled.
37. drowsspa ◴[] No.41284254{9}[source]
Is it, though? Even a poor country like Brazil can afford to give out insulin for free
38. IshKebab ◴[] No.41300820{3}[source]
Both sides behind NAT is surely the most common use case by a mile? Do you keep stats?

I would have thought NAT hole punching was a basic requirement for something like this...