[PR #6453] [MERGED] fix(frontend): fold sockopt v6only into V6Only on inbound load #6275

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

📋 Pull Request Information

Original PR: https://github.com/MHSanaei/3x-ui/pull/6453
Author: @mrchatam
Created: 9/11/2026
Status: ✅ Merged
Merged: 9/12/2026
Merged by: @MHSanaei

Base: main ← Head: fix/sockopt-v6only-fold


📝 Commits (1)

  • 90b6c05 fix(frontend): fold sockopt v6only into V6Only on inbound load

📊 Changes

1 file changed (+10 additions, -2 deletions)

View changed files

📝 frontend/src/lib/xray/inbound-form-adapter.ts (+10 -2)

📄 Description

Summary

Fixes #6421.

Loading a stored sockopt that uses Xray-style lowercase v6only merged the raw object with Zod defaults and produced both v6only and V6Only in Advanced Configuration. The form switch binds to V6Only, so a stored v6only: true rendered as off and could not be cleared.

Fold v6only into V6Only at the load boundary in rawInboundToFormValues and drop the lowercase key before the raw∪parsed merge. Port-conflict / multi-address listener behavior is intentionally out of scope here.

Test plan

  • Store or import an inbound sockopt with "v6only": true
  • Open inbound edit → Advanced Configuration: only V6Only appears (no duplicate lowercase key)
  • Sockopt form switch reflects on; toggling off and saving clears the option
  • Inbounds that already use V6Only still round-trip unchanged

🔄 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/6453 **Author:** [@mrchatam](https://github.com/mrchatam) **Created:** 9/11/2026 **Status:** ✅ Merged **Merged:** 9/12/2026 **Merged by:** [@MHSanaei](https://github.com/MHSanaei) **Base:** `main` ← **Head:** `fix/sockopt-v6only-fold` --- ### 📝 Commits (1) - [`90b6c05`](https://github.com/MHSanaei/3x-ui/commit/90b6c05bfe6b540ee14d9069ce2537dea058e371) fix(frontend): fold sockopt v6only into V6Only on inbound load ### 📊 Changes **1 file changed** (+10 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `frontend/src/lib/xray/inbound-form-adapter.ts` (+10 -2) </details> ### 📄 Description ## Summary Fixes #6421. Loading a stored sockopt that uses Xray-style lowercase `v6only` merged the raw object with Zod defaults and produced both `v6only` and `V6Only` in Advanced Configuration. The form switch binds to `V6Only`, so a stored `v6only: true` rendered as off and could not be cleared. Fold `v6only` into `V6Only` at the load boundary in `rawInboundToFormValues` and drop the lowercase key before the raw∪parsed merge. Port-conflict / multi-address listener behavior is intentionally out of scope here. ## Test plan - [ ] Store or import an inbound sockopt with `"v6only": true` - [ ] Open inbound edit → Advanced Configuration: only `V6Only` appears (no duplicate lowercase key) - [ ] Sockopt form switch reflects on; toggling off and saving clears the option - [ ] Inbounds that already use `V6Only` still round-trip unchanged --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-02 04:07:36 +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#6275
No description provided.