Clipboard on the GO 😉
A simple clipboard synchronization tool built with Go. It consists of a server and a client application that work together to keep your clipboard data in sync across multiple devices.
Features
- Real-time clipboard synchronization
- Cross-platform support (Windows, macOS, Linux)
- Easy to set up and use
- Lightweight and efficient
- Optional statistics dashboard for monitoring connected clients and message relay counts
Prerequisites
- Go programming language installed (version 1.16 or higher)
- Git installed
Installation
- Clone the repository:
git clone https://gitea.reversed.dev/space/clipboard-on-the-go.git cd clipboard-on-the-go - Modify the configuration.
2.1 Server Configuration:
- Navigate to the
serverdirectory. - Make a new file called
config.goand paste/modify the following code:
- Navigate to the
package main
const (
// Update these values before building
EmbeddedServerIP = "0.0.0.0"
EmbeddedServerPort = "8080"
EmbeddedServerStats = true
)
2.2 Client Configuration:
- Navigate to the
clientdirectory. - Make a new file calledconfig.goand paste/modify the following code:
package main
const (
// Update these values before building
EmbeddedIdentification = "my-unique-id"
EmbeddedServerIP = "100.107.73.38"
EmbeddedServerPort = "8080"
)
- Build the programs.
- Run the
build.batscript in the root directory to build both the server and client applications.
- Run the server.
- Navigate to the
serverdirectory and execute theclipboard-sync-server.exefile.
- Run the client.
- Navigate to the
clientdirectory and execute theclipboard-sync.exefile.
Usage
This is intended to be hosted on a public ish server, preferably in a tailnet or via a VPN, as you never should expose anything to the internet.
I use this on my home server, which i can connect to with tailscale, so i don't have to worry about exposing it to the internet.
Clients are identified by the EmbeddedIdentification value in the client config file. Make sure to set this to a unique value for each USER you want to sync. If you want to sync multiple devices for the same user, just run multiple instances of the client with the same EmbeddedIdentification.
Statistics Dashboard
If EmbeddedServerStats is set, the server will serve a live statistics dashboard at http://localhost:8080/stats showing:
- Number of connected clients
- Number of messages relayed
The dashboard uses Tailwind CSS CDN for styling and updates live every second.
License
This project is licensed under the MIT License.
Disclaimer
This software is provided "as is", without warranty of any kind. Use at your own risk.