Skip to content

ClipCascade is a lightweight utility that automatically syncs the clipboard across devices, no key press required.

License

Notifications You must be signed in to change notification settings

Sathvik-Rao/ClipCascade

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

ClipCascade Logo ClipCascade

ClipCascade is a lightweight, open-source utility that automatically syncs your clipboard across multiple devicesβ€”no manual input required. It ensures seamless sharing with robust end-to-end encryption, providing a secure and reliable clipboard experience across workstations.

πŸš€ No Server? No Problem! Instantly sync your clipboard using the Live Community Server at clipcascade.sathvik.devβ€”no setup needed. Just create an account and start sharing your clipboard across devices in seconds!

Docker Windows macOS Android Linux
Docker Windows macOS Android Linux

arch_design_p2s arch_design_p2p

πŸ“Έ Screenshots

πŸͺŸ Desktop (Windows) 🍏 Desktop (macOS) πŸ€–πŸ“± Mobile (Android) πŸ§πŸ–±οΈ Desktop (Linux_GUI) 🐧⌨️ Desktop (Linux_CLI)
Desktop (Windows) - 1 Desktop (macOS) - 1 Mobile (Android) - 1 Desktop (Linux_GUI) - 1 Desktop (Linux_CLI) - 1
Desktop (Windows) - 2 Desktop (macOS) - 2 Mobile (Android) - 2 Desktop (Linux_GUI) - 2 Desktop (Linux_non_GUI) - 2

✨ Features

  • πŸš€ Instant Clipboard Sync – Clipboard content updates in real time across all connected devices. Just copy, and it’s there!
  • πŸ”’ Secure Authentication – Ensures only authorized users can sync clipboard data.
  • πŸ›‘οΈ End-to-End Encryption – Protects clipboard content with advanced cryptographic security and hashing techniques.
  • πŸ”„ Dual Sync Modes:
    • ☁️ Server-Based Sync – Reliable cloud-based synchronization via a centralized server.
    • πŸ”— Peer-to-Peer Sync – Direct device-to-device connection for ultra-low latency and minimal server dependency.
  • πŸ’» Cross-Platform Compatibility – Works seamlessly on Windows, macOS, Linux, and Android.
  • πŸ“„πŸ“·πŸ“ Universal Clipboard – Syncs text, images, and files effortlessly across devices.
  • πŸ“¦ Self-Hosting Option – Deploy your own secure instance using a Docker image or standalone JAR file.
  • πŸ‘₯ Multi-User Support – Isolates clipboard data per user while enabling seamless syncing between personal devices.
  • 🌐 Web-Based Dashboard – Track clipboard activity and manage settings through an intuitive interface.
  • βš™οΈ Customizable Preferences – Fine-tune sync settings for performance, security, and usability.
  • πŸ”” Smart Update Notifications – Stay informed about new features, security patches, and enhancements.
Type Windows MacOS Linux GUI Linux CLI Android
Text βœ” βœ” βœ” βœ” βœ”
Image βœ” βœ” βœ” βœ” βœ”
Files βœ” βœ” βœ” βœ” βœ”

πŸ“₯ Installation Guide

🦾 Self-Hosting ClipCascade on Bare Metal:

To deploy the ClipCascade server on any operating system that supports Java 17 or later, follow the steps outlined below.

  1. Download the Server JAR File

    Obtain the latest release of ClipCascade-Server-JRE_17.jar from the release page.

  2. Configure Environment Variables (Optional)

    The ClipCascade server supports various environment variables for customization. None of these variables are mandatory, but they can be configured as needed.

    For a comprehensive list of available environment variables, refer to the Advanced Details section.

    Variable Description Default Value Example
    CC_MAX_MESSAGE_SIZE_IN_MiB Defines the maximum allowed message size in MiB. Ignored if CC_P2P_ENABLED is set to true. 1 3
    CC_ALLOWED_ORIGINS Specifies the allowed CORS origins for secure cross-origin access. * https://clipcascade.example.com
    CC_P2P_ENABLED Enables or disables peer-to-peer mode. When enabled, CC_MAX_MESSAGE_SIZE_IN_MiB is ignored. false true
    CC_SIGNUP_ENABLED Allows or restricts user self-registration. false false
    CC_PORT Specifies the port on which the server listens for incoming connections. 8080 1234
  3. Start the Server
    Run the following command in the terminal to launch the ClipCascade server:

    java -jar ClipCascade-Server-JRE_17.jar
  4. Access the Server
    Once the server is running, you can access it via:

    http://localhost:8080
    
    • Default Credentials:
      • Username: admin
      • Password: admin123

