SukkaW 65558592cb
Some checks are pending
Build / Build (push) Waiting to run
Build / Diff output (push) Blocked by required conditions
Build / Deploy to Cloudflare Pages (push) Blocked by required conditions
Build / Deploy to GitHub and GitLab (push) Blocked by required conditions
Chore: make sure random DoH Servers are different
2025-02-14 23:44:02 +08:00

26 lines
595 B
TypeScript

import 'dns2';
declare module 'dns2' {
import DNS2 from 'dns2';
declare namespace DNS2 {
interface DoHClientOption {
/** @example dns.google.com */
dns: string,
/** @description whether to use HTTP or HTTPS */
http: boolean,
get?: (url: string) => any
}
export type PacketQuestion = keyof typeof Packet.TYPE;
export type DnsResolver<T = DnsResponse> = (name: string, type: PacketQuestion) => Promise<T>;
declare function DOHClient(opt: DoHClientOption): DnsResolver;
export type $DnsResponse = DnsResponse;
}
export = DNS2;
}