not a plugin submission, just another example on how to work with EzHTTP
Made this a long time ago due a group of cheaters that would terrorize public servers. This system helped hold them a little bit for some more time and definitely was useful.
Basically, it uses the same API as DJEarthQuake's Proxy Snort uses. It gets the user IP and checks whether it results in Proxy or not. Check Proxy Check official site to learn more about the API Key.
When a player joins, the plugin will use EasyHTTP to make a HTTP request on the site and get the status of the user's IP as JSON:
Code: Select all
{
"status": "ok",
"131.87.133.121": {
"asn": "AS721",
"range": "131.87.133.0/18",
"provider": "DoD Network Information Center",
"organisation": "DoD Network Information Center",
"continent": "North America",
"continentcode": "NA",
"country": "United States",
"isocode": "US",
"region": "Ohio",
"regioncode": "OH",
"timezone": "America/New_York",
"city": "Whitehall",
"postcode": "43218",
"latitude": 39.9747,
"longitude": -82.8947,
"proxy": "no",
"type": "Business",
"risk": 0
}
} In case of the connection is permitted, the user's AS (asn in the json) gets registered inside the array for the user to choose what they want to do with it (In this example it is used as a more complex Ban System whereas it bans the AS instead of SteamID or IP which can be easily changed nowdays).
Keep in mind that it is not 100% safe, mfs still find a way to change their AS somehow, lets see who gets tired first
You MUST use EzHTTP for it to run properly. As I mentioned in some previous posts, it makes the life easier.
There is a simple API with two natives
Code: Select all
/* Native that get user's AS */
native proxy_get_user_as(iPlayer, szUserAS[], iLen)
/* Finds user's AS by IP */
native proxy_get_as_byip(szIP[], szUserAS[], iLen) amx_ban_as - Ban AS
amx_unban_as - Unban AS
amx_as_menu - Opens players's AS menu (press to ban)
