import assert from 'node:assert' import dns from '../src/lib/dns/index.js' const presetIp = '100.100.100.100' const dnsProviders = dns.initDNS({ ipaddress: { type: 'ipaddress', server: 'ipaddress', cacheSize: 1000, }, // https cloudflare: { type: 'https', server: 'https://1.1.1.1/dns-query', cacheSize: 1000, }, quad9: { server: 'https://9.9.9.9/dns-query', cacheSize: 1000, }, aliyun: { type: 'https', server: 'https://dns.alidns.com/dns-query', cacheSize: 1000, }, safe360: { server: 'https://doh.360.cn/dns-query', cacheSize: 1000, }, rubyfish: { server: 'https://rubyfish.cn/dns-query', cacheSize: 1000, }, py233: { server: ' https://i.233py.com/dns-query', cacheSize: 1000, }, // tls cloudflareTLS: { type: 'tls', server: '1.1.1.1', servername: 'cloudflare-dns.com', cacheSize: 1000, }, quad9TLS: { server: 'tls://9.9.9.9', servername: 'dns.quad9.net', cacheSize: 1000, }, aliyunTLS: { type: 'tls', server: '223.5.5.5', cacheSize: 1000, }, aliyunTLS2: { server: 'tls://223.6.6.6', cacheSize: 1000, }, safe360TLS: { server: 'tls://dot.360.cn', cacheSize: 1000, }, // tcp googleTCP: { type: 'tcp', server: '8.8.8.8', cacheSize: 1000, }, aliyunTCP: { server: 'tcp://223.5.5.5', cacheSize: 1000, }, // udp googleUDP: { // type: 'udp', // 默认是udp可以不用标 server: '8.8.8.8', cacheSize: 1000, }, aliyunUDP: { server: 'udp://223.5.5.5', cacheSize: 1000, }, }, { origin: { 'xxx.com': [ presetIp ] } }) const presetHostname = 'xxx.com' const hostname1 = 'github.com' const hostname2 = 'api.github.com' const hostname3 = 'hk.docmirror.cn' const hostname4 = 'github.docmirror.cn' const hostname5 = 'gh.docmirror.top' const hostname6 = 'gh2.docmirror.top' let ip // const test = '111IP Address2222' // // IP Address // // IP Address // const regexp = /IP Address<\/th>