fix(core): update
This commit is contained in:
@ -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
|
||||
}
|
||||
|
@ -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) {
|
||||
|
Reference in New Issue
Block a user