diff --git a/packages/hydrojudge/src/config.ts b/packages/hydrojudge/src/config.ts index 4a2d0c78c..6c5b7617f 100644 --- a/packages/hydrojudge/src/config.ts +++ b/packages/hydrojudge/src/config.ts @@ -36,6 +36,7 @@ export const JudgeSettings = Schema.object({ endpoint: Schema.string().role('url').description('Tempo endpoint').default('http://localhost:4318'), samplePercentage: Schema.number().description('Sample percentage').default(0).min(0).max(1), }), + pipe_proxy: Schema.boolean().description('Enable pipe proxy').default(true), detail: Schema.union([ Schema.const('full'), Schema.const('case'), diff --git a/packages/hydrojudge/src/sandbox.ts b/packages/hydrojudge/src/sandbox.ts index 9e802ffef..651575d6c 100644 --- a/packages/hydrojudge/src/sandbox.ts +++ b/packages/hydrojudge/src/sandbox.ts @@ -161,7 +161,7 @@ export async function runPiped( const body = { cmd: execute.map((exe) => proc({ ...exe, ...params })), pipeMapping: pipeMapping.map((pipe) => ({ - proxy: true, + proxy: getConfig('pipe_proxy'), max: 1024 * 1024 * size, ...pipe, })),