-
Notifications
You must be signed in to change notification settings - Fork 3.2k
HTTP Proxy Environment Variables Not Honored by Rust Backend #6835
Copy link
Copy link
Closed
Description
HTTP Proxy Environment Variables Not Honored by Rust Backend
Summary
Documentation claims goose supports HTTP_PROXY/HTTPS_PROXY environment variables, but the Rust backend doesn't implement this feature, causing connection failures in corporate proxy environments.
Environment
- goose v1.22.0, Windows, Desktop app
- Network: Corporate proxy at
10.1.250.30:8080 - Provider: Azure OpenAI at
company.com
Problem
SET HTTPS_PROXY=http://10.1.250.30:8080
SET AZURE_OPENAI_ENDPOINT=https://company.comError:
Request failed: error sending request for url
(https://company.com/...)
(failed to connect to company.com)
Root Cause: reqwest::Client doesn't read environment variables without .use_system_proxy()
- ✅ Electron UI configures proxy correctly (
ui/desktop/src/main.ts:80) - ❌ Rust backend ignores proxy settings (
crates/goose/src/providers/api_client.rs:210)
Solution
Add .use_system_proxy() to all Client::builder() calls:
crates/goose/src/providers/api_client.rs:
// Line 210
let mut client_builder = Client::builder()
.timeout(timeout)
.use_system_proxy(); // Add this
// Line 232
let mut client_builder = Client::builder()
.timeout(self.timeout)
.default_headers(self.default_headers.clone())
.use_system_proxy(); // Add thisAlso fix:
crates/goose/src/providers/githubcopilot.rs:158crates/goose/src/providers/gcpvertexai.rs:161crates/goose/src/providers/toolshim.rs:73
Impact
Severity: High - Blocks enterprise users behind corporate proxies
Affected: Any deployment requiring HTTP proxy for LLM provider connections
Workaround: Use OS-level proxy tools (Proxifier, Netch) - requires admin rights
Labels: bug networking enterprise documentation
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels