Repository navigation
feat(rust): adopt the websocket RCON protocol - #28
Merged
Merged
Conversation
Gameplane's agent now speaks Facepunch's WebRcon, so Rust no longer has to sit on consoleMode: pty with no RCON at all. Switches to rcon.protocol: websocket on 28016 with the image's RUST_RCON_PASSWORD. The image already enables webrcon by default (RUST_RCON_WEB=1) and serves plain ws:// (RUST_RCON_SECURE_WEBSOCKET=0), which is what the agent dials. This lights up the console, moderation, and — via playerlist — a real players list. playerlist returns a JSON array rather than lines, which is fine: the agent applies players.list.entryRegex with FindAll across the whole reply, so a DisplayName regex pulls out every player. lifecycle.stop now runs over RCON instead of pty-stdin. Signed-off-by: valgulnecron <39313199+ValgulNecron@users.noreply.github.com>
The validator's protocol allowlist is what stops a module shipping a console that can never connect, so it correctly rejected 'websocket' until the agent actually implemented it. It does now (Facepunch WebRcon, ValgulNecron/Gameplane#141), so add it — and lift the list into a named constant rather than repeating it in the message, so the two can't drift. Signed-off-by: valgulnecron <39313199+ValgulNecron@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Gameplane's agent now implements Facepunch's WebRcon (ValgulNecron/Gameplane#141), so Rust no longer needs to sit on
consoleMode: ptywithprotocol: none.rcon.protocol: websocket, port 28016, password fromRUST_RCON_PASSWORD.didstopia/rust-serverimage already enables webrcon by default (RUST_RCON_WEB=1) and serves plainws://(RUST_RCON_SECURE_WEBSOCKET=0), which is exactly what the agent dials — no image change needed.playerlistreturns a JSON array rather than lines, but the agent appliesplayers.list.entryRegexwithFindAllover the whole reply, so aDisplayNameregex pulls out every player (verified against a sample reply, including names containing spaces).lifecycle.stop(server.save,quit) now runs over RCON instead of pty-stdin.Console, moderation, quiesce and quick actions all become available to Rust as a result.
🤖 Generated with Claude Code