Well I made that name up on the spot. The boring name is sv_downloadurl_protection.
I have been trying to come up with a way to effectively prevent the possibility of other servers from using your sv_downloadurl themselves and letting users leech off your precious bandwidth.
The problem is Valve are pathetically lazy, and Steam does not pass the Referer along the line when it makes requests to your web server from HLDS. This means you can't really differentiate between Mr. EvilLeechers server and your own.
As a side note, they implemented the referer system in SRCDS, I believe the Referer is in the format of hl2://<IP of server>.
This plugin aims to solve the leeching problem with the combination of a .htaccess, a .php proxy, and a AMXX script.
Let's say your sv_downloadurl root is "http://www.testsite.com/naturalselection/". The .htaccess file provided will deny access to anything in this folder and any subfolders, with the exception of the PHP file also provided; file.php.
The file.php will check a IP address "whitelist" database table. If a user has been added to the whitelist, the PHP script will deliver the file (uses readfile(), shouldn't be a big memory hog, if anyone knows an even better way, let me know), otherwise it will 404 (basically telling a potential leech to sod-off).
There is also a Expiry system setup, if a user doesn't connect to the HTTP download server within 10 seconds, or there is more than a 10 second delay between file requests (shouldn't happen unless internet drops), then they are removed from the whitelist.
The AMXX script will watch for client connects, and when a client goes off to download files, their IP address will be added to the IP whitelist database table.
So in a nutshell, with this system it is 100% impossible for another server to directly leech your sv_downloadurl (unless they compromised your MySQL database). Also, with the fairly strict Expiry system set in place, it is very difficult for users to directly leech from you. The way they would attempt to achieve this is begin connecting to your server, disconnect quickly, then connect to another server which is using your HTTP server unlawfully. The chances of this happening are pretty slim anyway.
Let me know what you think. I'm pretty new to AMXX scripting, I think I did a crappy addon ages ago, but only just back into it yesterday, so if there's any nubbish mistakes in the code, be nice
INSTALLATION:
You need to have MySQL setup correctly, meaning valid login information in sql.cfg, and the mysql module enabled.
Your webserver needs PHP installed correctly, script has been tested in PHP4 and PHP5.
Your webserver also needs .htaccess support.
If you have all of the above, there is a few simple steps to take.
1) Open the file.php file, edit the database settings at the top of the file. Use the same settings you have set up in addons/amxmodx/configs/sql.cfg. There's also a couple of other settings you can tweak in there if you have experience.
2) Upload the .htaccess and edited file.php files to the sv_downloadurl root. For example if your sv_downloadurl is "http://www.testsite.com/naturalselection/" then upload the files into the naturalselection folder.
3) Edit your mods server.cfg file, and change the sv_downloadurl. Following the previous example, you need to change the sv_downloadurl from
http://www.testsite.com/naturalselection/
to:
http://www.testsite.com/naturalselection/file.php/
Make sure the link has the trailing slash.
4) Add the sv_downloadurl_protection.amxx file to your plugins directory and plugins.ini list.
5) Restart server.
6) ???
7) Profit.
get plugin
HLDS Leechers Begone
Jump to
- Inregistreaza-te pe Zonek Telecom ca sa vezi toate Subiectele
- -->>Regulile Forumului & Descriere<<--
- ↳ Regulament Forum
- ↳ Prezentare
- ↳ Cereri Parteneriate
- ↳ Intri si tu in reteaua zonek??
- ↳ Sugestiile voastre
- ↳ Raportare bug-uri/probleme forum
- -->>Mica Publicitate & Reclama<<--
- ↳ Reclama diverse siteuri & servere de Counter-Strike
- ↳ Vand
- ↳ Cumpar
- -->>Servere Comunitare NON-STOP<<--
- ↳ Discord Server Zonek Telecom
- ↳ GO.ZONEK.RO
- ↳ ARENA.ZONEK.RO
- ↳ AWP.ZONEK.RO
- ↳ Bucuresti Create Server
- ↳ Evidenta redirect
- ↳ Clan TAG
- zonek.ro - Counter Strike Global Offensive
- ↳ SourceMod Plugins
- ↳ Admin Commands
- ↳ Fun Stuff
- ↳ Gameplay
- ↳ General Purpose
- ↳ Server Management
- ↳ Statistical
- ↳ Technical/Development
- ↳ Tutoriale
- ↳ Probleme la servere si Jocul Counter-Strike: Global Offensive
- -->>Jocuri & Resurse Counter Strike<<--
- ↳ Tutoriale cs 1.6- Server
- ↳ Tutoriale Moduri Counter - Strike [NOU]
- ↳ Tutoriale cs - Install Counter-Strike & HLDS
- ↳ Scripting
- ↳ Mapping / Harti
- ↳ Cereri Tutoriale
- ↳ Download pluginuri
- ↳ Discutii legate de plugin-uri - Cereri Plugin-uri
- ↳ Download zone
- ↳ AdminMod
- ↳ AmxModX
- ↳ Admin Commands
- ↳ General Purpose
- ↳ Statistical
- ↳ Gameplay
- ↳ Event Related
- ↳ Server Management
- ↳ Fun Stuff
- ↳ Technical/Development
- ↳ AmxMod
- ↳ Addons-uri Counter Strike
- ↳ Addonsuri AmxModX
- ↳ Addonsuri AdminMod
- ↳ Addonsuri AmxMod
- ↳ Cereri addonsuri
- ↳ Probleme tehnice
- ↳ HLDS
- ↳ Client 1.6
- ↳ Alte jocuri
- -->>Diverse<<--
- ↳ Discutii diverse
- ↳ Realitatea Baptista Castellon
- ↳ Arta
- ↳ Studentie
- ↳ Auto / Moto
- ↳ Fashion
- ↳ Sanatate
- -->> San Andreas Multi Player <<--
- ↳ Discutii Scripting
- ↳ Probleme GodFather
- ↳ Tutoriale
- ↳ Cerere Tutoriale
- ↳ Salonul Scripturilor
- ↳ Plugins
- ↳ Maps
- ↳ Gamemode
- ↳ FilterScript
- ↳ News Development
- ↳ Ajutor Servere
- -->> Photoshop <<--
- ↳ Photoshop
- ↳ Creatii
- ↳ Gifts
- ↳ Graphic Battle
- ↳ Tutoriale
- ↳ Competitii: - SOTW
- ↳ Resurse
- ↳ Ripperi
- ↳ Cereri Photoshop
- ↳ Da LIKE pe FaceBook si castigi 10 euro saptamanal!!
- -->>Filme & Muzica<<--
- ↳ Filme
- ↳ Muzica
- -->>Minunile Lumii Antince<<--
- ↳ Cele 7 Minuni ale Lumii
- ↳ Minuni uitate ale Lumii Antice
- -->>LOVE & SEX<<--
- ↳ Love & Sex
- ↳ Contraceptia
- ↳ Dragostea
- -->>Hubul dc.zonek.ro al serverelor de Counter-Strike<<--
- ↳ Totul despre hubul dc.zonek.ro
- -->>Culturi si Mistere<<--
- ↳ Culturi ascunse, mistere si fapte inexplicabile
- ↳ Magie
- ↳ Lumea Viselor
- -->>|Messenger| & Curiozitatii<<--
- ↳ <|Mesaje tampite care se dau pe mess|>
- ↳ Intrebari fara raspuns
- ↳ Stiati ca ?
- ↳ Pentru cei nemultumiti
- Manage Holidays/Sarbatori si Zile Onomastice
- ↳ Manage Holidays / Sarbatori si Zile Onomastice
- Recycle Bin
- ↳ Recycle Bin
- ↳ HaoS.ZoneK.Ro [ Public Server ]
- ↳ Regulament
- ↳ Anunturi
- ↳ Cafenea Admini
- ↳ Staff
- ↳ Cerere Admin
- ↳ Cerere Slot
- ↳ Cerere UnBan
- ↳ Reclamatie Admini
- ↳ Lista Banuri
- ↳ Redirecte
- ↳ djs.zonek.ro
- ↳ Regulament
- ↳ Cereri admin / slot pe djs.zonek.ro
- ↳ Cerere UnBan
- ↳ Reclamatii admini / playeri
- ↳ Campionat 2 vs 2
- ↳ Discutii Libere
- ↳ Clanu Dj's
- ↳ Ballas
- ↳ Nortenos
- ↳ Surenos
- ↳ Taxele serverului
- ↳ Vanzari - Cumparari
- ↳ Afaceri
- ↳ Servicii
- ↳ Case
- ↳ Politia Romana
- ↳ Discutii generale despre factiuni
- ↳ Pompieri si Medici
- ↳ Serviciul Roman de informatii
- ↳ Armata Romana
- ↳ Clanul Frusin
- ↳ Clanul Racean
- ↳ Guvernator San Andreas
- ↳ Asasini Platiti
- ↳ Reporteri ProTV
- ↳ Transport Company
- ↳ Instructori
- ↳ Clanul Camataru
- ↳ Job-uri secundare
- ↳ Tow Car Company
- ↳ Tutoriale GTA SA:MP
- ↳ freerunners.zonek.ro
- ↳ Admins only
- ↳ Regulament
- ↳ Anunturi
- ↳ Donatii
- ↳ Echipa nord
- ↳ Cereri admin/slot
- ↳ Cereri unban
- ↳ De ce am dat ban
- ↳ Cine face abuz de admin
- ↳ Discutii libere
- ↳ Evidenta redirecte
- ↳ Ghenaaaaaa.....!!!
- ↳ Grove Street
- ↳ Ballas Family
- ↳ Mayor
- ↳ The Triads
- ↳ The Mafia
- ↳ Varios Los Aztecas
- ↳ License Faction
- ↳ Los Santos Vagos
- ↳ News Reporter
- ↳ Taxi Company
- ↳ National Guard
- ↳ Police Departament
- ↳ Federal Bureau of Investigaton
- ↳ Medics
- ↳ Hitman Agency
- ↳ furien.zonek.ro
- ↳ Regulament Server
- ↳ Anunturi
- ↳ Cerere Admin / Slot
- ↳ Cerere UnBan
- ↳ Cerere Ban
- ↳ Reclamatii
- ↳ Echipa furien.zonek.ro
- ↳ Mariri / degradari
- ↳ Redirecte
- ↳ Discutii Generale
- ↳ Download Redirecte
- ↳ FAN.ZONEK.RO # Fan Curier Server
- ↳ intrudersWOW - www.zonek.ro
- ↳ Announcements / Server info
- ↳ International Zone
- ↳ Romanian
- ↳ German
- ↳ English
- ↳ Requests
- ↳ Ban \ Mute Request
- ↳ Unban / Unmute requests
- ↳ Bug Report
- ↳ Items
- ↳ Other
- ↳ Fixed bugs
- ↳ General Discussion
- ↳ Ze.Zonek.Ro # Intruders Zombie
- ↳ Stream name: ...::: CooLFM :::... - Cel mai tare Radio
- ↳ I'm in love!
- ↳ Request
- ↳ Events - Radio CooLFM
- ↳ Cautam Dj`eitze si DJ-eii
- ↳ Personal Top Ten (?)
- ↳ Zonek SA:MP Official Server
- ↳ Informatii
- ↳ Sugestii
- ↳ Update's
- ↳ Factiuni
- ↳ Police Depatament
- ↳ Federal Bureau of Investigations
- ↳ National Guard
- ↳ Fireman/Paramedics
- ↳ The Mafia
- ↳ The Triads
- ↳ The Mayor
- ↳ Hitman Agency
- ↳ News Reporter
- ↳ Taxi Company
- ↳ License Faction
- ↳ Los Santos Vagos
- ↳ Varios Los Aztecas
- ↳ Ballas
- ↳ Grove Street
- ↳ NFS Club
- ↳ NRG Club
- ↳ Plangeri
- ↳ Admin's Zone
- ↳ Diverse
- ↳ Buguri
- ↳ Statistici WEB
- ↳ LIGHT.ZONEK.RO | Anti-Cheat | Skins |
- ↳ DM.ZONEK.RO
- ↳ WAR3.ZONEK.RO
- ↳ ELITE.ZONEK.RO