Network

How to share files on local network and between nearby devices

How to share files on local network and between nearby devices

The SMB protocol is still today one of the most used tools for share files in local network with Windows. Thanks to the free implementation available on Linux systems and Unix-likeknown as Samba, it’s pretty easy to share folders, files, and other resources within rarely mixed using workstations, servers and client devices based on different operating systems.

Users, however, need faster, instantly usable tools for transfer documents and files from one device to another, on a local network as well as between remote systems.

WebRTCacronym of Web Real-Time Communication, is an open source technology and framework that enables real-time audio, video, and data communication directly between web browsers and applications without the need for additional plugins or software. A set of APIs (Application Programming Interfaces) and standardized protocols allow developers to easily build applications with real-time communication.

The vast possibilities of use that distinguish WebRTC, including the peer-to-peer communications directly between browsers or applications without the need for intermediary servers, they are used to develop leading projects.

PairDrop: to share files on any local network

Are you looking for a simple, fast and, above all, reliable and secure method for send files from smartphone to notebook and viceversa? you want share photos in original quality with friends using Android and iOS devices? you wish share files privately between Windows and Linux systems regardless of versions, editions and distributions installed? PairDrop is an excellent application that allows you to exchange files of any type and size without the need to establish a SMB sharing.

PairDrop it works the same and in a very simple way on all platforms: just open your web browser, connect with this page and that’s it.

At the bottom of the page, the fictitious name by which your system is identified by is displayed local network. By clicking on it, you can assign an arbitrary name in order to make the device even more easily identifiable.

The beauty is that as soon as you open the PairDrop page from a web browser on any device connected in LAN via WiFi or Ethernet cable, all devices will see each other.

Share files on local network with PairDrop

In the example, the system Tomato Basilisk, sees two devices (respectively a Windows system with Google Chrome browser and an Android smartphone) on which the main page of PairDrop is displayed. With a simple click, you can choose the file to send to the other device while using the right click you can transfer a text message.

Send message in local network with PairDrop

The procedure for sharing files is also the same on mobile devices: the only difference is that to send a file, just touch the display while to send a message, you have to press and hold the device icon.

How secure file sharing works using WebRTC, encryption, STUN and TURN

The use of encryption it is essential for WebRTC connections and is handled entirely by the browser. When the devices are in the process of connection, a channel is created through the exchange of signaling information. This reporting information includes a public key and are specific to each client’s IP address.

In the first phase the server STUN (Session Traversal Utilities for NAT) which returns the IP address of the device. The transmission of signaling information is done through PairDrop using connections Secure WebSockets.

Once this stage is completed, the channel becomes completely peer-to-peer and all information can only be deciphered by the recipient. When the devices are on the same local network or in any case are not behind a NAT system (as in the case of PairDrop users), the sending of files is direct, in peer-to-peer mode.

If a user is found downstream of a routerwhere NAT is in use, then the content is routed through a TURN server (Traversal Using Relays around NAT). Again, content sent over the channel can only be decrypted by the recipient. An unauthorized TURN server might only see that there is a connection, but cannot access the data content. It is the web browser that decides whether to invoke the use of a TURN server or not.

A word on pairing devices using IndexedDB

The functionality of pairing of devices use the API IndexedDB: creates rather long secret strings shared with the system that initiates the communication and al peer requesting it (only when the key is correct). IndexedDB is somewhat the successor of LocalStorage as the saved data is shared across all tabs open in the browser. However, it takes it one step further due to the fact that the data they remain stored between one work session and another; moreover, they remain available offline when implemented in a PWA app.

ShareDrop: to exchange files between remote devices

The operation of is also based on a very similar scheme ShareDrop, an application that we had already presented at the time and which allows you to transfer large files remotely in a direct way. In ShareDrop the names of the various peer are marked with fictional nameswithout the possibility of any customization.

ShareDrop is also a free web application and open source, the source of which is publicly available on GitHub. The transfer of files between local and remote systems is direct, without the need to resort to any intermediary server. Secure and encrypted peer-to-peer connection transfers file information (name and size) and file data.

File sharing with ShareDrop

To send a file to another device in the same local network, just open the ShareDrop page on each device then drag and drop a file directly onto the corresponding avatar on the other device. The file transfer begins once the recipient has accepted the receiving the file.

Sending a file to a remote device which is therefore on a different network, is achieved by simply clicking on the “+” button in the upper right corner of the page.

Applications like ShareDrop don’t work with one VPN active neither with the Tor network because both connections route connections through their own tunnel which never interacts directly with the LAN.

LANDrop: to share files locally. Requires installation

Another open source application that allows the direct file sharing between devices connected to the same local network without the need to use cloud services or have active Internet connections is LANDrop. From a technical point of view, LANDrop combines a number of technologies and protocols.

When a device launches LANDrop, the app search for other devices in the local network. The procedure involves the scan local IP addresses used in the LAN and sending announcements in broadcast. Once LANDrop finds other devices on the local network, it begins exchanging signaling information. This information includes data such as IP address and a session key pseudorandomly generated.

Thus begins the phase that involves the creation of the communication channel peer-to-peer real: the devices are thus able to establish one direct data exchange without going through a central server.

In general, LANDrop makes sharing files within a local network much easier and more straightforward, and can be particularly useful in situations where theInternet access is limited or when you want to maintain file sharing within a controlled network environment.

Applications for LANDrop are available on the official LANDrop website Windows, macOS, Linux, Android e iOS. While the iOS version is published on the Apple store, the one for Android devices is not shared through the Play Store and must possibly be installed from the APK file.

How to start and use LANDrop in Windows

In Windows, after clicking on the executable LANDrop.exewhen the security warning “Windows Defender Firewall has blocked some features of this app“, both boxes must be checked Private networks e Public networks then click Allow access.

LANDrop does not show a classic user interface but only displays its icon: by right-clicking on it, you can for example click Settings to set the name by which the device in use must be recognized in the local network (Device Name). The field Download…

Leave a Reply

Your email address will not be published. Required fields are marked *