Skip to content

lsjoeberg/rcon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

RCON

A synchronous Source RCON library for Rust. This is a personal learning project; primarily tested for Minecraft.

Usage

The crate can be used a library in other Rust applications, or as a CLI.

Library

fn main() -> Result<(), rcon::Error> {
    let mut conn = rcon::Connection::connect("localhost:25575", "password")?;
    let response = conn.exec("list")?;
    println!("{response}");
    Ok(())
}

CLI

The cli feature flag installs a binary rcon, which can dispatch one-off commands or start an interactive RCON terminal.

cargo install -F cli --git https://github.com/lsjoeberg/rcon

Usage

Usage: rcon [OPTIONS] -p <PASSWORD> [-- <COMMANDS>...]

Arguments:
  [COMMANDS]...

Options:
  -H <HOST>          Server address [env: RCON_HOST=] [default: localhost]
  -P <PORT>          Server port [env: RCON_PORT=] [default: 25575]
  -p <PASSWORD>      RCON password [env: RCON_PASS=]
  -t                 Terminal mode
  -h, --help         Print help

About

Synchronous Rust RCON library and client

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages