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
path: root/web
diff options
context:
space:
mode:
authormohammadmovaghari <52345697+mohammadmovaghari@users.noreply.github.com>2023-04-04 16:44:40 +0300
committerGitHub <noreply@github.com>2023-04-04 16:44:40 +0300
commit9f18d60b9ce16d89af97ae993a3224bb6c8cd288 (patch)
tree978b3178c6dd5bb616d46a442d8c50b19856bb70 /web
parentc0580bccb5b574f4a8e4a7f2789d5cdf6049e7fc (diff)
parent0e5de1aec8f3b090fce14638d7e0030ff7b7f40f (diff)
Merge branch 'MHSanaei:main' into api-fix
Diffstat (limited to 'web')
-rw-r--r--web/assets/favicon.icobin0 -> 15406 bytes
-rw-r--r--web/html/login.html10
-rw-r--r--web/html/xui/setting.html6
-rw-r--r--web/service/config.json8
-rw-r--r--web/web.go3
5 files changed, 13 insertions, 14 deletions
diff --git a/web/assets/favicon.ico b/web/assets/favicon.ico
new file mode 100644
index 00000000..99b108ab
--- /dev/null
+++ b/web/assets/favicon.ico
Binary files differ
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 @@
<a-form-item>
<a-row justify="center" class="selectLang">
- <a-col :span="4"><span>Language : </span></a-col>
+ <a-col :span="5"><span>Language :</span></a-col>
- <a-col :span="6">
+ <a-col :span="7">
<a-select
ref="selectLang"
v-model="lang"
@change="setLang(lang)"
>
- <a-select-option :value="l.value" label="China" v-for="l in supportLangs" >
+ <a-select-option :value="l.value" label="English" v-for="l in supportLangs" >
<span role="img" aria-label="l.name" v-text="l.icon"></span>
&nbsp;&nbsp;<span v-text="l.name"></span>
</a-select-option>
</a-select>
</a-col>
-
</a-row>
-
-
-
</a-form-item>
</a-form>
</a-col>
diff --git a/web/html/xui/setting.html b/web/html/xui/setting.html
index 7acab065..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.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$\"],\"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;
}
}
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
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 {