handle * ip, ui refac, fix #1 to handle .conf
Some checks failed
/ Quality Check (push) Failing after 1m5s
/ Build (push) Successful in 1m7s

This commit is contained in:
Phani Pavan K
2025-10-26 11:45:08 +05:30
parent 9314e97c60
commit f83d6038c8
7 changed files with 158 additions and 124 deletions

View File

@@ -3,6 +3,8 @@ pub mod entry;
mod settings;
pub mod status;
use std::{thread::sleep, time::Duration};
use crate::app::{
entry::Entry,
settings::Settings,
@@ -102,13 +104,13 @@ impl AppState {
}
}
pub fn print(&self) {
let tempEntry = &self.entries[0];
let res = serde_json::to_string(tempEntry).unwrap();
println!("{res}");
let resString = tempEntry.to_string();
println!("{resString}");
}
// pub fn print(&self) {
// let tempEntry = &self.entries[0];
// let res = serde_json::to_string(tempEntry).unwrap();
// println!("{res}");
// let resString = tempEntry.to_string();
// println!("{resString}");
// }
pub fn saveConfigToScript(&self) {
let mut outputString: String = String::new();
@@ -120,6 +122,12 @@ impl AppState {
))
}
outputString.push_str("\nwait");
// for o in 0..1 {
// println!("test {o}");
// sleep(Duration::from_secs(1));
// }
println!("Writing config to system");
sleep(Duration::from_millis(100));
let _ = std::fs::write("./forward.sh", outputString);
}