mirror of
https://github.com/SukkaW/Surge.git
synced 2026-01-28 17:41:54 +08:00
Feat: validate domains are alive (and w/ CI)
This commit is contained in:
22
Build/mod.d.ts
vendored
Normal file
22
Build/mod.d.ts
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
import 'dns2';
|
||||
|
||||
declare module 'dns2' {
|
||||
import DNS from 'dns2';
|
||||
|
||||
declare namespace DNS {
|
||||
interface DoHClientOption {
|
||||
/** @example dns.google.com */
|
||||
dns: string,
|
||||
/** @description whether to use HTTP or HTTPS */
|
||||
http: boolean
|
||||
}
|
||||
|
||||
export type DnsResolver<T = DnsResponse> = (name: string, type: PacketQuestion) => Promise<T>;
|
||||
|
||||
declare function DOHClient(opt: DoHClientOption): DnsResolver;
|
||||
|
||||
export type $DnsResponse = DnsResponse;
|
||||
}
|
||||
|
||||
export = DNS;
|
||||
}
|
||||
Reference in New Issue
Block a user