> For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.

# Platform Proxy

GZCTF comes with built-in WebSocket-TCP forwarding functionality and corresponding traffic logging capability, which can be enabled through relevant configuration options.

## Configuration

In `appsettings.json`, locate the `ContainerProvider` section and configure it as follows:

```json
{
  "ContainerProvider": {
    "PortMappingType": "PlatformProxy",
    "EnableTrafficCapture": false,
    "DockerConfig": {
      // optional, the prefix of the challenge networks (Docker backend)
      "ChallengeNetwork": "challenges"
    }
  }
}
```

## Usage

After enabling the platform proxy, you can use the `/api/proxy/{guid}` endpoint of the platform to forward TCP over WebSocket traffic.

You can connect using any applications that support this function, or use the recommended client: [WebSocketReflectorX](https://github.com/XDSEC/WebSocketReflectorX) for local port forwarding and seamless interaction.

## Notes

When using Docker as the backend with the PlatformProxy port mapping, GZCTF needs to access the challenge containers over the challenge network.

Since **v1.8.0**, the `ChallengeNetwork` value is treated as a **network prefix**. GZCTF automatically creates the `<ChallengeNetwork>-open` and `<ChallengeNetwork>-isolated` networks (with `gzctf` as the default prefix) and attaches itself to them, so no manual network creation is required for the default (`open` / `isolated`) network modes.

If you use the `custom` network mode, you need to create the `<ChallengeNetwork>-custom` network yourself before starting the challenge containers, for example:

```bash
docker network create challenges-custom -d bridge --subnet 192.168.133.0/24
```

And set the configuration item **ChallengeNetwork** to the corresponding prefix, for example `challenges`.
