RCON <-> HTTP Proxy

Hey folks,

Software dev with an education in networking fairly close to the start of my career. I ended up mostly working in the web sphere of things (so a lot of WebDev, with AWS infrastructure things thrown in).

Always looking towards putting some of that networking and systems admin sort of knowledge to work.

Project background

Lightweight tool that will run alongside game servers that support administration via RCON and proxy messages back and forth into HTTP.

The impetus for this was when I attempted to deploy Factorio on an some AWS ECS nodes, I really wanted to access the API, get useful health checks and so on but the tooling in that space is all geared towards HTTP based applications.

Generally a lot of games with server administration features have an RCON interface, much less posses an HTTP interface with the same capabilities.

===

Certainly not a new Idea, a couple of projects I’m aware of

Tech Stack

I had a bit of a start on this earlier in the year, with the plan being to write the tool in C++ , not that happy with the C++ ecosystem especially with things like dependency management. So for Devember this is a from scratch implementation of this idea in Rust.

Rust biggest draw for me is the the fact it has a decently well thought out dependency management out of the box, hopefully not a bad language to pick up as far as a “systems” language goes, C++ is definitely still on my list of things to understand better over time.

Plan
My plan is to get the basic shell of the program, up first, the relevant pieces would be:

  • RCON serializer / deserializer (luckily there are many examples of this in various languages to look at)
  • HTTP server to handle incoming messages (need to investigate the Rust ecosystem here, ideally with the intent of picking up one which has support for web socket traffic as well).
  • Attempt marshaling data back and forth from HTTP <-> RCON

I’m going to stay away from over complicating the web app portion of this with auth (this would ideally be an internal tool always used via a another web app or a proxy which handles the auth).

However I will probably need to handle having a concept of an RCON session in order to handle routing response back properly to the intended user.

1 Like

I made a simple rcon implementation here and found this pretty useful. One note would be that although some specs say ascii, a lot of game servers seem to use utf-8 so worth considering for your serializer.

1 Like