Skip to content

Commit

Permalink
fix sockopt in all protocols
Browse files Browse the repository at this point in the history
Co-Authored-By: Alireza Ahmadi <[email protected]>
  • Loading branch information
MHSanaei and alireza0 committed Mar 12, 2024
1 parent c9f245c commit 6fdc07a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion web/assets/js/model/outbound.js
Original file line number Diff line number Diff line change
Expand Up @@ -578,11 +578,18 @@ class Outbound extends CommonClass {
}

toJson() {
var stream;
if (this.canEnableStream()) {
stream = this.stream.toJson();
} else {
if (this.stream?.sockopt)
stream = { sockopt: this.stream.sockopt.toJson() };
}
return {
tag: this.tag == '' ? undefined : this.tag,
protocol: this.protocol,
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,
};
}
Expand Down

0 comments on commit 6fdc07a

Please sign in to comment.