You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 26fb0df
Browse filesBrowse the repository at this point in the historyBrowse files
Send proxy credentials when downloading the binary
proxyUser/proxyPass reached the running binary as --proxy-user/--proxy-pass
but never the library's own download of that binary. Behind a proxy that
requires Basic auth, the first download request (the source-URL lookup on
local.browserstack.com) was refused with 407, the binary was never fetched,
and start() failed with "Couldn't find binary file". Every released version
behaves this way. Fixes#164.
- util.buildProxyAgent is now the single place the download proxy agent is
built (it was four copies). It adds Basic auth from proxyUser/proxyPass and
follows the README rule that proxyPass is ignored without proxyUser.
- Local.getBinaryPath forwards proxyUser/proxyPass into the download conf.
- The sync path hands the credentials to the spawned download scripts through
BROWSERSTACK_LOCAL_PROXY_USER/_PASS in their environment, never argv (same
as the auth token). A copy already in process.env is dropped first.
Tests: test/proxy_auth_download.js runs offline against a recording proxy in
its own process, so the sync path cannot deadlock it. 10/10 pass; 9/10 fail
on the pre-fix code. Also verified end to end with a real key: the library
downloads the binary through a credential-checking proxy and the tunnel
connects, async and sync, with and without TLS inspection.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: README.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -80,6 +80,8 @@ To use a proxy for local testing -
80
80
* proxyPass: Password for USERNAME, will be ignored if USERNAME is empty or not specified
81
81
* useCaCertificate: Path to ca cert file, if required
82
82
83
+
The same settings, including proxyUser/proxyPass and useCaCertificate, are used when the library downloads the BrowserStack Local binary. The download goes through the proxy only when both proxyHost and proxyPort are set.
0 commit comments