Skip to content

Commit c947f03

Browse files
dns读取配置优化。
1 parent bdf6a91 commit c947f03

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/mitmproxy/src/lib/dns/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ module.exports = {
2828
if (type == null) {
2929
if (server.startsWith('https://') || server.startsWith('http://')) {
3030
type = 'https'
31-
} else if (server.startsWith('tls://')) {
31+
} else if (server.startsWith('tls://') || server.startsWith('dot://')) {
3232
type = 'tls'
3333
} else if (server.startsWith('tcp://')) {
3434
type = 'tcp'
@@ -65,7 +65,7 @@ module.exports = {
6565
if (type === 'tls' || type === 'dot' || type === 'dns-over-tls') {
6666
// 基于 tls
6767
dnsMap[provider] = new DNSOverTLS(provider, conf.cacheSize, preSetIpList, server, port, conf.servername || conf.sni)
68-
} else if (type === 'tcp' || type === 'dns-over-tcp') {
68+
} else if (type === 'tcp') {
6969
// 基于 tcp
7070
dnsMap[provider] = new DNSOverTCP(provider, conf.cacheSize, preSetIpList, server, port)
7171
} else {

0 commit comments

Comments
 (0)