A lightweight LAN shared clipboard between a Windows PC and an Android phone — a small, fast alternative to Windows Phone Link for copying text, images and files between devices.
- PC: Go system-tray app. Single ~11 MB
.exe, no runtime to install. - Android: native Kotlin app. ~6 MB APK.
- Transport: one TLS port on the LAN carrying a WebSocket control channel + HTTPS file transfer. The phone finds the PC via mDNS; pairing is a QR scan.
- No cloud. Everything stays on your local network.
All phases built and verified on Android 14:
| Feature | phone → PC | PC → phone |
|---|---|---|
| Text clipboard | Share sheet / tile / button | Auto (tap-to-copy notification) |
| Image clipboard | Share sheet | Auto (inline / HTTPS) |
| File transfer | Share sheet → HTTPS | Tray "Send file…" → HTTPS, saved to Downloads/ClipCross |
| Open link on other device | Share → "Open link on PC" | Tray "Open clipboard link on phone" |
| Clipboard history (last 20) | Phone history screen | Tray "Recent" submenu |
| Run at login | — | Tray "Start with Windows" |
Footprint: PC idle working set ≈ 22 MB (vs Phone Link's hundreds of MB across processes); windowless stripped exe ≈ 8 MB. Android APK ≈ 6 MB.
Hybrid, chosen to fit Android's clipboard rules (Android 10+ blocks background clipboard access):
- PC → phone: automatic. Sets the clipboard when the app is foreground; else posts a "tap to copy" notification.
- phone → PC: manual push via the Android Share Sheet, a Quick Settings tile, or an in-app button (content arrives through the share intent, so no restricted clipboard read is needed).
cd pc
# dev build (keeps a console for logs)
go build -o clipcross.exe .
# release build (no console window, smaller binary)
go build -ldflags "-H=windowsgui -s -w" -o clipcross.exe .
./clipcross.exeA tray icon appears. Config, TLS cert, pairing QR, clipboard history and the log
(clipcross.log) live in %APPDATA%\ClipCross. Use the tray's Start with
Windows to launch it at login.
cd android
./gradlew.bat :app:assembleDebugAPK: android/app/build/outputs/apk/debug/app-debug.apk.
Install on the phone (USB debugging enabled, phone plugged in):
& "$env:ANDROID_HOME\platform-tools\adb.exe" install -r app\build\outputs\apk\debug\app-debug.apkOr copy the APK to the phone and install it manually (allow "install unknown apps").
- Make sure the PC and phone are on the same Wi-Fi / LAN.
- PC tray → Pair device… → a QR image opens.
- Phone app → Pair with PC → scan the QR.
- The phone stores the host, port, auth token and the PC certificate fingerprint (pinned, trust-on-first-use), then connects. The tray status shows "1 phone connected".
pc/ Go system-tray app
internal/config settings (%APPDATA%\ClipCross\config.json)
internal/tlsutil self-signed cert + fingerprint
internal/server WebSocket + HTTPS file endpoints
internal/discovery mDNS advertising
internal/pairing pairing payload + QR
internal/tray tray icon/menu
android/ Kotlin app
.../data SharedPreferences pairing store
.../net OkHttp WS client, cert pinning, mDNS, messages
.../service foreground service (connection + reconnect)
.../ui main screen + QR pairing