fix(tools): add proxy support to web_fetch HTTP transport
The web_fetch tool's custom http.Transport was missing the Proxy field, causing it to ignore HTTP_PROXY/HTTPS_PROXY environment variables. Unlike a nil Transport (which defaults to http.DefaultTransport with ProxyFromEnvironment), a manually constructed Transport defaults Proxy to nil (no proxy). Add Proxy: http.ProxyFromEnvironment to restore proxy support for users behind corporate proxies or in censored networks. Closes #413
This commit is contained in:
parent
f7ec89d82d
commit
fcc6c02429
1 changed files with 1 additions and 0 deletions
|
|
@ -413,6 +413,7 @@ func (t *WebFetchTool) Execute(ctx context.Context, args map[string]interface{})
|
|||
client := &http.Client{
|
||||
Timeout: 60 * time.Second,
|
||||
Transport: &http.Transport{
|
||||
Proxy: http.ProxyFromEnvironment,
|
||||
MaxIdleConns: 10,
|
||||
IdleConnTimeout: 30 * time.Second,
|
||||
DisableCompression: false,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue