FastDL Metamod plugin for GoldSrc (Half-Life 1, CS 1.6) servers. This plugin allows you to download files from a web server to the client's computer.
This plugin is safe and does not allow downloading files from forbidden directories or files with forbidden extensions (cfg, ini, ...).
Plugin written with Metamod-Go library.
- File caching to reduce the load on the web server.
- Serve only precached files. If enabled, you can't download files that are not in the precache list.
- Secure file downloading. The plugin does not allow downloading files from forbidden directories or files with forbidden extensions.
- Download the latest release from the releases page
- Copy the
fastdl_386.so
file to theaddons/fastdl
directory of your game server - Open
addons/metamod/plugins.ini
file and add the following line:
linux addons/fastdl/fastdl_386.so
- Restart the game server
- Create a
fastdl.yaml
file in theaddons/fastdl
directory and configure the plugin (see Configuration)
You can configure the plugin using the fastdl.yaml
file. The file can be located in game directory or in the addons/fastdl
directory.
# fastdl.yaml
# The host of the FastDL HTTP server.
# Leave it empty if you want to use the same IP as the game server.
# host: "127.0.0.1"
# The port of the FastDL HTTP server.
# Leave it empty if you want to use random port.
# port: 13080
# The range of random ports for the FastDL HTTP server.
# If the port is not specified, the plugin will use a random port from this range.
# If the port is specified, the plugin will use the specified port, ignoring this range.
#portRange: 40000-50000
# Serve only precached files.
# If enabled, the plugin will not allow downloading files that are not in the precache list.
servePrecached: false
# Generate auto index page for directories.
# It allows to see the list of files in the directory.
autoIndexEnabled: true
# Cache size for downloaded files.
# The plugin will delete the oldest files if the cache is full.
cacheSize: 50MB
# Forbidden files and directories by regular expressions.
forbiddenRegexp:
- mapcycle.*
- .*textscheme.*
# Allowed file extensions.
# Files with extensions not in this list can not be downloaded.
allowedExtentions:
- bmp
- bsp
- gif
- jpeg
- jpg
- lmp
- lst
- mdl
- mp3
- png
- res
- spr
- tga
- txt
- wad
- wav
- zip
# Allowed paths.
# Files from directories not in this list can not be downloaded.
allowedPaths:
- gfx
- maps
- media
- models
- overviews
- sound
- sprites
The host of the FastDL server. This is the IP address. Leave it empty if you want to use the same IP as the game server.
The port of the FastDL server. Leave it empty if you want to use random port.
The range of random ports for the FastDL server. If the port is not specified, the plugin will use a random port from this range. If the port is specified, the plugin will use the specified port, ignoring this range.
Serve only precached files. If enabled, the plugin will not allow downloading files that are not in the precache list.
If enabled, the plugin will generate an index file for each directory. The index file will contain a list of files in the directory.
The size of the cache for downloaded files. The plugin will delete the oldest files if the cache is full. The size can be specified in bytes, kilobytes, megabytes, or gigabytes.
Example values: 50MB
, 1GB
.
A list of allowed file extensions. Files with extensions not in this list will not be downloaded.
A list of forbidden file extensions. Files with extensions in this list will not be downloaded.
A list of allowed paths. Files from directories not in this list will not be downloaded.
A list of forbidden paths. Files from directories in this list will not be downloaded.
A custom download URL. If specified, the plugin will use this URL to download files.
Example: http://example.com:14080/