[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,
};
}

View File

@@ -11,6 +11,9 @@
<a-form-item label='{{ i18n "pages.xray.outbound.tag" }}' has-feedback :validate-status="outModal.duplicateTag? 'warning' : 'success'">
<a-input v-model.trim="outbound.tag" @change="outModal.check()" placeholder='{{ i18n "pages.xray.outbound.tagDesc" }}'></a-input>
</a-form-item>
<a-form-item label='{{ i18n "pages.xray.outbound.sendThrough" }}'>
<a-input v-model="outbound.sendThrough"></a-input>
</a-form-item>
<!-- freedom settings-->
<template v-if="outbound.protocol === Protocols.Freedom">

View File

@@ -426,6 +426,7 @@
"settings" = "Settings"
"accountInfo" = "Account Information"
"outboundStatus" = "Outbound Status"
"sendThrough" = "Send Through"
[pages.xray.balancer]
"addBalancer" = "Add Balancer"

View File

@@ -425,6 +425,7 @@
"settings" = "تنظیمات"
"accountInfo" = "اطلاعات حساب"
"outboundStatus" = "وضعیت خروجی"
"sendThrough" = "ارسال با"
[pages.xray.balancer]
"addBalancer" = "افزودن بالانسر"

View File

@@ -426,6 +426,7 @@
"settings" = "Настройки"
"accountInfo" = "Информация Об Учетной Записи"
"outboundStatus" = "Исходящий статус"
"sendThrough" = "Отправить через"
[pages.xray.balancer]
"addBalancer" = "Добавить балансир"

View File

@@ -426,6 +426,7 @@
"settings" = "cài đặt"
"accountInfo" = "Thông tin tài khoản"
"outboundStatus" = "Trạng thái đầu ra"
"sendThrough" = "Gửi qua"
[pages.xray.balancer]
"addBalancer" = "Thêm cân bằng"

View File

@@ -426,6 +426,7 @@
"settings" = "设置"
"accountInfo" = "帐户信息"
"outboundStatus" = "出站状态"
"sendThrough" = "发送通过"
[pages.xray.balancer]
"addBalancer" = "添加平衡器"