[GH-ISSUE #6861] [Feature]: Add zero_rtt_handshake and disable_sni Support for TUIC #4560

Open
opened 2026-10-31 20:40:31 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @daemn119-boop on GitHub (Oct 17, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/6861

Currently, 3X-UI does not provide options to configure zero_rtt_handshake and disable_sni for TUIC in generated share links and subscription links.

Some clients, such as NekoBox for Android and sing-box on OpenWrt, may require these options to be configured explicitly. Without them, users have to manually edit their client configurations, which is inconvenient and makes configuration management more difficult.

Describe the solution you'd like

Please add two configurable options for TUIC in 3X-UI:

  • zero_rtt_handshake — enable or disable 0-RTT.
  • disable_sni — enable or disable SNI.

These options should be configurable in the TUIC inbound settings and included in generated share links and subscription output when enabled.

For example, the generated TUIC link could include the following parameters, provided they are supported by the relevant URI format and client:

zero_rtt_handshake=1&disable_sni=1

Ideally, both options should be disabled by default to preserve backward compatibility.

This would allow users to configure TUIC clients without manually editing exported configurations and would improve compatibility with sing-box-based clients.

Thank you for considering this feature request!

Alternatives you've considered

No response

Concrete use case

No response

Mockups, screenshots, or examples

No response

Which parts of the panel would this affect?

No response

Are you willing to help?

  • I'd like to implement this feature myself and open a PR.
  • I can help test once a PR is open.

Before submitting

  • I searched existing issues and this feature has not been requested.
  • This feature request is written in English.
Originally created by @daemn119-boop on GitHub (Oct 17, 2026). Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/6861 ### Is your feature request related to a problem? Currently, 3X-UI does not provide options to configure `zero_rtt_handshake` and `disable_sni` for TUIC in generated share links and subscription links. Some clients, such as NekoBox for Android and sing-box on OpenWrt, may require these options to be configured explicitly. Without them, users have to manually edit their client configurations, which is inconvenient and makes configuration management more difficult. ### Describe the solution you'd like Please add two configurable options for TUIC in 3X-UI: - `zero_rtt_handshake` — enable or disable 0-RTT. - `disable_sni` — enable or disable SNI. These options should be configurable in the TUIC inbound settings and included in generated share links and subscription output when enabled. For example, the generated TUIC link could include the following parameters, provided they are supported by the relevant URI format and client: `zero_rtt_handshake=1&disable_sni=1` Ideally, both options should be disabled by default to preserve backward compatibility. This would allow users to configure TUIC clients without manually editing exported configurations and would improve compatibility with sing-box-based clients. Thank you for considering this feature request! ### Alternatives you've considered _No response_ ### Concrete use case _No response_ ### Mockups, screenshots, or examples _No response_ ### Which parts of the panel would this affect? _No response_ ### Are you willing to help? - [ ] I'd like to implement this feature myself and open a PR. - [ ] I can help test once a PR is open. ### Before submitting - [x] I searched [existing issues](../issues?q=is%3Aissue) and this feature has not been requested. - [x] This feature request is written in English.
Author
Owner

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

This is a valid feature request. Part of it already exists. The TUIC inbound already has a Zero-RTT Handshake switch, and the Clash/Mihomo export already uses it. The tuic:// share link does not include it, and the panel has no disable_sni option anywhere.

What the code does today

  • 0-RTT on the server: the switch is settings.server.zero_rtt_handshake (frontend/src/pages/inbounds/form/protocols/tuic.tsx:100). The built-in TUIC server passes it to QUIC as Allow0RTT: inst.ZeroRTTHandshake, (internal/tuic/server.go:107).
  • Clash / Mihomo export: this output already includes the setting. The subscription sends "reduce-rtt": inst.ZeroRTTHandshake, (internal/sub/clash_service.go:713). The YAML you download from the QR modal writes reduce-rtt: ${reduceRtt} (frontend/src/pages/clients/tuicConfig.ts:64).
  • tuic:// share link: this is the gap. The Go subscription builder (genTuicLink, internal/sub/service.go:871-887) only writes congestion_control, alpn, sni, udp_relay_mode and allow_insecure. The link built in the panel (genTuicLink, frontend/src/lib/xray/inbound-link.ts:918-944) writes the same five. Neither one adds a 0-RTT parameter, even when the inbound has 0-RTT turned on.
  • disable_sni: nothing in internal/ or frontend/src defines it. It is purely a client-side TLS option: the server cannot see whether a client sends SNI. The panel could only add it as a hint in the link and the subscription output.
  • JSON subscription: TUIC inbounds are skipped here (case "amneziawg", "tuic": continue at internal/sub/json_service.go:678). Clients that read the JSON subscription get no TUIC entry, with or without these options.

Notes for whoever implements it

  • When 0-RTT is on, copy the existing zero_rtt_handshake value into the tuic:// query. It has to go into both link builders above, because the panel and the subscription server generate links separately.
  • disable_sni would need a new field, and it should stay off by default, as you asked. That means a schema field, a form switch, a new i18n key in all 13 locale files, and the two link builders. Its only effect is on what clients receive.
  • tuic:// has no official URI standard. Clients read these parameter names differently, so the names should be checked against the clients you mentioned (NekoBox, sing-box) before they are chosen. I have not checked that here.

I found no earlier issue requesting this. #6757 (BBR in uppercase for TUIC) touches the same link code but is a different problem.

Verdict: Feature request

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

<!-- gh-comment-id:6232019898 --> @github-actions[bot] commented on GitHub (Oct 17, 2026): This is a valid feature request. Part of it already exists. The TUIC inbound already has a **Zero-RTT Handshake** switch, and the Clash/Mihomo export already uses it. The `tuic://` share link does not include it, and the panel has no `disable_sni` option anywhere. **What the code does today** - **0-RTT on the server:** the switch is `settings.server.zero_rtt_handshake` (`frontend/src/pages/inbounds/form/protocols/tuic.tsx:100`). The built-in TUIC server passes it to QUIC as `Allow0RTT: inst.ZeroRTTHandshake,` (`internal/tuic/server.go:107`). - **Clash / Mihomo export:** this output already includes the setting. The subscription sends `"reduce-rtt": inst.ZeroRTTHandshake,` (`internal/sub/clash_service.go:713`). The YAML you download from the QR modal writes `reduce-rtt: ${reduceRtt}` (`frontend/src/pages/clients/tuicConfig.ts:64`). - **`tuic://` share link:** this is the gap. The Go subscription builder (`genTuicLink`, `internal/sub/service.go:871-887`) only writes `congestion_control`, `alpn`, `sni`, `udp_relay_mode` and `allow_insecure`. The link built in the panel (`genTuicLink`, `frontend/src/lib/xray/inbound-link.ts:918-944`) writes the same five. Neither one adds a 0-RTT parameter, even when the inbound has 0-RTT turned on. - **`disable_sni`:** nothing in `internal/` or `frontend/src` defines it. It is purely a client-side TLS option: the server cannot see whether a client sends SNI. The panel could only add it as a hint in the link and the subscription output. - **JSON subscription:** TUIC inbounds are skipped here (`case "amneziawg", "tuic": continue` at `internal/sub/json_service.go:678`). Clients that read the JSON subscription get no TUIC entry, with or without these options. **Notes for whoever implements it** - When 0-RTT is on, copy the existing `zero_rtt_handshake` value into the `tuic://` query. It has to go into both link builders above, because the panel and the subscription server generate links separately. - `disable_sni` would need a new field, and it should stay off by default, as you asked. That means a schema field, a form switch, a new i18n key in all 13 locale files, and the two link builders. Its only effect is on what clients receive. - `tuic://` has no official URI standard. Clients read these parameter names differently, so the names should be checked against the clients you mentioned (NekoBox, sing-box) before they are chosen. I have not checked that here. I found no earlier issue requesting this. #6757 (BBR in uppercase for TUIC) touches the same link code but is a different problem. Verdict: Feature request *This reply was generated automatically; a maintainer may follow up.* <!-- claude-issue:analyst -->
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#4560
No description provided.