rconwebapi

command module
v0.0.0-...-4a3d4b7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 19, 2020 License: GPL-3.0 Imports: 11 Imported by: 0

README

rconwebapi

Simple HTTP/REST JSON bridge for CS:GOs RCON protocol.

Usage

Releases can be found here.

Run the server binary:

./rconwebapi -host 127.0.0.1:8099

API

POST

POST to /rcon with the following Body:

{
  "RconRequest": {
    "Address": "myserver.com:port",
    "Password": "secret_password",
    "Command": "status"
  }
}

Get a response with the folowing Body:

{
    "RconResponse": {
        "Output":"hostname: ...\nversion : 1.37.5.2/13752....\n"
    }
}

Websocket

Open a websocket on /rcon_ws and send the following text messages:

Connect

Request

{
    "RequestType": "connect",
    "Request": {
        "Address": "myserver.com:port",
        "Password": "secret_password"
    }
}

Response

{
    "ResponseType": "connect",
    "Response": {
        "Status": "success/fail",
        "Message": "maybe something"
    }
}
Command

Request

{
    "RequestType": "command",
    "Request": {
        "Command": "status"
    }
}

Response

{
    "ResponseType": "command",
    "Response": {
        "Output": "something"
    }
}

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
api
v1

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL