Why not generate the QR code client-side? Folks that care about P2P want to see zero HTTP requests to your server after loading the basic resources.
WebWormHole: Send files quickly using WebRTC
81–90 of 161 posts
Re: WebWormHole: Send files quickly using WebRTC
#82Earlier 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…
Re: WebWormHole: Send files quickly using WebRTC
#83Earlier 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?
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
#84Earlier 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...
[0]: https://github.com/omnistreams/omnistreams-filereader-js/blo...
Re: WebWormHole: Send files quickly using WebRTC
#85Earlier 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.
Re: WebWormHole: Send files quickly using WebRTC
#86Earlier 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
Re: WebWormHole: Send files quickly using WebRTC
#87Earlier 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...
Re: WebWormHole: Send files quickly using WebRTC
#88Also, 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
#89Earlier 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.