mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[GH-ISSUE #5617] [Bug]: VLESS REALITY: Custom Target/SNI Configuration Causes Client Connection Failure #3919
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#3919
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 @shazzreab on GitHub (Jun 27, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5617
Describe the bug
I am using the VLESS protocol with REALITY encryption on port 443. The Target/SNI values are manually set by me instead of using the randomly generated ones provided by the panel. After creating the node, the client becomes unavailable. However, after modifying the Target/SNI settings, it returns to normal. I did not encounter this issue in previous versions, but it started from version 3.4.0 and still exists in 3.4.1.
I am not entirely sure whether the issue is caused by the custom Target and SNI settings. However, after modifying the Target and SNI, the connection returned to normal.
The custom Target and SNI values I used are:
www.apple.com
dash.cloudflare.com
www.cloudflare.com
www.microsoft.com
How to reproduce the problem
修改Target/SNI
Expected behavior
No response
Actual behavior
No response
Relevant logs
Screenshots
No response
3x-ui version
3.4.1
Xray-core version
26.6.22
How did you install 3x-ui?
install.sh script
Operating system
Ubntu 24
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?
None
Before submitting
@shazzreab commented on GitHub (Jun 27, 2026):
This issue does not appear immediately after setup, but occurs after 3–5 days of use. Right after configuration, everything works normally for all users.
@github-actions[bot] commented on GitHub (Jun 27, 2026):
Two likely causes are worth checking, in order of probability.
1. SNI values not confirmed as tags (most likely cause of the regression)
In v3.4.0 the SNI field (
serverNames) was moved to an Ant Design<Select mode="tags">component (frontend/src/pages/inbounds/form/security/reality.tsx). In this control, typing a domain name is not enough — each value must be confirmed by pressing Enter or comma before clicking Save. Text left in the input box without being confirmed is silently discarded.If
serverNamesis saved as an empty array ([]), xray-core receives a REALITY inbound with no accepted SNI values and will reject every client handshake. Opening the settings modal and re-saving with the same values (but this time pressing Enter after each SNI to confirm the tag) would explain why the connection is restored after the "modification" step.To verify: after saving an inbound, open Inbound → Export JSON (or the panel's config-template preview) and look at the stored
streamSettings. If you see"serverNames": [], this is the problem.2. Target must include a port suffix
The panel validates the Target field and requires a port (
frontend/src/lib/xray/stream-wire-normalize.ts:77-109). The entry must be in the formexample.com:443, notexample.comalone. The placeholder in the form also showsexample.com:443. If the Target was entered without a port, the form would display a validation error, but it is worth confirming the exact value used.Information needed to confirm the root cause
Please provide:
The xray-core log at the time the client is unavailable. On a standard install it is at:
or accessible via the panel's log viewer. Look for REALITY or TLS-related error lines.
The stored
streamSettingsJSON for the failing inbound. You can retrieve it by running:Redact the private key before posting, but include
realitySettings.target,realitySettings.serverNames, andrealitySettings.shortIds.Whether "modifying Target/SNI" means you re-saved without changing any values, or you changed the values. If only a re-save, the SNI tag-confirmation hypothesis above is the most likely explanation.
This reply was generated automatically; a maintainer may follow up.