开源项目 GitHub Trending 2026-08-12T12:01 正文 ok 875 words

LocalSend:开源跨平台 AirDrop 替代方案

英文标题:🔥 localsend/localsend

LocalSend 是一款免费开源的跨平台本地文件与消息传输应用,可在无需互联网连接或第三方服务器的情况下,通过局域网安全地发现附近设备并传输数据。该项目以 REST API 和 HTTPS 加密为基础,每台设备会动态生成 TLS/SSL 证书,以保障本地通信安全。应用支持 Android 5.0、iOS 12、macOS 11、Windows 10 及 Linux,并要求防火墙允许 TCP/UDP 53317 入站流量。对开发者而言,项目基于 Flutter 和 Rust 构建,提供源码编译、FVM 版本管理、Weblate 国际化协作及多平台打包说明。
打开原文相关 2 · 机会 4
media2.2 KB media901 B media982 B media12.3 KB media17.5 KB media54.9 KB media42.6 KB media35.4 KB media415.9 KB media9.6 KB

中文

CI 状态 翻译状态 打包状态

LocalSend 是一款免费、开源的应用,可让你通过本地网络在附近设备之间安全地共享文件和消息,无需互联网连接。

LocalSend 是一款跨平台应用,通过 REST API 和 HTTPS 加密实现设备之间的安全通信。与依赖外部服务器的其他消息应用不同,LocalSend 不需要互联网连接或第三方服务器,因此是本地通信中快速且可靠的解决方案。

赞助商

浏览器测试由以下服务提供:

iPhone 截图 PC 截图

打包状态

建议通过应用商店或包管理器下载此应用,因为该应用不具备自动更新功能。

有关分发渠道的更多信息,请参阅相关文档。

Windows 二进制文件已签名。有关详情,请阅读代码签名策略。

注意

**非官方 MSIX 预览版:**你可以在 localsend.ob-buff.dev 试用基于最新提交构建的版本。其稳定性无法保证,所有自定义代码调整均列在该网站中。

兼容性

