mirror of
https://github.com/SukkaW/Surge.git
synced 2025-12-12 09:10:35 +08:00
Chore: disable IPv6 in fetch
This commit is contained in:
parent
762fad0838
commit
137426dc59
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user