Important: It is strongly recommended to change the default credentials immediately after the initial login.

For guidance on setting up a reverse proxy, refer to the Reverse Proxy Setup section.

➑️ Explore Advanced Details


🐳 Self-Hosting ClipCascade Using Docker:

Quick Installation (Single Command)

For users who prefer a one-liner, you can deploy ClipCascade instantly using:

docker run -d --name clipcascade -p 8080:8080 -e CC_MAX_MESSAGE_SIZE_IN_MiB=1 -v ./cc_users:/database sathvikrao/clipcascade

Detailed Installation Steps

To host ClipCascade on your server using Docker, follow these steps:

  1. Create a docker-compose.yml File

    Create a docker-compose.yml file with the following content, or download it from the release page:

    services:
      clipcascade:
        image: sathvikrao/clipcascade:latest
        ports:
          - "8080:8080"  # Expose the ClipCascade server on port 8080
        restart: always  # Automatically restart the container if it stops
        volumes:
          - ./cc_users:/database  # Persistent storage for user data
        environment:
          - CC_MAX_MESSAGE_SIZE_IN_MiB=1   # Maximum message size in MiB (ignored if P2P mode is enabled)
          - CC_P2P_ENABLED=false  # Enables or disables peer-to-peer(P2P) mode
          # - CC_ALLOWED_ORIGINS=https://clipcascade.example.com  # Defines allowed CORS origins for security
          # - CC_SIGNUP_ENABLED=false  # Enables or disables user self-registration

    For additional .yml configuration files, visit ClipCascade Server Docker Configuration.

  2. Deploy the Docker Container

    Run the Docker container using Docker Compose:

    docker-compose up -d
    
  3. Access the Server
    Once the server is running, you can access it via:

    http://localhost:8080
    
    • Default Credentials:
      • Username: admin
      • Password: admin123

Important: It is strongly recommended to change the default credentials immediately after the initial login.

For guidance on setting up a reverse proxy, refer to the Reverse Proxy Setup section.

➑️ Explore Advanced Details

Web Page login Web Page home Web Page advance

πŸͺŸ Windows Desktop Application:

To install the ClipCascade Windows desktop application, follow these steps:

  1. Download the Installer
  2. Install the Application
    • Run the downloaded .msi installer and follow the on-screen instructions, and select the default installation path specified by the installer.
    • Startup is enabled by default; you can disable it in the Task Manager if desired.
  3. Launch and Configure
    • Open ClipCascade after installation and log in to start syncing your clipboard across devices.
    • When prompted, enter your server's IP address, port number, or domain name.
    • If encryption is enabled, ensure it is enabled on all devices.
    • In the Extra Config section, you can set a local clipboard size limit. By default, no limit is enforced (note: large file transfers may cause temporary unresponsiveness).
  4. Network Access Prompt (P2P Mode)
    • If the server is running in P2P mode, you will see a Windows security prompt asking, "Do you want to allow public and private networks to access this app?"

      win_network_prompt
    • This is because each client device acts as a peer in the network, requiring direct communication.

    • Click Allow to enable clipboard data syncing across your devices without the help of a server. The server is needed only for signaling and authentication.

Important Note: Since the application is not published or registered with Microsoft, you may see a warning suggesting that it could be unsafe. This is a standard precaution and does not indicate any issues with the software. You can choose to ignore this warning or temporarily disable your antivirus during installation. All source code is available in this repository, and everything is open source and free. If you prefer, you can compile the executable yourself. Feel free to review the code to ensure your comfort! Registering the application with Microsoft requires purchasing a certificate subscription, which is quite expensive, especially for an open-source project.

The .exe file does not need UAC approval because it is standalone executable, while the .msi installer will request UAC permissions because it creates a designated folder for the software, adds a startup option, and allows for uninstallation via the Control Panel. Additionally, with the .msi installer, you have the option to choose any location to save the software. However, select locations where even when you create a file manually at that location, Windows shouldn’t prompt for permission to answer "yes or no" questions.

➑️ Explore Advanced Details


🍏 macOS Desktop Application:

