Skip to content

Latest commit

 

History

25 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CyberPaste

A lossless shared clipboard for your LAN — copy on one PC, paste on another as if it were local. Text and images ride the normal clipboard; files and folders are streamed at full speed over a dedicated channel.

同一區網內的無損共享剪貼簿——在一台電腦複製,到另一台直接貼上,就像本機一樣。文字與圖片走一般剪貼簿;檔案與資料夾走專用高速通道全速傳輸。

Features / 功能

  • Text — Unicode-safe plain-text sync.
  • Images — lossless PNG, no re-compression, no blur.
  • Files & folders — high-speed bulk transfer. Copy a folder on one PC; on another, paste it into any folder using Ctrl+V, right-click Paste, or the toolbar Paste button. CyberPaste streams the whole set over one dedicated connection into the folder you pasted to, with its own progress window and an overwrite prompt. No Explorer conflict dialogs.
  • Zero-config discovery — peers on the same LAN find each other automatically (UDP broadcast plus per-subnet directed beacons that self-heal).
  • Automatic best-path selection — wired > Wi-Fi > virtual > VPN. It avoids Hamachi/VPN, picks the fastest link, and fails over to the next path mid-transfer.
  • Byte-level resume — a dropped link resumes from the exact offset, only re-sending what was left.
  • Tray-only UI — a single system-tray icon; open means the channel is on.
  • 文字 — 保留 Unicode 的純文字同步。
  • 圖片 — 無損 PNG,不重新壓縮、不糊掉。
  • 檔案與資料夾 — 高速大宗傳輸。 在一台電腦複製資料夾;到另一台,用 Ctrl+V、右鍵貼上、或工具列的貼上按鈕 貼進任意資料夾。CyberPaste 會用一條專用連線把整批檔案全速串流進你貼上的那個資料夾,附自己的進度視窗與覆蓋詢問,不會跳 Explorer 的衝突框。
  • 零設定探索 — 同區網的電腦自動互相發現(UDP 廣播,加上對各網卡子網的定向 beacon,可自我修復)。
  • 自動選最佳通道 — 有線 > Wi-Fi > 虛擬 > VPN。自動避開 Hamachi/VPN、走最快的線,傳輸中若斷線會自動切換到次佳路徑。
  • 位元組級續傳 — 線路中斷後從精確位移接回,只補傳剩下的部分。
  • 只有系統匣介面 — 一顆系統匣圖示;開啟就代表通道打開。

How it works / 運作原理

Each PC runs a tray agent that watches the local clipboard and mirrors changes to discovered peers. Text and images go straight onto the clipboard. For files, the receiver places a tiny hidden marker file on its clipboard; when you paste it into a folder (by any method), CyberPaste detects it, streams the real files over a dedicated TCP connection into that folder, then removes the marker. Because Explorer never copies the real files itself, there are no conflict dialogs and any paste method works.

每台電腦跑一個系統匣常駐程式,監看本機剪貼簿並把變化鏡像給已發現的夥伴。文字與圖片直接進剪貼簿。檔案則是:接收端在剪貼簿放一個隱藏的小標記檔,當你用任何方式把它貼進某個資料夾,CyberPaste 偵測到後就用一條專用 TCP 連線把真正的檔案串流進那個資料夾,再把標記檔移除。因為 Explorer 從頭到尾不碰真正的檔案,所以不會有衝突框、任何貼上方式都能用。

Usage / 使用方式

  1. Run CyberPaste.exe on each PC (administrator rights required).
  2. The first time, allow it through Windows Firewall on private networks.
  3. Copy on PC A; on PC B, paste into any folder. Text and images paste as usual; a folder starts a high-speed transfer with its own progress window.
  1. 在每台電腦執行 CyberPaste.exe(需要系統管理員權限)。
  2. 第一次執行時,在 Windows 防火牆允許私人網路。
  3. 在 A 機複製;到 B 機,貼進任意資料夾。文字圖片照常貼上;資料夾則會開始高速傳輸並顯示自己的進度視窗。

Build / 編譯

CyberPaste needs only the .NET Framework 4.x compiler that ships with Windows — no SDK, no dependencies. Run build.bat and it produces build/CyberPaste.exe.

CyberPaste 只需要 Windows 內建的 .NET Framework 4.x 編譯器——不用 SDK、無外部相依。執行 build.bat 就會產生 build/CyberPaste.exe。

Ports & Security / 連接埠與安全

UDP 45888 for discovery, TCP 45889 for transfer. Designed for a trusted LAN; traffic is not encrypted.

UDP 45888 用於探索,TCP 45889 用於傳輸。為可信任的內網設計,流量不加密。

