Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlireza Ahmadi <alireza7@gmail.com>2023-12-08 21:12:17 +0300
committerAlireza Ahmadi <alireza7@gmail.com>2023-12-08 21:12:17 +0300
commitf46ed6267c6fb79750b814ed18ab2537bfc7b45c (patch)
tree5860edbc09db241a306d384ace32f99cbe028829 /web/html/xui
parentf2f066ac3b69c9fd9b084e651f62358fc0f861f3 (diff)
[bug] fix routing dns strategy #1300
Diffstat (limited to 'web/html/xui')
-rw-r--r--web/html/xui/xray.html8
1 files changed, 5 insertions, 3 deletions
diff --git a/web/html/xui/xray.html b/web/html/xui/xray.html
index b8bbe094..d2df65b6 100644
--- a/web/html/xui/xray.html
+++ b/web/html/xui/xray.html
@@ -969,15 +969,17 @@
freedomStrategy: {
get: function () {
if (!this.templateSettings) return "AsIs";
- freedomOutbound = this.templateSettings.outbounds.find((o) => o.protocol === "freedom" && !o.tag);
+ freedomOutbound = this.templateSettings.outbounds.find((o) => o.protocol === "freedom" && o.tag == "direct");
if (!freedomOutbound) return "AsIs";
if (!freedomOutbound.settings || !freedomOutbound.settings.domainStrategy) return "AsIs";
return freedomOutbound.settings.domainStrategy;
},
set: function (newValue) {
newTemplateSettings = this.templateSettings;
- freedomOutboundIndex = newTemplateSettings.outbounds.findIndex((o) => o.protocol === "freedom" && !o.tag);
- if (!newTemplateSettings.outbounds[freedomOutboundIndex].settings) {
+ freedomOutboundIndex = newTemplateSettings.outbounds.findIndex((o) => o.protocol === "freedom" && o.tag == "direct");
+ if(freedomOutboundIndex == -1){
+ newTemplateSettings.outbounds.push({protocol: "freedom", tag: "direct", settings: { "domainStrategy": newValue }});
+ } else if (!newTemplateSettings.outbounds[freedomOutboundIndex].settings) {
newTemplateSettings.outbounds[freedomOutboundIndex].settings = {"domainStrategy": newValue};
} else {
newTemplateSettings.outbounds[freedomOutboundIndex].settings.domainStrategy = newValue;