# markus6222/nexus-proxy architecture

> Architecture diagram of the GitHub repository markus6222/nexus-proxy, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/markus6222/nexus-proxy
- Repository: https://github.com/markus6222/nexus-proxy

## Overview

Nexus is a Windows Growtopia ENet proxy with an in-game command layer. The principal workflow is client traffic through the local proxy to Ubisoft’s game servers, with chat commands interpreted by the proxy to automate actions or change the client-facing response. The README documents broad casino, movement, inventory, automation, visual, and moderation capabilities; the sampled excerpts show the server, event handling, and world state, but not every feature’s implementation. Startup redirection and persistence are documented, though their detailed call wiring is not shown.

Main entry points: [`events.cpp`](https://github.com/markus6222/nexus-proxy/blob/main/events.cpp) (Packet and command handlers), [`server.cpp`](https://github.com/markus6222/nexus-proxy/blob/main/server.cpp) (ENet proxy), [`proxy.cpp`](https://github.com/markus6222/nexus-proxy/blob/main/proxy.cpp) (Proxy startup), [`world/NewWorld.h`](https://github.com/markus6222/nexus-proxy/blob/main/world/NewWorld.h) (World parsing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_connection["Proxy connection"]
  node_entry["Proxy startup<br/>[proxy.cpp]"]
  node_server["ENet proxy<br/>[server.cpp]"]
  node_enet["ENet transport<br/>[enet.h]"]
end

subgraph group_commands["Command features"]
  node_events["Packet and command handlers<br/>[events.cpp]"]
  node_movement["Movement and pathfinding<br/>[server.cpp]"]
  node_automation["Automation commands<br/>[events.cpp]"]
  node_casino["Casino and hosting<br/>[events.cpp]"]
  node_inventory["Inventory and drops"]
  node_visuals["Visual and account options<br/>[events.cpp]"]
  node_moderation["Moderation commands<br/>[events.cpp]"]
end

subgraph group_world["World and player state"]
  node_world_state[("World and object state<br/>[NewWorld.h]")]
  node_player_state[("Player state<br/>[player.h]")]
  node_world_parse["World parsing<br/>[NewWorld.h]"]
  node_logs[("Logs and saved data<br/>[utils.cpp]")]
end

subgraph group_presentation["Client presentation"]
  node_dialog["Command dialog<br/>[dialog.cpp]"]
  node_client_ui["Game dialogs and responses<br/>[events.cpp]"]
end

node_client(("Growtopia client"))
node_game(("Ubisoft game servers"))
node_server_data(("Server-data endpoint"))
node_hosts["Hosts and DNS"]

node_client -->|"starts proxy workflow"| node_entry
node_entry -->|"fetches server data"| node_server_data
node_entry -->|"updates hosts and DNS"| node_hosts
node_client -->|"connects locally"| node_server
node_server -->|"uses transport"| node_enet
node_server -->|"forwards game traffic"| node_game
node_game -->|"returns game traffic"| node_server
node_server -->|"dispatches game events"| node_events
node_events -->|"builds command dialog"| node_dialog
node_events -->|"handles movement commands"| node_movement
node_events -->|"handles automation commands"| node_automation
node_events -->|"handles casino commands"| node_casino
node_events -->|"handles inventory commands"| node_inventory
node_events -->|"handles visual commands"| node_visuals
node_events -->|"handles moderation commands"| node_moderation
node_server -->|"parses world data"| node_world_parse
node_world_parse -->|"updates world state"| node_world_state
node_events -->|"reads and updates player"| node_player_state
node_events -->|"reads and updates world"| node_world_state
node_events -->|"sends client responses"| node_client_ui
node_server -->|"records proxy data"| node_logs

click node_entry "https://github.com/markus6222/nexus-proxy/blob/main/proxy.cpp"
click node_server "https://github.com/markus6222/nexus-proxy/blob/main/server.cpp"
click node_enet "https://github.com/markus6222/nexus-proxy/blob/main/enet/include/enet/enet.h"
click node_events "https://github.com/markus6222/nexus-proxy/blob/main/events.cpp"
click node_dialog "https://github.com/markus6222/nexus-proxy/blob/main/dialog.cpp"
click node_movement "https://github.com/markus6222/nexus-proxy/blob/main/server.cpp"
click node_automation "https://github.com/markus6222/nexus-proxy/blob/main/events.cpp"
click node_casino "https://github.com/markus6222/nexus-proxy/blob/main/events.cpp"
click node_inventory "https://github.com/markus6222/nexus-proxy/blob/main/playerInventory.cpp"
click node_visuals "https://github.com/markus6222/nexus-proxy/blob/main/events.cpp"
click node_moderation "https://github.com/markus6222/nexus-proxy/blob/main/events.cpp"
click node_world_state "https://github.com/markus6222/nexus-proxy/blob/main/world/NewWorld.h"
click node_player_state "https://github.com/markus6222/nexus-proxy/blob/main/player.h"
click node_world_parse "https://github.com/markus6222/nexus-proxy/blob/main/world/NewWorld.h"
click node_logs "https://github.com/markus6222/nexus-proxy/blob/main/utils.cpp"
click node_client_ui "https://github.com/markus6222/nexus-proxy/blob/main/events.cpp"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_entry,node_server,node_enet,node_client toneBlue
class node_events,node_movement,node_automation,node_casino,node_inventory,node_visuals,node_moderation toneAmber
class node_world_state,node_player_state,node_world_parse,node_logs,node_game,node_server_data toneMint
class node_dialog,node_client_ui toneRose
class node_hosts toneIndigo
```

## Components

### Proxy connection

- [Proxy startup](https://github.com/markus6222/nexus-proxy/blob/main/proxy.cpp): `proxy.cpp`
- [ENet proxy](https://github.com/markus6222/nexus-proxy/blob/main/server.cpp): `server.cpp`
- [ENet transport](https://github.com/markus6222/nexus-proxy/blob/main/enet/include/enet/enet.h): `enet/include/enet/enet.h`

### Command features

- [Packet and command handlers](https://github.com/markus6222/nexus-proxy/blob/main/events.cpp): `events.cpp`
- [Movement and pathfinding](https://github.com/markus6222/nexus-proxy/blob/main/server.cpp): `server.cpp`
- [Automation commands](https://github.com/markus6222/nexus-proxy/blob/main/events.cpp): `events.cpp`
- [Casino and hosting](https://github.com/markus6222/nexus-proxy/blob/main/events.cpp): `events.cpp`
- [Inventory and drops](https://github.com/markus6222/nexus-proxy/blob/main/playerInventory.cpp): `playerInventory.cpp`
- [Visual and account options](https://github.com/markus6222/nexus-proxy/blob/main/events.cpp): `events.cpp`
- [Moderation commands](https://github.com/markus6222/nexus-proxy/blob/main/events.cpp): `events.cpp`

### World and player state

- [World and object state](https://github.com/markus6222/nexus-proxy/blob/main/world/NewWorld.h): `world/NewWorld.h`
- [Player state](https://github.com/markus6222/nexus-proxy/blob/main/player.h): `player.h`
- [World parsing](https://github.com/markus6222/nexus-proxy/blob/main/world/NewWorld.h): `world/NewWorld.h`
- [Logs and saved data](https://github.com/markus6222/nexus-proxy/blob/main/utils.cpp): `utils.cpp`

### Client presentation

- [Command dialog](https://github.com/markus6222/nexus-proxy/blob/main/dialog.cpp): `dialog.cpp`
- [Game dialogs and responses](https://github.com/markus6222/nexus-proxy/blob/main/events.cpp): `events.cpp`

### Other components

- **Growtopia client**
- **Ubisoft game servers**
- **Server-data endpoint**
- **Hosts and DNS**

## Connections

- Growtopia client → Proxy startup: starts proxy workflow
- Proxy startup → Server-data endpoint: fetches server data
- Proxy startup → Hosts and DNS: updates hosts and DNS
- Growtopia client → ENet proxy: connects locally
- ENet proxy → ENet transport: uses transport
- ENet proxy → Ubisoft game servers: forwards game traffic
- Ubisoft game servers → ENet proxy: returns game traffic
- ENet proxy → Packet and command handlers: dispatches game events
- Packet and command handlers → Command dialog: builds command dialog
- Packet and command handlers → Movement and pathfinding: handles movement commands
- Packet and command handlers → Automation commands: handles automation commands
- Packet and command handlers → Casino and hosting: handles casino commands
- Packet and command handlers → Inventory and drops: handles inventory commands
- Packet and command handlers → Visual and account options: handles visual commands
- Packet and command handlers → Moderation commands: handles moderation commands
- ENet proxy → World parsing: parses world data
- World parsing → World and object state: updates world state
- Packet and command handlers → Player state: reads and updates player
- Packet and command handlers → World and object state: reads and updates world
- Packet and command handlers → Game dialogs and responses: sends client responses
- ENet proxy → Logs and saved data: records proxy data
