Skip to content

Allows server owners to define multiple FastDownload nodes and redirect players to the closest node available

License

Notifications You must be signed in to change notification settings

Nolo001-Aha/sourcemod_smart_fastdownloads

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SourceMod Smart FastDownloads allows server owners to define multiple "download nodes" via a simple config file.

As of right now, this can only run on Team Fortress 2 Windows and Linux servers, as that's the only Source game I make projects for.Theoretically, this can run on any Source-based game.

When a client connects, this plugin calculates the distance between them and each of the specified download nodes and routes the client to the closest node available. This can elminate potential download speed bottlenecks when too many clients are trying to access a single webserver at the same time or when a webserver is physically too far away from major player groups.

Dependencies

Points of failure/Limitations

  • Client's IP address may not be in the SypexGeo/GeoIP2 database. If such event occurs, the plugin will fall back to the original fastdownload value, defined by sv_downloadurl.
  • Since this plugin relies solely on internal database info, distance/location calculation may be rather inaccurate.
  • Undiscovered...?

ConVars

  • sfd_lookup - Defines which database to use. 0 - SypexGeo, 1 - GeoIP2 with SourceMod 1.11.
  • sfd_debug - Certain debug information will be written to the fastdl_debug.log file located in the sourcemod folder.

Usage

  • Upload the files to their respective folders.
  • Edit the configuration file under configs/fastdlmanager.cfg.
  • Start the server/load the plugin. Please note that the main configuration file must be edited BEFORE the plugin starts and that any non-KeyValue information will be lost.

Example node config entry

"Download Node 1" //The name of your node
{
		"ip"    "192.168.1.1" // IP address of the download node. You can find it with any 3rd party service. Used for node location calculations
		"Link"  "http://example.com/tf" // The download link that clients receive. Self-explanatory I guess
}

About

Allows server owners to define multiple FastDownload nodes and redirect players to the closest node available

Resources

License

Stars

Watchers

Forks

Packages

No packages published