Add support for multiple targets and live-reload.
This commit is contained in:
12
README.md
12
README.md
@ -4,12 +4,20 @@ Rustocat is a simple socat alternative with way less features, but it has a conf
|
||||
|
||||
## Config File
|
||||
|
||||
Configs can be either yaml or json and can be located in /etc/rustocat.{yaml|json} or ind the current working directory as config.{yaml|json}.
|
||||
Configs can be either yaml or json and can be located in /etc/rustocat.{yaml|json} or in the current working directory as config.{yaml|json}.
|
||||
|
||||
```yaml
|
||||
tcp:
|
||||
- source: 0.0.0.0:2222
|
||||
target: 127.0.0.1:22
|
||||
targets: [127.0.0.1:22]
|
||||
```
|
||||
|
||||
Currently only TCP is supported, UDP/Unix Socket support might be added later.
|
||||
|
||||
When multiple targets are set, it will randomly pick one of them.
|
||||
|
||||
## Live Changes
|
||||
|
||||
It is designed to live reconfigure itself. To trigger a change, send the signal `SIGHUP` to the process. This will re-read the config file and adjust the sockets and targets accordingly.
|
||||
|
||||
All existing connections will stay as they are, but removed sources are closed from further connections.
|
||||
|
Reference in New Issue
Block a user