linuxmint / warpinator

Share files across the LAN
GNU General Public License v3.0
1.2k stars 81 forks source link

Request: Warpinator Protocol #59

Closed OdinVex closed 3 years ago

OdinVex commented 3 years ago

I may have overlooked it but I can not find any resources (besides source-code) to define the Warpinator protocol. I am curious about implementing a Windows-version, if only in the interim.

slowscript commented 3 years ago

The protocol itself is defined in the warp.proto file but I agree that some documentation on the implementation would be useful. I'm currently implementing an Android version (for the time being before an official port comes out) and some additional reference would have made it a lot easier. You could use my code as a second reference if that is of any help but other than that there is nothing at the moment.

lil5 commented 3 years ago

https://github.com/linuxmint/warpinator/blob/master/src/warp.proto Nice so this provides the struct definitions for each responce/request.

@slowscript Where do I start with finding the route urls (assuming this is a REST API)?

With those details I'd be happy to assist building some documentation. :octocat:

OdinVex commented 3 years ago

I decided to run with SyncThing. Runs on most operating systems and devices.

lil5 commented 3 years ago

https://github.com/linuxmint/warpinator/blob/master/src/warp.proto

Turns out Warpinator uses gRPC for its protocol https://grpc.io/, after reading more about that it, the .proto file seems to be everything a developer needs to create their own client.

abitrolly commented 2 years ago

And how does it handle device discovery?

slowscript commented 2 years ago

@abitrolly You can look at the code. It uses mDNS and DNS-SD (together also known as zeroconf or Bonjour). There are many different libraries that implement it in almost any language.

abitrolly commented 2 years ago

Not the most simple protocol to implement, so it looks like Warpinator uses https://pypi.org/project/zeroconf/ for the discovery.

https://github.com/linuxmint/warpinator/blob/9ba7467d54e4ce19830208856a8e478464976c10/src/server.py#L89

OdinVex commented 2 years ago

Not the most simple protocol to implement, so it looks like Warpinator uses https://pypi.org/project/zeroconf/ for the discovery.

https://github.com/linuxmint/warpinator/blob/9ba7467d54e4ce19830208856a8e478464976c10/src/server.py#L89

Zeroconf/Bonjour. Use pre-existing libraries/API.