mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-03-20 09:35:48 +00:00
Merge branch 'MHSanaei:main' into api-fix
This commit is contained in:
BIN
web/assets/favicon.ico
Normal file
BIN
web/assets/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
@@ -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>
|
||||
<span v-text="l.name"></span>
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-col>
|
||||
|
||||
</a-row>
|
||||
|
||||
|
||||
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
</a-col>
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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": {}
|
||||
}
|
||||
}
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user