MCPcopy Create free account
hub / github.com/Epic0522/Codex-Remote-Contact / runShadowrocketNodeCommand

Function runShadowrocketNodeCommand

src/server.js:3798–3808  ·  view source on GitHub ↗
(command, argument = "")

Source from the content-addressed store, hash-verified

3796}
3797
3798async function runShadowrocketNodeCommand(command, argument = "") {
3799 const args = [command];
3800 if (argument) args.push(argument);
3801 const result = await runCommand(shadowrocketNodeControlPath, args, { timeout: command === "check" ? 15000 : 8000, allowFailure: true });
3802 const output = result.output.trim();
3803 return {
3804 ok: result.status === 0,
3805 summary: result.status === 0 ? `Shadowrocket node ${command}` : `Shadowrocket node ${command} failed`,
3806 reply: trimIMessageCommandOutput(output || `节点命令没有输出:${command}`)
3807 };
3808}
3809
3810async function prepareShadowrocketNodeSwitch(target) {
3811 const resolved = await runCommand(shadowrocketNodeControlPath, ["resolve", target], { timeout: 8000, allowFailure: true });

Callers 1

executeIMessageCommandFunction · 0.85

Calls 2

runCommandFunction · 0.85

Tested by

no test coverage detected