[PR #6463] [MERGED] feat(inbound): excludeFromSub hides links without disabling #6285

Closed
opened 2026-11-02 04:07:40 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/MHSanaei/3x-ui/pull/6463
Author: @mrchatam
Created: 9/11/2026
Status: ✅ Merged
Merged: 9/27/2026
Merged by: @MHSanaei

Base: main ← Head: feat/hide-inbound-from-sub


📝 Commits (4)

  • eb1dcfa feat(inbound): excludeFromSub hides links without disabling
  • 4a61e7b fix(inbound): excludeFromSub review follow-ups
  • 189eaf7 Merge origin/main into feat/hide-inbound-from-sub
  • a902a87 fix(sub): keep excluded inbounds' clients in the usage header

📊 Changes

36 files changed (+347 additions, -0 deletions)

View changed files

📝 docs/public/openapi.json (+8 -0)
📝 frontend/public/openapi.json (+8 -0)
📝 frontend/src/generated/examples.ts (+1 -0)
📝 frontend/src/generated/schemas.ts (+6 -0)
📝 frontend/src/generated/types.ts (+1 -0)
📝 frontend/src/generated/zod.ts (+1 -0)
📝 frontend/src/lib/xray/inbound-form-adapter.ts (+4 -0)
📝 frontend/src/models/dbinbound.ts (+3 -0)
📝 frontend/src/pages/inbounds/form/InboundFormModal.tsx (+11 -0)
📝 frontend/src/schemas/forms/inbound-form.ts (+1 -0)
📝 frontend/src/test/inbound-form-adapter.test.ts (+29 -0)
📝 internal/database/db.go (+11 -0)
➕ internal/database/inbound_exclude_from_sub_migration_test.go (+58 -0)
📝 internal/database/model/model.go (+1 -0)
📝 internal/sub/clash_service.go (+6 -0)
📝 internal/sub/json_service.go (+6 -0)
📝 internal/sub/service.go (+18 -0)
➕ internal/sub/service_exclude_from_sub_test.go (+77 -0)
📝 internal/web/runtime/remote.go (+1 -0)
📝 internal/web/runtime/remote_test.go (+9 -0)

...and 16 more files

📄 Description

Summary

  • Adds per-inbound excludeFromSub so operators can omit an inbound from subscription output without disabling it (Xray, auth, and accounting stay active).
  • Gates getInboundsBySubId with exclude_from_sub = false, persists/syncs the flag through inbound CRUD and node wiring, and exposes a switch in the inbound form.
  • Includes migration, OpenAPI/generated schema updates, translations, and focused backend/frontend tests.

Fixes #6435

Test plan

  • Create two enabled inbounds sharing one client subId; enable Exclude from subscriptions on one; confirm raw/JSON/Clash subscription only lists the other.
  • Confirm the excluded inbound still accepts traffic and appears in panel traffic accounting.
  • Edit an inbound to toggle the flag on/off and verify persistence after reload.
  • On a node-hosted inbound, toggle the flag and verify it syncs through remote wire/update paths.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/MHSanaei/3x-ui/pull/6463 **Author:** [@mrchatam](https://github.com/mrchatam) **Created:** 9/11/2026 **Status:** ✅ Merged **Merged:** 9/27/2026 **Merged by:** [@MHSanaei](https://github.com/MHSanaei) **Base:** `main` ← **Head:** `feat/hide-inbound-from-sub` --- ### 📝 Commits (4) - [`eb1dcfa`](https://github.com/MHSanaei/3x-ui/commit/eb1dcfa37c5ff454599f7f13faaf2d26c43640dd) feat(inbound): excludeFromSub hides links without disabling - [`4a61e7b`](https://github.com/MHSanaei/3x-ui/commit/4a61e7bd6bff3ea746325db13b8c716d509efbb3) fix(inbound): excludeFromSub review follow-ups - [`189eaf7`](https://github.com/MHSanaei/3x-ui/commit/189eaf7802fc1219580f4c69498e24c18d8bc1ac) Merge origin/main into feat/hide-inbound-from-sub - [`a902a87`](https://github.com/MHSanaei/3x-ui/commit/a902a873f3ffd0806cddc1a6eb83dd2563e27742) fix(sub): keep excluded inbounds' clients in the usage header ### 📊 Changes **36 files changed** (+347 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `docs/public/openapi.json` (+8 -0) 📝 `frontend/public/openapi.json` (+8 -0) 📝 `frontend/src/generated/examples.ts` (+1 -0) 📝 `frontend/src/generated/schemas.ts` (+6 -0) 📝 `frontend/src/generated/types.ts` (+1 -0) 📝 `frontend/src/generated/zod.ts` (+1 -0) 📝 `frontend/src/lib/xray/inbound-form-adapter.ts` (+4 -0) 📝 `frontend/src/models/dbinbound.ts` (+3 -0) 📝 `frontend/src/pages/inbounds/form/InboundFormModal.tsx` (+11 -0) 📝 `frontend/src/schemas/forms/inbound-form.ts` (+1 -0) 📝 `frontend/src/test/inbound-form-adapter.test.ts` (+29 -0) 📝 `internal/database/db.go` (+11 -0) ➕ `internal/database/inbound_exclude_from_sub_migration_test.go` (+58 -0) 📝 `internal/database/model/model.go` (+1 -0) 📝 `internal/sub/clash_service.go` (+6 -0) 📝 `internal/sub/json_service.go` (+6 -0) 📝 `internal/sub/service.go` (+18 -0) ➕ `internal/sub/service_exclude_from_sub_test.go` (+77 -0) 📝 `internal/web/runtime/remote.go` (+1 -0) 📝 `internal/web/runtime/remote_test.go` (+9 -0) _...and 16 more files_ </details> ### 📄 Description ## Summary - Adds per-inbound `excludeFromSub` so operators can omit an inbound from subscription output without disabling it (Xray, auth, and accounting stay active). - Gates `getInboundsBySubId` with `exclude_from_sub = false`, persists/syncs the flag through inbound CRUD and node wiring, and exposes a switch in the inbound form. - Includes migration, OpenAPI/generated schema updates, translations, and focused backend/frontend tests. Fixes #6435 ## Test plan - [ ] Create two enabled inbounds sharing one client `subId`; enable Exclude from subscriptions on one; confirm raw/JSON/Clash subscription only lists the other. - [ ] Confirm the excluded inbound still accepts traffic and appears in panel traffic accounting. - [ ] Edit an inbound to toggle the flag on/off and verify persistence after reload. - [ ] On a node-hosted inbound, toggle the flag and verify it syncs through remote wire/update paths. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-02 04:07:40 +07:00
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#6285
No description provided.