Lan Drop

Lan Drop is a lightweight, WebRTC-powered file transfer tool that works directly in your browser.

Try it out at https://landrop.dmas.dev!

It automatically detects other users on your network and lets you transfer files without needing a central file server.

Landrop is composed of:

  1. A Signalling Service: A lightweight Go service which groups users by network and facilitates WebRTC connection setup.
  2. Web Frontend: A SvelteKit app which provides an easy to use interface for discovering peers and sending files on your local network.

Features

  1. Zero-install transfers: Works with your browser, no desktop client needed.
  2. Local-network discovery: Peers are grouped into "rooms" by their public IP address.
  3. Peer-to-peer: Files travel directly between two devices via WebRTC. There's no central server monitoring your traffic.
  4. Secure: Connections use DTLS encryption. Signalling is done over secure WebSockets (WSS).
  5. Cross-platform*: Works across Windows, Mac, Linux, and Android. iOS support is unknown.

Limitations

Note that Lan Drop ONLY works on your local network. This was a purposeful design decision made. While there's no technical reason it can't perform file transfer over the broader internet, there are many security concerns which would need to be addressed which are outside the scope of this project.

How it Works

  1. Signalling: When a user opens Lan Drop, their browser connects to the signaling service over WebSocket (/ws).
  2. Peer Discovery: The signaling service sends peer lists and securely relays WebRTC session offers/answers and ICE candidates.
  3. WebRTC Connection: Once peers accept a connection request, the browsers establish a direct data channel.
  4. File Transfer: Users can offer files to each other. Downloads only start once a user clicks Download which sends a request to the offerer to start sending the file.

Deployment

See docker-compose.yaml. Its all in there.

Note that you don't really need to deploy this yourself, you can use the public version at https://landrop.dmas.dev.

Top categories

Loading Svelte Themes