mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-11 23:04:52 +09:00
Compare commits
11
Commits
plugin-minimap
...
1.2.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a9cc743106 | ||
|
|
2a7758f60d | ||
|
|
7e2ca58a59 | ||
|
|
718d4ed659 | ||
|
|
6b090cddbe | ||
|
|
56c023f643 | ||
|
|
78de7236c5 | ||
|
|
97c7a69c7a | ||
|
|
0c45e57732 | ||
|
|
88eff17dfd | ||
|
|
e1374d501e |
No files matched your search
@@ -0,0 +1,18 @@
|
|||||||
|
Changelog
|
||||||
|
=========
|
||||||
|
|
||||||
|
Version 1.2.1
|
||||||
|
-------------
|
||||||
|
|
||||||
|
- Updated node-factorio-api to v0.3.8 to fix mod downloads randomly breaking
|
||||||
|
([#229][#229].)
|
||||||
|
- Fixed SIGINT being sent twice to Factorio server when interrupted by CTRL+C
|
||||||
|
on Linux ([#217][#217].)
|
||||||
|
- Fixed package.json incorrectly reporting the license as ISC.
|
||||||
|
|
||||||
|
[#217]: https://github.com/clusterio/factorioClusterio/issues/217
|
||||||
|
[#229]: https://github.com/clusterio/factorioClusterio/issues/229
|
||||||
|
|
||||||
|
### Breaking Changes
|
||||||
|
|
||||||
|
- Added authentication to the socket.io server running on the master.
|
||||||
@@ -4,6 +4,14 @@
|
|||||||
<br/>
|
<br/>
|
||||||
<br/>
|
<br/>
|
||||||
|
|
||||||
|
# Warning
|
||||||
|
|
||||||
|
Do not use master branch to run your Clusterio - master now is a development version and may not work
|
||||||
|
|
||||||
|
Use latest stable release: https://github.com/clusterio/factorioClusterio/releases/latest
|
||||||
|
|
||||||
|
Or clone latest stable branch that has name format `x.y.z`
|
||||||
|
|
||||||
# factorioClusterio
|
# factorioClusterio
|
||||||
|
|
||||||
Discord for development/support/play: https://discord.gg/5XuDkje
|
Discord for development/support/play: https://discord.gg/5XuDkje
|
||||||
@@ -91,7 +99,7 @@ Master and all slaves:
|
|||||||
sudo curl -sL https://deb.nodesource.com/setup_9.x | sudo -E bash -
|
sudo curl -sL https://deb.nodesource.com/setup_9.x | sudo -E bash -
|
||||||
sudo apt install -y nodejs python-dev git wget curl tar build-essential
|
sudo apt install -y nodejs python-dev git wget curl tar build-essential
|
||||||
sudo npm install pm2 -g
|
sudo npm install pm2 -g
|
||||||
git clone https://github.com/Danielv123/factorioClusterio.git
|
git clone -b 1.2.x https://github.com/Danielv123/factorioClusterio.git
|
||||||
cd factorioClusterio
|
cd factorioClusterio
|
||||||
curl -o factorio.tar.gz -L https://www.factorio.com/get-download/latest/headless/linux64
|
curl -o factorio.tar.gz -L https://www.factorio.com/get-download/latest/headless/linux64
|
||||||
tar -xf factorio.tar.gz
|
tar -xf factorio.tar.gz
|
||||||
|
|||||||
@@ -359,7 +359,8 @@ write-data=${ path.resolve(config.instanceDirectory, instance) }\r\n
|
|||||||
'--rcon-port', Number(process.env.RCONPORT) || instconf.clientPort,
|
'--rcon-port', Number(process.env.RCONPORT) || instconf.clientPort,
|
||||||
'--rcon-password', instconf.clientPassword,
|
'--rcon-password', instconf.clientPassword,
|
||||||
], {
|
], {
|
||||||
'stdio': ['pipe', 'pipe', 'pipe']
|
'stdio': ['pipe', 'pipe', 'pipe'],
|
||||||
|
'detached': process.platform === "linux",
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
factorio.stdout.on("data", data => {
|
factorio.stdout.on("data", data => {
|
||||||
@@ -471,7 +472,8 @@ write-data=${ path.resolve(config.instanceDirectory, instance) }\r\n
|
|||||||
'--server-settings', instancedirectory + '/server-settings.json',
|
'--server-settings', instancedirectory + '/server-settings.json',
|
||||||
'--port', args.port || Number(process.env.FACTORIOPORT) || instanceconfig.factorioPort
|
'--port', args.port || Number(process.env.FACTORIOPORT) || instanceconfig.factorioPort
|
||||||
], {
|
], {
|
||||||
'stdio': ['pipe', 'pipe', 'pipe']
|
'stdio': ['pipe', 'pipe', 'pipe'],
|
||||||
|
'detached': process.platform === "linux",
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -570,7 +572,10 @@ async function instanceManagement(instanceconfig) {
|
|||||||
console.log("Started instanceManagement();");
|
console.log("Started instanceManagement();");
|
||||||
|
|
||||||
/* Open websocket connection to master */
|
/* Open websocket connection to master */
|
||||||
var socket = ioClient("http://"+config.masterIP+":"+config.masterPort);
|
var socket = ioClient("http://"+config.masterIP+":"+config.masterPort+"?token="+config.masterAuthToken);
|
||||||
|
socket.on("error", err => {
|
||||||
|
console.log("SOCKET | Error: ", err);
|
||||||
|
});
|
||||||
socket.on("hello", data => {
|
socket.on("hello", data => {
|
||||||
console.log("SOCKET | registering slave!");
|
console.log("SOCKET | registering slave!");
|
||||||
socket.emit("registerSlave", {
|
socket.emit("registerSlave", {
|
||||||
|
|||||||
@@ -921,6 +921,18 @@ class wsSlave {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
io.use((socket, next) => {
|
||||||
|
let token = socket.handshake.query.token;
|
||||||
|
authenticate.check(token).then((result) => {
|
||||||
|
if (result.ok) {
|
||||||
|
next();
|
||||||
|
} else {
|
||||||
|
console.error(`SOCKET | authentication failed for ${socket.handshake.address}`);
|
||||||
|
next(new Error(result.msg));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
io.on('connection', function (socket) {
|
io.on('connection', function (socket) {
|
||||||
// cleanup dead sockets from disconnected people
|
// cleanup dead sockets from disconnected people
|
||||||
let terminatedConnections = 0;
|
let terminatedConnections = 0;
|
||||||
|
|||||||
+3
-3
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "clusterio",
|
"name": "clusterio",
|
||||||
"version": "1.7.0",
|
"version": "1.2.1",
|
||||||
"description": "Interserver communication for factorio",
|
"description": "Interserver communication for factorio",
|
||||||
"repository": "https://github.com/Danielv123/factorioClusterio",
|
"repository": "https://github.com/Danielv123/factorioClusterio",
|
||||||
"main": "master.js",
|
"main": "master.js",
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
"factorio"
|
"factorio"
|
||||||
],
|
],
|
||||||
"author": "Danielv123",
|
"author": "Danielv123",
|
||||||
"license": "ISC",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"as-table": "^1.0.31",
|
"as-table": "^1.0.31",
|
||||||
"averaged-timeseries": "^1.4.0",
|
"averaged-timeseries": "^1.4.0",
|
||||||
@@ -46,7 +46,7 @@
|
|||||||
"moment": "^2.22.2",
|
"moment": "^2.22.2",
|
||||||
"ncp": "^2.0.0",
|
"ncp": "^2.0.0",
|
||||||
"needle": "^2.2.4",
|
"needle": "^2.2.4",
|
||||||
"node-factorio-api": "^0.3.5",
|
"node-factorio-api": "^0.3.8",
|
||||||
"node-forge": "^0.7.1",
|
"node-forge": "^0.7.1",
|
||||||
"prom-client": "^10.2.3",
|
"prom-client": "^10.2.3",
|
||||||
"rcon-client-fork": "^3.2.0",
|
"rcon-client-fork": "^3.2.0",
|
||||||
|
|||||||
Reference in new issue
Block a user