fix hosts

This commit is contained in:
pompurin404 2024-08-21 08:15:27 +08:00
parent 5ee45233a8
commit 9af1112103
No known key found for this signature in database
2 changed files with 5 additions and 6 deletions

View File

@ -1,8 +1,4 @@
### New Features
- 支持全局快捷键
- 添加流量图显
### Bug Fixes
- 修复Windows托盘菜单重复出现的问题
- 修复接管dns后自定义hosts无法删除的问题
- 删除退出应用全局快捷键(仅支持应用内CommandOrCtrl+Q退出)

View File

@ -36,6 +36,9 @@ export async function patchControledMihomoConfig(patch: Partial<IMihomoConfig>):
controledMihomoConfig.sniffer = defaultControledMihomoConfig.sniffer
}
}
if (patch.hosts) {
controledMihomoConfig.hosts = patch.hosts
}
controledMihomoConfig = deepMerge(controledMihomoConfig, patch)
if (!useNameserverPolicy) {
delete controledMihomoConfig?.dns?.['nameserver-policy']