Package Exports
- rcon-node
Readme
rcon-client
A TypeScript RCON client library for modern game servers.
This library allows you to connect to game servers using the RCON protocol to execute commands.
⚠️ Note: This is a new library and is under active development. The API may change.
Features
- Modern: Uses modern TypeScript and ES modules.
- Multi-Game Support: Designed to support a variety of popular games.
- Extensible: Easily extendable to support new games and commands.
- Lightweight: No unnecessary dependencies.
Supported Games
- 7 Days to Die
- ARK: Survival Evolved
- DayZ
- Minecraft
- Palworld
- Arma Reforger
- Rust
- SCUM
- Valheim
Installation
npm install rcon-clientQuick Start
import { Rcon } from "rcon-client";
const rcon = new Rcon({
host: "localhost",
port: 25575,
password: "password",
});
rcon.on("connect", () => {
console.log("Connected to RCON server!");
});
rcon.on("authenticated", () => {
console.log("Authenticated!");
rcon.send("say Hello from rcon-client!");
});
rcon.on("response", (response) => {
console.log("Server response:", response);
});
rcon.on("error", (error) => {
console.error("RCON error:", error);
});
rcon.on("end", () => {
console.log("RCON connection closed.");
});
rcon.connect();Development
To get started with development:
- Clone the repository:
git clone https://github.com/hizenxyz/rcon-node.git - Install dependencies:
npm install
- Run the tests:
npm test
Contributing
Contributions are welcome! If you'd like to add support for a new game, fix a bug, or improve the library, please open an issue or submit a pull request.
Support
If you find this project helpful, consider supporting me on Ko-fi ☕
License
This project is licensed under the MIT License. See the LICENSE file for details.