BrowserStackLocal with proxy giving Error: Could not connect to www.browserstack.com
<h2>BrowserStackLocal gives Error: Could not connect to www.browserstack.com!</h2>

<p>I am trying to use Charles Proxy with BrowserStackLocal. I want to use Rewrite feature of Charles Proxy. Both Charles Proxy and BrowserStackLocal are running on same Mac Laptop. </p>

<p>I am getting following error. Has anybody run into this problem?</p>

<pre><code>$ ./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 &lt;KEY&gt;
Example:
./BrowserStackLocal DsVSdoJPBi2z44sbGFx1

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

View more configuration options at http://www.browserstack.com/local-testing
</code></pre>