From 26aac34fdf0b76f33b11e00cb2ec4c5f2b757af1 Mon Sep 17 00:00:00 2001 From: gennyble Date: Sun, 16 Mar 2025 04:44:05 -0500 Subject: debugging --- src/main.rs | 169 +++++++++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 146 insertions(+), 23 deletions(-) (limited to 'src') diff --git a/src/main.rs b/src/main.rs index 0493fdb..9831331 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,25 +1,39 @@ use std::{ net::{IpAddr, SocketAddr}, pin::Pin, + process::Stdio, time::Instant, }; -use confindent::{Confindent, ValueParseError}; +use confindent::{Confindent, Value, ValueParseError}; use http_body_util::{BodyExt, Full}; use hyper::{ HeaderMap, Request, Response, StatusCode, body::{Bytes, Incoming}, - header::HeaderValue, + header::{self, HeaderValue}, server::conn::http1, service::Service, }; use hyper_util::rt::TokioIo; -use tokio::{net::TcpListener, process::Command, runtime::Runtime}; +use regex_lite::Regex; +use tokio::{ + io::{AsyncWriteExt, BufWriter}, + net::TcpListener, + process::Command, + runtime::Runtime, +}; #[derive(Clone, Debug)] pub struct Settings { port: u16, - script_filename: String, + scripts: Vec