Skip to content

Commit 9f3922d

Browse files
committed
update readme
1 parent a019561 commit 9f3922d

1 file changed

Lines changed: 48 additions & 8 deletions

File tree

Lines changed: 48 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,68 @@
11
# WoL Client
22

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.
46

57
## Installation
68

9+
Add the following to your `docker-compose.yaml`:
10+
711
```yaml
812
{{{ #://docker-compose.yaml }}}
913
```
1014

11-
Combine with [WoL-Redirect](https://github.com/codeshelldev/wol-redirect) for a web ui.
12-
1315
## Usage
1416

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:
1630

1731
```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+
}'
1940
```
2041

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+
2162
## Contributing
2263

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.
2565

2666
## License
2767

28-
[MIT](https://choosealicense.com/licenses/mit/)
68+
This project is licensed under the [MIT License](./LICENSE).

0 commit comments

Comments
 (0)