[xray] add outbound sendThrough #1017

This commit is contained in:
Alireza Ahmadi
2024-03-12 14:07:53 +01:00
parent 463a120d58
commit cec900b596
7 changed files with 12 additions and 0 deletions

View File

@@ -476,6 +476,7 @@ class Outbound extends CommonClass {
protocol=Protocols.VMess,
settings=null,
streamSettings = new StreamSettings(),
sendThrough,
mux = new Mux(),
) {
super();
@@ -483,6 +484,7 @@ class Outbound extends CommonClass {
this._protocol = protocol;
this.settings = settings == null ? Outbound.Settings.getSettings(protocol) : settings;
this.stream = streamSettings;
this.sendThrough = sendThrough;
this.mux = mux;
}
@@ -548,6 +550,7 @@ class Outbound extends CommonClass {
json.protocol,
Outbound.Settings.fromJson(json.protocol, json.settings),
StreamSettings.fromJson(json.streamSettings),
json.sendThrough,
Mux.fromJson(json.mux),
)
}
@@ -565,6 +568,7 @@ class Outbound extends CommonClass {
protocol: this.protocol,
settings: this.settings instanceof CommonClass ? this.settings.toJson() : this.settings,
streamSettings: stream,
sendThrough: this.sendThrough != "" ? this.sendThrough : undefined,
mux: this.mux?.enabled ? this.mux : undefined,
};
}