diff --git a/api/src/util/test.js b/api/src/util/test.js index 9457c1ca..25c822cc 100644 --- a/api/src/util/test.js +++ b/api/src/util/test.js @@ -4,6 +4,7 @@ import { env } from "../config.js"; import { runTest } from "../misc/run-test.js"; import { loadJSON } from "../misc/load-from-fs.js"; import { Red, Bright } from "../misc/console-text.js"; +import { setGlobalDispatcher, ProxyAgent } from "undici"; import { randomizeCiphers } from "../misc/randomize-ciphers.js"; import { services } from "../processing/service-config.js"; @@ -64,6 +65,10 @@ const printHeader = (service, padLen) => { console.log(service + '='.repeat(50)); } +if (env.externalProxy) { + setGlobalDispatcher(new ProxyAgent(env.externalProxy)); +} + const action = process.argv[2]; switch (action) { case "get-services":