
ShareDrop – P2P File Transfer Using WebRTC - plibither8
https://sharedrop.io
======
currysausage
There's a clone at [https://snapdrop.net/](https://snapdrop.net/) which loads
a little faster and works a little more reliably in my experience.

FAQ: [https://github.com/RobinLinus/snapdrop#frequently-asked-
ques...](https://github.com/RobinLinus/snapdrop#frequently-asked-questions)

~~~
huhtenberg
Damn... that's _very_ slick.

~~~
grenoire
And the server side is only 229 lines
([https://github.com/RobinLinus/snapdrop/blob/master/server/in...](https://github.com/RobinLinus/snapdrop/blob/master/server/index.js)
); quite the feat.

------
dbrgn
There's this situation that comes up again and again: It's 2019 and I want to
send a (potentially large) file from my phone to my computer, or from my
computer to my wife's computer. How do I do it?

\- USB connection? I don't want to dig out my cable and climb under the desk
to plugin the USB cable.

\- Samba share? Forget it.

\- FTP server app? Works, but usually quite slow and painful.

\- Start a HTTP server to serve the directory? That works, but seriously?

\- Sending via E-Mail or Dropbox? Oh FFS, both devices are connected to the
same WiFi access point, how can it be that uploading the file to a cloud
hosted across the world and downloading it again from my other device is the
simplest approach?

So far, Sharedrop is the simplest solution I know that works across any device
that has a modern browser and that allows me to send the file directly from
one computer to the other, without the need for logins or accounts or external
software or arcane command-line incantations.

(The WebRTC Datachannel stack is horrible and mostly neglected by browser
vendors, especially Google, but that's another story...)

~~~
juskrey
I have found btsync (now Resilio Sync) the best available p2p solution, albeit
requiring sync app installation, still you need some app anyway, being it the
browser, file manager etc..

It uses local network when available and of course internet when not. It also
does iOS.. if only more apps were supporting FileProvider functionalities, so
you don't have to import-duplicate all the synced data first.

~~~
dbrgn
It requires installing proprietary software on all devices though, while your
browser already brings along an open source and mostly standardized P2P stack.

~~~
juskrey
There are open source alternatives like syncthing, which is still not as user
friendly.

Also single file sharing seems interesting, but this is not what you usually
do on daily basis... You just want to drop some file to shared folder most of
the time, or to have a ton of different files synced automatically.

~~~
big_chungus
I've tried syncthing as well as btsync (now called resilio); it's not just
less user-friendly. It tends to be _much_ slower and eat tons of CPU due to a
different algorithm. Resilio has a free tier that works fine for me, and I
don't have an inherent issue with a proprietary program that works well. It's
a very convenient solution, I haven't had issues, and highly recommend it.

------
jackewiehose
After working with WebRTC and realizing its potential I immediately disabled
it in my webbrowser.

One fear was to become a peer in a (copyright infringing) p2p-network,
unknowingly just by visiting a random website.

WebRTC can be very useful but I think browsers should ask for special
permissions like they do for camera access etc.

~~~
cerberusss
It's ridiculous that this isn't turned off by default. Here's a Firefox
extension which does exactly that: [https://addons.mozilla.org/en-
US/firefox/addon/happy-bonobo-...](https://addons.mozilla.org/en-
US/firefox/addon/happy-bonobo-disable-webrtc/)

~~~
miles
Why risk installing an add-on when you can achieve the same end just by using
about:config to set media.peerconnection.enabled to false?

~~~
cerberusss
My thought was, that the extension is very easy to switch on/off. However
since installing, I have never wanted WebRTC to be on...

------
coconutrandom
Just shows "Loading" and the warning "firebase.js:39 FIREBASE WARNING: The
Firebase database 'sharedrop' has reached its peak connections limit."

But if this is interesting, checkout [https://instant.io](https://instant.io)
which uses the webtorrent protocol.

~~~
namibj
There's also [https://file.pizza](https://file.pizza)

------
Legogris
You really shouldn't need any server-side at all for something like this these
days (thinking about firebase).

Webtorrent should be mature enough.

We did something similar back 5 years ago for our BSc thesis project, using a
DHT and Namecoin for distributed key exchange. Abandoned and obsolete, but in
case anyone's interested:
[https://github.com/rymdjs](https://github.com/rymdjs)

~~~
cyborgx7
You still need a way to establish a connection between the two browsers.

~~~
melvinroest
No you don't, sort of don't. When you look at the Bugout [1] library, you see
that they're using the infrastructure of WebTorrent to fix that.

I emailed the author and he said he's working on a form of infrastructure in
which the infrastructure takes care of this problem.

So yea, you don't need a signaling server then. I'm pretty sure the extended
version of this idea also includes STUN servers. And I think you'd always need
to pay for TURN servers as the NAT is then simply disabling P2P all-together
[2].

[1] [https://github.com/chr15m/bugout](https://github.com/chr15m/bugout)

[2] Context for people who are like what are all these terms?

In WebRTC when you have 2 computers behind different corporate networks trying
to connect they need to go through a router. A router performs Network Address
Translation (NAT), the internal IP (usually 192.168.178.xxx, definitely not
always) needs to become the public IP. The problem is that when both networks
are too complicated in its structure, then WebRTC cannot work in undoing this
layer of translation.

In order to circumvent this, they tunnel your data through a server that has a
public facing IP. They call this a Traversal Using Relays around NAT (TURN)
server. IMO, you could just see it as an intermediary that shoves data from A
to B and vice versa. However, IMO this defeats the point of P2P as you need a
3rd-party helping you to get the data to the other side.

Note: other relevant ideas are signaling servers (i.e. knowing each other's
reachable address through an intermediary server)

and STUN servers (a server that tells you your own public facing IP address).

~~~
cyborgx7
I would argue that this is still "a way to establish a connection between the
two browsers" and therefore does not contradict my comment, but this does seem
very interesting and I will look into it further.

~~~
melvinroest
Oh, I misread, haha. Thanks for pointing it out.

I fully agree with you.

Man, my thinking got lazy these days. I read an argument a while back on HN
saying that WebRTC is not purely P2P, I was basically insta-responding to
that.

I need to read more carefully.

------
ignoramous
[https://instant.io](https://instant.io) by u/feross [0] is another tool that
I use: It does BitTorrent over WebRTC [1].

[0]
[https://news.ycombinator.com/user?id=feross](https://news.ycombinator.com/user?id=feross)

[1] [https://webtorrent.io/faq](https://webtorrent.io/faq)

------
MaxikCZ
PC and Android on same hotel wifi didnt find each other. Understandable,
scanning QR code paired devices nicely.

Did speedtest.net

    
    
       on PC: 14/10 Mbit down/up with  8ms ping.
       on AN: 35/ 7 Mbit down/up with 13ms ping.
    

Transfering AN -> PC at 3 Mbit/s

When refreshed site on PC to try another direction my PC is stuck on
"loading". After restarting browser it went trough, but now my Android is
stucked at loading. After completely closing firefox in Android I was finally
able to pair again to do speedcheck in other direction:

Transfering PC -> AN at.... 20 MB file transferred, by eye, 20% and got stuck.

Well, the search continues...

~~~
bscphil
You're encountering basically what I've seen myself when trying to use any of
these P2P services. Most of them don't work at all, and those that do seem to
work too slowly to transfer a file of any reasonable size, even on the same
WiFi. I have no problems with any other transfers, including torrents, which
all run at full speed. But WebRTC stuff just never works for whatever reason.

------
szimek
ShareDrop author here.

It's really great that people are still using it, after almost 6 years since
the release! It was first announced here on HN:
[https://news.ycombinator.com/item?id=7468328](https://news.ycombinator.com/item?id=7468328).
Fun fact: on the same day Facebook announced Oculus acquisition ;)

Also, sorry that the service was down for some of you yesterday - it's using a
free Firebase account that has a limit of 100 connections - usually it's
enough.

------
cyborgx7
I've been using file.pizza for the exact same thing. Can't evaluate sharedrop
right now because it is dead, but I find that the aesthetic of file.pizza
makes it very approachable for a lot of people, though some people might
consider it untrustworthy because of it.

------
mdrzn
I've been using this for months now, it's great to quickly transfer files via
WiFi on the same network. Right now, I guess it received the HN hug of death.

------
amanzi
This is pretty neat, and in my quick testing between Chrome and Firefox on
both Android and Windows, it worked well.

A quick search on HN shows that this was first posted 6 years ago as a "Show
HN" \- looks like it's come a long way since then:
[https://news.ycombinator.com/item?id=7468328](https://news.ycombinator.com/item?id=7468328)

~~~
seq
For me, on Chrome, it just stays on "Loading":

DOMException: Failed to set the 'binaryType' property on 'RTCDataChannel':
Blob support not implemented yet at
[https://www.sharedrop.io/assets/vendor-6deb0f828efb7a002b3c4...](https://www.sharedrop.io/assets/vendor-6deb0f828efb7a002b3c4761e62c6e4d.js:3805:171)
at
[https://www.sharedrop.io/assets/vendor-6deb0f828efb7a002b3c4...](https://www.sharedrop.io/assets/vendor-6deb0f828efb7a002b3c4761e62c6e4d.js:3806:279)
at
[https://www.sharedrop.io/assets/vendor-6deb0f828efb7a002b3c4...](https://www.sharedrop.io/assets/vendor-6deb0f828efb7a002b3c4761e62c6e4d.js:3892:117)

------
timvisee
Shameless plug to Firefox Send
([https://send.firefox.com/](https://send.firefox.com/)) with ffsend
([https://github.com/timvisee/ffsend](https://github.com/timvisee/ffsend)).

Crypto is done on the client. The key is in the share URL and is not sent to
the server.

~~~
dbrgn
It's not P2P though, so a different sharing model than Sharedrop.

------
ishanjain28
I don’t like webrtc based solutions because the speeds are subpar.

My phone and iPad are on the same WiFi network and both have a link speed of
roughly 400mbps.

Using trebleshot(a oss file sharing tool like shareit/midrop) I was able to
get 30-40MBps which is pretty insane speed if you ask me.

But sharedrop didnt’t work. It failed with “could not establish direct WiFi
connection with peer” error and with snapdrop that someone else suggested I
could only get speeds of up to 15mbps(or roughly 2MBps).

I only use trebleshot on android and trebleshot via the web interface to
transfer between iOS and android. It’s the fastest tool I have ever used and I
strongly recommend it if you are looking for a tool like that.

TLDR being, webrtc based tools for p2p file sharing suck.

------
VvR-Ox
It's wonderful just like SnapDrop and I recently found another one:
[https://github.com/spieglt/FlyingCarpet](https://github.com/spieglt/FlyingCarpet)

I love the "Air Drop" feature from apple and I'm very happy we can do this on
linux now without the need to explain someone how to open a socket in the
terminal ;-P

------
bobosha
This is a neat idea, I have had the same idea and been meaning to work on this
for a while. Thanks for building this.

Can you share the technical details behind this? Also, what is your business
model? Freemium?

------
Angostura
Trying at work (behind aggressive firewall). Loaded on my Mac OK with Safari
first time. On my iPhone (same wifi) I just get 'Loading'.

Have we killed it?

~~~
smcleod
I thought that too - it just takes ages to load on iOS for some reason

------
jjbinx007
I've seen a lot of suggestions for alternatives but nobody's mentioned
station307.com yet

------
s09dfhks
How does this differ from filepizza?

