refactor: streamline config handling and logging mechanisms

This commit is contained in:
Tunglies
2025-11-15 02:46:34 +08:00
parent f6f288f02b
commit 2b0ba4dc95
6 changed files with 17 additions and 108 deletions

View File

@@ -35,8 +35,7 @@ pub mod bypass {
pub mod timing {
use super::Duration;
pub const CONFIG_UPDATE_DEBOUNCE: Duration = Duration::from_millis(500);
pub const CONFIG_RELOAD_DELAY: Duration = Duration::from_millis(300);
pub const CONFIG_UPDATE_DEBOUNCE: Duration = Duration::from_millis(300);
pub const EVENT_EMIT_DELAY: Duration = Duration::from_millis(20);
pub const STARTUP_ERROR_DELAY: Duration = Duration::from_secs(2);
pub const ERROR_BATCH_DELAY: Duration = Duration::from_millis(300);
@@ -58,15 +57,6 @@ pub mod files {
pub const WINDOW_STATE: &str = "window_state.json";
}
pub mod error_patterns {
pub const CONNECTION_ERRORS: &[&str] = &[
"Failed to create connection",
"The system cannot find the file specified",
"operation timed out",
"connection refused",
];
}
pub mod tun {
pub const DEFAULT_STACK: &str = "gvisor";