Skip to content

Commit 146cbdd

Browse files
cute-omegaCopilot
andauthored
Update packages/mitmproxy/src/lib/dns/tcp.js
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 930a4bd commit 146cbdd

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • packages/mitmproxy/src/lib/dns

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const defaultPort = 53 // TCP类型的DNS服务默认端口号
99
module.exports = class DNSOverTCP extends BaseDNS {
1010
constructor (dnsName, cacheSize, preSetIpList, dnsServer, dnsServerPort) {
1111
super(dnsName, 'TCP', cacheSize, preSetIpList)
12-
this.dnsServer = dnsServer.replace(/\s+/, '')
12+
this.dnsServer = dnsServer.replace(/\s+/g, '')
1313
this.dnsServerPort = Number.parseInt(dnsServerPort) || defaultPort
1414
this.isIPv6 = dnsServer.includes(':') && dnsServer.includes('[') && dnsServer.includes(']')
1515
}

0 commit comments

Comments
 (0)