BrowserStackLocal with proxy giving Error: Could not connect to www.browserstack.com

BrowserStackLocal with proxy giving Error: Could not connect to www.browserstack.com

BrowserStackLocal 给出错误:无法连接到 www.browserstack.com!

我正在尝试将 Charles Proxy 与 BrowserStackLocal 结合使用。我想使用 Charles Proxy 的重写功能。 Charles Proxy 和 BrowserStackLocal 运行 在同一台 Mac 笔记本电脑上。

我收到以下错误。有人 运行 遇到过这个问题吗?

$ ./BrowserStackLocal myKey -proxyHost 192.168.160.113 -proxyPort 8888 -force -forcelocal
BrowserStackLocal v5.5

*** Error: Could not connect to www.browserstack.com!

Configuration Options:
-v
 Provides verbose logging
-f
 If you want to test local folder rather internal server
-h
 Prints this help
-version
 Displays the version
-force
 Kill other running Browserstack Local
-only
 Restricts Local Testing access to specified local servers and/or folders
-forcelocal
 Route all traffic via local machine
-onlyAutomate
 Disable Live Testing and Screenshots, just test Automate
-proxyHost HOST
Hostname/IP of proxy, remaining proxy options are ignored if this option is absent
-proxyPort PORT
Port for the proxy, defaults to 3128 when -proxyHost is used
-proxyUser USERNAME
Username for connecting to proxy (Basic Auth Only)
-proxyPass PASSWORD
Password for USERNAME, will be ignored if USERNAME is empty or not specified
-localIdentifier SOME_STRING
If doing simultaneous multiple local testing connections, set this uniquely for different processes

To test an internal server, run:
./BrowserStackLocal <KEY>
Example:
./BrowserStackLocal DsVSdoJPBi2z44sbGFx1

To test HTML files, run:
./BrowserStackLocal -f <KEY> <full path to local folder>
Example:
./BrowserStackLocal -f DsVSdoJPBi2z44sbGFx1 /Applications/MAMP/htdocs/example/

View more configuration options at http://www.browserstack.com/local-testing

Charles Proxy 生成自己的证书,由 'Charles Root Certificate' 签名。似乎 Charles Proxy 正在修改 BrowserStackLocal 使用的证书,因此对 BrowserStack 的请求失败并且您收到 "Could not connect to www.browserstack.com!"。有关 SSL 证书和 Charles 的更多信息可用 here

你能在 Charles 中禁用这个设置吗?这将允许 BrowserStackLocal 使用其原始证书并连接到 BrowserStack。

我在 Charles Proxy 中禁用了 SSL 代理并打开了 SOCKS 。那解决了问题。