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

Aperta
#3,454 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
57/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
cli, devtools

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
TypeScript
Stelle
143k
Fork
21k
Merge medio
5h 25m
PR unite (30g)
791

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di garrytan/gstack

Tutte le issue di garrytan/gstack

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.