$ show AllesUgo/Minecraft-Speed-Proxy
This repository implements a Minecraft reverse proxy server in C++ using the Asio asynchronous networking library. It intercepts Minecraft client connections, forwards them to a remote server, and provides features such as whitelist/blacklist access control, customizable MOTD (server list ping), per-user proxy routing, traffic monitoring, and a web-based control API. The architecture is event-driven with callbacks for login/logout events. The codebase includes a vendored copy of Asio (standalone) and a custom utility library (rbslib) providing buffer management, stream abstractions, varint encoding, command-line parsing, and file I/O. The proxy handles Minecraft protocol packets (handshake, status, login, ping) and supports both synchronous and asynchronous I/O via C++20 coroutines. While functional and reasonably well-structured, the project lacks automated tests, has some incomplete features, and uses Chinese comments which may hinder international maintenance. The vendored Asio library is large and may become outdated, but the core proxy logic is solid.
The LLM identified 2 files worth highlighting for reuse:
Implements variable-length integer (varint) encoding and decoding, both synchronously and asynchronously using Asio coroutines. The Integer class provides methods to read/write varints from streams, with async variants that return awaitable objects. This is a reusable pattern for any binary protocol that uses varint framing (e.g., Minecraft, Protobuf). The code demonstrates non-obvious skill in combining template metaprogramming with coroutine-based I/O.
Provides a flexible command-line parser with support for nested subcommands, variable arguments, and automatic help text generation. The CommandLine class parses arguments and dispatches to registered CommandExecuter nodes. This is a self-contained utility that can be extracted and reused in any C++ application requiring a structured CLI, independent of the proxy's domain logic.