mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-17 07:30:41 +09:00
Remove remoteCommands plugin and interface
Remove the half baked remote rcon command interface in preparation for a better version based on a new socket.io communication layer.
This commit is contained in:
1 parent
ca2967e255
commit
27fc68da0f
7 files changed
+2
-141
No files matched your search
@@ -1,13 +0,0 @@
|
||||
/*
|
||||
Config for clusterio remote command plugin.
|
||||
Allows you to execute commands on slaves with a web API.
|
||||
|
||||
Careful, may allow for RCE vulnerabilities.
|
||||
*/
|
||||
module.exports = {
|
||||
// Name of package. For display somewhere I guess.
|
||||
name: "remoteCommands",
|
||||
version: "1.0.0",
|
||||
binary: "nodePackage",
|
||||
description: "Config for clusterio remote command plugin. Allows you to execute commands on slaves with a web API.",
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
module.exports = class remoteCommands {
|
||||
constructor(mergedConfig, messageInterface, extras){
|
||||
this.messageInterface = messageInterface;
|
||||
this.config = mergedConfig;
|
||||
this.socket = extras.socket;
|
||||
|
||||
if(this.config.allowRemoteCommandExecution){
|
||||
this.socket.on("runCommand", data => {
|
||||
let {commandID} = data;
|
||||
this.messageInterface(data.command);
|
||||
if(commandID){
|
||||
this.socket.emit("runCommandReturnValue", {
|
||||
commandID,
|
||||
body: {
|
||||
info: "Command was sent to factorio",
|
||||
},
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
scriptOutput(data){
|
||||
// we don't return anything yet
|
||||
}
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
// These are libraries that does not have any units test, they are
|
||||
// required here in order to track coverage for them.
|
||||
|
||||
require('../index');
|
||||
Reference in new issue
Block a user