Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vincent-the-gamer/copy-portal
Send your clipboard to another device's clipboard.
https://github.com/vincent-the-gamer/copy-portal
clipboard remote-desktop
Last synced: 5 days ago
JSON representation
Send your clipboard to another device's clipboard.
- Host: GitHub
- URL: https://github.com/vincent-the-gamer/copy-portal
- Owner: Vincent-the-gamer
- License: mit
- Created: 2024-03-02T08:49:30.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-03-07T16:05:16.000Z (8 months ago)
- Last Synced: 2024-03-07T17:28:13.222Z (8 months ago)
- Topics: clipboard, remote-desktop
- Language: TypeScript
- Homepage:
- Size: 346 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
Copy Portal
Can't copy text to remote desktop? F**k!!!
Copy Portal - Send your clipboard to another device's clipboard.# Usage
`Node.js` is required.1. Clone this repo to both your device and remote device:
```shell
git clone https://github.com/Vincent-the-gamer/copy-portal.git
```2. Install Dependencies
```shell
pnpm i
```3. config your links in `config.ts`
```typescript
/**
* server
*/
export const SERVER_HOST = "127.0.0.1"
export const SERVER_PORT = 8080/**
* client
*/// fill in the server address where you've deployed.
// if nginx proxied, fill in your nginx api address.
export const CLIENT_TARGET = "http://localhost:8080"
```4. In remote device, run `pnpm run server` to start the server.
5. In your device, to send your current clipboard text, run `pnpm run client`.
# Proxy
Use `Nginx` + `NAT Traversal`.
## Nginx
Copy the content of `nginx.conf` to your local nginx config file, and change `proxy_pass` to your API address.```nginx
location /copy-portal {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_method POST;
proxy_pass http://127.0.0.1:8080/; # same as SERVER_LINK
}
```## Expose your local API to NAT
To set up a `NAT Traversal`, you can use some services like `frp + cloud server`, `sakurafrp` or etc.
Then, expose your nginx proxied API to NAT, so that you can send your clipboard to remote device.
# License
[MIT License | Copyright (c) 2024-present Vincent-the-gamer](./LICENSE)