mirror of
https://github.com/SukkaW/Surge.git
synced 2026-01-29 01:51:52 +08:00
Feat: implement parallel fetch w/ HTTP 304 (#43)
This commit is contained in:
@@ -2,9 +2,9 @@ import retry from 'async-retry';
|
||||
import picocolors from 'picocolors';
|
||||
import { setTimeout } from 'node:timers/promises';
|
||||
|
||||
import { setGlobalDispatcher, Agent } from 'undici';
|
||||
import { setGlobalDispatcher, EnvHttpProxyAgent } from 'undici';
|
||||
|
||||
setGlobalDispatcher(new Agent({ allowH2: true }));
|
||||
setGlobalDispatcher(new EnvHttpProxyAgent({ allowH2: true }));
|
||||
|
||||
function isClientError(err: unknown): err is NodeJS.ErrnoException {
|
||||
if (!err || typeof err !== 'object') return false;
|
||||
|
||||
Reference in New Issue
Block a user