fix http proxy

This commit is contained in:
Romain Beaumont 2017-07-19 16:41:07 +02:00
parent e9ced90a50
commit cab5a329bf
No known key found for this signature in database
GPG key ID: DB60E388B3BCF286
2 changed files with 2 additions and 0 deletions

View file

@ -15,6 +15,7 @@ const req = Http.request({
method: 'CONNECT',
path: process.argv[2] + ":" + parseInt(process.argv[3])
});
req.end();
req.on("connect", function(res, stream) {
const client = mc.createClient({

View file

@ -8,6 +8,7 @@ module.exports = function(client, options) {
options.connect = (client) => {
if (options.stream) {
client.setSocket(options.stream);
client.emit('connect');
} else if (options.port == 25565 && net.isIP(options.host) === 0) {
dns.resolveSrv("_minecraft._tcp." + options.host, function(err, addresses) {
if(addresses && addresses.length > 0) {