[GH-ISSUE #4949] [Bug]: The other node's inbound always #3471

Closed
opened 2026-10-31 20:32:39 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @liolilin on GitHub (Jun 5, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/4949

Describe the bug

1、I use a 3x-ui manage the other node's inbound. And the other node is linked by the Domain Name not the ip address.
2、BUT when I generate qr or copy link,always the Domain Name not the ip address.
3、The other Inbound settings: The Address field is explicitly set to my server's external VPS IP. Can't fix this behavior.

The issues is smiliar to the #4798

How to reproduce the problem

1、create client
2、Attached others node inbounds
3、generate qr or copy link
4、open qr/link

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

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

  • I searched existing issues and this bug has not been reported.
  • I am running the latest released version of 3x-ui (or have verified the bug still exists on it).
  • This bug report is written in English.
  • I have redacted any sensitive data (tokens, real domains, client UUIDs).
Originally created by @liolilin on GitHub (Jun 5, 2026). Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/4949 ### Describe the bug 1、I use a 3x-ui manage the other node's inbound. And the other node is linked by the Domain Name not the ip address. 2、BUT when I generate qr or copy link,always the Domain Name not the ip address. 3、The other Inbound settings: The Address field is explicitly set to my server's external VPS IP. Can't fix this behavior. The issues is smiliar to the #4798 ### How to reproduce the problem 1、create client 2、Attached others node inbounds 3、generate qr or copy link 4、open qr/link ### Expected behavior _No response_ ### Actual behavior _No response_ ### Relevant logs ```shell ``` ### 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 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 - [x] I searched [existing issues](../issues?q=is%3Aissue) and this bug has not been reported. - [x] I am running the latest released version of 3x-ui (or have verified the bug still exists on it). - [x] This bug report is written in English. - [x] I have redacted any sensitive data (tokens, real domains, client UUIDs).
bsakaguchi 2026-10-31 20:32:39 +07:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@github-actions[bot] commented on GitHub (Jun 5, 2026):

Thanks for the clear English write-up. This is a known design priority in the subscription/link generator, and there is a workaround available today.

Root cause

When an inbound is attached to a node (NodeID is set), the address used in QR codes and subscription links comes from the Node's Address field, not from the inbound's own Listen/Address field. The relevant code is in sub/subService.go:

// resolveInboundAddress — lines 727–736
func (s *SubService) resolveInboundAddress(inbound *model.Inbound) string {
    if inbound.NodeID \!= nil && s.nodesByID \!= nil {
        if n, ok := s.nodesByID[*inbound.NodeID]; ok && n.Address \!= "" {
            return n.Address   // ← node domain wins unconditionally
        }
    }
    // inbound Listen is only used when there is no NodeID
    ...
}

The same priority is mirrored in the frontend (frontend/src/lib/xray/inbound-link.ts, resolveAddr()). So even though you explicitly set the IP in the inbound's Address field, that field is ignored for node-managed inbounds — the node's domain is always returned first.

Workaround — External Proxy

The comment on that function says:

"External Proxy remains the way to advertise an arbitrary endpoint."

You can add an External Proxy entry directly on the inbound to override the advertised address in generated links. This does not affect how the panel API connects to the node.

Steps:

  1. Open the inbound in the panel → Edit.
  2. Go to the Transport tab → scroll down to External Proxy.
  3. Add a new entry:
    • Dest: your VPS external IP address (e.g. 1.2.3.4)
    • Port: the inbound's listening port
    • Force TLS: same (keeps whatever TLS the inbound uses)
    • Remark: optional label shown in the client app
  4. Save.

Once at least one External Proxy entry exists, sub/subService.go uses ep["dest"] and ep["port"] for the generated link instead of the node address — the node domain no longer appears in the QR/subscription URL.

Note: If you have multiple inbounds on the same node all needing this treatment, you must add an External Proxy entry to each one individually.

This was previously reported in #4888

Your Chinese-language report in #4888 described the identical scenario. The owner confirmed the node-address priority is intentional but did not provide this workaround in that thread before closing. If External Proxy does not solve your case (e.g. TLS/REALITY settings don't carry over correctly), please describe the inbound's protocol and transport type here so it can be investigated further.

<!-- gh-comment-id:4628906202 --> @github-actions[bot] commented on GitHub (Jun 5, 2026): Thanks for the clear English write-up. This is a known design priority in the subscription/link generator, and there is a workaround available today. ## Root cause When an inbound is attached to a node (`NodeID` is set), the address used in QR codes and subscription links comes from the **Node's `Address` field**, not from the inbound's own `Listen`/`Address` field. The relevant code is in `sub/subService.go`: ```go // resolveInboundAddress — lines 727–736 func (s *SubService) resolveInboundAddress(inbound *model.Inbound) string { if inbound.NodeID \!= nil && s.nodesByID \!= nil { if n, ok := s.nodesByID[*inbound.NodeID]; ok && n.Address \!= "" { return n.Address // ← node domain wins unconditionally } } // inbound Listen is only used when there is no NodeID ... } ``` The same priority is mirrored in the frontend (`frontend/src/lib/xray/inbound-link.ts`, `resolveAddr()`). So even though you explicitly set the IP in the inbound's Address field, that field is ignored for node-managed inbounds — the node's domain is always returned first. ## Workaround — External Proxy The comment on that function says: > "External Proxy remains the way to advertise an arbitrary endpoint." You can add an **External Proxy** entry directly on the inbound to override the advertised address in generated links. This does not affect how the panel API connects to the node. **Steps:** 1. Open the inbound in the panel → Edit. 2. Go to the **Transport** tab → scroll down to **External Proxy**. 3. Add a new entry: - **Dest**: your VPS external IP address (e.g. `1.2.3.4`) - **Port**: the inbound's listening port - **Force TLS**: `same` (keeps whatever TLS the inbound uses) - **Remark**: optional label shown in the client app 4. Save. Once at least one External Proxy entry exists, `sub/subService.go` uses `ep["dest"]` and `ep["port"]` for the generated link instead of the node address — the node domain no longer appears in the QR/subscription URL. > **Note:** If you have multiple inbounds on the same node all needing this treatment, you must add an External Proxy entry to each one individually. ## This was previously reported in #4888 Your Chinese-language report in #4888 described the identical scenario. The owner confirmed the node-address priority is intentional but did not provide this workaround in that thread before closing. If External Proxy does not solve your case (e.g. TLS/REALITY settings don't carry over correctly), please describe the inbound's protocol and transport type here so it can be investigated further.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
MHSanaei/3x-ui#3471
No description provided.