diff --git a/web/html/xui/xray.html b/web/html/xui/xray.html index bea688ed..8e40f832 100644 --- a/web/html/xui/xray.html +++ b/web/html/xui/xray.html @@ -337,6 +337,14 @@ [[ rule.outboundTag ]] + + + + Balancer Tag: [[ rule.balancerTag ]] + + [[ rule.balancerTag ]] + + Port [[ r ]] + + Balancer Tag + [[ rule.balancerTag ]] + @@ -456,7 +468,42 @@ - + + {{ i18n "pages.xray.balancer.addBalancer"}} + + + [[ index+1 ]] + + e.preventDefault()" type="more" style="font-size: 16px; text-decoration: bold;"> + + + + {{ i18n "edit" }} + + + + {{ i18n "delete"}} + + + + + + + Random + Round Robin + + + [[ sel ]] + + + + @@ -533,6 +580,7 @@ {{template "ruleModal"}} {{template "outModal"}} {{template "reverseModal"}} +{{template "balancerModal"}} {{template "dnsModal"}} {{template "warpModal"}} +{{end}} \ No newline at end of file diff --git a/web/html/xui/xray_rule_modal.html b/web/html/xui/xray_rule_modal.html index 3502b6e5..71f01a65 100644 --- a/web/html/xui/xray_rule_modal.html +++ b/web/html/xui/xray_rule_modal.html @@ -107,6 +107,19 @@ [[ tag ]] + + + + + {{ i18n "pages.xray.balancer.balancerDesc" }} + + Balancer Tag + + + + [[ tag ]] + + @@ -133,6 +146,7 @@ protocol: [], attrs: [], outboundTag: "", + balancerTag: "", }, inboundTags: [], outboundTags: [], @@ -160,6 +174,7 @@ this.rule.protocol = rule.protocol; this.rule.attrs = rule.attrs ? Object.entries(rule.attrs) : []; this.rule.outboundTag = rule.outboundTag; + this.rule.balancerTag = rule.balancerTag ? rule.balancerTag : ""; } else { this.rule = { domainMatcher: "", @@ -174,6 +189,7 @@ protocol: [], attrs: [], outboundTag: "", + balancerTag: "", } } this.isEdit = isEdit; @@ -186,6 +202,9 @@ } if(app.templateSettings.reverse.portals) this.outboundTags.push(...app.templateSettings.reverse.portals.map(b => b.tag)); } + if (app.templateSettings.routing && app.templateSettings.routing.balancers) { + this.balancerTags = app.templateSettings.routing.balancers.filter((o) => !ObjectUtil.isEmpty(o.tag)).map(obj => obj.tag) + } }, close() { ruleModal.visible = false; @@ -211,6 +230,7 @@ rule.protocol = value.protocol; rule.attrs = Object.fromEntries(value.attrs); rule.outboundTag = value.outboundTag; + rule.balancerTag = value.balancerTag; for (const [key, value] of Object.entries(rule)) { if ( diff --git a/web/translation/translate.en_US.toml b/web/translation/translate.en_US.toml index f7a66eae..6bb9bd3b 100644 --- a/web/translation/translate.en_US.toml +++ b/web/translation/translate.en_US.toml @@ -378,6 +378,7 @@ "Outbounds" = "Outbounds" "Routings" = "Routing Rules" "RoutingsDesc" = "The priority of each rule is important!" +"Balancers" = "Balancers" [pages.xray.rules] "first" = "First" @@ -392,6 +393,7 @@ "add" = "Add Rule" "edit" = "Edit Rule" "useComma" = "Comma-separated items" +"balancer" = "Balancer" [pages.xray.outbound] "addOutbound" = "Add Outbound" @@ -411,6 +413,15 @@ "accountInfo" = "Account Information" "outboundStatus" = "Outbound Status" +[pages.xray.balancer] +"addBalancer" = "Add Balancer" +"editBalancer" = "Edit Balancer" +"balancerStrategy" = "Strategy" +"balancerSelectors" = "Selectors" +"tag" = "Tag" +"tagDesc" = "Unique Tag" +"balancerDesc" = "It is not possible to use balancerTag and outboundTag at the same time. If used at the same time, only outboundTag will work." + [pages.xray.wireguard] "secretKey" = "Secret Key" "publicKey" = "Public Key" diff --git a/web/translation/translate.fa_IR.toml b/web/translation/translate.fa_IR.toml index 40746283..e78332c7 100644 --- a/web/translation/translate.fa_IR.toml +++ b/web/translation/translate.fa_IR.toml @@ -377,6 +377,7 @@ "Outbounds" = "خروجیها" "Routings" = "قوانین مسیریابی" "RoutingsDesc" = "اولویت هر قانون مهم است" +"Balancers" = "بالانسرها" [pages.xray.rules] "first" = "اولین" @@ -391,6 +392,7 @@ "add" = "افزودن قانون" "edit" = "ویرایش قانون" "useComma" = "موارد جداشده با کاما" +"balancer" = "بالانسر" [pages.xray.outbound] "addOutbound" = "افزودن خروجی" @@ -410,6 +412,15 @@ "accountInfo" = "اطلاعات حساب" "outboundStatus" = "وضعیت خروجی" +[pages.xray.balancer] +"addBalancer" = "افزودن بالانسر" +"editBalancer" = "ویرایش بالانسر" +"balancerStrategy" = "استراتژی" +"balancerSelectors" = "انتخابگرها" +"tag" = "برچسب" +"tagDesc" = "برچسب یگانه" +"balancerDesc" = "امکان استفاده همزمان برچسب خروجی و برچسب بالانسر باهم وجود ندارد. درصورت استفاده همزمان فقط برجسب خروجی عمل خواهد کرد." + [pages.xray.wireguard] "secretKey" = "کلید شخصی" "publicKey" = "کلید عمومی" diff --git a/web/translation/translate.ru_RU.toml b/web/translation/translate.ru_RU.toml index 25d65e7a..7b3f215d 100644 --- a/web/translation/translate.ru_RU.toml +++ b/web/translation/translate.ru_RU.toml @@ -378,6 +378,7 @@ "Outbounds" = "Исходящие" "Routings" = "Правила маршрутизации" "RoutingsDesc" = "Важен приоритет каждого правила!" +"Balancers" = "Балансиры" [pages.xray.rules] "first" = "Первый" @@ -392,6 +393,7 @@ "add" = "Добавить правило" "edit" = "Редактировать правило" "useComma" = "Элементы, разделенные запятыми" +"balancer" = "балансир" [pages.xray.outbound] "addOutbound" = "Добавить исходящий" @@ -411,6 +413,15 @@ "accountInfo" = "Информация Об Учетной Записи" "outboundStatus" = "Исходящий статус" +[pages.xray.balancer] +"addBalancer" = "Добавить балансир" +"editBalancer" = "Редактировать балансир" +"balancerStrategy" = "Стратегия" +"balancerSelectors" = "Селекторы" +"tag" = "Тег" +"tagDesc" = "уникальный тег" +"balancerDesc" = "Невозможно одновременно использовать balancerTag и outboundTag. При одновременном использовании будет работать только outboundTag." + [pages.xray.wireguard] "secretKey" = "Секретный ключ" "publicKey" = "Открытый ключ" diff --git a/web/translation/translate.vi_VN.toml b/web/translation/translate.vi_VN.toml index 94f18b77..30ba5eff 100644 --- a/web/translation/translate.vi_VN.toml +++ b/web/translation/translate.vi_VN.toml @@ -378,6 +378,7 @@ "Outbounds" = "Đầu ra" "Routings" = "Quy tắc định tuyến" "RoutingsDesc" = "Mức độ ưu tiên của mỗi quy tắc là quan trọng!" +"Balancers" = "Cân bằng" [pages.xray.rules] "first" = "Đầu tiên" @@ -392,6 +393,7 @@ "add" = "Thêm quy tắc" "edit" = "Chỉnh sửa quy tắc" "useComma" = "Các mục được phân tách bằng dấu phẩy" +"balancer" = "Cân bằng" [pages.xray.outbound] "addOutbound" = "Thêm Đầu vào" @@ -411,6 +413,15 @@ "accountInfo" = "Thông tin tài khoản" "outboundStatus" = "Trạng thái đầu ra" +[pages.xray.balancer] +"addBalancer" = "Thêm cân bằng" +"editBalancer" = "Chỉnh sửa cân bằng" +"balancerStrategy" = "Chiến lược" +"balancerSelectors" = "Bộ chọn" +"tag" = "Thẻ" +"tagDesc" = "thẻ duy nhất" +"balancerDesc" = "Không thể sử dụng balancerTag và outboundTag cùng một lúc. Nếu sử dụng cùng lúc thì chỉ outboundTag mới hoạt động." + [pages.xray.wireguard] "secretKey" = "Chìa khoá bí mật" "publicKey" = "Khóa công khai" diff --git a/web/translation/translate.zh_Hans.toml b/web/translation/translate.zh_Hans.toml index 9d298706..1cf22872 100644 --- a/web/translation/translate.zh_Hans.toml +++ b/web/translation/translate.zh_Hans.toml @@ -378,6 +378,7 @@ "Outbounds" = "出站" "Routings" = "路由规则" "RoutingsDesc" = "每条规则的优先级都很重要" +"Balancers" = "平衡器" [pages.xray.rules] "first" = "第一个" @@ -392,6 +393,7 @@ "add" = "添加规则" "edit" = "编辑规则" "useComma" = "逗号分隔的项目" +"balancer" = "平衡器" [pages.xray.outbound] "addOutbound" = "添加出站" @@ -411,6 +413,15 @@ "accountInfo" = "帐户信息" "outboundStatus" = "出站状态" +[pages.xray.balancer] +"addBalancer" = "添加平衡器" +"editBalancer" = "编辑平衡器" +"balancerStrategy" = "战略" +"balancerSelectors" = "选择器" +"tag" = "标签" +"tagDesc" = "唯一标记" +"balancerDesc" = "不能同时使用balancerTag和outboundTag。 如果同时使用,则只有outboundTag起作用。" + [pages.xray.wireguard] "secretKey" = "密钥" "publicKey" = "公钥"
Balancer Tag: [[ rule.balancerTag ]]