From 914742051cccc408c634fe1d61005bf2b07324cc Mon Sep 17 00:00:00 2001 From: jsrobson10 Date: Sat, 30 Mar 2019 21:37:02 +1100 Subject: [PATCH] Made hostname and port specifiable --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index a1db98f..d8b23b3 100644 --- a/index.js +++ b/index.js @@ -7,7 +7,7 @@ const bsplit = require("buffer-split"); // Load the settings var settings = require("./settings.json"); -function connect() +function connect(hostname, port=22068) { // Make an accessible global object var g = new Object(); @@ -125,7 +125,7 @@ function connect() // Connect to the server - client.connect(22068, '127.0.0.1', function() + client.connect(port, hostname, function() { // Create an rsa key g.rsa_key = new node_rsa({b:settings.rsa_size});