[GH-ISSUE #5370] [Feature]: Batch Edit Selected Inbounds — Modify Common Parameters Across Multiple Inbounds at Once #3758

Open
opened 2026-10-31 20:34:45 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @jshir700 on GitHub (Jun 16, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5370

If you manage more than a handful of inbounds, you've almost certainly faced this: you need to make the same small change across many inbounds, and the only tool available is to open each one's edit modal, make the change, save it, wait for the panel to respond, and repeat — sometimes dozens or hundreds of times.

This isn't just inconvenient — it actively encourages bad practices. When updating 20 inbounds one-by-one takes 10 minutes, operators start asking "can I script this?" or "do I really need to change all of them?" or worse, they just skip the maintenance and leave stale configurations running. And the manual process is error-prone: you'll inevitably mistype a value on the 14th inbound or forget to save one.

Concretely, here are the operations that currently require a full edit cycle per inbound but should really be a one-shot bulk operation:

Task Current effort (for 30 inbounds)
Update WS host after CDN domain change ~15 minutes, 30 modals
Disable all inbounds pointing to a retired server ~10 minutes, 30 modals
Extend expiry date on 50 free-tier inbounds ~20 minutes, 50 modals
Set the same Reality key pair across 10 inbounds ~8 minutes, 10 modals
Change TLS minVersion from 1.2 to 1.3 across all TLS inbounds ~5 minutes, N modals
Batch reorder 25 inbounds into a manual sequence ~30 minutes — each inbound's sortOrder must be edited individually via the single-inbound form, and you can't see other inbounds' values while doing it

The existing checkbox selection on the inbound list page already supports multi-select. But the only bulk action it offers is delete. Everything else is single-inbound only.

Describe the solution you'd like

The core idea is simple: select multiple inbounds → click "Batch Edit" → pick the fields you want to change → apply once.

But there's a subtle design challenge. A batch edit isn't the same as opening an empty form and filling it in. The semantics are fundamentally different:

  • Single edit: "Here is the complete new state of this inbound." Every field gets saved.
  • Batch edit: "Here are the specific things I want to change across all selected inbounds. Everything else stays exactly as it is."

This means the batch edit UI needs to communicate a three-way state for each field, not just a value:

  1. "Don't touch this field" — the initial state of every control
  2. "Set this field to X" — the user explicitly entered a value
  3. "Clear / reset this field" — the user explicitly wants to remove a value

And because the selected inbounds might have different protocols, different transport networks, or different security configurations, the UI also needs to show only the controls that make sense for the current selection, and hide the rest.


How it works — user perspective

  1. On the InboundsPage, select two or more inbounds by ticking their checkboxes.

  2. A "Batch Edit" button appears in the toolbar (alongside the existing bulk delete and the selected-count tag).

  3. Clicking it opens a modal with 4 tab pages:

    • General — the simple, cross-cutting fields: enable/disable, total traffic, expiry time, traffic reset strategy, listen address, share address strategy (node/listen/custom with custom value input), deploy node, sniffing, and batch reorder (see below). These are the fields most operators reach for first.
    • Network — transport-layer settings gated by network type. If all selected inbounds use WebSocket, only WS fields show up. If you selected a mix of WS and gRPC inbounds, both sets of fields appear (each clearly labeled). External proxy settings also live in this tab — adding/updating/replacing external proxy entries (e.g. updating the CDN origin address across all WS inbounds) is a common bulk operation.
    • Security — TLS and Reality fields, again gated by what the selected inbounds actually use.
    • Protocol — protocol-specific settings like VLESS flow control, fallback clearing, and sockopt.
  4. Each control starts in a "Keep original" state. You only touch the controls you want to change. If you want to update the WS path but leave everything else alone, you fill in only the WS path field and click Apply.

  5. As you interact with each control, a compact preview line below it shows the current value of that field for every selected inbound — so you can see what you're about to overwrite before you commit.

  6. Click Apply. A single API call updates all selected inbounds, reporting back how many succeeded and which (if any) were skipped and why.


Design decisions explained

Why a new API endpoint instead of calling the existing update/:id N times from the frontend?

The frontend could call /panel/api/inbounds/update/:id once per selected inbound in a loop. But that means N sequential HTTP requests, N auth checks, N WebSocket broadcasts — it's chatty and slow. A dedicated POST /panel/api/inbounds/bulkUpdate endpoint packages all the changes into one request and lets the backend iterate efficiently, reporting partial success in a single response.

Why "Keep original" for controls instead of having the user fill in every field?

Because batch editing is about making targeted changes, not full replacements. If you have 30 inbounds and you just want to disable them, you shouldn't need to also re-type every inbound's port, listen address, stream settings, and TLS config. The "keep original" semantics mean the batch edit is always additive — it only changes what you explicitly touch.

Why hide network/security/protocol cards that don't apply to the selection?

Imagine you selected 5 WS inbounds and 5 gRPC inbounds. If we showed the full set of every possible field, the modal would be overwhelming: 20+ stream settings controls, TLS controls, Reality controls, protocol controls — most of them irrelevant to the inbounds you selected. Worse, you could accidentally set a field on inbounds where it doesn't apply, which would either be silently ignored (confusing) or cause an error (frustrating).

Instead, by gating each card on whether the selected inbounds actually use that network type or security type, the modal adapts to the selection. Select only WS inbounds → only WS fields appear. Select 5 WS + 5 gRPC → both appear, side by side. Select a mix that has nothing in common → General tab is enough, and the other tabs are disabled.

Why three-state booleans (Switch with indeterminate)?

A simple on/off switch has a hidden problem: what does "off" mean? Does it mean "set enable to false" or does it mean "I didn't touch enable"? In a batch edit, these are different actions. The three-state approach resolves this:

Switch appearance Meaning
Dimmed / "indeterminate" bar Don't change this field
Blue (on) Set to true
Gray (off) Set to false

The user sees at a glance which fields they've touched and which fields will remain as-is.

Why show current values per inbound?

The biggest risk in batch editing is overwriting something you didn't intend to. If you're updating the WS host field, but a few inbounds in your selection have a different host value than the rest, you should know before you click Apply. The per-inbound preview line below each field serves exactly this purpose — it shows the current value of that field for each selected inbound, so you can verify the change is safe before committing.

Why partial success instead of rollback-on-failure?

The inbounds are independent — updating one doesn't affect another. If inbound #3 fails because of a port conflict, there's no reason to roll back inbounds #1 and #2 which succeeded. Partial success means the operator only has to re-check the failed ones, not redo the entire batch.

Why does subSortIndex (batch reorder) need special treatment?

The existing single-inbound form has a subSortIndex field (database column SubSortIndex, default: 1) that controls the sort order of the inbound's links in subscription output — lower values appear first, ties broken by ID. If you were to include it in the General tab like any other field (a plain InputNumber), every selected inbound would receive the same sort value — rendering the sort meaningless. The purpose of batch reordering is to arrange inbounds into a sequential order, not to stamp them all with an identical number.

This means reorder is fundamentally different from the other fields in the batch edit:

Other fields (enable, total, remark...) subSortIndex
Set the same value on every selected inbound Assign different sequential values to different inbounds
Value is known upfront (true/false/100GB) Value depends on position — unknown until order is decided
No dependency between inbounds Inbounds compete for sort positions — changing one affects the others

So instead of a simple input, the modal provides a dedicated batch reorder card inside the General tab. And instead of adding a separate endpoint, the bulkUpdate request body includes an optional reorder field that carries the ordered inbound IDs — the backend applies field changes first, then updates SubSortIndex on each inbound based on its position.


Batch Reorder — detailed UX

Inside the General tab, when two or more inbounds are selected, a "Batch Reorder" card appears. The user can rearrange inbounds into their desired order using either interaction method:

  1. Drag handle (≡) — click and drag a row up or down in the list
  2. Arrow buttons (↑/↓) — click to move a row one position up or down
  ─── Batch Reorder ──────────────────────────

  Starting value: [ 1  ]    Step: [ 10 ]

  ≡ [↑][↓] inbound-a (vmess-ws-443)     → 1
  ≡ [↑][↓] inbound-b (vless-grpc-8443)  → 11
  ≡ [↑][↓] inbound-c (trojan-2053)      → 21
  ≡ [↑][↓] inbound-d (reality-443)      → 31
  ≡ [↑][↓] inbound-e (hysteria-10000)   → 41

Initial order = the current list display order on the inbounds page before the user opened the modal.

Row identifier: Each row shows remark (protocol-network-port) so the user can identify inbounds at a glance without needing to cross-reference with the inbound list page.

Computed value: The right-hand column shows the SubSortIndex value updated in real time as rows are moved: startValue + positionIndex × step. Default: start=1, step=10. The step of 10 leaves gaps (1, 11, 21...) so the operator can later manually insert other inbounds between them using the single-edit form.

Preview string: A compact one-line preview below the card shows the final ordered sequence of remarks — useful for a quick sanity check.

Submission flow:

The bulkUpdate request body includes an optional reorder field alongside the other field changes:

{
  "ids": [1, 2, 3, 4, 5],
  "fields": { "enable": true },
  "reorder": {
    "ids": [3, 1, 4, 2, 5]
  }
}

The backend processes in order:

  1. Apply field/stream/security/protocol changes from the rest of the request body
  2. If reorder.ids is present and non-empty, update each inbound's SubSortIndex by position: position-0 gets startAt (default 1), position-1 gets startAt + step (default 11), etc.

This keeps the API unified — the frontend sends one request, the backend applies everything atomically (or reports partial success for the field changes if some inbounds fail).


API shape

POST /panel/api/inbounds/bulkUpdate

The request body separates concerns into five sections — four for value edits, one for reorder:

fields — simple key-value pairs for the inbound's database columns. A key is only applied if its value is non-null. The frontend sends null for every control the user didn't touch.

{
  "enable": true,
  "total": 0,
  "expiryTime": 1798790400000,
  "trafficReset": "monthly",
  "listen": "0.0.0.0",
  "shareAddrStrategy": "node",
  "shareAddr": null,
  "sniffing": { "enabled": true }
}

streamSettings — network-level settings grouped by transport type. Only the settings matching the inbound's current network are applied:

{
  "wsSettings": { "host": "cdn.example.com", "path": "/api/ws" },
  "grpcSettings": { "serviceName": "myservice" },
  "kcpSettings": { "headerType": "dtls", "seed": "myseed" }
}

externalProxy — cross-cutting, not tied to a specific network type. The UI groups this under the Network tab but it applies regardless of the inbound's transport:

{
  "externalProxy": { "dest": "new-cdn.example.com", "port": 443, "remark": "CDN origin" }
}

security — TLS and Reality settings, again dispatched by the inbound's security type:

{
  "tlsSettings": { "sni": "example.com", "alpn": ["h2", "http/1.1"] },
  "realitySettings": { "publicKey": "...", "shortId": "abc123" }
}

protocolSettings — per-protocol adjustments:

{
  "flow": "xtls-rprx-vision",
  "clearFallbacks": true,
  "enableSockopt": true
}

reorder — optional batch reordering. When present, the backend assigns SubSortIndex values sequentially based on position in the ids array, after applying all field changes above:

{
  "reorder": {
    "ids": [3, 1, 4, 2, 5],
    "startAt": 1,
    "step": 10
  }
}

startAt defaults to 1 and step defaults to 10 — both match the defaults shown in the UI modal. The backend assigns position-0 → startAt, position-1 → startAt + step, etc.

Response:

{
  "success": true,
  "updated": 5,
  "skipped": [
    { "id": 3, "reason": "port conflict on port 443" },
    { "id": 7, "reason": "inbound not found" }
  ]
}

Files involved

File What changes
internal/web/controller/inbound.go New bulkUpdateInbounds handler; register route
internal/web/service/inbound.go New UpdateInboundPartial method applying non-null diffs + reorder logic
internal/web/web.go Register POST /panel/api/inbounds/bulkUpdate
frontend/src/pages/inbounds/form/BatchEditModal.tsx New file — the 4-tab modal component, ~800 lines
frontend/src/pages/inbounds/list/InboundList.tsx Add 'batchEdit' key to action menu, conditionally shown when ≥2 inbounds selected; add onBulkEdit prop
frontend/src/pages/inbounds/InboundsPage.tsx Import BatchEditModal, manage open/close state + selected inbounds, wire menu action
internal/web/translation/*.json ~75 new i18n keys across 13 language files

Alternatives you've considered

Export → edit JSON → re-import. The panel already supports exporting a single inbound as JSON and importing it. But this is a "replace the whole thing" operation — you must serialise every client, every byte of stream settings, every sniffing rule. For an inbound with hundreds of clients, that's megabytes of JSON to edit just to change one field. And there's no way to do this for multiple inbounds at once without a separate script.

Script the REST API. A command-line tool that calls /panel/api/inbounds/update/:id in a loop for each selected inbound is technically possible. But it requires SSH or API-token access, understanding of the JSON shapes (which differ by protocol), and manual error handling for things like port conflicts. For most panel operators — who are panel administrators, not developers — this is not a practical solution.

Just open and edit each one. This is the status quo, and it's the baseline we're comparing against. It works for 2-3 inbounds. For 10+, it's painful. For 50+, it's almost unusable. The time cost scales linearly with the number of inbounds, and the error rate goes up with fatigue.

Reuse the InboundFormModal with a multi-inbound mode. The existing edit modal is designed around a single inbound: it loads the full record, binds every field, and on save sends the complete state. Making it support batch editing would require either (a) loading all selected inbounds into a single form (impossible when they have different values for the same fields), or (b) adding "keep original" semantics to every control, which would complicate the single-edit flow for no benefit. A dedicated modal is cleaner and keeps both flows simple.

Concrete use cases

Use case 1: CDN domain migration. You operate a panel behind a CDN that requires changing the origin domain. You have 45 inbounds across 3 protocols (VMess-WS, VLESS-WS, Trojan-WS). All use WebSocket with the same host field pointing to your CDN. The CDN provider changes the origin endpoint from old-cdn.example.com to new-cdn.example.com.

Without batch edit: 45 inbounds × (open modal → edit host → save → wait) = ~25 minutes of repetitive work. With batch edit: select all 45 → Batch Edit → Network tab → WebSocket → type the new host → Apply. 30 seconds.

Use case 2: Temporary maintenance window. You need to take 12 specific inbounds offline for 2 hours to test a new Xray core version. After testing, you need to bring them back online.

Without batch edit: disable each of 12 inbounds manually, then manually re-enable them later. If you lose track of which ones you disabled, you might leave some offline permanently. With batch edit: select the 12 → Batch Edit → General → Enable → Off → Apply. After testing: select the same 12 → Enable → On → Apply. Two clicks each way.

Use case 3: Tiered service management. You run a service with "bronze" (expiry: 30 days, 50GB), "silver" (expiry: 60 days, 100GB), and "gold" (expiry: 90 days, 200GB) tiers. At the start of each month, you need to create new batches and adjust limits. When you decide to increase the "silver" tier from 100GB to 150GB, you need to update 35 existing inbounds.

Without batch edit: you can't practically update 35 existing inbounds — you'd typically create new ones and migrate clients manually, because the effort of editing 35 is too high. With batch edit: select the 35 silver-tier inbounds → set total → Apply. Done in 10 seconds.

Use case 4: Emergency security patch. A vulnerability is discovered in a specific TLS version or cipher suite. You need to update minVersion from 1.1 to 1.2 on every TLS inbound immediately.

Without batch edit: you're racing the clock, manually updating each inbound while the panel is potentially vulnerable. With batch edit: select all TLS inbounds → Security tab → TLS → set Min Version → Apply. Takes as long as it takes to type "1.2".

Use case 5: Manual reorder after server consolidation. You've just consolidated 3 servers down to 1. You have 40 inbounds from the old servers imported into one panel, and their subscription sort order is a mess — inbounds from server A, then server C, then server B interleaved. You need to reorder them into a clean sequence: all HTTP inbounds first, then all VMess, then VLESS, then Trojan, then Shadowsocks, with each group sorted by port. Currently you'd have to open each inbound individually and set its subSortIndex by hand, while trying to keep a mental map of which values you've already used. With batch edit: multi-select the inbounds you want to arrange, drag them into order inside the modal, set start=1 step=10 → Apply. If you change your mind, re-open and reorder again — the new sequence overwrites the old one.


Appendix: i18n keys

The following new keys need to be added across all internal/web/translation/*.json files:

Key English
pages.inbounds.batchEditInbounds Batch Edit Inbounds
pages.inbounds.batchEditTabGeneral General
pages.inbounds.batchEditTabNetwork Network
pages.inbounds.batchEditTabSecurity Security
pages.inbounds.batchEditTabProtocol Protocol
pages.inbounds.batchEditKeepOriginal Keep original
pages.inbounds.batchEditKeepClientOriginals Keep per-client originals
pages.inbounds.batchEditNotSet (not set)
pages.inbounds.batchEditApply Apply
pages.inbounds.batchEditSaved Inbounds updated
pages.inbounds.batchEditPartialError Some inbounds failed to update
pages.inbounds.batchEditNoMatchingInbounds No matching inbounds
pages.inbounds.batchEditNoMatchingClients No matching clients
pages.inbounds.batchEditAndMore and {count} more
pages.inbounds.batchEditHost Host
pages.inbounds.batchEditPath Path
pages.inbounds.batchEditServiceName Service Name
pages.inbounds.batchEditAuthority Authority
pages.inbounds.batchEditMultiMode Multi Mode
pages.inbounds.batchEditHeartbeat Heartbeat (s)
pages.inbounds.batchEditHttpCamouflage HTTP Camouflage
pages.inbounds.batchEditSeed Seed
pages.inbounds.batchEditMtu MTU
pages.inbounds.batchEditTti TTI
pages.inbounds.batchEditUplinkCap Uplink Capacity
pages.inbounds.batchEditDownlinkCap Downlink Capacity
pages.inbounds.batchEditHeaderType Header Type
pages.inbounds.batchEditEnableSockopt Enable Sockopt
pages.inbounds.batchEditSockoptHint Applies to all selected inbounds
pages.inbounds.batchEditClearFallbacks Clear Fallbacks
pages.inbounds.batchEditFlow Flow Control
pages.inbounds.batchEditVersion Version
pages.inbounds.batchEditAuth Auth
pages.inbounds.batchEditUdpIdleTimeout UDP Idle Timeout
pages.inbounds.batchEditMasquerade Masquerade
pages.inbounds.batchEditMasqType Masq Type
pages.inbounds.batchEditClearUdpMasks Clear UDP Masks
pages.inbounds.batchEditQuicParams QUIC Params
pages.inbounds.batchEditCongestion Congestion
pages.inbounds.batchEditDebug Debug
pages.inbounds.batchEditBrutalUp Brutal Up (bps)
pages.inbounds.batchEditBrutalDown Brutal Down (bps)
pages.inbounds.batchEditUdpHop UDP Hop
pages.inbounds.batchEditHopPorts Hop Ports
pages.inbounds.batchEditHopInterval Hop Interval
pages.inbounds.batchEditMaxIdle Max Idle
pages.inbounds.batchEditKeepAlive Keep Alive
pages.inbounds.batchEditInitStreamRecv Init Stream Recv Win
pages.inbounds.batchEditMaxStreamRecv Max Stream Recv Win
pages.inbounds.batchEditMaxIncomingStreams Max Incoming Streams
pages.inbounds.batchEditDecryption Decryption
pages.inbounds.batchEditEncryption Encryption
pages.inbounds.batchEditMinVersion Min Version
pages.inbounds.batchEditMaxVersion Max Version
pages.inbounds.batchEditRejectUnknownSni Reject Unknown SNI
pages.inbounds.batchEditDisableSystemRoot Disable System Root
pages.inbounds.batchEditSessionResumption Session Resumption
pages.inbounds.batchEditAlpn ALPN
pages.inbounds.batchEditCipherSuites Cipher Suites
pages.inbounds.batchEditServerName Server Name/SNI
pages.inbounds.batchEditPublicKey Public Key
pages.inbounds.batchEditShortId Short ID
pages.inbounds.batchEditSpiderX SpiderX
pages.inbounds.batchEditMldsaVerify MLDSA65 Verify
pages.inbounds.batchEditMode Mode
pages.inbounds.batchEditNoSseHeader No SSE Header
pages.inbounds.batchEditShowCurrent Show current values
pages.inbounds.batchReorder Batch Reorder
pages.inbounds.batchReorderStart Starting value
pages.inbounds.batchReorderStep Step
pages.inbounds.batchReorderDrag Drag to reorder
pages.inbounds.batchReorderMoveUp Move up
pages.inbounds.batchReorderMoveDown Move down
pages.inbounds.batchReorderPreview Preview order

Mockups, screenshots, or examples

No response

Which parts of the panel would this affect?

Backend (API endpoints, login, settings)

Are you willing to help?

  • I'd like to implement this feature myself and open a PR.
  • I can help test once a PR is open.

Before submitting

  • I searched existing issues and this feature has not been requested.
  • This feature request is written in English.
Originally created by @jshir700 on GitHub (Jun 16, 2026). Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5370 ### Is your feature request related to a problem? If you manage more than a handful of inbounds, you've almost certainly faced this: you need to make the **same small change** across many inbounds, and the only tool available is to open each one's edit modal, make the change, save it, wait for the panel to respond, and repeat — sometimes dozens or hundreds of times. This isn't just inconvenient — it actively encourages bad practices. When updating 20 inbounds one-by-one takes 10 minutes, operators start asking "can I script this?" or "do I really need to change all of them?" or worse, they just skip the maintenance and leave stale configurations running. And the manual process is error-prone: you'll inevitably mistype a value on the 14th inbound or forget to save one. Concretely, here are the operations that currently require a full edit cycle per inbound but should really be a one-shot bulk operation: | Task | Current effort (for 30 inbounds) | |---|---| | Update WS `host` after CDN domain change | ~15 minutes, 30 modals | | Disable all inbounds pointing to a retired server | ~10 minutes, 30 modals | | Extend expiry date on 50 free-tier inbounds | ~20 minutes, 50 modals | | Set the same Reality key pair across 10 inbounds | ~8 minutes, 10 modals | | Change TLS minVersion from 1.2 to 1.3 across all TLS inbounds | ~5 minutes, N modals | | Batch reorder 25 inbounds into a manual sequence | ~30 minutes — each inbound's sortOrder must be edited individually via the single-inbound form, and you can't see other inbounds' values while doing it | The existing checkbox selection on the inbound list page already supports multi-select. But the only bulk action it offers is **delete**. Everything else is single-inbound only. ### Describe the solution you'd like The core idea is simple: select multiple inbounds → click "Batch Edit" → pick the fields you want to change → apply once. But there's a subtle design challenge. A batch edit isn't the same as opening an empty form and filling it in. The semantics are fundamentally different: - **Single edit:** "Here is the complete new state of this inbound." Every field gets saved. - **Batch edit:** "Here are the **specific things** I want to change across all selected inbounds. Everything else stays exactly as it is." This means the batch edit UI needs to communicate a **three-way state** for each field, not just a value: 1. **"Don't touch this field"** — the initial state of every control 2. **"Set this field to X"** — the user explicitly entered a value 3. **"Clear / reset this field"** — the user explicitly wants to remove a value And because the selected inbounds might have **different protocols, different transport networks, or different security configurations**, the UI also needs to show only the controls that make sense for the current selection, and hide the rest. --- #### How it works — user perspective 1. On the `InboundsPage`, select two or more inbounds by ticking their checkboxes. 2. A **"Batch Edit"** button appears in the toolbar (alongside the existing bulk delete and the selected-count tag). 3. Clicking it opens a modal with 4 tab pages: - **General** — the simple, cross-cutting fields: enable/disable, total traffic, expiry time, traffic reset strategy, listen address, share address strategy (node/listen/custom with custom value input), deploy node, sniffing, and **batch reorder** (see below). These are the fields most operators reach for first. - **Network** — transport-layer settings gated by network type. If all selected inbounds use WebSocket, only WS fields show up. If you selected a mix of WS and gRPC inbounds, both sets of fields appear (each clearly labeled). **External proxy** settings also live in this tab — adding/updating/replacing external proxy entries (e.g. updating the CDN origin address across all WS inbounds) is a common bulk operation. - **Security** — TLS and Reality fields, again gated by what the selected inbounds actually use. - **Protocol** — protocol-specific settings like VLESS flow control, fallback clearing, and sockopt. 4. Each control starts in a **"Keep original"** state. You only touch the controls you want to change. If you want to update the WS path but leave everything else alone, you fill in only the WS path field and click Apply. 5. As you interact with each control, a compact preview line below it shows the **current value of that field for every selected inbound** — so you can see what you're about to overwrite before you commit. 6. Click **Apply**. A single API call updates all selected inbounds, reporting back how many succeeded and which (if any) were skipped and why. --- #### Design decisions explained **Why a new API endpoint instead of calling the existing `update/:id` N times from the frontend?** The frontend _could_ call `/panel/api/inbounds/update/:id` once per selected inbound in a loop. But that means N sequential HTTP requests, N auth checks, N WebSocket broadcasts — it's chatty and slow. A dedicated `POST /panel/api/inbounds/bulkUpdate` endpoint packages all the changes into one request and lets the backend iterate efficiently, reporting partial success in a single response. **Why "Keep original" for controls instead of having the user fill in every field?** Because batch editing is about making targeted changes, not full replacements. If you have 30 inbounds and you just want to disable them, you shouldn't need to also re-type every inbound's port, listen address, stream settings, and TLS config. The "keep original" semantics mean the batch edit is always additive — it only changes what you explicitly touch. **Why hide network/security/protocol cards that don't apply to the selection?** Imagine you selected 5 WS inbounds and 5 gRPC inbounds. If we showed the full set of every possible field, the modal would be overwhelming: 20+ stream settings controls, TLS controls, Reality controls, protocol controls — most of them irrelevant to the inbounds you selected. Worse, you could accidentally set a field on inbounds where it doesn't apply, which would either be silently ignored (confusing) or cause an error (frustrating). Instead, by gating each card on whether the selected inbounds actually use that network type or security type, the modal adapts to the selection. Select only WS inbounds → only WS fields appear. Select 5 WS + 5 gRPC → both appear, side by side. Select a mix that has nothing in common → General tab is enough, and the other tabs are disabled. **Why three-state booleans (Switch with indeterminate)?** A simple on/off switch has a hidden problem: what does "off" mean? Does it mean "set enable to false" or does it mean "I didn't touch enable"? In a batch edit, these are different actions. The three-state approach resolves this: | Switch appearance | Meaning | |---|---| | Dimmed / "indeterminate" bar | Don't change this field | | Blue (on) | Set to true | | Gray (off) | Set to false | The user sees at a glance which fields they've touched and which fields will remain as-is. **Why show current values per inbound?** The biggest risk in batch editing is overwriting something you didn't intend to. If you're updating the WS host field, but a few inbounds in your selection have a different host value than the rest, you should know before you click Apply. The per-inbound preview line below each field serves exactly this purpose — it shows the current value of that field for each selected inbound, so you can verify the change is safe before committing. **Why partial success instead of rollback-on-failure?** The inbounds are independent — updating one doesn't affect another. If inbound #3 fails because of a port conflict, there's no reason to roll back inbounds #1 and #2 which succeeded. Partial success means the operator only has to re-check the failed ones, not redo the entire batch. **Why does subSortIndex (batch reorder) need special treatment?** The existing single-inbound form has a `subSortIndex` field (database column `SubSortIndex`, default: `1`) that controls the sort order of the inbound's links in subscription output — lower values appear first, ties broken by ID. If you were to include it in the General tab like any other field (a plain `InputNumber`), every selected inbound would receive the **same** sort value — rendering the sort meaningless. The purpose of batch reordering is to arrange inbounds into a **sequential order**, not to stamp them all with an identical number. This means reorder is fundamentally different from the other fields in the batch edit: | Other fields (enable, total, remark...) | subSortIndex | |---|---| | Set the same value on every selected inbound | Assign **different sequential values** to different inbounds | | Value is known upfront (true/false/100GB) | Value depends on **position** — unknown until order is decided | | No dependency between inbounds | Inbounds compete for sort positions — changing one affects the others | So instead of a simple input, the modal provides a **dedicated batch reorder card** inside the General tab. And instead of adding a separate endpoint, the `bulkUpdate` request body includes an optional `reorder` field that carries the ordered inbound IDs — the backend applies field changes first, then updates `SubSortIndex` on each inbound based on its position. --- #### Batch Reorder — detailed UX Inside the General tab, when two or more inbounds are selected, a **"Batch Reorder"** card appears. The user can rearrange inbounds into their desired order using either interaction method: 1. **Drag handle** (≡) — click and drag a row up or down in the list 2. **Arrow buttons** (↑/↓) — click to move a row one position up or down ``` ─── Batch Reorder ────────────────────────── Starting value: [ 1 ] Step: [ 10 ] ≡ [↑][↓] inbound-a (vmess-ws-443) → 1 ≡ [↑][↓] inbound-b (vless-grpc-8443) → 11 ≡ [↑][↓] inbound-c (trojan-2053) → 21 ≡ [↑][↓] inbound-d (reality-443) → 31 ≡ [↑][↓] inbound-e (hysteria-10000) → 41 ``` **Initial order** = the current list display order on the inbounds page before the user opened the modal. **Row identifier:** Each row shows `remark (protocol-network-port)` so the user can identify inbounds at a glance without needing to cross-reference with the inbound list page. **Computed value:** The right-hand column shows the `SubSortIndex` value updated in real time as rows are moved: `startValue + positionIndex × step`. Default: start=1, step=10. The step of 10 leaves gaps (1, 11, 21...) so the operator can later manually insert other inbounds between them using the single-edit form. **Preview string:** A compact one-line preview below the card shows the final ordered sequence of remarks — useful for a quick sanity check. **Submission flow:** The `bulkUpdate` request body includes an optional `reorder` field alongside the other field changes: ```json { "ids": [1, 2, 3, 4, 5], "fields": { "enable": true }, "reorder": { "ids": [3, 1, 4, 2, 5] } } ``` The backend processes in order: 1. Apply field/stream/security/protocol changes from the rest of the request body 2. If `reorder.ids` is present and non-empty, update each inbound's `SubSortIndex` by position: position-0 gets `startAt` (default 1), position-1 gets `startAt + step` (default 11), etc. This keeps the API unified — the frontend sends one request, the backend applies everything atomically (or reports partial success for the field changes if some inbounds fail). --- #### API shape ``` POST /panel/api/inbounds/bulkUpdate ``` The request body separates concerns into five sections — four for value edits, one for reorder: **`fields`** — simple key-value pairs for the inbound's database columns. A key is only applied if its value is non-null. The frontend sends `null` for every control the user didn't touch. ```json { "enable": true, "total": 0, "expiryTime": 1798790400000, "trafficReset": "monthly", "listen": "0.0.0.0", "shareAddrStrategy": "node", "shareAddr": null, "sniffing": { "enabled": true } } ``` **`streamSettings`** — network-level settings grouped by transport type. Only the settings matching the inbound's current network are applied: ```json { "wsSettings": { "host": "cdn.example.com", "path": "/api/ws" }, "grpcSettings": { "serviceName": "myservice" }, "kcpSettings": { "headerType": "dtls", "seed": "myseed" } } ``` **`externalProxy`** — cross-cutting, not tied to a specific network type. The UI groups this under the Network tab but it applies regardless of the inbound's transport: ```json { "externalProxy": { "dest": "new-cdn.example.com", "port": 443, "remark": "CDN origin" } } ``` **`security`** — TLS and Reality settings, again dispatched by the inbound's security type: ```json { "tlsSettings": { "sni": "example.com", "alpn": ["h2", "http/1.1"] }, "realitySettings": { "publicKey": "...", "shortId": "abc123" } } ``` **`protocolSettings`** — per-protocol adjustments: ```json { "flow": "xtls-rprx-vision", "clearFallbacks": true, "enableSockopt": true } ``` **`reorder`** — optional batch reordering. When present, the backend assigns `SubSortIndex` values sequentially based on position in the `ids` array, after applying all field changes above: ```json { "reorder": { "ids": [3, 1, 4, 2, 5], "startAt": 1, "step": 10 } } ``` `startAt` defaults to 1 and `step` defaults to 10 — both match the defaults shown in the UI modal. The backend assigns position-0 → `startAt`, position-1 → `startAt + step`, etc. Response: ```json { "success": true, "updated": 5, "skipped": [ { "id": 3, "reason": "port conflict on port 443" }, { "id": 7, "reason": "inbound not found" } ] } ``` --- #### Files involved | File | What changes | |---|---| | `internal/web/controller/inbound.go` | New `bulkUpdateInbounds` handler; register route | | `internal/web/service/inbound.go` | New `UpdateInboundPartial` method applying non-null diffs + reorder logic | | `internal/web/web.go` | Register `POST /panel/api/inbounds/bulkUpdate` | | `frontend/src/pages/inbounds/form/BatchEditModal.tsx` | **New file** — the 4-tab modal component, ~800 lines | | `frontend/src/pages/inbounds/list/InboundList.tsx` | Add `'batchEdit'` key to action menu, conditionally shown when ≥2 inbounds selected; add `onBulkEdit` prop | | `frontend/src/pages/inbounds/InboundsPage.tsx` | Import `BatchEditModal`, manage open/close state + selected inbounds, wire menu action | | `internal/web/translation/*.json` | ~75 new i18n keys across 13 language files | ### Alternatives you've considered **Export → edit JSON → re-import.** The panel already supports exporting a single inbound as JSON and importing it. But this is a "replace the whole thing" operation — you must serialise every client, every byte of stream settings, every sniffing rule. For an inbound with hundreds of clients, that's megabytes of JSON to edit just to change one field. And there's no way to do this for multiple inbounds at once without a separate script. **Script the REST API.** A command-line tool that calls `/panel/api/inbounds/update/:id` in a loop for each selected inbound is technically possible. But it requires SSH or API-token access, understanding of the JSON shapes (which differ by protocol), and manual error handling for things like port conflicts. For most panel operators — who are panel administrators, not developers — this is not a practical solution. **Just open and edit each one.** This is the status quo, and it's the baseline we're comparing against. It works for 2-3 inbounds. For 10+, it's painful. For 50+, it's almost unusable. The time cost scales linearly with the number of inbounds, and the error rate goes up with fatigue. **Reuse the `InboundFormModal` with a multi-inbound mode.** The existing edit modal is designed around a single inbound: it loads the full record, binds every field, and on save sends the complete state. Making it support batch editing would require either (a) loading all selected inbounds into a single form (impossible when they have different values for the same fields), or (b) adding "keep original" semantics to every control, which would complicate the single-edit flow for no benefit. A dedicated modal is cleaner and keeps both flows simple. ### Concrete use cases **Use case 1: CDN domain migration.** You operate a panel behind a CDN that requires changing the origin domain. You have 45 inbounds across 3 protocols (VMess-WS, VLESS-WS, Trojan-WS). All use WebSocket with the same `host` field pointing to your CDN. The CDN provider changes the origin endpoint from `old-cdn.example.com` to `new-cdn.example.com`. Without batch edit: 45 inbounds × (open modal → edit host → save → wait) = ~25 minutes of repetitive work. With batch edit: select all 45 → Batch Edit → Network tab → WebSocket → type the new host → Apply. 30 seconds. **Use case 2: Temporary maintenance window.** You need to take 12 specific inbounds offline for 2 hours to test a new Xray core version. After testing, you need to bring them back online. Without batch edit: disable each of 12 inbounds manually, then manually re-enable them later. If you lose track of which ones you disabled, you might leave some offline permanently. With batch edit: select the 12 → Batch Edit → General → Enable → Off → Apply. After testing: select the same 12 → Enable → On → Apply. Two clicks each way. **Use case 3: Tiered service management.** You run a service with "bronze" (expiry: 30 days, 50GB), "silver" (expiry: 60 days, 100GB), and "gold" (expiry: 90 days, 200GB) tiers. At the start of each month, you need to create new batches and adjust limits. When you decide to increase the "silver" tier from 100GB to 150GB, you need to update 35 existing inbounds. Without batch edit: you can't practically update 35 existing inbounds — you'd typically create new ones and migrate clients manually, because the effort of editing 35 is too high. With batch edit: select the 35 silver-tier inbounds → set total → Apply. Done in 10 seconds. **Use case 4: Emergency security patch.** A vulnerability is discovered in a specific TLS version or cipher suite. You need to update `minVersion` from `1.1` to `1.2` on every TLS inbound immediately. Without batch edit: you're racing the clock, manually updating each inbound while the panel is potentially vulnerable. With batch edit: select all TLS inbounds → Security tab → TLS → set Min Version → Apply. Takes as long as it takes to type "1.2". **Use case 5: Manual reorder after server consolidation.** You've just consolidated 3 servers down to 1. You have 40 inbounds from the old servers imported into one panel, and their subscription sort order is a mess — inbounds from server A, then server C, then server B interleaved. You need to reorder them into a clean sequence: all HTTP inbounds first, then all VMess, then VLESS, then Trojan, then Shadowsocks, with each group sorted by port. Currently you'd have to open each inbound individually and set its `subSortIndex` by hand, while trying to keep a mental map of which values you've already used. With batch edit: multi-select the inbounds you want to arrange, drag them into order inside the modal, set start=1 step=10 → Apply. If you change your mind, re-open and reorder again — the new sequence overwrites the old one. --- ### Appendix: i18n keys The following new keys need to be added across all `internal/web/translation/*.json` files: | Key | English | |---|---| | `pages.inbounds.batchEditInbounds` | Batch Edit Inbounds | | `pages.inbounds.batchEditTabGeneral` | General | | `pages.inbounds.batchEditTabNetwork` | Network | | `pages.inbounds.batchEditTabSecurity` | Security | | `pages.inbounds.batchEditTabProtocol` | Protocol | | `pages.inbounds.batchEditKeepOriginal` | Keep original | | `pages.inbounds.batchEditKeepClientOriginals` | Keep per-client originals | | `pages.inbounds.batchEditNotSet` | (not set) | | `pages.inbounds.batchEditApply` | Apply | | `pages.inbounds.batchEditSaved` | Inbounds updated | | `pages.inbounds.batchEditPartialError` | Some inbounds failed to update | | `pages.inbounds.batchEditNoMatchingInbounds` | No matching inbounds | | `pages.inbounds.batchEditNoMatchingClients` | No matching clients | | `pages.inbounds.batchEditAndMore` | and {count} more | | `pages.inbounds.batchEditHost` | Host | | `pages.inbounds.batchEditPath` | Path | | `pages.inbounds.batchEditServiceName` | Service Name | | `pages.inbounds.batchEditAuthority` | Authority | | `pages.inbounds.batchEditMultiMode` | Multi Mode | | `pages.inbounds.batchEditHeartbeat` | Heartbeat (s) | | `pages.inbounds.batchEditHttpCamouflage` | HTTP Camouflage | | `pages.inbounds.batchEditSeed` | Seed | | `pages.inbounds.batchEditMtu` | MTU | | `pages.inbounds.batchEditTti` | TTI | | `pages.inbounds.batchEditUplinkCap` | Uplink Capacity | | `pages.inbounds.batchEditDownlinkCap` | Downlink Capacity | | `pages.inbounds.batchEditHeaderType` | Header Type | | `pages.inbounds.batchEditEnableSockopt` | Enable Sockopt | | `pages.inbounds.batchEditSockoptHint` | Applies to all selected inbounds | | `pages.inbounds.batchEditClearFallbacks` | Clear Fallbacks | | `pages.inbounds.batchEditFlow` | Flow Control | | `pages.inbounds.batchEditVersion` | Version | | `pages.inbounds.batchEditAuth` | Auth | | `pages.inbounds.batchEditUdpIdleTimeout` | UDP Idle Timeout | | `pages.inbounds.batchEditMasquerade` | Masquerade | | `pages.inbounds.batchEditMasqType` | Masq Type | | `pages.inbounds.batchEditClearUdpMasks` | Clear UDP Masks | | `pages.inbounds.batchEditQuicParams` | QUIC Params | | `pages.inbounds.batchEditCongestion` | Congestion | | `pages.inbounds.batchEditDebug` | Debug | | `pages.inbounds.batchEditBrutalUp` | Brutal Up (bps) | | `pages.inbounds.batchEditBrutalDown` | Brutal Down (bps) | | `pages.inbounds.batchEditUdpHop` | UDP Hop | | `pages.inbounds.batchEditHopPorts` | Hop Ports | | `pages.inbounds.batchEditHopInterval` | Hop Interval | | `pages.inbounds.batchEditMaxIdle` | Max Idle | | `pages.inbounds.batchEditKeepAlive` | Keep Alive | | `pages.inbounds.batchEditInitStreamRecv` | Init Stream Recv Win | | `pages.inbounds.batchEditMaxStreamRecv` | Max Stream Recv Win | | `pages.inbounds.batchEditMaxIncomingStreams` | Max Incoming Streams | | `pages.inbounds.batchEditDecryption` | Decryption | | `pages.inbounds.batchEditEncryption` | Encryption | | `pages.inbounds.batchEditMinVersion` | Min Version | | `pages.inbounds.batchEditMaxVersion` | Max Version | | `pages.inbounds.batchEditRejectUnknownSni` | Reject Unknown SNI | | `pages.inbounds.batchEditDisableSystemRoot` | Disable System Root | | `pages.inbounds.batchEditSessionResumption` | Session Resumption | | `pages.inbounds.batchEditAlpn` | ALPN | | `pages.inbounds.batchEditCipherSuites` | Cipher Suites | | `pages.inbounds.batchEditServerName` | Server Name/SNI | | `pages.inbounds.batchEditPublicKey` | Public Key | | `pages.inbounds.batchEditShortId` | Short ID | | `pages.inbounds.batchEditSpiderX` | SpiderX | | `pages.inbounds.batchEditMldsaVerify` | MLDSA65 Verify | | `pages.inbounds.batchEditMode` | Mode | | `pages.inbounds.batchEditNoSseHeader` | No SSE Header | | `pages.inbounds.batchEditShowCurrent` | Show current values | | `pages.inbounds.batchReorder` | Batch Reorder | | `pages.inbounds.batchReorderStart` | Starting value | | `pages.inbounds.batchReorderStep` | Step | | `pages.inbounds.batchReorderDrag` | Drag to reorder | | `pages.inbounds.batchReorderMoveUp` | Move up | | `pages.inbounds.batchReorderMoveDown` | Move down | | `pages.inbounds.batchReorderPreview` | Preview order | ### Mockups, screenshots, or examples _No response_ ### Which parts of the panel would this affect? Backend (API endpoints, login, settings) ### Are you willing to help? - [ ] I'd like to implement this feature myself and open a PR. - [ ] I can help test once a PR is open. ### Before submitting - [x] I searched [existing issues](../issues?q=is%3Aissue) and this feature has not been requested. - [x] This feature request is written in English.
Author
Owner

@github-actions[bot] commented on GitHub (Jun 16, 2026):

This is a valid feature request. The panel has no bulk-edit capability for inbounds today, only bulk delete. Here is what was confirmed in the source and what the implementation would require.

What already exists (confirmed in source)

  • The frontend multi-select mechanism is in place. InboundList.tsx maintains selectedRowKeys: number[] and the toolbar already renders a bulk-delete button when the selection is non-empty (InboundList.tsx:54,117-120,175-180).
  • POST /panel/api/inbounds/bulkDel (internal/web/controller/inbound.go:73) is the only bulk inbound endpoint. Its pattern — a request struct with an ids array, per-item error reporting via BulkDelInboundResult/BulkDelInboundReport, a single Xray restart flag, and one WebSocket broadcast — is the right template for a bulk-update endpoint.
  • Client-level bulk operations are more mature: ClientBulkAdjustModal.tsx, BulkAttachInboundsModal.tsx, BulkDetachInboundsModal.tsx, BulkAddToGroupModal.tsx, and ClientBulkAddModal.tsx all exist and show the established frontend pattern for bulk modal flows.
  • POST /panel/api/inbounds/setEnable/:id (inbound.go:75) already handles the targeted single-field update case for the enable flag, for exactly the reason the request identifies: the full UpdateInbound path re-serialises the entire settings JSON including all clients, which is prohibitively heavy for interactive use on large inbounds.

What would need to be added

Backend (Go):

  • A POST /panel/api/inbounds/bulkUpdate route and handler in internal/web/controller/inbound.go, modelled after bulkDelInbounds. The handler receives a request body containing the target IDs and a sparse diff (only fields the user touched), iterates over the IDs, applies the diff to each loaded inbound record, and collects per-item success/failure.
  • A new service method in internal/web/service/inbound.go — the request calls it something like UpdateInboundPartial — that reads the existing row, overlays only the non-null diff fields, then delegates to the existing UpdateInbound method. The existing UpdateInbound signature is func (s *InboundService) UpdateInbound(inbound *model.Inbound) (*model.Inbound, bool, error) (inbound.go:928), so the partial method sits on top of it rather than replacing it.
  • The partial diff must be applied at the JSON level for streamSettings and sniffing because those columns are stored as raw JSON strings in the model.Inbound struct, not as typed sub-structs at the GORM layer. Each affected sub-document needs to be unmarshalled, patched, and re-marshalled individually.

Frontend (React/TypeScript):

  • A BatchEditModal component. The existing InboundFormModal (single-inbound edit) is not reusable here without significant rework — it is built around loading one complete record and binding every field. A dedicated modal is the right call, consistent with how ClientBulkAdjustModal is kept separate from the single-client edit flow.
  • Three-state controls (keep/set/clear) are not natively provided by Ant Design's Switch or InputNumber. The modal will need a small wrapper that adds an explicit "keep original" state per field — either via a checkbox alongside each control or via a wrapper component.
  • InboundList.tsx and InboundsPage.tsx would each need minor additions: a "Batch Edit" button in the selection toolbar (alongside the existing delete button), state for the modal's open/closed status, and a prop chain to carry the selection into the modal.
  • 13 translation files in internal/web/translation/ would need the new i18n keys. The en-US.json keys can be added first and other locales filled in via community contributions; the i18n engine falls back to the key string if a translation is missing, so the feature can ship without all 13 languages complete.

Design notes from the request that hold up against the source

The proposal to avoid calling update/:id N times from the frontend is correct. Each call to updateInbound fetches the full GetInbound record (which includes the full settings JSON with all clients), serialises it back, validates it, and triggers a WebSocket broadcast. Doing this serially for 50 inbounds is slow and chatty. A single bulkUpdate call with one broadcast at the end is the right approach, matching the pattern already used by bulkDelInbounds.

The partial-success semantics proposed (report skipped IDs with reasons, do not roll back successful ones) also match what DelInbounds/BulkDelInboundResult already does for bulk delete.

Scope callout

The i18n section of the request lists ~65 new keys. That is a significant translation burden across 13 languages. Maintainers may want to scope the initial PR to en-US.json only and accept follow-up PRs for other locales, as has been done in this repo before.

If you plan to open a PR, the backend half (new route + service method) is a reasonable starting point and can be reviewed independently of the frontend modal.


This reply was generated automatically; a maintainer may follow up.

<!-- gh-comment-id:4714430354 --> @github-actions[bot] commented on GitHub (Jun 16, 2026): This is a valid feature request. The panel has no bulk-edit capability for inbounds today, only bulk delete. Here is what was confirmed in the source and what the implementation would require. **What already exists (confirmed in source)** - The frontend multi-select mechanism is in place. `InboundList.tsx` maintains `selectedRowKeys: number[]` and the toolbar already renders a bulk-delete button when the selection is non-empty (`InboundList.tsx:54,117-120,175-180`). - `POST /panel/api/inbounds/bulkDel` (`internal/web/controller/inbound.go:73`) is the only bulk inbound endpoint. Its pattern — a request struct with an `ids` array, per-item error reporting via `BulkDelInboundResult`/`BulkDelInboundReport`, a single Xray restart flag, and one WebSocket broadcast — is the right template for a bulk-update endpoint. - Client-level bulk operations are more mature: `ClientBulkAdjustModal.tsx`, `BulkAttachInboundsModal.tsx`, `BulkDetachInboundsModal.tsx`, `BulkAddToGroupModal.tsx`, and `ClientBulkAddModal.tsx` all exist and show the established frontend pattern for bulk modal flows. - `POST /panel/api/inbounds/setEnable/:id` (`inbound.go:75`) already handles the targeted single-field update case for the enable flag, for exactly the reason the request identifies: the full `UpdateInbound` path re-serialises the entire settings JSON including all clients, which is prohibitively heavy for interactive use on large inbounds. **What would need to be added** Backend (Go): - A `POST /panel/api/inbounds/bulkUpdate` route and handler in `internal/web/controller/inbound.go`, modelled after `bulkDelInbounds`. The handler receives a request body containing the target IDs and a sparse diff (only fields the user touched), iterates over the IDs, applies the diff to each loaded inbound record, and collects per-item success/failure. - A new service method in `internal/web/service/inbound.go` — the request calls it something like `UpdateInboundPartial` — that reads the existing row, overlays only the non-null diff fields, then delegates to the existing `UpdateInbound` method. The existing `UpdateInbound` signature is `func (s *InboundService) UpdateInbound(inbound *model.Inbound) (*model.Inbound, bool, error)` (`inbound.go:928`), so the partial method sits on top of it rather than replacing it. - The partial diff must be applied at the JSON level for `streamSettings` and `sniffing` because those columns are stored as raw JSON strings in the `model.Inbound` struct, not as typed sub-structs at the GORM layer. Each affected sub-document needs to be unmarshalled, patched, and re-marshalled individually. Frontend (React/TypeScript): - A `BatchEditModal` component. The existing `InboundFormModal` (single-inbound edit) is not reusable here without significant rework — it is built around loading one complete record and binding every field. A dedicated modal is the right call, consistent with how `ClientBulkAdjustModal` is kept separate from the single-client edit flow. - Three-state controls (keep/set/clear) are not natively provided by Ant Design's `Switch` or `InputNumber`. The modal will need a small wrapper that adds an explicit "keep original" state per field — either via a checkbox alongside each control or via a wrapper component. - `InboundList.tsx` and `InboundsPage.tsx` would each need minor additions: a "Batch Edit" button in the selection toolbar (alongside the existing delete button), state for the modal's open/closed status, and a prop chain to carry the selection into the modal. - 13 translation files in `internal/web/translation/` would need the new i18n keys. The `en-US.json` keys can be added first and other locales filled in via community contributions; the i18n engine falls back to the key string if a translation is missing, so the feature can ship without all 13 languages complete. **Design notes from the request that hold up against the source** The proposal to avoid calling `update/:id` N times from the frontend is correct. Each call to `updateInbound` fetches the full `GetInbound` record (which includes the full `settings` JSON with all clients), serialises it back, validates it, and triggers a WebSocket broadcast. Doing this serially for 50 inbounds is slow and chatty. A single `bulkUpdate` call with one broadcast at the end is the right approach, matching the pattern already used by `bulkDelInbounds`. The partial-success semantics proposed (report skipped IDs with reasons, do not roll back successful ones) also match what `DelInbounds`/`BulkDelInboundResult` already does for bulk delete. **Scope callout** The i18n section of the request lists ~65 new keys. That is a significant translation burden across 13 languages. Maintainers may want to scope the initial PR to `en-US.json` only and accept follow-up PRs for other locales, as has been done in this repo before. If you plan to open a PR, the backend half (new route + service method) is a reasonable starting point and can be reviewed independently of the frontend modal. --- *This reply was generated automatically; a maintainer may follow up.*
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#3758
No description provided.