Skip to content

Commit 19124de

Browse files
committed
Update README.
1 parent ac85427 commit 19124de

2 files changed

Lines changed: 37 additions & 0 deletions

File tree

README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,3 +99,35 @@ The `wolsocketproxy.conf` has the following structure:
9999
]
100100
}
101101
```
102+
103+
## Additional modes
104+
105+
### Keep-alive daemon mode
106+
107+
This mode is used for running on target machine with auto-suspend (e.g. running `circadian` or similar), to keep the target
108+
machine from auto suspending when running tasks.
109+
110+
Use the following command on the target machine to enter this mode:
111+
112+
```bash
113+
wolsocketproxy -k
114+
```
115+
116+
The config file `wolsocketproxy.conf` should look like the following:
117+
118+
119+
```json5
120+
// Keep-alive daemon mode
121+
{
122+
"listen_address": "0.0.0.0", // The address to listen for HTTP server, default is 127.0.0.1
123+
"listen_port": 18080, // The port to listen for HTTP server, default is 18080
124+
"watchdog_feed_interval": 60, // Watchdog feed interval, seconds, default is 600
125+
"keep_alive_method": "special_process", // How to keep target machine alive, default is "special_process"
126+
// "special_process" - Fork a child process with specified name
127+
"special_process_name": "wsp-keepalive", // The display name of the forked child process, default is "wsp-keepalive"
128+
}
129+
```
130+
131+
You need to periodically send an HTTP GET request to `/watchdog/feed` at the `listen_port` in `watchdog_feed_interval` time,
132+
or the special process will be killed.
133+
You can combine this mode with `circadian`'s `process_block` config to keep it from auto-suspending.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"listen_address": "0.0.0.0",
3+
"listen_port": 18080,
4+
"watchdog_feed_interval": 60
5+
}

0 commit comments

Comments
 (0)