mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[PR #5162] [MERGED] feat: add inbound share address strategy #5798
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#5798
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?
📋 Pull Request Information
Original PR: https://github.com/MHSanaei/3x-ui/pull/5162
Author: @yuanzhidao
Created: 6/10/2026
Status: ✅ Merged
Merged: 6/11/2026
Merged by: @MHSanaei
Base:
main← Head:feat/node-inbound-share-address-strategy📝 Commits (7)
e6d58c7feat: add inbound share address strategye0c8270fix: preserve inbound share address settings3b8fb18fix: keep share address strategy out of subscriptionsf5d7c14fix: address share address review feedback516a764fix: validate custom share addressc2faabdMerge branch 'main' into feat/node-inbound-share-address-strategy9f985c3fix📊 Changes
40 files changed (+872 additions, -38 deletions)
View changed files
📝
frontend/public/openapi.json(+15 -0)📝
frontend/src/generated/examples.ts(+2 -0)📝
frontend/src/generated/schemas.ts(+13 -0)📝
frontend/src/generated/types.ts(+2 -0)📝
frontend/src/generated/zod.ts(+2 -0)📝
frontend/src/lib/xray/inbound-form-adapter.ts(+16 -1)📝
frontend/src/lib/xray/inbound-from-db.ts(+4 -0)📝
frontend/src/lib/xray/inbound-link.ts(+71 -14)📝
frontend/src/models/dbinbound.ts(+6 -0)📝
frontend/src/pages/inbounds/InboundsPage.tsx(+2 -0)📝
frontend/src/pages/inbounds/form/InboundFormModal.tsx(+57 -0)📝
frontend/src/schemas/api/inbound.ts(+2 -0)📝
frontend/src/schemas/forms/inbound-form.ts(+4 -0)📝
frontend/src/test/__snapshots__/inbound-form-modal.test.tsx.snap(+10 -0)📝
frontend/src/test/__snapshots__/inbound-full.test.ts.snap(+16 -0)📝
frontend/src/test/inbound-form-adapter.test.ts(+13 -0)📝
frontend/src/test/inbound-link.test.ts(+52 -0)📝
internal/database/model/model.go(+10 -8)📝
internal/sub/service.go(+2 -2)📝
internal/web/runtime/remote.go(+8 -0)...and 20 more files
📄 Description
Summary
Adds a per-inbound share address strategy so directly exported share links and QR codes can use the node address, the inbound listen address, or a custom endpoint.
Why
Node-managed inbounds currently export the node panel address first. In multi-node deployments where one sub-node has multiple inbounds bound to different public IPs, directly exported links can point clients at the wrong address.
Refs #5161
Refs #4891
Type of change
Areas affected
How was this tested?
go build ./...go test ./...cd frontend && npm run testcd frontend && npm run typecheckcd frontend && npm run lintcd frontend && npm run buildScreenshots / recordings
N/A
Breaking changes
None. Existing inbounds default to the
nodestrategy, preserving the previous node-address-first behavior for directly exported share links and QR codes. Subscription links are not affected.Checklist
go build ./...and the test suite pass locally.npm run lint,npm run typecheck, andnpm run buildpass.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.