InfiniteMITM 0.3.0 has introduced commands support in its mitm.yaml configuration for request and response. This feature allows the execution of a list of custom commands (such as scripts) before running the defined handler. Although primarily intended for advanced developers, this option is mainly designed to facilitate the use of InfiniteVariantTool. This tool packs XML files into binary format (bond format) and vice versa, before they are submitted by the client or received by the game.
For more information about InfiniteVariantTool, please visit their official GitHub repository.
In the following example, the before.commands.run command will pack a custom CustomGamesUIMarkup XML file (previously unpacked using InfiniteVariantTool) into a binary format before returning it to the game.
Please note that InfiniteVariantTool must be downloaded beforehand.
domains:
# blobs-infiniteugc.svc.halowaypoint.com
blobs:
# 4bea6ef1-1965-4f06-bd1b-1892ef6064e6: Slayer-FFA
- path: "/ugcstorage/enginegamevariant/4bea6ef1-1965-4f06-bd1b-1892ef6064e6/:guid/CustomGamesUIMarkup/:cgui-bin"
methods:
- GET
response:
before:
commands:
# Run InfiniteVariantToolCLI.exe to pack the file and output it using ":cgui-bin" as the output filename
- run:
- ":mitm-dir/resources/tools/InfiniteVariantTool/InfiniteVariantToolCLI.exe"
- "bond"
- "pack"
- ":mitm-dir/resources/ugc/enginegamevariants/cgui-markups/Slayer-FFA-MITM.xml"
- "--output"
- ":mitm-dir/resources/ugc/enginegamevariants/cgui-markups/$2"
# Output file generated by InfiniteVariantToolCLI.exe
body: ":mitm-dir/ugc/enginegamevariants/cgui-markups/$2"Note: Halo Infinite may cache previously requested modes, maps, and markups in the disk_cache and server_disk_cache folders within the game's directory.
Another example of what's possible by combining various before.commands.run and response.body.