To install the ClipCascade macOS desktop application, follow these steps:

  1. Download the Application

    • Visit the Releases page and download the appropriate version:
      • For M-series chips (Apple Silicon), download ClipCascade-Apple_macOS(ARM_M-Series).zip.
      • For Intel chips, download ClipCascade-Apple_macOS(Intel-Series).zip.
    • You can check your chip type by navigating to Apple Menu β†’ About This Mac.
  2. Extract the Archive

    • Double-click the .zip file to extract its contents.
  3. Locate the Application

    • Open the extracted folder to find the ClipCascade application.
    • Move the application to a preferred location, such as the Applications folder.
  4. First-time launch (see note below for more information)

    • Right-click (not double-click) on the ClipCascade application and select Open.

      ClipCascade->RightClick->Open
    • If you encounter the warning "Apple could not verify 'ClipCascade' is free...", click Done or Ok. (Apple Guide)

      Apple Warning Apple Warning
      • Go to System Preferences > Security & Privacy > Click Open Anyway (if you see the option), and when you re-run(right click->open) the application warning prompt reappears one last time, click Open Anyway or Open. (Apple Guide)

        settings->security->open_anyway Apple Warning Apple Warning
  5. Wait for the app to launch

    • When you open the application, macOS will scan the application. This may take 10–30 seconds.
  6. Configure the application

    • When prompted, enter your server's IP address, port number, or domain name.
    • If encryption is enabled, ensure it is enabled on all devices.
    • In the Extra Config section, you can set a local clipboard size limit. By default, no limit is enforced (note: large file transfers may cause temporary unresponsiveness).
  7. Network Access Prompt (P2P Mode)

    • If the server is running in P2P mode, you will see a macOS security prompt asking, "Allow "ClipCascade" to find devices on local networks?"

      mac_network_prompt
    • This is because each client device acts as a peer in the network, requiring direct communication.

    • Click Allow to enable clipboard data syncing across your devices without the help of a server. The server is needed only for signaling and authentication.

  8. Access the App from the Menu Bar

    • Once logged in, the application will run in the menu bar with a clipboard icon at the top of your screen.
  9. Enable Auto-Startup:

    • Right-click the ClipCascade icon in the dock (bottom of the screen).

    • Select Options and then check Open at Login.

      Startup

Important Note: Since the application is not published or registered with Apple, you may see a warning suggesting that it could be unsafe. This is a standard precaution and does not indicate any issues with the software. You can choose to ignore this warning. All source code is available in this repository, and everything is open source and free. If you prefer, you can compile the executable yourself. Feel free to review the code to ensure your comfort! Registering the application with Apple requires purchasing a certificate subscription, which is quite expensive, especially for an open-source project.

➑️ Explore Advanced Details


πŸ€–πŸ“± Android Mobile Application:

To install the ClipCascade mobile application on your Android device, follow these steps:

  1. Download the latest APK from the Releases page.
  2. Enable installation from unknown sources in your device settings, if prompted.
  3. Install the APK by following the prompts on your device.
  4. Open ClipCascade and log in to begin syncing your clipboard across devices.
    • When prompted, enter your server's IP address, port number, or domain name.
    • If encryption is enabled, ensure it is enabled on all devices.
    • In the Extra Config section, you can set a local clipboard size limit. By default, no limit is enforced (note: large file transfers may cause temporary unresponsiveness).

Android Automatic Clipboard Monitoring Setup:

ClipCascade supports automatic clipboard monitoring for both rooted and non-rooted devices. To activate this feature, execute the following ADB commands.

Install ADB

Before proceeding, make sure ADB is installed on your system. Follow the instructions here to install ADB on Windows, macOS, or Linux.

ADB Commands
  1. Grant the READ_LOGS permission:

    adb -d shell pm grant com.clipcascade android.permission.READ_LOGS
  2. Enable "Display/Drawing over other apps," "Screen overlay," or "Appear on top": This permission can also be enabled from the device's Settings. To set it via ADB, use:

    adb -d shell appops set com.clipcascade SYSTEM_ALERT_WINDOW allow
  3. Kill the app for the new permissions to take effect:

    adb -d shell am force-stop com.clipcascade

adb commands

Once the setup is complete, it operates seamlessly without requiring any extra steps. It monitors log entries related to ClipCascade, and if it detects an error during a clipboard copy action, it will trigger an overlay window to gain focus. This overlay allows the app to capture the clipboard content and send it to the connected devices immediately before going out of focus and closing. When the app is uninstalled, these permissions will be removed, requiring you to redo these steps. Additionally, each time you start the foreground service, it will prompt you to choose whether to monitor logs. This ensures that everything remains secure and under your control.

