dns读取配置优化。

release-2.0.0.2
王良 2025-04-18 10:54:29 +08:00
parent bdf6a913b7
commit c947f03dc6
1 changed files with 2 additions and 2 deletions

View File

@ -28,7 +28,7 @@ module.exports = {
if (type == null) {
if (server.startsWith('https://') || server.startsWith('http://')) {
type = 'https'
} else if (server.startsWith('tls://')) {
} else if (server.startsWith('tls://') || server.startsWith('dot://')) {
type = 'tls'
} else if (server.startsWith('tcp://')) {
type = 'tcp'
@ -65,7 +65,7 @@ module.exports = {
if (type === 'tls' || type === 'dot' || type === 'dns-over-tls') {
// 基于 tls
dnsMap[provider] = new DNSOverTLS(provider, conf.cacheSize, preSetIpList, server, port, conf.servername || conf.sni)
} else if (type === 'tcp' || type === 'dns-over-tcp') {
} else if (type === 'tcp') {
// 基于 tcp
dnsMap[provider] = new DNSOverTCP(provider, conf.cacheSize, preSetIpList, server, port)
} else {