feat(dns): protect provider DNS from unconfirmed overrides (#7902)

Fixes #7292
This commit is contained in:
wonfen
2026-09-09 23:19:56 +08:00
committed by GitHub
parent b06a966a4b
commit 35a2b6c75c
36 changed files with 565 additions and 35 deletions
@@ -1,3 +1,4 @@
import { takeDnsOverrideNotice } from '@/services/cmds'
import { showNotice } from '@/services/notice-service'
type NavigateFunction = (path: string, options?: any) => void
@@ -24,6 +25,17 @@ export const handleNoticeMessage = (
showNotice.error(msg)
},
'set_config::error': () => showNotice.error(msg),
'dns_override::auto_disabled': () => {
void takeDnsOverrideNotice()
.then((pending) => {
if (pending) {
showNotice.info('settings.modals.dns.protection.autoDisabled')
}
})
.catch((error) => {
console.error('Failed to read the pending DNS override notice', error)
})
},
'tun_mode::auto_disabled': () =>
showNotice.info(
'settings.sections.system.notifications.tunMode.autoDisabled',