[GH-ISSUE #5715] [Bug]: wireguard allowedIPs is not realized on Inbound edit form #3976

Closed
opened 2026-10-31 20:36:17 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @gomanuke on GitHub (Jul 1, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5715

Describe the bug

allowedIPs is showed on Client's edit form (readonly) but not realised on Inbound's edit form. Just on advanced JSON tab.

How to reproduce the problem

Image Image

Expected behavior

No response

Actual behavior

No response

Relevant logs


Screenshots

No response

3x-ui version

3.4.2

Xray-core version

No response

How did you install 3x-ui?

install.sh script

Operating system

Debian 13

Which parts of the panel are affected?

No response

Browser (only if it is a UI bug)

No response

Is the panel behind a reverse proxy or CDN?

None

Before submitting

  • I searched existing issues and this bug has not been reported.
  • I am running the latest released version of 3x-ui (or have verified the bug still exists on it).
  • This bug report is written in English.
  • I have redacted any sensitive data (tokens, real domains, client UUIDs).
Originally created by @gomanuke on GitHub (Jul 1, 2026). Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5715 ### Describe the bug allowedIPs is showed on Client's edit form (readonly) but not realised on Inbound's edit form. Just on advanced JSON tab. ### How to reproduce the problem <img width="1079" height="1276" alt="Image" src="https://github.com/user-attachments/assets/bff92c7f-bb11-4334-934c-71a4bebbb01c" /> <img width="1172" height="1378" alt="Image" src="https://github.com/user-attachments/assets/8e78e76f-9661-460f-9604-410230145495" /> ### Expected behavior _No response_ ### Actual behavior _No response_ ### Relevant logs ```shell ``` ### Screenshots _No response_ ### 3x-ui version 3.4.2 ### Xray-core version _No response_ ### How did you install 3x-ui? install.sh script ### Operating system Debian 13 ### Which parts of the panel are affected? _No response_ ### Browser (only if it is a UI bug) _No response_ ### Is the panel behind a reverse proxy or CDN? None ### Before submitting - [x] I searched [existing issues](../issues?q=is%3Aissue) and this bug has not been reported. - [x] I am running the latest released version of 3x-ui (or have verified the bug still exists on it). - [x] This bug report is written in English. - [x] I have redacted any sensitive data (tokens, real domains, client UUIDs).
bsakaguchi 2026-10-31 20:36:17 +07:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@github-actions[bot] commented on GitHub (Jul 1, 2026):

Confirmed in the code: there is currently no form control anywhere in the panel that lets you set or change a WireGuard peer's allowedIPs — it is auto-generated on create and read-only on edit, with the raw JSON editor as the only way to see/change it.

  • The Inbound edit form's WireGuard fields (frontend/src/pages/inbounds/form/protocols/wireguard.tsx) only expose inbound-wide settings — secretKey, MTU, dns, noKernelTun, domainStrategy — and the derived server public key. There is no peer/client list UI in that component at all, so allowedIPs per peer can't appear there.
  • The Client edit form (frontend/src/pages/clients/ClientFormModal.tsx:805-808) renders wireguardAllowedIPs as a disabled Input, and only when editing an existing client that already has a value (isEdit && form.wgAllowedIPs). It is never shown, and never editable, when adding a new client.
  • This is because the backend allocates the address itself: defaultWireguardClients in internal/web/service/client_wireguard.go (lines 82-129) fills in AllowedIPs from the inbound's subnet whenever a client is added without one, picking the next free /32 (allocateWireguardAddress) so it doesn't collide with existing peers.
  • Today the only way to inspect or override the value is the inbound's "Advanced" → Settings JSON tab (AdvancedSliceEditor, wired in InboundFormModal.tsx), editing settings.clients[].allowedIPs directly, which matches what you observed.

So this isn't a regression in the sense of something that used to work — the WireGuard form was never given an editable allowedIPs control outside the raw JSON tab. It's a genuine gap compared to the auto-populated fields (keys, DNS, etc.) that are editable through the form. It's also related to the broader WireGuard peer-management limitations tracked in #5002.

This reply was generated automatically by an AI agent; a maintainer may follow up.

<!-- gh-comment-id:4854127739 --> @github-actions[bot] commented on GitHub (Jul 1, 2026): Confirmed in the code: there is currently no form control anywhere in the panel that lets you set or change a WireGuard peer's `allowedIPs` — it is auto-generated on create and read-only on edit, with the raw JSON editor as the only way to see/change it. - The Inbound edit form's WireGuard fields (`frontend/src/pages/inbounds/form/protocols/wireguard.tsx`) only expose inbound-wide settings — `secretKey`, MTU, `dns`, `noKernelTun`, `domainStrategy` — and the derived server public key. There is no peer/client list UI in that component at all, so `allowedIPs` per peer can't appear there. - The Client edit form (`frontend/src/pages/clients/ClientFormModal.tsx:805-808`) renders `wireguardAllowedIPs` as a disabled `Input`, and only when editing an existing client that already has a value (`isEdit && form.wgAllowedIPs`). It is never shown, and never editable, when adding a new client. - This is because the backend allocates the address itself: `defaultWireguardClients` in `internal/web/service/client_wireguard.go` (lines 82-129) fills in `AllowedIPs` from the inbound's subnet whenever a client is added without one, picking the next free `/32` (`allocateWireguardAddress`) so it doesn't collide with existing peers. - Today the only way to inspect or override the value is the inbound's "Advanced" → Settings JSON tab (`AdvancedSliceEditor`, wired in `InboundFormModal.tsx`), editing `settings.clients[].allowedIPs` directly, which matches what you observed. So this isn't a regression in the sense of something that used to work — the WireGuard form was never given an editable `allowedIPs` control outside the raw JSON tab. It's a genuine gap compared to the auto-populated fields (keys, DNS, etc.) that are editable through the form. It's also related to the broader WireGuard peer-management limitations tracked in #5002. *This reply was generated automatically by an AI agent; a maintainer may follow up.*
Author
Owner

@MHSanaei commented on GitHub (Jul 2, 2026):

Implemented in 64c30603: the WireGuard Allowed IPs field in the client editor is now editable (comma-separated entries, leaving it empty still auto-assigns a free address). Submitted values are validated server-side — each entry must be an IP or CIDR, and an address already used by another peer on the inbound is rejected. Will ship in the next release.

<!-- gh-comment-id:4863443247 --> @MHSanaei commented on GitHub (Jul 2, 2026): Implemented in 64c30603: the WireGuard Allowed IPs field in the client editor is now editable (comma-separated entries, leaving it empty still auto-assigns a free address). Submitted values are validated server-side — each entry must be an IP or CIDR, and an address already used by another peer on the inbound is rejected. Will ship in the next release.
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#3976
No description provided.