mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 19:11:53 +07:00
[PR #6399] [MERGED] feat(clients): support setting HWID limit and MTProto ad-tag in bulk adjust #6252
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#6252
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/6399
Author: @rqzbeh
Created: 9/3/2026
Status: ✅ Merged
Merged: 9/10/2026
Merged by: @MHSanaei
Base:
main← Head:feat/clients-bulk-adjust-hwid-adtag📝 Commits (10+)
5966b2dfeat(clients): support setting HWID limit and MTProto ad-tag in bulk adjust6694c5bMerge branch 'main' into feat/clients-bulk-adjust-hwid-adtag5b1edfefix(clients): gate adTag to MTProto inbounds and avoid inbound rewrite for limitHwidc477b64Merge branch 'main' into feat/clients-bulk-adjust-hwid-adtag2c33afbMerge branch 'main' into feat/clients-bulk-adjust-hwid-adtag5e3cae5Merge branch 'main' into feat/clients-bulk-adjust-hwid-adtagcde5508Merge branch 'main' of https://github.com/MHSanaei/3x-ui into feat/clients-bulk-adjust-hwid-adtagf20280aMerge remote-tracking branch 'origin/main' into pr/639973a8519fix(clients): stamp updated_at only on the clients a bulk adjust changeddee5556docs(api): regenerate the bulkAdjust reference for limitHwid and adTag📊 Changes
29 files changed (+626 additions, -121 deletions)
View changed files
📝
docs/content/docs/en/reference/api/clients.mdx(+17 -13)📝
docs/public/openapi.json(+4 -2)📝
frontend/public/openapi.json(+4 -2)📝
frontend/src/hooks/useClients.ts(+12 -3)📝
frontend/src/pages/api-docs/endpoints.ts(+2 -2)📝
frontend/src/pages/clients/ClientBulkAdjustModal.tsx(+39 -4)📝
frontend/src/pages/clients/ClientsPage.tsx(+9 -2)📝
frontend/src/pages/groups/GroupsPage.tsx(+2 -2)📝
frontend/src/schemas/client.ts(+24 -3)📝
internal/web/controller/client.go(+7 -5)📝
internal/web/service/client_bulk.go(+130 -36)📝
internal/web/service/client_bulk_fanout_test.go(+1 -1)📝
internal/web/service/client_bulk_flow_test.go(+323 -7)📝
internal/web/service/client_bulk_reenable_test.go(+11 -11)📝
internal/web/service/node_bulk_dispatch_test.go(+1 -1)📝
internal/web/service/sync_scale_postgres_test.go(+1 -1)📝
internal/web/translation/ar-EG.json(+3 -2)📝
internal/web/translation/en-US.json(+3 -2)📝
internal/web/translation/es-ES.json(+3 -2)📝
internal/web/translation/fa-IR.json(+3 -2)...and 9 more files
📄 Description
Summary
Adds HWID device limit and Telegram MTProto sponsor channel (ad-tag) adjustment to the multi-client bulk adjust modal and backend API endpoint.
Why
Previously, adjusting HWID device limit (
limitHwid) or configuring a Telegram MTProto sponsor channel tag (adTag) had to be performed manually one client at a time in the single-client edit modal. When managing multiple clients, administrators already adjust traffic, expiry, and flow in bulk; adding HWID limit and Telegram sponsor channel toClientBulkAdjustModalandPOST /panel/api/clients/bulkAdjuststreamlines client administration.Type of change
Areas affected
How was this tested?
internal/web/service/:TestBulkAdjust_HwidLimit: Setting HWID limit to N, resetting to 0 (unlimited), verifying device limit updates on client records without triggering unnecessary core restarts.TestBulkAdjust_MtprotoAdTagSetAndClear: Setting 32-hex ad-tag on MTProto inbounds, clearing with"none", and rejecting malformed tags.TestBulkAdjust_FlowSetAndClear,TestBulkAdjust_FlowIneligibleSkipped, and re-enablement tests.frontend/:npm run typecheck(zero TypeScript errors)npm run lint(clean oxlint)npm run build(successful production Vite build)npx vitest run src/test/i18n-dead-keys.test.ts(verified translation coverage and no dead keys across all 13 locales)go test -v ./internal/web/ -run TestRouteRegistryContract(passes with updated OpenAPI doc)Screenshots / recordings
N/A
Breaking changes
None
Checklist
go build ./...and the test suite pass locally.npm run lint,npm run typecheck, andnpm run buildpass.🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.