|
1 | 1 | # WoL Client |
2 | 2 |
|
3 | | -WoL Client is a Wake-on-LAN Docker Container, that wakes up queried Machines. |
| 3 | +**WoL Client** is a Docker container for Wake-on-LAN (WoL) that allows you to remotely wake up machines on your network. |
| 4 | + |
| 5 | +You can combine it with [WoL-Redirect](https://github.com/codeshelldev/wol-redirect) to provide a web-based UI for easier management. |
4 | 6 |
|
5 | 7 | ## Installation |
6 | 8 |
|
| 9 | +Add the following to your `docker-compose.yaml`: |
| 10 | + |
7 | 11 | ```yaml |
8 | 12 | {{{ #://docker-compose.yaml }}} |
9 | 13 | ``` |
10 | 14 |
|
11 | | -Combine with [WoL-Redirect](https://github.com/codeshelldev/wol-redirect) for a web ui. |
12 | | - |
13 | 15 | ## Usage |
14 | 16 |
|
15 | | -Send Wakeup-Packets to host at `192.168.1.1` [`00:00:00:00:00:00`] |
| 17 | +Send a Wake-on-LAN packet to a host. For example, to wake a machine at `192.168.1.1` with MAC address `00:00:00:00:00:00`: |
| 18 | + |
| 19 | +```bash |
| 20 | +curl -X POST "http://wol-client:5555/start" \ |
| 21 | + -H "Content-Type: application/json" \ |
| 22 | + -d '{ |
| 23 | + "ip": "192.168.1.1", |
| 24 | + "mac": "00:00:00:00:00:00", |
| 25 | + "startupTime": 5 |
| 26 | + }' |
| 27 | +``` |
| 28 | + |
| 29 | +You can also specify a different IP address for pinging: |
16 | 30 |
|
17 | 31 | ```bash |
18 | | -curl -X POST "Content-Type: application/json" -d '{ "ip":"192.168.1.1", "mac": "00:00:00:00:00:00", "startupTime": 5 }' http://wol-client |
| 32 | +curl -X POST "http://wol-client:5555/start" \ |
| 33 | + -H "Content-Type: application/json" \ |
| 34 | + -d '{ |
| 35 | + "ip": "192.168.1.100", |
| 36 | + "addr": "192.168.1.1", |
| 37 | + "mac": "00:00:00:00:00:00", |
| 38 | + "startupTime": 5 |
| 39 | + }' |
19 | 40 | ``` |
20 | 41 |
|
| 42 | +> [!NOTE] |
| 43 | +> The `startupTime` field may be omitted. In that case, the [`PING_INTERVAL`](#ping_interval) and [`PING_RETRIES`](#ping_retries) settings will be used to periodically ping the host. |
| 44 | +
|
| 45 | +**WoL Client** will respond with a `client_id`, which can be used to establish a **WebSocket connection** at `ws://wol-client/ws`. |
| 46 | +This WebSocket will send updates for each step of the process. The response contains: |
| 47 | + |
| 48 | +- `success`: `true` if the process finished successfully. |
| 49 | +- `error`: `true` if the process failed. |
| 50 | +- `message`: descriptive information about what happened. |
| 51 | + |
| 52 | +## Configuration |
| 53 | + |
| 54 | +### `PING_INTERVAL` |
| 55 | + |
| 56 | +Interval in seconds for pinging when `startupTime` is not provided. |
| 57 | + |
| 58 | +### `PING_RETRIES` |
| 59 | + |
| 60 | +Number of retries for pinging when `startupTime` is not provided before timing out. |
| 61 | + |
21 | 62 | ## Contributing |
22 | 63 |
|
23 | | -Want to change something, have suggestions? |
24 | | -Fell free to open up an issue or to create a Pull Request. |
| 64 | +Have suggestions or improvements? Feel free to open an issue or submit a Pull Request. |
25 | 65 |
|
26 | 66 | ## License |
27 | 67 |
|
28 | | -[MIT](https://choosealicense.com/licenses/mit/) |
| 68 | +This project is licensed under the [MIT License](./LICENSE). |
0 commit comments