summaryrefslogtreecommitdiff
path: root/packages/core/src
diff options
context:
space:
mode:
authorOlcan <[email protected]>2025-06-10 08:58:37 -0700
committerGitHub <[email protected]>2025-06-10 08:58:37 -0700
commite38d2078cc70b0453ef70523a8ad38279941aca2 (patch)
treeb5a4024d1c006a2d116631ac7a51bb5b0eaf34a6 /packages/core/src
parent895c1f132f9d1cc88bd56584e461fd22a5f23394 (diff)
restricted networking for all sandboxing methods, new seatbelt profiles, updated docs, fixes to sandbox build, debugging through sandbox (#891)
Diffstat (limited to 'packages/core/src')
-rw-r--r--packages/core/src/core/client.ts12
1 files changed, 12 insertions, 0 deletions
diff --git a/packages/core/src/core/client.ts b/packages/core/src/core/client.ts
index 1b953d30..3046116e 100644
--- a/packages/core/src/core/client.ts
+++ b/packages/core/src/core/client.ts
@@ -38,6 +38,18 @@ import {
createContentGenerator,
} from './contentGenerator.js';
+import { ProxyAgent, setGlobalDispatcher } from 'undici';
+
+const proxy =
+ process.env.HTTPS_PROXY ||
+ process.env.https_proxy ||
+ process.env.HTTP_PROXY ||
+ process.env.http_proxy;
+
+if (proxy) {
+ setGlobalDispatcher(new ProxyAgent(proxy));
+}
+
export class GeminiClient {
private chat: Promise<GeminiChat>;
private contentGenerator: ContentGenerator;