After executing three ADB commands, when you click the Start button, you will see a pop-up message. Click "Allow."

allow_log_monitoring

➑️ Explore Advanced Details


πŸ§πŸ–±οΈ Linux Desktop Application (GUI) / 🐧⌨️ Linux Terminal-Based Application (CLI):

This guide provides step-by-step instructions to install ClipCascade on Debian/Ubuntu, Fedora, and Arch-based systems. While the commands are specifically tailored for these distributions, you can adapt the process for other Linux distributions with minor modifications. The Linux code is available on the Releases page as ClipCascade_Linux.zip. Once downloaded, navigate to the ClipCascade/ folder containing main.py, and open a terminal in that directory.

Note: Linux systems use different display servers, primarily X11 and Wayland. Wayland can also include XWayland, which supports X sessions. The program automatically detects the display server and selects the appropriate interface, either GUI or CLI, based on the environment.

Step 1: Check for updates and install required packages

Debian/Ubuntu:
sudo apt update
sudo apt install -y python3 python3-pip python3-gi xclip wl-clipboard dunst
Fedora:
sudo dnf check-update
sudo dnf install -y python3 python3-pip python3-gobject xclip wl-clipboard dunst
Arch:
sudo pacman -Syu --noconfirm python python-pip python-gobject xclip wl-clipboard dunst xdg-utils

Step 2: Install GTK 3.0 for clipboard monitoring and GUI support

Debian/Ubuntu:
sudo apt install -y python3-gi-cairo gir1.2-gtk-3.0 gir1.2-gdk-3.0
Fedora:
sudo dnf install -y libappindicator-gtk3
Arch:
sudo pacman -S --noconfirm python-gobject gtk3

Step 3: Install GNOME tray support extension (if tray icon is unavailable)

Install the GNOME tray support extension.

Step 4: Install Python Dependencies

Debian/Ubuntu/Fedora:
sudo pip3 install -r requirements.txt
Arch:
sudo pip install -r requirements.txt

Step 4.1: Fix externally-managed-environment Error (if applicable)

If you encounter the error: externally-managed-environment, install the required Python packages manually.

Debian/Ubuntu:
sudo apt install -y python3-xxhash python3-pyperclip python3-requests python3-websocket python3-pycryptodome python3-tk python3-pystray python3-pyfiglet python3-bs4 python3-plyer python3-aiortc
Fedora:
sudo dnf install -y python3-xxhash python3-pyperclip python3-requests python3-websocket-client python3-pycryptodomex python3-tkinter python3-pystray python3-pyfiglet python3-beautifulsoup4 python3-plyer python3-aiortc
Arch:
sudo pacman -S --noconfirm python-xxhash python-pyperclip python-requests python-websocket-client python-pycryptodome tk python-pystray python-pyfiglet python-beautifulsoup4 python-plyer python-aiortc
  • If you encounter the error: target not found: python-plyer, install via yay -S --noconfirm python-plyer
  • If you encounter the error: target not found: python-aiortc, install via yay -S --noconfirm python-aiortc

Step 4.2: Fix Package libavformat was not found in the pkg-config search path Error (if applicable)

Debian/Ubuntu:
sudo apt install -y libavformat-dev libavcodec-dev libavdevice-dev libavutil-dev libavfilter-dev libswscale-dev libswresample-dev pkg-config
Fedora:
sudo dnf install -y ffmpeg ffmpeg-devel
Arch:
sudo pacman -S --noconfirm ffmpeg

Step 5: Run the Application

Start ClipCascade by running (use sudo if needed):

  • When prompted, enter your server's IP address, port number, or domain name.
  • If encryption is enabled, ensure it is enabled on all devices.
  • In the Extra Config section, you can set a local clipboard size limit. By default, no limit is enforced (note: large file transfers may cause temporary unresponsiveness).
python3 main.py

Step 5.1: Fix 'No module named Crypto' Error (if applicable)

If you encounter the No module named 'Crypto' error, create a symbolic link for the Cryptodome library: see more

Debian/Ubuntu:
sudo ln -s /usr/lib/python3/dist-packages/Cryptodome /usr/lib/python3/dist-packages/Crypto
Fedora:
sudo ln -s /usr/lib/python3/site-packages/Cryptodome /usr/lib/python3/site-packages/Crypto
Arch:
sudo ln -s /usr/lib/python3.*/site-packages/Cryptodome /usr/lib/python3.*/site-packages/Crypto

