Skip to content

fix(browse): honor proxy env vars in Playwright launches - #916

Closed
ningfeemic-dev wants to merge 1 commit into
garrytan:mainfrom
ningfeemic-dev:fix/browse-proxy-env-playwright
Closed

ningfeemic-dev wants to merge 1 commit into
garrytan:mainfrom
ningfeemic-dev:fix/browse-proxy-env-playwright

Conversation

@ningfeemic-dev

Copy link
Copy Markdown
Contributor

Summary

Fix gstack browse so Chromium navigation honors standard proxy environment variables.

Closes #915

What changed

  • added getProxySettings() in browse/src/browser-manager.ts
  • read proxy config from:
    • HTTPS_PROXY / https_proxy
    • HTTP_PROXY / http_proxy
    • ALL_PROXY / all_proxy
    • NO_PROXY / no_proxy
  • passed Playwright proxy into all Chromium launch paths:
    • chromium.launch(...)
    • headed chromium.launchPersistentContext(...)
    • handoff / context recreation launchPersistentContext(...)

Validation

Before fix, proxied environments could still fail with:

net::ERR_CONNECTION_RESET

After patch + rebuild locally:

browse goto https://www.google.com   # 200
browse goto https://duckduckgo.com   # 200

@capy-ai

capy-ai Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Thanks for this, @ningfeemic-dev. Since April, browse has explicit proxy support: browse --proxy http://host:port (or socks5://, with auth) is applied to every Chromium launch path, and the CLI keeps its loopback calls off HTTP_PROXY. Closing as superseded. If you'd like browse to pick up HTTPS_PROXY automatically when --proxy isn't given, please open an issue. That's a behavior change we'd want to decide on separately.

@capy-ai capy-ai Bot closed this Oct 8, 2026
capy-ai Bot pushed a commit that referenced this pull request Oct 11, 2026
…s, no NUL bunfig (Wave 9 Lane E) (#3135)

browse resolves its proxy from --proxy, BROWSE_PROXY_URL, then HTTPS_PROXY,
HTTP_PROXY and ALL_PROXY (BROWSE_PROXY_URL=direct opts out), translates
NO_PROXY to Chromium bypass rules with loopback always kept, and hashes the
proxy and NO_PROXY rules into the daemon config so a differing environment is
refused with the variable named. Unparseable standard variables warn and go
direct; browse stop always stops (#915, supersedes #916).

Safe directories and targets resolve through one realpath
(fs.realpathSync.native), fixing Windows 8.3 temp paths (#3104). Bun children
get an empty private bunfig instead of --config=NUL, which panicked Bun
1.3.10 on Windows (#3085).

Co-authored-by: ningfeemic-dev <239259264+ningfeemic-dev@users.noreply.github.com>
@capy-ai

capy-ai Bot commented Oct 11, 2026

Copy link
Copy Markdown
Contributor

Superseded by #3135, merged in v1.91.86.0 (47cd4a9), which builds on this PR's approach. It adds NO_PROXY bypass rules, an explicit opt-out, and a check that refuses a daemon whose proxy settings don't match. You're credited as co-author on the merged commit. Thanks @ningfeemic-dev.

levi85 pushed a commit to levi85/gstack that referenced this pull request Oct 14, 2026
…s, no NUL bunfig (Wave 9 Lane E) (garrytan#3135)

browse resolves its proxy from --proxy, BROWSE_PROXY_URL, then HTTPS_PROXY,
HTTP_PROXY and ALL_PROXY (BROWSE_PROXY_URL=direct opts out), translates
NO_PROXY to Chromium bypass rules with loopback always kept, and hashes the
proxy and NO_PROXY rules into the daemon config so a differing environment is
refused with the variable named. Unparseable standard variables warn and go
direct; browse stop always stops (garrytan#915, supersedes garrytan#916).

Safe directories and targets resolve through one realpath
(fs.realpathSync.native), fixing Windows 8.3 temp paths (garrytan#3104). Bun children
get an empty private bunfig instead of --config=NUL, which panicked Bun
1.3.10 on Windows (garrytan#3085).

Co-authored-by: ningfeemic-dev <239259264+ningfeemic-dev@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

browse: Playwright Chromium does not honor standard proxy env vars for page navigation

2 participants