From c07b2c73d7bd969daf2a59fa17a6297dc8518ff6 Mon Sep 17 00:00:00 2001 From: MHSanaei Date: Sun, 2 Apr 2023 18:12:00 +0330 Subject: enable firewall + open port + update geo files --- web/html/xui/setting.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'web') diff --git a/web/html/xui/setting.html b/web/html/xui/setting.html index 7acab065..6838d8b3 100644 --- a/web/html/xui/setting.html +++ b/web/html/xui/setting.html @@ -345,7 +345,7 @@ if(this.templateSettings != null){ this.templateSettings.routing.rules.forEach(routingRule => { if(routingRule.hasOwnProperty("domain")){ - if (routingRule.domain[0] === "regexp:.+.ir$" && routingRule.outboundTag == "blocked"){ + if ((routingRule.domain[0] === "regexp:.+.ir$" || routingRule.domain[0] === "ext:iran.dat:ir") && routingRule.outboundTag == "blocked") { localdomainFilter = true } } @@ -356,7 +356,7 @@ set: function (newValue) { newTemplateSettings = JSON.parse(this.allSetting.xrayTemplateConfig); if (newValue){ - newTemplateSettings.routing.rules.push(JSON.parse("{\"outboundTag\": \"blocked\",\"domain\": [\"regexp:.+.ir$\"],\"type\": \"field\"}")) + newTemplateSettings.routing.rules.push(JSON.parse("{\"outboundTag\": \"blocked\",\"domain\": [\"regexp:.+.ir$\", \"ext:iran.dat:ir\"],\"type\": \"field\"}")) } else { newTemplateSettings.routing.rules = []; -- cgit v1.2.3 From 708481251575386a85b876293b591b35835bd11d Mon Sep 17 00:00:00 2001 From: MHSanaei Date: Mon, 3 Apr 2023 02:09:22 +0330 Subject: iran.dat:other --- web/html/xui/setting.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'web') diff --git a/web/html/xui/setting.html b/web/html/xui/setting.html index 6838d8b3..b4a974eb 100644 --- a/web/html/xui/setting.html +++ b/web/html/xui/setting.html @@ -345,7 +345,7 @@ if(this.templateSettings != null){ this.templateSettings.routing.rules.forEach(routingRule => { if(routingRule.hasOwnProperty("domain")){ - if ((routingRule.domain[0] === "regexp:.+.ir$" || routingRule.domain[0] === "ext:iran.dat:ir") && routingRule.outboundTag == "blocked") { + if ((routingRule.domain[0] === "regexp:.+.ir$" || routingRule.domain[0] === "ext:iran.dat:ir" || routingRule.domain[0] === "ext:iran.dat:other") && routingRule.outboundTag == "blocked") { localdomainFilter = true } } @@ -356,13 +356,13 @@ set: function (newValue) { newTemplateSettings = JSON.parse(this.allSetting.xrayTemplateConfig); if (newValue){ - newTemplateSettings.routing.rules.push(JSON.parse("{\"outboundTag\": \"blocked\",\"domain\": [\"regexp:.+.ir$\", \"ext:iran.dat:ir\"],\"type\": \"field\"}")) + newTemplateSettings.routing.rules.push(JSON.parse("{\"outboundTag\": \"blocked\",\"domain\": [\"regexp:.+.ir$\", \"ext:iran.dat:ir\", \"ext:iran.dat:other\"],\"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"){ + if ((routingRule.domain[0] === "regexp:.+.ir$" || routingRule.domain[0] === "ext:iran.dat:ir" || routingRule.domain[0] === "ext:iran.dat:other") && routingRule.outboundTag == "blocked"){ return; } } -- cgit v1.2.3 From 472694a611d4458fdb01c6d5abad77134720152a Mon Sep 17 00:00:00 2001 From: MHSanaei Date: Mon, 3 Apr 2023 19:55:30 +0330 Subject: Add favicon --- web/assets/favicon.ico | Bin 0 -> 15406 bytes web/web.go | 3 +++ 2 files changed, 3 insertions(+) create mode 100644 web/assets/favicon.ico (limited to 'web') diff --git a/web/assets/favicon.ico b/web/assets/favicon.ico new file mode 100644 index 00000000..99b108ab Binary files /dev/null and b/web/assets/favicon.ico differ diff --git a/web/web.go b/web/web.go index 1c692598..b38cb3cd 100644 --- a/web/web.go +++ b/web/web.go @@ -156,6 +156,9 @@ func (s *Server) initRouter() (*gin.Engine, error) { } engine := gin.Default() + + // Add favicon + engine.StaticFile("/favicon.ico", "web/assets/favicon.ico") secret, err := s.settingService.GetSecret() if err != nil { -- cgit v1.2.3 From a784a9480691aa4671a07e3bbfc65909713f04a3 Mon Sep 17 00:00:00 2001 From: MHSanaei Date: Mon, 3 Apr 2023 23:19:55 +0330 Subject: fixed login view - mobile --- web/html/login.html | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'web') diff --git a/web/html/login.html b/web/html/login.html index 5138f15e..4218793c 100644 --- a/web/html/login.html +++ b/web/html/login.html @@ -63,25 +63,21 @@ - Language : + Language : - + - +    - - - - -- cgit v1.2.3 From 72f868506df4d8af7dce7d144ed1559cf27ba8dc Mon Sep 17 00:00:00 2001 From: MHSanaei Date: Mon, 3 Apr 2023 23:28:26 +0330 Subject: IPIfNonMatch --- web/service/config.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'web') diff --git a/web/service/config.json b/web/service/config.json index 5370fcf4..34e2038f 100644 --- a/web/service/config.json +++ b/web/service/config.json @@ -1,9 +1,8 @@ { "log": { - "loglevel": "warning", + "loglevel": "warning", "access": "./access.log" }, - "api": { "services": [ "HandlerService", @@ -47,6 +46,7 @@ } }, "routing": { + "domainStrategy": "IPIfNonMatch", "rules": [ { "inboundTag": [ @@ -56,10 +56,10 @@ "type": "field" }, { + "outboundTag": "blocked", "ip": [ "geoip:private" ], - "outboundTag": "blocked", "type": "field" }, { @@ -72,4 +72,4 @@ ] }, "stats": {} -} +} \ No newline at end of file -- cgit v1.2.3