title: Angular CLI: Proxy websocket with proxy.conf.json
body: <p>I am trying to proxy websockets using <code>ng serve --proxy-config proxy.conf.json</code> with Angular CLI but could'nt get it to work as I am getting this error: </p>
  
  <p><code>WebSocket connection to 'ws://stream/connect' failed: Error in connection establishment: net::ERR_NAME_NOT_RESOLVED</code></p>
  
  <p>Here is how I instantiated the websocket and my proxy configuration:</p>
  
  <pre class="lang-js prettyprint-override"><code>// WebSocket instantiation
  const ws = new WebSocket('ws://stream/connect');
  
  // proxy.conf.json
  "stream/**": {
    "target": "wss://someurl.com:443",
    "secure": false,
    "ws": true
  }
  </code></pre>
  
  <p>Am I missing something? It seems to be doable but i can't get it to work correctly!</p>
  
  <p><em>This closed issue <a href="https://github.com/angular/angular-cli/issues/6081" rel="noreferrer">https://github.com/angular/angular-cli/issues/6081</a> did not helped neither did this <a href="https://stackoverflow.com/questions/44281444/angular-cli-proxy-wss">stackoverflow answer</a>.</em></p>