this post was submitted on 20 Apr 2024
300 points (99.7% liked)

Open Source

42277 readers
1150 users here now

All about open source! Feel free to ask questions, and share news, and interesting stuff!

Useful Links

Rules

Related Communities

Community icon from opensource.org, but we are not affiliated with them.

founded 6 years ago
MODERATORS
 

Peer-to-peer file transfers in your browser Cooked up by Alex Kern & Neeraj Baid while eating Sliver @ UC Berkeley.

Using WebRTC, FilePizza eliminates the initial upload step required by other web-based file sharing services. When senders initialize a transfer, they receive a "tempalink" they can distribute to recipients. Upon visiting this link, recipients' browsers connect directly to the sender’s browser and may begin downloading the selected file. Because data is never stored in an intermediary server, the transfer is fast, private, and secure. (Your PC must be online while the recipient download the file(s), if you shutdown the PC or goes offline, the download also stops)

You can selfhost it or use the official instance

https://github.com/kern/filepizza

top 45 comments
sorted by: hot top controversial new old
[–] TrickDacy@lemmy.world 42 points 2 years ago

(Your PC must be online while the recipient download the file(s), if you shutdown the PC or goes offline, the download also stops)

...yeah?. crazy. What'll they think of next?

[–] kevincox@lemmy.ml 17 points 2 years ago (1 children)

I created my own similar tool: https://filepush.kevincox.ca/

It is optimized for the case where you commonly send files to the same devices. For example I have set up all of my devices as well as my partner's phone and Steam Deck. Then I can just tap them and send the file with end-to-end encryption.

It is sort of cool that there is no backing server, just static files. All of the signalling goes over WebPush.

[–] bitfucker@programming.dev 3 points 2 years ago (1 children)

If you are talking about WebPush, technically the browser company provides the backing server

[–] kevincox@lemmy.ml 1 points 2 years ago

That's a good point, I worded it poorly. The backing server is provided by you (via your browser). In theory you could run your own or whatever you want. But all traffic is encrypted so it doesn't matter much who runs it.

[–] SorteKanin@feddit.dk 13 points 2 years ago (14 children)

Only somewhat related, but is there an easy tool for sending files from one device to another when on the same network? I imagine that scenario shouldn't need some third party server to connect to but I've yet to find a tool like this.

[–] lukecooperatus@lemmy.ml 44 points 2 years ago (1 children)

KDE Connect should fit the bill; despite the name, you don't need to be using KDE (or Linux even) since there are clients for every major OS, even mobile.

Among many other cool features, it lets you easily and simply just send a file from one device directly to another on your local network. I use it all the time to send photos from my phone to my desktop without plugging anything in, for example.

[–] SorteKanin@feddit.dk 4 points 2 years ago (1 children)

Looks nice but I don't seem to be able to send whole folders, just individual files :/

[–] SeekPie@lemm.ee 4 points 2 years ago (1 children)

Maybe .zip, .7z or .rar would help here?

[–] SorteKanin@feddit.dk 6 points 2 years ago

That's too much effort to send a folder, especially as I also need to extract on the destination too.

I went with LocalSend instead, it sends folders like a charm :)

[–] Creat@discuss.tchncs.de 32 points 2 years ago (1 children)

Much simpler and more direct than the other suggestions: LocalSend.

Also fully open source, local only, cross platform. Only works in the same network, obviously. That's the point.

[–] SorteKanin@feddit.dk 5 points 2 years ago

This seems to work like a charm! It even sends folders and everything :)

[–] vort3@lemmy.ml 9 points 2 years ago

Others told about snapdrop, sharedrop, localsend etc.

But depending on what devices you are talking about, you might do with just an http server.

I have a file manager on my (android) phone with a http server built in, and my laptop is connected to it via WiFi hotspot all the time. I just start a server on my phone and use a browser or any other download tool (curl, wget) to transfer files from my phone to my laptop.

If you have python installed, you can run an http server on any device you have (for example, a laptop) via python -m http.server and access your files from any other device on the same network by manually typing your local IP into a browser.

[–] sbv@sh.itjust.works 9 points 2 years ago

I think ShareDrop does that.

[–] yo_scottie_oh@lemmy.ml 6 points 2 years ago* (last edited 2 years ago)

There’s an app called Local Send that’s like an alternative to air dropping files on iOS devices, not sure if that’s what you’re talking about or not.

[–] catloaf@lemm.ee 6 points 2 years ago* (last edited 2 years ago)

RSync, scp, rcp, SMB, sneakernet, plus numerous third-party tools. It depends on the platform and exact scenario.

[–] ililiililiililiilili@lemm.ee 5 points 2 years ago

Syncthing accomplishes both local and Internet transfers and doesn't need a third party server (if you're not doing NAT traversal). I don't think you can send individual files through it's interface. But you can share a directory and any files you add (or edit) will sync via P2P to other devices.

[–] uzay@infosec.pub 3 points 2 years ago
[–] kugel7c@feddit.de 3 points 2 years ago

