This is something I was working on a while ago but never got around to releasing because it just needed That One Last Thing™.
Rather than leave it sitting around for the next forever while that doesn't happen, here it is!
This release consists of 2 extensions and a handful of partially-completed sample plugins.
Links can be found at the bottom of this post.
Conplex exposes an interface (both C++ and SourcePawn) to multiplex connections onto the game server's existing RCon socket.
Conplex is engine-independent but requires a small amount of easy-to-find gamedata.
Gamedata is currently provided for TF2, CS:S, and CS:GO.
Conplex includes a couple of protections against attacks to support exposing the RCon socket publicly:
- Connections that send data that is not matched to a registered protocol are closed and treated as a failed RCon auth (which can cause the sending IP to be banned).
This prevents a class of attacks that involve sending invalid data to the RCon socket.
- Connections that do not send enough data to match to a known protocol are closed after a short timeout.
This prevents a class of attacks that involves opening numerous connections and never closing them.
Webcon provides a HTTP server on the RCon port using Conplex.
Specifically, this allows the game server's regular connect address to be visited in a web browser.
Webcon is engine-independent and requires no gamedata, just Conplex.
A rich SourcePawn interface is exposed to allow plugins to handle requests and serve both dynamic and static content.
The include file
and test plugin
(and of course the samples below) should be perused for developer usage information.
The ultimate goal is web-based SourceMod configuration and management that can even be used by people hosting with a GSP.
A real-time web-based scoreboard. Screenshot.
Made for and styled after TF2, but should work for any game.
Browser support was not a concern, so probably only looks correct in Chrome.
A very incomplete sample showing Steam OpenID login and session persistence.
Ideally these functions would be in a reusable library plugin (along with other stuff like HTML escaping).
Sample for Conplex implementing a basic IRC server.
Please note that none of the sample plugins come compiled, as only the Scoreboard plugin is designed for actual use rather than just a code example.