mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-03-01 01:20:49 +03:00
add check for geosite function
This commit is contained in:
parent
d39c7e4ae3
commit
65588a4492
@ -307,6 +307,9 @@
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
created() {
|
||||||
|
this.checkForGeosites();
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
loading(spinning = true, obj) {
|
loading(spinning = true, obj) {
|
||||||
if (obj == null) this.spinning = spinning;
|
if (obj == null) this.spinning = spinning;
|
||||||
@ -401,6 +404,27 @@
|
|||||||
this.saveBtnDisable = true;
|
this.saveBtnDisable = true;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
checkForGeosites() {
|
||||||
|
const domainsToCheck = [
|
||||||
|
{
|
||||||
|
query: "category-ru-gov",
|
||||||
|
key: "this.settingsData.domains.ru",
|
||||||
|
data: [
|
||||||
|
"geosite:category-ru-gov",
|
||||||
|
"regexp:.*\\.ru$"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
];
|
||||||
|
this.loading(true);
|
||||||
|
domainsToCheck.forEach(async (dd) => {
|
||||||
|
const msg = await HttpUtil.get(`/xui/setting/searchDatafiles?query=${dd.query}`);
|
||||||
|
if (msg.success && msg.obj) {
|
||||||
|
[dd.key] = dd.data;
|
||||||
|
console.log([dd.key])
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.loading(false);
|
||||||
|
},
|
||||||
checkRequiredOutbounds() {
|
checkRequiredOutbounds() {
|
||||||
const newTemplateSettings = this.templateSettings;
|
const newTemplateSettings = this.templateSettings;
|
||||||
const haveIPv4Outbounds = newTemplateSettings.outbounds.some((o) => o?.tag === "IPv4");
|
const haveIPv4Outbounds = newTemplateSettings.outbounds.some((o) => o?.tag === "IPv4");
|
||||||
|
Loading…
Reference in New Issue
Block a user