Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/ZTzTopia/GTProxy/llms.txt

Use this file to discover all available pages before exploring further.

Overview

GTProxy uses CMake 3.24+ as its build system and Conan 2.0+ for dependency management. The project is written in C++23 and supports Windows, GNU/Linux, and macOS.

Prerequisites

Required Tools

  • CMake 3.24 or newer - Build system generator
  • Conan 2.0 or newer - C/C++ package manager
  • Python 3.5 or newer - Required for Conan
  • C++23-compatible compiler:
    • Windows: Visual Studio 2022 or newer
    • Linux: GCC 11+ or Clang 14+
    • macOS: Xcode 14+ or Clang 14+
  • Git - For cloning the repository with submodules

Install Conan

Conan must be installed before building:
pip install "conan>2.0"
On Windows, make sure to select “Add Python to PATH” during Python installation.

Dependencies

GTProxy uses a combination of Conan packages and Git submodules for its dependencies.

Conan Dependencies

These dependencies are automatically downloaded and managed by Conan during the CMake configuration step:
LibraryVersionPurpose
eventpp~0.1Event dispatching system
fmt12.0.0String formatting
glaze~6.2JSON serialization
glm~0.9.9OpenGL Mathematics library
magic_enum~0.9Enum reflection and serialization
pcg-cppcci.20220409PCG random number generator
libressl3.9.1TLS/SSL support
spdlog~1.16Logging framework
gtest~1.14Unit testing framework
lua5.4.6Lua scripting language
sol2~3.5C++ to Lua binding library
zlib1.3.1Compression library

Git Submodules

These libraries are included as Git submodules in the lib/ directory:
LibraryPurpose
enetUDP networking library
cpp-httplibHTTP server implementation
When cloning the repository, you must use --recurse-submodules to fetch these dependencies.

Build Instructions

1

Clone the repository

Clone the GTProxy source code with all submodules:
git clone --recurse-submodules https://github.com/ZTzTopia/GTProxy.git
cd GTProxy
If you already cloned without submodules, initialize them:
git submodule update --init --recursive
2

Configure the build

Create a build directory and configure with CMake:Debug Build:
cmake -B build -DCMAKE_BUILD_TYPE=Debug
Release Build:
cmake -B build -DCMAKE_BUILD_TYPE=Release
During configuration, Conan will automatically download and install all required dependencies. This may take several minutes on the first run.
3

Build the project

Compile the project:Debug Build:
cmake --build build --config Debug
Release Build:
cmake --build build --config Release
4

Run the executable

After building, the executable will be located in:
  • Linux/macOS: build/src/GTProxy
  • Windows: build/src/Debug/GTProxy.exe or build/src/Release/GTProxy.exe
Run the proxy:
# Linux/macOS
./build/src/GTProxy

# Windows
.\build\src\Debug\GTProxy.exe

Platform-Specific Notes

Windows (MSVC)

  • Uses /EHsc compiler flag for exception handling
  • Supports Windows 7, 8, 10, and 11
  • Recommended: Visual Studio 2022 with C++ workload

Linux

  • Uses -fexceptions compiler flag
  • Tested on Ubuntu and Arch Linux
  • Requires GCC 11+ or Clang 14+ with C++23 support

macOS

  • Uses -fexceptions compiler flag
  • Tested on macOS 26 Tahoe
  • Requires Xcode Command Line Tools or full Xcode installation

Running Tests

GTProxy uses Google Test for unit testing. After building, you can run tests:
# Using CTest
ctest --test-dir build --output-on-failure

# Or run the test executable directly
./build/tests/GTProxy_tests
See the Development Guide for more testing options.

Clean Build

To start with a fresh build:
# Remove the build directory
rm -rf build

# Reconfigure and rebuild
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release

Next Steps

Development Guide

Learn about the codebase structure and contribution guidelines

Troubleshooting

Common build issues and their solutions

Build docs developers (and LLMs) love