mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 19:11:53 +07:00
[GH-ISSUE #6332] [Feature]: Allow xtls-rprx-vision on VLESS + TCP + security:none when VLESS Encryption is enabled #4300
Labels
No labels
backlog
bug
clarification needed
documentation
duplicate
enhancement
github_actions
good first issue
invalid
javascript
New Feature
PR welcomed
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
MHSanaei/3x-ui#4300
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @BaseBlank on GitHub (Aug 26, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/6332
3x-ui version is v3.6.0
Is your feature request related to a problem?
When creating or editing a VLESS inbound with the following settings:
mlkem768x25519plus.native...)the panel currently forces
flowto empty (both in the UI and in the generated Xray config / share links).This is intentional in the current gating logic. From the test cases in the codebase:
(See commit
c7a76e9and related changes toinboundCanEnableTlsFlow.)However, Xray-core itself already supports this combination. In
proxy/vless/outbound/outbound.go, Vision explicitly accepts*encryption.CommonConn:Official Xray documentation also lists “VLESS Encryption” as a valid combination for XTLS/Vision (no underlying transport restriction).
So the core supports the configuration, but the panel actively prevents users from enabling it on TCP + security:none.
Describe the solution you'd like
Extend
inboundCanEnableTlsFlow(and the corresponding frontendcanEnableTlsFlowcheck) so that:protocol == VLESSnetworkistcp/rawsecurity == "none""none"(i.e. a realmlkem768x25519plus...value exists in settings)→
flow/xtls-rprx-visionshould be allowed (same as the existing XHTTP + Encryption case).Expected behavior:
"flow": "xtls-rprx-vision"when the user sets it.Alternatives you've considered
config.jsonafter the panel saves it (works, but is fragile and gets overwritten on next panel save / restart).None of these are ideal compared to the panel simply allowing a combination that Xray-core already accepts.
Concrete use case
Landing / exit node scenarios that use VLESS Encryption for authentication and PFS, with
security: none+ RAW/TCP (no need for TLS/REALITY camouflage on the landing side).In these setups the operator wants the option to enable
xtls-rprx-visionfor the data-path optimization that Vision provides (direct-copy / potential splice after the inner TLS is detected), without being forced to switch to XHTTP or manually patch the config.Mockups, screenshots, or examples
Current gating (from existing tests):
Desired:
No UI mockup needed — simply make the Flow selector appear under the same conditions that already apply to XHTTP + Encryption, and stop stripping the flow value in
clientWithInboundFlow/ config generation for this combination.Which parts of the panel would this affect?
Xray config generation, Frontend (UI / panel pages)
Are you willing to help?
Before submitting
@github-actions[bot] commented on GitHub (Aug 26, 2026):
Your reading of the panel is correct, and the restriction is deliberate rather than an oversight: the flow gate accepts VLESS Encryption as a stand-in for transport TLS only on XHTTP, so RAW/TCP +
security: none+ Encryption clearsflowon every surface at once. That makes this a valid feature request. The premise it rests on — that Xray-core accepts Vision on a raw TCP stream carrying only VLESS Encryption — is the one thing I could not verify here, and the repo currently asserts the opposite, so there are two questions at the bottom.What the panel does today
internal/web/service/inbound_protocol.go:46-53:The UI's RAW option stores
network: "tcp"(frontend/src/pages/inbounds/form/InboundFormModal.tsx:879—{ value: 'tcp', label: 'RAW' }), so RAW is exactly thiscase "tcp"branch.That one predicate is mirrored in four more places, which is why the value disappears from the form, the config and the links together:
c.Flow = "")internal/web/service/client_crud.go:288-292,internal/web/service/inbound_clients.go:227,internal/web/service/client_bulk.go:586-588tlsFlowCapableflag that shows/hides the Flow selectorinternal/web/service/inbound.go:379→frontend/src/pages/clients/ClientFormModal.tsx:472and:512-519(which also clears an already-set flow)internal/sub/service.go:913-921(vlessFlowAllowed),internal/sub/json_service.go:527frontend/src/lib/xray/inbound-link.ts:474-486→frontend/src/lib/xray/protocol-capabilities.ts:60-72It is intentional, and pinned by tests
The XHTTP allowance came in
c7a76e96(2026-06-11, "fix: enable XTLS vision flow for VLESS+XHTTP+vlessenc in UI and share links (#5157) (#5185)"), whose message ends:The same commit added the test that locks it,
internal/web/service/inbound_protocol_test.go:29-32:with the mirrors asserted in
internal/sub/service_flow_test.go:29({"tcp none vlessenc", "tcp", "none", enc, false}) andfrontend/src/test/inbound-from-db.test.ts:225-232("vlessenc is XHTTP-only: TCP without tls/reality is not Vision-capable"). Granting this request therefore means reversing a claim the codebase currently makes in prose, in four implementations and in three test files — which is why the evidence for it matters more than usual.What I could not check
Xray-core is not part of this checkout and this environment has no network access, so I could not open
proxy/vless/outbound/outbound.go, confirm the*encryption.CommonConnbranch you quoted, or read the documentation sentence you refer to. For reference, the panel compiles againstgithub.com/xtls/xray-core v1.260327.1-0.20260728075948-5ca6f4b7d4dc(go.mod:28) and bundles thev26.7.28binary (DockerInit.sh:35).So that the premise can be checked rather than taken on trust, please add:
*encryption.CommonConnacceptance, inproxy/vless/inbound/inbound.goas well as the outbound file you quoted (the panel configures the server side, and the two have historically had different flow checks), plus the URL of the documentation sentence.security: none+ Encryption +xtls-rprx-visionagainst Xray v26.7.28 or newer: does traffic pass end to end, or does the connection fail after the handshake? Paste the server and client Xray log lines as text (I cannot open images), and name the client app and version — it has to accept Vision without transport TLS too.A workaround that survives a panel restart
Editing
config.jsonis overwritten because the panel regenerates it from the database. Settingflowat the inbound level instead is not gated and does persist:AddInbound/UpdateInboundstoresettingsverbatim and only strip flows when the inbound's Disable flow switch is on (internal/web/service/inbound.go:988-995), andGenXrayInboundConfigpassessettings.clients[]through untouched (internal/database/model/model.go:343-391— for VLESS it removes only the top-levelencryptionkey, neverflow). So:Three caveats, all verified above: the panel's own share links and subscriptions will still omit
flow=for this combination (internal/sub/service.go:913-921), so subscribers must add it client-side; editing that client through the client modal or the client API clears it again (internal/web/service/client_crud.go:289-291); and turning on Disable flow wipes it. Only do this once question 2 above answers "traffic passes" for your build.Verdict: Feature request
This reply was generated automatically; a maintainer may follow up.
@APT-ZERO commented on GitHub (Sep 24, 2026):
+1
I have the same issue