Step 5.2: Fix 'ModuleNotFoundError: No module named tkinter' Error (if applicable)

If you encounter the No module named 'tkinter' error:

Debian/Ubuntu:
sudo apt install -y python3-tkinter
Fedora:
sudo dnf install -y python3-tkinter
Arch:
sudo pacman -S --noconfirm tk

Step 5.3: Fix 'gtk_widget_get_scale_factor: assertion 'GTK_IS_WIDGET (widget)' failed' Error (if applicable)

This error occurs due to a missing tray icon extension in GNOME. To resolve it, you can install the extension from here

Step 5.4: Fix 'g-exec-error-quark' Error (if applicable)

Debian/Ubuntu:
sudo apt install dbus-x11
Fedora:
sudo dnf install dbus-x11
Arch:
sudo pacman -S --noconfirm dbus

Step 6: Run the Application in the Background (if needed)

To run ClipCascade as a background process (if the GUI setup is functional), use the following command:

nohup python3 main.py &> /dev/null &

If root privileges are required, use:

sudo nohup python3 main.py &> /dev/null &

Step 7: Add ClipCascade to Startup Script (if needed)

To ensure ClipCascade starts automatically when your system boots, modify the file paths as necessary and add the appropriate command to your startup script.

Example:
GUI
cd /path/to/clipcascade/src/ && nohup python3 main.py &> /dev/null &

If root privileges are required, use:

cd /path/to/clipcascade/src/ && sudo nohup python3 main.py &> /dev/null &
CLI
cd /path/to/clipcascade/src/ && python3 main.py

If root privileges are required, use:

cd /path/to/clipcascade/src/ && sudo python3 main.py

➑️ Explore Advanced Details

βš™οΈ Advanced Details

πŸ—„οΈ Server Configuration

Important Security Notice:

Change the default admin credentials immediately after logging in to prevent unauthorized access.

Default Admin Credentials:

  • Username: admin
  • Password: admin123

Health Check Endpoint

  • Purpose: Verifies if the server is running and operational.
  • Endpoint: /health
  • Response: Returns OK with a status code 200 when the server is up and running.

Built-in Update Checker

  • The server features a built-in update checker, prominently displayed on the homepage, keeping you informed about the latest enhancements and security fixes. This ensures your server stays up to date.

    server_update

Environment Variables:

Environment Variable Extended Description Default Value
CC_MAX_MESSAGE_SIZE_IN_MiB Defines the maximum message size (in MiB) that the server can handle.

Note:
- Android typically supports larger clipboard sizes for images and files but limits text to ~1 MiB.
- Desktop supports larger clipboard sizes across text, images, and files.

Additional Notes:
- Clients can set their own limits via the "Extra Config" on the login page.
- If CC_P2P_ENABLED is true, this setting is ignored.
1
CC_MAX_MESSAGE_SIZE_IN_BYTES Provides finer control over message size by specifying a limit in bytes.

Note: If set above zero, it overrides CC_MAX_MESSAGE_SIZE_IN_MiB.
Ignored if CC_P2P_ENABLED is true.
0
CC_P2P_ENABLED Toggles the Peer-to-Peer (P2P) feature, allowing direct device-to-device communication.

Advantages:
- Reduces server load.
- Removes size restrictions, enabling unlimited data transfer.

Important Notes:
- If enabled, CC_MAX_MESSAGE_SIZE_IN_MiB and CC_MAX_MESSAGE_SIZE_IN_BYTES are ignored.
- Some network configurations may not support P2P.
false
CC_P2P_STUN_URL Defines the STUN server URL used for P2P communication, helping devices discover each other across NAT.

Note: Required when CC_P2P_ENABLED is true.
You can use a public STUN server or host your own.
stun:stun.l.google.com:19302
CC_ALLOWED_ORIGINS Specifies which domain is permitted to access the WebSocket server (CORS policy).

