mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[GH-ISSUE #5309] [Feature]: Different domain for panel and inbound #3720
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#3720
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 @Michael-YS on GitHub (Jun 14, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5309
Is your feature request related to a problem?
As of right now, the link and qr code generated are based upon the domain for the panel. In cases where panel url isn't the same as inbound url (for example: access via tailscale or ssh port forwarding), the address in the link/qr code isn't aligned with the actual inbound domain.
For example:
Deploy an 3x-ui on a machine, and access the panel via ssh port forwarding. When import via link or qr code in the client, the destination is shown as 127.0.0.1 instead of the real domain name for the server.
Describe the solution you'd like
Add a field in the config page to specify this "inbound domain name", which will be used when generating link or qr code.
Alternatives you've considered
No response
Concrete use case
No response
Mockups, screenshots, or examples
No response
Which parts of the panel would this affect?
No response
Are you willing to help?
Before submitting
@github-actions[bot] commented on GitHub (Jun 14, 2026):
This configuration is already supported without any code changes. There are two independent mechanisms, both confirmed in the current source.
Option 1 — Global subscription domain override (covers your exact use case)
In the panel go to Settings → Subscription and set the Listen Domain field (backend key
subDomain, confirmed ininternal/web/service/setting.goandfrontend/src/pages/settings/SubscriptionGeneralTab.tsx).When the panel or subscription service is reached on a loopback address (
127.x,localhost,::1) — which is exactly what SSH port forwarding produces — the backend automatically substitutes the configuredsubDomain(orwebDomainas a fallback) in all generated subscription links. The same substitution applies on the frontend side for share links and QR codes:preferPublicHost()infrontend/src/lib/xray/inbound-link.tsreplaces the loopback browser hostname with the configured domain before building any link or QR code.Priority order (confirmed in
internal/sub/service.go:configuredPublicHost()andfrontend/src/pages/inbounds/useInbounds.ts):subDomain(Settings → Subscription → Listen Domain)webDomain(Settings → Panel → Listen Domain) as fallbackSetting
subDomainto your real public domain or IP is sufficient to resolve the127.0.0.1issue you described.Option 2 — Per-inbound "Share address strategy" (for mixed-address setups)
Each inbound has a Share address strategy field with three options (confirmed in
frontend/src/lib/xray/inbound-link.ts:resolveAddr()and the inbound edit form):node— use the node/panel address (default)listen— use the inbound's listen address when it is publicly routablecustom— use the value entered in the Custom share address field for that inboundThe
customstrategy lets you set a per-inbound public domain or IP that is written into share links, QR codes, and subscription output independently of the global domain setting.Both options are available in the current release without any additional configuration files or environment variables.
This reply was generated automatically; a maintainer may follow up.