平台 最低版本 说明
Android 5.0 -
iOS 12.0 -
macOS 11 Big Sur 使用 OpenCore Legacy Patcher 2.0.2(参见 #1005)
Windows 10 支持 Windows 7 的最后一个版本是 v1.15.4。未来可能会为 Windows 7 回移植较新版本。
Linux 不适用 依赖项:Gnome:xdg-desktop-portal 和 xdg-desktop-portal-gtk;KDE:xdg-desktop-portal 和 xdg-desktop-portal-kde

在大多数情况下,LocalSend 应可开箱即用。不过,如果你在发送或接收文件时遇到问题,可能需要配置防火墙,以允许 LocalSend 通过本地网络通信。

流量类型 协议 端口 操作
入站 TCP、UDP 53317 允许
出站 TCP、UDP 任意 允许

还请确保已在路由器中禁用 AP 隔离。通常该功能默认关闭,但部分路由器可能会启用它,尤其是在访客网络中。更多信息请参阅故障排除部分。

便携模式

(在 v1.13.0 中引入)

在与可执行文件相同的目录中创建名为 settings.json 的文件。该文件可以为空。应用将使用此文件存储设置,而非使用默认位置。

隐藏启动

(在 v1.15.0 中更新)

如需以隐藏状态启动应用(仅显示于系统托盘),请使用 --hidden 标志,例如:localsend_app.exe --hidden。

在 v1.14.0 及更早版本中,如果设置了 autostart 标志并启用了隐藏设置,应用将以隐藏状态启动。

LocalSend 使用安全通信协议,使设备能够通过 REST API 相互通信。所有数据均通过 HTTPS 安全发送,每台设备都会动态生成 TLS/SSL 证书,从而确保最高安全性。

有关 LocalSend Protocol 的更多信息,请参阅文档。

依赖层级

如需从源代码编译 LocalSend,请遵循以下步骤:

  1. 直接安装 Flutter,或使用 fvm 安装(参阅所需版本)
  2. 安装 Rust
  3. 克隆 LocalSend 仓库
  4. 运行 cd app 进入应用目录
  5. 运行 flutter pub get 下载依赖项
  6. 运行 flutter run 启动应用

注意

LocalSend 当前需要较旧版本的 Flutter(在 .fvmrc 中指定),因此构建问题可能是由所需版本与系统全局安装的 Flutter 版本不匹配导致的。
为使开发流程更加一致,LocalSend 使用 fvm 管理项目所需的 Flutter 版本。安装 fvm 后,请以 fvm flutter 替代 flutter。

我们欢迎所有有兴趣帮助改进 LocalSend 的人参与贡献。如果你希望参与,有以下几种方式:

你可以协助将 LocalSend 翻译成其他语言。我们使用 Weblate 平台管理翻译工作。

或者,你也可以通过 fork 此仓库并手动添加翻译来贡献。

翻译文件位于 app/assets/i18n 目录。编辑 _missing_translations_<locale>.json 或 strings_<locale>.i18n.json 文件,以添加或更新翻译内容。

翻译状态

_请注意:_带有 @ 标记的字段无需翻译;它们不会以任何方式在应用中使用,仅用于提供文件相关说明或为译者提供上下文。

Bug 修复与改进

  • **Bug 修复:**如果你发现 Bug,请创建一个 pull request,并清晰说明问题及修复方式。
  • **改进:**如果你有改进 LocalSend 的想法,请先创建 issue,讨论该改进的必要性。

有关更多信息,请参阅贡献指南。

问题 平台(发送端) 平台(接收端) 解决方案
设备不可见 任意 任意 请确保在路由器上禁用 AP-Isolation。若该功能已启用,设备之间将无法建立连接。
设备不可见 任意 Windows 请确保将网络配置为“专用”网络。当网络被配置为公用网络时,Windows 的限制可能更严格。
设备不可见 macOS、iOS 任意 可以尝试在操作系统设置的“隐私”选项下切换“本地网络”权限。
速度过慢 任意 任意 使用 5 GHz;在两台设备上均禁用加密。
速度过慢 任意 Android 已知问题。flutter-cavalry/saf_stream#4

以下命令仅供维护者使用。请确保在 app 目录中运行这些命令。

传统 APK

Google Play AppBundle

传统方式

本地 MSIX 应用

flutter pub run msix:create

面向应用商店

flutter pub run msix:create --store

传统方式

AppImage

appimage-builder --recipe AppImageBuilder.yml

Snap

说明见 localsend/snap/README.md

LocalSend 贡献者

English / 原文

CI status Translations Packaging status

Homepage • Discord • GitHub • Codeberg

English (Default) • Español • فارسی • Filipino • Français • Indonesia • Italiano • 日本語 • ភាសាខ្មែរ • 한국어 • Polski • Português Brasil • Русский • ภาษาไทย • Türkçe • Українська • Tiếng Việt • 中文

LocalSend is a free, open-source app that allows you to securely share files and messages with nearby devices over your local network without needing an internet connection.

LocalSend is a cross-platform app that enables secure communication between devices using a REST API and HTTPS encryption. Unlike other messaging apps that rely on external servers, LocalSend doesn't require an internet connection or third-party servers, making it a fast and reliable solution for local communication.

Sponsors

Browser testing via

iPhone screenshot PC screenshot

Packaging status

It is recommended to download the app either from an app store or from a package manager because the app does not have an auto-update.

Read more about distribution channels.

Windows binaries are signed. Read more about the Code signing policy.

Caution

Unofficial MSIX preview: you can try builds from the latest commits at localsend.ob-buff.dev. Stability is not guaranteed and all custom code tweaks are listed on that site.

Compatibility

Platform Minimum Version Note
Android 5.0 -
iOS 12.0 -
macOS 11 Big Sur Use OpenCore Legacy Patcher 2.0.2 (See #1005)
Windows 10 The last version to support Windows 7 is v1.15.4. There might be backports of newer versions for Windows 7 in the future.
Linux N.A. Deps: Gnome: xdg-desktop-portal and xdg-desktop-portal-gtk, KDE: xdg-desktop-portal and xdg-desktop-portal-kde

In most cases, LocalSend should work out of the box. However, if you are having trouble sending or receiving files, you may need to configure your firewall to allow LocalSend to communicate over your local network.

Traffic Type Protocol Port Action
Incoming TCP, UDP 53317 Allow
Outgoing TCP, UDP Any Allow

Also make sure to disable AP isolation on your router. It should be usually disabled by default but some routers may have it enabled (especially guest networks). See troubleshooting for more information.

Portable Mode

(Introduced in v1.13.0)

Create a file named settings.json located in the same directory as the executable. This file can be empty. The app will use this file to store settings instead of the default location.

Start hidden

(Updated in v1.15.0)

To start the app hidden (only in tray), use the --hidden flag (example: localsend_app.exe --hidden).

On v1.14.0 and earlier, the app starts hidden if autostart flag is set, and the hidden setting is enabled.

LocalSend uses a secure communication protocol that allows devices to communicate with each other using a REST API. All data is sent securely over HTTPS, and the TLS/SSL certificate is generated on the fly on each device, ensuring maximum security.

For more information on the LocalSend Protocol, see the documentation.

Dependency hierarchy

To compile LocalSend from the source code, follow these steps:

  1. Install Flutter directly or using fvm (see version required)
  2. Install Rust
  3. Clone the LocalSend repository
  4. Run cd app to enter the app directory
  5. Run flutter pub get to download dependencies
  6. Run flutter run to start the app

Note

LocalSend currently requires an older Flutter version (specified in .fvmrc) and thus build issues may be caused by a mismatch between the required and the (system-wide) installed Flutter version.
To make development more consistent, LocalSend uses fvm to manage the project Flutter version. After installing fvm, run fvm flutter instead of flutter.

We welcome contributions from anyone interested in helping improve LocalSend. If you'd like to contribute, there are a few ways to get involved:

You can help translate LocalSend into other languages. We use the Weblate platform to manage translations.

Alternatively, you can also contribute by forking this repository and adding translations manually.

The translations are located in the app/assets/i18n directory. Edit the _missing_translations_<locale>.json or strings_<locale>.i18n.json file to add or update translations.

Translation status

Take note: Fields decorated with @ are not meant to be translated; they are not used in the app in any way, being merely informative text about the file or to give context to the translator.

Bug Fixes and Improvements

  • Bug Fixes: If you find a bug, please create a pull request with a clear description of the issue and how to fix it.
  • Improvements: Have an idea for how to improve LocalSend? Please create an issue first to discuss why the improvement is needed.

For more information, see the contributing guide.

Issue Platform (Sending) Platform (Receiving) Solution
Device not visible Any Any Make sure to disable AP-Isolation on your router. If it is enabled, connections between devices are forbidden.
Device not visible Any Windows Make sure to configure your network as a "private" network. Windows might be more restrictive when the network is configured as public.
Device not visible macOS, iOS Any You can try to toggle the "Local Network" permission under "Privacy" in the OS settings.
Speed too slow Any Any Use 5 Ghz; Disable encryption on both devices
Speed too slow Any Android Known issue. flutter-cavalry/saf_stream#4

These commands are intended for maintainers only. Make sure to run them from the app directory.

Traditional APK

AppBundle for Google Play

Traditional

Local MSIX App

flutter pub run msix:create

Store ready

flutter pub run msix:create --store

Traditional

AppImage

appimage-builder --recipe AppImageBuilder.yml

Snap

Instructions in localsend/snap/README.md

Localsend Contributors