mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-11-18 18:02:08 +08:00
refactor: replace hardcoded DNS config filename with constant reference (#5280)
* refactor: replace hardcoded DNS config filename with constant reference * refactor: remove redundant import of constants in IClashTemp template method * refactor: add conditional compilation for DEFAULT_REDIR based on OS * refactor: simplify default TPROXY port handling and remove unused trace_err macro * refactor: simplify default TPROXY port fallback logic
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
use crate::utils::logging::NoModuleFilter;
|
||||
use crate::{
|
||||
config::*,
|
||||
constants,
|
||||
core::handle,
|
||||
logging,
|
||||
process::AsyncHandler,
|
||||
@@ -304,7 +305,7 @@ async fn init_dns_config() -> Result<()> {
|
||||
|
||||
// 检查DNS配置文件是否存在
|
||||
let app_dir = dirs::app_home_dir()?;
|
||||
let dns_path = app_dir.join("dns_config.yaml");
|
||||
let dns_path = app_dir.join(constants::files::DNS_CONFIG);
|
||||
|
||||
if !dns_path.exists() {
|
||||
logging!(info, Type::Setup, "Creating default DNS config file");
|
||||
|
||||
Reference in New Issue
Block a user