diff --git a/src/main/utils/template.ts b/src/main/utils/template.ts index 5fd7dae..16f9b89 100644 --- a/src/main/utils/template.ts +++ b/src/main/utils/template.ts @@ -74,7 +74,8 @@ export const defaultControledMihomoConfig: Partial = { 'use-hosts': false, 'use-system-hosts': false, nameserver: ['https://120.53.53.53/dns-query', 'https://223.5.5.5/dns-query'], - 'proxy-server-nameserver': ['https://120.53.53.53/dns-query', 'https://223.5.5.5/dns-query'] + 'proxy-server-nameserver': ['https://120.53.53.53/dns-query', 'https://223.5.5.5/dns-query'], + 'direct-nameserver': [] }, sniffer: { enable: true, diff --git a/src/renderer/src/pages/dns.tsx b/src/renderer/src/pages/dns.tsx index 5a298bd..151e8e9 100644 --- a/src/renderer/src/pages/dns.tsx +++ b/src/renderer/src/pages/dns.tsx @@ -32,7 +32,8 @@ const DNS: React.FC = () => { 'proxy-server-nameserver': proxyServerNameserver = [ 'https://120.53.53.53/dns-query', 'https://223.5.5.5/dns-query' - ] + ], + 'direct-nameserver': directNameserver = [] } = dns || {} const [changed, setChanged] = useState(false) const [values, originSetValues] = useState({ @@ -45,6 +46,7 @@ const DNS: React.FC = () => { respectRules, nameserver, proxyServerNameserver, + directNameserver, useNameserverPolicy, nameserverPolicy: Object.entries(nameserverPolicy || {}).map(([domain, value]) => ({ domain, @@ -149,6 +151,7 @@ const DNS: React.FC = () => { 'respect-rules': values.respectRules, nameserver: values.nameserver, 'proxy-server-nameserver': values.proxyServerNameserver, + 'direct-nameserver': values.directNameserver, fallback: [], 'fallback-filter': {} } @@ -209,7 +212,7 @@ const DNS: React.FC = () => { }} /> - + {
-

代理节点域名解析

+

节点域名解析

{renderListInputs('proxyServerNameserver', '例:tls://223.5.5.5')}
@@ -229,6 +232,11 @@ const DNS: React.FC = () => { {renderListInputs('nameserver', '例:tls://223.5.5.5')} +
+

直连 DNS 服务器

+ {renderListInputs('directNameserver', '例:tls://223.5.5.5')} +
+