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: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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
⌂ 换网址