dns读取配置优化。
parent
bdf6a913b7
commit
c947f03dc6
|
@ -28,7 +28,7 @@ module.exports = {
|
||||||
if (type == null) {
|
if (type == null) {
|
||||||
if (server.startsWith('https://') || server.startsWith('http://')) {
|
if (server.startsWith('https://') || server.startsWith('http://')) {
|
||||||
type = 'https'
|
type = 'https'
|
||||||
} else if (server.startsWith('tls://')) {
|
} else if (server.startsWith('tls://') || server.startsWith('dot://')) {
|
||||||
type = 'tls'
|
type = 'tls'
|
||||||
} else if (server.startsWith('tcp://')) {
|
} else if (server.startsWith('tcp://')) {
|
||||||
type = 'tcp'
|
type = 'tcp'
|
||||||
|
@ -65,7 +65,7 @@ module.exports = {
|
||||||
if (type === 'tls' || type === 'dot' || type === 'dns-over-tls') {
|
if (type === 'tls' || type === 'dot' || type === 'dns-over-tls') {
|
||||||
// 基于 tls
|
// 基于 tls
|
||||||
dnsMap[provider] = new DNSOverTLS(provider, conf.cacheSize, preSetIpList, server, port, conf.servername || conf.sni)
|
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
|
// 基于 tcp
|
||||||
dnsMap[provider] = new DNSOverTCP(provider, conf.cacheSize, preSetIpList, server, port)
|
dnsMap[provider] = new DNSOverTCP(provider, conf.cacheSize, preSetIpList, server, port)
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue