browse: two macOS/Windows follow-ups from the #3448 review (post-upgrade refusal with a persistent BROWSE_PROXY_URL=direct; unparseable-variable warning wording)

オープン
#3,454 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
57/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
typescript
領域
cli, devtools

調査の方向性

Start with browse/src/cli.ts and browse/src/proxy-config.ts, then read the related tests, proxy-config.test.ts, and BROWSER.md. Check how ensureServer orders the version and config hash checks, and how resolveProxy builds its warning across platforms. Done means both upgrade refusal behavior and the non-Linux warning match the described proxy behavior, with the platform case covered by tests.

索引モデルが issue の本文から書いたものです。

説明

S3

Two low-confidence red-team notes from the /ship review of #3448 (the --proxy-server=direct:// launch fix for #3440 item 8), filed as a follow-up on GStack Minder's direction. Both are macOS/Windows only, where BROWSE_PROXY_URL=direct is part of the daemon config hash and bypasses the system proxy settings.

1. A persistent BROWSE_PROXY_URL=direct meets a refusal, not an auto-restart, on the first command after upgrading past #3448

ensureServer in browse/src/cli.ts checks state.configHash against the session's hash before the binary-version auto-restart ("Binary updated, restarting server..."). A daemon started by an older gstack hashed a plain no-proxy config; the new CLI with BROWSE_PROXY_URL=direct set hashes {direct:true}, so the first command exits 1 with the BROWSE_PROXY_URL differs refusal (both sides read "no proxy", which is confusing, though the browse stop remedy is printed) instead of restarting the daemon. One-time cost per upgrade; the same ordering already applied to headed mismatches. Options: hoist the version check above the hash check, or skip an explicit-direct-only mismatch when state.binaryVersion differs and the state has no proxyDirect field.

2. The unparseable-variable warning says "browse connects directly" where Chromium follows the system proxy

resolveProxy in browse/src/proxy-config.ts (~line 321) warns ... so browse connects directly for a curl-style or unsupported HTTPS_PROXY. On Linux that is true (the launch carries --proxy-server=direct://). On macOS and Windows no switch is passed, so Chromium follows the system proxy settings (PAC/WPAD included); only BROWSE_PROXY_URL=direct makes it direct there. The hint already says that setting it "also makes Chromium bypass the system proxy settings", and BROWSER.md hedges the sentence, but the runtime message itself is not platform-aware. Fix: pass the platform into resolveProxy (or branch where the warning is built) and say on non-Linux "browse sets no proxy, so Chromium follows the system proxy settings; set BROWSE_PROXY_URL=direct to bypass them". proxy-config.test.ts pins the warning prefix, so the test needs the platform case too.

Related: #3440, #3448, #3450.

主要言語
TypeScript
スター
143k
フォーク
21k
平均マージ
5時間 25分
マージ済み PR(30日)
791

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

garrytan/gstack のほかの issue

garrytan/gstack の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。