mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 19:11:53 +07:00
[GH-ISSUE #5890] [Bug]: External nodes inbound settings #4083
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#4083
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 @beevar-u on GitHub (Jul 10, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5890
Describe the bug
I have two nodes (A and B). Both nodes use the same scheme:
Internet->Caddy- >3X-UI (xhttp)xhttp configured without tls, host configured with tls and Fingerprint.
Node A configured to manage node B (Nodes settings) using token.
Node A client, assigned with imported inbound from Node B, don't get tls/fingerprint setting in config.
So outbound setting on Node A looks like
But same outbound on Node B
How to reproduce the problem
Expected behavior
Client on first node get all related inbound settings from managed node, including fingerprint
Actual behavior
No response
Relevant logs
Screenshots
No response
3x-ui version
3.4.2
Xray-core version
v26.6.27
How did you install 3x-ui?
Docker / Docker Compose
Operating system
Ubuntu 24.04
Which parts of the panel are affected?
Subscription (share links / Clash / JSON)
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 (Jul 10, 2026):
Investigated against the current source (matches the reported 3.4.2 behavior). This is a real gap in the multi-node feature, not a configuration mistake on your end.
Title: Managed-node "Hosts" (the TLS/SNI/fingerprint subscription override) are never synced when a node's inbound is auto-adopted into the master's central database
Severity: Medium
Category: Correctness
Why this matters: the per-inbound "Host" override (Security/SNI/Fingerprint/ALPN/etc.,
internal/database/model/model.go:916-941) is looked up strictly by the localinbound_idinhostEndpoints()(internal/sub/host_sub.go:19-27). When your master (Node A) polls a managed node,runtime.Remote.FetchTrafficSnapshot(internal/web/runtime/remote.go:674-708) only callspanel/api/inbounds/list,clients/onlinesByGuid,clients/onlinesandclients/lastOnline— there is no endpoint that returns the node'shoststable, andmodel.Inbound(internal/database/model/model.go:46-86) has noHostsrelation, so that payload cannot carry Host data even incidentally.When the snapshot reports an inbound tag the master doesn't already have — i.e. Node A "adopting" an inbound that already existed on Node B, which is what
Inbound sync: all/selecteddoes per the multi-node docs —InboundService.setRemoteTrafficLockedcreates the central copy with a plaintx.Create(&newIb)that copiesSettings/StreamSettingsverbatim (internal/web/service/inbound_node.go:505-527). It never writes to thehoststable, and it bypassesInboundService.AddInbound()entirely — which matters becauseAddInbound()is the only place that ever derivesHostrows from an inbound's config (database.CreateHostsFromExternalProxy,internal/database/db.go:504-536, called atinternal/web/service/inbound.go:821).Net effect: the adopted inbound on Node A ends up with zero
Hostrows.SubJsonService.GetJsononly applies a TLS/SNI/fingerprint override whenhostEndpoints()returns entries (internal/sub/json_service.go:86-89); with none,getConfigfalls back to a bare{"forceTls":"same", ...}synthetic entry (internal/sub/json_service.go:164-175) that never touchessecurity/tlsSettings. The Host you configured for that inbound is simply not visible to the code generating the subscription on Node A.On the exact
"security":"tls","tlsSettings":{}shape in your example (rather than notlsSettingsat all): that's consistent with the fallback instead picking up a legacystreamSettings.externalProxyentry still embedded in the inbound's stored config — an older, superseded mechanism (frontend/src/schemas/protocols/stream/external-proxy.ts,internal/database/db.go:538-572) that predates the separate Hosts table.applyExternalProxyTLSToStream(internal/sub/service.go:1591-1611) always creates thetlsSettingsobject onceforceTlsis"tls", then fillsserverName/fingerprintonly if that entry actually carries them. I can't inspect your two panels' stored JSON, so treat this paragraph as a plausible explanation of the exact byte shape rather than confirmed fact; the core issue above (Host rows never sync between panels) is confirmed directly from the source.Recommendation: extend the node polling/adoption path so a managed node's
Hostrows are fetched (e.g. apanel/api/hosts-style endpoint) and mirrored locally against the newly-created central inbound id insidesetRemoteTrafficLocked, the same way client traffic/state already sync in that function. A narrower stop-gap would be to also rundatabase.CreateHostsFromExternalProxyagainstsnapIb.StreamSettingsin thenewIbbranch, matching whatAddInbound()already does for a manually-created/imported inbound — though that alone wouldn't help Hosts configured through the modern Hosts UI on the node, since those never touchstreamSettingsat all. A fix will only be made if requested by a maintainer (mention @claude); I have not made any code changes.Example:
Confidence: high that Host rows are never synced between panels (confirmed by checking every node-sync code path for
model.Hostreferences and finding none, plusmodel.Inboundhaving noHostsrelation). Medium confidence on the second paragraph's explanation of the specific empty-tlsSettingsshape.@MHSanaei for a decision on the fix approach.
This reply was generated automatically; a maintainer may follow up.