{"action":"created","issue":{"url":"https://api.github.com/repos/mqttjs/MQTT.js/issues/437","repository_url":"https://api.github.com/repos/mqttjs/MQTT.js","labels_url":"https://api.github.com/repos/mqttjs/MQTT.js/issues/437/labels{/name}","comments_url":"https://api.github.com/repos/mqttjs/MQTT.js/issues/437/comments","events_url":"https://api.github.com/repos/mqttjs/MQTT.js/issues/437/events","html_url":"https://github.com/mqttjs/MQTT.js/issues/437","id":166537393,"number":437,"title":"About MQTT over SSL connections","user":{"login":"anhldbk","id":3270746,"avatar_url":"https://avatars.githubusercontent.com/u/3270746?v=3","gravatar_id":"","url":"https://api.github.com/users/anhldbk","html_url":"https://github.com/anhldbk","followers_url":"https://api.github.com/users/anhldbk/followers","following_url":"https://api.github.com/users/anhldbk/following{/other_user}","gists_url":"https://api.github.com/users/anhldbk/gists{/gist_id}","starred_url":"https://api.github.com/users/anhldbk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anhldbk/subscriptions","organizations_url":"https://api.github.com/users/anhldbk/orgs","repos_url":"https://api.github.com/users/anhldbk/repos","events_url":"https://api.github.com/users/anhldbk/events{/privacy}","received_events_url":"https://api.github.com/users/anhldbk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-07-20T09:25:26Z","updated_at":"2016-07-20T10:06:55Z","closed_at":null,"body":"I've got an MQTTs server with self-signed certificate. My below code doesn't work at all.\r\n\r\n```js\r\nvar mqtt    = require('mqtt');\r\n\r\nvar options = {\r\n  username: 'ping',\r\n  password: '123456',\r\n  host: '127.0.0.1',\r\n  port: 8883,\r\n  rejectUnauthorized: false\r\n}\r\nvar client  = mqtt.connect(options);\r\nclient.on('connect', function () {\r\n  console.log('Connected')\r\n  client.subscribe(':event/status') // <- using # will cause the problem below\r\n});\r\n\r\nclient.on('offline', function () {\r\n  console.log('Offline')\r\n});\r\n\r\n```\r\n\r\nWould you please tell me: How can I connect to an  MQTT server supporting `MQTT over SSL`? "},"comment":{"url":"https://api.github.com/repos/mqttjs/MQTT.js/issues/comments/233907785","html_url":"https://github.com/mqttjs/MQTT.js/issues/437#issuecomment-233907785","issue_url":"https://api.github.com/repos/mqttjs/MQTT.js/issues/437","id":233907785,"user":{"login":"mcollina","id":52195,"avatar_url":"https://avatars.githubusercontent.com/u/52195?v=3","gravatar_id":"","url":"https://api.github.com/users/mcollina","html_url":"https://github.com/mcollina","followers_url":"https://api.github.com/users/mcollina/followers","following_url":"https://api.github.com/users/mcollina/following{/other_user}","gists_url":"https://api.github.com/users/mcollina/gists{/gist_id}","starred_url":"https://api.github.com/users/mcollina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcollina/subscriptions","organizations_url":"https://api.github.com/users/mcollina/orgs","repos_url":"https://api.github.com/users/mcollina/repos","events_url":"https://api.github.com/users/mcollina/events{/privacy}","received_events_url":"https://api.github.com/users/mcollina/received_events","type":"User","site_admin":false},"created_at":"2016-07-20T10:06:55Z","updated_at":"2016-07-20T10:06:55Z","body":"You need to specify a protocol, in your case `'mqtts'`.\r\n\r\nFeel free to send a PR to the README to explain this a bit more :P."}}
{"actor":{"display_login":"mcollina"}}