From 4f20777ff6d6670086f37e5f477cb762540dd101 Mon Sep 17 00:00:00 2001
From: vuong2023 <124447749+vuong2023@users.noreply.github.com>
Date: Mon, 18 Dec 2023 21:21:16 +0700
Subject: [PATCH] Update xray.html
Add : Add xray config domain option for Vietnamese people
---
web/html/xui/xray.html | 60 ++++++++++++++++++++++++++++++++++++++++--
1 file changed, 58 insertions(+), 2 deletions(-)
diff --git a/web/html/xui/xray.html b/web/html/xui/xray.html
index 147ed5e1..15060ea8 100644
--- a/web/html/xui/xray.html
+++ b/web/html/xui/xray.html
@@ -190,6 +190,8 @@
+
+
@@ -533,11 +535,13 @@
cn: ["geoip:cn"],
ir: ["ext:geoip_IR.dat:ir"],
ru: ["geoip:ru"],
+ vn: ["ext:geoip_VN.dat:vn"],
},
domains: {
ads: [
"geosite:category-ads-all",
- "ext:geosite_IR.dat:category-ads-all"
+ "ext:geosite_IR.dat:category-ads-all",
+ "ext:geosite_VN.dat:category-ads-all"
],
speedtest: ["geosite:speedtest"],
openai: ["geosite:openai"],
@@ -556,7 +560,11 @@
"regexp:.*\\.ir$",
"regexp:.*\\.xn--mgba3a4f16a$", // .ایران
"ext:geosite_IR.dat:ir" // have rules to bypass all .ir domains.
- ]
+ ],
+ vn: [
+ "regexp:.*\\.vn$",
+ "ext:geosite_VN.dat:vn"
+ ]
},
familyProtectDNS: {
"servers": [
@@ -1277,6 +1285,30 @@
this.blockedDomains = this.blockedDomains.filter(data => !this.settingsData.domains.ru.includes(data));
}
}
+ },
+ VNIpSettings: {
+ get: function () {
+ return doAllItemsExist(this.settingsData.ips.vn, this.blockedIPs);
+ },
+ set: function (newValue) {
+ if (newValue) {
+ this.blockedIPs = [...this.blockedIPs, ...this.settingsData.ips.vn];
+ } else {
+ this.blockedIPs = this.blockedIPs.filter(data => !this.settingsData.ips.vn.includes(data));
+ }
+ }
+ },
+ VNDomainSettings: {
+ get: function () {
+ return doAllItemsExist(this.settingsData.domains.vn, this.blockedDomains);
+ },
+ set: function (newValue) {
+ if (newValue) {
+ this.blockedDomains = [...this.blockedDomains, ...this.settingsData.domains.vn];
+ } else {
+ this.blockedDomains = this.blockedDomains.filter(data => !this.settingsData.domains.vn.includes(data));
+ }
+ }
},
IRIpDirectSettings: {
get: function () {
@@ -1350,6 +1382,30 @@
}
}
},
+ VNIpDirectSettings: {
+ get: function () {
+ return doAllItemsExist(this.settingsData.ips.vn, this.directIPs);
+ },
+ set: function (newValue) {
+ if (newValue) {
+ this.directIPs = [...this.directIPs, ...this.settingsData.ips.vn];
+ } else {
+ this.directIPs = this.directIPs.filter(data => !this.settingsData.ips.vn.includes(data));
+ }
+ }
+ },
+ VNDomainDirectSettings: {
+ get: function () {
+ return doAllItemsExist(this.settingsData.domains.vn, this.directDomains);
+ },
+ set: function (newValue) {
+ if (newValue) {
+ this.directDomains = [...this.directDomains, ...this.settingsData.domains.vn];
+ } else {
+ this.directDomains = this.directDomains.filter(data => !this.settingsData.domains.vn.includes(data));
+ }
+ }
+ },
GoogleWARPSettings: {
get: function () {
return doAllItemsExist(this.settingsData.domains.google, this.warpDomains);