Skip to content

Commit bdf0dfc

Browse files
committed
2 parents 58478c4 + 48ab7a8 commit bdf0dfc

1 file changed

Lines changed: 49 additions & 11 deletions

File tree

README.md

Lines changed: 49 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
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
---
913
services:
@@ -22,23 +26,57 @@ networks:
2226
network:
2327
```
2428
25-
Combine with [WoL-Redirect](https://github.com/codeshelldev/wol-redirect) for a graphical interface.
26-
2729
## Usage
2830
29-
Send Wakeup-Packtes to host at `192.168.1.1` [`00:00:00:00:00:00`]
31+
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`:
3032

31-
```curl
32-
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
33+
```bash
34+
curl -X POST "http://wol-client:5555/start" \
35+
-H "Content-Type: application/json" \
36+
-d '{
37+
"ip": "192.168.1.1",
38+
"mac": "00:00:00:00:00:00",
39+
"startupTime": 5
40+
}'
3341
```
3442

35-
## Contributing
43+
You can also specify a different IP address for pinging:
44+
45+
```bash
46+
curl -X POST "http://wol-client:5555/start" \
47+
-H "Content-Type: application/json" \
48+
-d '{
49+
"ip": "192.168.1.100",
50+
"addr": "192.168.1.1",
51+
"mac": "00:00:00:00:00:00",
52+
"startupTime": 5
53+
}'
54+
```
55+
56+
> [!NOTE]
57+
> 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.
58+
59+
**WoL Client** will respond with a `client_id`, which can be used to establish a **WebSocket connection** at `ws://wol-client/ws`.
60+
This WebSocket will send updates for each step of the process. The response contains:
3661

37-
Want to change something, have suggestions?
38-
Fell free to open up an issue or to create a Pull Request.
62+
- `success`: `true` if the process finished successfully.
63+
- `error`: `true` if the process failed.
64+
- `message`: descriptive information about what happened.
65+
66+
## Configuration
67+
68+
### `PING_INTERVAL`
69+
70+
Interval in seconds for pinging when `startupTime` is not provided.
71+
72+
### `PING_RETRIES`
73+
74+
Number of retries for pinging when `startupTime` is not provided before timing out.
75+
76+
## Contributing
3977

40-
This project is rather small so there might not be many additions anytime soon.
78+
Have suggestions or improvements? Feel free to open an issue or submit a Pull Request.
4179

4280
## License
4381

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

0 commit comments

Comments
 (0)