HTTP Redirect

From Oldunreal-Wiki
Jump to navigation Jump to search

Here we're going to see how to set-up HTTP redirect for downloading maps, like in UT.

Setting up redirection

The settings to control downloads are in the server's Unreal.ini file (or advanced options). These are the settings for downloads sent directly from the Unreal server:

[IpDrv.TcpNetDriver]
AllowDownloads=True
MaxDownloadSize=0
DownloadManagers=IpDrv.HTTPDownload
DownloadManagers=Engine.ChannelDownload

Setting AllowDownloads to False disables all autodownloads sent directly from the Unreal server. This setting has no effect on redirected downloads.

MaxDownloadSize=0 means allow autodownload of any sized file directly from the Unreal server. Otherwise the value is in BYTES. We recommend that rather than disabling all downloads, you set the MaxDownload size to an appropriate value. For example, MaxDownloadSize=100000 will allow mutators and other small packages to be downloaded, but will not allow large files such as maps to be downloaded. Turning off all downloads may make it hard for older clients to get on your server if you are using a lot of custom maps, mutators or other custom packages. This setting also has no effect on redirected downloads.

Redirecting downloads to a remote website

These are the settings for redirecting downloads to a remote website site:

[IpDrv.HTTPDownload]
RedirectToURL=http://www.website.com/full/path/to/directory/
UseCompression=True
ProxyServerPort=3128
ProxyServerHost=

In order to enable redirected downloads, you need to set the RedirectToURL variable to point to the website where the files will be autodownloaded from. If a client running 226 or earlier connects to your server, it will ignore the redirection and attempt to download the file directly from the server, so it's important to configure the non-redirected download options even if you intend use redirected downloads.

Compressed downloads

If UseCompression is set to True, the files must be stored on the remote website as compressed .uz files. You can create a compressed .uz file by using the command ucc compress from the command line. Typing ucc help compress will give you a list of supported options (currently this is only a list of filenames or wildcards to compress). If UseCompression is set to False, the custom package files should be put on the website as they are. Here are some examples of ucc compress:

ucc compress ..\maps\dk*.unr
ucc compress ..\textures\customskins1.utx ..\textures\customskins1.utx ..\maps\DMDeck16.unr

Note: Make sure the names of the packages (example:DMDeck16.unr) used in the Unrealserver match exactly the filename on the HTTP-Server. Here:DMDeck16.uz - it must be strictly case sensitive:dmdeck16.uz will NOT work and the Unreal server will fall back to Engine.ChannelDownload.