diff --git a/packages/core/src/config/index.js b/packages/core/src/config/index.js index a9aa59d..318e848 100644 --- a/packages/core/src/config/index.js +++ b/packages/core/src/config/index.js @@ -240,7 +240,7 @@ module.exports = { }, speedTest: { enabled: true, - interval: 300000, + interval: 120000, hostnameList: ['github.com'], dnsProviders: ['usa', 'quad9', 'rubyfish'] } diff --git a/packages/mitmproxy/src/lib/speed/SpeedTester.js b/packages/mitmproxy/src/lib/speed/SpeedTester.js index f05ad49..1168ca4 100644 --- a/packages/mitmproxy/src/lib/speed/SpeedTester.js +++ b/packages/mitmproxy/src/lib/speed/SpeedTester.js @@ -81,7 +81,7 @@ class SpeedTester { } async test () { - if (this.testCount % 10 === 0 || this.backupList.length === 0) { + if (this.testCount % 10 <= 3 || this.backupList.length === 0) { const newList = await this.getIpListFromDns(this.dnsMap) const newBackupList = [...newList, ...this.backupList] this.backupList = _.unionBy(newBackupList, 'host')