Perf: offload Telegram CIDR fetching into separate thread

This commit is contained in:
SukkaW
2025-12-10 16:31:15 +08:00
parent f41bb4a3b8
commit 6a35d3e4a6
7 changed files with 174 additions and 148 deletions

View File

@@ -177,6 +177,8 @@ export async function $$fetch(url: string, init: RequestInit = defaultRequestIni
}
}
export const fetch = $$fetch;
/** @deprecated -- undici.requests doesn't support gzip/br/deflate, and has difficulty w/ undidi cache */
export async function requestWithLog(url: string, opt?: Parameters<typeof undici.request>[1]) {
try {