SnapDrop / snapdrop

A Progressive Web App for local file sharing
https://snapdrop.net
GNU General Public License v3.0
18.33k stars 1.68k forks source link

Is there a documented API for Snapdrop? #602

Closed hwittenborn closed 1 year ago

hwittenborn commented 1 year ago

I'm wanting to start writing a GTK client for Snapdrop, but I'm lost on how I should connect the client to a Snapdrop server. I know that Snapdrop uses WebRTC, but is there any documentation on what messages should be coming between the client and server?

RobinLinus commented 1 year ago

The snapdrop server cannot serve third-party clients because that caused too much traffic

hwittenborn commented 1 year ago

@RobinLinus I'm doing this all on a third-party instance (see https://github.com/rhino-linux/drop). I just saw that there were some third-party SnapDrop apps, and I was hoping to mimic what they were doing from my client.

RobinLinus commented 1 year ago

I see. The endpoint isn't documented but you can find the client code here: https://github.com/RobinLinus/snapdrop/blob/master/client/scripts/network.js#L25

hwittenborn commented 1 year ago

Sounds good, I'll give that a look. Thanks a ton! :)