Well I skimmed through Zak's XZ edit or whatever, and I noticed a small patch used to stop unwanted connections and traffic against the server, so I thought for the users who didn't notice it, I'll just release it as a separate snippet.
Go to Source > Socket Servers > Game Socket Server
Then add this snippet anywhere you wish.
It's not making it impossible to be ddosed, but it works better than nothing. :)Code:#region Anti-ddos // Prevents DDOS Attacks against the server. internal static bool ConnectionAllowed(string IP, int ID) { if (SecurityManagement.ConnectionBanned(IP)) return false; int conncout = mConnectionCounter.Count(a => (a == IP)); if (conncout >= 10 || ID > mMaxConnections) //Reached connection limit { SecurityManagement.BanAddress(IP); return false; } mConnectionCounter[ID] = IP; Out.WriteLine("Anti-Ddos Protection: On!"); return true; } #endregion
Credits to Martin for making
Credits to me for releasing
Press the "Like" button if you liked this release.





