Get the App
SLTechnology News&Howtos  ›  Network Security  › 

How to use Airshare to realize cross-platform content sharing in local network

Shulou Source: shulou.com Published: 2022-06-01 01:18:55 10月04日 Update

This article focuses on "how to use Airshare to achieve cross-platform content sharing in the local network", interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to use Airshare to achieve cross-platform content sharing in the local network.

Airshare introduction

Airshare is a cross-platform content sharing tool for the local network, which is essentially a Python-based command line interface tool and module, which implements its functions based on aiohttp and zeroconf. With the help of Airshare, we can use multicast DNS to realize peer-to-peer data transmission / sharing between two devices in the local network. In addition, it can open a HTTP website to interact with any external interface that is not a command line interface. It is worth mentioning that the tool can be run completely offline.

Function introduction

The current version of Airshare supports the following powerful features:

Transfer content quickly on the local network.

Allows the transmission of plain text data and supports sending or receiving data from the clipboard.

Support the transfer of multiple files, directories and large files, the content is sent block by block, and does not involve memory read and write at all.

Supports sending directly the file pointed to by the path in the clipboard.

Cross-platform support, support for use on Linux, Windows, and macOS (via command line interface or Web interface), and mobile use (via Web interface).

Use multicast DNS services to register and discover, so we can access human-readable code content.

Can be imported and used as modules in other Python programs.

Tool installation pip installation $pip install Airsharepipx installation $pipx install AirshareHomebrew installation $brew install airshare tool use

As mentioned earlier, Airshare supports sending and receiving files or directories. Most users can use the following commands in the command line interface to send data:

$airshare noobmaster requirements.txt

And use the following commands in the command line interface to achieve data reception:

$airshare noobmaster

In addition, we can also download the shared data in the browser by visiting the following address:

Http://noobmaster.local:8000

Of course, we can also execute the import command in any Python project to import Airshare as a module and use:

Known problems with import airshare

Link-local domain name resolution (.local address) for non-Apple devices requires Avahi (Linux) or Bonjour (Windows).

The Android browser does not have a built-in multicast DNS service directory and cannot resolve the .local address. Therefore, the tool adds QR code support to help us easily access URL addresses.

Windows users require the Python environment to be configured and version < 3.8, using Ctrl + Break (or Ctrl + Fn + B) to exit instead of Ctrl + C.

At this point, I believe you have a deeper understanding of "how to use Airshare to achieve cross-platform content sharing in the local network". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Tags: Content support commands interfaces tools data network address file reality function module directory transfer clipboard form browser version user website Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple Redmi Shulou Technology Xiaomi Huawei