mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[GH-ISSUE #6245] [Feature]: Removing a single HWID #4239
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#4239
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 @baryman on GitHub (Aug 17, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/6245
Is your feature request related to a problem?
Most services will want to set a limit on the number of devices, but they won’t have the option to remove a “linked” device in order to add a new one.
Describe the solution you'd like
Add the ability to delete devices one by one. For example, in this modal window (UI) and via the API.
Alternatives you've considered
No response
Concrete use case
Real situation: a person has linked the maximum number of devices to the subscription. Wanted to share the subscription with a loved one, but can’t unlink the unnecessary device.
Mockups, screenshots, or examples
No response
Which parts of the panel would this affect?
Backend (API endpoints, login, settings), Frontend (UI / panel pages)
Are you willing to help?
Before submitting
@github-actions[bot] commented on GitHub (Aug 17, 2026):
Confirmed as a gap: the panel currently has no way to remove a single registered HWID device — only "list" and "clear all" exist. I could not view the attached image, so I am assuming you mean the HWID Devices modal opened from the client edit form; if it is a different screen, please describe it in text.
What the source shows today (v3.6.0 line):
internal/web/controller/client.go:79-80registers exactly two operations —POST /panel/api/clients/hwids/:email(list) andDELETE /panel/api/clients/hwids/:email(clear all). There is no per-device endpoint.ClearClientHwidsininternal/web/service/client_hwid.go:191-201deletes everyclient_hwidrow for the client'ssubId, all or nothing.frontend/src/pages/clients/ClientFormModal.tsx:1081-1128renders each device read-only and offers only Refresh / Clear all / Close.Worth noting for whoever implements it: HWID rows are keyed by
sub_id, not by client id, and the effective limit isMAX(limit_hwid)across all enabled clients sharing thatsubId(internal/web/service/client_hwid.go:70-77). The list endpoint already returns a stable per-deviceid(ClientHwidInfo.Id,internal/web/service/client_hwid.go:36-44), so a single-device delete has an obvious shape already available to the frontend.Two workarounds until then:
Clear all devices, then re-register only the ones you want to keep:
or the "Clear all" button in the same modal. Registration happens when a client fetches the subscription with an
X-HWIDheader (internal/sub/controller.go:612-614), so each device you want to keep re-registers on its next subscription update; the device you dropped only returns if it fetches again.Temporarily lower the client's HWID Limit and raise it back. On client update the panel trims the device list to the N most-recently-seen entries and deletes the rest (
setClientLimitHwidByEmail→trimClientHwidsForSubID,internal/web/service/client_hwid.go:203-246, called frominternal/web/service/client_crud.go:513). Caveat: it selects bylast_seen, so you do not choose which device survives, and if several enabled clients share the samesubIdyou must lower all of them for the effective limit to drop.Related but not the same request: #6234 asks for the HWID field in the bulk-adjust dialog. Whether to add per-device removal, and in what form, is a maintainer decision.
This reply was generated automatically; a maintainer may follow up.