mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[GH-ISSUE #5043] [Bug]: Exported link does not use the host domain configured in the inbound settings #3552
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#3552
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 @Amy-yyh on GitHub (Jun 7, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5043
Describe the bug
I created a new inbound with VLESS + WebSocket + TLS. The host domain configured for this inbound is different from the panel domain.
However, when exporting the share link, the generated link uses the panel domain instead of the host domain configured in the inbound settings. The same incorrect panel domain is also used in the subscription update.
How to reproduce the problem
No response
Expected behavior
No response
Actual behavior
No response
Relevant logs
Screenshots
No response
3x-ui version
3.2.8
Xray-core version
26.6.1
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)
chrome
Is the panel behind a reverse proxy or CDN?
No — direct access
Before submitting
@github-actions[bot] commented on GitHub (Jun 7, 2026):
Thanks for the detailed report!
What's happening
When 3x-ui generates a share link or subscription entry, the connection address is resolved in
sub/subService.go(resolveInboundAddress()) using this priority:0.0.0.0, not loopback, not a Unix socket)The WebSocket
hostheader (streamSettings.wsSettings.host) and the TLSserverName/ SNI are placed into the link only as URL parameters (?host=…and?sni=…). They are not treated as the main connection address. So if your inbound listens on0.0.0.0and your panel domain differs from your CDN/proxy domain, the panel domain ends up in the link.Workaround (available now): External Proxy
The panel has a dedicated field for exactly this case. In the inbound editor:
dest): your CDN/inbound-facing domain (e.g.cdn.example.com)443)tlsif the CDN terminates TLS, orsameto inherit the inbound's securityWith an External Proxy entry present, the link generator uses that
dest/portinstead of the panel domain, so the exported VLESS URL and subscription entries will advertise the correct address.Longer-term
Issue #4891 is an open feature request for a more automatic solution — using the inbound's SNI or WS host value directly as the link address without needing a separate External Proxy entry. That request is labelled PR welcomed if you'd like to contribute.
Please try the External Proxy approach and let us know if it resolves the issue.
@Amy-yyh commented on GitHub (Jun 7, 2026):
Thank you for the explanation. I tried the External Proxy solution, and it fixed the issue. The exported link now uses the correct domain.
Thanks again for your help!