Media gallery
Download product
In short
๐ฆ Host your own Lua file CDN with gluapack! For the technically accustomed who autorefresh often or prefer to self-host.
-
This is a FREE DLC!
Please DO NOT PURCHASE this DLC. You will not be given a full refund if you purchase this DLC. It is FREE.
You will automatically be granted access to this DLC after purchasing gluapack.
If you own gluapack and don't have access, download gluapack to get access.
Do you...?
โ Have a PHP webserver?
โ Know how to set up caching, CDNs, webservers?
โ Autorefresh the Lua files of your server often?
โ Prefer to self-host your content & infrastructure?
gluapack ๐ sysadmins
Upon popular request, you can now self-host your Lua files with gluapack!
Features
โ Works on any webserver capable of running PHP
โ Requires no additional configuration of your webserver
โ Doesn't require a database, almost completely stateless
โ Fully compatible with gluapack and emulates the real service
โ Autorefreshing Lua files will trigger the repacking of your server
โ Might fix your marriage
How does it work?
This is a simple PHP script that will fully emulate the gluapack service on your own infrastructure.
Your Garry's Mod server(s) will be configured to upload their packed Lua files to your endpoint, where you installed the PHP script.
The PHP script will store the packed Lua files in a location set by you, or by default, in the directory the script is installed in.
Your Garry's Mod server(s) will then set sv_downloadurl
to a specially crafted URL pointing to your website, which will then handle FastDL requests appropriately.
Installation
1. Download the script from GmodStore
2. Set up PHP and your webserver if you haven't already
3. Install the script somewhere on your webserver accessible to the Internet
4. On your Garry's Mod server(s), type gluapack_selfhost "URL TO THE SCRIPT"
5. That's it, you're done!
Recommended Extra Steps
I HIGHLY recommend that you protect your endpoint with CloudFlare, or something similar.
CloudFlare not only provide fantastic caching (saving you bandwidth costs) but will also protect you from DDoS attacks.
Custom Uploaders
If you want to use a CDN/storage service such as AWS S3, BunnyCDN, Fastly, etc. then you can write a bit of PHP code that uploads the packed Lua files in any way you like. The function looks like this:
// CUSTOM UPLOADERS
// If you know PHP, you can use this function to upload your packed Lua files elsewhere.
// For example, if you prefer to use a CDN service, you can use this to upload your files to that service.
$enable_custom_uploader = false;
$custom_uploader = function(string $pack_data, string $pack_md5, string $server_id, string $proxy = null) : string {
// $pack_data is a binary string containing the bz2 compressed clientside/shared Lua files of your server.
// $pack_md5 is the MD5 hash of $pack_data.
// $server_id is the unique hexadecimal ID of the Garry's Mod server.
// $proxy is the value of sv_downloadurl on the server. You will want to redirect any requests that don't go to data/gluapack/<md5>.bsp.bz2 to this URL.
// You should return the new FastDL URL that sv_downloadurl will be set to. This is the URL that connecting clients will use to download your packed Lua files, and download any extra FastDL content, if applicable.
// Garry's Mod appends the requested file to the URL.
return "http://my-fastdl-website.com/?server=$server_id&proxy=$proxy&asset=";
};
Support
Due to the nature of this product, I do not offer any support.
If you think something is genuinely broken, please get in touch.
You are expected to know what you are doing when using this product, if you do not know anything about webservers, CDNs, etc. it's not recommended that you use this. gluapack already hosts your Lua files for you, and that is likely already good enough for your needs.
Product reviews
4.64 average based on 0 reviews
Download product
![](https://media.gmodstore.com/460x/script_banners/e0ea1b0435ff7ece736098e088ea4e1b.png)
Product details
Requirements
- Webserver with PHP 5 or newer
- Knowledge of webservers, CDNs, hosting, etc