Skip to content

Commit 2f9dade

Browse files
authored
Merge pull request #2 from ZhangYiqun018/feat/env-passthrough-auth-proxy
feat: pass through Claude proxy/auth environment variables
2 parents 0728391 + f44eccf commit 2f9dade

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

src/podman-runner.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,19 @@ export class PodmanRunner {
339339
args.push("-e", `ANTHROPIC_API_KEY=${params.apiKey}`);
340340
}
341341

342+
// Pass through selected host env vars for compatible proxy/auth setups.
343+
const passthroughEnvKeys = [
344+
"CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC",
345+
"ANTHROPIC_BASE_URL",
346+
"ANTHROPIC_AUTH_TOKEN",
347+
] as const;
348+
for (const key of passthroughEnvKeys) {
349+
const value = process.env[key];
350+
if (value && value.length > 0) {
351+
args.push("-e", `${key}=${value}`);
352+
}
353+
}
354+
342355
if (params.gitEnv) {
343356
args.push(
344357
"-e",

0 commit comments

Comments
 (0)