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

The /proxy command is a simple test command that verifies the proxy’s command system is working correctly. It requires no arguments and simply responds with a success message.

Syntax

/proxy
This command takes no arguments.

Usage Example

Execute Proxy Test

/proxy
Output:
Proxy command executed successfully!

Purpose

This command serves several purposes:

Verification

Quickly verify that the proxy is running and processing commands

Testing

Test the command execution pipeline without side effects

Example

Serves as a minimal example for developers creating custom commands

Troubleshooting

Diagnose command system issues with a simple test case

Implementation Details

Source Reference

Implementation: /home/daytona/workspace/source/src/command/commands/proxy_command.hpp:7

How It Works

  1. Receives command: The command registry routes /proxy to the ProxyCommand handler
  2. Creates log packet: Constructs a packet::message::Log packet with the success message
  3. Sends response: Writes the packet to the server connection to display in chat
  4. Returns success: Returns Result::Success to indicate successful execution

Code Structure

Result execute(const Context& ctx) override
{
    packet::message::Log pkt{};
    pkt.msg = "Proxy command executed successfully!";
    packet::PacketHelper::write(pkt, ctx.server);
    return Result::Success;
}
This is the simplest possible command implementation, making it ideal for understanding the command system architecture.

Use Cases

Development

When developing GTProxy or creating custom commands, use /proxy to:
  • Verify the proxy is intercepting chat messages
  • Test command registration and routing
  • Confirm packet sending works correctly
  • Ensure the command context is properly initialized

Troubleshooting

If other commands aren’t working:
  1. Try /proxy first
  2. If it works, the issue is specific to the other command
  3. If it fails, there’s a problem with the command system itself

Learning

For developers new to GTProxy:
  • Study the /proxy command source code as a starting point
  • Use it as a template for creating simple custom commands
  • Understand the minimal requirements for command execution

Creating Similar Commands

You can create similar test commands using Lua:
Commands.register("test", "My test command", function(args)
    Logger.info("Test command executed!")
end)
See the Lua Commands API for more details.

/help

List all available commands

Custom Commands

Create your own commands with Lua

Build docs developers (and LLMs) love