title: MQTT.js with SSL could not connect
body: <p>I have correctly configured my Mosca Broker with an SSL certificate. I have verified that the server is running as the nmap command returns </p>
  
  <pre><code>8443 / tcp open https-alt
  </code></pre>
  
  <p>When I use the MQTT.js library with the following code, the browser returns the following error. Firefox can not establish a connection to the server in wss: //192.168.1.173: 8443 /.</p>
  
  <p>I also do not receive the error in the connection. I do not know how to debug the error.</p>
  
  <pre><code>var client;
  
  function loaded() {
    var options = {
      rejectUnauthorized: false
    }
    client  = mqtt.connect('wss://192.168.1.173:8443', options)
  
    client.on('connect', function () {
      client.subscribe('presence')
    })
  
    client.on('message', function (topic, message) {
      // message is Buffer
      console.log(message.toString())
      document.getElementById('lista').innerHTML = document.getElementById('lista').innerHTML + '&lt;li&gt;'+message.toString()+'&lt;/li&gt;'
    })
  
    client.on('error', function (e) {
      console.log(e);
    })
  }
  </code></pre>