{"id":79249,"date":"2026-06-04T16:42:27","date_gmt":"2026-06-04T13:42:27","guid":{"rendered":"https:\/\/vpesports.com\/minecraft\/mods\/haproxydetectorpaper\/"},"modified":"2026-06-04T16:42:27","modified_gmt":"2026-06-04T13:42:27","slug":"haproxydetectorpaper","status":"publish","type":"mod","link":"https:\/\/vpesports.com\/minecraft\/mods\/haproxydetectorpaper\/","title":{"rendered":"HAProxyDetectorPaper"},"content":{"rendered":"<p># HAProxyDetector<\/p>\n<p>A lightweight plugin for Paper\/Folia and Velocity that makes native HAProxy \/ Proxy Protocol support compatible with normal direct player connections.<\/p>\n<p>## Core Features<\/p>\n<p>&#8211; **Mixed Connection Support**: Accepts real HAProxy\/frp proxy traffic and normal direct player traffic at the same time.<br \/>\n&#8211; **Native Parser Compatibility**: Adds a synthetic HAProxy V2 header to direct traffic so the server can continue using its native proxy-protocol parsing flow.<br \/>\n&#8211; **Whitelist Supports Domain \/ IP \/ CIDR**: `whitelist` supports single IP entries, CIDR ranges, and domain names.<br \/>\n&#8211; **Minimal Intercept Logging**: Logs when a non-whitelisted proxy connection is blocked, including the frps source IP and client IP.<\/p>\n<p>## How It Works<\/p>\n<p>1. **Real HAProxy traffic**: If a valid HAProxy v1\/v2 header is detected, it is passed directly to the server&#8217;s native parser.<br \/>\n2. **Normal direct players**: If no HAProxy header exists, the plugin adds a synthetic HAProxy V2 header based on the player&#8217;s real socket address.<br \/>\n3. **Synthetic header protection**: Internally marks self-generated headers so later whitelist checks will not mistake them for external frps traffic.<br \/>\n4. **Whitelist filtering**: When `enable-whitelist` is enabled, only real external proxy sources are checked.<\/p>\n<p>## Supported Platforms<\/p>\n<p>&#8211; **Paper \/ Folia**: Theoretically supports versions with native HAProxy support.<br \/>\n&#8211; **Velocity**: Theoretically supports `3.0.0+`.<\/p>\n<p>## Configuration<\/p>\n<p>Paper and Velocity use the same `config.yml` structure:<\/p>\n<p>&#8220;`<br \/>\nenable-whitelist: true<br \/>\nwhitelist:<br \/>\n  &#8211; 127.0.0.1<br \/>\n  &#8211; &#8220;::1&#8221;<br \/>\n  &#8211; frps.example.com<br \/>\n  &#8211; 203.0.113.0\/24<br \/>\n&#8220;`<\/p>\n<p>### Whitelist Rules<\/p>\n<p>&#8211; **IP**: Exact match.<br \/>\n&#8211; **CIDR**: Network range match, for example `203.0.113.0\/24`.<br \/>\n&#8211; **Domain**: Automatically resolved into an IP list when the plugin loads the configuration.<\/p>\n<p>### Notes About Domain Whitelist Entries<\/p>\n<p>&#8211; Domain names are resolved when the plugin loads or reloads its configuration, not on every connection.<br \/>\n&#8211; If the DNS result changes later, restart or reload the plugin to refresh the resolved IP list.<br \/>\n&#8211; If a domain temporarily fails to resolve, the plugin will not fail to start and will keep the original config entry.<\/p>\n<p>## Logging Behavior<\/p>\n<p>Logs are only printed when a non-whitelisted HAProxy connection is blocked.<\/p>\n<p>Log fields:<br \/>\n&#8211; `frps`: The real source IP of the upstream proxy server.<br \/>\n&#8211; `client`: The client source IP carried in the HAProxy header.<\/p>\n<p>Example:<\/p>\n<p>&#8220;`<br \/>\n[HAProxyDetectorPaper] \u62e6\u622a\u975e\u767d\u540d\u5355 frps \u8fde\u63a5: frps=91.78.69.13, client=91.78.69.13<br \/>\n&#8220;`<\/p>\n<p>## Usage<\/p>\n<p>1. **Enable native HAProxy support**:<br \/>\n   &#8211; **Paper \/ Folia**: Set `proxy-protocol` to `true` in `config\/paper-global.yml` (newer versions) or `paper.yml` (older versions).<br \/>\n   &#8211; **Velocity**: Set `haproxy = true` in `velocity.toml`.<br \/>\n2. **Install the plugin**: Put the plugin JAR into the correct platform plugin directory.<br \/>\n3. **Configure the whitelist if needed**: If you only want to allow specific frps sources, edit `whitelist` in `config.yml`.<br \/>\n4. **Restart the server \/ proxy**.<\/p>\n<p>## Disable \/ Unload Behavior<\/p>\n<p>The plugin actively removes its injected Netty handlers during disable or shutdown, so unloading it will not continue affecting new connections.<br \/>\nFor low-level network plugins in production environments, a full restart is still the safest option.<\/p>\n<p>## Technical Details<\/p>\n<p>&#8211; **Netty ChannelPipeline Injection**: Intercepts raw `ByteBuf` at the front of the network pipeline.<br \/>\n&#8211; **Feature Detection**: Uses reflection to locate the server connection structure without depending on one fixed field name.<br \/>\n&#8211; **HAProxy V2 Header Forging**: Generates a standard HAProxy V2 header for direct connections.<br \/>\n&#8211; **Synthetic Marker**: Prevents self-generated headers from being checked again as external proxy traffic.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>HAProxyDetector for Paper and Velocity<\/p>\n","protected":false},"featured_media":0,"template":"","meta":{"_minecraft_slug":"haproxydetectorpaper","_minecraft_project_id":"ajXAHSmP","_minecraft_author":"TendoArisu","_minecraft_license":"MIT","_minecraft_downloads":65,"_minecraft_follows":0,"_minecraft_client_side":"unsupported","_minecraft_server_side":"required","_minecraft_storage_type":"zip","_minecraft_archive_name":"haproxydetectorpaper.zip","_minecraft_size_bytes":58308,"_minecraft_version_count":4,"_minecraft_updated_at":"2026-05-15T20:35:16.829975Z","_minecraft_date_created":"2026-02-07T06:45:14.011607Z","_minecraft_date_modified":"2026-04-08T11:53:42.476784Z","_minecraft_project_url":"https:\/\/modrinth.com\/mod\/haproxydetectorpaper","_minecraft_icon_attachment_id":0,"_minecraft_imported_at":"2026-06-04T13:42:27+00:00","_minecraft_import_hash":"1dba5d5309d741d1e1ad3a448544a0ba","_minecraft_versions":"","_minecraft_links":"","_minecraft_gallery":"","_minecraft_api_metadata":""},"mod_category":[125,126,127,128,985],"mod_loader":[131,132,133,986],"minecraft_version":[59,36,60,93,94,101,102,62,37,40,41,73,74,38,78,79,80,81,82],"class_list":["post-79249","mod","type-mod","status-publish","hentry","mod_category-folia","mod_category-management","mod_category-paper","mod_category-purpur","mod_category-velocity","mod_loader-folia","mod_loader-paper","mod_loader-purpur","mod_loader-velocity","minecraft_version-1-20","minecraft_version-1-20-1","minecraft_version-1-20-2","minecraft_version-1-20-3","minecraft_version-1-20-4","minecraft_version-1-20-5","minecraft_version-1-20-6","minecraft_version-1-21","minecraft_version-1-21-1","minecraft_version-1-21-10","minecraft_version-1-21-11","minecraft_version-1-21-2","minecraft_version-1-21-3","minecraft_version-1-21-4","minecraft_version-1-21-5","minecraft_version-1-21-6","minecraft_version-1-21-7","minecraft_version-1-21-8","minecraft_version-1-21-9"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>HAProxyDetectorPaper - Minecraft<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/vpesports.com\/minecraft\/mods\/haproxydetectorpaper\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"HAProxyDetectorPaper - Minecraft\" \/>\n<meta property=\"og:description\" content=\"HAProxyDetector for Paper and Velocity\" \/>\n<meta property=\"og:url\" content=\"https:\/\/vpesports.com\/minecraft\/mods\/haproxydetectorpaper\/\" \/>\n<meta property=\"og:site_name\" content=\"Minecraft\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/haproxydetectorpaper\\\/\",\"url\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/haproxydetectorpaper\\\/\",\"name\":\"HAProxyDetectorPaper - Minecraft\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/#website\"},\"datePublished\":\"2026-06-04T13:42:27+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/haproxydetectorpaper\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/haproxydetectorpaper\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/haproxydetectorpaper\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Mods\",\"item\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"HAProxyDetectorPaper\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/#website\",\"url\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/\",\"name\":\"Minecraft\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"HAProxyDetectorPaper - Minecraft","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/vpesports.com\/minecraft\/mods\/haproxydetectorpaper\/","og_locale":"en_US","og_type":"article","og_title":"HAProxyDetectorPaper - Minecraft","og_description":"HAProxyDetector for Paper and Velocity","og_url":"https:\/\/vpesports.com\/minecraft\/mods\/haproxydetectorpaper\/","og_site_name":"Minecraft","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/vpesports.com\/minecraft\/mods\/haproxydetectorpaper\/","url":"https:\/\/vpesports.com\/minecraft\/mods\/haproxydetectorpaper\/","name":"HAProxyDetectorPaper - Minecraft","isPartOf":{"@id":"https:\/\/vpesports.com\/minecraft\/#website"},"datePublished":"2026-06-04T13:42:27+00:00","breadcrumb":{"@id":"https:\/\/vpesports.com\/minecraft\/mods\/haproxydetectorpaper\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/vpesports.com\/minecraft\/mods\/haproxydetectorpaper\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/vpesports.com\/minecraft\/mods\/haproxydetectorpaper\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/vpesports.com\/minecraft\/"},{"@type":"ListItem","position":2,"name":"Mods","item":"https:\/\/vpesports.com\/minecraft\/mods\/"},{"@type":"ListItem","position":3,"name":"HAProxyDetectorPaper"}]},{"@type":"WebSite","@id":"https:\/\/vpesports.com\/minecraft\/#website","url":"https:\/\/vpesports.com\/minecraft\/","name":"Minecraft","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/vpesports.com\/minecraft\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/mod\/79249","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/mod"}],"about":[{"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/types\/mod"}],"wp:attachment":[{"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/media?parent=79249"}],"wp:term":[{"taxonomy":"mod_category","embeddable":true,"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/mod_category?post=79249"},{"taxonomy":"mod_loader","embeddable":true,"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/mod_loader?post=79249"},{"taxonomy":"minecraft_version","embeddable":true,"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/minecraft_version?post=79249"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}