mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-04-20 05:52:24 +00:00
fix sockopt in all protocols
Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
This commit is contained in:
parent
c9f245cb25
commit
6fdc07a2d0
1 changed files with 8 additions and 1 deletions
|
@ -578,11 +578,18 @@ class Outbound extends CommonClass {
|
||||||
}
|
}
|
||||||
|
|
||||||
toJson() {
|
toJson() {
|
||||||
|
var stream;
|
||||||
|
if (this.canEnableStream()) {
|
||||||
|
stream = this.stream.toJson();
|
||||||
|
} else {
|
||||||
|
if (this.stream?.sockopt)
|
||||||
|
stream = { sockopt: this.stream.sockopt.toJson() };
|
||||||
|
}
|
||||||
return {
|
return {
|
||||||
tag: this.tag == '' ? undefined : this.tag,
|
tag: this.tag == '' ? undefined : this.tag,
|
||||||
protocol: this.protocol,
|
protocol: this.protocol,
|
||||||
settings: this.settings instanceof CommonClass ? this.settings.toJson() : this.settings,
|
settings: this.settings instanceof CommonClass ? this.settings.toJson() : this.settings,
|
||||||
streamSettings: this.canEnableStream() ? this.stream.toJson() : undefined,
|
streamSettings: stream,
|
||||||
mux: this.mux?.enabled ? this.mux : undefined,
|
mux: this.mux?.enabled ? this.mux : undefined,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue