-
Notifications
You must be signed in to change notification settings - Fork 125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RCON (Server & Client) #100
Conversation
Library is configured to compile as 'lite'.
* Full CNetAdr rewrite (protocol agnostic) * Full CSocketCreator class rebuild (based on Valve's implementation) * RCON implementation on server and client * Misc cleanup
Fixed several small bugs
Allows users to connect to their dedicated servers without having the game installed. Its also a base for example for anyone that wants to create their own RCON client.
I love this. Thank you Amos :D |
Thanks for all your hard work Amos! |
Inviting others to test/review since there's a lot of code to cover |
* Implemented robust length-prefix framing logic for non-blocking sockets (previously used character sequences to determine length, but you cannot use character sequences on protocol buffers as its binary data. This logic should fix all problems regarding some commands not getting networked properly to the server and stuff not getting printed on the client). * Increased buffer size to std::vector::max_size when netconsole is authenticated (MAX_NETCONSOLE_INPUT_LEN still remains enforced on accepted but not authenticated connections to prevent attackers from crashing the server). * Process max 1024 bytes each recv buffer iteration. * Additional optimizations and cleanup.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I ran into a couple of assertion failures when running a debug build of this:
What exactly happends on a wrong password try? The external rcon client that I used has a check for authentication Issues unsure if that one is wrong or if Northstar even sends a rcon auth error? |
@DxsSucuk If you try the included netcon.exe client, it works correctly:
So that's a bug in my RCON client, presumably the auth response strings that it was checking against have changed. I've tracked that in cpdt/northstar-rcon-client#1. |
Thanks for the response @cpdt! |
I noticed that the server does not log that someone connected over RCON? |
Addressed: * 'Expression: vector subscript out of range' (we only ever ensured capacity upon construction). * 'Run-Time Check Failure #2 - Stack around the variable 'buf' was corrupted.' (caused because of 'misuse' of sprintf_s, which was initially used to suppress microsoft compiler warnings, reverted to sprintf).
The solution compiles on all systems, but CI. The cause happens to be the "net.h" include in cl_rcon.cpp. Perhaps moving it up higher fixes the problem (hopefully).
Hopefully this fixes CI.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before someone pings me again on Discord about RCON, the reason it's not getting merged currently is due to being flat-out broken in the sense that it causes host timescale issues.
More info can be found in this comment I left a while back that GitHub "helpfully" hides due to the amount of comments left on this PR: #100 (review)
(Just retested on latest RCON commit and it still exists)
Obviously as long as only having RCON active (no RCON clients connected) already causes timescale issues making the game unplayable there's no point in merging until fixed.
The other issue is merge conflicts but those can always be resolved once we have a working RCON implementation. ^^
Pull request has been closed due to lack of interest. The amount of work required for merging the local fixes for the time scale issue into the new code base outweighs the interest for RCON. The contributors of Northstar had also requested me to move this into a plug-in instead; this is a big task which I unfortunately no longer have time for. |
Do note that interest for RCON support (or any protocol that allows for remotely interacting with server) is still very high. It wasn't tackled by core Northstar contributors at the time, due to higher priority tasks like codebase refactors and adding needed functionality to release new gamemodes, or lower hanging fruits that are easier to implement. There was also the assumption that this pull request was still being worked on to resolve the issues it had. You're of course free to share your unpushed local fixes so that we can hopefully resolve the timescale issues together and push this PR over the finish line. ^^
As for
Despite the discussion, I'm not sure there was ever a definitive conclusion whether to do plugin or merge directly. The main issue was lack of a working implementation that didn't cause clients to desync due to server timescale slowing down as soon as RCON is active. An actually working version would have probably guided the way of how to implement. |
This pull request contains:
Information regarding using RCON:
SERVER:
rcon_password
)rcon_password
empty.sv_rcon_sendlogs
to1
, or send aSERVERDATA_REQUEST_SEND_CONSOLE_LOG
messagehostport
ConVar used by the game for UDP sockets, both IPv4 and IPv6 (dual stack)sv_rcon_whitelist_address
, this will never get banned for failed attempts, or get 'cleaned' when max sockets (defined bysv_rcon_maxsockets
) gets reached.rcon_server.cfg
on launch. You can put your configs in here.CLIENT:
rcon
. This will try to establish a connection to address stored inrcon_address
ConVar.rcon PASS yourRCONpassword321
.rcon "your commands here"
.rcon_disconnect
.rcon_client.cfg
on launch. You can put your configs in here.NETCONSOLE:
CLIENT
, but in this case you do not need to use thercon
command prefix to send queries to RCON server.Additional information: