mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 19:11:53 +07:00
[GH-ISSUE #4933] [Bug]: ECH TLS configuration not included in final v2ray config #3453
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#3453
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 @JackieWelles17 on GitHub (Jun 4, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/4933
Describe the bug
When adding an ECH (Encrypted Client Hello) TLS section in the inbound configuration, the generated configuration does not include or “ship” ECH parameters automatically in config.
How to reproduce the problem
Expected behavior
No response
Actual behavior
No response
Relevant logs
Screenshots
No response
3x-ui version
3.2.7
Xray-core version
26.6.1
How did you install 3x-ui?
install.sh script
Operating system
Ubunto 26.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?
Yes — Cloudflare (proxied DNS)
Before submitting
@github-actions[bot] commented on GitHub (Jun 4, 2026):
Thanks for the report. After tracing the code I can confirm this is a real bug, and I've identified exactly where it happens.
Root cause
The inbound TLS form stores
echConfigListundertlsSettings.settings.echConfigList(inside a client-settings sub-object calledsettings). But inweb/service/xray.go(lines 225–233), when building the final Xray config for a process restart or startup, the code explicitly deletes the entiresettingssub-object before writing the config:This deletion is intentional for stripping client-facing sub-settings from the server config (fingerprint, pinnedPeerCertSha256, etc.), but it also wipes
echConfigListbecause the frontend schema (TlsStreamSettingsSchemainfrontend/src/schemas/protocols/security/tls.ts) placed it insideTlsClientSettingsSchema.settingsrather than at the root level oftlsSettings.As a result, the inbound config written to Xray looks like:
Note:
echServerKeyssurvives because it is stored at the root oftlsSettings, not insidesettings.Affected paths
settingsdeleted →echConfigListcompletely absentruntime/local.go)settingsnot deleted, butechConfigListis still atsettings.echConfigListrather than the root-levelechConfigListXray-core expects for server inboundsSubscription links
Subscription link generation (
sub/subService.go:603–612) intentionally reads fromsettings.echConfigList, so theech=parameter in subscription links is unaffected by this bug. The problem is limited to the inbound config that Xray-core actually receives.Suggested fix
The cleanest fix is in the backend Xray config builder (
web/service/xray.go): before deletingtlsSettings["settings"], check whether it containsechConfigListand if so, hoist it to the root oftlsSettings:An alternative is to restructure the frontend schema so
echConfigListlives at the root ofTlsStreamSettingsSchemainstead of insideTlsClientSettingsSchema, but that requires a migration for existing stored configs and changes the subscription link reader insub/subService.goas well.Version note
The reporter is on v3.2.7 (current latest). The bug is present in the current source.
@MHSanaei commented on GitHub (Jun 4, 2026):
Fixed: ECH (echConfigList) is now included in VLESS/Trojan/VMess share links and the JSON subscription. The field is stored under tlsSettings.settings (panel-internal convention, stripped/flattened before reaching xray-core), but the subscription generators were only reading fingerprint and pinnedPeerCertSha256 from it and dropping ECH. Fixed in commit 79b105e8.