fix(core): update

This commit is contained in:
2021-01-22 20:37:51 +00:00
parent efd9bbb77a
commit 6cfc12f83f
4 changed files with 18 additions and 1 deletions

View File

@ -13,3 +13,10 @@ export { smartdelay, smartpromise, smartrequest };
import * as tsclass from '@tsclass/tsclass';
export { tsclass };
// third party scope
import dns2 from 'dns2';
export {
dns2
}

View File

@ -24,6 +24,8 @@ export class Smartdns {
public dnsServerIp: string;
public dnsServerPort: number;
public dns2 = new plugins.dns2();
public dnsTypeMap: { [key: string]: number } = {
A: 1,
AAAA: 28,
@ -65,6 +67,8 @@ export class Smartdns {
return true;
} else {
await plugins.smartdelay.delayFor(intervalArg);
// lets try backup strategy
const backupResult = this.dns2[`resolve${recordTypeArg}`]('google.com')
return await doCheck();
}
} catch (err) {