Changelog / 更新日誌

  • v1.3.0 — Baseline. Two-way text / image / file sync across machines using OLE delayed-rendering virtual files, plus file logging.
  • v1.3.1 — Self-healing discovery: per-subnet directed beacons let peers rediscover each other automatically, fixing the "can't transfer a second time" bug. Added crash / freeze logging and a heartbeat.
  • v1.3.2 — Connection pooling: reuses ~8–10 long-lived connections instead of one TCP connection per file, plus Wi-Fi unicast keep-alive.
  • v1.3.3 — Byte-level transparent resume: a dropped link resumes from the exact offset and only re-sends the remaining bytes, invisible to Explorer.
  • v1.3.4 — Automatic best-path selection (wired > Wi-Fi > virtual > VPN, avoids Hamachi) and automatic failover to the next-best path mid-transfer.
  • v1.3.5 — Renamed to CyberPaste; system-tray menu polish.
  • v1.3.6 — First take on high-speed bulk transfer: large folders bypass Explorer's per-file copy and stream over one connection, chosen automatically by size.
  • v1.3.7 — Made bulk transfer opt-out and fell back to the reliable per-file paste while the trigger was reworked.
  • v1.3.8 — Bulk transfer triggered by a real Ctrl+V (low-level keyboard hook) rather than clipboard callbacks, so it never fires unless you actually paste.
  • v1.3.9 — Files put only a private marker on the clipboard (no OLE file descriptor), removing Explorer paste conflicts.
  • v1.4.0 — Bulk transfer via a hidden marker file detected by a drive watcher, so Ctrl+V, right-click Paste and the toolbar Paste button all work; added the overwrite prompt.
  • v1.4.1 — The marker file is removed the moment you paste, and the progress window closes with a quick flash.
  • v1.4.2 — High-speed bulk file transfer. Files now stream over one dedicated connection into the folder you paste to, with CyberPaste's own progress window and an overwrite prompt — no Explorer conflict dialogs. Paste with Ctrl+V, right-click Paste, or the toolbar Paste button (a tiny hidden marker file is detected by a drive watcher that survives repeated multi-GB transfers). Measured ~0.9–1.1 Gbps over a VM NAT link.
  • v1.4.3 — The drive watcher resumes the moment a transfer drops into its reconnect loop, so you can paste the next item without reopening.
  • v1.4.4 — One-shot paste (a copy transfers once; copy again to send again), a new paste supersedes a stuck transfer, and the tray icon now matches the app icon.
  • v1.4.5 — Closing the progress window now cancels that transfer, so you can immediately paste the next item.
  • v1.4.6 — Added a "start on boot" toggle in the tray menu (starts elevated at logon via a Task Scheduler task, no UAC prompt), plus a first-run desktop shortcut pointing to the current exe — and if that shortcut was hidden, it stays hidden.
  • v1.4.7 — Fixed a PC discovering itself as a peer. Local addresses were snapshotted once at startup, so any NIC that came up later (APIPA, virtual adapters, VPN, a DHCP lease) was missing from the list and the machine's own beacon was accepted as a new peer — it would then announce files to itself (turning a plain local copy-paste into a CyberPaste transfer) and push text and images to itself instead of the real peer. Local addresses are now enumerated live, every beacon carries a per-run instance ID that is ignored on receipt, and anything arriving from a local address is never applied. Echo suppression also expires after a few seconds, so copying identical content twice sends it again.
  • v1.4.8 — Fixed a folder copied from the root of a drive losing the first character of its name (D:\MapleStory arrived as apleStory); copying a whole drive root used to produce an invalid path and abort the transfer. "Skip existing" now compares file sizes, so a half-written file left behind by an interrupted transfer is re-fetched instead of being silently kept as if it were complete. A corrupt image from the other machine is now logged and skipped instead of raising a fatal clipboard error. Transfers log throughput once per second on both ends — each line carries the elapsed time, so a stall shows up as a gap. Peers are dropped after 40 seconds instead of 15 (a busy machine writing thousands of files no longer falls off the list), and peers joining or leaving are logged. A peer closing the connection is no longer reported as a failure. (current release)
  • v1.3.0 — 基準版。以 OLE 延遲渲染虛擬檔達成跨機的文字/圖片/檔案雙向同步,並加入檔案日誌。
  • v1.3.1 — 探索自我修復:對各網卡子網發定向 beacon,讓夥伴自動重新發現彼此,修好「傳完一次後第二次傳不動」的問題。加入崩潰/凍結記錄與心跳。
  • v1.3.2 — 連線池:以約 8~10 條長連線反覆重用,取代「一個檔一條 TCP 連線」,並加上 Wi-Fi 單播保活。
  • v1.3.3 — 位元組級透明續傳:線路中斷後從精確位移接回,只補傳剩餘的 bytes,對檔案總管完全隱形。
  • v1.3.4 — 自動選最佳通道(有線 > Wi-Fi > 虛擬 > VPN,避開 Hamachi),傳輸中路徑失效會自動切換到次佳路徑。
  • v1.3.5 — 更名為 CyberPaste;系統匣選單微調。
  • v1.3.6 — 高速大宗傳輸初版:大資料夾跳過 Explorer 逐檔複製、改用一條連線串流,依大小自動判定。
  • v1.3.7 — 改為預設不自動接管、先退回可靠的逐檔貼上,同時重新設計觸發方式。
  • v1.3.8 — 大宗改由真正的 Ctrl+V(低階鍵盤 hook)觸發,而非剪貼簿回呼,沒真的貼上就絕不啟動。
  • v1.3.9 — 檔案在剪貼簿只放私有標記(不放 OLE 檔案描述子),消除 Explorer 貼上衝突。
  • v1.4.0 — 大宗改用隱藏標記檔+磁碟監看偵測,Ctrl+V、右鍵貼上、工具列貼上都能用;加入覆蓋詢問。
  • v1.4.1 — 一貼上就移除標記檔、進度視窗快閃即關。
  • v1.4.2 — 高速大宗檔案傳輸。檔案改用一條專用連線串流進你貼上的那個資料夾,附 CyberPaste 自己的進度視窗與覆蓋詢問——不再跳 Explorer 衝突框。可用 Ctrl+V、右鍵貼上、或工具列的貼上按鈕(放一個隱藏小標記檔,由磁碟監看偵測,且能撐過連續多 GB 傳輸)。VM NAT 連線實測約 0.9~1.1 Gbps。
  • v1.4.3 — 傳輸一進入重連等待就恢復磁碟監看,讓你不必重開就能貼下一個。
  • v1.4.4 — 一次性貼上(複製一次=傳一次,要再傳就重新複製)、新的貼上會取代卡住的傳輸、系統匣圖示改為與 App 圖示一致。
  • v1.4.5 — 關閉進度視窗即取消該次傳輸,可立刻貼下一個。
  • v1.4.6 — 系統匣選單新增「開機時自動啟動」(工作排程器登入觸發、以系統管理員啟動不跳 UAC),並在首次執行於桌面建立指向目前 exe 的捷徑;若該捷徑原本是隱藏的,會維持隱藏。
  • v1.4.7 — 修好「電腦把自己當成同步夥伴」。本機位址原本只在啟動時快照一次,之後才上線的網卡(APIPA、虛擬網卡、VPN、DHCP 取得的位址)都不在名單裡,導致自己發出的 beacon 被當成新夥伴收下——於是本機複製檔案會 announce 給自己(同一台電腦的一般複製貼上被變成 CyberPaste 傳輸),文字與圖片也推給自己而非真正的夥伴。現在本機位址改為即時列舉,每次啟動產生的實例 ID 會隨 beacon 送出並在收到時忽略,且任何來自本機位址的內容一律不套用。回音抑制也改為數秒後失效,複製相同內容第二次會再次傳送。
  • v1.4.8 — 修好「從磁碟根目錄複製的資料夾會少掉名稱第一個字」(D:\MapleStory 傳過去變成 apleStory);複製整顆磁碟根目錄原本會產生非法路徑而中斷傳輸。「略過已存在」改為比對檔案大小,上一輪中斷留下的半截檔會重新接收,不再被當成完成品靜默保留。對方送來的損壞圖片改為記錄後略過,不再拋出致命的剪貼簿錯誤。傳輸時兩端各記錄每秒吞吐,每行都帶經過秒數,停頓會直接顯示成時間缺口。夥伴逾時由 15 秒放寬為 40 秒(正忙著寫入上萬個檔案的機器不會再被誤踢出名單),夥伴上線與離線都會寫入日誌。對方關閉連線不再被記錄成失敗。(目前版本)

Verified publisher / 已驗證發行者

CyberPaste.exe is code-signed by YangMieh / 小咩. To have Windows show it as a verified publisher on machines you control, run cert/install-publisher-trust.ps1 as Administrator. See cert/README.md for details.

CyberPaste.exe 由 小咩 / YangMieh 簽章。若要讓 Windows 在你掌控的電腦上把它顯示為「已驗證」發行者,請以系統管理員身分執行 cert/install-publisher-trust.ps1,詳見 cert/README.md。

Author / 作者

Made by YangMieh / 小咩.

由 小咩 / YangMieh 製作。

About

同一區網的無損共享剪貼簿:一台複製、另一台直接貼上,文字/圖片/檔案資料夾全速傳輸。A lossless LAN shared clipboard — copy on one PC, paste on another; text, images and whole folders at full speed.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages