Peer-to-peer file transfers in the browser

by keepamovinon 3/12/2025, 12:08 PMwith 254 comments

by smusamashahon 3/12/2025, 1:57 PM

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

by Springtimeon 3/12/2025, 1:38 PM

Opera browser used to have P2P file transfers as a short lived feature in ~2010, called Unite. I remember it also had skeuomorphic GUI of a 'fridge' where users could put post-it style notes that could be seen by others.

One of many everything-and-the-kitchen-sink features Opera Presto had during its heyday. Others included a separate Bittorrent client, desktop widgets that could be moved outside of the browser window, full IRC client, email client and peerless hotkey actions customization.

By some miracle the browser still managed to be a rather lean binary.

by latexron 3/12/2025, 4:35 PM

The thing that usually annoys me about these services is they tend to give you an intractably complex URL to share with the recipient. This poses a problem because every time I need such a P2P transfer, I’m communicating with someone over the phone and they need the file on a computer (which may not even be their own, so email is also cumbersome).

https://file.pizza does this better than most, as the URL consists of real words. But all the words are ingredients in English which comes back to being an issue again.

https://pairdrop.net is my go-to, since it allows creating temporary “rooms” with just five letters, which are easy to share over the phone.

Still, I continue to wait for the holy grail of a P2P service which would allow me to initiate a connection via CLI and get a simple URL to share with someone who could download the file from a web browser, saving me from having to babysit the browser tab. There are services which allow you to upload via CLI and download via web browser, but they host your file so you have to wait for the full upload to finish before sharing the link.

by modelesson 3/12/2025, 1:03 PM

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.

by crazygringoon 3/12/2025, 3:08 PM

> Because data is never stored in an intermediary server, the transfer is fast, private, and secure.

But WebRTC needs a TURN server for when hole punching/STUN doesn't work when both clients are behind NAT.

Data is never stored in an intermediate server, but it can pass through.

How is the privacy and security ensured that the TURN server won't/can't read your data? Do you just have to trust them? Or is a form of E2EE employed?

I'm surprised this isn't even metioned on the page. Or does this not include TURN servers, and so file transfers just fail between certain peers? (Which it doesn't mention either.)

by mary-exton 3/12/2025, 1:05 PM

rather worried that it's going to go the same fate as ShareDrop (https://github.com/ShareDropio/sharedrop) and Snapdrop (https://github.com/SnapDrop/snapdrop) where they recently got taken over by LimeWire the crypto/AI company.

by ameliuson 3/12/2025, 1:11 PM

It's so strange that this should have been a solved problem decades ago, but somehow a robust and secure non-commercial solution never gets off the ground.

Speaking of which, how is the IPFS project doing these days?

by dustedon 3/13/2025, 9:48 AM

I did the same thing a long time ago, though I cant brag about using as long a list of frameworks, source is https://github.com/DusteDdk/fileswithafriend so you can host it youself, announcement post and link to site where it can be used is here https://news.ycombinator.com/item?id=39622511

In my version, the entrypoint is not uploading your file (where would it go??) but establishing the connection between two devices, then bidirectional transfers between them.

by arthurswon 3/12/2025, 1:19 PM

I really like PairDrop https://github.com/schlagmichdoch/PairDrop

by Rygianon 3/12/2025, 1:07 PM

There is also Magic Wormhole [1] which is not in-browser.

[1] https://github.com/magic-wormhole/magic-wormhole

by cassepipeon 3/12/2025, 4:20 PM

If having someone intall transmission (or your favorite torrent client) is not a hurdle, I like the privtracker approach a lot : https://privtracker.com/

The reason I like it more is that most torrent clients can run in the background by default so it's not dependant on keeping a browser tab opened

It made it to the frontpage not so long ago but it'd be a pity if you had missed it

by 0xbadcafebeeon 3/12/2025, 2:32 PM

Ignorant question: isn't WebRTC just... built into the browser? Do you really need a stack of 20 things to tell the browser to connect to another browser with WebRTC? Isn't one HTML page with a few lines of javascript enough?

by ebfe1on 3/12/2025, 2:10 PM

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 :)

by apion 3/12/2025, 2:00 PM

These are neat but... it's 2025, and there is still no first class standardized ways to move files over the Internet between PC/mobile/edge devices.

by quantadevon 3/12/2025, 4:37 PM

Has anyone used this kind of technology to create a kind of one-on-one messaging system that maintains a persistent thread (in browser storage) which can sort of simulate "texting" but without the phone?

by martylambon 3/12/2025, 1:41 PM

Very nice. It reminds me of a similar all-in-browser file transfer tool I built ages ago called nearshare. This was WAY before webrtc was a thing so my approach was to actually run a web server in the browser via a java applet. :)

https://martiansoftware.com/nearshare/

by porridgeraisinon 3/12/2025, 1:35 PM

I like https://github.com/schollz/croc

by janandonlyon 3/12/2025, 12:14 PM

I love this WebRTC based attempt to send files browser to browser.

Too bad I’ve not yet seen it working without hiccups.

