mirror of
https://github.com/SukkaW/Surge.git
synced 2026-01-29 01:51:52 +08:00
Chore: disable IPv6 in fetch
This commit is contained in:
@@ -26,6 +26,12 @@ if (!fs.existsSync(CACHE_DIR)) {
|
|||||||
const agent = new Agent({ allowH2: true });
|
const agent = new Agent({ allowH2: true });
|
||||||
|
|
||||||
setGlobalDispatcher(agent.compose(
|
setGlobalDispatcher(agent.compose(
|
||||||
|
interceptors.dns({
|
||||||
|
// disable IPv6
|
||||||
|
dualStack: false,
|
||||||
|
affinity: 4
|
||||||
|
// TODO: proper cacheable-lookup, or even DoH
|
||||||
|
}),
|
||||||
interceptors.retry({
|
interceptors.retry({
|
||||||
maxRetries: 5,
|
maxRetries: 5,
|
||||||
minTimeout: 500, // The initial retry delay in milliseconds
|
minTimeout: 500, // The initial retry delay in milliseconds
|
||||||
|
|||||||
Reference in New Issue
Block a user