[PR #5173] [CLOSED] fix: completely delete clients from remote nodes (#5165) #5805

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

📋 Pull Request Information

Original PR: https://github.com/MHSanaei/3x-ui/pull/5173
Author: @rqzbeh
Created: 6/10/2026
Status: ❌ Closed

Base: main ← Head: fix/remote-node-client-delete


📝 Commits (1)

  • 65877dc fix: delete clients completely from remote nodes on central deletion

📊 Changes

83 files changed (+48152 additions, -0 deletions)

View changed files

➕ CLAUDE.md (+9 -0)
➕ funcs.txt (+19 -0)
➕ graphify-out/.graphify_analysis.json (+2549 -0)
➕ graphify-out/.graphify_ast.json (+13943 -0)
➕ graphify-out/.graphify_chunk_01.json (+265 -0)
➕ graphify-out/.graphify_chunk_02.json (+366 -0)
➕ graphify-out/.graphify_chunk_03.json (+90 -0)
➕ graphify-out/.graphify_chunk_05.json (+62 -0)
➕ graphify-out/.graphify_chunk_06.json (+83 -0)
➕ graphify-out/.graphify_chunk_09.json (+62 -0)
➕ graphify-out/.graphify_chunk_10.json (+118 -0)
➕ graphify-out/.graphify_chunk_12.json (+1 -0)
➕ graphify-out/.graphify_chunk_13.json (+62 -0)
➕ graphify-out/.graphify_chunk_14.json (+1 -0)
➕ graphify-out/.graphify_chunk_15.json (+103 -0)
➕ graphify-out/.graphify_chunk_16.json (+55 -0)
➕ graphify-out/.graphify_chunk_17.json (+64 -0)
➕ graphify-out/.graphify_chunk_18.json (+81 -0)
➕ graphify-out/.graphify_chunk_19.json (+93 -0)
➕ graphify-out/.graphify_chunk_20.json (+62 -0)

...and 63 more files

📄 Description

Summary

This PR ensures that when a client is deleted from the central node, it is also explicitly deleted from the remote nodes' databases, rather than just detached from the inbounds.

Why

Closes #5165

When deleting a client completely from the central panel, the existing logic only detached the client from the remote node's inbounds (via /detach), leaving the client record orphaned in the remote node's database. This updates the Runtime interface and central deletion logic to explicitly call \DELETE /panel/api/clients/:email\ on all remote nodes that the client was attached to, ensuring the client is properly removed.

Type of change

  • Bug fix
  • New feature
  • Refactoring (no behavior change)
  • Documentation
  • Tests only
  • Build / CI / tooling
  • Other

Areas affected

  • Frontend (UI / panel pages)
  • Backend (API endpoints, login, settings)
  • Xray config generation
  • Subscription (share links / Clash / JSON)
  • Statistics / traffic counters
  • Database / migrations
  • Install / upgrade script
  • Docker image
  • Multi-node (sub-nodes)
  • Telegram bot

How was this tested?

  1. Set up a central node and a remote node in 3x-ui.
  2. Created a client on the central node and attached it to an inbound that resides on the remote node.
  3. Verified the client synced to the remote node's database.
  4. Deleted the client completely from the central node.
  5. Checked the remote node's database and confirmed the client record is no longer left as an orphan.

Screenshots / recordings

N/A

Breaking changes

None.

Checklist

  • I tested the change locally and confirmed the described behavior.
  • I added or updated tests for the new behavior (when applicable).
  • \go build ./...\ and the test suite pass locally.
  • For frontend changes:
    pm run lint,
    pm run typecheck, and
    pm run build\ pass.
  • I updated the Wiki / README / API docs if user-facing behavior changed.
  • My commits follow the project's existing message style.
  • I have no unrelated changes mixed into this PR.

🔄 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/5173 **Author:** [@rqzbeh](https://github.com/rqzbeh) **Created:** 6/10/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/remote-node-client-delete` --- ### 📝 Commits (1) - [`65877dc`](https://github.com/MHSanaei/3x-ui/commit/65877dc2d087bef1ab02c7f06fe43e5904af8259) fix: delete clients completely from remote nodes on central deletion ### 📊 Changes **83 files changed** (+48152 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `CLAUDE.md` (+9 -0) ➕ `funcs.txt` (+19 -0) ➕ `graphify-out/.graphify_analysis.json` (+2549 -0) ➕ `graphify-out/.graphify_ast.json` (+13943 -0) ➕ `graphify-out/.graphify_chunk_01.json` (+265 -0) ➕ `graphify-out/.graphify_chunk_02.json` (+366 -0) ➕ `graphify-out/.graphify_chunk_03.json` (+90 -0) ➕ `graphify-out/.graphify_chunk_05.json` (+62 -0) ➕ `graphify-out/.graphify_chunk_06.json` (+83 -0) ➕ `graphify-out/.graphify_chunk_09.json` (+62 -0) ➕ `graphify-out/.graphify_chunk_10.json` (+118 -0) ➕ `graphify-out/.graphify_chunk_12.json` (+1 -0) ➕ `graphify-out/.graphify_chunk_13.json` (+62 -0) ➕ `graphify-out/.graphify_chunk_14.json` (+1 -0) ➕ `graphify-out/.graphify_chunk_15.json` (+103 -0) ➕ `graphify-out/.graphify_chunk_16.json` (+55 -0) ➕ `graphify-out/.graphify_chunk_17.json` (+64 -0) ➕ `graphify-out/.graphify_chunk_18.json` (+81 -0) ➕ `graphify-out/.graphify_chunk_19.json` (+93 -0) ➕ `graphify-out/.graphify_chunk_20.json` (+62 -0) _...and 63 more files_ </details> ### 📄 Description ## Summary This PR ensures that when a client is deleted from the central node, it is also explicitly deleted from the remote nodes' databases, rather than just detached from the inbounds. ## Why Closes #5165 When deleting a client completely from the central panel, the existing logic only detached the client from the remote node's inbounds (via \/detach\), leaving the client record orphaned in the remote node's database. This updates the Runtime interface and central deletion logic to explicitly call \DELETE /panel/api/clients/:email\ on all remote nodes that the client was attached to, ensuring the client is properly removed. ## Type of change - [x] Bug fix - [ ] New feature - [ ] Refactoring (no behavior change) - [ ] Documentation - [ ] Tests only - [ ] Build / CI / tooling - [ ] Other ## Areas affected - [ ] Frontend (UI / panel pages) - [x] Backend (API endpoints, login, settings) - [ ] Xray config generation - [ ] Subscription (share links / Clash / JSON) - [ ] Statistics / traffic counters - [ ] Database / migrations - [ ] Install / upgrade script - [ ] Docker image - [x] Multi-node (sub-nodes) - [ ] Telegram bot ## How was this tested? 1. Set up a central node and a remote node in 3x-ui. 2. Created a client on the central node and attached it to an inbound that resides on the remote node. 3. Verified the client synced to the remote node's database. 4. Deleted the client completely from the central node. 5. Checked the remote node's database and confirmed the client record is no longer left as an orphan. ## Screenshots / recordings N/A ## Breaking changes None. ## Checklist - [x] I tested the change locally and confirmed the described behavior. - [ ] I added or updated tests for the new behavior (when applicable). - [x] \go build ./...\ and the test suite pass locally. - [ ] For frontend changes: \ pm run lint\, \ pm run typecheck\, and \ pm run build\ pass. - [ ] I updated the Wiki / README / API docs if user-facing behavior changed. - [x] My commits follow the project's existing message style. - [x] I have no unrelated changes mixed into this PR. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-02 04:04:11 +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#5805
No description provided.