Skip to content
CLDMVPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

wol-proxy

wol-proxy is a simple cross-platform CLI tool and HTTP server for sending Wake-on-LAN (WoL) packets over your network.

Use it as a local utility or run it on a remote VM to expose WoL via an HTTP API.

✨ What's New

Latest: v1.0.12 (November 2026)

  • No system changes during npm install (#78) — the postinstall hook that ran sudo to install the systemd unit on every install is gone. Set up the service with wol-proxy install-service (or --print to see the commands); it refuses cleanly when systemd isn't running. Fixes #3.
  • express 5.3.0 and a declared Node.js floor — engines.node is >=18.0.0, express 5's own floor, and express moves to 5.3.0 for the qs and proxy-addr fixes (#67, #80). The rest is dev tooling and CI.
  • View full v1.0.12 Changelog

Recent Releases

  • v1.0.11 (October 2026) — dev-only: vitest and @vitest/coverage-v8 5.0.3 in the lockfile; no runtime change (Changelog)
  • v1.0.10 (October 2026) — dev-tooling bumps: @cldmv/fix-headers 2.2.0, @cldmv/configs 1.2.4 and @cldmv/vitest-runner 1.5.3; no file headers and no runtime code changed (Changelog)
  • v1.0.9 (October 2026) — CI only: the in-repo PR mirror job now always runs and reports under a non-required name instead of being skipped (Changelog)
  • v1.0.8 (October 2026) — CI only: a skipped PR-run mirror job no longer satisfies the ✅ Required PR Check ruleset gate (Changelog)

📚 For complete version history and detailed release notes, see the docs/changelog/ folder.


📦 Installation

npm install -g @cldmv/wol-proxy

🚀 Usage

1. Start the server

To start the proxy:

wol-proxy

It starts an HTTP server on port 3000 by default.

Override the port:

PORT=8080 wol-proxy

The server listens on all interfaces (0.0.0.0).


📬 Send Wake-on-LAN Request

Make a POST request to /wake with a JSON body:

Example using curl:

curl -X POST http://<proxy-ip>:3000/wake \
  -H "Content-Type: application/json" \
  -d '{"mac": "00:11:22:33:44:55", "ip": "10.0.0.100", "port": 9}'

Successful Response:

{ "success": true }

🔧 Request Options

Field Required Description
mac ✅ Yes Target device MAC address (e.g. "f8:01:b4:68:bc:22")
ip ❌ No Broadcast IP (default: 255.255.255.255)
port ❌ No UDP port (default: 9)

🧪 Quick Test

wol-proxy &
curl -X POST http://localhost:3000/wake \
  -H "Content-Type: application/json" \
  -d '{"mac": "00:11:22:33:44:55"}'

🔐 Security

This server is unauthenticated by default.
To secure it:

  • Use a reverse proxy (NGINX or Apache) with IP whitelisting or auth
  • Restrict access using a firewall or run behind a VPN

🖥 Development

Clone and run locally:

git clone https://github.com/CLDMV/wol-proxy.git
cd wol-proxy
npm install
node index.js


🛠 Running as a System Service

Installing wol-proxy never touches your system services. Setting up the service is a separate step you run yourself.

Linux with systemd (Ubuntu, Debian, CentOS, Fedora, etc.)

After installing globally with npm, run:

wol-proxy install-service

It prints the commands, then runs them with sudo (you may get a password prompt):

sudo cp "$(npm root -g)/@cldmv/wol-proxy/wol-proxy.service" /etc/systemd/system/wol-proxy.service
sudo systemctl daemon-reload

Use wol-proxy install-service --print to only print them. The command exits with an error and changes nothing if systemd isn't running. If you'd rather do it by hand, run the two commands above yourself.

Then enable and start the service:

sudo systemctl enable --now wol-proxy

macOS and Windows

There is no automatic setup. Run wol-proxy under launchd (macOS) or a service manager such as NSSM (Windows) if you want it in the background.

Other init systems (OpenRC, runit, s6)

Not automated either. wol-proxy.service in the package is a reference for the command to run (wol-proxy, with PORT set if needed).


🔍 Check service status

sudo systemctl status wol-proxy

📋 View logs

journalctl -u wol-proxy -f

wol-proxy will now run in the background and start automatically at boot.


📜 License

This project is licensed under the GNU General Public License v3.0 (GPL-3.0).

You may use, modify, and redistribute this software under the terms of the GPL-3.0 license.

See the full license text in the LICENSE file or at
https://www.gnu.org/licenses/gpl-3.0.html

© 2025 CLDMV

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages