[GH-ISSUE #4290] Feature request: Add "Accept Proxy Protocol" toggle for XHTTP transport in UI #2929

Closed
opened 2026-10-31 20:28:57 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @w3struk on GitHub (May 12, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/4290

Yes. When building advanced architectures, a common setup is having a "Frontend" Xray inbound (e.g., VLESS + TCP + XTLS-Vision on port 443) that terminates TLS and uses the fallbacks routing mechanism to send specific HTTP paths to a local "Backend" XHTTP inbound.

To preserve the real client IPs, the Frontend fallback is configured with xver: 1 or xver: 2 (PROXY protocol). However, the 3x-ui panel does not have an "Accept Proxy Protocol" toggle for the XHTTP transport. Because of this, the XHTTP backend cannot accept the connection, or if xver is omitted, all clients appear to connect from 127.0.0.1. This breaks IP tracking, connection limits, and makes the built-in Fail2Ban feature completely ineffective for XHTTP inbounds behind a fallback.

Describe the solution you'd like

I would like an "Accept Proxy Protocol" toggle switch added to the UI in the Inbound settings when the XHTTP network is selected (similar to how it currently exists for TCP, WS, and HTTPUpgrade transports).

When this toggle is enabled in the UI, it should add "acceptProxyProtocol": true to the sockopt object inside the streamSettings for that inbound in the generated Xray JSON config. Xray-core already fully supports this.

Example of the expected Xray config generation:

"streamSettings": {
  "network": "xhttp",
  "xhttpSettings": {
    "path": "/api",
    "mode": "auto"
  },
  "sockopt": {
    "acceptProxyProtocol": true
  }
}

Describe alternatives you've considered

No response

Checklist

  • This feature report is written entirely in English.
Originally created by @w3struk on GitHub (May 12, 2026). Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/4290 ### Is your feature request related to a problem? Yes. When building advanced architectures, a common setup is having a "Frontend" Xray inbound (e.g., VLESS + TCP + XTLS-Vision on port 443) that terminates TLS and uses the `fallbacks` routing mechanism to send specific HTTP paths to a local "Backend" XHTTP inbound. To preserve the real client IPs, the Frontend fallback is configured with `xver: 1` or `xver: 2` (PROXY protocol). However, the 3x-ui panel does not have an "Accept Proxy Protocol" toggle for the XHTTP transport. Because of this, the XHTTP backend cannot accept the connection, or if `xver` is omitted, all clients appear to connect from `127.0.0.1`. This breaks IP tracking, connection limits, and makes the built-in Fail2Ban feature completely ineffective for XHTTP inbounds behind a fallback. ### Describe the solution you'd like I would like an **"Accept Proxy Protocol"** toggle switch added to the UI in the Inbound settings when the **XHTTP** network is selected (similar to how it currently exists for TCP, WS, and HTTPUpgrade transports). When this toggle is enabled in the UI, it should add `"acceptProxyProtocol": true` to the `sockopt` object inside the `streamSettings` for that inbound in the generated Xray JSON config. Xray-core already fully supports this. Example of the expected Xray config generation: ``` "streamSettings": { "network": "xhttp", "xhttpSettings": { "path": "/api", "mode": "auto" }, "sockopt": { "acceptProxyProtocol": true } } ``` ### Describe alternatives you've considered _No response_ ### Checklist - [x] This feature report is written entirely in English.
bsakaguchi 2026-10-31 20:28:57 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
MHSanaei/3x-ui#2929
No description provided.