From c21015c718840b918e82fb10977f8d5c951d59f3 Mon Sep 17 00:00:00 2001 From: undefined Date: Thu, 30 Apr 2026 02:22:08 +0800 Subject: [PATCH] judge: add pipe_proxy config --- packages/hydrojudge/src/config.ts | 1 + packages/hydrojudge/src/sandbox.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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, })),