AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Metamod:Source Plugins (https://forums.alliedmods.net/forumdisplay.php?f=76)
-   -   Metamod Query Cache (https://forums.alliedmods.net/showthread.php?t=135543)

r3v 12-24-2020 11:27

Re: Metamod Query Cache
 
Can someone share this for Debian 10?

Cats869 02-07-2021 13:15

Re: Metamod Query Cache
 
Curious if anyone was able to get this working for Windows CSGO servers. The IP rate limiting issue is still very much a problem in 2021. :(

root88 03-07-2021 04:35

Re: Metamod Query Cache
 
It was fixed in CSS and CSGO few years ago, so you shouldn't need this:
Code:

] find queries
"sv_max_queries_sec" = "3.0"
 - Maximum queries per second to respond to from a single IP address.
"sv_max_queries_window" = "30"
 - Window over which to average queries per second averages.
"sv_max_queries_sec_global" = "3000"
 - Maximum queries per second to respond to from anywhere.
"sv_enableoldqueries" = "0"
 - Enable support for old style (HL1) server queries

In CSGO probably you can change this with sm_cvar

martijnk 04-01-2021 01:50

Re: Metamod Query Cache
 
This works in Debian 9 but crashes the server on Debian 10 and Ubuntu 20.04.

Can someone provide a fix?

LaRoVV66 04-04-2021 04:12

Re: Metamod Query Cache
 
Quote:

Originally Posted by martijnk (Post 2742598)
This works in Debian 9 but crashes the server on Debian 10 and Ubuntu 20.04.

Can someone provide a fix?

You can only solve your problem with the plugin external python or iptables rules.

JLmelenchon 07-01-2023 13:36

Re: Metamod Query Cache
 
Quote:

Originally Posted by energie4cute (Post 2159684)
I've rewrote the extension ( cleaned up the code mostly ). The main thing I added was a RequestMap.
Now each time a A2S_INFO request is received, the IP it's added into a map. If the client sends more than qc_maxrequests per second he no longer receives the A2S_INFO responses in that second ( can be changed to a more severe behaviour if needed ). This could be done even better by peaking at the data just to check the IP and save some time that is used while the buffer is moved, but I have yet to search for some more info about the Valve networking code ( noob here ).

The only builds I made were CSGO,CSS,L4D,L4D2,TF2,SDK2013.

If anyone wants to build it : link

CVars :
- qc_time - A2S_INFO requests timeout in seconds.
- qc_maxrequests - Maximum ammount of A2S_INFO requests per second. ( RequestMap must be enabled for this to work )
- qc_requestmap_enabled - Enable/disable the RequestMap. Will rehook recvfrom ( I wanted to keep it optimized and this is better than checking if the RequestMap is enabled each time recvfrom is called )

Commands :
- qc_requestmap - Prints the RequestMap.
- qc_requestmap_clear - Clears the RequestMap. ( auto @ plugin_un/load / map_load )

How to install :
Edit : Reuploaded new version. Should load now on Linux
Edit2 : Uploaded version 1.0.0.1. ( Added qc_requestmap_enabled and remade qc_requestmap a bit, now it shows the traffic done : total requests in that second and the total overlimits for all-time ). Also did some tests and it seemed pretty ok for low amounts of traffic ( 30 A2S_INFO requests per second ).
Edit3 : Recompiled.
Edit4 : Added SDK2013 version.

segmentation fault, contantly restart the server.


All times are GMT -4. The time now is 05:57.

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