mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-12-06 23:00:15 +08:00
refactor(config): move Mihomo YAML fidelity rules into clash-verge-config-render
Short-id-safe YAML parsing and the export quoting of fake-ip-filter wildcards are Mihomo output rules without app dependencies. They now live beside the other Mihomo YAML rules, and the app calls them from the parse and export entry points. The plain serializer re-export is replaced by serde_yaml_ng::to_string at its five call sites.
This commit is contained in:
@@ -4,7 +4,7 @@ use crate::feat;
|
||||
use crate::utils::dirs;
|
||||
use crate::{
|
||||
cmd::StringifyErr as _,
|
||||
config::{ClashInfo, Config, mihomo_yaml, profiles::save_committed_profiles},
|
||||
config::{ClashInfo, Config, profiles::save_committed_profiles},
|
||||
constants,
|
||||
core::{
|
||||
CoreManager, handle,
|
||||
@@ -132,7 +132,7 @@ pub async fn save_dns_config(dns_config: crate::ipc::YamlMapping) -> CmdResult {
|
||||
|
||||
let dns_path = dirs::app_home_dir().stringify_err()?.join(constants::files::DNS_CONFIG);
|
||||
|
||||
let yaml_str = mihomo_yaml::serialize_for_export(&dns_config.0).stringify_err()?;
|
||||
let yaml_str = clash_verge_config_render::serialize_for_export(&dns_config.0).stringify_err()?;
|
||||
fs::write(&dns_path, yaml_str).await.stringify_err()?;
|
||||
logging!(info, Type::Config, "DNS config saved to {dns_path:?}");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user