mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-23 00:13:13 +09:00
2 files changed
+12
-9
No files matched your search
@@ -364,12 +364,14 @@ write-data=${ path.resolve(config.instanceDirectory, instance) }\r\n
|
|||||||
data = data.toString("utf8").replace(/(\r\n\t|\n|\r\t)/gm,"");
|
data = data.toString("utf8").replace(/(\r\n\t|\n|\r\t)/gm,"");
|
||||||
console.log(data);
|
console.log(data);
|
||||||
if(data.includes("Starting RCON interface")){
|
if(data.includes("Starting RCON interface")){
|
||||||
let client = new Rcon();
|
let client = new Rcon({
|
||||||
|
packetResponseTimeout: 200000,
|
||||||
|
maxPending: 5
|
||||||
|
});
|
||||||
client.connect({
|
client.connect({
|
||||||
host: 'localhost',
|
host: 'localhost',
|
||||||
port: Number(process.env.RCONPORT) || instconf.clientPort,
|
port: Number(process.env.RCONPORT) || instconf.clientPort,
|
||||||
password: instconf.clientPassword,
|
password: instconf.clientPassword
|
||||||
timeout: 5000
|
|
||||||
});
|
});
|
||||||
client.onDidAuthenticate(() => {
|
client.onDidAuthenticate(() => {
|
||||||
console.log('Clusterio | RCON Authenticated!');
|
console.log('Clusterio | RCON Authenticated!');
|
||||||
@@ -493,8 +495,10 @@ write-data=${ path.resolve(config.instanceDirectory, instance) }\r\n
|
|||||||
// connect to the server with rcon
|
// connect to the server with rcon
|
||||||
if(true || process.platform != "linux"){
|
if(true || process.platform != "linux"){
|
||||||
// IP, port, password
|
// IP, port, password
|
||||||
client = new Rcon();
|
client = new Rcon({
|
||||||
|
packetResponseTimeout: 200000, // 200s, should allow for commands up to 1250kB in length
|
||||||
|
maxPending: 5
|
||||||
|
});
|
||||||
// check the logfile to see if the RCON interface is running as there is no way to continue without it
|
// check the logfile to see if the RCON interface is running as there is no way to continue without it
|
||||||
// we read the log every 2 seconds and stop looping when we start connecting to factorio
|
// we read the log every 2 seconds and stop looping when we start connecting to factorio
|
||||||
function checkRcon() {
|
function checkRcon() {
|
||||||
@@ -505,7 +509,6 @@ write-data=${ path.resolve(config.instanceDirectory, instance) }\r\n
|
|||||||
host: 'localhost',
|
host: 'localhost',
|
||||||
port: args["rcon-port"] || Number(process.env.RCONPORT) || instanceconfig.clientPort,
|
port: args["rcon-port"] || Number(process.env.RCONPORT) || instanceconfig.clientPort,
|
||||||
password: args["rcon-password"] || instanceconfig.clientPassword,
|
password: args["rcon-password"] || instanceconfig.clientPassword,
|
||||||
timeout: 5000
|
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
setTimeout(function(){
|
setTimeout(function(){
|
||||||
|
|||||||
+3
-3
@@ -56,20 +56,20 @@
|
|||||||
"node-factorio-api": "^0.3.1-alpha",
|
"node-factorio-api": "^0.3.1-alpha",
|
||||||
"node-forge": "^0.7.1",
|
"node-forge": "^0.7.1",
|
||||||
"prom-client": "^10.2.3",
|
"prom-client": "^10.2.3",
|
||||||
"rcon-client": "^3.0.2",
|
"rcon-client": "^3.1.6",
|
||||||
"request": "^2.83.0",
|
"request": "^2.83.0",
|
||||||
"right-pad": "^1.0.1",
|
"right-pad": "^1.0.1",
|
||||||
"rmdir-sync": "^1.0.1",
|
"rmdir-sync": "^1.0.1",
|
||||||
"sanitizer": "^0.1.3",
|
"sanitizer": "^0.1.3",
|
||||||
"simple-git": "^1.96.0",
|
"simple-git": "^1.96.0",
|
||||||
"single-line-log": "^1.1.2",
|
"single-line-log": "^1.1.2",
|
||||||
|
"snyk": "^1.134.2",
|
||||||
"socket.io": "^2.0.4",
|
"socket.io": "^2.0.4",
|
||||||
"socket.io-client": "^2.0.4",
|
"socket.io-client": "^2.0.4",
|
||||||
"socket.io-prometheus": "^0.2.1",
|
"socket.io-prometheus": "^0.2.1",
|
||||||
"sync-request": "^4.0.1",
|
"sync-request": "^4.0.1",
|
||||||
"typescript-collections": "^1.3.2",
|
"typescript-collections": "^1.3.2",
|
||||||
"underscore": "^1.8.3",
|
"underscore": "^1.8.3"
|
||||||
"snyk": "^1.134.2"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"documentation": "^5.4.0",
|
"documentation": "^5.4.0",
|
||||||
|
|||||||
Reference in new issue
Block a user