Chore: disable IPv6 in fetch
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-01 22:34:47 +08:00
parent 762fad0838
commit 137426dc59

View File

@ -26,6 +26,12 @@ if (!fs.existsSync(CACHE_DIR)) {
const agent = new Agent({ allowH2: true });
setGlobalDispatcher(agent.compose(
interceptors.dns({
// disable IPv6
dualStack: false,
affinity: 4
// TODO: proper cacheable-lookup, or even DoH
}),
interceptors.retry({
maxRetries: 5,
minTimeout: 500, // The initial retry delay in milliseconds