Skip to content

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.

修复配对时两台 Mac 显示的指纹不一致,发布 1.0.1

baiyuze6d7b8306e029
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 51b9a6c..519d0e4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,17 @@
# 更新记录 / Changelog
+## 1.0.1 — 2026-10-08
+
+- 修复:配对时两台 Mac 显示的安全指纹不一样,无从核对。之前每台只显示「对方」的指纹;
+ 现在两台显示同样的两行(双方各一行,按固定顺序),两块屏幕逐行一致即可确认。命令行的
+ `pair` / `join` 同步修改。
+ Fixed: the two Macs showed different fingerprints during pairing, so they could never be compared.
+ Each Mac used to show only the other's fingerprint; both now show the same two lines, one per device,
+ in a fixed order. The CLI's `pair` / `join` follow the same rule.
+- 对话框与菜单加上投影。 Dialogs and menus now have a drop shadow.
+- 发布资源改用不带版本号的文件名(如 `CopySync.dmg`),下载直链不再随版本失效。
+ Release assets now use versionless names (e.g. `CopySync.dmg`) so direct download links keep working.
+
## 1.0.0 — 2026-10-08
第一个正式版本。 First public release.
diff --git a/README.en.md b/README.en.md
index c32914c..c8a1b0a 100644
--- a/README.en.md
+++ b/README.en.md
@@ -90,9 +90,9 @@ There are two parts: **the app on each Mac**, and **a server both Macs can reach
On a Linux server, as root:
```bash
-curl -LO https://github.com/baiyuze/copysync/releases/latest/download/copysync-server-1.0.0-linux-amd64.tar.gz
-tar xzf copysync-server-1.0.0-linux-amd64.tar.gz
-cd copysync-server-1.0.0-linux-amd64
+curl -LO https://github.com/baiyuze/copysync/releases/latest/download/copysync-server-linux-amd64.tar.gz
+tar xzf copysync-server-linux-amd64.tar.gz
+cd copysync-server-linux-amd64
sudo ./install.sh <public IP of the server>
```
@@ -110,7 +110,7 @@ For Docker, or for LAN-only use, see the [server deployment guide](server/deploy
### 2. Install the app on each Mac
-1. Download [CopySync-1.0.0.dmg](https://github.com/baiyuze/copysync/releases/latest), open it and drag CopySync into Applications.
+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.
The first time, macOS says it can't verify the developer: CopySync isn't notarized by Apple yet (that requires a paid developer account). Go to **System Settings → Privacy & Security**, scroll down and click **Open Anyway**. You only need to do this once.
@@ -123,7 +123,7 @@ For Docker, or for LAN-only use, see the [server deployment guide](server/deploy
1. On one Mac: **设备 → 添加设备 → 生成配对码** (Devices → Add device → Generate code).
2. On the other: **添加设备 → 输入配对码** (Add device → Enter code), and type the 6 characters.
-3. Each screen shows a fingerprint. **Confirm only if they match character for character.**
+3. Both screens show the same two lines of fingerprints, one for each Mac. **Confirm only if the two screens match line for line.**
From then on, copy on either Mac and paste on the other.
@@ -163,7 +163,7 @@ flowchart LR
### Security model
- **The server keeps no accounts.** A device's identity is an Ed25519 key, and its ID is derived from the public key, so the server can verify that an ID belongs to a key without a user table.
-- **Fingerprints are compared by a person when pairing.** Each Mac shows a fingerprint of the other's public key (the first 60 bits of its SHA-256, like `R8NF-2WTC-QL5J`). The server could swap keys in transit, but it cannot make both screens show the same fingerprint — this step is what stops a man in the middle.
+- **Fingerprints are compared by a person when pairing.** Both Macs show the same two lines: the fingerprint of each side's public key (the first 60 bits of its SHA-256, like `R8NF-2WTC-QL5J`), in a fixed order. The server could swap keys in transit, but then the two screens would no longer match — this step is what stops a man in the middle. The fingerprints are shown separately rather than combined into one short code: an attacker controlling both forged keys could find a matching combined code with a birthday attack, while separate fingerprints need a preimage attack per key, roughly a billion times harder.
- **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.
- **No App Sandbox**, because CopySync needs to read files at whatever path you copy them from.
diff --git a/README.md b/README.md
index ab361d0..c4afc4f 100644
--- a/README.md
+++ b/README.md
@@ -88,9 +88,9 @@ CopySync 的做法是:两台 Mac 配对一次,之后在一台上 `⌘C`,
在 Linux 服务器上(需要 root):
```bash
-curl -LO https://github.com/baiyuze/copysync/releases/latest/download/copysync-server-1.0.0-linux-amd64.tar.gz
-tar xzf copysync-server-1.0.0-linux-amd64.tar.gz
-cd copysync-server-1.0.0-linux-amd64
+curl -LO https://github.com/baiyuze/copysync/releases/latest/download/copysync-server-linux-amd64.tar.gz
+tar xzf copysync-server-linux-amd64.tar.gz
+cd copysync-server-linux-amd64
sudo ./install.sh <服务器公网IP>
```
@@ -108,7 +108,7 @@ sudo ./install.sh <服务器公网IP>
### 2. 在每台 Mac 上安装 App
-1. 下载 [CopySync-1.0.0.dmg](https://github.com/baiyuze/copysync/releases/latest),打开后把 CopySync 拖进「应用程序」。
+1. 下载 [CopySync.dmg](https://github.com/baiyuze/copysync/releases/latest/download/CopySync.dmg),打开后把 CopySync 拖进「应用程序」。
2. 从「应用程序」里打开 CopySync。
第一次打开时 macOS 会提示「无法验证开发者」:CopySync 还没有经过 Apple 公证(需要付费开发者账号)。到 **系统设置 → 隐私与安全性**,在页面下方点 **仍要打开**。只需要这一次。
@@ -121,7 +121,7 @@ sudo ./install.sh <服务器公网IP>
1. 在一台 Mac 上点 **设备 → 添加设备 → 生成配对码**。
2. 在另一台上点 **添加设备 → 输入配对码**,输入那 6 位字符。
-3. 两台屏幕上会各自显示一串安全指纹,**逐字核对一致后**再点确认。
+3. 两台屏幕上会显示同样的两行安全指纹(这台的和对方的),**逐行核对两边完全一致后**再点确认。
之后在任意一台上复制,另一台就能直接粘贴。
@@ -161,7 +161,7 @@ flowchart LR
### 安全模型
- **服务器不存账号**。设备身份是一把 Ed25519 密钥,设备 ID 由公钥派生,服务器据此就能验证"这个 ID 确实属于这把公钥",无需用户表。
-- **配对时人工核对指纹**。两台设备各自显示对方公钥的指纹(SHA-256 的前 60 位,形如 `R8NF-2WTC-QL5J`)。服务器可以在配对时替换转发中的公钥,但没法让两边显示出相同的指纹,这一步就是防中间人的闸门。
+- **配对时人工核对指纹**。两台设备显示同样的两行:双方各自公钥的指纹(SHA-256 的前 60 位,形如 `R8NF-2WTC-QL5J`),按固定顺序排列。服务器可以在配对时替换转发中的公钥,但替换后两块屏幕上的内容就对不上了,这一步就是防中间人的闸门。两个指纹分开显示而不是合成一串短码,是因为攻击者同时控制两把伪造公钥时,凑出一串相同的短码只需生日攻击;分开显示则要为每把公钥各做一次原像攻击,难度高出约十亿倍。
- **之后的每条信令都带签名**,服务器无法伪造设备。直连通道的 DTLS 证书指纹也经签名传递,握手后比对实际证书,不一致立即断开。
- **中转也看不到内容**。TURN 只转发加密后的 UDP 包。中转凭证按设备单独签发,12 小时过期。
- **不启用 App 沙盒**:需要访问你复制的任意路径下的文件。
diff --git a/client-core/cmd/copysync-cli/main.go b/client-core/cmd/copysync-cli/main.go
index eaecbec..0bd1f61 100644
--- a/client-core/cmd/copysync-cli/main.go
+++ b/client-core/cmd/copysync-cli/main.go
@@ -17,6 +17,7 @@ import (
"io"
"os"
"path/filepath"
+ "sort"
"time"
"google.golang.org/grpc"
@@ -163,8 +164,9 @@ func createPairing(ctx context.Context, c pb.DaemonServiceClient) error {
continue // 非待确认的配对事件(普通的在线状态变化)
}
fmt.Printf("\n 对方已兑换:%s(%s)\n", d.GetName(), d.GetPlatform())
- fmt.Printf(" 指纹:%s\n\n", d.GetPublicKeyFingerprint())
- fmt.Println(" ⚠️ 请与对方屏幕上的指纹逐字核对,一致才继续。")
+ if err := printFingerprints(ctx, c, d); err != nil {
+ return err
+ }
fmt.Print(" 确认配对?[y/N] ")
var answer string
@@ -189,6 +191,26 @@ func createPairing(ctx context.Context, c pb.DaemonServiceClient) error {
}
}
+// printFingerprints 打印配对时要核对的两行:本机与对方的公钥指纹,按指纹排序。
+// 两台设备打印出的内容完全相同,用户比对两块屏幕即可;规则与界面一致
+// (见 ui/lib/widgets/pairing_dialog.dart 的 pairingFingerprintRows)。
+func printFingerprints(ctx context.Context, c pb.DaemonServiceClient, peer *pb.Device) error {
+ resp, err := c.ListDevices(ctx, &pb.Empty{})
+ if err != nil {
+ return err
+ }
+ rows := []*pb.Device{resp.GetSelf(), peer}
+ sort.Slice(rows, func(i, j int) bool {
+ return rows[i].GetPublicKeyFingerprint() < rows[j].GetPublicKeyFingerprint()
+ })
+ fmt.Println(" 安全指纹:")
+ for _, d := range rows {
+ fmt.Printf(" %s %s\n", d.GetPublicKeyFingerprint(), d.GetName())
+ }
+ fmt.Println("\n 两台设备上显示的这两行应当完全相同,一致才继续。")
+ return nil
+}
+
func joinPairing(ctx context.Context, c pb.DaemonServiceClient, code string) error {
if code == "" {
return errors.New("用法: copysync-cli join <配对码>")
@@ -202,8 +224,9 @@ func joinPairing(ctx context.Context, c pb.DaemonServiceClient, code string) err
}
peer := resp.GetPeer()
fmt.Printf("\n 找到设备:%s(%s)\n", peer.GetName(), peer.GetPlatform())
- fmt.Printf(" 指纹:%s\n\n", peer.GetPublicKeyFingerprint())
- fmt.Println(" ⚠️ 请与对方屏幕上的指纹逐字核对,一致才继续。")
+ if err := printFingerprints(ctx, c, peer); err != nil {
+ return err
+ }
fmt.Print(" 确认配对?[y/N] ")
var answer string
diff --git a/docs/assets/screenshots/card-verify-dark.png b/docs/assets/screenshots/card-verify-dark.png
index e727360..80d835d 100644
Binary files a/docs/assets/screenshots/card-verify-dark.png and b/docs/assets/screenshots/card-verify-dark.png differ
diff --git a/docs/assets/screenshots/card-verify.png b/docs/assets/screenshots/card-verify.png
index 20e72ad..e916714 100644
Binary files a/docs/assets/screenshots/card-verify.png and b/docs/assets/screenshots/card-verify.png differ
diff --git a/docs/assets/screenshots/devices.png b/docs/assets/screenshots/devices.png
index 7546648..439cd51 100644
Binary files a/docs/assets/screenshots/devices.png and b/docs/assets/screenshots/devices.png differ
diff --git a/docs/assets/screenshots/pairing.png b/docs/assets/screenshots/pairing.png
index 8e33169..d53e763 100644
Binary files a/docs/assets/screenshots/pairing.png and b/docs/assets/screenshots/pairing.png differ
diff --git a/docs/assets/screenshots/verify.png b/docs/assets/screenshots/verify.png
index c8291aa..e9f5dd7 100644
Binary files a/docs/assets/screenshots/verify.png and b/docs/assets/screenshots/verify.png differ
diff --git a/docs/en/index.html b/docs/en/index.html
index 427e4a5..96b6426 100644
--- a/docs/en/index.html
+++ b/docs/en/index.html
@@ -40,7 +40,7 @@
"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.",
"applicationCategory": "UtilitiesApplication",
"operatingSystem": "macOS 13 or later (Intel and Apple silicon)",
- "softwareVersion": "1.0.0",
+ "softwareVersion": "1.0.1",
"datePublished": "2026-10-08",
"inLanguage": "en",
"license": "https://opensource.org/licenses/MIT",
@@ -130,11 +130,11 @@
<h1>Copy on this Mac.<br>Paste on that one.</h1>
<p class="lede">Text, images, files, whole folders. No shared Apple&nbsp;ID 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-1.0.0.dmg">
+ <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
</a>
- <span class="note">Version 1.0.0, free and open source. macOS 13 or later, Intel and Apple silicon.</span>
+ <span class="note">Version 1.0.1, free and open source. macOS 13 or later, Intel and Apple silicon.</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">
@@ -275,7 +275,7 @@
<h2 id="security-title">Your server can't see what you copy</h2>
<ul>
<li><strong>No accounts, no stored content.</strong> A device's identity is an Ed25519 key, and its ID is derived from the public key, so the server verifies identity without a user table.</li>
- <li><strong>You compare fingerprints when pairing.</strong> Each Mac shows a fingerprint of the other's key. The server could swap keys in transit, but it can't make both screens show the same fingerprint — that check is what stops a man in the middle.</li>
+ <li><strong>You compare fingerprints when pairing.</strong> Both screens show the same two lines: the fingerprint of each Mac's key. The server could swap keys in transit, but then the two screens would no longer match — that check is what stops a man in the middle.</li>
<li><strong>Every message after that is signed</strong>, so the server can't impersonate your device. The direct channel's certificate is checked again after the handshake; a mismatch drops the connection.</li>
<li><strong>The relay only forwards ciphertext.</strong> TURN carries encrypted packets, and relay credentials are issued per device and expire after 12 hours.</li>
</ul>
@@ -322,13 +322,13 @@
<div>
<h3>On each Mac</h3>
<ol class="install-steps">
- <li>Download <a href="https://github.com/baiyuze/copysync/releases/latest/download/CopySync-1.0.0.dmg">CopySync-1.0.0.dmg</a>, open it and drag CopySync into Applications.</li>
+ <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.
<span class="aside">The first time, macOS says it can't verify the developer: CopySync isn't notarized by Apple yet. Go to System Settings → Privacy &amp; Security and click Open Anyway near the bottom. You only do this once.</span></li>
<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 the fingerprints match.</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>
</div>
<div>
@@ -336,9 +336,9 @@
<p class="aside-p">Any Linux, as root. On ARM, replace <code>amd64</code> with <code>arm64</code>.</p>
<div class="code">
<button class="copy" type="button" data-done="Copied">Copy</button>
-<pre><code>curl -LO https://github.com/baiyuze/copysync/releases/latest/download/copysync-server-1.0.0-linux-amd64.tar.gz
-tar xzf copysync-server-1.0.0-linux-amd64.tar.gz
-cd copysync-server-1.0.0-linux-amd64
+<pre><code>curl -LO https://github.com/baiyuze/copysync/releases/latest/download/copysync-server-linux-amd64.tar.gz
+tar xzf copysync-server-linux-amd64.tar.gz
+cd copysync-server-linux-amd64
sudo ./install.sh YOUR_PUBLIC_IP</code></pre>
</div>
<p class="aside-p">The script registers a systemd service that starts on boot and prints the address to enter in the app. Open these ports in your firewall or security group:</p>
@@ -362,7 +362,7 @@ sudo ./install.sh YOUR_PUBLIC_IP</code></pre>
<div class="table-scroll">
<table class="specs">
<tbody>
- <tr><th scope="row">Version</th><td>1.0.0, released <time datetime="2026-10-08">October 8, 2026</time></td></tr>
+ <tr><th scope="row">Version</th><td>1.0.1, released <time datetime="2026-10-08">October 8, 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">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>
@@ -435,7 +435,7 @@ sudo ./install.sh YOUR_PUBLIC_IP</code></pre>
<div class="wrap">
<h2 id="closing-title">Two Macs, one clipboard.</h2>
<div class="cta">
- <a class="button" href="https://github.com/baiyuze/copysync/releases/latest/download/CopySync-1.0.0.dmg">Download for macOS</a>
+ <a class="button" href="https://github.com/baiyuze/copysync/releases/latest/download/CopySync.dmg">Download for macOS</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.html
index 52b2d60..9e6be3b 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -40,7 +40,7 @@
"description": "在两台 Mac 之间同步剪贴板与文件的开源工具。复制文本、图片、文件或文件夹后,另一台 Mac 可直接粘贴。设备间 WebRTC 直连、DTLS 端到端加密,打不通时经用户自建服务器的 TURN 中转。",
"applicationCategory": "UtilitiesApplication",
"operatingSystem": "macOS 13 及以上(Intel 与 Apple 芯片)",
- "softwareVersion": "1.0.0",
+ "softwareVersion": "1.0.1",
"datePublished": "2026-10-08",
"inLanguage": "zh-CN",
"license": "https://opensource.org/licenses/MIT",
@@ -130,11 +130,11 @@
<h1>在这台 Mac 复制,<br>到那台 Mac 粘贴。</h1>
<p class="lede">文本、图片、文件、整个文件夹都可以。不要求同一个 Apple&nbsp;ID,也不要求在同一个网络。数据在你的设备之间直接传输,经过你自己的服务器时也是加密的。</p>
<div class="cta">
- <a class="button" href="https://github.com/baiyuze/copysync/releases/latest/download/CopySync-1.0.0.dmg">
+ <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 版
</a>
- <span class="note">版本 1.0.0,免费开源。macOS 13 及以上,Intel 与 Apple 芯片通用。</span>
+ <span class="note">版本 1.0.1,免费开源。macOS 13 及以上,Intel 与 Apple 芯片通用。</span>
</div>
<div class="demo" role="img" aria-label="演示:在 MacBook Pro 上选中文件并按下 Command C,文件经直连传到 MacBook Air,在那里按下 Command V 粘贴出来">
@@ -275,7 +275,7 @@
<h2 id="security-title">服务器看不到你复制了什么</h2>
<ul>
<li><strong>服务器不存账号,也不存内容。</strong>设备身份是一把 Ed25519 密钥,设备 ID 由公钥算出,服务器不需要用户表就能验证身份。</li>
- <li><strong>配对时由你核对安全指纹。</strong>两台屏幕各自显示对方公钥的指纹。服务器有能力替换转发中的公钥,但没法让两边显示出相同的指纹,这一步就是防中间人的闸门。</li>
+ <li><strong>配对时由你核对安全指纹。</strong>两台屏幕会显示同样的两行:双方各自公钥的指纹。服务器有能力替换转发中的公钥,但替换之后两块屏幕上的内容就对不上了,这一步就是防中间人的闸门。</li>
<li><strong>之后的每条消息都带签名</strong>,服务器无法冒充你的设备。直连通道的证书在握手后还会再核对一次,不一致立即断开。</li>
<li><strong>中转也只是转发密文。</strong>TURN 转发的是加密后的数据包,中转凭证按设备单独签发,12 小时后过期。</li>
</ul>
@@ -322,13 +322,13 @@
<div>
<h3>在每台 Mac 上</h3>
<ol class="install-steps">
- <li>下载 <a href="https://github.com/baiyuze/copysync/releases/latest/download/CopySync-1.0.0.dmg">CopySync-1.0.0.dmg</a>,打开后把 CopySync 拖进「应用程序」。</li>
+ <li>下载 <a href="https://github.com/baiyuze/copysync/releases/latest/download/CopySync.dmg">CopySync.dmg</a>,打开后把 CopySync 拖进「应用程序」。</li>
<li>从「应用程序」里打开。
<span class="aside">第一次会提示「无法验证开发者」:CopySync 还没有经过 Apple 公证。到「系统设置 → 隐私与安全性」,点页面下方的「仍要打开」,只需要这一次。</span></li>
<li>点「启用后台同步」。</li>
<li>在「设置」里填入服务器地址 <code>ws://服务器地址:8787/signal</code>,按回车。</li>
<li>系统询问是否允许读取剪贴板时,选择允许。</li>
- <li>一台点「设备 → 添加设备」生成 6 位配对码,另一台输入它;两边核对安全指纹一致后确认。</li>
+ <li>一台点「设备 → 添加设备」生成 6 位配对码,另一台输入它;两块屏幕上的两行安全指纹完全一致后确认。</li>
</ol>
</div>
<div>
@@ -336,9 +336,9 @@
<p class="aside-p">任意 Linux,需要 root。ARM 服务器把 <code>amd64</code> 换成 <code>arm64</code>。</p>
<div class="code">
<button class="copy" type="button" data-done="已复制">复制</button>
-<pre><code>curl -LO https://github.com/baiyuze/copysync/releases/latest/download/copysync-server-1.0.0-linux-amd64.tar.gz
-tar xzf copysync-server-1.0.0-linux-amd64.tar.gz
-cd copysync-server-1.0.0-linux-amd64
+<pre><code>curl -LO https://github.com/baiyuze/copysync/releases/latest/download/copysync-server-linux-amd64.tar.gz
+tar xzf copysync-server-linux-amd64.tar.gz
+cd copysync-server-linux-amd64
sudo ./install.sh 你的公网IP</code></pre>
</div>
<p class="aside-p">脚本会注册开机自启的 systemd 服务,最后打印出 App 里要填的地址。防火墙或云安全组需要放行:</p>
@@ -362,7 +362,7 @@ sudo ./install.sh 你的公网IP</code></pre>
<div class="table-scroll">
<table class="specs">
<tbody>
- <tr><th scope="row">版本</th><td>1.0.0,<time datetime="2026-10-08">2026 年 10 月 8 日</time>发布</td></tr>
+ <tr><th scope="row">版本</th><td>1.0.1,<time datetime="2026-10-08">2026 年 10 月 8 日</time>发布</td></tr>
<tr><th scope="row">Mac 客户端</th><td>macOS 13 Ventura 及以上;Intel 与 Apple 芯片通用,不需要 Rosetta;安装包 45 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>
@@ -435,7 +435,7 @@ sudo ./install.sh 你的公网IP</code></pre>
<div class="wrap">
<h2 id="closing-title">两台 Mac,一个剪贴板。</h2>
<div class="cta">
- <a class="button" href="https://github.com/baiyuze/copysync/releases/latest/download/CopySync-1.0.0.dmg">下载 macOS 版</a>
+ <a class="button" href="https://github.com/baiyuze/copysync/releases/latest/download/CopySync.dmg">下载 macOS 版</a>
<a href="https://github.com/baiyuze/copysync">在 GitHub 上查看源码</a>
</div>
</div>
diff --git a/docs/llms.txt b/docs/llms.txt
index 2f372e5..ca83f04 100644
--- a/docs/llms.txt
+++ b/docs/llms.txt
@@ -6,13 +6,13 @@
Key facts:
-- Current version: 1.0.0, released 2026-10-08.
+- Current version: 1.0.1, released 2026-10-08.
- 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.
- 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.
- 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-verified fingerprint of the peer's Ed25519 public key to prevent man-in-the-middle attacks by the server.
+- 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). Both Macs must be online at the same time; there is no store-and-forward.
- Compared with Apple's Universal Clipboard: no same-Apple-ID or proximity requirement, keeps a history, handles large files and folders.
diff --git a/scripts/build.sh b/scripts/build.sh
index 1673b6d..20eb2ed 100755
--- a/scripts/build.sh
+++ b/scripts/build.sh
@@ -14,7 +14,7 @@ set -euo pipefail
cd "$(dirname "$0")/.."
DIST=dist
-VERSION=${VERSION:-1.0.0}
+VERSION=${VERSION:-1.0.1}
rm -rf "$DIST" && mkdir -p "$DIST"
# 构建 x86_64 + arm64 通用二进制:两台 Mac 的芯片未必相同,单架构的
diff --git a/scripts/package.sh b/scripts/package.sh
index ddf5112..82668ce 100755
--- a/scripts/package.sh
+++ b/scripts/package.sh
@@ -1,10 +1,13 @@
#!/usr/bin/env bash
# 构建并打出可分发的发布包到 release/。
#
-# CopySync-<版本>.dmg macOS 客户端,Intel 与 Apple 芯片通用
-# copysync-server-<版本>-linux-amd64.tar.gz 信令服务器 + systemd / Docker 部署文件
-# copysync-server-<版本>-linux-arm64.tar.gz
-# copysync-server-<版本>-macos.tar.gz 把服务器放在其中一台 Mac 上时用
+# CopySync.dmg macOS 客户端,Intel 与 Apple 芯片通用
+# copysync-server-linux-amd64.tar.gz 信令服务器 + systemd / Docker 部署文件
+# copysync-server-linux-arm64.tar.gz
+# copysync-server-macos.tar.gz 把服务器放在其中一台 Mac 上时用
+#
+# 文件名不带版本号:网站与 README 用 releases/latest/download/<文件名> 直链下载,
+# 带版本号的话每发一版这些链接都会失效。版本号见 Release 标题与 copysync-server -version。
# SHA256SUMS
#
# 服务器是纯 Go,直接交叉编译;客户端依赖 cgo 与 Flutter,只能在 Mac 上构建。
@@ -12,7 +15,7 @@
set -euo pipefail
cd "$(dirname "$0")/.."
-export VERSION=${VERSION:-1.0.0}
+export VERSION=${VERSION:-1.0.1}
OUT=release
./scripts/build.sh
@@ -84,14 +87,14 @@ rm -rf "$MNT/.fseventsd"
sync
hdiutil detach "$MNT" -quiet
hdiutil convert "$STAGE/rw.dmg" -format UDZO -imagekey zlib-level=9 \
- -o "$OUT/CopySync-$VERSION.dmg" -quiet
-echo " ✓ CopySync-$VERSION.dmg"
+ -o "$OUT/CopySync.dmg" -quiet
+echo " ✓ CopySync.dmg($VERSION)"
# ─────────────────────────── 服务器 ───────────────────────────
echo "▶ 打包服务器"
for arch in amd64 arm64; do
- name="copysync-server-$VERSION-linux-$arch"
+ name="copysync-server-linux-$arch"
d="$STAGE/$name"
mkdir -p "$d"
(cd server && CGO_ENABLED=0 GOOS=linux GOARCH=$arch go build -trimpath \
@@ -102,7 +105,7 @@ for arch in amd64 arm64; do
echo " ✓ $name.tar.gz"
done
-name="copysync-server-$VERSION-macos"
+name="copysync-server-macos"
mkdir -p "$STAGE/$name"
cp dist/copysync-server server/deploy/README.md "$STAGE/$name/"
tar -C "$STAGE" -czf "$OUT/$name.tar.gz" "$name"
diff --git a/server/deploy/README.md b/server/deploy/README.md
index 3efae76..de8f097 100644
--- a/server/deploy/README.md
+++ b/server/deploy/README.md
@@ -20,8 +20,8 @@ The server only does two things: it lets your devices find each other (signaling
## 方式一:systemd(推荐) / Option 1: systemd (recommended)
```bash
-tar xzf copysync-server-*-linux-amd64.tar.gz
-cd copysync-server-*-linux-amd64
+tar xzf copysync-server-linux-amd64.tar.gz
+cd copysync-server-linux-amd64
sudo ./install.sh <公网IP / public IP>
```
diff --git a/ui/lib/pages/devices_page.dart b/ui/lib/pages/devices_page.dart
index d83c368..c82f318 100644
--- a/ui/lib/pages/devices_page.dart
+++ b/ui/lib/pages/devices_page.dart
@@ -40,7 +40,7 @@ class DevicesPage extends StatelessWidget {
if (state.self != null)
GroupSection(
title: '这台 Mac',
- footnote: '配对时,两台设备会互相显示对方的安全指纹,核对一致才能确认。',
+ footnote: '配对时,两台 Mac 会显示同样的两行安全指纹:这台的和对方的。逐字核对一致才能确认。',
child: GroupBox(children: [_DeviceRow(device: state.self!, isSelf: true)]),
),
if (state.peers.isEmpty)
diff --git a/ui/lib/widgets/pairing_dialog.dart b/ui/lib/widgets/pairing_dialog.dart
index 30c2455..b5e907f 100644
--- a/ui/lib/widgets/pairing_dialog.dart
+++ b/ui/lib/widgets/pairing_dialog.dart
@@ -160,7 +160,7 @@ class _GenerateTabState extends State<_GenerateTab> {
const SizedBox(width: Insets.sm),
Expanded(
child: Text(
- '对方输入后,两台设备会各自显示一串安全指纹,逐字核对一致再确认。',
+ '对方输入后,两台 Mac 会显示同样的两行安全指纹,核对一致再确认。',
style: context.text.bodySmall,
),
),
@@ -318,6 +318,8 @@ class _PairingConfirmDialogState extends State<PairingConfirmDialog> {
Widget build(BuildContext context) {
final p = context.palette;
final peer = widget.peer;
+ final self = AppScope.of(context).self;
+ final rows = pairingFingerprintRows(self, peer);
return Dialog(
child: SizedBox(
width: 420,
@@ -332,27 +334,48 @@ class _PairingConfirmDialogState extends State<PairingConfirmDialog> {
Text('正在与「${peer.name}」配对', style: context.text.bodySmall),
const SizedBox(height: Insets.xl),
Container(
- padding: const EdgeInsets.symmetric(vertical: Insets.lg),
+ padding: const EdgeInsets.symmetric(horizontal: Insets.lg, vertical: Insets.md),
decoration: BoxDecoration(
color: p.fill,
borderRadius: BorderRadius.circular(Radii.md),
),
- child: Text(
- peer.publicKeyFingerprint,
- textAlign: TextAlign.center,
- style: TextStyle(
- fontSize: 24,
- fontWeight: FontWeight.w600,
- fontFamily: monoFamily,
- letterSpacing: 2,
- color: p.text,
- ),
+ child: Column(
+ children: [
+ for (final (name, fingerprint) in rows)
+ Padding(
+ padding: const EdgeInsets.symmetric(vertical: 6),
+ child: Row(
+ children: [
+ Text(
+ fingerprint,
+ style: TextStyle(
+ fontSize: 21,
+ fontWeight: FontWeight.w600,
+ fontFamily: monoFamily,
+ letterSpacing: 1.5,
+ color: p.text,
+ ),
+ ),
+ const SizedBox(width: Insets.md),
+ Expanded(
+ child: Text(
+ name,
+ textAlign: TextAlign.right,
+ maxLines: 1,
+ overflow: TextOverflow.ellipsis,
+ style: context.text.bodySmall,
+ ),
+ ),
+ ],
+ ),
+ ),
+ ],
),
),
const SizedBox(height: Insets.lg),
Text(
- '确认这串字符与对方屏幕上显示的完全一致。'
- '不一致说明连接可能被第三方篡改,请拒绝。',
+ '两台 Mac 上显示的这两行应当完全相同。'
+ '有任何一个字符不同,说明连接可能被第三方篡改,请拒绝。',
style: context.text.bodySmall,
),
const SizedBox(height: Insets.xl),
@@ -386,3 +409,20 @@ class _PairingConfirmDialogState extends State<PairingConfirmDialog> {
);
}
}
+
+/// 配对确认时显示的两行:两台设备各自的公钥指纹,按指纹字符串排序。
+///
+/// 两台 Mac 各自算出的结果完全相同,用户只需比对两块屏幕是否一致。
+/// 早先每台只显示「对方」的指纹,两块屏幕上的字符串天然不同,根本无从比对。
+///
+/// 刻意不把两把公钥合成一串短码:攻击者能同时替换两边看到的公钥,
+/// 对一串 60 位的合成码只需生日攻击(约 2^30 次)就能凑出相同结果;
+/// 而分别显示两个指纹,攻击者必须为每一把伪造公钥各做一次原像攻击(约 2^60 次)。
+List<(String, String)> pairingFingerprintRows(Device? self, Device peer) {
+ final rows = <(String, String)>[
+ if (self != null) (self.name, self.publicKeyFingerprint),
+ (peer.name, peer.publicKeyFingerprint),
+ ];
+ rows.sort((a, b) => a.$2.compareTo(b.$2));
+ return rows;
+}
diff --git a/ui/pubspec.yaml b/ui/pubspec.yaml
index 5cb1559..a1211ff 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.0.0+1
+version: 1.0.1+2
environment:
sdk: ^3.12.2
diff --git a/ui/test/widget_test.dart b/ui/test/widget_test.dart
index fe69411..4522f94 100644
--- a/ui/test/widget_test.dart
+++ b/ui/test/widget_test.dart
@@ -1,8 +1,11 @@
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
+import 'package:copysync_ui/app_state.dart';
import 'package:copysync_ui/daemon_client.dart';
+import 'package:copysync_ui/gen/copysync/v1/daemon.pb.dart';
import 'package:copysync_ui/main.dart';
+import 'package:copysync_ui/theme.dart';
import 'package:copysync_ui/widgets/common.dart';
import 'package:copysync_ui/widgets/pairing_dialog.dart';
@@ -56,6 +59,32 @@ void main() {
expect(find.textContaining('Null check'), findsNothing);
});
+ group('配对指纹', () {
+ final a = Device(name: 'MacBook Pro', publicKeyFingerprint: 'CPJK-OG2H-U7O6');
+ final b = Device(name: 'MacBook Air', publicKeyFingerprint: 'FJX6-SRL2-C2QG');
+
+ test('两台设备上显示的内容完全相同', () {
+ // A 看到的是「自己 + 对方 B」,B 看到的是「自己 + 对方 A」,两边必须一致才可能核对
+ expect(pairingFingerprintRows(a, b), pairingFingerprintRows(b, a));
+ expect(pairingFingerprintRows(a, b).map((r) => r.$2),
+ ['CPJK-OG2H-U7O6', 'FJX6-SRL2-C2QG']);
+ });
+
+ testWidgets('确认对话框同时显示本机与对方的指纹', (tester) async {
+ final state = AppState()
+ ..debugSeed(status: Status(), config: Config(), self: a);
+ await tester.pumpWidget(AppScope(
+ state: state,
+ child: MaterialApp(
+ theme: buildTheme(Brightness.light),
+ home: Scaffold(body: PairingConfirmDialog(peer: b)),
+ ),
+ ));
+ expect(find.text('CPJK-OG2H-U7O6'), findsOneWidget);
+ expect(find.text('FJX6-SRL2-C2QG'), findsOneWidget);
+ });
+ });
+
test('数据目录路径与 Go 侧 config.DefaultPaths 保持一致', () {
final dir = DaemonEndpoint.defaultDataDir();
// 路径不一致会导致 UI 根本找不到 daemon,这里锁住约定
diff --git a/ui/tool/screenshots/screenshots_test.dart b/ui/tool/screenshots/screenshots_test.dart
index 45360b7..5a6c690 100644
--- a/ui/tool/screenshots/screenshots_test.dart
+++ b/ui/tool/screenshots/screenshots_test.dart
@@ -307,14 +307,18 @@ void main() {
final brightness = dark ? Brightness.dark : Brightness.light;
await tester.pumpWidget(RepaintBoundary(
key: _boundary,
- child: MaterialApp(
- debugShowCheckedModeBanner: false,
- theme: buildTheme(brightness, fontFamily: 'SF', fontFamilyFallback: const ['PingFang']),
- home: Scaffold(
- backgroundColor: Colors.transparent,
- body: Center(
- child: PairingConfirmDialog(
- peer: Device(name: 'MacBook Air', publicKeyFingerprint: 'R8NF-2WTC-QL5J'),
+ // 对话框要同时显示本机的指纹,从 AppScope 里取
+ child: AppScope(
+ state: _demo(),
+ child: MaterialApp(
+ debugShowCheckedModeBanner: false,
+ theme: buildTheme(brightness, fontFamily: 'SF', fontFamilyFallback: const ['PingFang']),
+ home: Scaffold(
+ backgroundColor: Colors.transparent,
+ body: Center(
+ child: PairingConfirmDialog(
+ peer: Device(name: 'MacBook Air', publicKeyFingerprint: 'R8NF-2WTC-QL5J'),
+ ),
),
),
),