easy-rcon

1.0.3 • Public • Published

Easy RCON

A very simple & easy-to-use RCON client for TCP based RCON servers.

Installation

npm install easy-rcon
yarn install easy-rcon

Usage

Example NodeJS Script

import RCON from "easy-rcon"

try {
    const rcon = RCON()
    rcon.connect(
        "127.0.0.1",
        27015,
        "YOUR_RCON_PASSWORD"
    )

    const response = rcon.send("info")
    console.log(response)
    rcon.disconnect()
} catch (error) {
    console.error(error)
}

Connecting

Connect to a remote RCON server using:

rcon_client.connect(host, port, password)

Sending Command

Send a command to a remote RCON server using:

rcon_client.send(command)

Disconnecting

Disconnect from the remote RCON server using:

rcon_client.disconnect()

Limitations

  • Does not support multi-packet responses

Roadmap

  1. Implement support for multi-packet responses
  2. Add game specific libraries (e.g. CS, Palword etc)

Readme

Keywords

Package Sidebar

Install

npm i easy-rcon

Weekly Downloads

1

Version

1.0.3

License

MIT

Unpacked Size

36.7 kB

Total Files

7

Last publish

Collaborators

  • sharloff