Monthly Target: $400 Donations: $106
 26% 

Connect - A safer OnClientPreConnect forward


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 07-19-2011 , 15:26   Connect - A safer OnClientPreConnect forward
Reply With Quote #1

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
__________________

Last edited by asherkin; 05-09-2013 at 10:14.
asherkin is offline
zeroibis
Veteran Member
Join Date: Jun 2007
Old 07-19-2011 , 15:42   Re: Connect - A safer OnClientPreConnect forward
Reply With Quote #2

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
__________________
zeroibis is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 07-19-2011 , 16:07   Re: Connect - A safer OnClientPreConnect forward
Reply With Quote #3

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.
__________________
asherkin is offline
Powerlord
Oh Ross.
Join Date: Jun 2008
Location: Seduce Me!
Old 07-19-2011 , 16:17   Re: Connect - A safer OnClientPreConnect forward
Reply With Quote #4

If the plugin doesn't set a rejectReason, does a default reason get used?
__________________
So long and thanks for all the fish.
Powerlord is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 07-19-2011 , 16:19   Re: Connect - A safer OnClientPreConnect forward
Reply With Quote #5

Not at the moment, would you prefer it to?
__________________
asherkin is offline
GoD-Tony
Veteran Member
Join Date: Jul 2005
Old 07-19-2011 , 18:36   Re: Connect - A safer OnClientPreConnect forward
Reply With Quote #6

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.

Last edited by GoD-Tony; 07-20-2011 at 06:42. Reason: Logic fail.
GoD-Tony is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 07-19-2011 , 18:44   Re: Connect - A safer OnClientPreConnect forward
Reply With Quote #7

Quote:
Originally Posted by GoD-Tony View Post
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.
__________________
asherkin is offline
adrianman
Senior Member
Join Date: Sep 2010
Old 07-21-2011 , 17:18   Re: Connect - A safer OnClientPreConnect forward
Reply With Quote #8

what kind of source engine does l4d or l4d2 use,and yes it's a question of compatibility at the same time
adrianman is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 07-21-2011 , 18:14   Re: Connect - A safer OnClientPreConnect forward
Reply With Quote #9

Quote:
Originally Posted by adrianman View Post
what kind of source engine does l4d or l4d2 use,and yes it's a question of compatibility at the same time
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 is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 08-15-2011 , 22:52   Re: Connect - A safer OnClientPreConnect forward
Reply With Quote #10

You'll need new gamedata on Windows for today's update: http://hg.limetech.org/projects/conn...nect.games.txt
__________________
asherkin is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


Powered by vBulletin®
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Theme made by Freecode