Setting up a Blizzlike CDN


Description

Learn how to setup your own CDN

Hello,

I am writing this tutorial becasue I have strugeled to do this and did not find many people that seem to know wbout this topic. So here we go:

What is this tutorial about?
Today I want to show how to setup a CDN for yourself to be independent from Blizzard. This is very usefull when you want to stick to a certan version of WoW. This tuorial is made for people that have basic skills in WoW-Modding and know some terms. For simplicity I will use Legion as my prime version. This works very similar to all versions that have a CASC storage.

What is a CDN used for?
As you may have noticed your Legion Client is able to load files not only via the BattlenetApp but also ingame. This is caused by a technology called CASC. A CASC is a special type of storage developed by Blizzard to be able to stream files to a game client. These CASC storage is provided via a CDN

Why have a own CDN?
The anser is quite simple. Blizzard turns off support for older game versions. If you run a server and Blizzard shuts down their CDN for your client version it might stop working. To avoid this you need to have your own CDN.

What do I need?
You need a list of software in order to host a own CDN. Alot of these tools can be changed for equivalents feel free to use whatever tool suits you. I wont cover how to install these if you have trouble feel free to ask me. Here is my list:


What to do?
1. Step Marlamin BuildBackup

NOTE: You need Ribbit.net to use BuildBackup this is due to recent changes in the way Blizzard cdns work. You will need to use this aswell to downlaod from Blizzard cdns.

After you have compiled the sources you will have a output that looks like this:
dfe1c7193136ea8589b894cdf159c6c6.png
You probably lack the batch but I will show you how to do this right now. 

dotnet BuildBackup.dll forcebuild wow 3b0517b51edbe0b96f6ac5ea7eaaed38 da4896ce91922122bc0a2371ee114423

As you can see this batch runs the BuildBackup.dll with the following parameters

  • forcebuild - This forces it to load the right version
  • wow - This is the game you want to download from the Blizzard CDN (only wow should matter)
  • 2 Hashes


You have to modify the 2 Hases to get the correct version. Todo so you open up following page: https://wow.tools/builds/
There you will find a long list of different builds. Search for the correct one and get the Build Config (1. Hash) aswell as the CDN Config (2. Hash).

8e53d2449f57dcb05e7defe433d18441.png

Fill those in to get the right Version. 

Sadly alot of the older Versions are not available anymore. I cant provide those so back up your Version as long as it still exists!

Now run the batch and wait for the process to finish. Your outcome should be a folder named tpr. Make a backup of this folder in case you mess up your working Version. Keep in mind this can be around 200 GB of data.

2. Step getting all other needed Files
Click the following 2 links and keep the Files where you can find them. We will need them in a minute.


These files direct your client to downlaod the correct Version of the Game from your CDN instead of the oficial ones. You need to modify those later.

3. Step configurating the web Server
Now you have to open your web-Server. This is needed becasue your Client uses HTTP to request its Files. (Note this will only work for WoD and Legion since they introduced a new Type in BFA). Setup the following folders in your Root folder. In case of Apache 2.4 this folder is called htdocs.

  • htdocs/wow
  • htdocs/tpr/wow/...


Copy your CDN-Files from step 1 in place of the trp folder and your files from step 2 in your wow folder.

4. Step editing the wow-folder files.
Now open and modify the files according to my example. Starting with cdns:

Name!STRING:0|Path!STRING:0|Hosts!STRING:0|Servers!STRING:0|ConfigPath!STRING:0
eu|tpr/wow|localhost|http://localhost|tpr/configs/data
tw|tpr/wow|localhost|http://localhost|tpr/configs/data
us|tpr/wow|localhost|http://localhost|tpr/configs/data
kr|tpr/wow|localhost|http://localhost|tpr/configs/data
cn|tpr/wow|localhost|http://localhost|tpr/configs/data

Of course you should use the web-server adress you have. To set it up locally you can use localhost. You can also use a diffrent port. If you do simply add the port behind both localhost. I use default 80.

Next up is versions:

Region!STRING:0|BuildConfig!HEX:16|CDNConfig!HEX:16|KeyRing!HEX:16|BuildId!DEC:4|VersionsName!String:0|ProductConfig!HEX:16
eu|c67ad9d5ac4908d65a512b21fc9171bd|e9754adcc354309d735e9a4b3ba1ec87||26972|7.3.5.26972|
tw|c67ad9d5ac4908d65a512b21fc9171bd|e9754adcc354309d735e9a4b3ba1ec87||26972|7.3.5.26972|
us|c67ad9d5ac4908d65a512b21fc9171bd|e9754adcc354309d735e9a4b3ba1ec87||26972|7.3.5.26972|
kr|c67ad9d5ac4908d65a512b21fc9171bd|e9754adcc354309d735e9a4b3ba1ec87||26972|7.3.5.26972|
cn|c67ad9d5ac4908d65a512b21fc9171bd|e9754adcc354309d735e9a4b3ba1ec87||26972|7.3.5.26972|

Fill in the hashes you used to download the files in step 1 aswell as the correct Version.
Now you are nearly good to play.

5. Step modifying your client
The URL to the Blizzard CDN is hardcoded in the client so you need a hex-editor to change this. Open your WoW-exectuable with 010 Editor and hit "ctrl + F". A small search bar apears at the bottom. Select the option text and search for cdns.
24b6df5244df7ef1d35b2ea60efa5c83.png

You will find 2 links pointing to a Blizzard CDN. Simply change those URL's to point to your Web-Server and save the Files.
 

6. Step Logging in
Now you can Login to your Client and use your own custom CDN as long as your Web-Server is running!
Als long as your webserver is running your client will patch itself.

Also
Here is a tutorial on how to add custom files to your own cdn.

 

  • Thanks 5


Recommended Comments

Severity    Code    Description    Project    File    Line    Suppression State
Error    CS0006    Metadata file 'C:\Users\Administrator\Desktop\Ribbit.NET-master\Ribbit.NET\bin\Debug\netcoreapp2.1\Ribbit.NET.dll' could not be found    RibbitTest    C:\Users\Administrator\Desktop\Ribbit.NET-master\RibbitTest\CSC    1    Active
 

 

how can i resolve it pls

 

C:\Users\Admin\Desktop\BuildBackup-master\BuildBackup.csproj : error  : Could not load SDK Resolver. A manifest file exists, but the path to the SDK Resolver DLL file could not be found. Manifest file path 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\SdkResolvers\Microsoft.Build.NuGetSdkResolver\Microsoft.Build.NuGetSdkResolver.xml'. SDK resolver path: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\CommonExtensions\Microsoft\NuGet\Microsoft.Build.NuGetSdkResolver.dll  C:\Users\Admin\Desktop\BuildBackup-master\BuildBackup.csproj
 

Share this comment


Link to comment
Share on other sites

how do i get a legion CDN? XD today is impossible to find out

Share this comment


Link to comment
Share on other sites

Just throwing this out here for anyone who had the same problem as me. The BuildBackup program requires .NET 2.2.0 x64 (Not x86) to run, and if you're like me you may not have the x64 version, so make sure to get that one in particular if the program is failing to launch. 

Also consider adding a Pause to the last line of your .bat file like this;

dotnet BuildBackup.dll forcebuild wow 3b0517b51edbe0b96f6ac5ea7eaaed38 da4896ce91922122bc0a2371ee114423
Pause

that way you can see what error code the program is throwing!

Share this comment


Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now