AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Extensions (https://forums.alliedmods.net/forumdisplay.php?f=134)
-   -   Connect - A safer OnClientPreConnect forward (https://forums.alliedmods.net/showthread.php?t=162489)

asherkin 07-19-2011 14:26

Connect - A safer OnClientPreConnect forward
 
See this post for the latest version that fixes compatibility with the 2017-10-20 TF2 update.

----------------------------------------------------

This extension provides a OnClientPreConnect forward (similar to CBaseServer's), but does proper checking to prevent malicious people spoofing SteamIDs.

If you are currently using CBaseServer for reserved slots, it's possible for a client to spoof an admin's SteamID and cause someone to be kicked from the server (although they would be later denied, so they couldn't actually join the game).
This extension does these checks before OnClientPreConnect is fired, so this isn't possible.

There are some additional features such as being able to change the password provided before it's checked (see included example plugin) and the ability to reject the client with a reason (like SourceMod's later OnClientConnect forward).

Only the Source 2009 engine is supported, as it's the only one that's been updated to use the new authentication system.

Recommended build (see Snapshots link below for downloads): 1.2.0-hg38

Source Code | Build Status | Snapshots

zeroibis 07-19-2011 14:42

Re: Connect - A safer OnClientPreConnect forward
 
So this will basically allow for a secured way to do reserved slots?

One question though, when using something like this for reserved slots can or does it work like this:

currently: 20/21 (slot 21 is the reserved) So there can be 1 user connecting at a time if that user times out or if other reserved slot users want to connect at the same time they can not.

New: 20/20 (infinite reserved slots?) 1 2 3 or more users can connect at the same time but only those with a reserved slot will be allowed in.

Basically I just want to know if this avoids the issue of having slots get "clogged" where as only X number of users can try to connect at once. This is an issue I run into a lot on my zombie server where I have 3 reserved slots just to try to increase the number of connections that can be authenticated at once when the server is full at 40/43

asherkin 07-19-2011 15:07

Re: Connect - A safer OnClientPreConnect forward
 
The logistics are the same as with CBaseServer, if someone with a reserve slot connects while the server is full (using the connect console command), someone who doesn't have a reserve slot is kicked. No "holding" slots are needed, and many people can try to connect at once.

There aren't any reserved slot plugins using this extension yet, but it would be trivial to take one designed for CBaseServer, change the include and function prototype and recompile it.

Powerlord 07-19-2011 15:17

Re: Connect - A safer OnClientPreConnect forward
 
If the plugin doesn't set a rejectReason, does a default reason get used?

asherkin 07-19-2011 15:19

Re: Connect - A safer OnClientPreConnect forward
 
Not at the moment, would you prefer it to?

GoD-Tony 07-19-2011 17:36

Re: Connect - A safer OnClientPreConnect forward
 
Nice work asherkin! Is this more likely to break on updates compared to CBaseServer, or about the same?

Edit: Neat idea with the password thing.

asherkin 07-19-2011 17:44

Re: Connect - A safer OnClientPreConnect forward
 
Quote:

Originally Posted by GoD-Tony (Post 1514143)
Is this more likely to break on updates compared to CBaseServer, or about the same?

It uses a lot more gamedata, but it should be about the same chance of breakage.
If it does becomes an issue of needing often update, it's always possible to add the gamedata files to SourceMod's auto-updater.

adrianman 07-21-2011 16:18

Re: Connect - A safer OnClientPreConnect forward
 
what kind of source engine does l4d or l4d2 use,and yes it's a question of compatibility at the same time :D

asherkin 07-21-2011 17:14

Re: Connect - A safer OnClientPreConnect forward
 
Quote:

Originally Posted by adrianman (Post 1515551)
what kind of source engine does l4d or l4d2 use,and yes it's a question of compatibility at the same time :D

L4D uses the L4D version, L4D2 uses the L4D2 version.
They will not be supported as they use the old authentication system.
Should Valve ever update anything other than Source 2009 to the new auth system, I'll consider adding support for other engine versions.

asherkin 08-15-2011 21:52

Re: Connect - A safer OnClientPreConnect forward
 
You'll need new gamedata on Windows for today's update: http://hg.limetech.org/projects/conn...nect.games.txt


All times are GMT -4. The time now is 16:31.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.