From e289089b6f8bc544be30ae94ca554fce1c3979f4 Mon Sep 17 00:00:00 2001
From: githacs2022 <100038411+githacs2022@users.noreply.github.com>
Date: Tue, 19 May 2026 00:30:10 +0300
Subject: [PATCH] Add SockOpt.Mark and SockOpt.Interface parameters for
Outbound stream
---
frontend/src/models/outbound.js | 14 ++++++++++++--
frontend/src/pages/xray/OutboundFormModal.vue | 6 ++++++
2 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/frontend/src/models/outbound.js b/frontend/src/models/outbound.js
index 8277590e..a9f4d3ad 100644
--- a/frontend/src/models/outbound.js
+++ b/frontend/src/models/outbound.js
@@ -748,6 +748,9 @@ export class SockoptStreamSettings extends CommonClass {
penetrate = false,
addressPortStrategy = Address_Port_Strategy.NONE,
trustedXForwardedFor = [],
+ mark = 0,
+ interfaceName = "",
+
) {
super();
this.dialerProxy = dialerProxy;
@@ -757,6 +760,9 @@ export class SockoptStreamSettings extends CommonClass {
this.penetrate = penetrate;
this.addressPortStrategy = addressPortStrategy;
this.trustedXForwardedFor = trustedXForwardedFor;
+ this.mark = mark;
+ this.interfaceName = interfaceName;
+
}
static fromJson(json = {}) {
@@ -768,7 +774,9 @@ export class SockoptStreamSettings extends CommonClass {
json.tcpMptcp,
json.penetrate,
json.addressPortStrategy,
- json.trustedXForwardedFor || []
+ json.trustedXForwardedFor || [],
+ json.mark ?? 0,
+ json.interface ?? "",
);
}
@@ -779,7 +787,9 @@ export class SockoptStreamSettings extends CommonClass {
tcpKeepAliveInterval: this.tcpKeepAliveInterval,
tcpMptcp: this.tcpMptcp,
penetrate: this.penetrate,
- addressPortStrategy: this.addressPortStrategy
+ addressPortStrategy: this.addressPortStrategy,
+ mark: this.mark,
+ interface: this.interfaceName,
};
if (this.trustedXForwardedFor && this.trustedXForwardedFor.length > 0) {
result.trustedXForwardedFor = this.trustedXForwardedFor;
diff --git a/frontend/src/pages/xray/OutboundFormModal.vue b/frontend/src/pages/xray/OutboundFormModal.vue
index 0ba0908d..f0a9581b 100644
--- a/frontend/src/pages/xray/OutboundFormModal.vue
+++ b/frontend/src/pages/xray/OutboundFormModal.vue
@@ -948,6 +948,12 @@ function regenerateWgKeys() {
+
+
+
+
+
+