This commit is contained in:
lbl8603
2024-07-20 10:38:18 +08:00
parent 14ee9c4632
commit 7ebdffcdd3
22 changed files with 282 additions and 98 deletions
+4
View File
@@ -46,6 +46,8 @@ pub struct FileConfig {
pub compressor: Option<String>,
pub vnt_mapping: Vec<String>,
pub disable_stats: bool,
// 允许传递wg流量
pub allow_wire_guard: bool,
}
impl Default for FileConfig {
@@ -90,6 +92,7 @@ impl Default for FileConfig {
compressor: None,
vnt_mapping: vec![],
disable_stats: false,
allow_wire_guard: false,
}
}
}
@@ -177,6 +180,7 @@ pub fn read_config(file_path: &str) -> anyhow::Result<(Config, Vec<String>, bool
file_conf.mapping,
compressor,
!file_conf.disable_stats,
file_conf.allow_wire_guard,
)?;
Ok((config, file_conf.vnt_mapping, file_conf.cmd))