mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[GH-ISSUE #6422] [Feature]: Client Self-Service HWID Removal Web UI #4348
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#4348
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 @TheFaik on GitHub (Sep 5, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/6422
Is your feature request related to a problem?
Currently, when a client changes their device, reinstalls their OS, or switches their VPN client app, their HWID changes. If they hit the HWID connection limit, they cannot connect anymore.
Since there is no self-service option, clients are forced to contact the administrator every single time to manually clear their registered HWIDs. For administrators running large-scale nodes, managing these routine "Clear HWID" requests manually creates a significant and unnecessary daily workload.
Describe the solution you'd like
I would like to propose adding a secure Self-Service HWID Management section directly onto the client's subscription web page (the one that opens when a unique subscription URL is visited in a web browser).
Expected Behavior:
Since each subscription link is individual, unique, and cryptographically secure per user, allowing clients to manage their own HWID space through this page is completely safe.
Alternatives you've considered
Concrete use case
I manage a server with 150+ active clients. Every week, around 5-10 users reinstall their Windows/Android systems or switch to a different VPN client app (e.g., from v2rayN to Sing-box), which alters their HWID.
When they hit their device limit, they immediately contact me to fix it. This creates constant, repetitive support requests. If they could just open their subscription link in a browser and clear their old devices themselves, it would save hours of manual administration.
Mockups, screenshots, or examples
It should look like a simple button or a small dedicated card inside the existing client-side subscription page UI (where users currently check their remaining data usage and download configs).
Example UI text:
"Connected HWIDs: 1/2 [Clear All Devices]"
Which parts of the panel would this affect?
Subscription (share links / Clash / JSON)
Are you willing to help?
Before submitting
@TheFaik commented on GitHub (Sep 5, 2026):
To clarify my request: it would be perfect to have the ability to remove devices individually from a list on this page, rather than just a single "Clear All" button. This way, if a client has multiple active devices, they can delete only the old/inactive one without disrupting their other connected devices.
@github-actions[bot] commented on GitHub (Sep 5, 2026):
This is a valid feature request — nothing like it exists today, and I confirmed in the source that the subscription server has no write path at all. Two corrections and one design caveat below, because they change the shape of what would have to be built.
What the subscription server does today
initRouterregisters GET and HEAD only, on the three body paths, and nothing else (internal/sub/controller.go:290-304):So there is no route on the sub server that could receive a "clear my devices" click. The HWID code reachable from there is read-and-register only —
enforceHwid→EnforceHwidForSubID(internal/sub/controller.go:622,internal/web/service/client_hwid.go:79).The counts you want to display are not there either. The view-model the SPA page and
?format=infoboth read issubPageContext(internal/sub/controller.go:596-619): traffic, expiry, online state, the three URLs, emails, announce — nolimitHwid, no registered count. The only HWID signal on the wire is the four booleans inapplyHwidHeaders(internal/sub/controller.go:642-655). So both halves of your request — the "2 / 3" display and the reset button — are missing.Two corrections
1. Per-device removal already exists, but only for the admin. Your follow-up asks for individual removal rather than clear-all; that primitive shipped in v3.7.0 (
1250fbb7 feat(clients): allow removing a single HWID device (#6265), closing #6245). The three admin endpoints are atinternal/web/controller/client.go:79-81:They are usable from a script with an admin session, so a reseller bot can already automate the "clear HWID" ticket today — it just cannot be exposed to the client, which is exactly what you are asking for.
2. There is no TTL auto-cleanup feature. You list it as an existing alternative, but grepping every deletion of
client_hwidsin the tree finds only four, none of them time-based:trimClientHwidsForSubIDwhen an admin lowerslimitHwid(internal/web/service/client_hwid.go:249), andclearClientHwidsBySubIDTxon the three client-deletion paths (client_crud.go:771,client_bulk.go:833,client_portable.go:210). Nothing ininternal/web/job/mentions HWID at all. The TTL you are describing is itself an open request, #6334 — not shipped.The design caveat
Worth flagging before anyone builds it, because two of those premises are weaker than they look in the source:
internal/web/service/client_crud.go:154,client.SubID = uuid.NewString()), but an admin may set any value, andvalidateClientSubID(client_crud.go:44-49) only rejects forbidden characters — there is no length or entropy floor. A panel where subIds were set by hand or imported would hand the reset button to anyone who can guess one.initRouter(internal/sub/sub.go:50) adds only an optionalDomainValidatorMiddleware; there is no rate limiting either. A state-changing route there would be the first one, and would need to be a POST/DELETE with its own thinking about cross-origin requests and abuse.Related, not duplicates
registered/limit/remaining) on the subscription API. That is the display half of your request, and it is the cheap, low-risk half; the write half here is the contentious one.I have left both open and am not closing this one: the write half is genuinely new scope.
Verdict: Feature request
This reply was generated automatically; a maintainer may follow up.
@TheFaik commented on GitHub (Sep 6, 2026):
The core idea is to let users manage their devices directly through their own unique subscription link by opening it in a browser. Since nobody else knows about this link, why not give them full control over their devices? This would be especially helpful if you don't use a Telegram or Discord bot.