diff --git a/web/html/xui/xray.html b/web/html/xui/xray.html
index 5fb04152..54665c27 100644
--- a/web/html/xui/xray.html
+++ b/web/html/xui/xray.html
@@ -537,6 +537,8 @@
Random
Round Robin
+ Least Load
+ Least Ping
[[ sel ]]
@@ -1131,7 +1133,7 @@
'tag': balancer.tag,
'selector': balancer.selector
};
- if (balancer.strategy == 'roundRobin') {
+ if (balancer.strategy === 'roundRobin' || balancer.strategy === 'leastload' || balancer.strategy === 'leastping') {
tmpBalancer.strategy = {
'type': balancer.strategy
};
@@ -1158,7 +1160,7 @@
'tag': balancer.tag,
'selector': balancer.selector
};
- if (balancer.strategy == 'roundRobin') {
+ if (balancer.strategy === 'roundRobin' || balancer.strategy === 'leastload' || balancer.strategy === 'leastping') {
tmpBalancer.strategy = {
'type': balancer.strategy
};
@@ -1474,11 +1476,11 @@
if (this.templateSettings != null && this.templateSettings.routing != null && this.templateSettings.routing.balancers != null) {
this.templateSettings.routing.balancers.forEach((o, index) => {
let strategy = "random"
- if (o.strategy && o.strategy.type == "roundRobin") {
- strategy = o.strategy.type
+ if (o.strategy && (o.strategy.type == "roundRobin" || o.strategy.type == "leastload" || o.strategy.type == "leastping")) {
+ strategy = o.strategy.type;
}
- data.push({
+ data.push({
'key': index,
'tag': o.tag ? o.tag : "",
'strategy': strategy,
diff --git a/web/html/xui/xray_balancer_modal.html b/web/html/xui/xray_balancer_modal.html
index 6784de4c..d4d93111 100644
--- a/web/html/xui/xray_balancer_modal.html
+++ b/web/html/xui/xray_balancer_modal.html
@@ -21,6 +21,8 @@
Random
Round Robin
+ Least Load
+ Least Ping