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:
authorHamidreza Ghavami <70919649+hamid-gh98@users.noreply.github.com>2023-05-12 18:00:49 +0300
committerHamidreza Ghavami <70919649+hamid-gh98@users.noreply.github.com>2023-05-12 21:15:24 +0300
commit65588a44922ea062cc438c43957f131ba54a1404 (patch)
treeea6a6612cd0fa8746cf74940b6648a5a7a9a9ca6 /web
parentd39c7e4ae37a3c78f1f0e08f9a52fde5ce08ea1d (diff)
add check for geosite function
Diffstat (limited to 'web')
-rw-r--r--web/html/xui/settings.html24
1 files changed, 24 insertions, 0 deletions
diff --git a/web/html/xui/settings.html b/web/html/xui/settings.html
index d50822c2..d4b4c028 100644
--- a/web/html/xui/settings.html
+++ b/web/html/xui/settings.html
@@ -307,6 +307,9 @@
},
}
},
+ created() {
+ this.checkForGeosites();
+ },
methods: {
loading(spinning = true, obj) {
if (obj == null) this.spinning = spinning;
@@ -401,6 +404,27 @@
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() {
const newTemplateSettings = this.templateSettings;
const haveIPv4Outbounds = newTemplateSettings.outbounds.some((o) => o?.tag === "IPv4");