mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
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#6620
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?
📋 Pull Request Information
Original PR: https://github.com/MHSanaei/3x-ui/pull/7050
Author: @DoctorGuidance
Created: 11/2/2026
Status: ❌ Closed
Base:
main← Head:fix/vless-decryption-fallbacks📝 Commits (1)
b7fe8f7fix(xray): refuse fallbacks on VLESS decryption and drop empty fallbacks (#7001)📊 Changes
9 files changed (+199 additions, -2 deletions)
View changed files
📝
frontend/src/lib/xray/inbound-form-adapter.ts(+8 -0)📝
frontend/src/pages/api-docs/endpoints.ts(+1 -1)📝
frontend/src/pages/inbounds/form/InboundFormModal.tsx(+10 -0)📝
frontend/src/test/inbound-form-adapter.test.ts(+29 -0)📝
internal/web/service/fallback.go(+12 -0)📝
internal/web/service/inbound.go(+22 -0)📝
internal/web/service/inbound_protocol.go(+64 -1)📝
internal/web/service/inbound_protocol_test.go(+38 -0)📝
internal/web/service/xray.go(+15 -0)📄 Description
Summary of Changes
Closes #7001
Root Cause Analysis
In Xray-core (
infra/conf/vless.go):When an inbound is created or updated via API (
POST /panel/api/inbounds/addor/update), raw JSON imports, or restored backups with VLESS decryption enabled and"fallbacks": [], Go unmarshals"fallbacks": []into a non-nil slice (len == 0). Because Xray-core checksFallbacks != nil, an empty array counts as fallbacks being present.Consequently, Xray-core fails to start with exit status 23 (
VLESS settings: "fallbacks" can not be used together with "decryption"), causing an infinite restart loop that knocks down every inbound on the server.Furthermore:
inboundCanHostFallbacksininternal/web/service/inbound_protocol.godid not checkdecryption, so fallbacks managed by the panel on a vlessenc TCP+TLS/REALITY inbound would result in the exact same crash.InboundFormModal.tsx) did not exclude VLESS inbounds with decryption fromisFallbackHost.endpoints.tscarried"fallbacks": []by default.Changes Implemented
internal/web/service/inbound_protocol.go):normalizeVlessSettings: drops cosmetic emptyfallbacks: []/null(matching the UI'sdropLegacyOptionalEmpties) and returns an explicit validation error (VLESS settings: "fallbacks" can not be used together with "decryption") if non-empty fallbacks are supplied alongside a realdecryptionvalue.inboundCanHostFallbacks: gates fallback injection so VLESS inbounds withdecryptionnever host fallbacks.vlessDecryptionEnabledhelper to verify whether a server-side decryption key is active.internal/web/service/inbound.go):normalizeVlessSettingsintoAddInboundandUpdateInbound.buildInboundForNodePush, defensively pruned empty fallbacks and invalid decryption fallbacks.internal/web/service/xray.go):config.jsonfor Xray, emptyfallbacks: []are stripped.internal/web/service/fallback.go):SetByMaster, validated that the master inbound can host fallbacks before attaching fallback rows.frontend/):dropLegacyOptionalEmpties, strippedfallbacksifdecryptionis set.InboundFormModal.tsx, excluded VLESS with decryption fromisFallbackHost.endpoints.ts, removed"fallbacks": []from the minimal VLESS API documentation payload.internal/web/service/inbound_protocol_test.goverifying fallback capability gating andnormalizeVlessSettings.frontend/src/test/inbound-form-adapter.test.tsfordropLegacyOptionalEmpties.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.