Live data from Hacker News

Peer-to-peer file transfers in the browser

github.com

51–60 of 272 posts

Re: Peer-to-peer file transfers in the browser

#52
Oh i love the use of webrtc for this, thank you for sharing!

This was my half day covid project to share file... inspired by firefoxsend a while back...

https://www.relaysecret.com/

the infra is super lightweight and you can deploy yourself with aws account, it costed me nothing to run and quite useful when needed :)

Re: Peer-to-peer file transfers in the browser

#53

I keep a long list of browser based and CLI p2p file transfer tools[1]. LimeWire (which now has its crypto currency probably) has been on a rampage recently aquiring some of really good tools including ShareDrop and SnapDrop. https://pairdrop.net/ is the last one standing so far. [1]: https://gist.github.com/SMUsamaShah/fd6e275e44009b72f64d0570...

https://wormhole.app/ has been spared and is pretty good. Encrypted, dl can start before up is finished, decent size limit. Unrelated to the wormhole python cli tool and associated file sharing protocol.

It's not a p2p tool btw.

Re: Peer-to-peer file transfers in the browser

#56
post #12

Earlier quoted context omitted.

It was solved a decade ago, BitTorrent protocol

I think people mean something seamless like AirDrop is on Apple devides, but some public standard that gets implemented on all platforms like iOS, Android, Windows, macOS and Linux, so all these platforms can just easily send files to each other simply and securely over WiFi.

> I think people mean something seamless like AirDrop is on Apple devides

Ha! I do wonder if I'm the only person who has errors where sometimes an AirDrop attempted transmission, from two devices sitting right next to each other, just hangs indefinitely, even if a transmission between the same two devices a minute ago succeeds. Like all Apple solutions that Just Work, it's great when it Just Works, but, when it doesn't, great effort seems to have been taken to make sure that there's no way to find out why not.

Re: Peer-to-peer file transfers in the browser

#57
post #43

Earlier quoted context omitted.

I think people mean something seamless like AirDrop is on Apple devides, but some public standard that gets implemented on all platforms like iOS, Android, Windows, macOS and Linux, so all these platforms can just easily send files to each other simply and securely over WiFi.

"Securely" is doing a lot of work here; you need some out of band mechanism to transfer the link in the first place, to determine who you're getting the file from, and then you might as well use that to transfer the file instead. Also people want to be able to do it asynchronously, so they use things like WeTransfer. During the brief period that open Airdrop / bluetooth file transfer was a thing, there was a short fa…

> During the brief period that open Airdrop / bluetooth file transfer was a thing, there was a short fad of spamming porn to nearby people on public transport. So that was the end of that.

My recollection is that the end of that was Apple's worry about the protests in China, not any concern about spam on public transit. (The first Google hit: https://restofworld.org/2022/apple-airdrop-china-memes/.)

Re: Peer-to-peer file transfers in the browser

#58
post #4

I wish there was a way to do local peer discovery with WebRTC. Right now both endpoints need an active Internet connection and a shared identifier (in this case a special URL) in order to find each other. Can't do offline local sharing.

You can! https://github.com/pion/offline-browser-communication It uses mDNS for discovery. You can only do one browser though. I don’t see a path forward on browser/browser that is obvious. It would make it so easy to fingerprint if you could set your mDNS hostname in JS

If one end of the connection is a native app like this you have plenty of other options. Browser to browser is the use case I'm talking about.

It could be done with a browser-owned dialog to select peers instead of exposing all local peers to the web by default. Similar to the web MIDI API or others that expose local devices only with explicit user permission for the specific device.

Re: Peer-to-peer file transfers in the browser

#59
post #4

I wish there was a way to do local peer discovery with WebRTC. Right now both endpoints need an active Internet connection and a shared identifier (in this case a special URL) in order to find each other. Can't do offline local sharing.

Couldn't you use sound/bluetooth/qrcodes/etc. to do signalling?

I once did it by copying messages from textarea's back and forth.

Re: Peer-to-peer file transfers in the browser

#60
post #9

kids these days... in my time, we used to know each other's IP addresses and just used netcat

In my time, we used to bring floppies to the schoolyard and just swap them.

> In my time, we used to bring floppies to the schoolyard and just swap them.

Sneakernet!

Post reply on HN