[GH-ISSUE #5919] [Question]: VLESS Reverse Proxy #4105

Closed
opened 2026-10-31 20:37:13 +07:00 by bsakaguchi · 7 comments
Owner

Originally created by @mshahr1 on GitHub (Jul 13, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5919

What are you trying to do?

Dear Mr. Sanaei, considering that version 3.5.0 no longer supports the stable Xray core, what do you suggest for setting up a reverse connection? Is this VLESS reverse issue truly a bug within the Xray core itself, or is there a workaround to fix it? We have been waiting for this issue to be resolved for quite some time now.

What have you already tried?

Adding final rule according to xray document, but nothing change

3x-ui version

3.5.0

How did you install 3x-ui?

install.sh script

Operating system

ubuntu 24

Screenshots or config snippets

No response

Before submitting

  • I read the Wiki and searched existing issues.
  • This is a usage question, not a bug report.
  • This question is written in English.
Originally created by @mshahr1 on GitHub (Jul 13, 2026). Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5919 ### What are you trying to do? Dear Mr. Sanaei, considering that version 3.5.0 no longer supports the stable Xray core, what do you suggest for setting up a reverse connection? Is this VLESS reverse issue truly a bug within the Xray core itself, or is there a workaround to fix it? We have been waiting for this issue to be resolved for quite some time now. ### What have you already tried? Adding final rule according to xray document, but nothing change ### 3x-ui version 3.5.0 ### How did you install 3x-ui? install.sh script ### Operating system ubuntu 24 ### Screenshots or config snippets _No response_ ### Before submitting - [x] I read the [Wiki](https://github.com/MHSanaei/3x-ui/wiki) and searched [existing issues](../issues?q=is%3Aissue). - [x] This is a usage question, not a bug report. - [x] This question is written in English.
Author
Owner

@github-actions[bot] commented on GitHub (Jul 13, 2026):

Both parts of the question have concrete answers in the source and in the upstream Xray-core tracker.

The panel genuinely no longer lets you install the old "stable" core. The release list the version picker offers is filtered in internal/web/service/server.go (the function backing GetXrayVersions()/UpdateXray()):

if major > 26 || (major == 26 && minor > 6) || (major == 26 && minor == 6 && patch >= 27) {
    versions = append(versions, release.TagName)
}

i.e. only xray-core v26.6.27 and newer is selectable. That floor was raised in v3.4.2 and is unchanged in v3.5.0, which bundles v26.7.11 by default (go.mod). So v26.4.25 — the version people pinned to as a workaround for reverse-proxy breakage — can no longer be chosen through Panel -> Xray Configuration -> Xray Version.

The "VLESS reverse breaks after v26.4.25" report was a real upstream bug, and it's already fixed. This project's own investigation on #4782 and #5793 traced it to xray-core's reverse-proxy rework (XTLS/Xray-core#5101): the new simplified reverse outbound registered with burstObservatory too late, so the health-checker marked it unreachable right after startup. That exact bug, XTLS/Xray-core#5750, is closed as completed (2026-03-27) - a patched build was community-tested and confirmed to register/verify the reverse outbound correctly. Since xray-core's tags are date-stamped (v26.6.27 ~ 2026-06-27, v26.7.11 ~ 2026-07-11, matching the 20260711155151 pseudo-version timestamp in this repo's go.mod), every core version the panel now lets you install already postdates that fix.

A second, separate upstream report, XTLS/Xray-core#6248 ("reverse setup problem after v26.4.25"), turned out not to be a core bug on inspection - maintainers traced it to a routing mismatch (portal blocked geoip:private while the bridge's freedom outbound only allowed private IPs, silently dropping the WAN traffic the user actually wanted reverse-proxied). Closed not_planned. That matches the second cause 3x-ui identified independently: newer xray-core added a default egress-safety policy on the freedom outbound that drops everything unless finalRules explicitly allows it.

3x-ui already ships a fix for that second cause, but it may not have reached your config. New installs' default template (internal/web/service/config.json) sets:

"finalRules": [{ "action": "allow" }]

on the direct freedom outbound, and an upgrade migration (normalizeFreedomFinalRules / the FreedomFinalRulesReverseFix seeder in internal/database/db.go) rewrites a stored one automatically - but only if it exactly matches the old narrow pattern [{"action":"allow","ip":["geoip:private"]}]. Any other existing value (missing finalRules entirely, or a custom rule that doesn't match that exact shape) is left untouched by the migration. You can check/set this yourself at Panel -> Xray Configuration -> Outbounds -> edit the freedom/direct outbound -> Final Rules field (frontend/src/pages/xray/outbounds/protocols/freedom.tsx) - it needs to be correct on both the portal and the bridge, matching the traffic scope you actually intend to reverse (WAN vs LAN), the same distinction that resolved XTLS/Xray-core#6248.

Since you said adding a final rule "changed nothing," that points away from a simple missing-finalRules case. Two other possibilities worth ruling out:

  1. It was only added on one of the two boxes, or the portal's own routing still blocks the traffic before it reaches the reverse tag.
  2. New in v3.5.0: outbound-save validation always checks against the panel's embedded xray-core (v26.7.11-equivalent), regardless of which external binary you actually run, and that validation now rejects an unencrypted VLESS/Trojan outbound whose address is public (internal/xray/api.go:178, ValidateOutboundConfig - see the comment directly above it, and internal/xray/outbound_validation_test.go). If your bridge's reverse outbound to the portal's public IP isn't wrapped in TLS/REALITY, the panel would now refuse to save it, with an error like xray core rejects outbound "<tag>": ... (internal/web/service/xray_setting.go:55). This gap is tracked separately in #5916.

To pin down which applies to you, could you share:

  1. The Xray-core version actually running on the portal and on the bridge (Panel -> Xray Configuration status, or xray -version if you manage the binary outside the panel).
  2. Both sides' reverse section, the freedom/direct outbound's finalRules, and any routing rule touching geoip:private or your reverse tag (redact UUIDs/domains/IPs).
  3. The Xray error log from the bridge around a failed connection attempt (Panel -> Logs).

For reference, reverse tags are configured under Outbounds (VLESS outbound -> Reverse Tag, frontend/src/pages/xray/outbounds/protocols/vless.tsx) and on the client (Client form -> Reverse Tag, frontend/src/pages/clients/ClientFormModal.tsx); routing rules then reference that tag. 3x-ui doesn't add its own semantics on top of this - the config still has to follow xray-core's own VLESS reverse proxy documentation, which you mentioned you've already consulted.

This reply was generated automatically; a maintainer may follow up.

<!-- gh-comment-id:4953975089 --> @github-actions[bot] commented on GitHub (Jul 13, 2026): Both parts of the question have concrete answers in the source and in the upstream Xray-core tracker. **The panel genuinely no longer lets you install the old "stable" core.** The release list the version picker offers is filtered in `internal/web/service/server.go` (the function backing `GetXrayVersions()`/`UpdateXray()`): ```go if major > 26 || (major == 26 && minor > 6) || (major == 26 && minor == 6 && patch >= 27) { versions = append(versions, release.TagName) } ``` i.e. only xray-core **v26.6.27 and newer** is selectable. That floor was raised in v3.4.2 and is unchanged in v3.5.0, which bundles **v26.7.11** by default (`go.mod`). So v26.4.25 — the version people pinned to as a workaround for reverse-proxy breakage — can no longer be chosen through Panel -> Xray Configuration -> Xray Version. **The "VLESS reverse breaks after v26.4.25" report was a real upstream bug, and it's already fixed.** This project's own investigation on #4782 and #5793 traced it to xray-core's reverse-proxy rework (`XTLS/Xray-core#5101`): the new simplified reverse outbound registered with `burstObservatory` too late, so the health-checker marked it unreachable right after startup. That exact bug, `XTLS/Xray-core#5750`, is closed as **completed** (2026-03-27) - a patched build was community-tested and confirmed to register/verify the reverse outbound correctly. Since xray-core's tags are date-stamped (v26.6.27 ~ 2026-06-27, v26.7.11 ~ 2026-07-11, matching the `20260711155151` pseudo-version timestamp in this repo's `go.mod`), every core version the panel now lets you install already postdates that fix. A second, separate upstream report, `XTLS/Xray-core#6248` ("reverse setup problem after v26.4.25"), turned out **not** to be a core bug on inspection - maintainers traced it to a routing mismatch (portal blocked `geoip:private` while the bridge's `freedom` outbound only allowed private IPs, silently dropping the WAN traffic the user actually wanted reverse-proxied). Closed **not_planned**. That matches the second cause 3x-ui identified independently: newer xray-core added a default egress-safety policy on the `freedom` outbound that drops everything unless `finalRules` explicitly allows it. **3x-ui already ships a fix for that second cause, but it may not have reached your config.** New installs' default template (`internal/web/service/config.json`) sets: ```json "finalRules": [{ "action": "allow" }] ``` on the `direct` freedom outbound, and an upgrade migration (`normalizeFreedomFinalRules` / the `FreedomFinalRulesReverseFix` seeder in `internal/database/db.go`) rewrites a stored one automatically - but **only** if it exactly matches the old narrow pattern `[{"action":"allow","ip":["geoip:private"]}]`. Any other existing value (missing `finalRules` entirely, or a custom rule that doesn't match that exact shape) is left untouched by the migration. You can check/set this yourself at Panel -> Xray Configuration -> Outbounds -> edit the `freedom`/`direct` outbound -> **Final Rules** field (`frontend/src/pages/xray/outbounds/protocols/freedom.tsx`) - it needs to be correct on **both** the portal and the bridge, matching the traffic scope you actually intend to reverse (WAN vs LAN), the same distinction that resolved `XTLS/Xray-core#6248`. Since you said adding a final rule "changed nothing," that points away from a simple missing-`finalRules` case. Two other possibilities worth ruling out: 1. It was only added on one of the two boxes, or the portal's own routing still blocks the traffic before it reaches the reverse tag. 2. New in v3.5.0: outbound-save validation always checks against the panel's **embedded** xray-core (v26.7.11-equivalent), regardless of which external binary you actually run, and that validation now rejects an unencrypted VLESS/Trojan outbound whose address is public (`internal/xray/api.go:178`, `ValidateOutboundConfig` - see the comment directly above it, and `internal/xray/outbound_validation_test.go`). If your bridge's reverse outbound to the portal's public IP isn't wrapped in TLS/REALITY, the panel would now refuse to save it, with an error like `xray core rejects outbound "<tag>": ...` (`internal/web/service/xray_setting.go:55`). This gap is tracked separately in #5916. To pin down which applies to you, could you share: 1. The Xray-core version actually **running** on the portal and on the bridge (Panel -> Xray Configuration status, or `xray -version` if you manage the binary outside the panel). 2. Both sides' `reverse` section, the `freedom`/`direct` outbound's `finalRules`, and any routing rule touching `geoip:private` or your reverse tag (redact UUIDs/domains/IPs). 3. The Xray error log from the bridge around a failed connection attempt (Panel -> Logs). For reference, reverse tags are configured under Outbounds (VLESS outbound -> **Reverse Tag**, `frontend/src/pages/xray/outbounds/protocols/vless.tsx`) and on the client (Client form -> **Reverse Tag**, `frontend/src/pages/clients/ClientFormModal.tsx`); routing rules then reference that tag. 3x-ui doesn't add its own semantics on top of this - the config still has to follow xray-core's own [VLESS reverse proxy documentation](https://xtls.github.io/en/document/level-2/vless_reverse.html), which you mentioned you've already consulted. *This reply was generated automatically; a maintainer may follow up.*
Author
Owner

@vinaquino commented on GitHub (Jul 13, 2026):

god, i also cant use RAW, no any feedback. i use 3.5 version, and ubuntu 22. god, i need help.

<!-- gh-comment-id:4954487976 --> @vinaquino commented on GitHub (Jul 13, 2026): god, i also cant use RAW, no any feedback. i use 3.5 version, and ubuntu 22. god, i need help.
Author
Owner

@joshualiu20120416-ops commented on GitHub (Jul 13, 2026):

"VLESS Reverse Proxy can be tricky with the latest 3x-ui v3.5.0 updates, especially on Ubuntu 24. It usually involves specific Nginx/Caddy stream configuration. If you've been stuck on this for hours and need a working config quickly, I'm available for a remote setup session. DM/check my profile bio for contact info.

<!-- gh-comment-id:4957949587 --> @joshualiu20120416-ops commented on GitHub (Jul 13, 2026): "VLESS Reverse Proxy can be tricky with the latest 3x-ui v3.5.0 updates, especially on Ubuntu 24. It usually involves specific Nginx/Caddy stream configuration. If you've been stuck on this for hours and need a working config quickly, I'm available for a remote setup session. DM/check my profile bio for contact info.
Author
Owner

@JamaliPour commented on GitHub (Jul 14, 2026):

  1. Downgrade 3x-ui to v3.4.1 by running the following command:

VERSION=v3.4.1 && bash <(curl -Ls "https://raw.githubusercontent.com/mhsanaei/3x-ui/$VERSION/install.sh") $VERSION

  1. In the panel, select Xray v26.4.25 and let it download/install.
  2. Connect to the server via SFTP, navigate to /usr/local/x-ui/bin, and make a backup of the xray-linux-amd64 file.
  3. Upgrade 3x-ui to the latest version (for example, v3.5.0).
  4. Replace the new xray-linux-amd64 file with the backup you created in step 3 (Xray v26.4.25).
  5. Restart Xray from the 3x-ui panel.
<!-- gh-comment-id:4973669795 --> @JamaliPour commented on GitHub (Jul 14, 2026): 1. Downgrade 3x-ui to **v3.4.1** by running the following command: `VERSION=v3.4.1 && bash <(curl -Ls "https://raw.githubusercontent.com/mhsanaei/3x-ui/$VERSION/install.sh") $VERSION` 2. In the panel, select **Xray v26.4.25** and let it download/install. 3. Connect to the server via SFTP, navigate to `/usr/local/x-ui/bin`, and make a backup of the `xray-linux-amd64` file. 4. Upgrade 3x-ui to the latest version (for example, **v3.5.0**). 5. Replace the new `xray-linux-amd64` file with the backup you created in step 3 (Xray v26.4.25). 6. Restart Xray from the 3x-ui panel.
Author
Owner

@mshahr1 commented on GitHub (Jul 15, 2026):

I'm looking forward for solution in new xray versions.

<!-- gh-comment-id:4977644636 --> @mshahr1 commented on GitHub (Jul 15, 2026): I'm looking forward for solution in new xray versions.
Author
Owner

@MHSanaei commented on GitHub (Jul 23, 2026):

Both parts have concrete answers.

Core version: correct — the panel no longer offers the old "stable" pin. The version picker only lists v26.6.27 and newer, and v3.5.0 bundles v26.7.11, so the old v26.4.25 pin isn't selectable.

Is reverse still broken? The original "VLESS reverse breaks after v26.4.25" was a real upstream xray-core bug and it's already fixed upstream — every core the panel now installs postdates that fix, so no downgrade is needed. What usually remains is config:

  1. Freedom finalRules. Newer xray-core drops traffic on the freedom/direct outbound unless finalRules allows it. New installs ship "finalRules":[{"action":"allow"}] and a migration rewrites the old narrow private-only value automatically — but any other pre-existing value is left as-is. Check Xray Config → Outbounds → edit freedom/direct → Final Rules on both the bridge and the portal, matching the WAN/LAN scope you actually want reverse-proxied. Since adding a rule "changed nothing," make sure it's set on both boxes and the portal's own routing isn't blocking the traffic before it reaches the reverse tag.
  2. Where reverse now lives: the old Reverse tab is gone. Configure it on the VLESS Outbound ("Reverse tag") and the VLESS Client ("Reverse tag"), then tie them under Routing — see #6055 for exact locations.
  3. Outbound-save validation (new in v3.5.0): saving a VLESS/Trojan outbound whose address is public but unencrypted is now rejected. If your bridge's outbound to the portal's public IP isn't wrapped in TLS/REALITY, the panel refuses to save it.

If Final Rules on both boxes doesn't resolve it, share your bridge and portal outbound/routing JSON and we'll pinpoint it.

<!-- gh-comment-id:5059220448 --> @MHSanaei commented on GitHub (Jul 23, 2026): Both parts have concrete answers. **Core version:** correct — the panel no longer offers the old "stable" pin. The version picker only lists `v26.6.27` and newer, and v3.5.0 bundles `v26.7.11`, so the old v26.4.25 pin isn't selectable. **Is reverse still broken?** The original "VLESS reverse breaks after v26.4.25" was a real upstream xray-core bug and it's **already fixed upstream** — every core the panel now installs postdates that fix, so no downgrade is needed. What usually remains is config: 1. **Freedom `finalRules`.** Newer xray-core drops traffic on the `freedom`/`direct` outbound unless `finalRules` allows it. New installs ship `"finalRules":[{"action":"allow"}]` and a migration rewrites the old narrow private-only value automatically — but any other pre-existing value is left as-is. Check **Xray Config → Outbounds → edit `freedom`/`direct` → Final Rules** on **both** the bridge and the portal, matching the WAN/LAN scope you actually want reverse-proxied. Since adding a rule "changed nothing," make sure it's set on both boxes and the portal's own routing isn't blocking the traffic before it reaches the reverse tag. 2. **Where reverse now lives:** the old Reverse tab is gone. Configure it on the VLESS **Outbound** ("Reverse tag") and the VLESS **Client** ("Reverse tag"), then tie them under **Routing** — see #6055 for exact locations. 3. **Outbound-save validation (new in v3.5.0):** saving a VLESS/Trojan outbound whose address is public but unencrypted is now rejected. If your bridge's outbound to the portal's public IP isn't wrapped in TLS/REALITY, the panel refuses to save it. If Final Rules on both boxes doesn't resolve it, share your bridge and portal outbound/routing JSON and we'll pinpoint it.
Author
Owner

@mshahr1 commented on GitHub (Jul 24, 2026):

جناب سنایی تمامی این موارد رعایت شده. با این وجود همچنان کار نمیکنه.

<!-- gh-comment-id:5066357311 --> @mshahr1 commented on GitHub (Jul 24, 2026): جناب سنایی تمامی این موارد رعایت شده. با این وجود همچنان کار نمیکنه.
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#4105
No description provided.