17
0
HAProxyDetector
A lightweight plugin designed to solve the compatibility issue where direct connections are impossible after enabling HAProxy (Proxy Protocol) support on Paper or Velocity.
Core Features
- Mixed Connection Support: Allows servers with
proxy-protocol: trueto simultaneously receive proxy traffic from HAProxy/frp and direct traffic from players. - Native Parser Compatibility: Instead of taking over complex protocol parsing, the plugin injects a fake HAProxy V2 header into direct traffic. This "tricks" the server's native parser, allowing all traffic to follow the official, most stable parsing path.
- Zero Configuration / Zero Dependencies: No ProtocolLib required, no whitelist configuration needed. Plug and play.
- Cross-Version Compatibility: Based on Netty-level injection and feature detection, theoretically supports all Minecraft versions with strong cross-version stability.
Why Choose This Plugin?
Traditional HAProxy plugins are often "patch-style," meaning they force support onto servers that don't natively have it. This causes conflicts in modern Paper versions, which already have a more secure built-in implementation.
This plugin adopts an "auxiliary" approach:
- For frp/Proxy Players: If an existing protocol header is detected, it is passed through directly without interfering with the original IP chain.
- For Direct Players: If a missing protocol header is detected, a fake header containing the player's real IP is immediately prepended. This allows the server's native parser to extract and apply the player's real address directly.
Supported Platforms
- Paper/Purpur: Theoretically supports all versions with native HAProxy functionality (Tested on 1.20.1 - 1.21.4).
- Velocity: Theoretically supports all 3.0.0+ versions.
Usage
- Enable Native HAProxy Support:
- Paper/Purpur: Set
proxy-protocoltotrueinconfig/paper-global.yml(Newer versions) orpaper.yml(Older versions). - Velocity: Set
haproxy = trueinvelocity.toml.
- Paper/Purpur: Set
- Install Plugin: Place the plugin JAR in the
pluginsfolder. - Restart Server.
Technical Implementation
- Netty ChannelPipeline Injection: Intercepts raw
ByteBufat the very front of the network processing pipeline. - Feature Detection Logic: Automatically identifies the
ServerConnectionfield in NMS without relying on specific field name obfuscation, providing high robustness across versions. - Protocol Header Forging: Implements standard HAProxy V2 protocol format injection.
Совместимость
Создатели
Детали
Лицензия:MIT
Опубликован:1 месяц назад
Обновлён:1 неделю назад
