Live data from Hacker News

WebWormHole: Send files quickly using WebRTC

webwormhole.io

81–90 of 161 posts

Re: WebWormHole: Send files quickly using WebRTC

#82
post #30

Earlier quoted context omitted.

This uses STUN servers to help it poke through NATs. (That's what I mean by "WebRTC's NAT traversal tricks") There's no TURN server set for this, but it shouldn't be hard to add one. There are NATs where you'd need one to relay all the traffic, but these seem to be relatively rare nowadays. If anyone has any actual statistics on these I'd appreciate it!

" but these seem to be relatively rare nowadays " AT&T 5G uses Symmetric NAT. It's not rare if you have an iPhone or iPad with cellular. No way to do P2P without relaying traffic unless you want to "guess" the randomized port number, and, on that front, there are NAT-device-aware algorithms that can make that process faster. We were promised IPv6 will make NAT's not necessary but I believe service providers use NATs…

It's amazing what would be possible if NAT wasn't a thing. We will get there. Someday.

Re: WebWormHole: Send files quickly using WebRTC

#83
post #44

Earlier quoted context omitted.

Things have changed (alot!) the last two years have seen a couple implementations come around. * https://github.com/pion/webrtc * https://github.com/aiortc/aiortc * https://gstreamer.freedesktop.org/documentation/webrtc/index... * https://github.com/rawrtc/rawrtc

Ooh, these are very cool. Do you know what sorts of things people are building with them?

I maintain https://github.com/pion/awesome-pion which has some of the things people in the community have built, and companies who are willing to publicize their work.

Lately I am seeing a lot of stuff in the broadcast space (mixer.com), robotics and IoT. I am really enjoying the Teleoperation stuff as well, people are remotely controlling cars/robots with WebRTC.

Re: WebWormHole: Send files quickly using WebRTC

#84
post #12

Earlier quoted context omitted.

I once tried sending a 3 GB file through it, then kept wondering why my entire system became so sluggish. Turns out it loads the entire thing into RAM... The file didn't go through either. I hope this one isn't like that.

Does HTML5 even let you read a file without loading it all into memory? Edit: Looks like this is it. https://developer.mozilla.org/en-US/docs/Web/API/ReadableStr... Edit 2: And yes, this is using it. https://github.com/saljam/webwormhole/blob/master/web/main.j...

You can also do this manually (and on older browsers) by creating a FileReader and only loading new chunks after old ones have been transferred. With async APIs like WebSockets and WebRTC this typically requires implementing your own backpressure to avoid blowing up browser memory. See for example how omnistreams does it[0].

[0]: https://github.com/omnistreams/omnistreams-filereader-js/blo...

Re: WebWormHole: Send files quickly using WebRTC

#85
post #14

Earlier quoted context omitted.

I blame NAT. Treating end-users like second-class netizen consumers trained people to "need" the cloud to do perfectly normal peer-to-peer things.

I'm not sure I would blame NAT. You can easily disable that. What you can't disable is the asymmetry of consumer internet connections (upload << download) and the fact that most consumer devices are not running (or connected to the internet) 24/7.

Anything that requires a manual step will be at a huge disadvantage compared to something that doesn't. People have better things to do with their life than read router manuals.

Re: WebWormHole: Send files quickly using WebRTC

#86

Earlier quoted context omitted.

Nice spot, here's a link to the IETF draft spec for CPace mentioned. https://tools.ietf.org/id/draft-haase-cpace-01.html IETF post announcing the chosen candidates https://mailarchive.ietf.org/arch/msg/cfrg/LKbwodpa5yXo6VuND... Candidate selection process https://github.com/cfrg/pake-selection

Implementation using libsodium https://github.com/jedisct1/cpace

Hey, the libsodium guy! Thanks a million for your work on that; I've really enjoyed using it. I actually ran across this the day after the CFRG meeting and was happy to see a respected implementer had already written a C version. Would you say it's mature enough to use yet?

Re: WebWormHole: Send files quickly using WebRTC

#87
post #12

Earlier quoted context omitted.

I once tried sending a 3 GB file through it, then kept wondering why my entire system became so sluggish. Turns out it loads the entire thing into RAM... The file didn't go through either. I hope this one isn't like that.

Does HTML5 even let you read a file without loading it all into memory? Edit: Looks like this is it. https://developer.mozilla.org/en-US/docs/Web/API/ReadableStr... Edit 2: And yes, this is using it. https://github.com/saljam/webwormhole/blob/master/web/main.j...

That's great! Inconsistent large file support has also been what has prevented me from using the various predecessors to this so far.

Re: WebWormHole: Send files quickly using WebRTC

#88
What makes this really interesting to me is that it uses a golang implementation of WebRTC on the server side. When I was playing with multiplayer networking in the browser ~1.5yr ago, there really didn't seem to be a lot of options for WebRTC servers. Great to see some progress here.

Also, it sounds like it's using streaming rather than loading the entire file, which would give it an advantage over https://file.pizza, which is what I usually recommend for p2p transfers.

If you like these types of tools, but don't require p2p (or can't use it because of NAT), I'll also plug my own https://patchbay.pub, which will let you do streamed transfers with nothing but curl.

Re: WebWormHole: Send files quickly using WebRTC

#89
post #57

Earlier quoted context omitted.

> But I'm assuming it can't break through all NAT routers, right? A good portion of people still won't be able to use this? > A service usable by everyone would require STUN and TURN servers to be set up, no? Anecdata, of course, but I haven't been able to reliably use any of these WebRTC based file transfer services (file.pizza, instant.io, etc etc). Testing mostly between two computers on the same subnet. Sometimes…

Also didn't work for me on Firefox/Linux, between 2 tabs.

Hmm, maybe this is a classic "didn't bother testing on Firefox" situation. I wonder if anyone on a different OS can confirm.
Post reply on HN