mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-05-31 10:14:15 +00:00
Add SockOpt.Mark and SockOpt.Interface parameters for Outbound stream (#4480)
Some checks are pending
CI / go-test (push) Waiting to run
CI / govulncheck (push) Waiting to run
CI / frontend (push) Waiting to run
CodeQL Advanced / Analyze (go) (push) Waiting to run
CodeQL Advanced / Analyze (actions) (push) Waiting to run
CodeQL Advanced / Analyze (javascript-typescript) (push) Waiting to run
Release 3X-UI / build (386) (push) Waiting to run
Release 3X-UI / build (amd64) (push) Waiting to run
Release 3X-UI / build (arm64) (push) Waiting to run
Release 3X-UI / build (armv5) (push) Waiting to run
Release 3X-UI / build (armv6) (push) Waiting to run
Release 3X-UI / build (armv7) (push) Waiting to run
Release 3X-UI / build (s390x) (push) Waiting to run
Release 3X-UI / Build for Windows (push) Waiting to run
Some checks are pending
CI / go-test (push) Waiting to run
CI / govulncheck (push) Waiting to run
CI / frontend (push) Waiting to run
CodeQL Advanced / Analyze (go) (push) Waiting to run
CodeQL Advanced / Analyze (actions) (push) Waiting to run
CodeQL Advanced / Analyze (javascript-typescript) (push) Waiting to run
Release 3X-UI / build (386) (push) Waiting to run
Release 3X-UI / build (amd64) (push) Waiting to run
Release 3X-UI / build (arm64) (push) Waiting to run
Release 3X-UI / build (armv5) (push) Waiting to run
Release 3X-UI / build (armv6) (push) Waiting to run
Release 3X-UI / build (armv7) (push) Waiting to run
Release 3X-UI / build (s390x) (push) Waiting to run
Release 3X-UI / Build for Windows (push) Waiting to run
This commit is contained in:
parent
9f80cfedab
commit
5f318f3b16
2 changed files with 18 additions and 2 deletions
|
|
@ -748,6 +748,9 @@ export class SockoptStreamSettings extends CommonClass {
|
||||||
penetrate = false,
|
penetrate = false,
|
||||||
addressPortStrategy = Address_Port_Strategy.NONE,
|
addressPortStrategy = Address_Port_Strategy.NONE,
|
||||||
trustedXForwardedFor = [],
|
trustedXForwardedFor = [],
|
||||||
|
mark = 0,
|
||||||
|
interfaceName = "",
|
||||||
|
|
||||||
) {
|
) {
|
||||||
super();
|
super();
|
||||||
this.dialerProxy = dialerProxy;
|
this.dialerProxy = dialerProxy;
|
||||||
|
|
@ -757,6 +760,9 @@ export class SockoptStreamSettings extends CommonClass {
|
||||||
this.penetrate = penetrate;
|
this.penetrate = penetrate;
|
||||||
this.addressPortStrategy = addressPortStrategy;
|
this.addressPortStrategy = addressPortStrategy;
|
||||||
this.trustedXForwardedFor = trustedXForwardedFor;
|
this.trustedXForwardedFor = trustedXForwardedFor;
|
||||||
|
this.mark = mark;
|
||||||
|
this.interfaceName = interfaceName;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static fromJson(json = {}) {
|
static fromJson(json = {}) {
|
||||||
|
|
@ -768,7 +774,9 @@ export class SockoptStreamSettings extends CommonClass {
|
||||||
json.tcpMptcp,
|
json.tcpMptcp,
|
||||||
json.penetrate,
|
json.penetrate,
|
||||||
json.addressPortStrategy,
|
json.addressPortStrategy,
|
||||||
json.trustedXForwardedFor || []
|
json.trustedXForwardedFor || [],
|
||||||
|
json.mark ?? 0,
|
||||||
|
json.interface ?? "",
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -779,7 +787,9 @@ export class SockoptStreamSettings extends CommonClass {
|
||||||
tcpKeepAliveInterval: this.tcpKeepAliveInterval,
|
tcpKeepAliveInterval: this.tcpKeepAliveInterval,
|
||||||
tcpMptcp: this.tcpMptcp,
|
tcpMptcp: this.tcpMptcp,
|
||||||
penetrate: this.penetrate,
|
penetrate: this.penetrate,
|
||||||
addressPortStrategy: this.addressPortStrategy
|
addressPortStrategy: this.addressPortStrategy,
|
||||||
|
mark: this.mark,
|
||||||
|
interface: this.interfaceName,
|
||||||
};
|
};
|
||||||
if (this.trustedXForwardedFor && this.trustedXForwardedFor.length > 0) {
|
if (this.trustedXForwardedFor && this.trustedXForwardedFor.length > 0) {
|
||||||
result.trustedXForwardedFor = this.trustedXForwardedFor;
|
result.trustedXForwardedFor = this.trustedXForwardedFor;
|
||||||
|
|
|
||||||
|
|
@ -988,6 +988,12 @@ function regenerateWgKeys() {
|
||||||
<a-form-item label="Penetrate">
|
<a-form-item label="Penetrate">
|
||||||
<a-switch v-model:checked="outbound.stream.sockopt.penetrate" />
|
<a-switch v-model:checked="outbound.stream.sockopt.penetrate" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
<a-form-item label="Mark (fwmark)">
|
||||||
|
<a-input-number v-model:value="outbound.stream.sockopt.mark" :min="0" />
|
||||||
|
</a-form-item>
|
||||||
|
<a-form-item label="Interface">
|
||||||
|
<a-input v-model:value="outbound.stream.sockopt.interfaceName" />
|
||||||
|
</a-form-item>
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue