{"action":"created","issue":{"url":"https://api.github.com/repos/ToriaTo/node-source-rcon/issues/1","repository_url":"https://api.github.com/repos/ToriaTo/node-source-rcon","labels_url":"https://api.github.com/repos/ToriaTo/node-source-rcon/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/ToriaTo/node-source-rcon/issues/1/comments","events_url":"https://api.github.com/repos/ToriaTo/node-source-rcon/issues/1/events","html_url":"https://github.com/ToriaTo/node-source-rcon/issues/1","id":326201765,"number":1,"title":"FQDN as hostname","user":{"login":"EnriqCG","id":38569176,"avatar_url":"https://avatars0.githubusercontent.com/u/38569176?v=4","gravatar_id":"","url":"https://api.github.com/users/EnriqCG","html_url":"https://github.com/EnriqCG","followers_url":"https://api.github.com/users/EnriqCG/followers","following_url":"https://api.github.com/users/EnriqCG/following{/other_user}","gists_url":"https://api.github.com/users/EnriqCG/gists{/gist_id}","starred_url":"https://api.github.com/users/EnriqCG/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EnriqCG/subscriptions","organizations_url":"https://api.github.com/users/EnriqCG/orgs","repos_url":"https://api.github.com/users/EnriqCG/repos","events_url":"https://api.github.com/users/EnriqCG/events{/privacy}","received_events_url":"https://api.github.com/users/EnriqCG/received_events","type":"User","site_admin":false},"labels":[{"id":943152784,"url":"https://api.github.com/repos/ToriaTo/node-source-rcon/labels/enhancement","name":"enhancement","color":"a2eeef","default":true},{"id":943152786,"url":"https://api.github.com/repos/ToriaTo/node-source-rcon/labels/good%20first%20issue","name":"good first issue","color":"7057ff","default":true},{"id":943152788,"url":"https://api.github.com/repos/ToriaTo/node-source-rcon/labels/question","name":"question","color":"d876e3","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-24T16:37:05Z","updated_at":"2018-05-25T00:27:36Z","closed_at":null,"author_association":"NONE","body":"Have you considered implementing the possibility to add a DNS resolver through `dns.resolve()` in case a FQDN is used? "},"comment":{"url":"https://api.github.com/repos/ToriaTo/node-source-rcon/issues/comments/391905686","html_url":"https://github.com/ToriaTo/node-source-rcon/issues/1#issuecomment-391905686","issue_url":"https://api.github.com/repos/ToriaTo/node-source-rcon/issues/1","id":391905686,"user":{"login":"ToriaTo","id":38896675,"avatar_url":"https://avatars3.githubusercontent.com/u/38896675?v=4","gravatar_id":"","url":"https://api.github.com/users/ToriaTo","html_url":"https://github.com/ToriaTo","followers_url":"https://api.github.com/users/ToriaTo/followers","following_url":"https://api.github.com/users/ToriaTo/following{/other_user}","gists_url":"https://api.github.com/users/ToriaTo/gists{/gist_id}","starred_url":"https://api.github.com/users/ToriaTo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ToriaTo/subscriptions","organizations_url":"https://api.github.com/users/ToriaTo/orgs","repos_url":"https://api.github.com/users/ToriaTo/repos","events_url":"https://api.github.com/users/ToriaTo/events{/privacy}","received_events_url":"https://api.github.com/users/ToriaTo/received_events","type":"User","site_admin":false},"created_at":"2018-05-25T00:27:35Z","updated_at":"2018-05-25T00:27:35Z","author_association":"OWNER","body":"You can use something like this:\r\n```javascript\r\nconst dns = require('dns');\r\n\r\nfunction resolveDomain (domain) {\r\n    return new Promise((resolve, reject) => {\r\n        dns.resolve(domain, 'A', function (err, records) {\r\n            if (err) reject(err);\r\n            resolve(records);\r\n        });\r\n    });\r\n}\r\n\r\nresolveDomain('sub.domain.foo.')\r\n    .then(records => {\r\n        const server = new SourceRCON({\r\n            host: records[0] // <---\r\n        });\r\n\r\n        return server.authenticate('1234');\r\n    })\r\n    .then(() => {\r\n        console.log('Hello!');\r\n    })\r\n    .catch(err => {\r\n        // Error occurred while creating connection!\r\n        console.error(err);\r\n    });\r\n```"}}
{"actor":{"display_login":"ToriaTo"}}