mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[GH-ISSUE #6681] [Bug]: #4464
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#4464
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 @Rockst4r4 on GitHub (Sep 29, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/6681
Describe the bug
i added some hosts for wireguard inbound, but non of them apply on Wireguard config
How to reproduce the problem
1-created wireguard inbound
2-added some hosts as external proxy for endpoints
3-get wireguard config and non of hosts applied on that
Expected behavior
No response
Actual behavior
No response
Relevant logs
Screenshots
No response
3x-ui version
3.8.5
Xray-core version
26
How did you install 3x-ui?
install.sh script
Operating system
ubuntu 24
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
@github-actions[bot] commented on GitHub (Sep 29, 2026):
This is a real bug, and it is still present on the default branch. The generators for the plain
wireguard://link and the WireGuard.conftext never read Hosts. They always use the inbound's own share address and port. Only the JSON and Clash subscription formats apply a Host's address and port to a WireGuard inbound.Workaround until this is fixed: there is only one endpoint, so you can set it on the inbound itself. Edit the inbound → Basics → set Share address strategy to
Customand put the host in Custom share address. That address is whatresolveInboundAddress(subscription) andresolveShareHost(panel) use. This gives you one endpoint and the inbound's own port. It cannot produce one config per Host. If you need a separate endpoint per Host, the JSON and Clash subscription formats already produce one per Host.How the Host is lost. For the raw subscription and "Export all inbound links",
getSubs/inboundLinkscalllinkFromHostswhenever the inbound has enabled Hosts (internal/sub/service.go:503-504,:576-577). That function places the Hosts into the stream'sexternalProxyand then callsGetLink(internal/sub/host_sub.go:237-239). Every other link generator iterates overexternalProxy, but the WireGuard one ignores it:For contrast, TUIC loops over
stream["externalProxy"]atinternal/sub/service.go:888-914. AmneziaWG has the same gap:internal/sub/service.go:1087passess.resolveInboundAddress(inbound), inbound.Port.The panel's own WireGuard config (Clients → QR / Info) never looks at Hosts at all.
frontend/src/pages/clients/wireguardConfig.ts:32-38buildsEndpointfromresolveShareHost(...)andinbound?.port.By contrast, the JSON and Clash paths overwrite
inbound.Listen/Portper Host before they build the WireGuard outbound (internal/sub/json_service.go:616-619→genWireguard"endpoint": joinHostPort(inbound.Listen, inbound.Port)at:1006;internal/sub/clash_service.go:365-368→buildWireguardProxy"server": inbound.Listenat:626). The Hosts page also lists WireGuard inbounds (frontend/src/pages/hosts/HostList.tsx:41). So Hosts are clearly meant to apply to WireGuard, but only some output formats honour them.I changed the title from
[Bug]:to describe the problem.Suggested fix: make
genWireguardLink/genAmneziaWGLinkproduce one link perexternalProxyentry, takingdest/portand the Host remark from it, the same waygenTuicLinkdoes. Also decide whether the panel's client QR/Info WireGuard config should show Host endpoints (for example, by fetching the server-rendered links). Keepfrontend/src/lib/xray/anddocs/lib/xray/in step with the Go change.This reply was generated automatically; a maintainer may follow up.