mirror of
https://github.com/PrismarineJS/node-minecraft-protocol.git
synced 2024-11-14 19:04:59 -05:00
fix http proxy
This commit is contained in:
parent
e9ced90a50
commit
cab5a329bf
2 changed files with 2 additions and 0 deletions
|
@ -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({
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue