Chore: make sure random DoH Servers are different
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

This commit is contained in:
SukkaW
2025-02-14 23:44:02 +08:00
parent 26eb05572f
commit 65558592cb
4 changed files with 42 additions and 37 deletions

7
Build/mod.d.ts vendored
View File

@@ -1,9 +1,9 @@
import 'dns2';
declare module 'dns2' {
import DNS from 'dns2';
import DNS2 from 'dns2';
declare namespace DNS {
declare namespace DNS2 {
interface DoHClientOption {
/** @example dns.google.com */
dns: string,
@@ -13,6 +13,7 @@ declare module 'dns2' {
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;
@@ -20,5 +21,5 @@ declare module 'dns2' {
export type $DnsResponse = DnsResponse;
}
export = DNS;
export = DNS2;
}