browse: Playwright Chromium does not honor standard proxy env vars for page navigation
- Dominant language
- TypeScript
- Stars
- 133k
- Forks
- 19.9k
- Avg merge
- 18h 46m
- Merged PRs (30d)
- 26
Description
## Summary
`gstack browse` runs inside an environment with standard proxy env vars set (`HTTP_PROXY`, `HTTPS_PROXY`, `ALL_PROXY`, `NO_PROXY`), but page navigation still fails because the Playwright Chromium launch paths do not explicitly pass proxy settings.
## Observed behavior
On a machine where:
- Claude Code itself can use the global proxy successfully
- `curl` through the same proxy succeeds
- local proxy endpoints are healthy
these commands fail with browser-level navigation errors:
```bash
browse goto https://www.google.com
browse goto https://duckduckgo.com
```
Error:
```text
net::ERR_CONNECTION_RESET
```
## Root cause
`browse/src/browser-manager.ts` launches Chromium via Playwright in multiple code paths, but does not pass Playwright's `proxy` option derived from the standard env vars:
- `chromium.launch(...)`
- `chromium.launchPersistentContext(...)`
- handoff / context recreation `launchPersistentContext(...)`
As a result, some surrounding process/network logic may see proxy env vars, but the actual Chromium page-navigation layer does not reliably use them.
## Expected behavior
If standard proxy env vars are present, `gstack browse` should use them for Chromium navigation too.
## Proposed fix
Add a small helper in `BrowserManager` that reads:
- `HTTPS_PROXY` / `https_proxy`
- `HTTP_PROXY` / `http_proxy`
- `ALL_PROXY` / `all_proxy`
- `NO_PROXY` / `no_proxy`
and inject the resulting Playwright `proxy` config into all Chromium launch paths.
## Validation
After patching and rebuilding locally, the following succeeded:
```bash
browse goto https://www.google.com # 200
browse goto https://duckduckgo.com # 200
```
Contributor guide
Assessment
This issue has not been assessed yet.