Show HN: Open-source P2P file transfer

45 goodpanda 22 5/31/2025, 11:09:56 PM github.com ↗
I have decided to open source this project to increase trust even further.

In case you have seen my previous posts, this is an update for berb.app, a WebRTC file sharing app. My goal is simple: send files between devices in real-time without installing crap or uploading to any servers.

Comments (22)

fmajid · 6m ago
There are many, many products to address this, like Mozilla's defunct Send, or the excellent but not self-hostable Wormhole.app. You will need to describe what is novel with Berb and why we should use it over other solutions, and no, using WebRTC is not sufficient.

My personal choice for this kind of situation is Wormhole-William, but it is not something my dad could use when he asks me to send the last year's worth of his granddaughter's photos to make a photobook of.

satvikpendem · 1d ago
Are you familiar with Iroh's sendme?

https://github.com/n0-computer/sendme

goodpanda · 20h ago
This looks very interesting. I will def take a look. thx
Alifatisk · 1d ago
Is there a website for sendme? Or is this a cli tool?
satvikpendem · 21h ago
howtofly · 1d ago
My understanding is that the signaling server could be used as the perfect place to perform MITM attack. The README does not mention how berb addresses this concern at all.
goodpanda · 20h ago
Oh I would love some more details if you think that's the case. With Berb only two clients can connect really. So let's say you somehow guess a peer ID, which is very tough, and connect to a random user. You can technically send a file but they can easily ignore it since they didn't initiate the transfer. That being said, I can definitely add a way to verify the file is legit like the suggestion in the reply with hashes.
howtofly · 3h ago
Should users trust the signaling server? IIRC, the signaling server can easily intervene SDP offer/answer so that it can intercept user files or instruct users to send files wherever it wants.
notpushkin · 1d ago
Do you have a proposal? (Showing file hashes could help, perhaps?)
fabrice_d · 1d ago
Is it doing the ICE offer/answer exchange over websocket hosted on your server?
goodpanda · 20h ago
Yes, that's pretty much the only thing the server does. And maintain an in-memory state of connections. Room for improvement for sure.
globalnode · 1d ago
Im not a js programmer but index.js has the line: "Signaling server running on http://localhost:${PORT}" -- is that what you're talking about? I think you're talking about the initial connection right?

util.js also contains "copyToClipboard = (value) => {", not sure why that would be needed.

and googletagmanager for tracking error/diagnostics I think? its hard to understand this code without learning the language lol.

Also in privacy.html: "To initiate a peer-to-peer connection, Berb uses a temporary signaling server to exchange network metadata (such as IP addresses, session descriptions, and ICE candidates)."

goodpanda · 20h ago
Thx for the analysis! copyToClipboard is for copying the session link so it can be opened on your other device.

As for analytics, you are exactly right. I need to know if people are using the app the way it was intended and soon need to add more events for errors. Though perhaps it is something I can maintain on a separate repo? idk, the goal for me was to truly make everything on berb.app open source. no hiding anything

pwn0 · 1d ago
Very cool. Do you mind adding license and contributing information to the project?
goodpanda · 20h ago
Thx for the suggestion. Just added a license but don't really have a good contributing guideline yet. Would love to discuss any feature requests/bugs if you open an issue.
rapnie · 1d ago
A LICENSE file would be better, yes. But the package.json at least says it is ISC-licensed.
ranger_danger · 8h ago
> No servers

Except an impressively large amount of people in the world are behind symmetrical or CGNAT and would require a TURN server.

Because of this, I've personally never gotten a single p2p/WebRTC site to work with another person.

opengears · 1d ago
also check out localsend https://localsend.org/
goodpanda · 20h ago
This looks cool. However my goal with Berb is pretty much browser to browser only. Although if people keep asking for other features, I might consider a desktop/mobile app.
evbogue · 19h ago
Connecting browsers directly is a fascinting area to explore in web development. It always goes a little haywire when punching thru NAT and I wish there was more research into what the best methods are.

https://github.com/dmotz/trystero is a one tool I've used to build these kinds of apps.

koolala · 18h ago
Do you think the AT protocol could ever work for this? I wish we had one centeralized scriptable method that was popular to enable ubiquitous discovery.
evbogue · 15h ago
atproto would be a great pull request for Trystero come to think of it