peony

Crates.iopeony
lib.rspeony
version0.1.0
sourcesrc
created_at2024-05-09 18:19:32.076046
updated_at2024-05-09 18:19:32.076046
descriptionModern TCP/UDP implementation of RFC868
homepage
repositoryhttps://github.com/EastonVelocity/peony
max_upload_size
id1235344
size29,671
Shea Zerda (SnailShea)

documentation

README

Peony

A modern implementation of RFC868 inspired by timed-rs and the death of xinetd in RHEL (and alike) systems. This implementation will listen for TCP, UDP, or a mix of both connection types.

Configuration

The application requires a TOML-based config file including the following options:

mode (string): One of "tcp", "udp" or "both"
host (string): address to bind to e.g., "127.0.0.1", "::"
port (integer): port to bind to, normally 37

Examples

Listens on all available v4 and v6 addresses for TCP and UDP connections via port 37

mode = "both"
host = "::"
port = 37

Listens on v4 localhost for TCP connections via port 1037

mode = "tcp"
host = "127.0.0.1"
port = 1037

Usage

Usage: peony --config <CONFIG>

Options:
  -c, --config <CONFIG>  Path to config file for vToD daemon
  -h, --help             Print help

Example

[tramage@tramage-desktop peony]$ cat tod.toml 
mode = "both"
host = "::"
port = 37

[tramage@tramage-desktop peony]$ peony -c ./tod.toml 
2024-05-09T17:05:07.507007Z  INFO peony: Listening for TCP and UDP connections on :::37

[tramage@tramage-desktop peony]$ rdate localhost -p
rdate: [localhost]      Thu May  9 13:07:19 2024

# and in the application logs...
2024-05-09T17:07:19.347900Z  INFO peony::srv: Received TCP connection from [::1]:48300
2024-05-09T17:07:19.347947Z  INFO peony::srv: Sent -370704057 as bytes to [::1]:48300
Commit count: 0

cargo fmt