Skip to content

YAL-Tools/clipboard-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

YAL's little clipboard server

This is a web application for exchanging items between devices on the same local network.

A screenshot of tool in action, showing two reference screenshots of Waxweaver that I sent to my tablet and the drawing that I sent back

Its noteworthy quality is that you can copy the received images without having to save them to gallery/downloads first.

I think it is a neat if you tend to send reference images to an iOS/Android tablet and send the finished artwork back.

How to use this

Setting up

  1. Install node.js.
    Just about any semi-recent version should work.
  2. Download this repository.
    That's ❮❯ CodeDownload ZIP, or "clone" it if you know Git
  3. If you have downloaded a ZIP, extract it somewhere.

Starting up

  1. Open a Command Prompt/terminal in the "bin" directory.
    On Windows, this is done by shift-right-clicking an empty spot in Explorer.
  2. Run the app like so:
    node main.js --port 35000
    See below for other command-line arguments.
  3. The first time you run the app, you might get an offer to allow it in firewall or have to do that yourself.

Usage

  • Open the web application from the local address of computer that's running it.
    Usually this will be something like http://192.168.0.101:35000/.
    On Windows, you can find out your local IP address by running ipconfig in a Command Prompt.
    On Linux, it is ifconfig instead (look for inet under network interfaces).
  • You can send items by pasting them into the page.
    On mobile, this is done by tapping on the input field and then opening the context menu by long-tapping it.
  • On desktop, you can also send items by drag-and-dropping them onto the page.
  • You can copy or save-as the received items.
  • Supported item types are:
    • Images
    • Text (shown as a text box that you can copy from)
    • Links (shown as a link that you can copy/open)
    • Other files (save only)

Command-line arguments

--port <number>

Specifies the port that the web server should be opened on. Required.

--delete-after <minutes>

Automatically deletes items after the specified number of minutes.

This is handy if you don't like cleaning these out by hand.

--password <password>

Highly rudimentary password protection support.

This prevents getting/adding/removing items without authorization.

--https <path to .crt> <path to .key>

If you intend to run the app on a public network or would prefer to have communications encrypted in general, you can provide a self-signed certificate to run the server with TLS.

See here for basic instructions on generating a certificate.

Compatibility

As far as this app's functions are concerned:

Feature \ Browser Safari¹ Chrome Firefox DDG
Save image
Copy image
Paste image

¹ And seemingly any other iOS browser since they all run on Safari's engine and inherit the context menus.

Evidently both major mobile operating systems have one or more browsers where you can both copy and paste images.

Building

You'll need Haxe installed.

haxe server.hxml
haxe client.hxml

If all is well, bin/main.js and bin/web/script.js will be updated.

TODOs

Could be good to have a little UI for server setup, but I wouldn't want to use Electron for an app that uses just a couple megabytes of memory most of the time.

Alternatives

Apparently people commonly send images to themselves on one or other chat program, and isn't that a little silly?

So you're sending a file to a computer hundreds of miles away just so that you can download it on a device right next to you.

Meta

A tool by YellowAfterlife!

Written in Haxe.

Icons from the Silk Icon Scalable.

About

A server and web app for sharing images/files on local networks

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published