add pty listener support

This commit is contained in:
Toshit Chawda 2024-09-01 18:48:46 -07:00
parent 67c9e3d982
commit 80c91c9381
No known key found for this signature in database
GPG key ID: 91480ED99E2B3D9D
5 changed files with 274 additions and 16 deletions

View file

@ -20,6 +20,9 @@ pub enum SocketType {
Tcp,
/// Unix socket listener.
Unix,
/// File "socket" "listener".
/// "Accepts" a "connection" immediately.
File,
}
#[derive(Serialize, Deserialize, Default, Debug)]
@ -47,6 +50,8 @@ pub struct ServerConfig {
pub resolve_ipv6: bool,
/// Whether or not to enable TCP nodelay on client TCP streams.
pub tcp_nodelay: bool,
/// Whether or not to set "raw mode" for the file.
pub file_raw_mode: bool,
/// Whether or not to show what upstreams each client is connected to in stats. This can
/// heavily increase the size of the stats.
@ -206,6 +211,7 @@ impl Default for ServerConfig {
transport: SocketTransport::default(),
resolve_ipv6: false,
tcp_nodelay: false,
file_raw_mode: false,
verbose_stats: true,
stats_endpoint: "/stats".to_string(),