mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 19:11:53 +07:00
[GH-ISSUE #4791] [Bug]: After updating 3x-ui to version 3.2.6, my SNI Spoof tunnel stopped working. #3325
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#3325
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 @proxyman70 on GitHub (Jun 2, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/4791
Describe the bug
After updating 3x-ui to version 3.2.6 and 3.2.5, my SNI Spoof tunnel stopped working.
The configuration was working correctly before the update.
How to reproduce the problem
I am using:
Trojan
WebSocket
TLS
Local outbound
SNI Spoof
After upgrading to 3.2.6, the tunnel connects but no traffic passes through the outbound anymore.
Expected behavior
The same outbound configuration was working correctly before updating.
The issue appears only after upgrading to 3.2.6.
Restarting xray and server does not help.
Other normal outbounds work correctly.
Problem only affects Trojan WS TLS outbound with spoofed SNI.
Request
Please check whether there were any changes related to:
TLS handling
SNI validation
WebSocket transport
Trojan outbound
Local outbound routing
that could break SNI spoof functionality.
Thank you.
Actual behavior
No response
Relevant logs
Screenshots
No response
3x-ui version
3.2.6
Xray-core version
No response
How did you install 3x-ui?
Manual build from source
Operating system
ubuntu 24
Which parts of the panel are affected?
No response
Browser (only if it is a UI bug)
No response
Is the panel behind a reverse proxy or CDN?
None
Before submitting
@github-actions[bot] commented on GitHub (Jun 2, 2026):
Claude finished @MHSanaei's task in 10m 15s —— View job
Investigation: SNI Spoof Tunnel Broken After Upgrade to 3.2.6
Tasks
Findings
I investigated the codebase including the frontend adapter, form logic, xray service, and recent release changes (v3.2.5, v3.2.6).
Root Cause #1 —
onNetworkChangedropstlsSettings(including SNI) when transport is changedFile:
frontend/src/pages/xray/outbounds/OutboundFormModal.tsx, line 247When the network/transport dropdown is changed in the outbound edit form, the entire
streamSettingsobject is replaced with only the new network slice —tlsSettings(and itsserverName/SNI field) are not carried over, even when the security mode (TLS) is still valid after the network change:If a user opened the outbound edit modal after upgrading, changed any transport-related setting (even changed network and back), and saved — the SNI (
serverName) would silently be cleared.Fix: Preserve
tlsSettings/realitySettingswhen the security mode is still allowed after the network change:Root Cause #2 — Xray-core bumped to v26.6.1 in v3.2.5
The release notes for v3.2.5 include
chore: bump bundled Xray-core to v26.6.1. Changes in xray-core can affect how Trojan WS TLS outbounds negotiate traffic. If the connection handshake succeeds but no data flows, this could be a behavior change in the new xray-core around TLS SNI validation or Trojan protocol handling.Also notable in v3.2.5 release
fix(outbounds): preserve TLS/Reality security on save— this fix addressed a related issue where thesecurityfield itself was dropped on save. If the user's stored config had this malformed state (missingsecurity: "tls"), xray-core would default to no TLS, which would explain connection succeeding but no traffic passing.Debugging Steps for @proxyman70
Check the stored config JSON: Go to Xray Settings → JSON editor, find your outbound entry and verify that it contains:
If
securityis missing ortlsSettings.serverNameis empty, that's the issue.Check xray-core logs: Look for any TLS handshake errors or routing-related messages.
Try re-saving the outbound (without changing any settings in the UI) and restart xray. The v3.2.5
fix(outbounds): preserve TLS/Reality security on savemay restore thesecurityfield if it was lost.If the config looks correct but traffic still doesn't flow, the issue may be in xray-core v26.6.1's behavior with Trojan WS TLS and SNI spoofing — please share the sanitized config JSON and xray logs.
@proxyman70 commented on GitHub (Jun 3, 2026):
Thanks for the investigation.
I tested the same scenario across 3.0.2 and 3.2.6 with identical configuration:
3.0.2 → Trojan WS TLS + SNI spoof works normally
3.2.6 → tunnel connects but no traffic passes (same config)
I also verified that the generated Xray JSON on 3.2.6 is missing or altering tlsSettings.serverName in some cases when editing/saving outbound via UI.
So this does not look like a user misconfiguration issue. It appears to be either:
A regression in outbound form state handling (streamSettings overwrite / tlsSettings lost), or
A behavioral change in bundled xray-core (v26.6.1) affecting Trojan WS TLS with SNI spoofing.
If needed I can provide:
exact diff between working and broken generated configs
sanitized outbound JSON before/after upgrade
logs showing successful handshake but no traffic flow
@EhsanEv0101 commented on GitHub (Jun 3, 2026):
#4851
x-ui service logs (3.2.6)
📩 Updated Logs Summary
The service is running but not stable.
🔄 Service behavior
The x-ui service is repeatedly restarting:
Started → Stopped → Started → Stopped (multiple cycles observed across different timestamps)
This indicates the service is not staying stable after launch.
🌐 Web server status
Web server running HTTP on 127.0.0.1
The panel is bound to localhost only, which is expected behavior.
⚙️ Xray core status
Xray core v26.6.1 started successfully
Reading config: bin/config.json
Xray is starting, but configuration loading may be unstable or incomplete.
🔁 Sub server
Sub server running HTTP on [::]:2096
⚠️ Observed issue
WebSocket hub stopped
The WebSocket hub is stopping during runtime, which may indicate instability in service lifecycle or configuration issues.
🔴 Systemd behavior
x-ui.service: Deactivated successfully
Started x-ui Service
The service is repeatedly being restarted by systemd.
📌 Summary
Service is not stable (restart loop observed)
Web server is only bound to localhost (127.0.0.1)
Xray core starts normally but may be affected by configuration issues
WebSocket hub is stopping unexpectedly
📩 Add-on logs
The service is repeatedly restarting (multiple start/stop cycles observed).
Web server is only bound to:
127.0.0.1 (localhost)
Xray-core version:
26.6.1
Sub-server is running on:
No external listening interface is visible.
WebSocket hub is also stopping during runtime.