[PR #4480] [MERGED] Add support for mark and interface fields in outbound sockopt settings #5705

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

📋 Pull Request Information

Original PR: https://github.com/MHSanaei/3x-ui/pull/4480
Author: @githacs2022
Created: 5/20/2026
Status: ✅ Merged
Merged: 5/20/2026
Merged by: @MHSanaei

Base: main ← Head: main


📝 Commits (2)

  • e289089 Add SockOpt.Mark and SockOpt.Interface parameters for Outbound stream
  • fd9213d Merge branch 'MHSanaei:main' into main

📊 Changes

2 files changed (+18 additions, -2 deletions)

View changed files

📝 frontend/src/models/outbound.js (+12 -2)
📝 frontend/src/pages/xray/OutboundFormModal.vue (+6 -0)

📄 Description

What is the pull request?

This pull request adds support for mark and interface fields in outbound sockopt settings in the 3x-ui web panel.

Previously, outbound sockopt settings in the frontend exposed only a limited subset of Xray fields such as dialerProxy, tcpFastOpen, tcpKeepAliveInterval, tcpMptcp, penetrate, and addressPortStrategy. This change extends the outbound sockopt model and UI form to support configuring mark (fwmark) and interface, allowing advanced routing scenarios such as policy-based routing and explicit outbound interface selection.

The implementation includes:

  • extending SockoptStreamSettings in frontend/src/models/outbound.js
  • adding mark and interfaceName parsing/serialization in fromJson() / toJson()
  • exposing new form fields in frontend/src/pages/xray/OutboundFormModal.vue

No backend or database changes are required because outbound settings are already stored and passed through as JSON.

Which part of the application is affected by the change?

  • Frontend
  • Backend

Type of Changes

  • Bug fix
  • New feature
  • Refactoring
  • Other

Screenshots

Added new outbound Sockopt fields:

  • Mark (fwmark)
  • Interface
image image

🔄 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/4480 **Author:** [@githacs2022](https://github.com/githacs2022) **Created:** 5/20/2026 **Status:** ✅ Merged **Merged:** 5/20/2026 **Merged by:** [@MHSanaei](https://github.com/MHSanaei) **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (2) - [`e289089`](https://github.com/MHSanaei/3x-ui/commit/e289089b6f8bc544be30ae94ca554fce1c3979f4) Add SockOpt.Mark and SockOpt.Interface parameters for Outbound stream - [`fd9213d`](https://github.com/MHSanaei/3x-ui/commit/fd9213d71be4e00696d33e7323430a5d64b7160d) Merge branch 'MHSanaei:main' into main ### 📊 Changes **2 files changed** (+18 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `frontend/src/models/outbound.js` (+12 -2) 📝 `frontend/src/pages/xray/OutboundFormModal.vue` (+6 -0) </details> ### 📄 Description ## What is the pull request? This pull request adds support for `mark` and `interface` fields in outbound `sockopt` settings in the 3x-ui web panel. Previously, outbound sockopt settings in the frontend exposed only a limited subset of Xray fields such as `dialerProxy`, `tcpFastOpen`, `tcpKeepAliveInterval`, `tcpMptcp`, `penetrate`, and `addressPortStrategy`. This change extends the outbound sockopt model and UI form to support configuring `mark` (fwmark) and `interface`, allowing advanced routing scenarios such as policy-based routing and explicit outbound interface selection. The implementation includes: - extending `SockoptStreamSettings` in `frontend/src/models/outbound.js` - adding `mark` and `interfaceName` parsing/serialization in `fromJson()` / `toJson()` - exposing new form fields in `frontend/src/pages/xray/OutboundFormModal.vue` No backend or database changes are required because outbound settings are already stored and passed through as JSON. ## Which part of the application is affected by the change? - [x] Frontend - [ ] Backend ## Type of Changes - [ ] Bug fix - [x] New feature - [ ] Refactoring - [ ] Other ## Screenshots Added new outbound Sockopt fields: - Mark (fwmark) - Interface <img width="627" height="872" alt="image" src="https://github.com/user-attachments/assets/cb6c99a1-9fbe-4e65-8e80-692d32346ccd" /> <img width="623" height="461" alt="image" src="https://github.com/user-attachments/assets/c7b434cb-5607-41e4-86cc-2a31e9933474" /> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-02 04:03:28 +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#5705
No description provided.