I’m currently testing keet, which is in beta but promising as well. https://keet.io/

by logicalleeon 3/12/2025, 3:25 PM

For a simple no-frills alternative, I have this version on my site:

https://taonexus.com/p2pfilesharing/

by ethnographerson 3/12/2025, 6:31 PM

I use https://blip.net which is like a cross-platform AirDrop, but also works over the internet in addition to LAN. Probably the fastest one I found.

by bilekason 3/12/2025, 3:04 PM

Nice project and I always like playing with WebRTC but there is something that has me a little concerned .

> Transfers are now directly from the uploader to the downloader's browser (WebRTC without WebTorrent) with faster handshakes.

Maybe I'm wrong, but there is a signaling server in the middle somewhere along the chain here no ? unless it's just the same as PeerJS in which you first need the clients ID, but connection can be flaky.

From the source I can see it's using PeerJS but react is throwing me off a little bit. It's not clear to me what `useContext(WebRTCContext)` is..

by thenthenthenon 3/13/2025, 1:09 PM

Is it strange that non of these ever worked for me over the years in different places/setups? (between windows/linux/osx). Literally never. Always been thinking of writing my own… I guess thats why there are so many :p

by gruezon 3/12/2025, 9:05 PM

There must be dozens of services like this (ie. peer to peer file sharing over webrtc), but I can never get them to work. Presumably it's because often times one or both of my devices are behind strict NAT, and the service doesn't provide a TURN server (understandable, given that it might be bandwidth intensive). Does anyone know any public/self-hosted service that provides a TURN server?

by vzalivaon 3/12/2025, 4:04 PM

We tried something similar 17 years ago. We couldn’t achieve true P2P, but we managed to relay a data stream via a server without store-and-forward. The startup was called Pipebytes, and we even got a bit of news coverage: https://www.youtube.com/watch?v=ATqKvra1X3o

It was later sold to another company, which scrapped the P2P part and repurposed it for regular cloud sharing. :(

by deknoson 3/12/2025, 9:53 PM

Which browserbased p2p file transfer tool works with STUN and TURN servers? and if possible, also with an cli option?

by DeathArrowon 3/13/2025, 8:08 AM

Why can't we have a mixed system? A Dropbox like service with built-in file sharing. If there are no other peers or the speed of transferring from peers is slow, you use some servers for seeding.

by Alifatiskon 3/13/2025, 6:28 PM

Idk if this will replace the good ol' snapdrop / pairdrop

by sellmesoapon 3/12/2025, 7:25 PM

I came across this recently while looking at cosmopolitan lib stuff https://bob.osau.re/

by u7i7i8o8o8on 3/12/2025, 5:18 PM

Cool concept, has been done a few times before. Would prefer to see a cleaner implementation. Do projects like this really need Tailwind, TS, React? I don't think so.

by gqgson 3/12/2025, 2:14 PM

I don't see which use case this is solving that hasn't already been solved by multiple other P2P file sharing browser based software available.

by seanwessmithon 3/13/2025, 2:33 AM

is there any tool for p2p audio? something to communicate with friends while gaming would be cool

by lxgron 3/12/2025, 2:21 PM

I appreciate every single attempt at solving xkcd #949, but so far, all I'm seeing is an ever-growing pile of evidence for #927.

by eductionon 3/12/2025, 1:33 PM

It still needs middle out compression imo

by desdenovaon 3/12/2025, 7:58 PM

Didn't work here.

The downloader connects, status becomes Ready, then nothing happens.

Tried on both Firefox and Chromium.

by alexpadulaon 3/12/2025, 2:33 PM

It's a start to something great. Keep it up!

by enriqutoon 3/12/2025, 1:11 PM

kids these days...

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

by gsliepenon 3/12/2025, 7:27 PM

"It's peer-to-peer, trust me bro!" The problem is that you are still using a website provided by a third-party to serve you the JavaScript program that initiates the transfer. It's easy to replace that JavaScript by something that just transfers a copy to the third-party itself. To be sure that the transfer is actually peer-to-peer, either the sender or receiver should run their own fillepizza server (and have verified that the source code does not contain any backdoors or phone-home code). But if you do that, you actually don't need a peer-to-peer solution anymore, it's turned into a client-server problem.

by dborehamon 3/12/2025, 4:33 PM

Uses WebRTC, so not actually p2p.

by 867-5309on 3/12/2025, 4:18 PM

>FilePizza eliminates the initial upload step required by other web-based file sharing services

homepage is an upload interface..

by kenrick95on 3/12/2025, 3:27 PM

Relevant xkcd: https://xkcd.com/949/

by BiteCode_devon 3/12/2025, 6:21 PM

I miss dukto r5.

by me2tooon 3/12/2025, 3:42 PM

That's great

by EGregon 3/12/2025, 8:36 PM

Isn't this easy to do with just WebRTC? Like, a few lines of code and using some signaling server and relay (STUN + TURN)?

by casey2on 3/12/2025, 2:31 PM

>filepizza

Horrible name dude