feat: rubyfish dns
parent
219323a0d6
commit
006420e06e
|
@ -166,6 +166,11 @@ module.exports = {
|
|||
type: 'https',
|
||||
server: 'https://9.9.9.9/dns-query',
|
||||
cacheSize: 1000
|
||||
},
|
||||
rubyfish: {
|
||||
type: 'https',
|
||||
server: 'https://rubyfish.cn/dns-query',
|
||||
cacheSize: 1000
|
||||
}
|
||||
// google: {
|
||||
// type: 'https',
|
||||
|
@ -194,7 +199,7 @@ module.exports = {
|
|||
},
|
||||
speedTest: {
|
||||
hostnameList: ['github.com'],
|
||||
dnsProviders: ['usa', 'quad9']
|
||||
dnsProviders: ['usa', 'quad9', 'rubyfish']
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -81,7 +81,7 @@ class SpeedTester {
|
|||
async test () {
|
||||
this.backupList = await this.getIpListFromDns(this.dnsMap)
|
||||
log.info('[speed]', this.hostname, ' ips:', this.backupList)
|
||||
this.testBackups()
|
||||
await this.testBackups()
|
||||
}
|
||||
|
||||
async testBackups () {
|
||||
|
|
|
@ -3,22 +3,27 @@ const SpeedTest = require('../src/lib/speed/index.js')
|
|||
const dns = require('../src/lib/dns/index.js')
|
||||
|
||||
const dnsMap = dns.initDNS({
|
||||
ipaddress: {
|
||||
type: 'ipaddress',
|
||||
server: 'ipaddress',
|
||||
cacheSize: 1000
|
||||
},
|
||||
// ipaddress: {
|
||||
// type: 'ipaddress',
|
||||
// server: 'ipaddress',
|
||||
// cacheSize: 1000
|
||||
// },
|
||||
usa: {
|
||||
type: 'https',
|
||||
server: 'https://1.1.1.1/dns-query',
|
||||
cacheSize: 1000
|
||||
}
|
||||
// google: {
|
||||
// py233: { //污染
|
||||
// type: 'https',
|
||||
// server: ' https://i.233py.com/dns-query',
|
||||
// cacheSize: 1000
|
||||
// }
|
||||
// google: { //不可用
|
||||
// type: 'https',
|
||||
// server: 'https://8.8.8.8/dns-query',
|
||||
// cacheSize: 1000
|
||||
// },
|
||||
// dnsSB: {
|
||||
// dnsSB: { //不可用
|
||||
// type: 'https',
|
||||
// server: 'https://doh.dns.sb/dns-query',
|
||||
// cacheSize: 1000
|
||||
|
|
|
@ -20,7 +20,29 @@ const dnsProviders = dns.initDNS({
|
|||
type: 'https',
|
||||
server: 'https://9.9.9.9/dns-query',
|
||||
cacheSize: 1000
|
||||
},
|
||||
rubyfish: {
|
||||
type: 'https',
|
||||
server: 'https://rubyfish.cn/dns-query',
|
||||
cacheSize: 1000
|
||||
},
|
||||
py233: {
|
||||
type: 'https',
|
||||
server: ' https://i.233py.com/dns-query',
|
||||
cacheSize: 1000
|
||||
}
|
||||
|
||||
// sb: {
|
||||
// type: 'https',
|
||||
// server: 'https://doh.dns.sb/dns-query',
|
||||
// cacheSize: 1000
|
||||
// },
|
||||
// adguard: {
|
||||
// type: 'https',
|
||||
// server: ' https://dns.adguard.com/dns-query',
|
||||
// cacheSize: 1000
|
||||
// }
|
||||
|
||||
})
|
||||
|
||||
// const test = '111<tr><th>IP Address</th><td><ul class="comma-separated"><li>140.82.113.4</li></ul></td></tr>2222'
|
||||
|
@ -34,7 +56,7 @@ const hostname0 = 'github.com'
|
|||
// console.log('first')
|
||||
// dnsProviders.usa.lookup(hostname0)
|
||||
console.log('test')
|
||||
dnsProviders.quad9.lookup(hostname0)
|
||||
dnsProviders.py233.lookup(hostname0)
|
||||
// dnsProviders.usa.lookup(hostname0)
|
||||
// dnsProviders.ipaddress.lookup(hostname0)
|
||||
// dnsProviders.ipaddress.lookup(hostname0)
|
||||
|
|
Loading…
Reference in New Issue