Live data from Hacker News

Peer-to-peer file transfers in the browser

github.com

201–210 of 272 posts

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

#201
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…

The DHT exists, all you need is an infohash and you get grab the metadata from peers/uploader.

libtorrent supports something called 'SSL' torrents that require both peers to be signed by the same root.

All the pieces are there to build on top of.

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

#203
post #151

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…

> initiate a connection via CLI and get a simple URL to share https://webwormhole.io does this, see the CLI link at the bottom. Just tested it myself with a small file.

This does look quite close to what I wanted. Thank you. Unfortunately, it also looks to no longer be under development.

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

#204
post #173

Earlier quoted context omitted.

That doesn't work with "symmetric" NAT, which was specified by the person you are responding to: in that case, you can't rely on even a third party to figure out the port. To the extent to which this NAT paradigm is chosen for its efficient usage of ports, this is fixable using UPnP/NAT-PMP/PCP, but 1) I've (sadly) never seen a WebRTC implementation which takes advantage of these protocols, and 2) usually this isn't…

CGNAT is increasingly common for large ISPs as IPv4 gets expensive. There are entire regions of brazil where all residential internet is CGNAT'ed, making any video calls between those users symmetric NAT.

What part of CGNAT requires the network address translation to be symmetrical?

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

#205
post #123

> 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 E2…

WebRTC, in fact, merely passes e2e encrypted packets through the TURN server (which, by the way, is only required if both sides are behind symmetric NAT: the vast majority of NAT doesn't cause this problem, though you might need to do STUN).

A lot of cell networks won't work with STUN. I've tried in personal projects to have a home computer with wifi communicate through a stun server to a mobile device using mobile data. It don't work.

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

#206
post #169

Earlier quoted context omitted.

Honestly yeah, AirDrop is part of Apple's lock-in.

Absolutely. The fact that Google and Apple could quickly agree on a standard for both cross-platform Covid contact tracing and "stalker warnings" for "Find My" trackers, but not for cross-platform encrypted text messaging or an interoperable AirDrop extension, shows that it's purely a problem of incentives.

Maybe there's a way to send messages/files over the covid19 protocol.

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

#207
post #141

Earlier quoted context omitted.

TURN or STUN server can use the DTLS transport in order to encrypt the traffic. So you know it's secure if you are using turns:// protocol and verified the certificate just like it works with https:// https://datatracker.ietf.org/doc/html/rfc7350

Hmm. I'm not a WebRTC pro but looked into it recently for a hobby project and felt that the typical WebRTC TURN implementation still leaves the TURN server in a quite trusted position. My rough understanding: - (1) Each client generates a key pair - (2) The fingerprint of the public key is part of the SDP message each client generates - (3) The SDP message is somehow exchanged between the clients, out of band, and th…

Only the initial SDP needs to be fudged. The attacker could just set up two clients that pretends to be the sender/recipient. Then the data can just go through regular Google TURN servers.

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

#208
post #101

Earlier quoted context omitted.

People drive one ton pickup trucks to commute to their desk job. Or to get two bags of groceries.

This is true but this sucks. Modern American SUVs are an abomination too. The American auto industry started pushing them because they're legally classified as "light trucks" which lets them take advantage of certain safety and environmental standard loopholes

[deleted]

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

#209

Earlier quoted context omitted.

That's no longer p2p, that's using a relay server like TURN

It is p2p, the middle server isn’t relaying traffic.

If TURN is used, then it absolutely is. Please read the comments above.

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

#210
post #48

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.

> no first class standardized ways to move files over the Internet between PC/mobile/edge devices FTP? You can open an app on your phone, start an FTP server, use UPnP to poke a hole in the router, show their public IP address, send a text message to your friend with the IP, port, username & password in a single URL, connect, send/receive files.

This is the same predictable reply as the naysayers at the launch of DropBox. Both of us know that expecting people to set up FTP is a complete nonstarter.

https://news.ycombinator.com/item?id=8863

Post reply on HN