Security Note:
- Leaving this unset allows all origins (not recommended for security-sensitive deployments).
- To restrict access, specify your domain (e.g., https://clipcascade.example.com).
*
CC_SIGNUP_ENABLED Determines whether new users can sign up.

Default: false (public signups are disabled).
false
CC_MAX_USER_ACCOUNTS Defines the maximum number of user accounts allowed on the server.

Note: -1 means no limit.
-1
CC_ACCOUNT_PURGE_TIMEOUT_SECONDS Specifies the duration (in seconds) after which inactive accounts are deleted.

Example: 63115200 (equivalent to 2 years).
Note: -1 disables automatic purging.
-1
CC_PORT Defines the internal port where the ClipCascade server listens for connections.

Default: 8080, but can be changed if necessary.
8080
CC_SESSION_TIMEOUT Specifies the duration before user sessions expire, using minute-based formatting ([number]m).

Default: 525960m (~1 year).
525960m
CC_MAX_UNIQUE_IP_ATTEMPTS Sets the maximum number of failed login attempts from different IP addresses before an account is blocked. 15
CC_MAX_ATTEMPTS_PER_IP Limits the number of failed login attempts allowed per IP before temporarily blocking that IP. 30
CC_LOCK_TIMEOUT_SECONDS Defines the initial lockout duration (in seconds) after too many failed login attempts. 60
CC_LOCK_TIMEOUT_SCALING_FACTOR Determines how the lockout time increases with each consecutive failed attempt.

Examples:
- Factor 1: 60, 120, 180…
- Factor 2: 120, 240, 360…
- Factor 3: 180, 360, 540…
2
CC_BFA_CACHE_ENABLED Controls whether brute force attack (BFA) data is cached in memory and disk. false
CC_BFA_TRACKER_CACHE_MAX_JVM_ENTRIES Specifies the maximum number of entries in the BFA tracker cache, stored in JVM memory.

Note: Only used if CC_BFA_CACHE_ENABLED is true.
50
CC_BFA_TRACKER_CACHE_RAM_PERCENTAGE Defines the percentage of the BFA tracker cache allocated to off-heap RAM.

Note: Only used if CC_BFA_CACHE_ENABLED is true.
0
CC_BFA_TRACKER_CACHE_DISK_PERCENTAGE Defines the percentage of the BFA tracker cache allocated to disk.

Note: Only used if CC_BFA_CACHE_ENABLED is true.
40
CC_SERVER_DB_USERNAME Specifies the username for the database connection. clipcascade
CC_SERVER_DB_PASSWORD Defines the password used for encrypting the user database.

Note:
- (H2) Replace <file password> <user password> with secure values.
- Once set, you must use the same password whenever you migrate the database.
QjuGlhE3uwylBBANMkX1 o2MdEoFgbU5XkFvTftky
CC_SERVER_DB_URL Defines the JDBC URL used to connect to the database.

Examples:
- PostgreSQL: jdbc:postgresql://localhost:5432/clipcascade
jdbc:h2:file:./database/clipcascade;CIPHER=AES;MODE=PostgreSQL
CC_SERVER_DB_DRIVER Specifies the JDBC driver class used by the database connection.

Example: org.postgresql.Driver for PostgreSQL.
org.h2.Driver
CC_SERVER_DB_HIBERNATE_DIALECT Sets the Hibernate dialect for the chosen database.

Example: org.hibernate.dialect.PostgreSQLDialect for PostgreSQL.
org.hibernate.dialect.H2Dialect
CC_SERVER_LOGGING_LEVEL Sets the logging verbosity level (TRACE, DEBUG, INFO). INFO
CC_SERVER_LOG_HISTORY_MAX_DAYS Specifies how many days of logs to retain before they are rotated or removed. 30
CC_SERVER_LOG_MAX_CAPACITY Defines the maximum total size of logs to keep before older files are purged. 1GB
CC_LOG_BRUTE_FORCE_TRACKER_ENABLED Enables detailed logging of each login attempt in the Brute Force Attack (BFA) tracker.
Useful for diagnosing repeated login failures.
false
CC_EXTERNAL_BROKER_ENABLED Determines whether an external STOMP broker is used for message handling. false
CC_BROKER_HOST Specifies the STOMP broker host for external message handling.

Note: Only used if CC_EXTERNAL_BROKER_ENABLED is true.
localhost
CC_BROKER_PORT Specifies the STOMP broker port for external message handling.

Note: Only used if CC_EXTERNAL_BROKER_ENABLED is true.
61613
CC_BROKER_USERNAME Defines the STOMP broker username for external message handling.

Note: Only used if CC_EXTERNAL_BROKER_ENABLED is true.
admin
CC_BROKER_PASSWORD Defines the STOMP broker password for external message handling.

Note: Only used if CC_EXTERNAL_BROKER_ENABLED is true.
admin

πŸ–₯οΈπŸ“± Client Apps

  • Logs (clipcascade_log.log) are stored in the installation directory on Windows and Linux, and in <current user>/Library/Application Support/ClipCascade/ on macOS. These logs allow you to review application activity and are automatically reset each time the application is reopened, preventing indefinite growth.

  • The DATA file stores settings and user details, enabling the app to retain this information across both restarts and updates.

  • On Linux and macOS, a ClipCascade.lock file is created while the program is running. This file ensures that only a single instance of ClipCascade can be opened at a time.

  • All apps include a built-in update check feature, conveniently displayed on the homepage or taskbar. This ensures you can quickly check for updates within the app, keeping you up to date with the latest enhancements and security fixes.

    Desktop Mobile
    desktop_update android_update

Extra Config/Advanced Settings (Desktop/Mobile):

  • Maximum Clipboard Size Local Limit (in bytes): If the app crashes or stops unexpectedly, it may be due to receiving clipboard content exceeding the platform's maximum size limit. You can set a local size limit by specifying a value in bytes (e.g., 512 KiB = 524288 bytes) to test different thresholds suitable for your device. This local limit works alongside the server-specified limit to ensure smoother operation without crashes. For example, on Android (particularly on the Pixel 6a as of 2024), the platform limit(for text) is typically less than 1 MiB. Since the server limit cannot go below 1 MiB, setting the local limit to around 900,000 bytes on the Pixel 6a can help prevent crashes.

  • Store Password Locally (not recommended): Enable this option if you frequently encounter session logouts. While the app stores session cookies for an extended period, a server restart may prompt a re-login. If re-entering the password becomes tedious, you can use this option to store your password locally for convenience.

    Note: This option will only work if encryption is disabled, as encryption requires the raw password to generate a password hash.

  • Enable Image Sharing and Enable File Sharing: Enabling these options allows the app to send images or files. However, the app will continue to receive images and files even if these options are disabled.

  • Enable Notification: Turn on this option to receive notifications about WebSocket disconnections and reconnections.

  • Enable Encryption (recommended): Enabling this option activates end-to-end encryption for clipboard data. This ensures that all clipboard content is encrypted before leaving your device. Refer to the section below on E2E encryption for detailed instructions on how it works and how to configure the salt and hash rounds.

    Desktop (Specific):

    • Default File Download Location: When this path is set, the app will save files directly to the specified location without prompting the user each time the "Download Files" button is clicked.

    Android (Specific):

    • Run on System Startup: Enable this option to allow the app to automatically start on system reboot. By default, this option is disabled. If you are using the ADB workaround, keep this option disabled to avoid issues with the READ_LOGS permission popup being dismissed, which prevents clipboard monitoring in the background.

    • Enable WebSocket Status Notification: Receive alerts when the WebSocket connection is lost or restored, ensuring you're informed about any connection disruptions.

      periodic_check_notification
    • Enable Periodic Checks: Enabling this option performs periodic checks to ensure clipboard monitoring and the foreground service are running. It verifies the service status when monitoring starts and then checks every 15 minutes in the background. If the service is not running, a notification is displayed. Clicking the notification will restart the service.

      periodic_check_notification

πŸ”’ End-to-End Encryption Configuration for Clipboard Data

When encryption is enabled, clipboard data is encrypted directly on the client devices, ensuring true end-to-end encryption. The server does not store the encryption key, offering maximum security for your data.

Enabling the encryption option is all that's needed to activate encryption by default. However, advanced users have the option to further customize the encryption process by adjusting the following parameters:

  • Salt: An optional string used as an additional input in the hashing process. For example, you could use a unique string like "myCustomSalt123" to enhance encryption security.

  • Hash Rounds: An integer that specifies the number of hashing iterations. Increasing the hash rounds strengthens encryption by making it more computationally demanding. You can increase the default value of 664,937 to a higher number, such as 1,000,000, to boost security.

It is crucial to ensure the same salt and hash rounds are used across all client devices to maintain compatibility.

You can adjust these settings in the Extra Config section on the login page for users who require enhanced encryption options.

e2e_p2s

Note: In a peer-to-peer architecture, clipboard data is broadcasted to all connected devices directly without the need for a server. The encryption mechanism remains unchanged, ensuring the same level of security across all devices.


πŸ“‹ Clipboard Functioning

  • Text and Images: These are directly copied to the clipboard, enabling seamless sharing across devices.

  • Files: When files are received, a notification icon appears in the system tray (on desktop platforms). Since the clipboard does not store files, only their file paths are retained.

    Desktop Mobile
    desktop_tray_icon android_notification
    desktop_tray_options android_home_screen
  • Clipboard Monitoring:

    Platform Implementation Details
    Windows Uses win32gui, win32api, win32con, and win32clipboard to capture clipboard changes in an event-driven manner.
    macOS Utilizes the pasteboard to monitor the clipboard with polling every 0.3 seconds. Instead of checking clipboard content directly, it compares a counter to detect changes efficiently.
    Linux (X11) Employs Gtk.Clipboard to capture clipboard changes in an event-driven manner, running in GUI mode.
    Linux (XWayland, Unknown) Switches between Gtk.Clipboard (event-based) or x-clip (polling every 0.3 seconds) depending on permissions (requires sudo for Gtk.Clipboard). Both operate in GUI mode.
    Linux (Wayland, Hyprland) Uses wl-clipboard with polling every 1 seconds in CLI mode. The delay accounts for Wayland's requirement to focus a window to grab clipboard content, ensuring smoother OS interaction.
    Android Leverages ClipboardManager to capture clipboard changes in an event-driven manner.
    Type Send Receive
    Windows MacOS Linux GUI Linux CLI Android Windows MacOS Linux GUI Linux CLI Android
    Text ✱ ✱ ✱ ✱ ✱ / share ✱ ✱ ✱ ✱ ✱
    Image ✱ ✱ ✱ ✱ ✱ / share ✱ ✱ ✱ ✱ ✱
    Files ✱ ✱ ✱ ✱ share click click click click click

⇄ Reverse Proxy Setup

Below is a screenshot demonstrating how to configure a reverse proxy using Cloudflare Tunnels. Similar configurations can be applied with other providers as well.

Reverse Proxy web login form desktop

Note:

For other providers, you may need to configure HTTP to HTTPS redirection manually by adding a permanent redirection rule.

Example: Caddy Configuration

http://clipcascade.sample.com {
	redir https://clipcascade.sample.com{uri} permanent
}

