π¦ LocalSend: the best Warpinator-like cross-platform app!
I think I should recommend LocalSend to everyone. I never tried its web-based version, but rather the OS-specific apps.
In my case, I used winget install localsend for Windows, the Flatpak for Linux, and the F-Droid APK for Android, although the Google Play Store also has it. Thereβs also an iOS app.
It works flawlessly.
Question: How does LocalSend work with 2 devices on the same LAN by opening web.localsend.org in a browser, as long as each browser is supposed to access that website, without spying on the LAN?
ChatGPT: The key distinction is between the website that delivers the application and the network connection that transfers the files.
Opening web.localsend.org on both devices does not necessarily mean that the files travel through the LocalSend website or its servers.
The browser can download the LocalSend web application (HTML, JavaScript, CSS) from the public Internet, then use that application to communicate directly with another device on the local network.
This is essentially the same principle as a web application that downloads its interface from a remote server but subsequently communicates with local devices.
In fact, the LocalSend web version uses WebRTC and WebSockets, as confirmed by its official source code.
There are two distinct communication channels:
1. Signalling (Internet): Both browsers connect to wss://public.localsend.org/v1/ws. This server helps them discover each other and exchange the information needed to establish a connection (WebRTC SDP offers/answers and connection candidates).
2. File transfer (LAN): The browsers establish a direct WebRTC connection. The actual files travel directly between the two devices, not through the public LocalSend server.
Why this works
WebRTC is specifically designed to establish peer-to-peer connections between browsers, even when they are behind NAT routers.
In your LAN scenario, both devices can potentially communicate using their private IP addresses directly. STUN helps determine the connection paths; TURN relaying is a fallback in situations where a direct connection cannot be established.
Is the LocalSend server still involved?
Yes, but only for signalling in the normal WebRTC architecture. The web application's source code explicitly identifies the public signalling server and allows it to be replaced with a self-hosted one.
The interesting consequence: you could theoretically download the LocalSend web application, host it locally, and run your own signalling server. You would no longer need the public LocalSend infrastructure at all.
Source code: LocalSend Web App on GitHub.