[GH-ISSUE #6978] [Bug]: TUIC inbound disappears from subscription clients after upgrading to v3.11.0 #4602

Closed
opened 2026-10-31 20:40:48 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @djoker0726-ui on GitHub (Oct 27, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/6978

Describe the bug

After upgrading 3x-ui from v3.10.2 to v3.11.0, the TUIC inbound disappeared from the proxy list in both v2rayN and Shadowrocket after updating the subscription.

The TUIC inbound still exists in the 3x-ui panel, and clients are attached to it. The Exclude from subscription option is disabled.

When opening the subscription URL directly in a browser, the TUIC link is present in the subscription content. However, after updating the subscription in either v2rayN or Shadowrocket, the TUIC proxy is missing from the list.

Adding the TUIC link manually to either application works correctly, and the connection is successful.

This issue did not occur in 3x-ui v3.10.2. It started immediately after upgrading to v3.11.0 and updating the subscriptions.

How to reproduce the problem

  1. Upgrade 3x-ui from v3.10.2 to v3.11.0.

  2. Make sure a TUIC inbound exists and has clients attached.

  3. Ensure that Exclude from subscription is disabled for the TUIC inbound.

  4. Update the subscription in v2rayN or Shadowrocket.

  5. Observe that the TUIC proxy is missing from the proxy list.

  6. Open the same subscription URL in a browser and verify that the TUIC link is present in the subscription content.

  7. Add the TUIC link manually to the application.

  8. Verify that the manually added TUIC proxy appears in the list and connects successfully.

  9. Repeat the subscription update in the other application and observe the same issue.

Expected behavior

The TUIC inbound should remain available in the proxy list after updating the subscription, as it did in 3x-ui v3.10.2.

Actual behavior

The TUIC inbound disappears from the proxy list after updating the subscription in both v2rayN and Shadowrocket, even though the TUIC link is present in the subscription content served by 3x-ui.

Manually adding the same TUIC link works correctly.

Environment

3x-ui version: v3.11.0

Previous working version: v3.10.2

Proxy clients: v2rayN and Shadowrocket

Subscription format: Standard subscription (not Xray JSON)

TUIC inbound: Enabled and assigned to clients

Exclude from subscription: Disabled

Additional information

The issue occurs in two different proxy clients. The TUIC inbound itself appears to be functional because a manually added TUIC link connects successfully.

The issue may be related to a change in subscription generation or subscription parsing introduced in v3.11.0, but the exact cause has not yet been determined.

Relevant logs


Screenshots

Image Image Image Image

3x-ui version

3.11.0

Xray-core version

26.6.27

How did you install 3x-ui?

Docker / Docker Compose

Operating system

Ubuntu 22.04.5 LTS

Which parts of the panel are affected?

No response

Browser (only if it is a UI bug)

Firefox 158.0.1

Is the panel behind a reverse proxy or CDN?

None

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 @djoker0726-ui on GitHub (Oct 27, 2026). Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/6978 ### Describe the bug After upgrading 3x-ui from v3.10.2 to v3.11.0, the TUIC inbound disappeared from the proxy list in both v2rayN and Shadowrocket after updating the subscription. The TUIC inbound still exists in the 3x-ui panel, and clients are attached to it. The Exclude from subscription option is disabled. When opening the subscription URL directly in a browser, the TUIC link is present in the subscription content. However, after updating the subscription in either v2rayN or Shadowrocket, the TUIC proxy is missing from the list. Adding the TUIC link manually to either application works correctly, and the connection is successful. This issue did not occur in 3x-ui v3.10.2. It started immediately after upgrading to v3.11.0 and updating the subscriptions. ### How to reproduce the problem 1. Upgrade 3x-ui from v3.10.2 to v3.11.0. 2. Make sure a TUIC inbound exists and has clients attached. 3. Ensure that Exclude from subscription is disabled for the TUIC inbound. 4. Update the subscription in v2rayN or Shadowrocket. 5. Observe that the TUIC proxy is missing from the proxy list. 6. Open the same subscription URL in a browser and verify that the TUIC link is present in the subscription content. 7. Add the TUIC link manually to the application. 8. Verify that the manually added TUIC proxy appears in the list and connects successfully. 9. Repeat the subscription update in the other application and observe the same issue. ### Expected behavior The TUIC inbound should remain available in the proxy list after updating the subscription, as it did in 3x-ui v3.10.2. ### Actual behavior The TUIC inbound disappears from the proxy list after updating the subscription in both v2rayN and Shadowrocket, even though the TUIC link is present in the subscription content served by 3x-ui. Manually adding the same TUIC link works correctly. Environment 3x-ui version: v3.11.0 Previous working version: v3.10.2 Proxy clients: v2rayN and Shadowrocket Subscription format: Standard subscription (not Xray JSON) TUIC inbound: Enabled and assigned to clients Exclude from subscription: Disabled Additional information The issue occurs in two different proxy clients. The TUIC inbound itself appears to be functional because a manually added TUIC link connects successfully. The issue may be related to a change in subscription generation or subscription parsing introduced in v3.11.0, but the exact cause has not yet been determined. ### Relevant logs ```shell ``` ### Screenshots <img width="619" height="360" alt="Image" src="https://github.com/user-attachments/assets/55ade9b4-ede1-472c-b348-a7f7c0ecb01c" /> <img width="883" height="911" alt="Image" src="https://github.com/user-attachments/assets/588a7a97-7f0f-4ee3-9111-9f29bd6aba4a" /> <img width="1381" height="425" alt="Image" src="https://github.com/user-attachments/assets/3d78b3ea-c502-42d7-aaf5-27fa3245df98" /> <img width="1179" height="2556" alt="Image" src="https://github.com/user-attachments/assets/7a0cc381-7303-4696-b02b-2a72ce3bb84d" /> ### 3x-ui version 3.11.0 ### Xray-core version 26.6.27 ### How did you install 3x-ui? Docker / Docker Compose ### Operating system Ubuntu 22.04.5 LTS ### Which parts of the panel are affected? _No response_ ### Browser (only if it is a UI bug) Firefox 158.0.1 ### Is the panel behind a reverse proxy or CDN? None ### 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).
Author
Owner

@github-actions[bot] commented on GitHub (Oct 27, 2026):

This is a real regression in v3.11.0. The standard subscription that v2rayN and Shadowrocket download now leaves out the TUIC link. The HTML page your browser shows still has it, because that page is built from a different code path.

What changed. v3.11.0 added a cache for subscription bodies (commit 73fad424, "perf(sub): cache each inbound's settings without clients for subscription bodies (#6758)"). The cache keeps each inbound's settings JSON without its clients array. Most link generators look up the client in the clients table, so they still work. The TUIC generator is the exception: it still reads the client's UUID and password from settings.clients. In the cached copy that array is gone, so it finds no client and returns an empty string.

Why the browser still shows it. The browser gets the HTML subscription page (buildSubPageData, internal/sub/controller.go:436). That page sets subscriptionBody = false, which skips the cache, so it reads the full settings. Apps get the raw body (internal/sub/controller.go:504), which sets subscriptionBody = true and goes through the cache.

Workaround until it is fixed: keep the TUIC link added by hand in v2rayN or Shadowrocket. As you found, that link works. Other protocols in the same subscription are not affected.

@MHSanaei: confirmed regression in v3.11.0. Raw subscriptions drop every TUIC link.

Verdict:        Confirmed bug
Severity:       High
Confidence:     High
Root cause:     internal/sub/service.go:950-966, genTuicLink, reads the client from
                tuic.InstanceFromInbound(inbound).Clients, i.e. settings.clients.
                For subscription bodies, loadInboundsBySubId (service.go:752-776)
                swaps inbound.Settings for the cached copy built by withoutClients
                (internal/sub/settings_cache.go:89-103), which removes "clients".
                inst.Clients ends up empty, client == nil, and genTuicLink returns "".
                Introduced by 73fad424 (#6758). It hits every TUIC inbound on the
                raw subscription route (subscriptionBody = true; the cache is always
                on, controller.go:300).
Same class:     internal/sub/clash_service.go:724-742 buildTuicProxy also reads
                inst.Clients, but only as a fallback when model.Client.ID or
                .Password is empty, so Clash breaks only for clients whose table
                row lacks them (inferred, not traced).
                JSON subscriptions skip TUIC (json_service.go:743).
                No other generator in internal/sub reads settings.clients.
Already fixed:  Still present on the default branch (HEAD == v3.11.0, no later commits).
Duplicate of:   None
Evidence:       settings_cache.go:97  `delete(shallow, "clients")`
                service.go:752        `cached := s.settingsCache != nil && s.subscriptionBody`
                service.go:790-792    only WireGuard/AmneziaWG get the full settings:
                                      `if inbound.Protocol == model.WireGuard || inbound.Protocol == model.AmneziaWG { return load() }`
                service.go:955-966    `for _, c := range inst.Clients { if c.Email == email { ... } }`
                                      ... `if client == nil || client.UUID == "" || client.Password == "" { return "" }`
                tuic/types.go:232-250 Clients is built only from parsed.Clients (settings JSON)
                Contrast: genMtprotoLink / genVlessLink / genHysteriaLink use
                s.clientForLink (service.go:176), which reads the clients table.
                No test covers TUIC under the settings cache (settings_cache_test.go).
Not determined: Whether TUIC rows in the clients table always have ID and Password
                filled in. That decides whether the clientForLink fix below is enough
                and whether the Clash fallback ever fires. Check by reading the
                clients rows for a TUIC inbound.

Suggested fix: make genTuicLink resolve the client through s.clientForLink(inbound, email) (using ID/Password from the clients table), as the other generators do, and keep InstanceFromInbound only for inbound-level fields (cc, alpn, sni, udp_relay_mode). If TUIC credentials are not reliably stored in the clients table, the alternative is to add model.TUIC to the full-settings exception in subscriptionSettings (service.go:790), next to WireGuard and AmneziaWG. That also covers the Clash fallback. A regression test should fetch a raw subscription through the cached subscriptionBody = true path and assert that the tuic:// line is present.

I could not open the screenshots, but the written report was enough to settle this.

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

<!-- gh-comment-id:6435794391 --> @github-actions[bot] commented on GitHub (Oct 27, 2026): This is a real regression in v3.11.0. The standard subscription that v2rayN and Shadowrocket download now leaves out the TUIC link. The HTML page your browser shows still has it, because that page is built from a different code path. **What changed.** v3.11.0 added a cache for subscription bodies (commit `73fad424`, "perf(sub): cache each inbound's settings without clients for subscription bodies (#6758)"). The cache keeps each inbound's `settings` JSON without its `clients` array. Most link generators look up the client in the clients table, so they still work. The TUIC generator is the exception: it still reads the client's UUID and password from `settings.clients`. In the cached copy that array is gone, so it finds no client and returns an empty string. **Why the browser still shows it.** The browser gets the HTML subscription page (`buildSubPageData`, `internal/sub/controller.go:436`). That page sets `subscriptionBody = false`, which skips the cache, so it reads the full settings. Apps get the raw body (`internal/sub/controller.go:504`), which sets `subscriptionBody = true` and goes through the cache. **Workaround until it is fixed:** keep the TUIC link added by hand in v2rayN or Shadowrocket. As you found, that link works. Other protocols in the same subscription are not affected. @MHSanaei: confirmed regression in v3.11.0. Raw subscriptions drop every TUIC link. ``` Verdict: Confirmed bug Severity: High Confidence: High Root cause: internal/sub/service.go:950-966, genTuicLink, reads the client from tuic.InstanceFromInbound(inbound).Clients, i.e. settings.clients. For subscription bodies, loadInboundsBySubId (service.go:752-776) swaps inbound.Settings for the cached copy built by withoutClients (internal/sub/settings_cache.go:89-103), which removes "clients". inst.Clients ends up empty, client == nil, and genTuicLink returns "". Introduced by 73fad424 (#6758). It hits every TUIC inbound on the raw subscription route (subscriptionBody = true; the cache is always on, controller.go:300). Same class: internal/sub/clash_service.go:724-742 buildTuicProxy also reads inst.Clients, but only as a fallback when model.Client.ID or .Password is empty, so Clash breaks only for clients whose table row lacks them (inferred, not traced). JSON subscriptions skip TUIC (json_service.go:743). No other generator in internal/sub reads settings.clients. Already fixed: Still present on the default branch (HEAD == v3.11.0, no later commits). Duplicate of: None Evidence: settings_cache.go:97 `delete(shallow, "clients")` service.go:752 `cached := s.settingsCache != nil && s.subscriptionBody` service.go:790-792 only WireGuard/AmneziaWG get the full settings: `if inbound.Protocol == model.WireGuard || inbound.Protocol == model.AmneziaWG { return load() }` service.go:955-966 `for _, c := range inst.Clients { if c.Email == email { ... } }` ... `if client == nil || client.UUID == "" || client.Password == "" { return "" }` tuic/types.go:232-250 Clients is built only from parsed.Clients (settings JSON) Contrast: genMtprotoLink / genVlessLink / genHysteriaLink use s.clientForLink (service.go:176), which reads the clients table. No test covers TUIC under the settings cache (settings_cache_test.go). Not determined: Whether TUIC rows in the clients table always have ID and Password filled in. That decides whether the clientForLink fix below is enough and whether the Clash fallback ever fires. Check by reading the clients rows for a TUIC inbound. ``` Suggested fix: make `genTuicLink` resolve the client through `s.clientForLink(inbound, email)` (using `ID`/`Password` from the clients table), as the other generators do, and keep `InstanceFromInbound` only for inbound-level fields (cc, alpn, sni, udp_relay_mode). If TUIC credentials are not reliably stored in the clients table, the alternative is to add `model.TUIC` to the full-settings exception in `subscriptionSettings` (service.go:790), next to WireGuard and AmneziaWG. That also covers the Clash fallback. A regression test should fetch a raw subscription through the cached `subscriptionBody = true` path and assert that the `tuic://` line is present. I could not open the screenshots, but the written report was enough to settle this. *This reply was generated automatically; a maintainer may follow up.* <!-- claude-issue:analyst -->
Author
Owner

@MHSanaei commented on GitHub (Nov 2, 2026):

Fixed on main in 43af7ada (fix(sub): restore TUIC links in subscriptions after v3.11.0, #6963): TUIC inbounds read their full settings again, so raw subscriptions carry the TUIC link.

<!-- gh-comment-id:6580224768 --> @MHSanaei commented on GitHub (Nov 2, 2026): Fixed on main in 43af7ada (fix(sub): restore TUIC links in subscriptions after v3.11.0, #6963): TUIC inbounds read their full settings again, so raw subscriptions carry the TUIC link.
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#4602
No description provided.