diff options
| author | MHSanaei <ho3ein.sanaei@gmail.com> | 2024-03-12 16:58:09 +0300 |
|---|---|---|
| committer | MHSanaei <ho3ein.sanaei@gmail.com> | 2024-03-12 16:58:09 +0300 |
| commit | 6fdc07a2d022b49f05ec1b94e143fd34a7bb69c9 (patch) | |
| tree | e90545c8142477f93c12e81f804dcf4ecd619ab3 /web/assets | |
| parent | c9f245cb25678739903d5b295bc8a82c3467c672 (diff) | |
fix sockopt in all protocols
Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
Diffstat (limited to 'web/assets')
| -rw-r--r-- | web/assets/js/model/outbound.js | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/web/assets/js/model/outbound.js b/web/assets/js/model/outbound.js index 60465599..707e76c5 100644 --- a/web/assets/js/model/outbound.js +++ b/web/assets/js/model/outbound.js @@ -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, }; } |
