Go to file
Fabian Stamm 7530ce3aae Implementing udp support partially...in theory. Still untested :) 2022-09-21 22:22:10 +02:00
src Implementing udp support partially...in theory. Still untested :) 2022-09-21 22:22:10 +02:00
.editorconfig Implementing udp support partially...in theory. Still untested :) 2022-09-21 22:22:10 +02:00
.gitignore Finishing basic implementation 2022-03-20 23:23:08 +01:00
Cargo.lock Implementing udp support partially...in theory. Still untested :) 2022-09-21 22:22:10 +02:00
Cargo.toml Implementing udp support partially...in theory. Still untested :) 2022-09-21 22:22:10 +02:00
README.md Add support for multiple targets and live-reload. 2022-08-25 20:50:11 +00:00
config.yaml Add support for multiple targets and live-reload. 2022-08-25 20:50:11 +00:00

README.md

Rustocat

Rustocat is a simple socat alternative with way less features, but it has a config file.

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

tcp:
  - source: 0.0.0.0:2222
    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.