mirror of
https://github.com/wukko/cobalt.git
synced 2025-03-25 18:54:53 +01:00
api/test: use proxy from external proxy env if available
This commit is contained in:
parent
d6b0fbc8ec
commit
8f57881a68
1 changed files with 5 additions and 0 deletions
|
@ -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":
|
||||
|
|
Loading…
Add table
Reference in a new issue