Skip to content

Setting up Re Banner

naydef edited this page Jul 31, 2023 · 8 revisions

The setup can be broken down into three stages:

  • First plugin launch, config initialization.
  • Setting up your FastDownloads server.
  • Actual plugin launch.

1. First launch, initialization:

  1. Install the latest version of my File Network fork (https://github.com/Nolo001-Aha/File-Network). You might have to compile it.

  1. Upload this plugin and it's gamedata, either by downloading it from GitHub Releases (https://github.com/Nolo001-Aha/SourceMod-ReBanner/releases) or by compiling it manually from the master branch.

  1. Add your database record to addons/sourcemod/configs/databases.cfg and add your credentials.

    You need to choose which database type you'd like to work with.

    If you're installing Re-Banner for a single server, SQLite will be your best option.

    If you're planning on using a unified Re-Banner database across multiple servers, then please use MySQL.

    MySQL

      "rebanner"
      {
             "driver"     "mysql"
             "host"       "localhost"
             "database"   "rebanner"
             "user"       "YYYYYYY"
             "pass"       "XXXXXXX"
      }
    

    SQLite

      "rebanner"
      {
             "driver"    "sqlite"
             "database"  "rebanner"
      }
    

  1. Load the plugin with sm plugins load rebanner. Upon first launch, Re-Banner will scan your server's Download table, generate it's database and it's config file, addons/sourcemod/configs/rebanner.cfg.

    Your config file will look something like this by default:

       "Settings"
       {
         "fingerprint path"		"materials/models/texture.vmt"
         "ban reason"		        "Alternative account detected, re-applying ban"
         "tampering kick reason"		"File tampering detected! Please download server files from scratch"
         "enable"			"0"
       }
    

    The "fingerprint path" Key will either be the default value (materials/models/texture.vmt) or something else.
    N.B.!: This path is RELATIVE to the server's folder, not an absolute OS path.

    If the fingerprint path is the default one, this means that Re-Banner failed to find a suitable fingerprint location automatically. In this case you need to pick your own location, something that will be hard to distinguish from genuine server content.

    You may choose any file path you like, as long as it is located under any of the following directories and AS LONG AS THE PATH ACTUALLY EXISTS ON YOUR SERVER (you may create it through your FTP manager manually. For example, for path materials/models/testing/test.vmt you'd have to make sure that in your server's game folder the path materials/models/testing/ should exist too):

    materials

    models

    sound

    cfg

    scripts

    While any of these should be fine, I STRONGLY recommend choosing one of the first 3 folders.

    Additionally, you may modify the ban and kick reasons in the same config file.

    DO NOT SET "enable" TO "1" YET.

    With that, the first step of setting up Re-Banner is complete and you may proceed to the second step.


2. Setting up your FastDownloads server:

  1. Open serve.php in a text editor of your choice. At the top of the file, you'll see something like this:

         //MODIFY THIS VARIABLE AND PLACE YOUR CHOSEN FINGERPRINT PATH INSIDE.
         $fingerpintFilePath = "";
    

    Paste the fingerprint path that you acquired in step 1 between the two quotation marks. Save and close serve.php.


  1. Upload serve.php to your FastDownloads web server to the folder where the content folders (materials, models, sound, maps, etc) are. Example structure:

      http://server.com/tf/
                       /tf/materials/
                       /tf/models/
                       /tf/maps/
                       /tf/models/
                       /tf/serve.php
    

    (Keep in mind that "tf" corresponds to the game that your FastDL is serving, it could be csgo, tf, swarm, css, etc.


  1. Confirm that serve.php is functioning properly by attempting to request a file from it.

    Replace SERVER.COM with the address of your FastDownloads folder, GAME with the name of your game content folder (tf, csgo, css, etc) and PATH with the fingerprint path that you chose in step 1.

    For example: http://fastdl.server.com/csgo/serve.php?id=123456789&url=/materials/models/texture.vmt

    Open http://SERVER.COM/GAME/serve.php?id=123456789&url=/PATH in your browser (don't forget the slash before PATH!).

    If everything is set up correctly, your browser should download your fingerprint file and it's contents should be 123456789.

    If that's the case, then congratulations, step 2 is complete and you may proceed to step 3. If something is wrong, please consult your FastDownloads server provider or open an Issue here.


3. Actual plugin launch

  1. Open rebanner.cfg on your game server and set the value of "enable" to "1". Save and upload the file to the server.

  1. Confirm that sv_downloadurl server ConVar contains your actual FastDownload address (for example, "http://server.com/tf") and that it is set in your server.cfg file.

  1. Load the plugin through sm plugins load rebanner or by changing the map. The plugin should start up properly.

  1. Set rb_log_level server ConVar to 3 (sm_cvar rb_log_level 3) and join your server. If everything is set up properly, you should see the fingerprint file in your game's downloads. If that's the case, Congratulations, Re-Banner is installed and fully configured!

    If something is wrong, please check addons/sourcemod/logs/rebanner.log and your error logs. If something doesn't seem right, please open an Issue here.