title: How to tunnel browser-side mqtt through the server?
body: <p>Browser uses this to connect to a mosquitto (websockets mode):</p>
  
  <pre><code>new Paho.MQTT.Client('localhost', 9001, '');
  </code></pre>
  
  <p>As I understand, it's a direct connection from the browser to the broker. It won't work in the normal setup when the browser is on a different machine.</p>
  
  <p>In normal setup nodejs and the broker are on the same machine. How to route that via nodejs, so nodejs could forward the connections to the <code>localhost:9001</code>? And I don't want to write a lot of code for repacking messages and reimplementing different subscription API.</p>