Skocz do zawartości

Nowy szablon forum

mygo.pl

Stworzyliśmy dla Was nowy wygląd forum. Z pewnością znajdziesz rzeczy, które wg Ciebie mogą zostać zmienione - wspomnij o tym w specjalnym wątku.

Czytaj więcej

Jak założyć własną sieć

serwerów CS

Zastanawiasz się nad prowadzeniem własnej sieci serwerów? Przeczytaj podstawowe informacje, na które należy zwrócić uwagę, przy takim projekcie.

Czytaj więcej

Tworzymy spis sieci

dodaj swoją

Dodaj sieć do której należysz, pozwoli to na promocję i budowę ogólnopolskiej bazy sieci CS.

Czytaj więcej

RSS[TF2/Any?] SourceMod Smart FastDownloads - FastDL client routing by location!


MYGO.pl
 Udostępnij

Rekomendowane odpowiedzi

  • RSSy
SourceMod Smart FastDownloads

This allows server owners to define multiple FastDL nodes via a simple config file and spread players by redirecting each to the closest node available.



Dependencies:
  • SxGeo Extension (Uses SypexGeo database)
  • DHooks
  • [Optional] GeoIP2 that ships with SourceMod 1.11 Dev
  • Own gamedata

How it works:

It uses either SypexGeo or MaxMind database to look up the approximate coordinates of a given client. Then it compares them against all known FastDL node coordinates, picks the one with the shortest distance and sends it's corresponding link to the client. FastDL node coordinates are looked up in the same database on startup. If client cannot be located, this plugin will fall back to the original default sv_downloadurl value.

Installation:
  • Grab the latest release from here: GRAB RELEASE
  • Install SxGeo or update to SourceMod 1.11 with newest GeoIP2.
  • Upload the contents of the archive to your root sourcemod directory
  • Open configs/fastdlmanager.cfg and add your FastDL nodes
  • Load the plugin

Example node config entry:
Code:

                "Server Node 1"
                {
                        "ip"                "8.8.8.8"
                        "Link"                "http://example.com/tf"
                }

ConVars:
  • sfd_debug - If enabled, writes debug-oriented information to fastdl_debug.log in the root sourcemod folder
  • sfd_lookup - 0 - use SxGeo to locate clients, 1 - use GeoIP2 to locate clients


Compatibility:
Given correct gamedata, it should generally work on any given Source game, as it doesn't have any game specific dependencies.
For now I only provide gamedata for Team Fortress 2 Linux and Windows. Feel free to request gamedata for other games.

Known issues:
  • Some IP addresses might not be present in the databases
  • Undiscovered...

Future Plans:
  • Add flag-specific access (so only clients with certain flags i.e. donors can use this)
  • Allow players to choose their download node using a menu

Credits:
  1. Naydef for helping me understand sigscanning, dhooks, helping with debug and providing Linux gamedata
  2. Samm-Cheese for assisting in testing
  3. NecGaming for providing their gameserver for live production testing
  4. Suza for code cleanup tips
  5. AlliedMods Discord members and their GitHub repos for help with random questions

PRs, suggestions and improvements are welcome. This has been running on a live 27-slot server for around a month now, and I found no issues. I still consider myself an advanced beginner, so this might have flaws.

Wyświetl pełny artykuł

Odnośnik do komentarza
Udostępnij na innych stronach

Gość
Ten temat został zamknięty. Brak możliwości dodania odpowiedzi.
 Udostępnij

  • Ostatnio przeglądający   0 użytkowników

    • Brak zarejestrowanych użytkowników przeglądających tę stronę.
×
×
  • Dodaj nową pozycję...