[GH-ISSUE #5465] [Bug]: v3.3.1 VLESS fallback settings are not saved and do not work. #3823

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

Originally created by @IDontKnower on GitHub (Jun 21, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5465

Describe the bug

Saving fallback rules didn't appeared in settings json for inbound.
And the opposite, adding fallback settings directly to json didn't appeared in ui inbound wizard.

Image Image

How to reproduce the problem

  1. Created inbound vless (tcp-raw + reality)
Image Image
  1. Edit inbound
  2. Go to protocol tab -> Fallbacks -> Add fallback to 9443
Image
  1. Save inbound

Expected behavior

After saving inbound, config has fallbacks section with saved fallback

Actual behavior

After saving, fallback setting didn't appeared in json, fallback didn't work, all traffic goes to vless
Image

Image

Relevant logs


Screenshots

No response

3x-ui version

3.3.1

Xray-core version

26.6.1

How did you install 3x-ui?

install.sh script

Operating system

Ubuntu 24.04.4 LTS

Which parts of the panel are affected?

Xray config generation

Browser (only if it is a UI bug)

No response

Is the panel behind a reverse proxy or CDN?

No — direct access

Before submitting

  • I searched existing issues and this bug has not been reported.
  • I am running the latest released version of 3x-ui (or have verified the bug still exists on it).
  • This bug report is written in English.
  • I have redacted any sensitive data (tokens, real domains, client UUIDs).
Originally created by @IDontKnower on GitHub (Jun 21, 2026). Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5465 ### Describe the bug Saving fallback rules didn't appeared in settings json for inbound. And the opposite, adding fallback settings directly to json didn't appeared in ui inbound wizard. <img width="778" height="656" alt="Image" src="https://github.com/user-attachments/assets/bc72f38f-82ab-476b-95b9-b20ed7c16e15" /> <img width="780" height="680" alt="Image" src="https://github.com/user-attachments/assets/8479a105-9c9f-4571-bfd2-83db61212cf7" /> ### How to reproduce the problem 1. Created inbound vless (tcp-raw + reality) <img width="781" height="515" alt="Image" src="https://github.com/user-attachments/assets/425a0f0e-1e60-4871-91ab-83786be2a9de" /> <img width="776" height="382" alt="Image" src="https://github.com/user-attachments/assets/ce3c322c-fa37-48b4-b6a3-5f39bd6cc752" /> 2. Edit inbound 3. Go to protocol tab -> Fallbacks -> Add fallback to 9443 <img width="789" height="660" alt="Image" src="https://github.com/user-attachments/assets/4ba3280c-6c15-45c3-8b8a-df64c225034f" /> 4. Save inbound ### Expected behavior After saving inbound, config has fallbacks section with saved fallback ### Actual behavior After saving, fallback setting didn't appeared in json, fallback didn't work, all traffic goes to vless <img width="778" height="656" alt="Image" src="https://github.com/user-attachments/assets/bc72f38f-82ab-476b-95b9-b20ed7c16e15" /> <img width="780" height="680" alt="Image" src="https://github.com/user-attachments/assets/8479a105-9c9f-4571-bfd2-83db61212cf7" /> ### Relevant logs ```shell ``` ### Screenshots _No response_ ### 3x-ui version 3.3.1 ### Xray-core version 26.6.1 ### How did you install 3x-ui? install.sh script ### Operating system Ubuntu 24.04.4 LTS ### Which parts of the panel are affected? Xray config generation ### Browser (only if it is a UI bug) _No response_ ### Is the panel behind a reverse proxy or CDN? No — direct access ### Before submitting - [x] I searched [existing issues](../issues?q=is%3Aissue) and this bug has not been reported. - [x] I am running the latest released version of 3x-ui (or have verified the bug still exists on it). - [x] This bug report is written in English. - [x] I have redacted any sensitive data (tokens, real domains, client UUIDs).
bsakaguchi 2026-10-31 20:35:13 +07:00
  • closed this issue
  • added the
    bug
    label
Author
Owner
<!-- gh-comment-id:4762062111 --> @IDontKnower commented on GitHub (Jun 21, 2026): https://github.com/MHSanaei/3x-ui/issues/4639 https://github.com/MHSanaei/3x-ui/issues/4748
Author
Owner

@github-actions[bot] commented on GitHub (Jun 21, 2026):

Investigated in source (v3.3.1 / main branch). The behavior you are seeing is caused by a design change in the fallback storage architecture introduced in v3.1.0, combined with a point of confusion about which JSON the UI shows.

How fallbacks work in v3.x

Fallbacks are no longer stored inside the inbound's settings.fallbacks JSON field. Since v3.1.0 they live in a dedicated inbound_fallbacks database table. Two separate components touch them:

  • FallbacksCard (Protocol tab in the inbound editor): reads from and writes to the inbound_fallbacks table via GET/POST /panel/api/inbounds/{id}/fallbacks. This is the correct UI for managing fallbacks.
  • Advanced tab JSON editor: shows and edits only the settings column of the inbound record — it does not display fallbacks, because they are not stored there.

The Xray config is generated at restart time by injecting rows from the inbound_fallbacks table into the final settings.fallbacks array. The settings JSON stored in the database intentionally omits fallbacks; they are merged in dynamically.

This means:

  1. Saving via FallbacksCard → does not change the settings JSON shown in the Advanced tab. That is expected. The fallbacks are saved to the separate table and injected into the live Xray config on the next restart (within ~30 seconds).
  2. Manually editing fallbacks in the Advanced tab JSON → does not populate the FallbacksCard. The FallbacksCard reads the table, not the settings JSON. Manual JSON edits to fallbacks will survive a form re-save only until the FallbacksCard has any entries, at which point the table takes precedence. The Advanced editor is not the correct place to manage fallbacks.

How to verify the fallback actually saved

After saving in the inbound editor:

  1. Re-open the same inbound for editing and switch to the Protocol tab. If the FallbacksCard shows the fallback row (e.g., dest: 9443), the database write succeeded.
  2. Wait up to 30 seconds for the scheduled Xray restart to apply the change, then inspect the generated Xray config:
    cat /usr/local/x-ui/bin/config.json | python3 -m json.tool | grep -A 20 '"fallbacks"'
    
    (The exact path depends on XUI_BIN_FOLDER; the default relative to the x-ui binary is bin/config.json.)

If the FallbacksCard is empty after reopening

The database write may have failed silently. Open the browser developer tools (F12 → Network tab), reproduce the save, and look for the POST /panel/api/inbounds/{id}/fallbacks request. Check its response body for an error message.

Note on VLESS + REALITY + fallbacks

The panel code (inbound_protocol.go:streamSupportsFallbacks) confirms that REALITY security is eligible for fallbacks alongside TLS. The FallbacksCard will appear and save correctly for VLESS/TCP/REALITY. However, for the fallback to actually route traffic, something must be listening on the destination port (9443 in your example). If nothing is listening there, connections will fail at the network layer rather than being routed by Xray. Xray's fallback fires for non-VLESS traffic on the inbound port and forwards it to the configured dest; the receiving service on that port is outside the panel's control.

Summary of the two observations

Observation Expected or Bug?
Settings JSON in Advanced tab has no fallbacks after FallbacksCard save Expected — fallbacks live in a separate table
Adding fallbacks to the Advanced JSON doesn't appear in FallbacksCard Expected — FallbacksCard reads the table, not the JSON
FallbacksCard still empty after reopening (if that is the case) Bug — the POST /panel/api/inbounds/{id}/fallbacks call may be failing

If you can confirm (1) whether the FallbacksCard is empty when you reopen the inbound, and (2) the contents of the POST …/fallbacks network response from the browser dev tools, that will pinpoint whether the issue is a save failure or an expectation mismatch.

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

<!-- gh-comment-id:4762062305 --> @github-actions[bot] commented on GitHub (Jun 21, 2026): Investigated in source (v3.3.1 / main branch). The behavior you are seeing is caused by a **design change in the fallback storage architecture** introduced in v3.1.0, combined with a point of confusion about which JSON the UI shows. **How fallbacks work in v3.x** Fallbacks are no longer stored inside the inbound's `settings.fallbacks` JSON field. Since v3.1.0 they live in a dedicated `inbound_fallbacks` database table. Two separate components touch them: - **FallbacksCard** (Protocol tab in the inbound editor): reads from and writes to the `inbound_fallbacks` table via `GET/POST /panel/api/inbounds/{id}/fallbacks`. This is the correct UI for managing fallbacks. - **Advanced tab JSON editor**: shows and edits only the `settings` column of the inbound record — it does **not** display fallbacks, because they are not stored there. The Xray config is generated at restart time by injecting rows from the `inbound_fallbacks` table into the final `settings.fallbacks` array. The settings JSON stored in the database intentionally omits fallbacks; they are merged in dynamically. This means: 1. **Saving via FallbacksCard → does not change the settings JSON shown in the Advanced tab.** That is expected. The fallbacks are saved to the separate table and injected into the live Xray config on the next restart (within ~30 seconds). 2. **Manually editing `fallbacks` in the Advanced tab JSON → does not populate the FallbacksCard.** The FallbacksCard reads the table, not the settings JSON. Manual JSON edits to `fallbacks` will survive a form re-save only until the FallbacksCard has any entries, at which point the table takes precedence. The Advanced editor is not the correct place to manage fallbacks. **How to verify the fallback actually saved** After saving in the inbound editor: 1. Re-open the same inbound for editing and switch to the **Protocol** tab. If the FallbacksCard shows the fallback row (e.g., `dest: 9443`), the database write succeeded. 2. Wait up to 30 seconds for the scheduled Xray restart to apply the change, then inspect the generated Xray config: ```bash cat /usr/local/x-ui/bin/config.json | python3 -m json.tool | grep -A 20 '"fallbacks"' ``` (The exact path depends on `XUI_BIN_FOLDER`; the default relative to the x-ui binary is `bin/config.json`.) **If the FallbacksCard is empty after reopening** The database write may have failed silently. Open the browser developer tools (F12 → Network tab), reproduce the save, and look for the `POST /panel/api/inbounds/{id}/fallbacks` request. Check its response body for an error message. **Note on VLESS + REALITY + fallbacks** The panel code (`inbound_protocol.go:streamSupportsFallbacks`) confirms that REALITY security is eligible for fallbacks alongside TLS. The FallbacksCard will appear and save correctly for VLESS/TCP/REALITY. However, for the fallback to actually route traffic, something must be listening on the destination port (9443 in your example). If nothing is listening there, connections will fail at the network layer rather than being routed by Xray. Xray's fallback fires for non-VLESS traffic on the inbound port and forwards it to the configured `dest`; the receiving service on that port is outside the panel's control. **Summary of the two observations** | Observation | Expected or Bug? | |---|---| | Settings JSON in Advanced tab has no `fallbacks` after FallbacksCard save | Expected — fallbacks live in a separate table | | Adding `fallbacks` to the Advanced JSON doesn't appear in FallbacksCard | Expected — FallbacksCard reads the table, not the JSON | | FallbacksCard still empty after reopening (if that is the case) | Bug — the `POST /panel/api/inbounds/{id}/fallbacks` call may be failing | If you can confirm (1) whether the FallbacksCard is empty when you reopen the inbound, and (2) the contents of the `POST …/fallbacks` network response from the browser dev tools, that will pinpoint whether the issue is a save failure or an expectation mismatch. *This reply was generated automatically; a maintainer may follow up.*
Author
Owner

@IDontKnower commented on GitHub (Jun 21, 2026):

Confirm that fallback settings are injected in config.json after x-ui restart

sudo cat /usr/local/x-ui/bin/config.json | python3 -m json.tool | grep -A 20 '"fallbacks"'
                "fallbacks": [
                    {
                        "dest": "127.0.0.1:9443"
                    }
                ],
                "testseed": [
                    900,
                    500,
                    900,
                    256
                ]
            },

Start caddy with config

{
    admin off
    debug
}
:9445 {
    bind 127.0.0.1
    respond "Caddy HTTP fallback test OK" 200
}

:9443 {
    bind 127.0.0.1
    tls internal
    respond "Caddy HTTPS with SNI OK" 200
}


cz-xray-datacheap-1.duckdns.org:9443 {
    bind 127.0.0.1
    tls internal
    respond "Caddy HTTPS with SNI OK" 200
}

which works with sni curl

$ curl --resolve cz-xray-datacheap-1.duckdns.org:9443:127.0.0.1 https://cz-xray-datacheap-1.duckdns.org:9443/
Caddy HTTPS with SNI OK

But trying to curl 443 on xray get me tls issue

$ curl -v --resolve cz-xray-datacheap-1.duckdns.org:443:127.0.0.1 https://cz-xray-datacheap-1.duckdns.org:443/
* Added cz-xray-datacheap-1.duckdns.org:443:127.0.0.1 to DNS cache
* Hostname cz-xray-datacheap-1.duckdns.org was found in DNS cache
*   Trying 127.0.0.1:443...
* Connected to cz-xray-datacheap-1.duckdns.org (127.0.0.1) port 443
* ALPN: curl offers h2,http/1.1
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
*  CAfile: /etc/ssl/certs/ca-certificates.crt
*  CApath: /etc/ssl/certs
* TLSv1.3 (IN), TLS alert, internal error (592):
* OpenSSL/3.0.13: error:0A000438:SSL routines::tlsv1 alert internal error
* Closing connection
curl: (35) OpenSSL/3.0.13: error:0A000438:SSL routines::tlsv1 alert internal error

In x-ui error.log have this
2026/06/21 16:00:38.322616 [Info] transport/internet/tcp: REALITY: processed invalid connection from 127.0.0.1:51178: server name mismatch: cz-xray-datacheap-1.duckdns.org

<!-- gh-comment-id:4762209867 --> @IDontKnower commented on GitHub (Jun 21, 2026): Confirm that fallback settings are injected in config.json after x-ui restart ``` sudo cat /usr/local/x-ui/bin/config.json | python3 -m json.tool | grep -A 20 '"fallbacks"' "fallbacks": [ { "dest": "127.0.0.1:9443" } ], "testseed": [ 900, 500, 900, 256 ] }, ``` Start caddy with config ``` { admin off debug } :9445 { bind 127.0.0.1 respond "Caddy HTTP fallback test OK" 200 } :9443 { bind 127.0.0.1 tls internal respond "Caddy HTTPS with SNI OK" 200 } cz-xray-datacheap-1.duckdns.org:9443 { bind 127.0.0.1 tls internal respond "Caddy HTTPS with SNI OK" 200 } ``` which works with sni curl ``` $ curl --resolve cz-xray-datacheap-1.duckdns.org:9443:127.0.0.1 https://cz-xray-datacheap-1.duckdns.org:9443/ Caddy HTTPS with SNI OK ``` But trying to curl 443 on xray get me tls issue ``` $ curl -v --resolve cz-xray-datacheap-1.duckdns.org:443:127.0.0.1 https://cz-xray-datacheap-1.duckdns.org:443/ * Added cz-xray-datacheap-1.duckdns.org:443:127.0.0.1 to DNS cache * Hostname cz-xray-datacheap-1.duckdns.org was found in DNS cache * Trying 127.0.0.1:443... * Connected to cz-xray-datacheap-1.duckdns.org (127.0.0.1) port 443 * ALPN: curl offers h2,http/1.1 * TLSv1.3 (OUT), TLS handshake, Client hello (1): * CAfile: /etc/ssl/certs/ca-certificates.crt * CApath: /etc/ssl/certs * TLSv1.3 (IN), TLS alert, internal error (592): * OpenSSL/3.0.13: error:0A000438:SSL routines::tlsv1 alert internal error * Closing connection curl: (35) OpenSSL/3.0.13: error:0A000438:SSL routines::tlsv1 alert internal error ``` In x-ui error.log have this `2026/06/21 16:00:38.322616 [Info] transport/internet/tcp: REALITY: processed invalid connection from 127.0.0.1:51178: server name mismatch: cz-xray-datacheap-1.duckdns.org`
Author
Owner

@IDontKnower commented on GitHub (Jun 21, 2026):

Update caddy config (previous one with error and didn't obtain certificate)

{
    admin off
    debug
    email *MASKED*
    https_port 9443

}
:9445 {
    bind 127.0.0.1
    respond "Caddy HTTP fallback test OK" 200
}

cz-xray-datacheap-1.duckdns.org {
    respond "Caddy HTTPS with SNI OK" 200
}

Allow 9443 port in ufw to check direct connect to caddy

$ sudo ufw status | grep 9443
9443/tcp                   ALLOW       Anywhere
9443/tcp (v6)              ALLOW       Anywhere (v6)

Check direct connect to caddy

$ curl https://cz-xray-datacheap-1.duckdns.org:9443
Caddy HTTPS with SNI OK

Check connect through xray

curl https://cz-xray-datacheap-1.duckdns.org
curl: (35) OpenSSL/3.0.13: error:0A000438:SSL routines::tlsv1 alert internal error

Xray error log

2026/06/21 17:26:04.987409 [Info] [2895558709] proxy/vless/inbound: firstLen = 1186
2026/06/21 17:26:04.987496 [Info] [2895558709] proxy/vless/inbound: received request for tcp:cz-xray-datacheap-1.duckdns.org:443
2026/06/21 17:26:04.987512 [Info] [2895558709] app/dispatcher: default route for tcp:cz-xray-datacheap-1.duckdns.org:443
2026/06/21 17:26:05.113317 [Info] [2895558709] proxy/freedom: dialing to tcp:45.151.183.140:443
2026/06/21 17:26:05.113454 [Info] [2895558709] transport/internet/tcp: dialing TCP to tcp:45.151.183.140:443
2026/06/21 17:26:05.113465 [Debug] [2895558709] transport/internet: dialing to tcp:45.151.183.140:443
2026/06/21 17:26:05.114494 [Info] [2895558709] proxy/freedom: connection opened to tcp:cz-xray-datacheap-1.duckdns.org:443, local endpoint 45.151.183.140:54496, remote endpoint 45.151.183.140:443
2026/06/21 17:26:05.115177 [Debug] [2895558709] proxy: Xtls Unpadding new block, content 517 padding 655 command 0
2026/06/21 17:26:05.115352 [Debug] [2895558709] proxy: XtlsFilterTls found tls client hello! 517
2026/06/21 17:26:05.170006 [Debug] [2895558709] proxy: XtlsPadding 7 1286 0
2026/06/21 17:26:06.171111 [Info] transport/internet/tcp: REALITY: processed invalid connection from 45.151.183.140:54496: server name mismatch: cz-xray-datacheap-1.duckdns.org

part of config.json with fallbacks

$ sudo cat /usr/local/x-ui/bin/config.json | python3 -m json.tool | grep -A 15 '"fallbacks"'
                "fallbacks": [
                    {
                        "dest": "127.0.0.1:9443"
                    }
                ],
                "testseed": [
                    900,
                    500,
                    900,
                    256
                ]
            },
            "streamSettings": {
                "network": "tcp",
                "realitySettings": {
                    "maxClientVer": "",
<!-- gh-comment-id:4762431045 --> @IDontKnower commented on GitHub (Jun 21, 2026): Update caddy config (previous one with error and didn't obtain certificate) ``` { admin off debug email *MASKED* https_port 9443 } :9445 { bind 127.0.0.1 respond "Caddy HTTP fallback test OK" 200 } cz-xray-datacheap-1.duckdns.org { respond "Caddy HTTPS with SNI OK" 200 } ``` Allow 9443 port in ufw to check direct connect to caddy ``` $ sudo ufw status | grep 9443 9443/tcp ALLOW Anywhere 9443/tcp (v6) ALLOW Anywhere (v6) ``` Check direct connect to caddy ``` $ curl https://cz-xray-datacheap-1.duckdns.org:9443 Caddy HTTPS with SNI OK ``` Check connect through xray ``` curl https://cz-xray-datacheap-1.duckdns.org curl: (35) OpenSSL/3.0.13: error:0A000438:SSL routines::tlsv1 alert internal error ``` Xray error log ``` 2026/06/21 17:26:04.987409 [Info] [2895558709] proxy/vless/inbound: firstLen = 1186 2026/06/21 17:26:04.987496 [Info] [2895558709] proxy/vless/inbound: received request for tcp:cz-xray-datacheap-1.duckdns.org:443 2026/06/21 17:26:04.987512 [Info] [2895558709] app/dispatcher: default route for tcp:cz-xray-datacheap-1.duckdns.org:443 2026/06/21 17:26:05.113317 [Info] [2895558709] proxy/freedom: dialing to tcp:45.151.183.140:443 2026/06/21 17:26:05.113454 [Info] [2895558709] transport/internet/tcp: dialing TCP to tcp:45.151.183.140:443 2026/06/21 17:26:05.113465 [Debug] [2895558709] transport/internet: dialing to tcp:45.151.183.140:443 2026/06/21 17:26:05.114494 [Info] [2895558709] proxy/freedom: connection opened to tcp:cz-xray-datacheap-1.duckdns.org:443, local endpoint 45.151.183.140:54496, remote endpoint 45.151.183.140:443 2026/06/21 17:26:05.115177 [Debug] [2895558709] proxy: Xtls Unpadding new block, content 517 padding 655 command 0 2026/06/21 17:26:05.115352 [Debug] [2895558709] proxy: XtlsFilterTls found tls client hello! 517 2026/06/21 17:26:05.170006 [Debug] [2895558709] proxy: XtlsPadding 7 1286 0 2026/06/21 17:26:06.171111 [Info] transport/internet/tcp: REALITY: processed invalid connection from 45.151.183.140:54496: server name mismatch: cz-xray-datacheap-1.duckdns.org ``` part of config.json with fallbacks ``` $ sudo cat /usr/local/x-ui/bin/config.json | python3 -m json.tool | grep -A 15 '"fallbacks"' "fallbacks": [ { "dest": "127.0.0.1:9443" } ], "testseed": [ 900, 500, 900, 256 ] }, "streamSettings": { "network": "tcp", "realitySettings": { "maxClientVer": "", ```
Author
Owner

@MHSanaei commented on GitHub (Jun 21, 2026):

Thanks for the very thorough testing — the config.json dump and the Caddy setup make this easy to diagnose. Short version: the fallback is being saved and injected correctly. What you're hitting is how REALITY handles non-REALITY traffic, which is expected xray-core behavior, not a panel bug.

Let me separate the two things you observed.

1. Fallbacks not showing in the Advanced JSON — expected

Since v3.1.0 fallbacks are not stored in the inbound's settings column. They live in a dedicated inbound_fallbacks table and are merged into settings.fallbacks only at config-generation time. So:

  • Protocol tab → Fallbacks is the source of truth (it reads/writes the table).
  • The Advanced tab JSON editor shows only the settings column, which intentionally never contains fallbacks.

Your config.json already proves the save + injection worked:

"fallbacks": [ { "dest": "127.0.0.1:9443" } ]

That row went table → generated config exactly as designed.

2. The fallback "doesn't route traffic" — this is REALITY, not a bug

This is the important part, and it corrects the earlier automated reply (which described TLS fallback behavior — REALITY is different).

REALITY intercepts the TLS handshake at the transport layer, before the VLESS proxy ever sees the connection. There are three possible outcomes:

  1. Valid REALITY client → REALITY decrypts and hands the stream to VLESS. Only here, if the inner stream is not valid VLESS, does the VLESS fallbacks list fire.

  2. Non-REALITY client, SNI matches serverNames → REALITY transparently relays the connection to the camouflage target (realitySettings.target / dest) so the probe sees the borrowed certificate. The VLESS fallbacks are not consulted.

  3. Non-REALITY client, SNI not in serverNames → REALITY rejects the connection. That is exactly your log line:

    REALITY: processed invalid connection ... server name mismatch: cz-xray-datacheap-1.duckdns.org
    

A curl/browser is never a valid REALITY client, so it can only ever land in case 2 or 3 — it can never reach the VLESS fallbacks entry at 127.0.0.1:9443. That fallback only catches traffic that has already authenticated as REALITY+VLESS and then carries non-VLESS data, which an external probe cannot produce.

So the fallback is wired correctly; it just isn't reachable the way the test expects.

One more note on your second test: cz-xray-datacheap-1.duckdns.org resolves to the server's own IP (45.151.183.140), so the request goes out through freedom and loops back into the server's own REALITY inbound — that's why you see proxy/freedom: dialing to ... 45.151.183.140:443 right before the mismatch. That's a routing loop, not the fallback firing.

What to do instead

  • If you want non-proxy traffic on :443 to reach a local web server (reachable by curl/a browser), use TLS with a real certificate + fallbacks. That's the classic VLESS-fallback setup, and the Fallbacks card works the same way for it.
  • With REALITY, the equivalent of a "fallback site" is the camouflage target + serverNames in realitySettings, not the VLESS fallbacks list. Point those at the site you want probes to see.

This is working as designed rather than a panel bug, but happy to dig further if your setup differs from the above. Thanks again for the detailed write-up.

<!-- gh-comment-id:4762565125 --> @MHSanaei commented on GitHub (Jun 21, 2026): Thanks for the very thorough testing — the `config.json` dump and the Caddy setup make this easy to diagnose. Short version: **the fallback is being saved and injected correctly. What you're hitting is how REALITY handles non-REALITY traffic, which is expected `xray-core` behavior, not a panel bug.** Let me separate the two things you observed. ### 1. Fallbacks not showing in the Advanced JSON — expected Since v3.1.0 fallbacks are not stored in the inbound's `settings` column. They live in a dedicated `inbound_fallbacks` table and are merged into `settings.fallbacks` only at config-generation time. So: - **Protocol tab → Fallbacks** is the source of truth (it reads/writes the table). - The **Advanced tab** JSON editor shows only the `settings` column, which intentionally never contains `fallbacks`. Your `config.json` already proves the save + injection worked: ```json "fallbacks": [ { "dest": "127.0.0.1:9443" } ] ``` That row went table → generated config exactly as designed. ### 2. The fallback "doesn't route traffic" — this is REALITY, not a bug This is the important part, and it corrects the earlier automated reply (which described **TLS** fallback behavior — REALITY is different). REALITY intercepts the TLS handshake at the **transport layer, before** the VLESS proxy ever sees the connection. There are three possible outcomes: 1. **Valid REALITY client** → REALITY decrypts and hands the stream to VLESS. *Only here*, if the inner stream is not valid VLESS, does the VLESS `fallbacks` list fire. 2. **Non-REALITY client, SNI matches `serverNames`** → REALITY transparently relays the connection to the camouflage target (`realitySettings.target` / `dest`) so the probe sees the borrowed certificate. The VLESS `fallbacks` are **not** consulted. 3. **Non-REALITY client, SNI not in `serverNames`** → REALITY rejects the connection. That is exactly your log line: ``` REALITY: processed invalid connection ... server name mismatch: cz-xray-datacheap-1.duckdns.org ``` A `curl`/browser is never a valid REALITY client, so it can only ever land in case **2** or **3** — it can **never** reach the VLESS `fallbacks` entry at `127.0.0.1:9443`. That fallback only catches traffic that has *already authenticated as REALITY+VLESS* and then carries non-VLESS data, which an external probe cannot produce. So the fallback is wired correctly; it just isn't reachable the way the test expects. One more note on your second test: `cz-xray-datacheap-1.duckdns.org` resolves to the server's own IP (`45.151.183.140`), so the request goes out through `freedom` and loops back into the server's own REALITY inbound — that's why you see `proxy/freedom: dialing to ... 45.151.183.140:443` right before the mismatch. That's a routing loop, not the fallback firing. ### What to do instead - If you want **non-proxy traffic on :443 to reach a local web server** (reachable by `curl`/a browser), use **TLS with a real certificate** + fallbacks. That's the classic VLESS-fallback setup, and the Fallbacks card works the same way for it. - With **REALITY**, the equivalent of a "fallback site" is the camouflage `target` + `serverNames` in `realitySettings`, not the VLESS `fallbacks` list. Point those at the site you want probes to see. This is working as designed rather than a panel bug, but happy to dig further if your setup differs from the above. Thanks again for the detailed write-up.
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#3823
No description provided.