If you are inclined to do things that way there's also the python Fileserver $ python3 -m http.server 8080

[–] Raptor_007@lemmy.world 3 points 2 years ago

I run a local instance of www.snapdrop.net in docker off my Synology NAS. Works great!

[–] Coasting0942@reddthat.com 3 points 2 years ago

LANDrop has an app for every operating system and android/ios

[–] figaro 2 points 2 years ago (1 children)

Android devices have this function natively built in

[–] SorteKanin@feddit.dk 3 points 2 years ago (1 children)
[–] figaro 3 points 2 years ago (1 children)

I think it's called Nearby Share. If you click "share" on a particular file, the option to share to a nearby device appears using Nearby Share.

[–] SorteKanin@feddit.dk 1 points 2 years ago (1 children)

Hmm I think that works based on Bluetooth. I want it to work based on the network, as some of my PCs don't have bluetooth. LocalSend works fine though.

[–] figaro 0 points 2 years ago

Oh got it 👍🏻

[–] kevincox@lemmy.ml 1 points 2 years ago* (last edited 2 years ago) (1 children)

You can't really do this on the web as devices can't directly connect to one another. You need some signalling server to bootstrap the transfer. However almost all of these WebRTC services will actually do the transfer locally if both devices are connected to the same network and can talk to one another directly.

So you would need a native application.

[–] SorteKanin@feddit.dk 1 points 2 years ago

Yes but I was talking about the same network :)

LocalSend does exactly what I wanted

[–] B0rax@feddit.de 1 points 2 years ago

Wormhole (a command line tool) is also a good choice. It works in lan but also over the internet.

[–] David@lemy.lol 8 points 2 years ago (1 children)

What's the difference to pairdrop or snapdrop?

[–] triplenadir@lemmygrad.ml 2 points 2 years ago

afaiu pairdrop and snapdrop only work if both devices are on the same local network, filepizza works over the internet

[–] Hello_Kitty_enjoyer@hexbear.net 8 points 2 years ago

you wouldn't download a pizza

[–] secret300@lemmy.sdf.org 7 points 2 years ago (1 children)

Reminds me of dreamlink but not using ipfs

[–] southernwolf@pawb.social 2 points 2 years ago

Huh, that's the first time I've heard of this. I like IPFS, but I do wish it was just a bit... Smoother to use?

[–] Thordros@hexbear.net 6 points 2 years ago

If I can't type /pizza in EverQuest to get a pizza to wizard itself to my doorstep, I don't even know what technology is trying to do anymore.

[–] Star@sopuli.xyz 6 points 2 years ago

There's also https://justbeamit.com which iirc also functions in a similar way.

[–] FQQD@lemmy.ohaa.xyz 5 points 2 years ago

So.. just a transfer.zip alternative?

[–] ReversalHatchery@beehaw.org 4 points 2 years ago (1 children)

Why yet another alternative to magic wormhole? Instead that could get a better web interface.

[–] Clasm@ttrpg.network 10 points 2 years ago (1 children)

To be fair, this one's been around for a while and I believe it's actually p2p, iirc. Wormhole stores your files on their servers for a little bit if they're < 5 Gb.

[–] 7eter@feddit.de 5 points 2 years ago (1 children)

Waaait what wormholes are we talking about? I am aware these three, sounding similar but incompatible with another:

[–] Clasm@ttrpg.network 2 points 2 years ago* (last edited 2 years ago)

wormhole.app is the only one I'm familiar with. Both it and the file pizza in the OP were built off of webtorrent architecture.

[–] ebd6a8c9051028dc1607@lemmy.ml 4 points 2 years ago (1 children)
[–] Zerush@lemmy.ml 1 points 2 years ago

Yes, there are several p2p apps. Some years ago I used O&O FileDirect, which is very good, free, private (by deinition in this type o sharing), fast and easy to handle, but it's proprietary soft by an German company and Windows only.

[–] aluvalasathish@lemmy.world 2 points 1 month ago

i have used the filepizza but it was not optimized well so i decided to built my own

Airlynk — browser peer-to-peer file sharing without servers

I built Airlynk because I was frustrated with every peer-to-peer file sharing tool I tried — connections would fail, transfers would stall, and NATs or firewalls always got in the way. Nothing I tested was reliable enough for real use, and I wanted a solution that actually worked.

So I decided to build it myself. Over several months, I crafted Airlynk to work entirely in the browser, using WebRTC for direct peer-to-peer transfers. I designed it to be simple, fast, and server-free, with fallback relays only when absolutely necessary. Chunked transfers and progress tracking make even large files move smoothly.

The journey taught me a lot about peer-to-peer networking, browser limitations, and user experience. My goal with Airlynk is to make file sharing effortless for everyone, and I’m excited to keep improving reliability and security based on real feedback from users.

you will find here: https://www.airlynk.in/

[–] phoneymouse@lemmy.world 1 points 2 years ago
[–] Zerush@lemmy.ml 1 points 1 month ago

Or using an desktop app for P2P

https://github.com/schollz/croc