PasteFerry (隔空贴): clipboard and file sync across macOS, Windows and Linux. Direct-first, end-to-end encrypted. Optional official access: no server to host. Independent self-hosting remains available.
Dart airdrop-alternativeclipboardclipboard-sharingclipboard-synccopy-pastecross-platformend-to-end-encryptionfile-syncfile-transferfluttergolanglinuxmacosnat-traversalp2pself-hostedtailscaleuniversal-clipboardwebrtcwindows
发布 1.2.0:新增 Windows 客户端,更新文档与官网
baiyuzeea426140882a
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.ymlindex 1af91ce..e611339 100644--- a/.github/workflows/ci.yml+++ b/.github/workflows/ci.yml@@ -2,8 +2,7 @@ name: CIon:push:- # windows:Windows 客户端开发中,合进 main 之前也要在 Windows 构建机上验证- branches: [main, windows]+ branches: [main]pull_request:# 手动运行:开发中的分支(比如 windows)不必合进 main 也能跑一遍workflow_dispatch:diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 6c23af5..cf6096d 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -1,5 +1,34 @@# 更新记录 / Changelog+## 1.2.0 — 2026-10-09++- **新增 Windows 客户端**:Windows 10(21H2 起)与 Windows 11,x64。与 Mac 互通,Mac 与 Mac、+ Mac 与 Windows、Windows 与 Windows 都可以配对同步。文本、带格式文本、图片、文件、文件夹都支持,+ 粘贴文件时得到的是真实文件,能直接粘进资源管理器、微信、Office。+ **New: Windows client** (Windows 10 21H2+ and 11, x64). Works with Macs and with other Windows PCs; pasted+ files are real files.+ - 安装程序按用户安装,不需要管理员权限;另有便携版 zip。开机自启、崩溃后自动重启,+ 关掉窗口后在右下角托盘里继续运行,桌面上有快捷方式。+ Per-user installer with no admin rights, plus a portable zip. Starts at login, restarts after a crash, and+ stays in the notification area; desktop shortcut included.+ - Mac 上合法、Windows 上不合法的文件名(含冒号、问号等)换成对应的全角字符;只差大小写的+ 文件不会互相覆盖;跳过 `.DS_Store` 等 Mac 系统文件。+ File names Windows doesn't allow get full-width characters; names differing only in case never overwrite+ each other.+ - 密码管理器标记为「不要记录」的内容不同步、不进复制记录(Mac 版尚未支持)。+ Content that password managers mark as sensitive is skipped (not yet on Mac).+ - 设备私钥用 Windows 的 DPAPI 加密存放。 The device key is encrypted with DPAPI.+- **复制记录里的图片可以点开预览**:缩放、拖动、适应窗口;还没下载的先拉取,预览用的下载+ 不会改写当前剪贴板。 **Image preview** in the history, with zoom and pan; downloading for a preview doesn't+ touch your clipboard.+- 修复:配对成功后多出一个确认框,点了也没用。 Fixed: an extra, useless confirmation dialog after pairing.+- 修复:打包文件夹时其中某个文件打不开(比如正被别的程序锁住),整个传输都会失败。现在跳过那一个。+ Fixed: one unreadable file inside a folder broke the whole transfer; it's now skipped.+- 网站与 README 增加 Windows 的安装说明;技术方案见 `design/windows-client.md`,实机验证记录见+ `design/windows-validation-2026-10-09.md`。+- 服务器不需要升级。新增的 `GetImagePreview` 只是界面与本机后台服务之间的接口,设备之间的协议没有变化。+ No server upgrade needed; the device-to-device protocol is unchanged.+## 1.1.2 — 2026-10-09- **修复:家里那台一重启就只能中转,重试也换不回直连。**谁的包先到,谁的路由器就先收到陌生来源的包;diff --git a/README.en.md b/README.en.mdindex 20ef112..54cb29c 100644--- a/README.en.md+++ b/README.en.md@@ -5,12 +5,14 @@<h1 align="center">CopySync</h1><p align="center">- Copy on one Mac, paste on the other.<br>- Text, images, files and whole folders — across Apple IDs and across networks.+ Copy on one computer, paste on the other. Mac and Windows both.<br>+ Text, images, files and whole folders — across accounts and across networks.</p><p align="center">- <a href="https://github.com/baiyuze/copysync/releases/latest"><strong>Download for macOS</strong></a>+ <a href="https://github.com/baiyuze/copysync/releases/latest/download/CopySync.dmg"><strong>Download for Mac</strong></a>+ ·+ <a href="https://github.com/baiyuze/copysync/releases/latest/download/CopySync-Setup.exe"><strong>Download for Windows</strong></a>·<a href="https://baiyuze.github.io/copysync/en/">Website</a>·@@ -20,6 +22,7 @@<p align="center"><img src="https://img.shields.io/github/v/release/baiyuze/copysync?color=0A66D8" alt="Release"><img src="https://img.shields.io/badge/macOS-13%2B-1D1D1F" alt="macOS 13+">+ <img src="https://img.shields.io/badge/Windows-10%20%2F%2011-1D1D1F" alt="Windows 10 / 11"><img src="https://img.shields.io/badge/Intel%20%2B%20Apple%20silicon-universal-1D1D1F" alt="Universal binary"><img src="https://img.shields.io/github/license/baiyuze/copysync?color=6E6E73" alt="MIT License"></p>@@ -32,21 +35,23 @@## Why-If you work on two Macs, you move things between them all day: a snippet of text, a screenshot, a file.+If you work on two computers, you move things between them all day: a snippet of text, a screenshot, a file.The built-in options each get in the way:- **Universal Clipboard** needs both Macs on the same Apple ID, close to each other, with Bluetooth and Wi‑Fi on. A work Mac and a personal Mac rarely share an Apple ID, and large files often fail halfway.- **AirDrop** makes you pick a device and accept on the other side every time, and it only moves files, not the clipboard.- **Messaging yourself** through a chat app means manual downloads, recompressed images, and your files sitting on someone else's server.+- **With one Mac and one Windows PC**, none of the built-in options work at all.-With CopySync you pair two Macs once. After that, `⌘C` on one and `⌘V` on the other. Data goes directly between the devices; when a direct connection can't be made, it is relayed through a server you run yourself. Everything is end-to-end encrypted and the server cannot read it.+With CopySync you pair two computers once. After that, copy on one and paste on the other — Mac to Mac, Mac to Windows, or Windows to Windows. Data goes directly between the devices; when a direct connection can't be made, it is relayed through a server you run yourself. Everything is end-to-end encrypted and the server cannot read it.| | CopySync | Universal Clipboard | AirDrop | Chat apps ||---|:-:|:-:|:-:|:-:|| Different Apple IDs | ✓ | — | Needs accepting | ✓ || Different networks (home ↔ office) | ✓ | — | — | ✓ || Paste right away, nothing to accept | ✓ | ✓ | — | — |+| Between Mac and Windows | ✓ | — | — | ✓ || Files and whole folders | ✓ | Unreliable | ✓ | Zipped || History of what you copied | ✓ | — | — | Scroll back || Content stays off third-party servers | ✓ | ✓ | ✓ | — |@@ -55,11 +60,12 @@ With CopySync you pair two Macs once. After that, `⌘C` on one and `⌘V` on th- **Text, rich text, images, files and folders.** What you copy is what comes out on the other side.- **Size-aware transfer.** Anything under 50 MB (adjustable) is pushed as soon as you copy, so the other Mac can paste immediately. Larger files sync as a record you can pull when you need them.-- **History.** Everything copied on any of your Macs in the last 3 days (adjustable), ready to put back on the clipboard.+- **History.** Everything copied on any of your computers in the last 3 days (adjustable), ready to put back on the clipboard. Click an image to preview and zoom it.- **Direct first, relay as fallback.** Devices connect peer-to-peer; behind symmetric NAT or a strict firewall, traffic switches to the TURN relay on your server automatically.- **Fingerprint check when pairing**, so neither the server nor anyone on the network can impersonate your device.-- **Runs in the background.** Keeps syncing with the window closed, starts at login, recovers from crashes.-- **Native on Intel and Apple silicon**, light and dark appearance.+- **Runs in the background.** Keeps syncing with the window closed, starts at login, recovers from crashes. On Windows it lives in the notification area.+- **Mac and Windows.** Native on Intel and Apple silicon Macs; Windows 10 and 11. Pasted files are real files you can drop into Explorer, WeChat or Office. Light and dark appearance.+- **Passwords stay put** (Windows). Content that a password manager marks as "don't record" is skipped: not synced, not kept in the history.<table><tr>@@ -78,12 +84,12 @@ With CopySync you pair two Macs once. After that, `⌘C` on one and `⌘V` on th|---|---|| **Mac app** | macOS 13 Ventura or later; universal binary for Intel and Apple silicon, no Rosetta needed || **Server** | Any Linux on x86_64 or ARM64 with systemd or Docker; it can also run on one of your Macs |-| **Windows** | Planned |+| **Windows app** | Windows 10 (21H2 or later) and Windows 11, x64; runs under emulation on Windows on ARM || **iPhone / iPad** | Not supported. iOS does not let apps watch the clipboard in the background, so copy-and-it's-there can't work the way it does on the Mac |## Install-There are two parts: **the app on each Mac**, and **a server both Macs can reach**. If both Macs are on the same LAN, the server can run on one of them.+There are two parts: **the app on each computer**, and **a server both can reach**. If both computers are on the same LAN, the server can run on one of the Macs.### 1. Deploy the server@@ -108,7 +114,9 @@ Open these ports in your firewall or cloud security group:For Docker, or for LAN-only use, see the [server deployment guide](server/deploy/README.md).-### 2. Install the app on each Mac+### 2. Install the app on each computer++**Mac**1. Download [CopySync.dmg](https://github.com/baiyuze/copysync/releases/latest/download/CopySync.dmg), open it and drag CopySync into Applications.2. Open CopySync from Applications.@@ -119,22 +127,34 @@ For Docker, or for LAN-only use, see the [server deployment guide](server/deploy4. In **设置 → 信令服务器地址** (Settings → Signaling server), enter `ws://<server address>:8787/signal` and press Return.5. Recent versions of macOS ask whether CopySync Daemon may read the clipboard. Allow it; you can switch it to always allow under **System Settings → Privacy & Security → Paste from Other Apps**.+**Windows**++1. Download [CopySync-Setup.exe](https://github.com/baiyuze/copysync/releases/latest/download/CopySync-Setup.exe) and run it. It installs for the current user and needs no administrator rights.++ CopySync isn't code-signed yet, so Windows says "Windows protected your PC": click **More info → Run anyway**. To skip the installer, download the [portable zip](https://github.com/baiyuze/copysync/releases/latest/download/CopySync-windows-x64.zip), extract it and open CopySync.++2. Open CopySync (it opens when setup finishes; there's also a desktop shortcut) and click **启用后台同步** (Enable background sync).+3. In **设置 → 信令服务器地址** (Settings → Signaling server), enter `ws://<server address>:8787/signal` and press Enter.+4. If Windows Firewall asks about copysyncd, allow it.++After you close the window, CopySync keeps running in the notification area; open it again from the tray icon or the desktop shortcut.+### 3. Pair-1. On one Mac: **设备 → 添加设备 → 生成配对码** (Devices → Add device → Generate code).+1. On one computer: **设备 → 添加设备 → 生成配对码** (Devices → Add device → Generate code).2. On the other: **添加设备 → 输入配对码** (Add device → Enter code), and type the 6 characters.-3. Both screens show the same two lines of fingerprints, one for each Mac. **Confirm only if the two screens match line for line.**+3. Both screens show the same two lines of fingerprints, one for each device. **Confirm only if the two screens match line for line.**-From then on, copy on either Mac and paste on the other.+From then on, copy on either one and paste on the other.## How it works```mermaidflowchart LR- subgraph A["Mac A"]+ subgraph A["Computer A (Mac or Windows)"]UA["CopySync app"] <-- "gRPC" --> DA["Background service"]end- subgraph B["Mac B"]+ subgraph B["Computer B (Mac or Windows)"]DB["Background service"] <-- "gRPC" --> UB["CopySync app"]endS[("Your server\nsignaling + TURN")]@@ -147,16 +167,16 @@ flowchart LR| Component | Role | Built with ||---|---|---|-| Background service `copysyncd` | Watches the clipboard, connects to peers, sends, receives and stores | Go, with cgo calling AppKit for the clipboard |-| App `CopySync.app` | History, pairing, settings | Flutter, talks to the service over local gRPC |+| Background service `copysyncd` | Watches the clipboard, connects to peers, sends, receives and stores | Go. The clipboard uses cgo and AppKit on Mac, and calls Win32 directly on Windows (pure Go, no C compiler) |+| App `CopySync` | History, pairing, settings | Flutter, one codebase for Mac and Windows; talks to the service over local gRPC || Server `copysync-server` | Device discovery, pairing codes, signaling, TURN relay | Go, a single static binary using about 15 MB of RAM || Protocol `proto/` | Messages shared by all three | Protocol Buffers |**What happens when you copy:**-1. The service checks the clipboard's change count at short intervals. Reading the count and types needs no permission and never triggers a prompt.+1. The service notices the clipboard changed: on Mac it checks the change count at short intervals (reading the count and types needs no permission and never triggers a prompt); on Windows the system notifies it right away.2. On a change it reads the content and picks a transport: text is inlined in the message; images and files under 50 MB are streamed right away (tar + zstd); anything larger is announced as a record only.-3. The receiving Mac writes the data to a local cache and then onto its clipboard, so `⌘V` pastes real local files.+3. The receiving computer writes the data to a local cache and then onto its clipboard, so `⌘V` or `Ctrl+V` pastes real local files. File names that are fine on Mac but not on Windows (with a colon, say) get the matching full-width character on Windows.**How the connection is made:**@@ -213,6 +233,7 @@ The **NAT lab** (`tools/natlab`) builds real topologies with Linux network names- **Every signaling message after that is signed**, so the server cannot forge a device. The DTLS certificate fingerprint of the direct channel is also sent signed and checked against the actual certificate after the handshake; a mismatch drops the connection.- **The relay can't read anything either.** TURN only forwards encrypted UDP packets. Relay credentials are issued per device and expire after 12 hours.- **Public STUN servers see only your public IP.** To find every uplink on multi-uplink networks, CopySync probes a few public STUN servers by default. They see your public IP, as with any WebRTC app, never content. Turn off 用公共服务器探测网络出口 (Probe with public servers) in Settings to use only your own server.+- **Device key.** On Mac it's stored readable only by you; on Windows it's additionally encrypted with DPAPI, so another user or another computer can't decrypt a copied file.- **No App Sandbox**, because CopySync needs to read files at whatever path you copy them from.### Fallbacks@@ -253,20 +274,30 @@ Measured on a LAN with a direct connection: a 20 MB file transfers in about 330## Limitations-- **Not notarized by Apple**, so the first launch needs one manual approval.+- **Not notarized by Apple, and the Windows build isn't code-signed**, so the first launch needs one manual approval.+- **No "virtual files" on Windows.** Files copied straight out of an Outlook attachment or a zip have no real path on the clipboard and aren't synced. Save or extract them first.+- **The Mac app doesn't skip password-manager content yet**; the Windows app does.- **Items aren't resent after a long absence.** The server stores nothing. While the other Mac is unreachable, this Mac keeps the latest 20 items (from the last 24 hours) in memory, and they're lost if its background service restarts.- **Relayed transfers are limited by your server's bandwidth.** Direct connections aren't.-- macOS only for now. The interface is in Simplified Chinese.+- The interface is in Simplified Chinese.## Build from source-Requires Go 1.26, Flutter 3.44 and Xcode.+The Mac app needs Go 1.26, Flutter 3.44 and Xcode:```bash./scripts/build.sh # build everything into dist/./scripts/package.sh # build the DMG and server packages into release/```+The Windows app needs Go, Flutter, Visual Studio ("Desktop development with C++") and Inno Setup 6. On Windows:++```powershell+powershell -ExecutionPolicy Bypass -File scripts\build-windows.ps1 # installer and portable zip into dist\windows\+```++The background service is pure Go and also cross-compiles from a Mac: `GOOS=windows go build ./cmd/copysyncd`. CI builds the Windows installer on every commit.+During development:```bash@@ -282,7 +313,7 @@ After changing a `.proto` file, run `./scripts/gen-proto.sh` (uses buf; install```client-core/ background service (Go)- internal/clipboard clipboard (cgo + Objective-C, main thread only)+ internal/clipboard clipboard (Mac: cgo + Objective-C; Windows: Win32; main thread only)internal/transport signaling (WebSocket) and P2P (WebRTC)internal/sync sync engine: routing, packing, transfer, storageui/ app (Flutter)@@ -292,6 +323,7 @@ docs/ website (GitHub Pages)spikes/ technical validation done before developmentdesign/ design documentstools/natlab/ NAT traversal lab+tools/installer/ Windows installer (Inno Setup)```## Troubleshooting@@ -300,13 +332,13 @@ tools/natlab/ NAT traversal labThe system pasteboard service may be stuck: an app declared clipboard content and then crashed, leaving types without data. Run `killall pboard` and copy again.**A device stays offline**-Check **设置 → 连接状态** (Settings → Connection) on both Macs. If it isn't connected, verify the server address and that port 8787 is reachable.+Check **设置 → 连接状态** (Settings → Connection) on both computers. If it isn't connected, verify the server address and that port 8787 is reachable.**Always "relay", never "direct"**Showing "relay" right after connecting and "direct" a little later is normal: the relay makes things work first, and the direct path takes over when the link is idle. If it stays "relay", NAT traversal didn't succeed, which is common with NATs that randomize ports or strict firewalls. Everything still works; speed is limited by the server's bandwidth. Run `copysync-cli nat` to see how many uplinks were found; zero means UDP is blocked.**Logs**-The background service logs to `~/Library/Logs/CopySync/daemon.log`. On the server, use `journalctl -u copysync-server -f`.+The background service logs to `~/Library/Logs/CopySync/daemon.log` on Mac and `%LOCALAPPDATA%\CopySync\logs\daemon.log` on Windows. On the server, use `journalctl -u copysync-server -f`.## Licensediff --git a/README.md b/README.mdindex bc71ba6..21ac2d7 100644--- a/README.md+++ b/README.md@@ -5,12 +5,14 @@<h1 align="center">CopySync</h1><p align="center">- 在这台 Mac 复制,到那台 Mac 粘贴。<br>- 文本、图片、文件、整个文件夹都可以,不限 Apple ID,不限是否在同一个网络。+ 在这台电脑复制,到那台电脑粘贴。Mac 与 Windows 互通。<br>+ 文本、图片、文件、整个文件夹都可以,不限账号,不限是否在同一个网络。</p><p align="center">- <a href="https://github.com/baiyuze/copysync/releases/latest"><strong>下载 macOS 版</strong></a>+ <a href="https://github.com/baiyuze/copysync/releases/latest/download/CopySync.dmg"><strong>下载 Mac 版</strong></a>+ ·+ <a href="https://github.com/baiyuze/copysync/releases/latest/download/CopySync-Setup.exe"><strong>下载 Windows 版</strong></a>·<a href="https://baiyuze.github.io/copysync/">项目主页</a>·@@ -20,6 +22,7 @@<p align="center"><img src="https://img.shields.io/github/v/release/baiyuze/copysync?label=%E7%89%88%E6%9C%AC&color=0A66D8" alt="版本"><img src="https://img.shields.io/badge/macOS-13%2B-1D1D1F" alt="macOS 13+">+ <img src="https://img.shields.io/badge/Windows-10%20%2F%2011-1D1D1F" alt="Windows 10 / 11"><img src="https://img.shields.io/badge/Intel%20%2B%20Apple%20%E8%8A%AF%E7%89%87-%E9%80%9A%E7%94%A8-1D1D1F" alt="Intel 与 Apple 芯片通用"><img src="https://img.shields.io/github/license/baiyuze/copysync?color=6E6E73" alt="MIT 许可"></p>@@ -30,21 +33,23 @@## 它解决什么问题-手边有两台 Mac 的人,每天都在做同一件事:这台上复制了一段文字、一张截图、一个文件,要拿到那台上用。+手边有两台电脑的人,每天都在做同一件事:这台上复制了一段文字、一张截图、一个文件,要拿到那台上用。现有的办法各有各的不顺手:- **系统自带的「通用剪贴板」**要求两台设备登录同一个 Apple ID、离得足够近、蓝牙和 Wi‑Fi 都开着。公司电脑和自己的电脑通常不是同一个 Apple ID;大文件经常复制到一半就没了。- **隔空投送**每次都要选设备、在另一台上点接收,而且只传文件,不管剪贴板。- **用聊天软件发给自己**要手动下载、图片会被压缩,文件还会留在第三方的服务器上。+- **一台 Mac、一台 Windows** 时,上面这些系统自带的办法都用不了。-CopySync 的做法是:两台 Mac 配对一次,之后在一台上 `⌘C`,另一台上直接 `⌘V`。数据在两台设备之间直接传输,打不通直连时经过你自己部署的服务器中转,全程端到端加密,服务器看不到内容。+CopySync 的做法是:两台电脑配对一次,之后在一台上复制,另一台上直接粘贴。Mac 与 Mac、Mac 与 Windows、Windows 与 Windows 都可以。数据在两台设备之间直接传输,打不通直连时经过你自己部署的服务器中转,全程端到端加密,服务器看不到内容。| | CopySync | 通用剪贴板 | 隔空投送 | 聊天软件 ||---|:-:|:-:|:-:|:-:|| 不同 Apple ID 之间 | ✓ | — | 需对方接收 | ✓ || 不在同一个网络(家里 ↔ 公司) | ✓ | — | — | ✓ || 复制后直接粘贴,不用点接收 | ✓ | ✓ | — | — |+| Mac 与 Windows 之间 | ✓ | — | — | ✓ || 文件与整个文件夹 | ✓ | 不稳定 | ✓ | 打包后可以 || 复制历史,可以找回之前的内容 | ✓ | — | — | 翻聊天记录 || 内容不经过第三方服务器 | ✓ | ✓ | ✓ | — |@@ -53,11 +58,12 @@ CopySync 的做法是:两台 Mac 配对一次,之后在一台上 `⌘C`,- **文本、带格式的文本、图片、文件、文件夹**都能同步。复制什么,对面粘贴出来就是什么。- **按大小分流**:50 MB 以内(可调)的内容复制时直接推送,对面立刻能粘贴;更大的文件只同步一条记录,需要时点「拉取到本机」,不会无谓地占用带宽和磁盘。-- **复制记录**:最近 3 天(可调)在所有设备上复制过的内容都在这里,随时可以放回剪贴板。+- **复制记录**:最近 3 天(可调)在所有设备上复制过的内容都在这里,随时可以放回剪贴板;图片点开就能预览,可以缩放。- **直连优先,自动中转**:先尝试设备之间直连;在对称 NAT、公司防火墙后面打不通时,自动改走你服务器上的 TURN 中转。- **配对时核对安全指纹**:防止服务器或网络上的第三方冒充你的设备。-- **后台常驻**:关掉窗口照常同步,开机自动启动,崩溃后自动恢复。-- **Intel 与 Apple 芯片原生运行**,支持浅色与深色外观。+- **后台常驻**:关掉窗口照常同步,开机自动启动,崩溃后自动恢复。Windows 上在任务栏右下角有托盘图标。+- **Mac 与 Windows 互通**:Mac 上 Intel 与 Apple 芯片原生运行;Windows 10、11 均可,粘贴文件时得到的是真实文件,能直接粘进资源管理器、微信、Office。支持浅色与深色外观。+- **不同步密码**(Windows):密码管理器复制的内容带着「不要记录」的标记,CopySync 跳过它们,不同步也不进复制记录。<table><tr>@@ -75,13 +81,13 @@ CopySync 的做法是:两台 Mac 配对一次,之后在一台上 `⌘C`,| | 要求 ||---|---|| **Mac 客户端** | macOS 13 Ventura 及以上;Intel 与 Apple 芯片(M1–M4 等)通用,不需要 Rosetta |+| **Windows 客户端** | Windows 10(21H2 及以上)与 Windows 11,x64;ARM 版 Windows 可以模拟运行 || **服务器** | 任意 Linux(x86_64 或 ARM64),systemd 或 Docker 均可;也可以直接跑在其中一台 Mac 上 |-| **Windows** | 计划中 || **iPhone / iPad** | 暂不支持。iOS 不允许 App 在后台监听剪贴板,做不到 Mac 上这种复制即同步的体验 |## 安装-整套东西由两部分组成:**每台 Mac 装一个 App**,再加**一台两端都能访问到的服务器**。两台 Mac 在同一个局域网时,服务器直接放在其中一台上就行。+整套东西由两部分组成:**每台电脑装一个 App**,再加**一台两端都能访问到的服务器**。两台电脑在同一个局域网时,服务器直接放在其中一台 Mac 上就行。### 1. 部署服务器@@ -106,7 +112,9 @@ sudo ./install.sh <服务器公网IP>用 Docker 部署、或者只在局域网里用,见[服务器部署说明](server/deploy/README.md)。-### 2. 在每台 Mac 上安装 App+### 2. 在每台电脑上安装 App++**Mac**1. 下载 [CopySync.dmg](https://github.com/baiyuze/copysync/releases/latest/download/CopySync.dmg),打开后把 CopySync 拖进「应用程序」。2. 从「应用程序」里打开 CopySync。@@ -117,9 +125,21 @@ sudo ./install.sh <服务器公网IP>4. 在 **设置 → 信令服务器地址** 填入 `ws://<服务器地址>:8787/signal`,按回车。5. 较新的 macOS 会询问是否允许 CopySync Daemon 读取剪贴板,选择允许。之后可以在 **系统设置 → 隐私与安全性 → 从其他 App 粘贴** 里改为始终允许,App 里也有直达按钮。+**Windows**++1. 下载 [CopySync-Setup.exe](https://github.com/baiyuze/copysync/releases/latest/download/CopySync-Setup.exe) 并运行。装在当前用户目录下,不需要管理员权限。++ CopySync 还没有代码签名,Windows 会提示「Windows 已保护你的电脑」:点 **更多信息 → 仍要运行**。不想运行安装程序的话,可以下载[便携版 zip](https://github.com/baiyuze/copysync/releases/latest/download/CopySync-windows-x64.zip),解压后直接打开。++2. 打开 CopySync(安装完会自动打开,桌面和开始菜单里也有),点 **启用后台同步**。+3. 在 **设置 → 信令服务器地址** 填入 `ws://<服务器地址>:8787/signal`,按回车。+4. Windows 防火墙询问是否允许 copysyncd 通信时,选择允许。++关掉窗口后,CopySync 在右下角的托盘里继续运行;从托盘图标或桌面快捷方式都能再打开它。+### 3. 配对-1. 在一台 Mac 上点 **设备 → 添加设备 → 生成配对码**。+1. 在一台电脑上点 **设备 → 添加设备 → 生成配对码**。2. 在另一台上点 **添加设备 → 输入配对码**,输入那 6 位字符。3. 两台屏幕上会显示同样的两行安全指纹(这台的和对方的),**逐行核对两边完全一致后**再点确认。@@ -129,10 +149,10 @@ sudo ./install.sh <服务器公网IP>```mermaidflowchart LR- subgraph A["Mac A"]+ subgraph A["电脑 A(Mac 或 Windows)"]UA["CopySync 界面"] <-- "gRPC" --> DA["后台服务"]end- subgraph B["Mac B"]+ subgraph B["电脑 B(Mac 或 Windows)"]DB["后台服务"] <-- "gRPC" --> UB["CopySync 界面"]endS[("你的服务器\n信令 + TURN")]@@ -145,16 +165,16 @@ flowchart LR| 组件 | 做什么 | 技术 ||---|---|---|-| 后台服务 `copysyncd` | 监听剪贴板、与对端建立连接、收发与落盘 | Go,剪贴板部分用 cgo 调用 AppKit |-| 界面 `CopySync.app` | 复制记录、设备配对、设置 | Flutter,经本机 gRPC 与后台服务通信 |+| 后台服务 `copysyncd` | 监听剪贴板、与对端建立连接、收发与落盘 | Go。剪贴板部分在 Mac 上用 cgo 调用 AppKit,在 Windows 上直接调用 Win32(纯 Go,不需要 C 编译器) |+| 界面 `CopySync` | 复制记录、设备配对、设置 | Flutter,经本机 gRPC 与后台服务通信;Mac 与 Windows 共用一套代码 || 服务器 `copysync-server` | 设备发现、转达配对码、转发信令、TURN 中转 | Go,单个静态二进制,约 15 MB 内存 || 协议 `proto/` | 三方共用的消息定义 | Protocol Buffers |**一次复制的经过:**-1. 后台服务每隔一小段时间检查剪贴板的变更计数。只看计数和类型不需要授权,也不会触发系统提示。+1. 后台服务发现剪贴板变了:Mac 上每隔一小段时间检查剪贴板的变更计数(只看计数和类型不需要授权,也不会触发系统提示);Windows 上由系统即时通知。2. 发现变化后读取内容,按类型和大小决定怎么传:文本直接内联在消息里;50 MB 以内的图片与文件打包成流(tar + zstd)立即推送;更大的只发一条记录。-3. 对端收到后先写入本地缓存,再写入剪贴板。在那台 Mac 上 `⌘V` 粘贴出来的,就是本地的真实文件。+3. 对端收到后先写入本地缓存,再写入剪贴板。在那台电脑上 `⌘V` 或 `Ctrl+V` 粘贴出来的,就是本地的真实文件。Mac 上合法、Windows 上不合法的文件名(比如带冒号的)在 Windows 上换成对应的全角字符。**连接是怎么建立的:**@@ -211,6 +231,7 @@ flowchart LR- **之后的每条信令都带签名**,服务器无法伪造设备。直连通道的 DTLS 证书指纹也经签名传递,握手后比对实际证书,不一致立即断开。- **中转也看不到内容**。TURN 只转发加密后的 UDP 包。中转凭证按设备单独签发,12 小时过期。- **公共 STUN 服务器只看到公网 IP**。为了在多出口网络里找到每个出口,默认会向几台公共 STUN 服务器探测,它们能看到你的公网 IP(与任何 WebRTC 应用一样),看不到内容。介意的话在设置里关掉「用公共服务器探测网络出口」,只用自己的服务器。+- **设备私钥**:Mac 上以仅本人可读的权限存放;Windows 上另用系统的 DPAPI 加密,换个用户、或把文件拷到别的电脑上都解不开。- **不启用 App 沙盒**:需要访问你复制的任意路径下的文件。### 兜底:出问题时会发生什么@@ -251,20 +272,29 @@ flowchart LR## 已知限制-- **没有经过 Apple 公证**,第一次打开需要手动放行一次。+- **没有经过 Apple 公证,Windows 版也没有代码签名**,第一次打开时需要手动放行一次。+- **Windows 上不支持「虚拟文件」**:从 Outlook 附件、压缩包里直接复制的文件,剪贴板里没有真实路径,不会同步。先保存或解压出来再复制即可。+- **Mac 版还不会跳过密码管理器复制的内容**,Windows 版已经会。- **对方离线太久的内容不会补发**。服务器不存数据;对方暂时连不上时,本机只在内存里记下最近 20 条(24 小时内的),本机的后台服务重启后就清空了。- **中转模式的速度取决于服务器带宽**。直连时不受影响。-- 目前只有 macOS 客户端。## 从源码构建-需要 Go 1.26、Flutter 3.44 和 Xcode。+Mac 版需要 Go 1.26、Flutter 3.44 和 Xcode:```bash./scripts/build.sh # 构建全部到 dist/./scripts/package.sh # 打出 DMG 与服务器发布包到 release/```+Windows 版需要 Go、Flutter、Visual Studio(「使用 C++ 的桌面开发」)与 Inno Setup 6,在 Windows 上运行:++```powershell+powershell -ExecutionPolicy Bypass -File scripts\build-windows.ps1 # 安装程序与便携版到 dist\windows\+```++后台服务是纯 Go,也可以在 Mac 上交叉编译:`GOOS=windows go build ./cmd/copysyncd`。CI 在每次提交时构建 Windows 安装包。+开发时可以单独运行各部分:```bash@@ -280,7 +310,7 @@ cd ui && flutter test # 界面的测试```client-core/ 后台服务(Go)- internal/clipboard 剪贴板(cgo + Objective-C,必须跑在主线程)+ internal/clipboard 剪贴板(Mac:cgo + Objective-C;Windows:Win32;都必须跑在主线程)internal/transport 信令(WebSocket)与 P2P(WebRTC)internal/sync 同步引擎:分流、打包、传输、落盘ui/ 界面(Flutter)@@ -290,6 +320,7 @@ docs/ 项目主页(GitHub Pages)spikes/ 开工前的技术验证design/ 技术方案文档tools/natlab/ NAT 打洞实验室+tools/installer/ Windows 安装程序(Inno Setup)```## 排障@@ -298,13 +329,13 @@ tools/natlab/ NAT 打洞实验室系统的剪贴板服务可能卡住了:某个程序声明了剪贴板内容后异常退出,会留下一个"有类型声明、没有数据"的空壳。执行 `killall pboard`,再复制一次即可。**设备一直显示「离线」**-检查两台 Mac 的 **设置 → 连接状态** 是否都是「已连接」。不是的话,确认服务器地址正确、8787 端口可以访问。+检查两台电脑的 **设置 → 连接状态** 是否都是「已连接」。不是的话,确认服务器地址正确、8787 端口可以访问。**一直显示「中转」而不是「直连」**刚连上时显示中转、过一会儿变成直连是正常的:先用中转保证能用,空闲时再换直连。一直是中转,说明 NAT 打洞没成功,常见于端口随机分配的 NAT 或严格的防火墙。功能不受影响,只是速度受服务器带宽限制。运行 `copysync-cli nat` 看本机探测到了几个出口:出口为 0 说明 UDP 被拦截了。**查看日志**-后台服务的日志在 `~/Library/Logs/CopySync/daemon.log`,服务器的日志用 `journalctl -u copysync-server -f` 查看。+后台服务的日志:Mac 上在 `~/Library/Logs/CopySync/daemon.log`,Windows 上在 `%LOCALAPPDATA%\CopySync\logs\daemon.log`。服务器的日志用 `journalctl -u copysync-server -f` 查看。## 许可diff --git a/design/windows-client.md b/design/windows-client.mdindex 71c50ff..62f6aa8 100644--- a/design/windows-client.md+++ b/design/windows-client.md@@ -1,6 +1,6 @@# Windows 客户端技术方案-> 状态:开发中,`windows` 分支(2026-10-09)+> 状态:已实现,随 1.2.0 发布(2026-10-09)。实机验证记录见 [windows-validation-2026-10-09.md](windows-validation-2026-10-09.md)> 目标版本:1.2.0(Mac 与 Windows 同时发布)> 相关:[多出口网络的 NAT 打洞](nat-traversal.md)diff --git a/docs/assets/site.css b/docs/assets/site.cssindex 9993153..c8176f4 100644--- a/docs/assets/site.css+++ b/docs/assets/site.css@@ -232,6 +232,18 @@ td code {height: 18px;}+/* 第二个下载按钮:描边,与主按钮并排时不抢主次 */+.button-alt {+ background: transparent;+ color: var(--blue);+ box-shadow: inset 0 0 0 1.5px var(--blue);+}++.button-alt:hover {+ background: var(--blue);+ color: #fff;+}+.cta .note {font-size: 0.875rem;color: var(--dim);@@ -741,6 +753,11 @@ tbody th {padding-left: 1.3rem;}+/* 同一栏里接着的下一段(Mac 之后的 Windows、配对),与上一段拉开距离 */+.install-steps + h3 {+ margin-top: 2rem;+}+.install-steps li {padding-left: 0.3rem;}diff --git a/docs/en/index.html b/docs/en/index.htmlindex f3ec9f4..4c1fd4c 100644--- a/docs/en/index.html+++ b/docs/en/index.html@@ -3,8 +3,8 @@<head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1">- <title>CopySync: sync the clipboard and files between Macs, across Apple IDs — open source</title>- <meta name="description" content="CopySync lets you copy on one Mac and paste on another: text, images, files and folders. Works across Apple IDs and networks. Peer-to-peer, end-to-end encrypted, with a server you host yourself that can't read your data. Free and MIT licensed.">+ <title>CopySync: sync the clipboard and files between Mac and Windows, across accounts and networks — open source</title>+ <meta name="description" content="CopySync lets you copy on one computer and paste on another, Mac or Windows: text, images, files and folders. Works across accounts and networks. Peer-to-peer, end-to-end encrypted, with a server you host yourself that can't read your data. Free and MIT licensed."><link rel="canonical" href="https://baiyuze.github.io/copysync/en/"><link rel="alternate" hreflang="zh-CN" href="https://baiyuze.github.io/copysync/"><link rel="alternate" hreflang="en" href="https://baiyuze.github.io/copysync/en/">@@ -14,8 +14,8 @@<meta property="og:type" content="website"><meta property="og:site_name" content="CopySync">- <meta property="og:title" content="CopySync: copy on one Mac, paste on the other">- <meta property="og:description" content="Text, images, files and folders. Across Apple IDs and networks, peer-to-peer and end-to-end encrypted, with a server you host. Free and open source.">+ <meta property="og:title" content="CopySync: copy on one computer, paste on the other">+ <meta property="og:description" content="Mac and Windows. Text, images, files and folders, across accounts and networks, peer-to-peer and end-to-end encrypted, with a server you host. Free and open source."><meta property="og:url" content="https://baiyuze.github.io/copysync/en/"><meta property="og:image" content="https://baiyuze.github.io/copysync/assets/og-en.png"><meta property="og:image:width" content="1200">@@ -37,10 +37,10 @@"@type": "SoftwareApplication","@id": "https://baiyuze.github.io/copysync/#app","name": "CopySync",- "description": "Open-source tool that syncs the clipboard and files between Macs. Copy text, images, files or folders on one Mac and paste them on another. Devices connect directly over WebRTC with DTLS encryption, falling back to a TURN relay on a server the user hosts.",+ "description": "Open-source tool that syncs the clipboard and files between Mac and Windows computers. Copy text, images, files or folders on one and paste them on another. Devices connect directly over WebRTC with DTLS encryption, falling back to a TURN relay on a server the user hosts.","applicationCategory": "UtilitiesApplication",- "operatingSystem": "macOS 13 or later (Intel and Apple silicon)",- "softwareVersion": "1.1.2",+ "operatingSystem": "macOS 13 or later (Intel and Apple silicon); Windows 10 and 11 (x64)",+ "softwareVersion": "1.2.0","datePublished": "2026-10-09","inLanguage": "en","license": "https://opensource.org/licenses/MIT",@@ -53,11 +53,11 @@"fileSize": "45MB","featureList": ["Syncs plain text, rich text, images, files and folders",- "Works across Apple IDs and across networks",+ "Works between Mac and Windows, across accounts and networks","Direct WebRTC connection with automatic TURN relay fallback","End-to-end DTLS encryption and fingerprint verification when pairing","Items under 50 MB are pushed on copy; larger files are pulled on demand",- "History of the last 3 days"+ "History of the last 3 days, with image preview"],"author": { "@type": "Person", "name": "baiyuze", "url": "https://github.com/baiyuze" }},@@ -67,7 +67,7 @@{"@type": "Question","name": "How is CopySync different from Universal Clipboard?",- "acceptedAnswer": { "@type": "Answer", "text": "Universal Clipboard needs both devices on the same Apple ID, with Bluetooth and Wi-Fi on, close to each other. CopySync only needs both Macs to reach your server, so different Apple IDs and different networks work. It also keeps a history and lets you pull large files on demand." }+ "acceptedAnswer": { "@type": "Answer", "text": "Universal Clipboard needs both devices on the same Apple ID, with Bluetooth and Wi-Fi on, close to each other. CopySync only needs both computers to reach your server, so different Apple IDs, different networks and Mac-to-Windows all work. It also keeps a history and lets you pull large files on demand." }},{"@type": "Question",@@ -86,18 +86,18 @@},{"@type": "Question",- "name": "Does CopySync support Windows or iPhone?",- "acceptedAnswer": { "@type": "Answer", "text": "Windows is planned. iPhone and iPad are not supported: iOS does not allow apps to watch the clipboard in the background, so copy-and-it's-there can't work the way it does on the Mac." }+ "name": "Does CopySync support Windows? iPhone?",+ "acceptedAnswer": { "@type": "Answer", "text": "Windows 10 and 11 (x64) are supported from version 1.2 and work together with Macs; pasted files are real files. iPhone and iPad are not supported: iOS does not allow apps to watch the clipboard in the background, so copy-and-it's-there can't work." }},{"@type": "Question",- "name": "Why does macOS say it can't verify the developer of CopySync?",- "acceptedAnswer": { "@type": "Answer", "text": "CopySync isn't notarized by Apple yet, which requires a paid developer account. Open System Settings, go to Privacy & Security and click Open Anyway. You only need to do this once." }+ "name": "Why does the system warn me the first time I open CopySync?",+ "acceptedAnswer": { "@type": "Answer", "text": "CopySync isn't notarized by Apple yet, and the Windows build isn't code-signed yet; both require paid certificates. On Mac, open System Settings, go to Privacy & Security and click Open Anyway. On Windows, click More info and then Run anyway in the \"Windows protected your PC\" prompt. You only need to do this once." }},{"@type": "Question","name": "How does CopySync handle large files?",- "acceptedAnswer": { "@type": "Answer", "text": "By default, anything under 50 MB is pushed to the other Mac as soon as you copy it. Larger files sync as a record, and you pull them from the history when you need them. The limit is adjustable from 1 MB to 1 GB." }+ "acceptedAnswer": { "@type": "Answer", "text": "By default, anything under 50 MB is pushed to the other computer as soon as you copy it. Larger files sync as a record, and you pull them from the history when you need them. The limit is adjustable from 1 MB to 1 GB." }},{"@type": "Question",@@ -132,27 +132,31 @@<main id="main"><section class="hero"><div class="wrap">- <h1>Copy on this Mac.<br>Paste on that one.</h1>- <p class="lede">Text, images, files, whole folders. No shared Apple ID required, no shared network required. Data moves directly between your devices, and stays encrypted even when it passes through your own server.</p>+ <h1>Copy on this computer.<br>Paste on that one.</h1>+ <p class="lede">Mac and Windows. Text, images, files, whole folders. No shared account required, no shared network required. Data moves directly between your devices, and stays encrypted even when it passes through your own server.</p><div class="cta"><a class="button" href="https://github.com/baiyuze/copysync/releases/latest/download/CopySync.dmg"><svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M10 3v10m0 0-4-4m4 4 4-4M4 16h12"/></svg>- Download for macOS+ Download for Mac</a>- <span class="note">Version 1.1.2, free and open source. macOS 13 or later, Intel and Apple silicon.</span>+ <a class="button button-alt" href="https://github.com/baiyuze/copysync/releases/latest/download/CopySync-Setup.exe">+ <svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M10 3v10m0 0-4-4m4 4 4-4M4 16h12"/></svg>+ Download for Windows+ </a>+ <span class="note">Version 1.2.0, free and open source. macOS 13 or later (Intel and Apple silicon); Windows 10 and 11.</span></div>- <div class="demo" role="img" aria-label="Demo: a file is selected on a MacBook Pro and copied with Command C, travels over a direct connection to a MacBook Air, and is pasted there with Command V">+ <div class="demo" role="img" aria-label="Demo: a file is selected on a MacBook and copied with Command C, travels over a direct connection to a Windows laptop, and is pasted there with Ctrl V"><figure class="mac mac-a"><div class="mac-screen"><div class="file"><svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.5" aria-hidden="true"><path d="M5 2.5h6.5L15.5 6.5V17a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V3a.5.5 0 0 1 .5-.5Z"/><path d="M11.5 2.5v4h4"/></svg>- <span>Q3 Review – final.key <small>38.2 MB</small></span>+ <span>Q3 Review – final.pptx <small>38.2 MB</small></span></div><div class="keys"><kbd>⌘</kbd><kbd>C</kbd></div></div><div class="mac-base"></div>- <figcaption>MacBook Pro</figcaption>+ <figcaption>MacBook</figcaption></figure><div class="link" aria-hidden="true"><span class="packet"></span>@@ -162,12 +166,12 @@<div class="mac-screen"><div class="file"><svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.5" aria-hidden="true"><path d="M5 2.5h6.5L15.5 6.5V17a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V3a.5.5 0 0 1 .5-.5Z"/><path d="M11.5 2.5v4h4"/></svg>- <span>Q3 Review – final.key <small>38.2 MB</small></span>+ <span>Q3 Review – final.pptx <small>38.2 MB</small></span></div>- <div class="keys"><kbd>⌘</kbd><kbd>V</kbd></div>+ <div class="keys"><kbd>Ctrl</kbd><kbd>V</kbd></div></div><div class="mac-base"></div>- <figcaption>MacBook Air</figcaption>+ <figcaption>Windows laptop</figcaption></figure></div><button class="replay" type="button">Play again</button>@@ -191,11 +195,12 @@<div class="wrap"><h2 id="why-title">Why not what's already there</h2><div class="prose">- <p>If you work on two Macs, you move things between them all day: a snippet of text, a screenshot, a file. The existing options each fall a little short:</p>+ <p>If you work on two computers, you move things between them all day: a snippet of text, a screenshot, a file. The existing options each fall a little short:</p><ul><li><strong>Universal Clipboard</strong> needs both Macs on the same Apple ID, close together, with Bluetooth and Wi‑Fi on. A work Mac and a personal one rarely share an Apple ID, and large files often fail halfway.</li><li><strong>AirDrop</strong> makes you pick a device and accept on the other side every time, and it moves files, not the clipboard.</li><li><strong>Messaging yourself</strong> means manual downloads, recompressed images, and files left on someone else's server.</li>+ <li><strong>With one Mac and one Windows PC</strong>, none of the built-in options work at all.</li></ul></div><div class="table-scroll">@@ -206,6 +211,7 @@</thead><tbody><tr><th scope="row">Different Apple IDs</th><td class="yes">Yes</td><td class="no">No</td><td class="partial">Needs accepting</td><td class="yes">Yes</td></tr>+ <tr><th scope="row">Between Mac and Windows</th><td class="yes">Yes</td><td class="no">No</td><td class="no">No</td><td class="yes">Yes</td></tr><tr><th scope="row">Different networks (home and office)</th><td class="yes">Yes</td><td class="no">No</td><td class="no">No</td><td class="yes">Yes</td></tr><tr><th scope="row">Paste right away, nothing to accept</th><td class="yes">Yes</td><td class="yes">Yes</td><td class="no">No</td><td class="no">No</td></tr><tr><th scope="row">Files and whole folders</th><td class="yes">Yes</td><td class="partial">Unreliable</td><td class="yes">Yes</td><td class="partial">Zip first</td></tr>@@ -220,12 +226,12 @@<section class="section section-band" id="how" aria-labelledby="how-title"><div class="wrap"><h2 id="how-title">How it works</h2>- <p class="intro">Your two Macs open an encrypted connection to each other. Your server only helps them find one another, and relays traffic when a direct path can't be made.</p>+ <p class="intro">Your two computers open an encrypted connection to each other. Your server only helps them find one another, and relays traffic when a direct path can't be made.</p><figure class="diagram"><svg viewBox="0 0 960 400" role="img" aria-labelledby="diagram-title diagram-desc"><title id="diagram-title">How CopySync connects</title>- <desc id="diagram-desc">Mac A and Mac B connect directly over WebRTC. Both connect to your server for signaling. If the direct connection fails, data is relayed through the server's TURN service.</desc>+ <desc id="diagram-desc">Computer A and computer B (Mac or Windows) connect directly over WebRTC. Both connect to your server for signaling. If the direct connection fails, data is relayed through the server's TURN service.</desc><rect class="d-box" x="360" y="24" width="240" height="96" rx="14"/><text class="d-title" x="480" y="64" text-anchor="middle">Your server</text><text class="d-sub" x="480" y="92" text-anchor="middle">Signaling, STUN, TURN relay</text>@@ -238,15 +244,15 @@<text class="d-note" x="206" y="128">Relay: only if direct fails</text><rect class="d-box" x="40" y="210" width="240" height="120" rx="14"/>- <text class="d-title" x="160" y="262" text-anchor="middle">Mac A</text>+ <text class="d-title" x="160" y="262" text-anchor="middle">Mac</text><text class="d-sub" x="160" y="290" text-anchor="middle">You copy here</text><rect class="d-box" x="680" y="210" width="240" height="120" rx="14"/>- <text class="d-title" x="800" y="262" text-anchor="middle">Mac B</text>+ <text class="d-title" x="800" y="262" text-anchor="middle">Mac or Windows</text><text class="d-sub" x="800" y="290" text-anchor="middle">You paste here</text><path class="d-direct" d="M280 270H680"/><text class="d-label" x="480" y="256" text-anchor="middle">Direct WebRTC, DTLS encrypted</text>- <text class="d-note" x="480" y="298" text-anchor="middle">Data moves only between your Macs</text>+ <text class="d-note" x="480" y="298" text-anchor="middle">Data moves only between your computers</text><g class="d-legend" transform="translate(40 372)"><path class="d-direct" d="M0 0H28"/><text x="38" y="5">Data (direct)</text>@@ -260,7 +266,7 @@<ol class="steps"><li><h3>Notice</h3>- <p>The background service checks the clipboard's change count at short intervals. Reading the count and types needs no permission and never shows a prompt.</p>+ <p>On Mac, the background service checks the clipboard's change count at short intervals; reading the count and types needs no permission and never shows a prompt. On Windows, the system tells it the moment you copy.</p></li><li><h3>Send</h3>@@ -268,7 +274,7 @@</li><li><h3>Paste</h3>- <p>The other Mac stores the content locally, then puts it on the clipboard. What you paste with ⌘V is a real local file.</p>+ <p>The other computer stores the content locally, then puts it on the clipboard. What you paste with ⌘V or Ctrl+V is a real local file.</p></li></ol></div>@@ -354,7 +360,7 @@<h2 id="fallback-title">When things go wrong</h2><p class="intro">Every network is different. Each of these cases was considered, and each has a test.</p><dl class="fallbacks">- <dt>No direct path between the Macs</dt>+ <dt>No direct path between the computers</dt><dd>Common behind symmetric NAT and corporate firewalls. Traffic switches to the TURN relay on your server, still encrypted, and the device list shows "relay".</dd><dt>Public STUN servers unreachable</dt><dd>Public STUN is unreliable in some regions, including mainland China. Your server runs its own STUN, and clients prefer it.</dd>@@ -370,10 +376,14 @@<dd>Above the limit only a record is synced, pulled when you need it. If the source file is gone by then, you get a clear message instead of a vague failure.</dd><dt>Pasting into plain-text fields</dt><dd>Rich text copied from the web is written as both HTML and plain text, so no markup leaks into what you paste.</dd>+ <dt>A file name Windows doesn't allow</dt>+ <dd>Colons, question marks and a few other characters are fine in Mac file names but not on Windows. They arrive as the matching full-width characters, so the name still reads the same, and two names that differ only in case never overwrite each other.</dd>+ <dt>Copying a password</dt>+ <dd>On Windows, password managers mark what they copy as "don't record". CopySync skips it: not synced, not kept in the history.</dd><dt>Clipboard access not granted yet</dt><dd>Content isn't read, which would block on a prompt a background process can't show. The app asks you to grant access and links straight to the setting.</dd><dt>Background service crashes</dt>- <dd>macOS's launchd restarts it, throttled to once every 10 seconds.</dd>+ <dd>launchd on Mac, and CopySync's own supervisor on Windows, restart it, throttled to once every 10 seconds.</dd><dt>App updated or moved</dt><dd>On launch the app re-points its login item and restarts the service on the new version.</dd></dl>@@ -383,10 +393,10 @@<section class="section section-band" id="install" aria-labelledby="install-title"><div class="wrap"><h2 id="install-title">Install</h2>- <p class="intro">Install the app on each Mac, and set up a server both of them can reach. If both Macs share a LAN, the server can run on one of them.</p>+ <p class="intro">Install the app on each computer, and set up a server both of them can reach. If both share a LAN, the server can run on one of your Macs.</p><div class="two-col"><div>- <h3>On each Mac</h3>+ <h3>On a Mac</h3><ol class="install-steps"><li>Download <a href="https://github.com/baiyuze/copysync/releases/latest/download/CopySync.dmg">CopySync.dmg</a>, open it and drag CopySync into Applications.</li><li>Open it from Applications.@@ -394,8 +404,16 @@<li>Click 启用后台同步 (Enable background sync).</li><li>In 设置 (Settings), enter your server as <code>ws://server-address:8787/signal</code> and press Return.</li><li>When macOS asks whether CopySync may read the clipboard, allow it.</li>- <li>On one Mac, choose 设备 → 添加设备 (Devices → Add device) to get a 6-character code; enter it on the other, and confirm once both screens show the same two fingerprints.</li></ol>+ <h3>On Windows</h3>+ <ol class="install-steps">+ <li>Download <a href="https://github.com/baiyuze/copysync/releases/latest/download/CopySync-Setup.exe">CopySync-Setup.exe</a> and run it. It installs for the current user, no administrator rights needed.+ <span class="aside">CopySync isn't code-signed yet, so Windows says "Windows protected your PC": click More info, then Run anyway. To skip the installer, get the <a href="https://github.com/baiyuze/copysync/releases/latest/download/CopySync-windows-x64.zip">portable zip</a>.</span></li>+ <li>Open CopySync and click 启用后台同步 (Enable background sync). After you close the window it keeps running in the notification area.</li>+ <li>In 设置 (Settings), enter your server address and press Enter. Allow it if Windows Firewall asks.</li>+ </ol>+ <h3>Pairing</h3>+ <p class="aside-p">On one computer, choose 设备 → 添加设备 (Devices → Add device) to get a 6-character code; enter it on the other, and confirm once both screens show the same two fingerprints. Mac with Windows, or two Windows PCs, works the same way.</p></div><div><h3>On the server</h3>@@ -428,8 +446,9 @@ sudo ./install.sh YOUR_PUBLIC_IP</code></pre><div class="table-scroll"><table class="specs"><tbody>- <tr><th scope="row">Version</th><td>1.1.2, released <time datetime="2026-10-09">October 9, 2026</time></td></tr>+ <tr><th scope="row">Version</th><td>1.2.0, released <time datetime="2026-10-09">October 9, 2026</time></td></tr><tr><th scope="row">Mac app</th><td>macOS 13 Ventura or later; universal binary for Intel and Apple silicon, no Rosetta; 45 MB download</td></tr>+ <tr><th scope="row">Windows app</th><td>Windows 10 (21H2 or later) and Windows 11, x64; installs per user, no administrator rights; about 21 MB download</td></tr><tr><th scope="row">Server</th><td>Linux on x86_64 or ARM64 (systemd or Docker), or macOS; about 15 MB of RAM</td></tr><tr><th scope="row">Content</th><td>Plain text, rich text, images and screenshots, files, folders; each type can be turned off</td></tr><tr><th scope="row">Transport</th><td>WebRTC data channels, direct first with TURN relay fallback; every uplink probed on multi-uplink networks; files streamed as tar + zstd</td></tr>@@ -438,7 +457,7 @@ sudo ./install.sh YOUR_PUBLIC_IP</code></pre><tr><th scope="row">Auto-sync limit</th><td>50 MB by default, adjustable from 1 MB to 1 GB</td></tr><tr><th scope="row">History</th><td>3 days by default, adjustable from 1 hour to 30 days; expired items removed automatically</td></tr><tr><th scope="row">Measured speed</th><td>A 20 MB file transfers in about 330 ms over a direct LAN connection, checksums matching</td></tr>- <tr><th scope="row">Built with</th><td>Go for the background service and server, Flutter for the app, Protocol Buffers for messages</td></tr>+ <tr><th scope="row">Built with</th><td>Go for the background service and server (pure Go calling Win32 on Windows), Flutter for the app (one codebase for Mac and Windows), Protocol Buffers for messages</td></tr><tr><th scope="row">License</th><td>MIT</td></tr></tbody></table>@@ -453,7 +472,7 @@ sudo ./install.sh YOUR_PUBLIC_IP</code></pre><details><summary>How is this different from Universal Clipboard?</summary><div class="answer">- <p>Universal Clipboard needs both devices on the same Apple ID, with Bluetooth and Wi‑Fi on, close to each other. CopySync only needs both Macs to reach your server, so different Apple IDs work, and so does one Mac at home and one at the office. It also keeps a history and lets you pull large files on demand.</p>+ <p>Universal Clipboard needs both devices on the same Apple ID, with Bluetooth and Wi‑Fi on, close to each other. CopySync only needs both computers to reach your server, so different Apple IDs work, one Mac and one Windows PC work, and so does one at home and one at the office. It also keeps a history and lets you pull large files on demand.</p><p>If your Macs share an Apple ID, sit side by side, and you mostly copy text, the built-in feature is already enough.</p></div></details>@@ -478,19 +497,21 @@ sudo ./install.sh YOUR_PUBLIC_IP</code></pre><details><summary>Windows? iPhone?</summary><div class="answer">- <p>Windows is planned. iPhone and iPad aren't supported: iOS doesn't let apps watch the clipboard in the background, so copy-and-it's-there can't work the way it does on the Mac.</p>+ <p>Windows 10 and 11 (x64) are supported from version 1.2 and work together with Macs. Files you paste on Windows are real files you can drop into Explorer, WeChat or Office.</p>+ <p>iPhone and iPad aren't supported: iOS doesn't let apps watch the clipboard in the background, so copy-and-it's-there can't work.</p></div></details><details>- <summary>Why does macOS say it can't verify the developer?</summary>+ <summary>Why does the system warn me the first time?</summary><div class="answer">- <p>CopySync isn't notarized by Apple yet, which requires a paid developer account. Open System Settings → Privacy & Security and click Open Anyway near the bottom. You only do this once. You can also build it from source.</p>+ <p>CopySync isn't notarized by Apple yet, and the Windows build isn't code-signed yet; both require paid certificates.</p>+ <p>On Mac, open System Settings → Privacy & Security and click Open Anyway near the bottom. On Windows, click More info and then Run anyway in the "Windows protected your PC" prompt. You only do this once. You can also build it from source.</p></div></details><details><summary>What about large files?</summary><div class="answer">- <p>By default, anything under 50 MB is pushed to the other Mac as you copy it, so you can paste right away. Larger files sync as a record; pull them from the history when you need them. The limit is adjustable in Settings.</p>+ <p>By default, anything under 50 MB is pushed to the other computer as you copy it, so you can paste right away. Larger files sync as a record; pull them from the history when you need them. The limit is adjustable in Settings.</p></div></details><details>@@ -505,9 +526,10 @@ sudo ./install.sh YOUR_PUBLIC_IP</code></pre><section class="closing" aria-labelledby="closing-title"><div class="wrap">- <h2 id="closing-title">Two Macs, one clipboard.</h2>+ <h2 id="closing-title">Two computers, one clipboard.</h2><div class="cta">- <a class="button" href="https://github.com/baiyuze/copysync/releases/latest/download/CopySync.dmg">Download for macOS</a>+ <a class="button" href="https://github.com/baiyuze/copysync/releases/latest/download/CopySync.dmg">Download for Mac</a>+ <a class="button button-alt" href="https://github.com/baiyuze/copysync/releases/latest/download/CopySync-Setup.exe">Download for Windows</a><a href="https://github.com/baiyuze/copysync">View the source on GitHub</a></div></div>diff --git a/docs/index.html b/docs/index.htmlindex e31625f..40831d2 100644--- a/docs/index.html+++ b/docs/index.html@@ -3,8 +3,8 @@<head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1">- <title>CopySync:在两台 Mac 之间同步剪贴板与文件,跨 Apple ID,开源免费</title>- <meta name="description" content="CopySync 让你在一台 Mac 上复制,另一台 Mac 上直接粘贴。支持文本、图片、文件和文件夹,不要求同一个 Apple ID,跨网络可用。设备间 P2P 直连、端到端加密,服务器自己部署且看不到内容。MIT 开源。">+ <title>CopySync:在 Mac 与 Windows 之间同步剪贴板与文件,跨账号跨网络,开源免费</title>+ <meta name="description" content="CopySync 让你在一台电脑上复制,另一台上直接粘贴,Mac 与 Windows 互通。支持文本、图片、文件和文件夹,不要求同一个账号,跨网络可用。设备间 P2P 直连、端到端加密,服务器自己部署且看不到内容。MIT 开源。"><link rel="canonical" href="https://baiyuze.github.io/copysync/"><link rel="alternate" hreflang="zh-CN" href="https://baiyuze.github.io/copysync/"><link rel="alternate" hreflang="en" href="https://baiyuze.github.io/copysync/en/">@@ -14,8 +14,8 @@<meta property="og:type" content="website"><meta property="og:site_name" content="CopySync">- <meta property="og:title" content="CopySync:在这台 Mac 复制,到那台 Mac 粘贴">- <meta property="og:description" content="文本、图片、文件、文件夹。跨 Apple ID、跨网络,P2P 直连、端到端加密,服务器自己部署。开源免费。">+ <meta property="og:title" content="CopySync:在这台电脑复制,到那台电脑粘贴">+ <meta property="og:description" content="Mac 与 Windows 互通。文本、图片、文件、文件夹,跨账号、跨网络,P2P 直连、端到端加密,服务器自己部署。开源免费。"><meta property="og:url" content="https://baiyuze.github.io/copysync/"><meta property="og:image" content="https://baiyuze.github.io/copysync/assets/og.png"><meta property="og:image:width" content="1200">@@ -37,10 +37,10 @@"@type": "SoftwareApplication","@id": "https://baiyuze.github.io/copysync/#app","name": "CopySync",- "description": "在两台 Mac 之间同步剪贴板与文件的开源工具。复制文本、图片、文件或文件夹后,另一台 Mac 可直接粘贴。设备间 WebRTC 直连、DTLS 端到端加密,打不通时经用户自建服务器的 TURN 中转。",+ "description": "在 Mac 与 Windows 电脑之间同步剪贴板与文件的开源工具。复制文本、图片、文件或文件夹后,另一台电脑可直接粘贴。设备间 WebRTC 直连、DTLS 端到端加密,打不通时经用户自建服务器的 TURN 中转。","applicationCategory": "UtilitiesApplication",- "operatingSystem": "macOS 13 及以上(Intel 与 Apple 芯片)",- "softwareVersion": "1.1.2",+ "operatingSystem": "macOS 13 及以上(Intel 与 Apple 芯片);Windows 10、Windows 11(x64)",+ "softwareVersion": "1.2.0","datePublished": "2026-10-09","inLanguage": "zh-CN","license": "https://opensource.org/licenses/MIT",@@ -53,11 +53,11 @@"fileSize": "45MB","featureList": ["同步纯文本、带格式的文本、图片、文件与文件夹",- "不要求同一个 Apple ID,跨网络可用",+ "Mac 与 Windows 互通,不要求同一个账号,跨网络可用","WebRTC 直连,打不通时自动经 TURN 中转","DTLS 端到端加密,配对时人工核对安全指纹","50 MB 以内复制即推送,更大的文件按需拉取",- "最近 3 天的复制记录"+ "最近 3 天的复制记录,图片可以预览"],"author": { "@type": "Person", "name": "baiyuze", "url": "https://github.com/baiyuze" }},@@ -67,7 +67,7 @@{"@type": "Question","name": "CopySync 和 macOS 自带的通用剪贴板有什么区别?",- "acceptedAnswer": { "@type": "Answer", "text": "通用剪贴板要求两台设备登录同一个 Apple ID、开着蓝牙和 Wi-Fi 并且离得近。CopySync 只要求两台 Mac 都能连上你部署的服务器,不同 Apple ID、不同网络都可以,另外有复制记录和大文件按需拉取。" }+ "acceptedAnswer": { "@type": "Answer", "text": "通用剪贴板要求两台设备登录同一个 Apple ID、开着蓝牙和 Wi-Fi 并且离得近。CopySync 只要求两台电脑都能连上你部署的服务器,不同 Apple ID、不同网络都可以,还能在 Mac 与 Windows 之间使用,另外有复制记录和大文件按需拉取。" }},{"@type": "Question",@@ -82,22 +82,22 @@{"@type": "Question","name": "使用 CopySync 必须自己准备服务器吗?",- "acceptedAnswer": { "@type": "Answer", "text": "是的,CopySync 不提供公共服务器。两台 Mac 在同一个局域网时,在其中一台上运行服务器即可;跨网络使用需要一台有公网 IP 的服务器,最低配置的云主机就够。" }+ "acceptedAnswer": { "@type": "Answer", "text": "是的,CopySync 不提供公共服务器。两台电脑在同一个局域网时,在其中一台 Mac 上运行服务器即可;跨网络使用需要一台有公网 IP 的服务器,最低配置的云主机就够。" }},{"@type": "Question",- "name": "CopySync 支持 Windows 和 iPhone 吗?",- "acceptedAnswer": { "@type": "Answer", "text": "Windows 版在计划中。iPhone 和 iPad 暂不支持:iOS 不允许 App 在后台监听剪贴板,做不到 Mac 上那样复制后立即同步。" }+ "name": "CopySync 支持 Windows 吗?iPhone 呢?",+ "acceptedAnswer": { "@type": "Answer", "text": "支持 Windows 10 与 Windows 11(x64),从 1.2 版起与 Mac 互通,粘贴文件得到的是真实文件。iPhone 和 iPad 暂不支持:iOS 不允许 App 在后台监听剪贴板,做不到复制后立即同步。" }},{"@type": "Question",- "name": "为什么第一次打开 CopySync 提示无法验证开发者?",- "acceptedAnswer": { "@type": "Answer", "text": "CopySync 还没有经过 Apple 公证,公证需要付费的开发者账号。到系统设置的隐私与安全性页面,点击「仍要打开」即可,只需要操作一次。" }+ "name": "为什么第一次打开 CopySync 时系统会拦一下?",+ "acceptedAnswer": { "@type": "Answer", "text": "CopySync 还没有经过 Apple 公证,Windows 版也还没有代码签名,两者都需要付费的证书。Mac 上到系统设置的隐私与安全性页面点击「仍要打开」;Windows 上在「Windows 已保护你的电脑」提示里点「更多信息」再点「仍要运行」。只需要操作一次。" }},{"@type": "Question","name": "CopySync 怎么处理大文件?",- "acceptedAnswer": { "@type": "Answer", "text": "默认 50 MB 以内的内容在复制时直接推送到另一台 Mac;更大的文件只同步一条记录,需要时在复制记录里点「拉取到本机」。上限可以在设置里调整,范围 1 MB 到 1 GB。" }+ "acceptedAnswer": { "@type": "Answer", "text": "默认 50 MB 以内的内容在复制时直接推送到另一台电脑;更大的文件只同步一条记录,需要时在复制记录里点「拉取到本机」。上限可以在设置里调整,范围 1 MB 到 1 GB。" }},{"@type": "Question",@@ -132,27 +132,31 @@<main id="main"><section class="hero"><div class="wrap">- <h1>在这台 Mac 复制,<br>到那台 Mac 粘贴。</h1>- <p class="lede">文本、图片、文件、整个文件夹都可以。不要求同一个 Apple ID,也不要求在同一个网络。数据在你的设备之间直接传输,经过你自己的服务器时也是加密的。</p>+ <h1>在这台电脑复制,<br>到那台电脑粘贴。</h1>+ <p class="lede">Mac 与 Windows 互通。文本、图片、文件、整个文件夹都可以,不要求同一个账号,也不要求在同一个网络。数据在你的设备之间直接传输,经过你自己的服务器时也是加密的。</p><div class="cta"><a class="button" href="https://github.com/baiyuze/copysync/releases/latest/download/CopySync.dmg"><svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M10 3v10m0 0-4-4m4 4 4-4M4 16h12"/></svg>- 下载 macOS 版+ 下载 Mac 版</a>- <span class="note">版本 1.1.2,免费开源。macOS 13 及以上,Intel 与 Apple 芯片通用。</span>+ <a class="button button-alt" href="https://github.com/baiyuze/copysync/releases/latest/download/CopySync-Setup.exe">+ <svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M10 3v10m0 0-4-4m4 4 4-4M4 16h12"/></svg>+ 下载 Windows 版+ </a>+ <span class="note">版本 1.2.0,免费开源。macOS 13 及以上(Intel 与 Apple 芯片通用);Windows 10、11。</span></div>- <div class="demo" role="img" aria-label="演示:在 MacBook Pro 上选中文件并按下 Command C,文件经直连传到 MacBook Air,在那里按下 Command V 粘贴出来">+ <div class="demo" role="img" aria-label="演示:在 MacBook 上选中文件并按下 Command C,文件经直连传到 Windows 笔记本,在那里按下 Ctrl V 粘贴出来"><figure class="mac mac-a"><div class="mac-screen"><div class="file"><svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.5" aria-hidden="true"><path d="M5 2.5h6.5L15.5 6.5V17a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V3a.5.5 0 0 1 .5-.5Z"/><path d="M11.5 2.5v4h4"/></svg>- <span>季度汇报-终版.key <small>38.2 MB</small></span>+ <span>季度汇报-终版.pptx <small>38.2 MB</small></span></div><div class="keys"><kbd>⌘</kbd><kbd>C</kbd></div></div><div class="mac-base"></div>- <figcaption>MacBook Pro</figcaption>+ <figcaption>MacBook</figcaption></figure><div class="link" aria-hidden="true"><span class="packet"></span>@@ -162,12 +166,12 @@<div class="mac-screen"><div class="file"><svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.5" aria-hidden="true"><path d="M5 2.5h6.5L15.5 6.5V17a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V3a.5.5 0 0 1 .5-.5Z"/><path d="M11.5 2.5v4h4"/></svg>- <span>季度汇报-终版.key <small>38.2 MB</small></span>+ <span>季度汇报-终版.pptx <small>38.2 MB</small></span></div>- <div class="keys"><kbd>⌘</kbd><kbd>V</kbd></div>+ <div class="keys"><kbd>Ctrl</kbd><kbd>V</kbd></div></div><div class="mac-base"></div>- <figcaption>MacBook Air</figcaption>+ <figcaption>Windows 笔记本</figcaption></figure></div><button class="replay" type="button">再演示一次</button>@@ -191,11 +195,12 @@<div class="wrap"><h2 id="why-title">为什么不用现有的办法</h2><div class="prose">- <p>手边有两台 Mac 的人,每天都要把东西从这台挪到那台:一段文字、一张截图、一个文件。现有的办法都差一点:</p>+ <p>手边有两台电脑的人,每天都要把东西从这台挪到那台:一段文字、一张截图、一个文件。现有的办法都差一点:</p><ul><li><strong>通用剪贴板</strong>要求两台设备登录同一个 Apple ID、离得足够近、蓝牙和 Wi‑Fi 都开着。公司的电脑和自己的电脑很少是同一个 Apple ID,大文件也经常复制到一半就没了。</li><li><strong>隔空投送</strong>每次都要选设备、在另一台上点接收,而且只传文件,不管剪贴板。</li><li><strong>用聊天软件发给自己</strong>要手动下载,图片会被压缩,文件还会留在别人的服务器上。</li>+ <li><strong>一台 Mac、一台 Windows</strong> 时,系统自带的办法一个都用不了。</li></ul></div><div class="table-scroll">@@ -206,6 +211,7 @@</thead><tbody><tr><th scope="row">不同 Apple ID 之间</th><td class="yes">可以</td><td class="no">不行</td><td class="partial">要对方接收</td><td class="yes">可以</td></tr>+ <tr><th scope="row">Mac 与 Windows 之间</th><td class="yes">可以</td><td class="no">不行</td><td class="no">不行</td><td class="yes">可以</td></tr><tr><th scope="row">不在同一个网络(家里和公司)</th><td class="yes">可以</td><td class="no">不行</td><td class="no">不行</td><td class="yes">可以</td></tr><tr><th scope="row">复制后直接粘贴,不用点接收</th><td class="yes">可以</td><td class="yes">可以</td><td class="no">不行</td><td class="no">不行</td></tr><tr><th scope="row">文件与整个文件夹</th><td class="yes">可以</td><td class="partial">不稳定</td><td class="yes">可以</td><td class="partial">要先打包</td></tr>@@ -220,12 +226,12 @@<section class="section section-band" id="how" aria-labelledby="how-title"><div class="wrap"><h2 id="how-title">工作原理</h2>- <p class="intro">两台 Mac 之间直接建立加密连接。你的服务器只负责让它们找到彼此,打不通直连的时候再帮忙转发。</p>+ <p class="intro">两台电脑之间直接建立加密连接。你的服务器只负责让它们找到彼此,打不通直连的时候再帮忙转发。</p><figure class="diagram"><svg viewBox="0 0 960 400" role="img" aria-labelledby="diagram-title diagram-desc"><title id="diagram-title">CopySync 的连接方式</title>- <desc id="diagram-desc">Mac A 与 Mac B 之间是 WebRTC 直连;两台 Mac 都通过信令连接到你的服务器;直连失败时,数据经服务器的 TURN 中转。</desc>+ <desc id="diagram-desc">电脑 A 与电脑 B(Mac 或 Windows)之间是 WebRTC 直连;两台电脑都通过信令连接到你的服务器;直连失败时,数据经服务器的 TURN 中转。</desc><rect class="d-box" x="360" y="24" width="240" height="96" rx="14"/><text class="d-title" x="480" y="64" text-anchor="middle">你的服务器</text><text class="d-sub" x="480" y="92" text-anchor="middle">信令、STUN、TURN 中转</text>@@ -238,15 +244,15 @@<text class="d-note" x="210" y="128">中转:仅在打不通直连时</text><rect class="d-box" x="40" y="210" width="240" height="120" rx="14"/>- <text class="d-title" x="160" y="262" text-anchor="middle">Mac A</text>+ <text class="d-title" x="160" y="262" text-anchor="middle">Mac</text><text class="d-sub" x="160" y="290" text-anchor="middle">在这里复制</text><rect class="d-box" x="680" y="210" width="240" height="120" rx="14"/>- <text class="d-title" x="800" y="262" text-anchor="middle">Mac B</text>+ <text class="d-title" x="800" y="262" text-anchor="middle">Mac 或 Windows</text><text class="d-sub" x="800" y="290" text-anchor="middle">在这里粘贴</text><path class="d-direct" d="M280 270H680"/><text class="d-label" x="480" y="256" text-anchor="middle">WebRTC 直连,DTLS 加密</text>- <text class="d-note" x="480" y="298" text-anchor="middle">数据只在两台 Mac 之间传输</text>+ <text class="d-note" x="480" y="298" text-anchor="middle">数据只在两台电脑之间传输</text><g class="d-legend" transform="translate(40 372)"><path class="d-direct" d="M0 0H28"/><text x="38" y="5">数据(直连)</text>@@ -260,7 +266,7 @@<ol class="steps"><li><h3>感知</h3>- <p>后台服务每隔一小段时间检查剪贴板的变更计数。只看计数和类型不需要授权,也不会弹出系统提示。</p>+ <p>Mac 上,后台服务每隔一小段时间检查剪贴板的变更计数,只看计数和类型不需要授权,也不会弹出系统提示;Windows 上,复制的那一刻系统就会通知它。</p></li><li><h3>传输</h3>@@ -268,7 +274,7 @@</li><li><h3>粘贴</h3>- <p>另一台 Mac 先把内容存到本地,再写入剪贴板。按下 ⌘V 粘贴出来的,就是本地的真实文件。</p>+ <p>另一台电脑先把内容存到本地,再写入剪贴板。按下 ⌘V 或 Ctrl+V 粘贴出来的,就是本地的真实文件。</p></li></ol></div>@@ -354,7 +360,7 @@<h2 id="fallback-title">出问题的时候会发生什么</h2><p class="intro">每个人的网络环境都不一样。下面这些情况都考虑过,也都有对应的测试。</p><dl class="fallbacks">- <dt>两台 Mac 打不通直连</dt>+ <dt>两台电脑打不通直连</dt><dd>常见于对称 NAT 和公司防火墙。自动改走你服务器上的 TURN 中转,内容依然加密,设备列表里显示「中转」。</dd><dt>公共 STUN 服务器连不上</dt><dd>国内访问公共 STUN 时通时断。服务器自带 STUN,客户端优先用它。</dd>@@ -370,10 +376,14 @@<dd>超过上限的只同步一条记录,需要时再拉取。拉取时源文件已经被删,会明确告诉你,而不是不明不白地失败。</dd><dt>粘贴到只认纯文本的地方</dt><dd>从网页复制的带格式文字会同时写入 HTML 和纯文本两份,粘贴到哪里都不会冒出标签。</dd>+ <dt>文件名在 Windows 上不合法</dt>+ <dd>Mac 上可以用的冒号、问号等字符,Windows 不允许出现在文件名里。收到时换成对应的全角字符,名字照样看得懂;只差大小写的两个文件也不会互相覆盖。</dd>+ <dt>复制的是密码</dt>+ <dd>Windows 上,密码管理器复制的内容会带一个「不要记录」的标记,CopySync 看到就跳过:不同步,也不进复制记录。</dd><dt>还没授权读取剪贴板</dt><dd>不去读内容,否则后台进程会卡在一个看不见的系统弹窗上。App 里会提示你去授权,并给出直达按钮。</dd><dt>后台服务崩溃</dt>- <dd>由 macOS 的 launchd 自动拉起,10 秒节流,不会疯狂重启。</dd>+ <dd>Mac 上由系统的 launchd、Windows 上由 CopySync 自带的守护进程自动拉起,10 秒节流,不会疯狂重启。</dd><dt>更新了 App,或者把它挪了位置</dt><dd>打开 App 时会自动校正登录项,并把后台服务重启到新版本。</dd></dl>@@ -383,10 +393,10 @@<section class="section section-band" id="install" aria-labelledby="install-title"><div class="wrap"><h2 id="install-title">安装</h2>- <p class="intro">每台 Mac 装一个 App,再准备一台两边都能访问到的服务器。两台 Mac 在同一个局域网的话,服务器直接跑在其中一台上就行。</p>+ <p class="intro">每台电脑装一个 App,再准备一台两边都能访问到的服务器。两台电脑在同一个局域网的话,服务器直接跑在其中一台 Mac 上就行。</p><div class="two-col"><div>- <h3>在每台 Mac 上</h3>+ <h3>在 Mac 上</h3><ol class="install-steps"><li>下载 <a href="https://github.com/baiyuze/copysync/releases/latest/download/CopySync.dmg">CopySync.dmg</a>,打开后把 CopySync 拖进「应用程序」。</li><li>从「应用程序」里打开。@@ -394,8 +404,16 @@<li>点「启用后台同步」。</li><li>在「设置」里填入服务器地址 <code>ws://服务器地址:8787/signal</code>,按回车。</li><li>系统询问是否允许读取剪贴板时,选择允许。</li>- <li>一台点「设备 → 添加设备」生成 6 位配对码,另一台输入它;两块屏幕上的两行安全指纹完全一致后确认。</li></ol>+ <h3>在 Windows 上</h3>+ <ol class="install-steps">+ <li>下载 <a href="https://github.com/baiyuze/copysync/releases/latest/download/CopySync-Setup.exe">CopySync-Setup.exe</a> 并运行。装在当前用户目录下,不需要管理员权限。+ <span class="aside">CopySync 还没有代码签名,Windows 会提示「Windows 已保护你的电脑」:点「更多信息」,再点「仍要运行」。不想运行安装程序的话,可以下载<a href="https://github.com/baiyuze/copysync/releases/latest/download/CopySync-windows-x64.zip">便携版</a>。</span></li>+ <li>打开 CopySync,点「启用后台同步」。关掉窗口后它在右下角的托盘里继续运行。</li>+ <li>在「设置」里填入服务器地址,按回车。防火墙询问时选择允许。</li>+ </ol>+ <h3>配对</h3>+ <p class="aside-p">一台点「设备 → 添加设备」生成 6 位配对码,另一台输入它;两块屏幕上的两行安全指纹完全一致后确认。Mac 与 Windows 之间、两台 Windows 之间都一样。</p></div><div><h3>在服务器上</h3>@@ -428,8 +446,9 @@ sudo ./install.sh 你的公网IP</code></pre><div class="table-scroll"><table class="specs"><tbody>- <tr><th scope="row">版本</th><td>1.1.2,<time datetime="2026-10-09">2026 年 10 月 9 日</time>发布</td></tr>+ <tr><th scope="row">版本</th><td>1.2.0,<time datetime="2026-10-09">2026 年 10 月 9 日</time>发布</td></tr><tr><th scope="row">Mac 客户端</th><td>macOS 13 Ventura 及以上;Intel 与 Apple 芯片通用,不需要 Rosetta;安装包 45 MB</td></tr>+ <tr><th scope="row">Windows 客户端</th><td>Windows 10(21H2 及以上)与 Windows 11,x64;按用户安装,不需要管理员权限;安装包约 21 MB</td></tr><tr><th scope="row">服务器</th><td>Linux x86_64 或 ARM64(systemd 或 Docker),也可以运行在 macOS 上;约 15 MB 内存</td></tr><tr><th scope="row">同步的内容</th><td>纯文本、带格式的文本、图片与截图、文件、文件夹,可以按类型关闭</td></tr><tr><th scope="row">传输</th><td>WebRTC 数据通道,直连优先,打不通时经 TURN 中转;多出口网络逐个探测每个出口;文件以 tar + zstd 流式打包</td></tr>@@ -438,7 +457,7 @@ sudo ./install.sh 你的公网IP</code></pre><tr><th scope="row">自动同步上限</th><td>默认 50 MB,可在 1 MB 到 1 GB 之间调整</td></tr><tr><th scope="row">记录保留</th><td>默认 3 天,可在 1 小时到 30 天之间调整,到期自动清理</td></tr><tr><th scope="row">实测速度</th><td>局域网直连传输 20 MB 文件约 330 毫秒,校验和一致</td></tr>- <tr><th scope="row">技术栈</th><td>后台服务与服务器用 Go,界面用 Flutter,消息定义用 Protocol Buffers</td></tr>+ <tr><th scope="row">技术栈</th><td>后台服务与服务器用 Go(Windows 上纯 Go 调用 Win32),界面用 Flutter(Mac 与 Windows 共用一套代码),消息定义用 Protocol Buffers</td></tr><tr><th scope="row">许可</th><td>MIT 开源</td></tr></tbody></table>@@ -453,7 +472,7 @@ sudo ./install.sh 你的公网IP</code></pre><details><summary>和 macOS 自带的「通用剪贴板」有什么区别?</summary><div class="answer">- <p>通用剪贴板要求两台设备登录同一个 Apple ID、开着蓝牙和 Wi‑Fi,并且离得近。CopySync 只要求两台 Mac 都能连上你部署的服务器:不同 Apple ID、一台在家一台在公司,都可以。另外它有复制记录,大文件也可以按需拉取。</p>+ <p>通用剪贴板要求两台设备登录同一个 Apple ID、开着蓝牙和 Wi‑Fi,并且离得近,也只能在苹果设备之间用。CopySync 只要求两台电脑都能连上你部署的服务器:不同 Apple ID、一台在家一台在公司、一台 Mac 一台 Windows,都可以。另外它有复制记录,大文件也可以按需拉取。</p><p>如果你的两台 Mac 是同一个 Apple ID、总在一起、主要复制文字,系统自带的已经够用了。</p></div></details>@@ -472,25 +491,27 @@ sudo ./install.sh 你的公网IP</code></pre><details><summary>必须自己准备服务器吗?</summary><div class="answer">- <p>是的,CopySync 不提供公共服务器,这样就不会有任何人的数据经过别人的机器。两台 Mac 在同一个局域网时,在其中一台上运行服务器即可;跨网络使用需要一台有公网 IP 的服务器,最低配置的云主机就够。</p>+ <p>是的,CopySync 不提供公共服务器,这样就不会有任何人的数据经过别人的机器。两台电脑在同一个局域网时,在其中一台 Mac 上运行服务器即可;跨网络使用需要一台有公网 IP 的服务器,最低配置的云主机就够。</p></div></details><details>- <summary>支持 Windows 和 iPhone 吗?</summary>+ <summary>支持 Windows 吗?iPhone 呢?</summary><div class="answer">- <p>Windows 版在计划中。iPhone 和 iPad 暂不支持:iOS 不允许 App 在后台监听剪贴板,做不到 Mac 上那种复制后立即同步的体验。</p>+ <p>支持 Windows 10 与 Windows 11(x64),从 1.2 版起与 Mac 互通。复制的文件在 Windows 上粘贴出来就是真实文件,能直接粘进资源管理器、微信、Office。</p>+ <p>iPhone 和 iPad 暂不支持:iOS 不允许 App 在后台监听剪贴板,做不到复制后立即同步的体验。</p></div></details><details>- <summary>为什么第一次打开提示「无法验证开发者」?</summary>+ <summary>为什么第一次打开时系统会拦一下?</summary><div class="answer">- <p>CopySync 还没有经过 Apple 公证,公证需要每年付费的开发者账号。到「系统设置 → 隐私与安全性」,点页面下方的「仍要打开」即可,只需要这一次。也可以从源码自己构建。</p>+ <p>CopySync 还没有经过 Apple 公证,Windows 版也还没有代码签名,两者都需要每年付费的证书。</p>+ <p>Mac 上到「系统设置 → 隐私与安全性」,点页面下方的「仍要打开」;Windows 上在「Windows 已保护你的电脑」提示里点「更多信息」,再点「仍要运行」。都只需要这一次。也可以从源码自己构建。</p></div></details><details><summary>大文件怎么处理?</summary><div class="answer">- <p>默认 50 MB 以内的内容在你复制时就推送到另一台 Mac,那边可以直接粘贴;更大的文件只同步一条记录,需要时在复制记录里点「拉取到本机」再传。上限可以在设置里调整。</p>+ <p>默认 50 MB 以内的内容在你复制时就推送到另一台电脑,那边可以直接粘贴;更大的文件只同步一条记录,需要时在复制记录里点「拉取到本机」再传。上限可以在设置里调整。</p></div></details><details>@@ -505,9 +526,10 @@ sudo ./install.sh 你的公网IP</code></pre><section class="closing" aria-labelledby="closing-title"><div class="wrap">- <h2 id="closing-title">两台 Mac,一个剪贴板。</h2>+ <h2 id="closing-title">两台电脑,一个剪贴板。</h2><div class="cta">- <a class="button" href="https://github.com/baiyuze/copysync/releases/latest/download/CopySync.dmg">下载 macOS 版</a>+ <a class="button" href="https://github.com/baiyuze/copysync/releases/latest/download/CopySync.dmg">下载 Mac 版</a>+ <a class="button button-alt" href="https://github.com/baiyuze/copysync/releases/latest/download/CopySync-Setup.exe">下载 Windows 版</a><a href="https://github.com/baiyuze/copysync">在 GitHub 上查看源码</a></div></div>diff --git a/docs/llms.txt b/docs/llms.txtindex 08f3cf3..661d106 100644--- a/docs/llms.txt+++ b/docs/llms.txt@@ -1,20 +1,21 @@# CopySync-> CopySync is a free, open-source (MIT) macOS app that syncs the clipboard and files between Macs: copy on one Mac, paste on another. It works across different Apple IDs and different networks. Devices connect peer-to-peer over WebRTC with end-to-end DTLS encryption; when a direct connection fails, traffic is relayed through a TURN server the user hosts themselves. The server stores no accounts and cannot read clipboard content.+> CopySync is a free, open-source (MIT) app for macOS and Windows that syncs the clipboard and files between computers: copy on one, paste on another — Mac to Mac, Mac to Windows, or Windows to Windows. It works across different accounts and different networks. Devices connect peer-to-peer over WebRTC with end-to-end DTLS encryption; when a direct connection fails, traffic is relayed through a TURN server the user hosts themselves. The server stores no accounts and cannot read clipboard content.>-> CopySync 是一款免费开源(MIT)的 macOS 工具,在两台 Mac 之间同步剪贴板与文件:一台复制,另一台直接粘贴。不要求同一个 Apple ID,跨网络可用。设备间 WebRTC 直连、DTLS 端到端加密,打不通时经用户自建服务器的 TURN 中转;服务器不存账号,看不到复制内容。+> CopySync 是一款免费开源(MIT)的 macOS 与 Windows 工具,在两台电脑之间同步剪贴板与文件:一台复制,另一台直接粘贴,Mac 与 Windows 互通。不要求同一个账号,跨网络可用。设备间 WebRTC 直连、DTLS 端到端加密,打不通时经用户自建服务器的 TURN 中转;服务器不存账号,看不到复制内容。Key facts:-- Current version: 1.1.2, released 2026-10-09.-- Client: macOS 13 Ventura or later, universal binary for Intel and Apple silicon. Distributed as a DMG; not notarized by Apple, so the first launch needs "Open Anyway" in System Settings → Privacy & Security.+- Current version: 1.2.0, released 2026-10-09. Adds the Windows client.+- Mac client: macOS 13 Ventura or later, universal binary for Intel and Apple silicon. Distributed as a DMG; not notarized by Apple, so the first launch needs "Open Anyway" in System Settings → Privacy & Security.+- Windows client: Windows 10 (21H2+) and Windows 11, x64. Per-user installer (CopySync-Setup.exe, no admin rights) or portable zip; not code-signed, so SmartScreen needs "More info → Run anyway" once. Runs in the notification area; pasted files are real files usable in Explorer, WeChat and Office. Skips content that password managers mark as sensitive.- Server: a single static Go binary for Linux (x86_64, ARM64) or macOS, installed via systemd script or Docker Compose. Ports: 8787/tcp (signaling), 3478/udp (STUN/TURN), 32768–60999/udp (relay).- Content synced: plain text, rich text (HTML plus a plain-text copy), images, files, folders.- Works on multi-uplink networks (e.g. offices with two ISPs) that pick an uplink per destination: the client probes several STUN servers from one shared port to learn its address on every uplink and sends all of them to the peer. Diagnose with `copysync-cli nat`. If a connection lands on the relay first, the client retries the direct path with an ICE restart while idle.- Items under 50 MB (adjustable 1 MB–1 GB) are pushed on copy; larger files sync as a record and are pulled on demand.- History keeps 3 days by default (adjustable 1 hour–30 days).-- Pairing: 6-character code valid for 5 minutes, plus a human check that both Macs show the same two fingerprints (one per device's Ed25519 public key), which prevents man-in-the-middle attacks by the server.-- Not supported: Windows (planned), iPhone/iPad (iOS forbids background clipboard monitoring). The server stores nothing: while the other Mac is unreachable, the latest 20 items are kept in memory and sent when it reconnects (added to its history, not its clipboard).+- Pairing: 6-character code valid for 5 minutes, plus a human check that both devices show the same two fingerprints (one per device's Ed25519 public key), which prevents man-in-the-middle attacks by the server.+- Not supported: iPhone/iPad (iOS forbids background clipboard monitoring). The server stores nothing: while the other computer is unreachable, the latest 20 items are kept in memory and sent when it reconnects (added to its history, not its clipboard).- Compared with Apple's Universal Clipboard: no same-Apple-ID or proximity requirement, keeps a history, handles large files and folders.## Docs@@ -22,10 +23,11 @@ Key facts:- [README (中文)](https://github.com/baiyuze/copysync/blob/main/README.md): features, installation, architecture, security model, fallbacks- [README (English)](https://github.com/baiyuze/copysync/blob/main/README.en.md): the same in English- [Server deployment](https://github.com/baiyuze/copysync/blob/main/server/deploy/README.md): systemd, Docker and manual setup+- [Windows client design (中文)](https://github.com/baiyuze/copysync/blob/main/design/windows-client.md): clipboard formats, file-name compatibility, background process, installer- [NAT traversal design (中文)](https://github.com/baiyuze/copysync/blob/main/design/nat-traversal.md): multi-uplink probing, relay-to-direct upgrade, measurements and the NAT lab- [Changelog](https://github.com/baiyuze/copysync/blob/main/CHANGELOG.md)## Download-- [Latest release](https://github.com/baiyuze/copysync/releases/latest): CopySync DMG for macOS and server packages for Linux and macOS+- [Latest release](https://github.com/baiyuze/copysync/releases/latest): CopySync.dmg for macOS, CopySync-Setup.exe and a portable zip for Windows, and server packages for Linux and macOS- [Source code](https://github.com/baiyuze/copysync)diff --git a/scripts/build.sh b/scripts/build.shindex a1087da..b25d883 100755--- a/scripts/build.sh+++ b/scripts/build.sh@@ -14,7 +14,7 @@ set -euo pipefailcd "$(dirname "$0")/.."DIST=dist-VERSION=${VERSION:-1.1.2}+VERSION=${VERSION:-1.2.0}rm -rf "$DIST" && mkdir -p "$DIST"# 构建 x86_64 + arm64 通用二进制:两台 Mac 的芯片未必相同,单架构的diff --git a/scripts/package.sh b/scripts/package.shindex 7fa2b7e..8c4a2c6 100755--- a/scripts/package.sh+++ b/scripts/package.sh@@ -6,6 +6,9 @@# copysync-server-linux-arm64.tar.gz# copysync-server-macos.tar.gz 把服务器放在其中一台 Mac 上时用#+# Windows 的安装程序与便携版(CopySync-Setup.exe、CopySync-windows-x64.zip)只能在 Windows 上+# 构建:由 CI 的 Windows 任务运行 scripts/build-windows.ps1 产出,发布时从构建产物里取。+## 文件名不带版本号:网站与 README 用 releases/latest/download/<文件名> 直链下载,# 带版本号的话每发一版这些链接都会失效。版本号见 Release 标题与 copysync-server -version。# SHA256SUMS@@ -15,7 +18,7 @@set -euo pipefailcd "$(dirname "$0")/.."-export VERSION=${VERSION:-1.1.2}+export VERSION=${VERSION:-1.2.0}OUT=release./scripts/build.shdiff --git a/ui/pubspec.yaml b/ui/pubspec.yamlindex d63db03..7c4885b 100644--- a/ui/pubspec.yaml+++ b/ui/pubspec.yaml@@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html# In Windows, build-name is used as the major, minor, and patch parts# of the product and file versions while build-number is used as the build suffix.-version: 1.1.2+6+version: 1.2.0+7environment:sdk: ^3.12.2