Note:

Additionally, it might be helpful to mention that the server uses WebSockets (ws/wss) for live clipboard broadcasting. In most cases, no extra configuration is needed for WebSockets since they typically rely on an HTTP switching protocol. Most providers will support WebSocket connections out of the box, without requiring additional setup. Example: ws://localhost:8080/clipsocket, ws://localhost:8080/p2psignaling.

πŸ”§ Usage

  1. Login: Use your credentials to log into ClipCascade.
  2. Sync: Copy any text or content to your clipboard, and it will automatically sync across your connected devices.
  3. Monitor: Open the web-based monitoring page to see your clipboard history in real-time.

🌍 Contributing

Contributions are always welcome! Whether it's a feature request or a pull request, your input helps make ClipCascade even better.

πŸ“œ License

ClipCascade is licensed under the GNU General Public License v3.0 (GPL-3.0). See the LICENSE file for more details.

πŸ› οΈ TODO

Here are some planned features and improvements for future releases of ClipCascade:

πŸ—³οΈ Poll for Prioritization: Cast your vote to prioritize features here.

  • Clipboard Data Storage: Implement secure storage for clipboard data to store and access it later.
  • OIDC/OAuth Authentication: Integrate OpenID Connect (OIDC) and OAuth authentication for user login and management.
  • iOS Support: Develop and Release a version of ClipCascade for iOS.

πŸ“¦ Versioning

ClipCascade uses Semantic Versioning (SemVer) for releases:

  • πŸ”΄ Major (X): Incremented for releases that introduce backward incompatible changes.
  • 🟠 Minor (Y): Incremented for backward compatible functionality added.
  • 🟒 Patch (Z): Incremented for backward compatible bug fixes or minor improvements.

Version Format

X.Y.Z
Where:

  • X is the major version.
  • Y is the minor version.
  • Z is the patch version.

Example versioning:

  • 1.0.0: Initial release.
  • 1.1.0: Added new features, backward compatible.
  • 2.0.0: Major changes, not backward compatible.

πŸ’¬ Support

If you have any issues or questions, feel free to open an issue on GitHub, start a discussion, or reach out to me via email.