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.

GTProxy uses a JSON configuration file (config.json) to customize its behavior. The configuration file is automatically created with default values if it doesn’t exist when GTProxy starts.

Configuration File Location

The configuration file should be located in the same directory as the GTProxy executable:
config.json
If the file is not found on startup, GTProxy will automatically create a default configuration file and log a warning message.

Configuration Structure

The configuration file is organized into four main sections:
  • server - Proxy server settings
  • client - Client connection settings
  • log - Logging preferences
  • command - Command system settings

Example Configuration

{
  "server": {
    "port": 16999,
    "address": "www.growtopia1.com"
  },
  "client": {
    "game_version": "5.39",
    "protocol": 225,
    "dns_server": "cloudflare"
  },
  "log": {
    "print_message": true,
    "print_game_update_packet": false,
    "print_variant": true,
    "print_extra": true
  },
  "command": {
    "prefix": "/"
  }
}

Server Configuration

Configure the proxy server settings.
server.port
integer
default:16999
The local port number where the proxy server listens for incoming client connections.The Growtopia client should connect to 127.0.0.1 on this port.
server.address
string
default:"www.growtopia1.com"
The target Growtopia server address to connect to.This is the official server address that the proxy will forward connections to. The address is resolved using the configured DNS resolver.

Client Configuration

Configure client connection and protocol settings.
client.game_version
string
default:"5.39"
The Growtopia game version to report.This should match the version of the Growtopia client you’re using. Update this when the game version changes.
client.protocol
integer
default:225
The protocol version number.This should match the protocol version used by your Growtopia client. Update this when the protocol changes with game updates.
client.dns_server
string
default:"cloudflare"
The DNS resolver provider to use for resolving server addresses.Available options:
  • cloudflare - Use Cloudflare DNS (1.1.1.1)
  • google - Use Google DNS (8.8.8.8)
  • system - Use system DNS resolver

Log Configuration

Control what information is logged during proxy operation.
log.print_message
boolean
default:true
Enable logging of text messages exchanged between client and server.This includes in-game chat messages, system messages, and other text communications.
log.print_game_update_packet
boolean
default:false
Enable logging of game update packets.Game update packets contain detailed information about game state changes. Enabling this produces verbose output and is mainly useful for debugging.
log.print_variant
boolean
default:true
Enable logging of variant packets.Variant packets are used for many game functions and events. This is useful for understanding game behavior and debugging scripts.
log.print_extra
boolean
default:true
Enable logging of extra/additional packet data.This includes supplementary data attached to packets that may contain additional context or parameters.

Command Configuration

Customize the in-proxy command system.
command.prefix
string
default:"/"
The prefix character used to trigger proxy commands.Commands typed in-game must start with this prefix to be recognized by the proxy. For example, with the default / prefix, you would type /help to run the help command.

Configuration Loading

GTProxy loads the configuration file at startup (src/core/config.cpp:9):
  1. Attempts to read config.json from the current directory
  2. If the file doesn’t exist, creates a new file with default values
  3. If the file is malformed (invalid JSON), throws an error and stops
  4. Successfully loaded configuration is used for the entire proxy session
Configuration changes require restarting GTProxy to take effect. The configuration file is only read once at startup.

Error Handling

If the configuration file exists but contains invalid JSON, GTProxy will:
  • Display an error message with details about what went wrong
  • Exit without starting the proxy
Make sure your config.json is valid JSON before starting GTProxy. You can validate JSON syntax using online tools or text editors with JSON support.

Build docs developers (and LLMs) love