mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[GH-ISSUE #4967] [Bug]: ECH handshake fails on ports 443 and 8443, but works on high ports (possible DPI interference) #3488
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#3488
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 @hvaly1 on GitHub (Jun 5, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/4967
Describe the bug
After updating to v3.2.8 and configuring ECH, the connection fails when the inbound is set to port 443 or 8443. The client (Xray v1.8.21) sees the ECH config in the link, but the handshake does not complete. However, the same ECH configuration works instantly when the inbound is moved to a high port (e.g., 54433). This is reproducible and strongly suggests DPI interference with the ECH extension on privileged ports.
How to reproduce the problem
Setup: VLESS + TCP + xtls-rprx-vision + TLS (Let's Encrypt certificate) + ECH config.
Set the inbound port to 443 -> Connection fails.
Set the inbound port to 8443 -> Connection fails.
Set the inbound port to 54433 (or any other high port) -> Connection works perfectly.
Expected behavior
ECH handshake should complete successfully on any port, as it's part of the TLS layer and should not be port-dependent.
Possible Solution
Could there be a way to make the ECH ClientHello less "fingerprintable" on these ports, or is this purely a carrier/DPI limitation? It might be useful to document this behavior or provide guidance.
Expected behavior
No response
Actual behavior
No response
Relevant logs
Screenshots
No response
3x-ui version
3.2.8
Xray-core version
No response
How did you install 3x-ui?
install.sh script
Operating system
Ubuntu 24.04
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 5, 2026):
Thanks for the detailed report. After checking the 3x-ui source, I can confirm this is not a bug in the panel — this is DPI interference at the network level. Here is what the code shows and what is most likely happening.
What 3x-ui actually does with ECH
ECH key generation is done by calling xray-core directly:
The resulting
echConfigListandechServerKeysare stored in the database and embedded into the inbound's TLSstreamSettingsJSON as-is. There is no port-specific ECH handling anywhere in the 3x-ui codebase — the same config blob goes to xray-core regardless of whether the port is 443, 8443, or 54433.Why the port matters (DPI interference)
This is a well-known behavior of censorship/DPI infrastructure:
This is the expected — and documented — adversarial behavior against ECH. The panel cannot control what happens on the wire between your client and server.
What you can try
fragmentin xray outbound settings) to split the ClientHello across multiple TCP segments, which can defeat some DPI implementations.XUI_LOG_LEVEL=debugand share the xray-core output for the failed 443 attempt.To help narrow it down further
If you want to investigate whether this is a local config issue vs. external DPI, it would help to see:
x-ui→ option for xray version, orxray -version)The current panel (v3.2.8) uses xray-core
v1.260327.1-0.20260601021109-94ffd50060f1. If the client is on v1.8.21, please verify compatibility with the server-side xray version as well.