Connecting to a Rust Server's RCON using a C# program

I would like to connect to a Rust Server’s RCON Console using my C# Program. How would I be able to log in there so I m able to send RCON commands from that program?
Thanks.
LaserHydra

You could use something like Rusty or RustAdmin… or contact the developers of those in regards to how to do it

Well assuming you know what your doing (highly doubt it as your here asking) you need to connect to the server rcon port using the rcon password. If you have these variables you should be set.

Thats not my problem. What I would like to do is integrating a connection to RCON in my own C# program.

[editline]3rd August 2015[/editline]

Well, I know what I need to connect to it: Port; IP; Rcon Password - what I need to know is how I can actually use those to connect to the RCON Server. What References do I need? And how do I call it. Please only reply if you know stuff about coding lol

The RCON protocol bases of the source rcon protocol due to this the documentation here: https://developer.valvesoftware.com/wiki/Source_RCON_Protocol

Is relevant to rust. You should find everything you need to make an connection, send and receive information on there :slight_smile:

RCON works by sending packets in a specific format to the server’s query port.

Afaik most available C# RCON libraries or open source applications are outdated / non working, you could search for available open source code on Github or something and learn from that. If that fails the wiki link above about basically explains how the protocol works; If you can understand that then you can come up with your own library for building/dismantling the packets.

I haven’t worked with RCON and Rust specifically, but I believe there are some minor differences compared to source games, so you’ll either need to research info on that or get a basic application up and running and play around querying the server to see what responses you get back.

If you do happen to be a novice programmer, I wouldn’t bet on this being an easy task due to it being hard to find a lot of up to date existing code for it, and as such it probably won’t be as simple as dragging and dropping some code/classes and making a few calls here and there. It’s a neat learning experience though, I did it for Battlefield Bad Company II a while back.

EDIT

Just noticed at the bottom of the wiki page there are a few links to existing libraries; they will probably be a good start.

Thanks to both of you guys.

I rolled my own RCON libs for ObjC, C#, and JS, on account of the others being garbage. I’d recommend you spend some time doing it yourself to ensure your project is stable.

Still need that Laser? Throw me a PM on Oxide (@xsinx) I’ll send you a C# RCON client I made for Legacy a while back and you can work from there.