move security domains into protection shield

This commit is contained in:
mhsanaei 2024-10-17 11:25:39 +02:00
parent f1f813269c
commit 1b9432ff37
No known key found for this signature in database
GPG Key ID: 4DACC0663B5986F5
2 changed files with 34 additions and 24 deletions

View File

@ -383,12 +383,12 @@
<a-collapse v-if="enableDirect" style="margin-top: 14px;">
<a-collapse-panel header='{{ i18n "pages.xray.directips"}}'>
<a-list-item style="padding: 10px 20px">
<a-checkbox-group v-model="geoIP" :options="geoIPOptions"></a-checkbox-group>
<a-checkbox-group v-model="directIPs" :options="IPsOptions"></a-checkbox-group>
</a-list-item>
</a-collapse-panel>
<a-collapse-panel header='{{ i18n "pages.xray.directdomains"}}'>
<a-list-item style="padding: 10px 20px">
<a-checkbox-group v-model="geoSite" :options="geoSiteOptions"></a-checkbox-group>
<a-checkbox-group v-model="directDomains" :options="DomainsOptions"></a-checkbox-group>
</a-list-item>
</a-collapse-panel>
</a-collapse>
@ -476,7 +476,7 @@
]
},
],
geoIPOptions: [
IPsOptions: [
{ label: 'Private IP', value: 'private' },
{ label: '🇮🇷 Iran', value: 'ir' },
{ label: '🇨🇳 China', value: 'cn' },
@ -488,7 +488,7 @@
{ label: '🇹🇷 Türkiye', value: 'tr' },
{ label: '🇧🇷 Brazil', value: 'br' },
],
geoSiteOptions: [
DomainsOptions: [
{ label: '🇮🇷 Iran', value: 'ir' },
{ label: '🇨🇳 China', value: 'cn' },
{ label: '🇷🇺 Russia', value: 'ru' },
@ -746,7 +746,7 @@
this.allSetting.subJsonRules = v ? JSON.stringify(this.defaultRules) : "";
}
},
geoIP: {
directIPs: {
get: function () {
if (!this.enableDirect) return [];
const rules = JSON.parse(this.allSetting.subJsonRules);
@ -772,7 +772,7 @@
this.allSetting.subJsonRules = JSON.stringify(rules);
}
},
geoSite: {
directDomains: {
get: function () {
if (!this.enableDirect) return [];
const rules = JSON.parse(this.allSetting.subJsonRules);

View File

@ -230,6 +230,25 @@
<setting-list-item type="switch" title='{{ i18n "pages.xray.Torrent"}}' desc='{{ i18n "pages.xray.TorrentDesc"}}' v-model="torrentSettings"></setting-list-item>
<setting-list-item type="switch" title='{{ i18n "pages.xray.Family"}}' desc='{{ i18n "pages.xray.FamilyDesc"}}' v-model="familyProtectSettings"></setting-list-item>
</a-list-item>
<a-list-item>
<a-row style="padding: 0 20px">
<a-col :lg="24" :xl="12">
<a-list-item-meta
title='{{ i18n "pages.xray.blockdomains" }}'/>
</a-col>
<a-col :lg="24" :xl="12">
<template>
<a-select mode="tags" style="width: 100%"
v-model="blockedDomains"
:dropdown-class-name="themeSwitcher.currentTheme">
<a-select-option :value="p.value" :label="p.label"
v-for="p in settingsData.ProtectionOptions"> [[ p.label ]]
</a-select-option>
</a-select>
</template>
</a-col>
</a-row>
</a-list-item>
</a-collapse-panel>
<a-collapse-panel header='{{ i18n "pages.xray.basicRouting"}}'>
<a-row :xs="24" :sm="24" :lg="12">
@ -316,7 +335,7 @@
v-model="directDomains"
:dropdown-class-name="themeSwitcher.currentTheme">
<a-select-option :value="p.value" :label="p.label"
v-for="p in settingsData.DirectDomainsOptions"> [[ p.label ]]
v-for="p in settingsData.DomainsOptions"> [[ p.label ]]
</a-select-option>
</a-select>
</template>
@ -898,7 +917,7 @@
bittorrent: ["bittorrent"],
},
IPsOptions: [
{ label: 'Private IP', value: 'geoip:private' },
{ label: 'Private IPs', value: 'geoip:private' },
{ label: '🇮🇷 Iran', value: 'ext:geoip_IR.dat:ir' },
{ label: '🇨🇳 China', value: 'geoip:cn' },
{ label: '🇷🇺 Russia', value: 'geoip:ru' },
@ -910,12 +929,6 @@
{ label: '🇧🇷 Brazil', value: 'geoip:br' },
],
DomainsOptions: [
{ label: 'Ads All', value: 'geosite:category-ads-all' },
{ label: 'Ads IR 🇮🇷', value: 'ext:geosite_IR.dat:category-ads-all' },
{ label: 'Ads VN 🇻🇳', value: 'ext:geosite_VN.dat:ads' },
{ label: 'Sec-IR malware', value: 'geosite_IR.dat:malware' },
{ label: 'Sec-IR phishing', value: 'geosite_IR.dat:phishing' },
{ label: 'Sec-IR cryptominers', value: 'geosite_IR.dat:cryptominers' },
{ label: '🇮🇷 Iran', value: 'ext:geosite_IR.dat:ir' },
{ label: '🇮🇷 .ir', value: 'regexp:.*\\.ir$' },
{ label: '🇮🇷 .ایران', value: 'regexp:.*\\.xn--mgba3a4f16a$' },
@ -926,16 +939,13 @@
{ label: '🇻🇳 Vietnam', value: 'ext:geosite_VN.dat:vn' },
{ label: '🇻🇳 .vn', value: 'regexp:.*\\.vn$' },
],
DirectDomainsOptions: [
{ label: '🇮🇷 Iran', value: 'ext:geosite_IR.dat:ir' },
{ label: '🇮🇷 .ir', value: 'regexp:.*\\.ir$' },
{ label: '🇮🇷 .ایران', value: 'regexp:.*\\.xn--mgba3a4f16a$' },
{ label: '🇨🇳 China', value: 'geosite:cn' },
{ label: '🇨🇳 .cn', value: 'regexp:.*\\.cn$' },
{ label: '🇷🇺 Russia', value: 'geosite:category-ru' },
{ label: '🇷🇺 .ru', value: 'regexp:.*\\.ru' },
{ label: '🇻🇳 Vietnam', value: 'ext:geosite_VN.dat:vn' },
{ label: '🇻🇳 .vn', value: 'regexp:.*\\.vn$' },
ProtectionOptions: [
{ label: 'Ads All', value: 'geosite:category-ads-all' },
{ label: 'Ads IR 🇮🇷', value: 'ext:geosite_IR.dat:category-ads-all' },
{ label: 'Ads VN 🇻🇳', value: 'ext:geosite_VN.dat:ads' },
{ label: 'Malware 🇮🇷', value: 'geosite_IR.dat:malware' },
{ label: 'Phishing 🇮🇷', value: 'geosite_IR.dat:phishing' },
{ label: 'Cryptominers 🇮🇷', value: 'geosite_IR.dat:cryptominers' },
],
ServicesOptions: [
{ label: 'Apple', value: 'geosite:apple' },