Can't copy text to remote desktop? F**k!!!
Copy Portal - Send your clipboard to another device's clipboard.
Node.js
is required.
- Clone this repo to both your device and remote device:
git clone https://github.com/Vincent-the-gamer/copy-portal.git
- Install Dependencies
pnpm i
- config your links in
config.ts
/**
* 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"
-
In remote device, run
pnpm run server
to start the server. -
In your device, to send your current clipboard text, run
pnpm run client
.
Use Nginx
+ NAT Traversal
.
Copy the content of nginx.conf
to your local nginx config file, and change proxy_pass
to your API address.
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
}
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.