From 48d6362a69be900a2ae52be6bdb3a7700420b44d Mon Sep 17 00:00:00 2001 From: MHSanaei Date: Thu, 30 Mar 2023 18:33:19 +0330 Subject: shadow socks base64 + new methods --- web/html/xui/form/protocol/dokodemo.html | 6 +++--- web/html/xui/form/protocol/shadowsocks.html | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'web/html') diff --git a/web/html/xui/form/protocol/dokodemo.html b/web/html/xui/form/protocol/dokodemo.html index dbba6b5b..53c82c3c 100644 --- a/web/html/xui/form/protocol/dokodemo.html +++ b/web/html/xui/form/protocol/dokodemo.html @@ -8,9 +8,9 @@ - tcp+udp - tcp - udp + TCP+UDP + TCP + UDP diff --git a/web/html/xui/form/protocol/shadowsocks.html b/web/html/xui/form/protocol/shadowsocks.html index 21d614ae..718ba894 100644 --- a/web/html/xui/form/protocol/shadowsocks.html +++ b/web/html/xui/form/protocol/shadowsocks.html @@ -1,18 +1,18 @@ {{define "form/shadowsocks"}} - + [[ method ]] - + - tcp+udp - tcp - udp + TCP+UDP + TCP + UDP -- cgit v1.2.3 From f2c28822c1ebef8a0143c4d05676286072dab996 Mon Sep 17 00:00:00 2001 From: MHSanaei Date: Fri, 31 Mar 2023 00:52:48 +0330 Subject: option - ban ir ip - ban ir domain --- web/html/xui/setting.html | 71 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 70 insertions(+), 1 deletion(-) (limited to 'web/html') diff --git a/web/html/xui/setting.html b/web/html/xui/setting.html index 057dae95..7acab065 100644 --- a/web/html/xui/setting.html +++ b/web/html/xui/setting.html @@ -97,7 +97,9 @@ - {{ i18n "pages.setting.advancedTemplate"}} + + + {{ i18n "pages.setting.advancedTemplate"}} @@ -304,6 +306,73 @@ this.templateSettings = newTemplateSettings }, }, + IRIpSettings: { + get: function () { + localIpFilter = false + if(this.templateSettings != null){ + this.templateSettings.routing.rules.forEach(routingRule => { + if(routingRule.hasOwnProperty("ip")){ + if (routingRule.ip[0] === "geoip:ir" && routingRule.outboundTag == "blocked"){ + localIpFilter = true + } + } + }); + } + return localIpFilter + }, + set: function (newValue) { + newTemplateSettings = JSON.parse(this.allSetting.xrayTemplateConfig); + if (newValue){ + newTemplateSettings.routing.rules.push(JSON.parse("{\"outboundTag\": \"blocked\",\"ip\": [\"geoip:ir\"],\"type\": \"field\"}")) + } + else { + newTemplateSettings.routing.rules = []; + this.templateSettings.routing.rules.forEach(routingRule => { + if (routingRule.hasOwnProperty('ip')){ + if (routingRule.ip[0] === "geoip:ir" && routingRule.outboundTag == "blocked"){ + return; + } + } + newTemplateSettings.routing.rules.push(routingRule); + }); + } + this.templateSettings = newTemplateSettings + }, + }, + IRdomainSettings: { + get: function () { + localdomainFilter = false + if(this.templateSettings != null){ + this.templateSettings.routing.rules.forEach(routingRule => { + if(routingRule.hasOwnProperty("domain")){ + if (routingRule.domain[0] === "regexp:.+.ir$" && routingRule.outboundTag == "blocked"){ + localdomainFilter = true + } + } + }); + } + return localdomainFilter + }, + set: function (newValue) { + newTemplateSettings = JSON.parse(this.allSetting.xrayTemplateConfig); + if (newValue){ + newTemplateSettings.routing.rules.push(JSON.parse("{\"outboundTag\": \"blocked\",\"domain\": [\"regexp:.+.ir$\"],\"type\": \"field\"}")) + } + else { + newTemplateSettings.routing.rules = []; + this.templateSettings.routing.rules.forEach(routingRule => { + if (routingRule.hasOwnProperty('domain')){ + if (routingRule.domain[0] === "regexp:.+.ir$" && routingRule.outboundTag == "blocked"){ + return; + } + } + newTemplateSettings.routing.rules.push(routingRule); + }); + } + this.templateSettings = newTemplateSettings + }, + }, + } }); -- cgit v1.2.3