Git Product home page Git Product logo

clipboard-online's Introduction

clipboard-online

GitHub release (latest by date)

clipboard-online is an application to share cilpboard text between Windows and iOS

Documentation

中文】【English

Download

  1. Directly download

    You can download latest release exe from here

  2. From source code(only windows now)

    Before you build, make sure you have installed golang. If not, maybe you need this

    • git clone [email protected]:YanxinTang/clipboard-online.git
    • cd clipboard-online
    • go get github.com/akavel/rsrc
    • Build
      • Bash: ./build.sh
      • PowerShell:.\build.ps1
    • You can find release bin at release directory

Usage

For iOS users

  1. Run clipboard-online on your windows
  2. Setup shortcuts on you iPhone/iPad (Open link from safari)
  3. Set ip address and authkey (default is empty string). Reference https://www.kejiwanjia.com/jiaocheng/zheteng/83030.html
  4. Have fun...😊

For Android users

  1. HTTP Shortcuts: https://meta.appinn.net/t/topic/20322

  2. Tasker: YanxinTang#26

Thanks for the hard working by @xiozf, @Befod and someone else contributed for the Android approach!

Configuration

clipboard-online.exe will create two file which are config.json and log.txt in the execute path when first running

You can make customization by editing config.json

config.json

  • port

    • type: string
    • default: "8086"
  • logLevel

    • type: string
    • default: "warning"
    • values: "panic", "fatal", "error", "warning", "info", "debug", "trace"
  • authkey

    • type: string
    • default: ''
  • authkeyExpiredTimeout

    • type: int64
    • default: 30
  • tempDir

    • type: string
    • default: ./temp
  • reserveHistory

    • type: Boolean
    • default: false
  • notify

    • type: object
    • children:
      • copy
        • type: Bollean
        • default: false
      • paste
        • type: Boolean
        • default: false

API

The default http server will listen 8086 port and you can't chanage that since hardcoded.

Common headers

Required

  • X-API-Version: indicates version of api

Optional

  • X-Client-Name: indicates name of device
  • X-Auth: hashed authkey. Value from md5(config.authkey + timestamp/30)

1. Get windows clipboard

Request

  • URL: /
  • Method: GET

Reponse

  • Body: json
// 200 ok

{
  "type": "text",
  "data": "clipboard text on the server"
}

{
  "type": "file",
  "data": [
    {
      "name": "filename",
      "content": "base64 string of file bytes"
    }
    ...
  ]
}

2. Set windows clipboard

Request

  • URL: /

  • Method: POST

  • Headers:

    • X-Content-Type: indicates type of request body content
      • required
      • values: text, file, media
  • Body: json

For text:

{
  "data": "text you want to set"
}

For file:

{
  "data": [
    {
      "name": "filename",
      "base64": "base64 string of file bytes"
    }
  ]
}

Reponse

Reponse body is empty. If set successfully, status code will be 200

clipboard-online's People

Contributors

yanxintang avatar ecator avatar mittwillson avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.