Live data from Hacker News

WebWormHole: Send files quickly using WebRTC

webwormhole.io

101–110 of 161 posts

Re: WebWormHole: Send files quickly using WebRTC

#101

I love that it uses chunks and streaming to transfer the file. So many of these just try and load the entire file at once so you can’t transfer much.

Haven't looked through the code yet. How does it handle stream backpressure with WebRTC?

WebRTC has built in mechanisms to check how many bytes have been buffered (RTCDataChannel.bufferedAmount), and you can register a low water mark (RTCDataChannel.bufferedamountlow) that fires an event handle when the buffered amount goes below that threshold (RTCDataChannel.onbufferedamountlow) where you can resume sending.

WebRTC is sort of a combination of low-level and high-level APIs, but the ability to control backpressure ends up being very useful.

Re: WebWormHole: Send files quickly using WebRTC

#102
post #39

This is neat, but it seems like unlike with "real" Magic Wormhole, the server here can capture files by surreptitiously manipulating JS.

Although of course the people supplying your "real" Magic Wormhole might have surreptitiously altered that software to capture the file too...

I think these are similarly likely and have similar (but not identical) mitigations if you're worried you would really be a target for such shenanigans.

Re: WebWormHole: Send files quickly using WebRTC

#103
post #99
post #89

Earlier quoted context omitted.

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

I developed it mainly on Firefox on macOS. I'd love to figure out why it didn't work for you. Do you get anything on about:webrtc while trying to connect?

Thanks for the reply. I did the following for you:

1. Opened about:webrtc, clicked "start debugging".

2. Opened a WebWormhole on one tab.

3. Copy / pasted the code into WebWormhole on another tab. Got something like "invalid key".

4. Try again steps two and three. Got endless "connecting" message this time.

5. Stop debugging. No log file /tmp/WebRTC.log was created, so I clicked "save page". Used sed to replace my public IP address with x.x.x.x and uploaded here for you:

https://ipfs.io/ipfs/QmTM1ZSRk1xqfMd2FF23YzWxHpqjJ2B6kGFQqPd...

I hope this gives you enough information to fix the problem. I'd like to be able to use these tools too. I suppose it could be addon related, but another user confirmed the problem for Firefox / Linux. It would be useful to be able to detect various problems and report them to the user instead of hanging on "connecting".

Re: WebWormHole: Send files quickly using WebRTC

#104
post #55

Earlier quoted context omitted.

Carrier grade NAT...

Sure, when you're talking about mobile devices. (Or has it already become a thing with DSL, too?) In any case, the issue started much earlier, I'd say.

I have fiber with carrier grade NAT for some reason...

Re: WebWormHole: Send files quickly using WebRTC

#105
post #54

Neat, looks like a different backend and frontend implementation of the very similiar magic-wormhole[0] Now I wonder if anyone has made a web frontend of the original. [0] https://github.com/warner/magic-wormhole

I made a minimal web API for some experimental stuff I was trying:

https://github.com/jimpick/magic-wormhole-service

Not really hardened for production usage.

Re: WebWormHole: Send files quickly using WebRTC

#106

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

I stumbled upon patchbay the other day and I thought it was really cool, now I just need to find a good excuse to toy with it.

Just a heads up: the homepage still references the old index.html which you say in your blog article might have the wrong paths. Indeed looking at the docs all paths require a mode

Re: WebWormHole: Send files quickly using WebRTC

#107
post #101

Earlier quoted context omitted.

Haven't looked through the code yet. How does it handle stream backpressure with WebRTC?

WebRTC has built in mechanisms to check how many bytes have been buffered (RTCDataChannel.bufferedAmount), and you can register a low water mark (RTCDataChannel.bufferedamountlow) that fires an event handle when the buffered amount goes below that threshold (RTCDataChannel.onbufferedamountlow) where you can resume sending. WebRTC is sort of a combination of low-level and high-level APIs, but the ability to control ba…

Thanks. Does bufferedAmount work better than it does on WebSockets[0], because I haven't had much luck with that.

[0]: https://github.com/websockets/ws/issues/492

Re: WebWormHole: Send files quickly using WebRTC

#108

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

Is this in the wasm version?

Re: WebWormHole: Send files quickly using WebRTC

#109
post #69

Earlier quoted context omitted.

Turn servers are expensive but there are plenty of free SatUN servers. For example Google offers free stun servers.

Has the pandemic made ipv6 more popular somehow?

Of course. IPv6 is much more widely deployed to home networks, whereas businesses tend to go out of their way to disable it. So when people are at home all over the world, whether that's the Christmas period or this present crisis, it bumps up IPv6 numbers slightly.
Post reply on HN