Skip to content

HTTP Proxy Environment Variables Not Honored by Rust Backend #6835

@tltsaia

Description

@tltsaia

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.com

Error:

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 this

Also fix:

  • crates/goose/src/providers/githubcopilot.rs:158
  • crates/goose/src/providers/gcpvertexai.rs:161
  • crates/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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions