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.

fix(site): redirect GitHub Pages visitors to pasteferry.cc

baiyuze88488f8b3bb9
diff --git a/docs/404.html b/docs/404.html
index 93170b1..2842d60 100644
--- a/docs/404.html
+++ b/docs/404.html
@@ -2,6 +2,15 @@
<html lang="zh-CN">
<head>
<meta charset="utf-8">
+ <script>
+ (function () {
+ if (location.hostname !== "baiyuze.github.io") return;
+ var prefix = /^\/(?:pasteferry|copysync)(?=\/|$)/.exec(location.pathname);
+ if (!prefix) return;
+ var path = location.pathname.slice(prefix[0].length) || "/";
+ location.replace("https://pasteferry.cc" + path + location.search + location.hash);
+ })();
+ </script>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="robots" content="noindex">
<title>页面不存在 / Page not found:隔空贴 PasteFerry</title>
diff --git a/docs/cloud/index.html b/docs/cloud/index.html
index e991060..a021f08 100644
--- a/docs/cloud/index.html
+++ b/docs/cloud/index.html
@@ -2,6 +2,15 @@
<html lang="zh-CN">
<head>
<meta charset="utf-8">
+ <script>
+ (function () {
+ if (location.hostname !== "baiyuze.github.io") return;
+ var prefix = /^\/(?:pasteferry|copysync)(?=\/|$)/.exec(location.pathname);
+ if (!prefix) return;
+ var path = location.pathname.slice(prefix[0].length) || "/";
+ location.replace("https://pasteferry.cc" + path + location.search + location.hash);
+ })();
+ </script>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>把隔空贴服务器部署到公网:云服务器图文教程</title>
<meta name="description" content="一台有公网 IP 的 Linux 云主机,运行一个脚本就能装好隔空贴的信令与 TURN 服务器。每台电脑直接连它,在家、在公司、在外面都能同步剪贴板。含安全组放行、检查、客户端设置与国内域名备案的说明。">
diff --git a/docs/design/lan-mode.html b/docs/design/lan-mode.html
index 8576c6c..f06c76b 100644
--- a/docs/design/lan-mode.html
+++ b/docs/design/lan-mode.html
@@ -2,6 +2,15 @@
<html lang="zh-CN">
<head>
<meta charset="utf-8">
+ <script>
+ (function () {
+ if (location.hostname !== "baiyuze.github.io") return;
+ var prefix = /^\/(?:pasteferry|copysync)(?=\/|$)/.exec(location.pathname);
+ if (!prefix) return;
+ var path = location.pathname.slice(prefix[0].length) || "/";
+ location.replace("https://pasteferry.cc" + path + location.search + location.hash);
+ })();
+ </script>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>局域网直连:不用服务器也能配对和同步:隔空贴技术方案</title>
<meta name="description" content="状态:已实现,随 1.4.0 发布;「搜索附近设备」随 1.5.0 发布">
diff --git a/docs/design/linux-client.html b/docs/design/linux-client.html
index 7c9e987..90084dd 100644
--- a/docs/design/linux-client.html
+++ b/docs/design/linux-client.html
@@ -2,6 +2,15 @@
<html lang="zh-CN">
<head>
<meta charset="utf-8">
+ <script>
+ (function () {
+ if (location.hostname !== "baiyuze.github.io") return;
+ var prefix = /^\/(?:pasteferry|copysync)(?=\/|$)/.exec(location.pathname);
+ if (!prefix) return;
+ var path = location.pathname.slice(prefix[0].length) || "/";
+ location.replace("https://pasteferry.cc" + path + location.search + location.hash);
+ })();
+ </script>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Linux 客户端:隔空贴技术方案</title>
<meta name="description" content="状态:已实现,随 1.6.0 发布">
diff --git a/docs/design/nat-traversal.html b/docs/design/nat-traversal.html
index 4bb8fe0..46cb516 100644
--- a/docs/design/nat-traversal.html
+++ b/docs/design/nat-traversal.html
@@ -2,6 +2,15 @@
<html lang="zh-CN">
<head>
<meta charset="utf-8">
+ <script>
+ (function () {
+ if (location.hostname !== "baiyuze.github.io") return;
+ var prefix = /^\/(?:pasteferry|copysync)(?=\/|$)/.exec(location.pathname);
+ if (!prefix) return;
+ var path = location.pathname.slice(prefix[0].length) || "/";
+ location.replace("https://pasteferry.cc" + path + location.search + location.hash);
+ })();
+ </script>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>多出口网络的 NAT 打洞:隔空贴技术方案</title>
<meta name="description" content="状态:已实现。多出口探测随 1.1.0 发布(2026-10-08);中转后换直连、连接失效检测与补发随 1.1.1 发布(2026-10-09);谁先发包随 1.1.2 发布(2026-10-09)">
diff --git a/docs/design/windows-client.html b/docs/design/windows-client.html
index 7ffda6b..74bc7d0 100644
--- a/docs/design/windows-client.html
+++ b/docs/design/windows-client.html
@@ -2,6 +2,15 @@
<html lang="zh-CN">
<head>
<meta charset="utf-8">
+ <script>
+ (function () {
+ if (location.hostname !== "baiyuze.github.io") return;
+ var prefix = /^\/(?:pasteferry|copysync)(?=\/|$)/.exec(location.pathname);
+ if (!prefix) return;
+ var path = location.pathname.slice(prefix[0].length) || "/";
+ location.replace("https://pasteferry.cc" + path + location.search + location.hash);
+ })();
+ </script>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Windows 客户端技术方案:隔空贴技术方案</title>
<meta name="description" content="状态:已实现,随 1.2.0 发布(2026-10-09)。实机验证记录见 windows-validation-2026-10-09.md(安装、同步、生命周期)与 windows-features-validation-2026-10-09.md(托盘、配对弹窗、图片预览)">
diff --git a/docs/download/index.html b/docs/download/index.html
index c056138..9518661 100644
--- a/docs/download/index.html
+++ b/docs/download/index.html
@@ -2,6 +2,15 @@
<html lang="zh-CN">
<head>
<meta charset="utf-8">
+ <script>
+ (function () {
+ if (location.hostname !== "baiyuze.github.io") return;
+ var prefix = /^\/(?:pasteferry|copysync)(?=\/|$)/.exec(location.pathname);
+ if (!prefix) return;
+ var path = location.pathname.slice(prefix[0].length) || "/";
+ location.replace("https://pasteferry.cc" + path + location.search + location.hash);
+ })();
+ </script>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>下载隔空贴:Mac(Apple 芯片、Intel)、Windows、Linux</title>
<meta name="description" content="隔空贴各系统的安装包:macOS 13 及以上的 Apple 芯片版与 Intel 版,Windows 10、11 的安装程序与便携版,Linux x64 与 ARM64 的 .deb 和 tar.gz。免费开源。">
diff --git a/docs/en/cloud/index.html b/docs/en/cloud/index.html
index 4cd7735..43762a7 100644
--- a/docs/en/cloud/index.html
+++ b/docs/en/cloud/index.html
@@ -2,6 +2,15 @@
<html lang="en">
<head>
<meta charset="utf-8">
+ <script>
+ (function () {
+ if (location.hostname !== "baiyuze.github.io") return;
+ var prefix = /^\/(?:pasteferry|copysync)(?=\/|$)/.exec(location.pathname);
+ if (!prefix) return;
+ var path = location.pathname.slice(prefix[0].length) || "/";
+ location.replace("https://pasteferry.cc" + path + location.search + location.hash);
+ })();
+ </script>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Run the PasteFerry server on a public server: cloud VM guide</title>
<meta name="description" content="One script installs PasteFerry&#x27;s signaling and TURN server on a Linux VM with a public IP. Every computer connects to it directly, so the clipboard syncs at home, at the office and anywhere else. Covers the security group, checking, app setup and domains in mainland China.">
diff --git a/docs/en/download/index.html b/docs/en/download/index.html
index 436e743..689ac0d 100644
--- a/docs/en/download/index.html
+++ b/docs/en/download/index.html
@@ -2,6 +2,15 @@
<html lang="en">
<head>
<meta charset="utf-8">
+ <script>
+ (function () {
+ if (location.hostname !== "baiyuze.github.io") return;
+ var prefix = /^\/(?:pasteferry|copysync)(?=\/|$)/.exec(location.pathname);
+ if (!prefix) return;
+ var path = location.pathname.slice(prefix[0].length) || "/";
+ location.replace("https://pasteferry.cc" + path + location.search + location.hash);
+ })();
+ </script>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Download PasteFerry: Mac (Apple silicon, Intel), Windows and Linux</title>
<meta name="description" content="PasteFerry for every system: Apple silicon and Intel versions for macOS 13 or later, an installer and a portable zip for Windows 10 and 11, and .deb and tar.gz packages for Linux on x64 and ARM64. Free and open source.">
diff --git a/docs/en/index.html b/docs/en/index.html
index 7e8a70a..ff9688c 100644
--- a/docs/en/index.html
+++ b/docs/en/index.html
@@ -2,6 +2,15 @@
<html lang="en">
<head>
<meta charset="utf-8">
+ <script>
+ (function () {
+ if (location.hostname !== "baiyuze.github.io") return;
+ var prefix = /^\/(?:pasteferry|copysync)(?=\/|$)/.exec(location.pathname);
+ if (!prefix) return;
+ var path = location.pathname.slice(prefix[0].length) || "/";
+ location.replace("https://pasteferry.cc" + path + location.search + location.hash);
+ })();
+ </script>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>PasteFerry: sync the clipboard and files between Mac, Windows and Linux, across accounts and networks</title>
<meta name="description" content="PasteFerry lets you copy on one computer and paste on another, Mac, Windows or Linux: text, images, files and folders. No shared account required. On the same network it works with no server at all; across networks, use a server you host or Tailscale. Peer-to-peer and end-to-end encrypted. Free and open source.">
diff --git a/docs/en/lan/index.html b/docs/en/lan/index.html
index 342e9e9..f6622bc 100644
--- a/docs/en/lan/index.html
+++ b/docs/en/lan/index.html
@@ -2,6 +2,15 @@
<html lang="en">
<head>
<meta charset="utf-8">
+ <script>
+ (function () {
+ if (location.hostname !== "baiyuze.github.io") return;
+ var prefix = /^\/(?:pasteferry|copysync)(?=\/|$)/.exec(location.pathname);
+ if (!prefix) return;
+ var path = location.pathname.slice(prefix[0].length) || "/";
+ location.replace("https://pasteferry.cc" + path + location.search + location.hash);
+ })();
+ </script>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Use PasteFerry on one network: no server, just pair</title>
<meta name="description" content="When your computers share a Wi‑Fi or wired network, PasteFerry needs no server: install the app, enter a 6-character pairing code, and sync the clipboard and files between Mac and Windows. On a different subnet, you enter one address when pairing.">
diff --git a/docs/en/server/index.html b/docs/en/server/index.html
index d251944..08c0adf 100644
--- a/docs/en/server/index.html
+++ b/docs/en/server/index.html
@@ -2,6 +2,15 @@
<html lang="en">
<head>
<meta charset="utf-8">
+ <script>
+ (function () {
+ if (location.hostname !== "baiyuze.github.io") return;
+ var prefix = /^\/(?:pasteferry|copysync)(?=\/|$)/.exec(location.pathname);
+ if (!prefix) return;
+ var path = location.pathname.slice(prefix[0].length) || "/";
+ location.replace("https://pasteferry.cc" + path + location.search + location.hash);
+ })();
+ </script>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Run a PasteFerry server on your LAN: Windows, Mac and Linux</title>
<meta name="description" content="When your computers share a network you don&#x27;t need a cloud server. Run PasteFerry&#x27;s signaling and TURN server on any always-on Windows, Mac or Linux machine with one script; it starts on boot. Includes app setup and troubleshooting.">
diff --git a/docs/en/start/index.html b/docs/en/start/index.html
index d945195..7b38c18 100644
--- a/docs/en/start/index.html
+++ b/docs/en/start/index.html
@@ -2,6 +2,15 @@
<html lang="en">
<head>
<meta charset="utf-8">
+ <script>
+ (function () {
+ if (location.hostname !== "baiyuze.github.io") return;
+ var prefix = /^\/(?:pasteferry|copysync)(?=\/|$)/.exec(location.pathname);
+ if (!prefix) return;
+ var path = location.pathname.slice(prefix[0].length) || "/";
+ location.replace("https://pasteferry.cc" + path + location.search + location.hash);
+ })();
+ </script>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Quick start: set up PasteFerry in three steps</title>
<meta name="description" content="New to PasteFerry? Install the app on each computer. On the same network, just pair, with no server; across networks, use a public server or Tailscale. Then copy and paste between Mac and Windows.">
diff --git a/docs/en/tailscale/index.html b/docs/en/tailscale/index.html
index 6691f34..c9239c1 100644
--- a/docs/en/tailscale/index.html
+++ b/docs/en/tailscale/index.html
@@ -2,6 +2,15 @@
<html lang="en">
<head>
<meta charset="utf-8">
+ <script>
+ (function () {
+ if (location.hostname !== "baiyuze.github.io") return;
+ var prefix = /^\/(?:pasteferry|copysync)(?=\/|$)/.exec(location.pathname);
+ if (!prefix) return;
+ var path = location.pathname.slice(prefix[0].length) || "/";
+ location.replace("https://pasteferry.cc" + path + location.search + location.hash);
+ })();
+ </script>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Use PasteFerry across networks with Tailscale: no server, home and office in sync</title>
<meta name="description" content="Install Tailscale on each computer under one account and enter the other computer&#x27;s Tailscale address when pairing: no public IP, no server and no computer that has to stay on. The clipboard syncs from the office or anywhere else.">
diff --git a/docs/en/tour/index.html b/docs/en/tour/index.html
index 36312ed..f7158b0 100644
--- a/docs/en/tour/index.html
+++ b/docs/en/tour/index.html
@@ -2,6 +2,15 @@
<html lang="en">
<head>
<meta charset="utf-8">
+ <script>
+ (function () {
+ if (location.hostname !== "baiyuze.github.io") return;
+ var prefix = /^\/(?:pasteferry|copysync)(?=\/|$)/.exec(location.pathname);
+ if (!prefix) return;
+ var path = location.pathname.slice(prefix[0].length) || "/";
+ location.replace("https://pasteferry.cc" + path + location.search + location.hash);
+ })();
+ </script>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Meet PasteFerry in 85 seconds — PasteFerry</title>
<meta name="description" content="Mac, Windows and Linux. Text, images, files and folders across accounts and networks; peer-to-peer, end-to-end encrypted, no server needed on the same network. Free and open source.">
diff --git a/docs/index.html b/docs/index.html
index cab0f38..5dc211e 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -2,6 +2,15 @@
<html lang="zh-CN">
<head>
<meta charset="utf-8">
+ <script>
+ (function () {
+ if (location.hostname !== "baiyuze.github.io") return;
+ var prefix = /^\/(?:pasteferry|copysync)(?=\/|$)/.exec(location.pathname);
+ if (!prefix) return;
+ var path = location.pathname.slice(prefix[0].length) || "/";
+ location.replace("https://pasteferry.cc" + path + location.search + location.hash);
+ })();
+ </script>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>隔空贴 PasteFerry:在 Mac、Windows 与 Linux 之间同步剪贴板与文件,跨账号跨网络</title>
<meta name="description" content="隔空贴让你在一台电脑上复制,另一台上直接粘贴,Mac、Windows、Linux 互通。支持文本、图片、文件和文件夹,不要求同一个账号。同一个网络里装好就能用,不需要服务器;跨网络时用自己部署的服务器或 Tailscale。设备间 P2P 直连、端到端加密。免费开源。">
@@ -34,6 +43,7 @@
<script>
// 第一次打开时按浏览器语言跳到对应页面;在页面上选过语言后,以选的为准
(function () {
+ if (location.hostname === "baiyuze.github.io") return;
try {
var paths = {"zh": "", "zh-tw": "zh-tw/", "zh-hk": "zh-hk/", "en": "en/", "ja": "ja/"};
var pick = localStorage.getItem("pasteferry-lang");
@@ -51,7 +61,7 @@
}
pick = pick || "en";
}
- if (paths[pick]) location.replace(paths[pick] + location.hash);
+ if (paths[pick]) location.replace(paths[pick] + location.search + location.hash);
} catch (e) {}
})();
</script>
diff --git a/docs/ja/cloud/index.html b/docs/ja/cloud/index.html
index cf7be16..a3181a8 100644
--- a/docs/ja/cloud/index.html
+++ b/docs/ja/cloud/index.html
@@ -2,6 +2,15 @@
<html lang="ja">
<head>
<meta charset="utf-8">
+ <script>
+ (function () {
+ if (location.hostname !== "baiyuze.github.io") return;
+ var prefix = /^\/(?:pasteferry|copysync)(?=\/|$)/.exec(location.pathname);
+ if (!prefix) return;
+ var path = location.pathname.slice(prefix[0].length) || "/";
+ location.replace("https://pasteferry.cc" + path + location.search + location.hash);
+ })();
+ </script>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>PasteFerry のサーバーを公開サーバーに置く:クラウドサーバーの手順</title>
<meta name="description" content="グローバル IP を持つ Linux のクラウドサーバーに、スクリプトひとつで PasteFerry のシグナリング兼 TURN サーバーを入れます。各コンピューターが直接つながり、自宅でも会社でも外出先でもクリップボードを同期できます。セキュリティグループ、確認、アプリの設定、中国本土のドメインについて。">
diff --git a/docs/ja/download/index.html b/docs/ja/download/index.html
index fff6ac1..0b477d4 100644
--- a/docs/ja/download/index.html
+++ b/docs/ja/download/index.html
@@ -2,6 +2,15 @@
<html lang="ja">
<head>
<meta charset="utf-8">
+ <script>
+ (function () {
+ if (location.hostname !== "baiyuze.github.io") return;
+ var prefix = /^\/(?:pasteferry|copysync)(?=\/|$)/.exec(location.pathname);
+ if (!prefix) return;
+ var path = location.pathname.slice(prefix[0].length) || "/";
+ location.replace("https://pasteferry.cc" + path + location.search + location.hash);
+ })();
+ </script>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>PasteFerry のダウンロード:Mac(Apple シリコン、Intel)、Windows、Linux</title>
<meta name="description" content="PasteFerry の各 OS 向けインストーラー。macOS 13 以降の Apple シリコン版と Intel 版、Windows 10・11 のインストーラーとポータブル版、Linux x64 と ARM64 の .deb と tar.gz。無料・オープンソース。">
diff --git a/docs/ja/index.html b/docs/ja/index.html
index 0f381c8..6fff470 100644
--- a/docs/ja/index.html
+++ b/docs/ja/index.html
@@ -2,6 +2,15 @@
<html lang="ja">
<head>
<meta charset="utf-8">
+ <script>
+ (function () {
+ if (location.hostname !== "baiyuze.github.io") return;
+ var prefix = /^\/(?:pasteferry|copysync)(?=\/|$)/.exec(location.pathname);
+ if (!prefix) return;
+ var path = location.pathname.slice(prefix[0].length) || "/";
+ location.replace("https://pasteferry.cc" + path + location.search + location.hash);
+ })();
+ </script>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>PasteFerry:Mac、Windows、Linux のあいだでクリップボードとファイルを同期。アカウントもネットワークも別々で OK</title>
<meta name="description" content="PasteFerry は、一台でコピーしたものをもう一台でそのまま貼り付けられるアプリです。Mac、Windows、Linux に対応し、テキスト、画像、ファイル、フォルダを同期します。同じアカウントは不要。同じネットワークならサーバーなしで使え、ネットワークをまたぐときは自分で用意したサーバーか Tailscale を使います。デバイス間は P2P で直接つながり、エンドツーエンドで暗号化。無料・オープンソース。">
diff --git a/docs/ja/lan/index.html b/docs/ja/lan/index.html
index 8231214..95c5b76 100644
--- a/docs/ja/lan/index.html
+++ b/docs/ja/lan/index.html
@@ -2,6 +2,15 @@
<html lang="ja">
<head>
<meta charset="utf-8">
+ <script>
+ (function () {
+ if (location.hostname !== "baiyuze.github.io") return;
+ var prefix = /^\/(?:pasteferry|copysync)(?=\/|$)/.exec(location.pathname);
+ if (!prefix) return;
+ var path = location.pathname.slice(prefix[0].length) || "/";
+ location.replace("https://pasteferry.cc" + path + location.search + location.hash);
+ })();
+ </script>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>同じネットワークで PasteFerry を使う:サーバーなしで、ペアリングするだけ</title>
<meta name="description" content="コンピューターが同じ Wi‑Fi か有線ネットワークにあれば、PasteFerry にサーバーは要りません。アプリを入れて 6 桁のペアリングコードを入力すれば、Mac と Windows のあいだでクリップボードとファイルを同期できます。サブネットが違う場合は、ペアリング時にアドレスをひとつ入力します。">
diff --git a/docs/ja/server/index.html b/docs/ja/server/index.html
index 5796dd0..c8a1acf 100644
--- a/docs/ja/server/index.html
+++ b/docs/ja/server/index.html
@@ -2,6 +2,15 @@
<html lang="ja">
<head>
<meta charset="utf-8">
+ <script>
+ (function () {
+ if (location.hostname !== "baiyuze.github.io") return;
+ var prefix = /^\/(?:pasteferry|copysync)(?=\/|$)/.exec(location.pathname);
+ if (!prefix) return;
+ var path = location.pathname.slice(prefix[0].length) || "/";
+ location.replace("https://pasteferry.cc" + path + location.search + location.hash);
+ })();
+ </script>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>LAN に PasteFerry サーバーを置く:Windows・Mac・Linux の手順</title>
<meta name="description" content="コンピューターが同じネットワークにあれば、クラウドサーバーは要りません。常に電源が入っている Windows・Mac・Linux のコンピューターで、PasteFerry のシグナリング兼 TURN サーバーをスクリプトひとつで動かせます。起動時に自動で立ち上がります。アプリの設定とトラブル対処つき。">
diff --git a/docs/ja/start/index.html b/docs/ja/start/index.html
index 40be557..a5330c4 100644
--- a/docs/ja/start/index.html
+++ b/docs/ja/start/index.html
@@ -2,6 +2,15 @@
<html lang="ja">
<head>
<meta charset="utf-8">
+ <script>
+ (function () {
+ if (location.hostname !== "baiyuze.github.io") return;
+ var prefix = /^\/(?:pasteferry|copysync)(?=\/|$)/.exec(location.pathname);
+ if (!prefix) return;
+ var path = location.pathname.slice(prefix[0].length) || "/";
+ location.replace("https://pasteferry.cc" + path + location.search + location.hash);
+ })();
+ </script>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>はじめかた:3 ステップで PasteFerry を使い始める</title>
<meta name="description" content="PasteFerry がはじめての方へ。各コンピューターにアプリを入れ、同じネットワークならそのままペアリング(サーバー不要)、ネットワークをまたぐなら公開サーバーか Tailscale を選びます。あとは Mac と Windows のあいだでコピー&ペーストできます。">
diff --git a/docs/ja/tailscale/index.html b/docs/ja/tailscale/index.html
index b8cee09..52588b3 100644
--- a/docs/ja/tailscale/index.html
+++ b/docs/ja/tailscale/index.html
@@ -2,6 +2,15 @@
<html lang="ja">
<head>
<meta charset="utf-8">
+ <script>
+ (function () {
+ if (location.hostname !== "baiyuze.github.io") return;
+ var prefix = /^\/(?:pasteferry|copysync)(?=\/|$)/.exec(location.pathname);
+ if (!prefix) return;
+ var path = location.pathname.slice(prefix[0].length) || "/";
+ location.replace("https://pasteferry.cc" + path + location.search + location.hash);
+ })();
+ </script>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Tailscale で PasteFerry をネットワークをまたいで使う:サーバーなしで自宅と会社を同期</title>
<meta name="description" content="各コンピューターに Tailscale を入れて同じアカウントでサインインし、ペアリング時に相手の Tailscale アドレスを入力するだけ。グローバル IP もサーバーも、電源を入れたままのコンピューターも要らず、会社や外出先からもクリップボードを同期できます。">
diff --git a/docs/ja/tour/index.html b/docs/ja/tour/index.html
index 8d0c749..df47007 100644
--- a/docs/ja/tour/index.html
+++ b/docs/ja/tour/index.html
@@ -2,6 +2,15 @@
<html lang="ja">
<head>
<meta charset="utf-8">
+ <script>
+ (function () {
+ if (location.hostname !== "baiyuze.github.io") return;
+ var prefix = /^\/(?:pasteferry|copysync)(?=\/|$)/.exec(location.pathname);
+ if (!prefix) return;
+ var path = location.pathname.slice(prefix[0].length) || "/";
+ location.replace("https://pasteferry.cc" + path + location.search + location.hash);
+ })();
+ </script>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>85 秒でわかる PasteFerry — PasteFerry</title>
<meta name="description" content="Mac、Windows、Linux に対応。テキスト、画像、ファイル、フォルダを、アカウントやネットワークをまたいで同期。P2P 直接接続、エンドツーエンド暗号化、同じネットワークならサーバー不要。無料・オープンソース。">
diff --git a/docs/lan/index.html b/docs/lan/index.html
index e52e378..4ab3917 100644
--- a/docs/lan/index.html
+++ b/docs/lan/index.html
@@ -2,6 +2,15 @@
<html lang="zh-CN">
<head>
<meta charset="utf-8">
+ <script>
+ (function () {
+ if (location.hostname !== "baiyuze.github.io") return;
+ var prefix = /^\/(?:pasteferry|copysync)(?=\/|$)/.exec(location.pathname);
+ if (!prefix) return;
+ var path = location.pathname.slice(prefix[0].length) || "/";
+ location.replace("https://pasteferry.cc" + path + location.search + location.hash);
+ })();
+ </script>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>在同一网络里使用隔空贴:不用服务器,配对就能同步</title>
<meta name="description" content="两台电脑在同一个 Wi‑Fi 或有线网络里时,隔空贴不需要服务器:装好 App,输入 6 位配对码,就能在 Mac 与 Windows 之间同步剪贴板和文件。不在同一网段时,配对时多输入一个地址。">
diff --git a/docs/server/index.html b/docs/server/index.html
index 1286428..8f18f6e 100644
--- a/docs/server/index.html
+++ b/docs/server/index.html
@@ -2,6 +2,15 @@
<html lang="zh-CN">
<head>
<meta charset="utf-8">
+ <script>
+ (function () {
+ if (location.hostname !== "baiyuze.github.io") return;
+ var prefix = /^\/(?:pasteferry|copysync)(?=\/|$)/.exec(location.pathname);
+ if (!prefix) return;
+ var path = location.pathname.slice(prefix[0].length) || "/";
+ location.replace("https://pasteferry.cc" + path + location.search + location.hash);
+ })();
+ </script>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>在局域网里部署隔空贴服务器:Windows、Mac、Linux 教程</title>
<meta name="description" content="两台电脑在同一个网络里时,不需要云服务器:在一台常开的 Windows、Mac 或 Linux 电脑上运行隔空贴的信令与 TURN 服务器,下载后运行一个脚本即可,开机自动运行。附客户端设置与排错。">
diff --git a/docs/start/index.html b/docs/start/index.html
index b0df489..cbcb91d 100644
--- a/docs/start/index.html
+++ b/docs/start/index.html
@@ -2,6 +2,15 @@
<html lang="zh-CN">
<head>
<meta charset="utf-8">
+ <script>
+ (function () {
+ if (location.hostname !== "baiyuze.github.io") return;
+ var prefix = /^\/(?:pasteferry|copysync)(?=\/|$)/.exec(location.pathname);
+ if (!prefix) return;
+ var path = location.pathname.slice(prefix[0].length) || "/";
+ location.replace("https://pasteferry.cc" + path + location.search + location.hash);
+ })();
+ </script>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>快速开始:三步用上隔空贴</title>
<meta name="description" content="第一次用隔空贴?在每台电脑上安装 App;两台在同一个网络里就直接配对,不需要服务器;跨网络时选公网服务器或 Tailscale。之后就能在 Mac 与 Windows 之间复制粘贴。">
diff --git a/docs/tailscale/index.html b/docs/tailscale/index.html
index 50828b9..1303c49 100644
--- a/docs/tailscale/index.html
+++ b/docs/tailscale/index.html
@@ -2,6 +2,15 @@
<html lang="zh-CN">
<head>
<meta charset="utf-8">
+ <script>
+ (function () {
+ if (location.hostname !== "baiyuze.github.io") return;
+ var prefix = /^\/(?:pasteferry|copysync)(?=\/|$)/.exec(location.pathname);
+ if (!prefix) return;
+ var path = location.pathname.slice(prefix[0].length) || "/";
+ location.replace("https://pasteferry.cc" + path + location.search + location.hash);
+ })();
+ </script>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>用 Tailscale 跨网络使用隔空贴:不用服务器,在家和公司之间同步</title>
<meta name="description" content="每台电脑装上 Tailscale、登录同一个账号,配对时输入对方的 Tailscale 地址:不需要公网 IP,不需要服务器,也不需要一直开着的电脑,在公司、在外面都能同步剪贴板。">
diff --git a/docs/tour/index.html b/docs/tour/index.html
index 142a728..263c1a1 100644
--- a/docs/tour/index.html
+++ b/docs/tour/index.html
@@ -2,6 +2,15 @@
<html lang="zh-CN">
<head>
<meta charset="utf-8">
+ <script>
+ (function () {
+ if (location.hostname !== "baiyuze.github.io") return;
+ var prefix = /^\/(?:pasteferry|copysync)(?=\/|$)/.exec(location.pathname);
+ if (!prefix) return;
+ var path = location.pathname.slice(prefix[0].length) || "/";
+ location.replace("https://pasteferry.cc" + path + location.search + location.hash);
+ })();
+ </script>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>一分钟多,了解隔空贴 — 隔空贴</title>
<meta name="description" content="Mac、Windows、Linux 互通。文本、图片、文件、文件夹,跨账号、跨网络,P2P 直连、端到端加密,同一网络里不需要服务器。免费开源。">
diff --git a/docs/zh-hk/cloud/index.html b/docs/zh-hk/cloud/index.html
index dbe67fc..5db9547 100644
--- a/docs/zh-hk/cloud/index.html
+++ b/docs/zh-hk/cloud/index.html
@@ -2,6 +2,15 @@
<html lang="zh-HK">
<head>
<meta charset="utf-8">
+ <script>
+ (function () {
+ if (location.hostname !== "baiyuze.github.io") return;
+ var prefix = /^\/(?:pasteferry|copysync)(?=\/|$)/.exec(location.pathname);
+ if (!prefix) return;
+ var path = location.pathname.slice(prefix[0].length) || "/";
+ location.replace("https://pasteferry.cc" + path + location.search + location.hash);
+ })();
+ </script>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>把隔空貼伺服器部署到公網:雲端伺服器圖文教學</title>
<meta name="description" content="一部有公網 IP 的 Linux 雲端伺服器,執行一個腳本就能安裝好隔空貼的信令與 TURN 伺服器。每部電腦直接連線到它,在家、在公司、在外面都能同步剪貼簿。內容包括安全群組設定、檢查、用戶端設定,以及內地域名 ICP 備案的說明。">
diff --git a/docs/zh-hk/download/index.html b/docs/zh-hk/download/index.html
index ec49655..d53878d 100644
--- a/docs/zh-hk/download/index.html
+++ b/docs/zh-hk/download/index.html
@@ -2,6 +2,15 @@
<html lang="zh-HK">
<head>
<meta charset="utf-8">
+ <script>
+ (function () {
+ if (location.hostname !== "baiyuze.github.io") return;
+ var prefix = /^\/(?:pasteferry|copysync)(?=\/|$)/.exec(location.pathname);
+ if (!prefix) return;
+ var path = location.pathname.slice(prefix[0].length) || "/";
+ location.replace("https://pasteferry.cc" + path + location.search + location.hash);
+ })();
+ </script>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>下載隔空貼:Mac(Apple 晶片、Intel)、Windows、Linux</title>
<meta name="description" content="隔空貼各系統的安裝檔:macOS 13 或以上的 Apple 晶片版與 Intel 版,Windows 10、11 的安裝程式與免安裝版,Linux x64 與 ARM64 的 .deb 和 tar.gz。免費開源。">
diff --git a/docs/zh-hk/index.html b/docs/zh-hk/index.html
index 61f8466..405b40d 100644
--- a/docs/zh-hk/index.html
+++ b/docs/zh-hk/index.html
@@ -2,6 +2,15 @@
<html lang="zh-HK">
<head>
<meta charset="utf-8">
+ <script>
+ (function () {
+ if (location.hostname !== "baiyuze.github.io") return;
+ var prefix = /^\/(?:pasteferry|copysync)(?=\/|$)/.exec(location.pathname);
+ if (!prefix) return;
+ var path = location.pathname.slice(prefix[0].length) || "/";
+ location.replace("https://pasteferry.cc" + path + location.search + location.hash);
+ })();
+ </script>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>隔空貼 PasteFerry:在 Mac、Windows 與 Linux 之間同步剪貼簿與檔案,跨帳戶、跨網絡</title>
<meta name="description" content="隔空貼讓你在一部電腦上複製,到另一部電腦直接貼上,Mac、Windows、Linux 互通。支援文字、圖片、檔案和資料夾,不必使用同一個帳戶。在同一個網絡裏安裝好就能用,不需要伺服器;跨網絡時可用自己部署的伺服器或 Tailscale。裝置之間 P2P 直連、端對端加密。免費開源。">
diff --git a/docs/zh-hk/lan/index.html b/docs/zh-hk/lan/index.html
index 9e9e22c..fb32ca5 100644
--- a/docs/zh-hk/lan/index.html
+++ b/docs/zh-hk/lan/index.html
@@ -2,6 +2,15 @@
<html lang="zh-HK">
<head>
<meta charset="utf-8">
+ <script>
+ (function () {
+ if (location.hostname !== "baiyuze.github.io") return;
+ var prefix = /^\/(?:pasteferry|copysync)(?=\/|$)/.exec(location.pathname);
+ if (!prefix) return;
+ var path = location.pathname.slice(prefix[0].length) || "/";
+ location.replace("https://pasteferry.cc" + path + location.search + location.hash);
+ })();
+ </script>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>在同一網絡裏使用隔空貼:不用伺服器,配對就能同步</title>
<meta name="description" content="兩部電腦在同一個 Wi‑Fi 或有線網絡裏時,隔空貼不需要伺服器:安裝好 App,輸入 6 位配對碼,就能在 Mac 與 Windows 之間同步剪貼簿和檔案。不在同一網段時,配對時多輸入一個地址即可。">
diff --git a/docs/zh-hk/server/index.html b/docs/zh-hk/server/index.html
index 7d3cf66..9e390ee 100644
--- a/docs/zh-hk/server/index.html
+++ b/docs/zh-hk/server/index.html
@@ -2,6 +2,15 @@
<html lang="zh-HK">
<head>
<meta charset="utf-8">
+ <script>
+ (function () {
+ if (location.hostname !== "baiyuze.github.io") return;
+ var prefix = /^\/(?:pasteferry|copysync)(?=\/|$)/.exec(location.pathname);
+ if (!prefix) return;
+ var path = location.pathname.slice(prefix[0].length) || "/";
+ location.replace("https://pasteferry.cc" + path + location.search + location.hash);
+ })();
+ </script>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>在區域網絡裏部署隔空貼伺服器:Windows、Mac、Linux 教學</title>
<meta name="description" content="兩部電腦在同一個網絡裏時,不需要雲端伺服器:在一部長期開着的 Windows、Mac 或 Linux 電腦上執行隔空貼的信令與 TURN 伺服器,下載後執行一個腳本即可,開機自動執行。附用戶端設定與疑難排解。">
diff --git a/docs/zh-hk/start/index.html b/docs/zh-hk/start/index.html
index 155a738..ae4635d 100644
--- a/docs/zh-hk/start/index.html
+++ b/docs/zh-hk/start/index.html
@@ -2,6 +2,15 @@
<html lang="zh-HK">
<head>
<meta charset="utf-8">
+ <script>
+ (function () {
+ if (location.hostname !== "baiyuze.github.io") return;
+ var prefix = /^\/(?:pasteferry|copysync)(?=\/|$)/.exec(location.pathname);
+ if (!prefix) return;
+ var path = location.pathname.slice(prefix[0].length) || "/";
+ location.replace("https://pasteferry.cc" + path + location.search + location.hash);
+ })();
+ </script>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>快速開始:三步用上隔空貼</title>
<meta name="description" content="第一次使用隔空貼?在每部電腦上安裝 App;兩部電腦在同一個網絡裏就直接配對,不需要伺服器;跨網絡時選擇公網伺服器或 Tailscale。之後就能在 Mac 與 Windows 之間複製貼上。">
diff --git a/docs/zh-hk/tailscale/index.html b/docs/zh-hk/tailscale/index.html
index 356c915..79e50db 100644
--- a/docs/zh-hk/tailscale/index.html
+++ b/docs/zh-hk/tailscale/index.html
@@ -2,6 +2,15 @@
<html lang="zh-HK">
<head>
<meta charset="utf-8">
+ <script>
+ (function () {
+ if (location.hostname !== "baiyuze.github.io") return;
+ var prefix = /^\/(?:pasteferry|copysync)(?=\/|$)/.exec(location.pathname);
+ if (!prefix) return;
+ var path = location.pathname.slice(prefix[0].length) || "/";
+ location.replace("https://pasteferry.cc" + path + location.search + location.hash);
+ })();
+ </script>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>用 Tailscale 跨網絡使用隔空貼:不用伺服器,在家和公司之間同步</title>
<meta name="description" content="每部電腦安裝 Tailscale、登入同一個帳戶,配對時輸入對方的 Tailscale 地址:不需要公網 IP,不需要伺服器,也不需要長期開着的電腦,在公司、在外面都能同步剪貼簿。">
diff --git a/docs/zh-hk/tour/index.html b/docs/zh-hk/tour/index.html
index e969a26..330746f 100644
--- a/docs/zh-hk/tour/index.html
+++ b/docs/zh-hk/tour/index.html
@@ -2,6 +2,15 @@
<html lang="zh-HK">
<head>
<meta charset="utf-8">
+ <script>
+ (function () {
+ if (location.hostname !== "baiyuze.github.io") return;
+ var prefix = /^\/(?:pasteferry|copysync)(?=\/|$)/.exec(location.pathname);
+ if (!prefix) return;
+ var path = location.pathname.slice(prefix[0].length) || "/";
+ location.replace("https://pasteferry.cc" + path + location.search + location.hash);
+ })();
+ </script>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>一分多鐘,認識隔空貼 — 隔空貼</title>
<meta name="description" content="Mac、Windows、Linux 互通。文字、圖片、檔案、資料夾,跨帳戶、跨網絡,P2P 直連、端對端加密,同一網絡內不需要伺服器。免費開源。">
diff --git a/docs/zh-tw/cloud/index.html b/docs/zh-tw/cloud/index.html
index 32d0817..62bc812 100644
--- a/docs/zh-tw/cloud/index.html
+++ b/docs/zh-tw/cloud/index.html
@@ -2,6 +2,15 @@
<html lang="zh-TW">
<head>
<meta charset="utf-8">
+ <script>
+ (function () {
+ if (location.hostname !== "baiyuze.github.io") return;
+ var prefix = /^\/(?:pasteferry|copysync)(?=\/|$)/.exec(location.pathname);
+ if (!prefix) return;
+ var path = location.pathname.slice(prefix[0].length) || "/";
+ location.replace("https://pasteferry.cc" + path + location.search + location.hash);
+ })();
+ </script>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>把隔空貼伺服器架在雲端:雲端主機圖文教學</title>
<meta name="description" content="一台有公用 IP 的 Linux 雲端主機,執行一個腳本就能裝好隔空貼的信令與 TURN 伺服器。每台電腦直接連到它,在家、在公司、在外面都能同步剪貼簿。內容包括安全群組設定、檢查、用戶端設定,以及中國大陸網域 ICP 備案的說明。">
diff --git a/docs/zh-tw/download/index.html b/docs/zh-tw/download/index.html
index d3e5371..0ba28bf 100644
--- a/docs/zh-tw/download/index.html
+++ b/docs/zh-tw/download/index.html
@@ -2,6 +2,15 @@
<html lang="zh-TW">
<head>
<meta charset="utf-8">
+ <script>
+ (function () {
+ if (location.hostname !== "baiyuze.github.io") return;
+ var prefix = /^\/(?:pasteferry|copysync)(?=\/|$)/.exec(location.pathname);
+ if (!prefix) return;
+ var path = location.pathname.slice(prefix[0].length) || "/";
+ location.replace("https://pasteferry.cc" + path + location.search + location.hash);
+ })();
+ </script>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>下載隔空貼:Mac(Apple 晶片、Intel)、Windows、Linux</title>
<meta name="description" content="隔空貼各系統的安裝檔:macOS 13 以上的 Apple 晶片版與 Intel 版,Windows 10、11 的安裝程式與免安裝版,Linux x64 與 ARM64 的 .deb 和 tar.gz。免費開源。">
diff --git a/docs/zh-tw/index.html b/docs/zh-tw/index.html
index c5d4c59..171615c 100644
--- a/docs/zh-tw/index.html
+++ b/docs/zh-tw/index.html
@@ -2,6 +2,15 @@
<html lang="zh-TW">
<head>
<meta charset="utf-8">
+ <script>
+ (function () {
+ if (location.hostname !== "baiyuze.github.io") return;
+ var prefix = /^\/(?:pasteferry|copysync)(?=\/|$)/.exec(location.pathname);
+ if (!prefix) return;
+ var path = location.pathname.slice(prefix[0].length) || "/";
+ location.replace("https://pasteferry.cc" + path + location.search + location.hash);
+ })();
+ </script>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>隔空貼 PasteFerry:在 Mac、Windows 與 Linux 之間同步剪貼簿與檔案,跨帳號跨網路</title>
<meta name="description" content="隔空貼讓你在一台電腦上複製,到另一台直接貼上,Mac、Windows、Linux 互通。支援文字、圖片、檔案和資料夾,不必使用同一個帳號。在同一個網路裡裝好就能用,不需要伺服器;跨網路時可以用自己架設的伺服器或 Tailscale。裝置之間 P2P 直連、端對端加密。免費開源。">
diff --git a/docs/zh-tw/lan/index.html b/docs/zh-tw/lan/index.html
index bdc9de0..1795ccc 100644
--- a/docs/zh-tw/lan/index.html
+++ b/docs/zh-tw/lan/index.html
@@ -2,6 +2,15 @@
<html lang="zh-TW">
<head>
<meta charset="utf-8">
+ <script>
+ (function () {
+ if (location.hostname !== "baiyuze.github.io") return;
+ var prefix = /^\/(?:pasteferry|copysync)(?=\/|$)/.exec(location.pathname);
+ if (!prefix) return;
+ var path = location.pathname.slice(prefix[0].length) || "/";
+ location.replace("https://pasteferry.cc" + path + location.search + location.hash);
+ })();
+ </script>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>在同一個網路裡使用隔空貼:不用伺服器,配對就能同步</title>
<meta name="description" content="兩台電腦在同一個 Wi‑Fi 或有線網路裡時,隔空貼不需要伺服器:裝好 App,輸入 6 碼配對碼,就能在 Mac 與 Windows 之間同步剪貼簿和檔案。不在同一個網段時,配對時多輸入一個位址。">
diff --git a/docs/zh-tw/server/index.html b/docs/zh-tw/server/index.html
index 32ae513..f05677a 100644
--- a/docs/zh-tw/server/index.html
+++ b/docs/zh-tw/server/index.html
@@ -2,6 +2,15 @@
<html lang="zh-TW">
<head>
<meta charset="utf-8">
+ <script>
+ (function () {
+ if (location.hostname !== "baiyuze.github.io") return;
+ var prefix = /^\/(?:pasteferry|copysync)(?=\/|$)/.exec(location.pathname);
+ if (!prefix) return;
+ var path = location.pathname.slice(prefix[0].length) || "/";
+ location.replace("https://pasteferry.cc" + path + location.search + location.hash);
+ })();
+ </script>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>在區域網路裡架設隔空貼伺服器:Windows、Mac、Linux 教學</title>
<meta name="description" content="兩台電腦在同一個網路裡時,不需要雲端伺服器:在一台常開的 Windows、Mac 或 Linux 電腦上執行隔空貼的信令與 TURN 伺服器,下載後執行一個腳本即可,開機自動執行。附用戶端設定與疑難排解。">
diff --git a/docs/zh-tw/start/index.html b/docs/zh-tw/start/index.html
index 9b25f1f..bf73c67 100644
--- a/docs/zh-tw/start/index.html
+++ b/docs/zh-tw/start/index.html
@@ -2,6 +2,15 @@
<html lang="zh-TW">
<head>
<meta charset="utf-8">
+ <script>
+ (function () {
+ if (location.hostname !== "baiyuze.github.io") return;
+ var prefix = /^\/(?:pasteferry|copysync)(?=\/|$)/.exec(location.pathname);
+ if (!prefix) return;
+ var path = location.pathname.slice(prefix[0].length) || "/";
+ location.replace("https://pasteferry.cc" + path + location.search + location.hash);
+ })();
+ </script>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>快速入門:三個步驟用上隔空貼</title>
<meta name="description" content="第一次用隔空貼?在每台電腦上安裝 App;兩台在同一個網路裡就直接配對,不需要伺服器;跨網路時選擇雲端伺服器或 Tailscale。之後就能在 Mac 與 Windows 之間複製貼上。">
diff --git a/docs/zh-tw/tailscale/index.html b/docs/zh-tw/tailscale/index.html
index 9fb87fc..515fb9b 100644
--- a/docs/zh-tw/tailscale/index.html
+++ b/docs/zh-tw/tailscale/index.html
@@ -2,6 +2,15 @@
<html lang="zh-TW">
<head>
<meta charset="utf-8">
+ <script>
+ (function () {
+ if (location.hostname !== "baiyuze.github.io") return;
+ var prefix = /^\/(?:pasteferry|copysync)(?=\/|$)/.exec(location.pathname);
+ if (!prefix) return;
+ var path = location.pathname.slice(prefix[0].length) || "/";
+ location.replace("https://pasteferry.cc" + path + location.search + location.hash);
+ })();
+ </script>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>用 Tailscale 跨網路使用隔空貼:不用伺服器,在家和公司之間同步</title>
<meta name="description" content="每台電腦裝上 Tailscale、登入同一個帳號,配對時輸入對方的 Tailscale 位址:不需要公用 IP,不需要伺服器,也不需要一直開著的電腦,在公司、在外面都能同步剪貼簿。">
diff --git a/docs/zh-tw/tour/index.html b/docs/zh-tw/tour/index.html
index 5beb29e..a7e727d 100644
--- a/docs/zh-tw/tour/index.html
+++ b/docs/zh-tw/tour/index.html
@@ -2,6 +2,15 @@
<html lang="zh-TW">
<head>
<meta charset="utf-8">
+ <script>
+ (function () {
+ if (location.hostname !== "baiyuze.github.io") return;
+ var prefix = /^\/(?:pasteferry|copysync)(?=\/|$)/.exec(location.pathname);
+ if (!prefix) return;
+ var path = location.pathname.slice(prefix[0].length) || "/";
+ location.replace("https://pasteferry.cc" + path + location.search + location.hash);
+ })();
+ </script>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>一分多鐘,認識隔空貼 — 隔空貼</title>
<meta name="description" content="Mac、Windows、Linux 互通。文字、圖片、檔案、資料夾,跨帳號、跨網路,P2P 直連、端對端加密,同一個網路裡不需要伺服器。免費開源。">
diff --git a/tools/site/build.py b/tools/site/build.py
index 461b761..b86901a 100644
--- a/tools/site/build.py
+++ b/tools/site/build.py
@@ -85,11 +85,24 @@ GLOBE = ('<svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-widt
CHEVRON = ('<svg class="chev" viewBox="0 0 12 12" fill="none" stroke="currentColor" stroke-width="1.5" '
'stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m3 4.5 3 3 3-3"/></svg>')
+# 同一份页面也由 GitHub Pages 发布;在那里先跳到官网,再加载样式和其他脚本。
+GITHUB_PAGES_REDIRECT = """ <script>
+ (function () {
+ if (location.hostname !== "baiyuze.github.io") return;
+ var prefix = /^\\/(?:pasteferry|copysync)(?=\\/|$)/.exec(location.pathname);
+ if (!prefix) return;
+ var path = location.pathname.slice(prefix[0].length) || "/";
+ location.replace(SITE_ORIGIN + path + location.search + location.hash);
+ })();
+ </script>
+""".replace("SITE_ORIGIN", json.dumps(SITE.rstrip("/")))
+
# 首页按浏览器语言跳转:只在简体中文的首页(网站根目录)做,选过语言后以选的为准。
# 香港、澳门的繁体去香港版,其他繁体(台湾、只写了 zh-Hant 的)去台湾版
REDIRECT = """ <script>
// 第一次打开时按浏览器语言跳到对应页面;在页面上选过语言后,以选的为准
(function () {
+ if (location.hostname === "baiyuze.github.io") return;
try {
var paths = PATHS;
var pick = localStorage.getItem("pasteferry-lang");
@@ -107,7 +120,7 @@ REDIRECT = """ <script>
}
pick = pick || "en";
}
- if (paths[pick]) location.replace(paths[pick] + location.hash);
+ if (paths[pick]) location.replace(paths[pick] + location.search + location.hash);
} catch (e) {}
})();
</script>
@@ -2158,6 +2171,9 @@ def tour_page(code: str) -> str:
def write(path: Path, text: str) -> None:
+ if path.suffix == ".html":
+ text = text.replace(' <meta charset="utf-8">\n',
+ ' <meta charset="utf-8">\n' + GITHUB_PAGES_REDIRECT, 1)
path.parent.mkdir(parents=True, exist_ok=True)
path.write_text(text, encoding="utf-8")
print("✓", path.relative_to(ROOT))