Sniper's Paradise!


Redirection and Compression

What is Redirection?

Redirection in terms of downloading files from a server is best described as a 'connection redirection'. Game servers are not designed to be file servers, therefore downloading required files from the game server is usually very slow and adds an extra load to your server's bandwidth.

Instead, with 'redirection' enabled, the user's connection to the file download is redirected to a (web/http) server (usually external to the gameserver). Not only does the user receive the file much quicker than on an unredirected download, but they are also downloading a compressed version of the file adding to the speed in which the user receives the file.

Redirection is definetly a must for any server, or at least a public one.

Note: Redirect only works with Unreal patched to 227

Why Should I Use Redirection?

You only need to use redirection if your server runs custom files i.e. maps, mods or mutators which do not come with the standard game. If you are running a 12 man deathmatch server with no extra mutators or mods then you will not need to setup redirection.

If you have custom map's or mutator's then it would be wise to setup redirection. Wwhen a player does not have the required file's they will download it off your server which uses additional CPU and Bandwidth, redirection solves this problem.

How Do I Set My Server Up To Use Redirection?

The first thing you need to do is to setup a webserver where the files can be downloaded from (an ftp server will not function correctly). The webserver can either be local i.e. on the same server as your Unreal server or it can be located remotely. All compressed files are placed in the same folder so there's no need to create the directory structure of Unreal (Textures, System, etc).

Once you have your web server setup you will need to edit 2 sections of your Unreal.ini to get redirect working. If you do not have these sections in your .ini, then you need to add them at the end.

Note: Before you edit your .ini it's a good idea to make a backup just in case you make a mistake or delete something by accident.

[IpDrv.HTTPDownload]
RedirectToURL=http://mywebserver/path/to/folder/
ProxyServerHost=
ProxyServerPort=3128
UseCompression=True
 
[IpDrv.TcpNetDriver]
AllowDownloads=True
MaxDownloadSize=0
DownloadManagers=IpDrv.HTTPDownload
DownloadManagers=Engine.ChannelDownload

Setting RedirectToURL= - on a LAN server - you need to specify the FQDN (Fully Qualified Domain Name) of the Redirect server for this to work.

 - Example: (assuming your server is mywebserver on the network domain.local)
            (For Windows use 'ipconfig' at a command prompt and look at 'Connection Specific DNS Suffix)

   This will FAIL TO WORK - http://mywebserver/path/to/folder/
   This will WORK         - http://mywebserver.domain.local/path/to/folder/
   Or this will WORK      - http://10.0.0.20/path/to/folder

Setting AllowDownloads to True will allow people to download from your redirect server if you have set redirect up or allow them to download from your server if you haven't. Setting it to False will only let people download from your redirect server. Therefore if you set this to false make sure every single custom file is on the redirect server.

MaxDownloadSize allows you to specify the maximum download size in bytes. If allowdownloads is set to True and the file to be downloaded is smaller than the maximum download size then the file will be sent from the server itself. This setting has no effect on redirected downloads.

Compression

Compression is done via DOS and uses a file called ucc.exe (you might be familiar with this file if you have already set a server up)

Load up the ms-dos prompt and navigate to the Unreal\System folder

This is done by typing:

cd \
cd Unreal\System

Assuming Unreal is installed in c:\Unreal\. If Unreal is installed in another drive then navigate to that drive.

To compress a map you would type

ucc compress ..\maps\DMRUSHCityPro.unr

ucc compress will compress any Unreal file. You will need to navigate to that folder to compress the file and use the ucc compress command. ..\folder in Unreal folder\Name of file to be compressed

so for example

ucc compress ..\system\customfile.u
ucc compress .. \textures\custommodel1.utx

Now that you know how to do this, you might want to download UTComprez. This tool will be much easier for you to compress files.

Testing Redirection

There is no log to tell you if client's are downloading off the redirect server or not. So, in order to carry out a test, you need to connect up to the server as a client yourself while making sure that you don't have the relevant files installed.

When a download is started, watch the percentage completed number. If the percentage number goes up to 35-55% and then the download is completed, this means that the file came off the redirect site. This is because the .uz files are compressed, Unreal will indicate 100 percentage of the file being downloaded whether it is compressed or not.

Note: If a file downloads once then starts downloading again the chances are that the file on the redirect is not the same version. What Unreal seems to do is download the file off the redirect, checks the package's it then starts downloading off the server if it isn't the correct one.

Troubleshooting

Package Download Problems

You get a message saying the server refused to send a file. Look in your Unreal.ini file and check the following in the [IpDrv.TcpNetDriver] section :

AllowDownloads=False
MaxDownloadSize=0

If AllowDownloads is set to false, a client will only be able to download files off a redirect site if redirection is enabled. Set it to true if you want to allow clients to download files directly off the server.

Note: This will affect a server's performance. Also, MaxDownloadSize will limit the size of files (in bytes) that can be downloaded off the server.


A compressed UZ file starts downloading but then it refuses to send.

This could be because the package on your server isn't the same version as the one on the redirect. Make sure the compressed file corresponds with the one you're using.


You get a error message when trying to connect to a server :

Assertion failed: !Reader.AtEnd() [File:..\..\Core\Inc\Fcodec.h] [Line: 324]
History: FCodecHuffman::Decode <- FCodecFull::Code <- FCodecFull::Decode <- UDownload::DownloadDone <-
UHTTPDownload::Tick <- TickDownload <- UnetConnection::Tick <- UNetDriver::TickFlush <- UNetPending::Tick
<- TickPending <- UGameEngine::Tick <- UpdateWorld <- Mainloop

The mention of the huffman codec (same used in zip) indicates a problem with decompression. This is most probably happening while downloading a file off a redirect. The solution is to recompress a good version of the file and reupload it. Also, if you are uploading to the redirect via FTP, be sure you are uploading in binary, not ASCII mode. Uploading compressed files for your redirect in ASCII mode will cause clients to crash if they attempt to access the file.


Your Unreal crashes while trying to download, check your Unreal.log found in your unreal/system folder. If you see the following error message

Log: Assertion failed: !Reader.AtEnd() [File:..\..\Core\Inc\FCodec.h] [Line: 328]

The admin has uploaded a bad .uz compression file or compressed a file with the same name that is not identical to the file on the server. To be able to play on the server you will need to email the server admin and notify them to check the file.


Redirection is setup but the redirect doesn't seem to work when trying to connect to the server.

Check RedirectToURL. If you have mistakenly added a space before or after the url, redirection won't work.



Spam Killer

Back To Top
2005 Sniper's Paradise
All logos and trademarks are properties of their respective owners.
Unreal™ is a registered trademark of Epic Games Inc.
Privacy Policy
Website by Softly
Powered by RUSH