feat: add unified delay

This commit is contained in:
huzibaca
2024-11-05 16:24:58 +08:00
parent ab7775e1ef
commit 2833718c90
15 changed files with 37 additions and 24 deletions

View File

@@ -55,6 +55,7 @@ impl IClashTemp {
map.insert("secret".into(), "".into());
map.insert("tun".into(), tun.into());
map.insert("external-controller-cors".into(), cors_map.into());
map.insert("unified-delay".into(), true.into());
Self(map)
}

View File

@@ -19,7 +19,7 @@ impl IRuntime {
// 这里只更改 allow-lan | ipv6 | log-level | tun
pub fn patch_config(&mut self, patch: Mapping) {
if let Some(config) = self.config.as_mut() {
["allow-lan", "ipv6", "log-level"]
["allow-lan", "ipv6", "log-level", "unified-delay"]
.into_iter()
.for_each(|key| {
if let Some(value) = patch.get(key).to_owned() {