Crates.io | rustocat |
lib.rs | rustocat |
version | 0.1.13 |
source | src |
created_at | 2022-03-20 21:54:51.124981 |
updated_at | 2024-04-13 22:31:05.846056 |
description | Socat in rust with many less features and a configuration file |
homepage | |
repository | |
max_upload_size | |
id | 553738 |
size | 70,803 |
Rustocat is a simple socat alternative with way less features, but it has a config file.
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}.
mappings:
- udp: false
source: 0.0.0.0:2222
targets: [127.0.0.1:22]
There is support for UDP and TCP sockets. Each socket can have multiple targets.
When multiple targets are set, it will randomly pick one of them.
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.