Merge branch 'MHSanaei:main' into main

This commit is contained in:
somebodywashere 2023-12-26 13:38:06 +03:00 committed by GitHub
commit 84fc262b80
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 166 additions and 103 deletions

View file

@ -352,8 +352,7 @@ XUI_BIN_FOLDER="bin" XUI_DB_FOLDER="/etc/x-ui" go build main.go
# Acknowledgment # Acknowledgment
- [Iran v2ray rules](https://github.com/chocolate4u/Iran-v2ray-rules) (License: **GPL-3.0**): _Enhanced v2ray/xray and v2ray/xray-clients routing rules with built-in Iranian domains and a focus on security and adblocking._ - [Iran v2ray rules](https://github.com/chocolate4u/Iran-v2ray-rules) (License: **GPL-3.0**): _Enhanced v2ray/xray and v2ray/xray-clients routing rules with built-in Iranian domains and a focus on security and adblocking._
- [Iran Hosted Domains](https://github.com/bootmortis/iran-hosted-domains) (License: **MIT**): _A comprehensive list of Iranian domains and services that are hosted within the country._ - [Vietnam Adblock rules](https://github.com/vuong2023/vn-v2ray-rules) (License: **GPL-3.0**): _A hosted domain hosted in Vietnam and blocklist with the most efficiency for Vietnamese._
- [PersianBlocker](https://github.com/MasterKia/PersianBlocker) (License: **AGPLv3**): _An optimal and extensive list to block ads and trackers on Persian websites._
# Suggestion System # Suggestion System
@ -363,7 +362,8 @@ XUI_BIN_FOLDER="bin" XUI_DB_FOLDER="/etc/x-ui" go build main.go
- Fedora 36+ - Fedora 36+
- Arch Linux - Arch Linux
- Manjaro - Manjaro
- Armbian (for ARM devices) - Armbian
- AlmaLinux 9+
# Pictures # Pictures

View file

@ -27,7 +27,7 @@ arch3xui() {
case "$(uname -m)" in case "$(uname -m)" in
x86_64 | x64 | amd64) echo 'amd64' ;; x86_64 | x64 | amd64) echo 'amd64' ;;
armv8* | armv8 | arm64 | aarch64) echo 'arm64' ;; armv8* | armv8 | arm64 | aarch64) echo 'arm64' ;;
armv7* | armv7 | arm | arm32 ) echo 'arm32' ;; armv7* | armv7 | arm | arm32 ) echo 'arm' ;;
*) echo -e "${green}Unsupported CPU architecture! ${plain}" && rm -f install.sh && exit 1 ;; *) echo -e "${green}Unsupported CPU architecture! ${plain}" && rm -f install.sh && exit 1 ;;
esac esac
} }
@ -54,6 +54,11 @@ elif [[ "${release}" == "debian" ]]; then
if [[ ${os_version} -lt 10 ]]; then if [[ ${os_version} -lt 10 ]]; then
echo -e "${red} Please use Debian 10 or higher ${plain}\n" && exit 1 echo -e "${red} Please use Debian 10 or higher ${plain}\n" && exit 1
fi fi
elif [[ "${release}" == "almalinux" ]]; then
if [[ ${os_version} -lt 9 ]]; then
echo -e "${red} Please use AlmaLinux 9 or higher ${plain}\n" && exit 1
fi
elif [[ "${release}" == "arch" ]]; then elif [[ "${release}" == "arch" ]]; then
echo "Your OS is ArchLinux" echo "Your OS is ArchLinux"
elif [[ "${release}" == "manjaro" ]]; then elif [[ "${release}" == "manjaro" ]]; then
@ -67,7 +72,7 @@ fi
install_base() { install_base() {
case "${release}" in case "${release}" in
centos|fedora) centos|fedora|almalinux)
yum -y update && yum install -y -q wget curl tar yum -y update && yum install -y -q wget curl tar
;; ;;
arch|manjaro) arch|manjaro)

View file

@ -1117,3 +1117,7 @@ li.ant-select-dropdown-menu-item:empty:after {
padding: 0.5rem; padding: 0.5rem;
border-radius: 1rem; border-radius: 1rem;
} }
.ant-input-group-addon:not(:first-child):not(:last-child), .ant-input-group-wrap:not(:first-child):not(:last-child), .ant-input-group>.ant-input:not(:first-child):not(:last-child) {
border-radius: 0rem 1rem 1rem 0rem;
}

View file

@ -839,12 +839,12 @@ Outbound.ShadowsocksSettings = class extends CommonClass {
} }
}; };
Outbound.SocksSettings = class extends CommonClass { Outbound.SocksSettings = class extends CommonClass {
constructor(address, port, user, password) { constructor(address, port, user, pass) {
super(); super();
this.address = address; this.address = address;
this.port = port; this.port = port;
this.user = user; this.user = user;
this.password = password; this.pass = pass;
} }
static fromJson(json={}) { static fromJson(json={}) {
@ -854,7 +854,7 @@ Outbound.SocksSettings = class extends CommonClass {
servers[0].address, servers[0].address,
servers[0].port, servers[0].port,
ObjectUtil.isArrEmpty(servers[0].users) ? '' : servers[0].users[0].user, ObjectUtil.isArrEmpty(servers[0].users) ? '' : servers[0].users[0].user,
ObjectUtil.isArrEmpty(servers[0].password) ? '' : servers[0].users[0].password, ObjectUtil.isArrEmpty(servers[0].pass) ? '' : servers[0].users[0].pass,
); );
} }
@ -863,18 +863,18 @@ Outbound.SocksSettings = class extends CommonClass {
servers: [{ servers: [{
address: this.address, address: this.address,
port: this.port, port: this.port,
users: ObjectUtil.isEmpty(this.user) ? [] : [{user: this.user, password: this.password}], users: ObjectUtil.isEmpty(this.user) ? [] : [{user: this.user, pass: this.pass}],
}], }],
}; };
} }
}; };
Outbound.HttpSettings = class extends CommonClass { Outbound.HttpSettings = class extends CommonClass {
constructor(address, port, user, password) { constructor(address, port, user, pass) {
super(); super();
this.address = address; this.address = address;
this.port = port; this.port = port;
this.user = user; this.user = user;
this.password = password; this.pass = pass;
} }
static fromJson(json={}) { static fromJson(json={}) {
@ -884,7 +884,7 @@ Outbound.HttpSettings = class extends CommonClass {
servers[0].address, servers[0].address,
servers[0].port, servers[0].port,
ObjectUtil.isArrEmpty(servers[0].users) ? '' : servers[0].users[0].user, ObjectUtil.isArrEmpty(servers[0].users) ? '' : servers[0].users[0].user,
ObjectUtil.isArrEmpty(servers[0].password) ? '' : servers[0].users[0].password, ObjectUtil.isArrEmpty(servers[0].pass) ? '' : servers[0].users[0].pass,
); );
} }
@ -893,7 +893,7 @@ Outbound.HttpSettings = class extends CommonClass {
servers: [{ servers: [{
address: this.address, address: this.address,
port: this.port, port: this.port,
users: ObjectUtil.isEmpty(this.user) ? [] : [{user: this.user, password: this.password}], users: ObjectUtil.isEmpty(this.user) ? [] : [{user: this.user, pass: this.pass}],
}], }],
}; };
} }

View file

@ -114,6 +114,7 @@
position: relative; position: relative;
border-radius: 25px; border-radius: 25px;
width: 100%; width: 100%;
transition: all 0.3s cubic-bezier(.645,.045,.355,1);
} }
.dark .wave-btn-bg { .dark .wave-btn-bg {
color: #fff; color: #fff;
@ -123,7 +124,6 @@
background-origin: border-box; background-origin: border-box;
background-clip: padding-box, border-box; background-clip: padding-box, border-box;
background-size: 300%; background-size: 300%;
transition: all 0.3s cubic-bezier(.645,.045,.355,1);
width: 100%; width: 100%;
z-index: 1; z-index: 1;
} }
@ -291,8 +291,7 @@
<a-form-item> <a-form-item>
<a-row justify="center" class="centered"> <a-row justify="center" class="centered">
<div class="wave-btn-bg wave-btn-bg-cl" :style="loading ? { width: '54px' } : { display: 'inline-block' }"> <div class="wave-btn-bg wave-btn-bg-cl" :style="loading ? { width: '54px' } : { display: 'inline-block' }">
<a-button class="ant-btn-primary-login" type="primary" :loading="loading" @click="login" :icon="loading ? 'poweroff' : undefined" <a-button class="ant-btn-primary-login" type="primary" :loading="loading" @click="login" :icon="loading ? 'poweroff' : undefined">
:style="loading ? { width: '50px' } : { display: 'inline-block' }">
[[ loading ? '' : '{{ i18n "login" }}' ]] [[ loading ? '' : '{{ i18n "login" }}' ]]
</a-button> </a-button>
</div> </div>

View file

@ -94,12 +94,13 @@
<!-- Servers (trojan/shadowsocks/socks/http) settings --> <!-- Servers (trojan/shadowsocks/socks/http) settings -->
<template v-if="outbound.hasServers()"> <template v-if="outbound.hasServers()">
<!-- http / socks -->
<template v-if="outbound.hasUsername()"> <template v-if="outbound.hasUsername()">
<a-form-item label='{{ i18n "username" }}'> <a-form-item label='{{ i18n "username" }}'>
<a-input v-model.trim="outbound.settings.user"></a-input> <a-input v-model.trim="outbound.settings.user"></a-input>
</a-form-item> </a-form-item>
<a-form-item label='{{ i18n "password" }}'> <a-form-item label='{{ i18n "password" }}'>
<a-input v-model.trim="outbound.settings.password"></a-input> <a-input v-model.trim="outbound.settings.pass"></a-input>
</a-form-item> </a-form-item>
</template> </template>
<!-- shadowsocks --> <!-- shadowsocks -->

View file

@ -33,7 +33,7 @@
</template> </template>
</a-form-item> </a-form-item>
<a-form-item label='{{ i18n "pages.inbounds.stream.general.requestHeader" }}'> <a-form-item label='{{ i18n "pages.inbounds.stream.general.requestHeader" }}'>
<a-button size="small" @click="inbound.stream.tcp.request.addHeader('', '')">+</a-button> <a-button size="small" @click="inbound.stream.tcp.request.addHeader('host', '')">+</a-button>
</a-form-item> </a-form-item>
<a-form-item :wrapper-col="{span:24}"> <a-form-item :wrapper-col="{span:24}">
<a-input-group compact v-for="(header, index) in inbound.stream.tcp.request.headers"> <a-input-group compact v-for="(header, index) in inbound.stream.tcp.request.headers">

View file

@ -157,6 +157,7 @@
<setting-list-item type="switch" title='{{ i18n "pages.xray.PrivateIp"}}' desc='{{ i18n "pages.xray.PrivateIpDesc"}}' v-model="privateIpSettings"></setting-list-item> <setting-list-item type="switch" title='{{ i18n "pages.xray.PrivateIp"}}' desc='{{ i18n "pages.xray.PrivateIpDesc"}}' v-model="privateIpSettings"></setting-list-item>
<setting-list-item type="switch" title='{{ i18n "pages.xray.Ads"}}' desc='{{ i18n "pages.xray.AdsDesc"}}' v-model="AdsSettings"></setting-list-item> <setting-list-item type="switch" title='{{ i18n "pages.xray.Ads"}}' desc='{{ i18n "pages.xray.AdsDesc"}}' v-model="AdsSettings"></setting-list-item>
<setting-list-item type="switch" title='{{ i18n "pages.xray.Family"}}' desc='{{ i18n "pages.xray.FamilyDesc"}}' v-model="familyProtectSettings"></setting-list-item> <setting-list-item type="switch" title='{{ i18n "pages.xray.Family"}}' desc='{{ i18n "pages.xray.FamilyDesc"}}' v-model="familyProtectSettings"></setting-list-item>
<setting-list-item type="switch" title='{{ i18n "pages.xray.Security"}}' desc='{{ i18n "pages.xray.SecurityDesc"}}' v-model="SecuritySettings"></setting-list-item>
<setting-list-item type="switch" title='{{ i18n "pages.xray.Speedtest"}}' desc='{{ i18n "pages.xray.SpeedtestDesc"}}' v-model="SpeedTestSettings"></setting-list-item> <setting-list-item type="switch" title='{{ i18n "pages.xray.Speedtest"}}' desc='{{ i18n "pages.xray.SpeedtestDesc"}}' v-model="SpeedTestSettings"></setting-list-item>
</a-collapse-panel> </a-collapse-panel>
<a-collapse-panel header='{{ i18n "pages.xray.blockCountryConfigs"}}'> <a-collapse-panel header='{{ i18n "pages.xray.blockCountryConfigs"}}'>
@ -544,6 +545,11 @@
"geosite:category-ads-all", "geosite:category-ads-all",
"ext:geosite_IR.dat:category-ads-all" "ext:geosite_IR.dat:category-ads-all"
], ],
security: [
"ext:geosite_IR.dat:malware",
"ext:geosite_IR.dat:phishing",
"ext:geosite_IR.dat:cryptominers"
],
speedtest: ["geosite:speedtest"], speedtest: ["geosite:speedtest"],
openai: ["geosite:openai"], openai: ["geosite:openai"],
google: ["geosite:google"], google: ["geosite:google"],
@ -560,7 +566,7 @@
ir: [ ir: [
"regexp:.*\\.ir$", "regexp:.*\\.ir$",
"regexp:.*\\.xn--mgba3a4f16a$", // .ایران "regexp:.*\\.xn--mgba3a4f16a$", // .ایران
"ext:geosite_IR.dat:ir" // have rules to bypass all .ir domains. "ext:geosite_IR.dat:ir"
], ],
vn: [ vn: [
"regexp:.*\\.vn$", "regexp:.*\\.vn$",
@ -571,9 +577,7 @@
familyProtectDNS: { familyProtectDNS: {
"servers": [ "servers": [
"1.1.1.3", // https://developers.cloudflare.com/1.1.1.1/setup/ "1.1.1.3", // https://developers.cloudflare.com/1.1.1.1/setup/
"1.0.0.3", "1.0.0.3"
"94.140.14.15", // https://adguard-dns.io/kb/general/dns-providers/
"94.140.15.16"
], ],
"queryStrategy": "UseIPv4" "queryStrategy": "UseIPv4"
}, },
@ -1182,6 +1186,18 @@
} }
}, },
}, },
SecuritySettings: {
get: function () {
return doAllItemsExist(this.settingsData.domains.security, this.blockedDomains);
},
set: function (newValue) {
if (newValue) {
this.blockedDomains = [...this.blockedDomains, ...this.settingsData.domains.security];
} else {
this.blockedDomains = this.blockedDomains.filter(data => !this.settingsData.domains.security.includes(data));
}
},
},
SpeedTestSettings: { SpeedTestSettings: {
get: function () { get: function () {
return doAllItemsExist(this.settingsData.domains.speedtest, this.blockedDomains); return doAllItemsExist(this.settingsData.domains.speedtest, this.blockedDomains);

View file

@ -36,8 +36,8 @@
</a-select> </a-select>
</a-form-item> </a-form-item>
<a-form-item label='Protocol'> <a-form-item label='Protocol'>
<a-select v-model="ruleModal.rule.protocol" :dropdown-class-name="themeSwitcher.currentTheme"> <a-select v-model="ruleModal.rule.protocol" mode="multiple" :dropdown-class-name="themeSwitcher.currentTheme">
<a-select-option v-for="x in ['','http','tls','bittorrent']" :value="x">[[ x ]]</a-select-option> <a-select-option v-for="x in ['http','tls','bittorrent']" :value="x">[[ x ]]</a-select-option>
</a-select> </a-select>
</a-form-item> </a-form-item>
<a-form-item label='Attributes'> <a-form-item label='Attributes'>

View file

@ -59,7 +59,7 @@
"settings" = "Panel Settings" "settings" = "Panel Settings"
"xray" = "Xray Settings" "xray" = "Xray Settings"
"logout" = "Logout" "logout" = "Logout"
"link" = "Management" "link" = "Manage"
[pages.login] [pages.login]
"title" = "Login" "title" = "Login"
@ -79,7 +79,7 @@
"xrayStatus" = "Status" "xrayStatus" = "Status"
"stopXray" = "Stop" "stopXray" = "Stop"
"restartXray" = "Restart" "restartXray" = "Restart"
"xraySwitch" = "SwitchV" "xraySwitch" = "Version"
"xraySwitchClick" = "Choose the version you want to switch to." "xraySwitchClick" = "Choose the version you want to switch to."
"xraySwitchClickDesk" = "Choose wisely, as older versions may not be compatible with current configurations." "xraySwitchClickDesk" = "Choose wisely, as older versions may not be compatible with current configurations."
"operationHours" = "Uptime" "operationHours" = "Uptime"
@ -327,8 +327,10 @@
"PrivateIpDesc" = "Change the configuration template to avoid connecting to private IP ranges." "PrivateIpDesc" = "Change the configuration template to avoid connecting to private IP ranges."
"Ads" = "Block Ads" "Ads" = "Block Ads"
"AdsDesc" = "Change the configuration template to block ads." "AdsDesc" = "Change the configuration template to block ads."
"Family" = "Block Malware and Adult Content" "Family" = "Block malware and Adult Content"
"FamilyDesc" = "DNS resolvers to block malware and adult content for family protection." "FamilyDesc" = "Cloudflare DNS resolvers to block malware and adult content for family protection."
"Security" = "Block Malware, Phishing and Cryptominers Websites"
"SecurityDesc" = "Change the configuration template for Security protection."
"Speedtest" = "Block Speedtest Websites" "Speedtest" = "Block Speedtest Websites"
"SpeedtestDesc" = "Change the configuration template to avoid connecting to speedtest websites." "SpeedtestDesc" = "Change the configuration template to avoid connecting to speedtest websites."
"IRIp" = "Disable Connection to Iran IPs" "IRIp" = "Disable Connection to Iran IPs"

View file

@ -76,10 +76,10 @@
"title" = "Estado del Sistema" "title" = "Estado del Sistema"
"memory" = "Memoria" "memory" = "Memoria"
"hard" = "Disco Duro" "hard" = "Disco Duro"
"xrayStatus" = "Estado de Xray" "xrayStatus" = "Estado de"
"stopXray" = "Detener Xray" "stopXray" = "Detener"
"restartXray" = "Reiniciar" "restartXray" = "Reiniciar"
"xraySwitch" = "Cambiar Versión" "xraySwitch" = "Versión"
"xraySwitchClick" = "Elige la versión a la que deseas cambiar." "xraySwitchClick" = "Elige la versión a la que deseas cambiar."
"xraySwitchClickDesk" = "Elige sabiamente, ya que las versiones anteriores pueden no ser compatibles con las configuraciones actuales." "xraySwitchClickDesk" = "Elige sabiamente, ya que las versiones anteriores pueden no ser compatibles con las configuraciones actuales."
"operationHours" = "Tiempo de Funcionamiento" "operationHours" = "Tiempo de Funcionamiento"
@ -327,8 +327,10 @@
"PrivateIpDesc" = "Cambia la plantilla de configuración para evitar la conexión a rangos de IP privadas." "PrivateIpDesc" = "Cambia la plantilla de configuración para evitar la conexión a rangos de IP privadas."
"Ads" = "Bloquear Anuncios" "Ads" = "Bloquear Anuncios"
"AdsDesc" = "Cambia la plantilla de configuración para bloquear anuncios." "AdsDesc" = "Cambia la plantilla de configuración para bloquear anuncios."
"Family" = "Bloquear Malware y Contenido para Adultos" "Family" = "Bloquee malware y contenido para adultos"
"FamilyDesc" = "Resolvedores de DNS para bloquear malware y contenido para adultos para protección familiar." "FamilyDesc" = "Resolutores de DNS de Cloudflare para bloquear malware y contenido para adultos para protección familiar."
"Security" = "Bloquee sitios web de malware, phishing y criptomineros"
"SecurityDesc" = "Cambiar la plantilla de configuración para la protección de seguridad."
"Speedtest" = "Bloquear Sitios Web de Pruebas de Velocidad" "Speedtest" = "Bloquear Sitios Web de Pruebas de Velocidad"
"SpeedtestDesc" = "Cambia la plantilla de configuración para evitar la conexión a sitios web de pruebas de velocidad." "SpeedtestDesc" = "Cambia la plantilla de configuración para evitar la conexión a sitios web de pruebas de velocidad."
"IRIp" = "Desactivar Conexión a Rangos de IP de Irán" "IRIp" = "Desactivar Conexión a Rangos de IP de Irán"

View file

@ -79,7 +79,7 @@
"xrayStatus" = "وضعیت" "xrayStatus" = "وضعیت"
"stopXray" = "توقف" "stopXray" = "توقف"
"restartXray" = "شروع مجدد" "restartXray" = "شروع مجدد"
"xraySwitch" = "تغییر ورژن" "xraySwitch" = "ورژن"
"xraySwitchClick" = "ورژن مورد نظر را انتخاب کنید" "xraySwitchClick" = "ورژن مورد نظر را انتخاب کنید"
"xraySwitchClickDesk" = "لطفا با دقت انتخاب کنید ، در صورت انتخاب اشتباه امکان قطعی سیستم وجود دارد " "xraySwitchClickDesk" = "لطفا با دقت انتخاب کنید ، در صورت انتخاب اشتباه امکان قطعی سیستم وجود دارد "
"operationHours" = "آپ تایم سیستم" "operationHours" = "آپ تایم سیستم"
@ -328,7 +328,9 @@
"Ads" = "مسدود کردن تبلیغات" "Ads" = "مسدود کردن تبلیغات"
"AdsDesc" = "الگوی تنظیمات را برای مسدود کردن تبلیغات تغییر میدهد" "AdsDesc" = "الگوی تنظیمات را برای مسدود کردن تبلیغات تغییر میدهد"
"Family" = "فعال کردن حالت خانواده" "Family" = "فعال کردن حالت خانواده"
"FamilyDesc" = "برای جلوگیری از ارتباط با وبسایت های ناامن" "FamilyDesc" = "مسدود کردن محتوای بزرگسالان به کمک دی ان اس کلودفلر برای حالت خانواده "
"Security" = "مسدود کردن وب‌سایت‌های بدافزار، فیشینگ و کریپتومینرها"
"SecurityDesc" = "الگوی پیکربندی را برای حفاظت از امنیت تغییر دهید"
"Speedtest" = "جلوگیری از اتصال به سایت های تست سرعت" "Speedtest" = "جلوگیری از اتصال به سایت های تست سرعت"
"SpeedtestDesc" = "الگوی تنظیمات را برای فیلتر کردن اتصال به سایت های تست سرعت تغییر میدهد" "SpeedtestDesc" = "الگوی تنظیمات را برای فیلتر کردن اتصال به سایت های تست سرعت تغییر میدهد"
"IRIp" = "جلوگیری از اتصال آیپی های ایران" "IRIp" = "جلوگیری از اتصال آیپی های ایران"

View file

@ -77,9 +77,9 @@
"memory" = "Память" "memory" = "Память"
"hard" = "Жесткий диск" "hard" = "Жесткий диск"
"xrayStatus" = "Статус" "xrayStatus" = "Статус"
"stopXray" = "Остановить Xray" "stopXray" = "Остановить"
"restartXray" = "Перезапустить Xray" "restartXray" = "Перезапустить"
"xraySwitch" = "Переключить версию" "xraySwitch" = "Версия"
"xraySwitchClick" = "Выберите желаемую версию" "xraySwitchClick" = "Выберите желаемую версию"
"xraySwitchClickDesk" = "Выбирайте внимательно, так как старые версии могут быть несовместимы с текущими конфигурациями" "xraySwitchClickDesk" = "Выбирайте внимательно, так как старые версии могут быть несовместимы с текущими конфигурациями"
"operationHours" = "Время работы системы" "operationHours" = "Время работы системы"
@ -327,8 +327,10 @@
"PrivateIpDesc" = "Изменение шаблона конфигурации для предупреждения подключения к диапазонам частных IP-адресов" "PrivateIpDesc" = "Изменение шаблона конфигурации для предупреждения подключения к диапазонам частных IP-адресов"
"Ads" = "Блокировка рекламы" "Ads" = "Блокировка рекламы"
"AdsDesc" = "Изменение конфигурации для блокировки рекламы" "AdsDesc" = "Изменение конфигурации для блокировки рекламы"
"Family" = "Блокировать вредоносное ПО и контент для взрослых" "Family" = "Блокируйте вредоносное ПО и контент для взрослых"
"FamilyDesc" = "Резольверы DNS для блокировки вредоносных программ и контента для взрослых для защиты семьи" "FamilyDesc" = "DNS-преобразователи Cloudflare для блокировки вредоносного ПО и контента для взрослых в целях защиты семьи."
"Security" = "Блокируйте вредоносное ПО, фишинговые сайты и сайты криптомайнеров"
"SecurityDesc" = "Изменение шаблона конфигурации для защиты безопасности."
"Speedtest" = "Блокировать сайты для проверки скорости" "Speedtest" = "Блокировать сайты для проверки скорости"
"SpeedtestDesc" = "Изменение шаблона конфигурации для предупреждения подключения к веб-сайтам для тестирования скорости" "SpeedtestDesc" = "Изменение шаблона конфигурации для предупреждения подключения к веб-сайтам для тестирования скорости"
"IRIp" = "Заблокировать подключения к диапазонам IP-адресов Ирана" "IRIp" = "Заблокировать подключения к диапазонам IP-адресов Ирана"

View file

@ -74,12 +74,12 @@
[pages.index] [pages.index]
"title" = "Trạng thái hệ thống" "title" = "Trạng thái hệ thống"
"memory" = "Bộ nhớ" "memory" = "ĐẬP"
"hard" = "Ổ cứng" "hard" = "Đĩa"
"xrayStatus" = "Trạng thái của Xray" "xrayStatus" = "Trạng thái"
"stopXray" = "Dừng Xray" "stopXray" = "Dừng lại"
"restartXray" = "Khởi động lại Xray" "restartXray" = "Khởi động lại"
"xraySwitch" = "Chuyển đổi phiên bản" "xraySwitch" = "Phiên bản"
"xraySwitchClick" = "Chọn phiên bản mà bạn muốn chuyển đổi sang." "xraySwitchClick" = "Chọn phiên bản mà bạn muốn chuyển đổi sang."
"xraySwitchClickDesk" = "Hãy lựa chọn thận trọng, vì các phiên bản cũ có thể không tương thích với các cấu hình hiện tại." "xraySwitchClickDesk" = "Hãy lựa chọn thận trọng, vì các phiên bản cũ có thể không tương thích với các cấu hình hiện tại."
"operationHours" = "Thời gian hoạt động" "operationHours" = "Thời gian hoạt động"
@ -327,8 +327,10 @@
"PrivateIpDesc" = "Thay đổi mẫu cấu hình để tránh kết nối đến dải IP riêng tư." "PrivateIpDesc" = "Thay đổi mẫu cấu hình để tránh kết nối đến dải IP riêng tư."
"Ads" = "Chặn Quảng cáo" "Ads" = "Chặn Quảng cáo"
"AdsDesc" = "Thay đổi mẫu cấu hình để chặn quảng cáo." "AdsDesc" = "Thay đổi mẫu cấu hình để chặn quảng cáo."
"Family" = "Chặn Phần mềm độc hại và Nội dung cho Người lớn" "Family" = "Chặn phần mềm độc hại và nội dung người lớn"
"FamilyDesc" = "Các trình giải quyết DNS để chặn phần mềm độc hại và nội dung cho bảo vệ gia đình." "FamilyDesc" = "Trình phân giải DNS của Cloudflare để chặn phần mềm độc hại và nội dung người lớn để bảo vệ gia đình."
"Security" = "Chặn các trang web chứa phần mềm độc hại, lừa đảo và khai thác tiền điện tử"
"SecurityDesc" = "Thay đổi mẫu cấu hình để bảo vệ Bảo mật."
"Speedtest" = "Chặn Trang web Speedtest" "Speedtest" = "Chặn Trang web Speedtest"
"SpeedtestDesc" = "Thay đổi mẫu cấu hình để tránh kết nối đến các trang web Speedtest." "SpeedtestDesc" = "Thay đổi mẫu cấu hình để tránh kết nối đến các trang web Speedtest."
"IRIp" = "Vô hiệu hóa kết nối đến dải IP của Iran" "IRIp" = "Vô hiệu hóa kết nối đến dải IP của Iran"

View file

@ -10,8 +10,8 @@
"remark" = "备注" "remark" = "备注"
"enable" = "启用" "enable" = "启用"
"protocol" = "协议" "protocol" = "协议"
"search" = "搜" "search" = "搜"
"filter" = "过滤器" "filter" = "筛选"
"loading" = "加载中..." "loading" = "加载中..."
"second" = "秒" "second" = "秒"
"minute" = "分钟" "minute" = "分钟"
@ -30,8 +30,8 @@
"sure" = "确定" "sure" = "确定"
"encryption" = "加密" "encryption" = "加密"
"transmission" = "传输" "transmission" = "传输"
"host" = "主持人" "host" = "Host"
"path" = "小路" "path" = "Path"
"camouflage" = "伪装" "camouflage" = "伪装"
"status" = "状态" "status" = "状态"
"enabled" = "开启" "enabled" = "开启"
@ -49,8 +49,8 @@
"install" = "安装" "install" = "安装"
"clients" = "客户端" "clients" = "客户端"
"usage" = "用法" "usage" = "用法"
"secretToken" = "秘密令牌" "secretToken" = "安全密钥"
"remained" = "仍然存在" "remained" = "剩余"
"security" = "安全" "security" = "安全"
[menu] [menu]
@ -79,7 +79,7 @@
"xrayStatus" = "状态" "xrayStatus" = "状态"
"stopXray" = "停止" "stopXray" = "停止"
"restartXray" = "重启" "restartXray" = "重启"
"xraySwitch" = "切换版本" "xraySwitch" = "版本"
"xraySwitchClick" = "点击你想切换的版本" "xraySwitchClick" = "点击你想切换的版本"
"xraySwitchClickDesk" = "请谨慎选择,旧版本可能配置不兼容" "xraySwitchClickDesk" = "请谨慎选择,旧版本可能配置不兼容"
"operationHours" = "系统正常运行时间" "operationHours" = "系统正常运行时间"
@ -148,7 +148,7 @@
"client" = "客户" "client" = "客户"
"export" = "导出链接" "export" = "导出链接"
"clone" = "克隆" "clone" = "克隆"
"cloneInbound" = "创造" "cloneInbound" = "克隆"
"cloneInboundContent" = "此入站的所有项目除 Port、Listening IP、Clients 将应用于克隆" "cloneInboundContent" = "此入站的所有项目除 Port、Listening IP、Clients 将应用于克隆"
"cloneInboundOk" = "从创建克隆" "cloneInboundOk" = "从创建克隆"
"resetAllTraffic" = "重置所有入站流量" "resetAllTraffic" = "重置所有入站流量"
@ -327,8 +327,10 @@
"PrivateIpDesc" = "更改配置模板以避免连接私有 IP 范围" "PrivateIpDesc" = "更改配置模板以避免连接私有 IP 范围"
"Ads" = "屏蔽广告" "Ads" = "屏蔽广告"
"AdsDesc" = "修改配置模板屏蔽广告" "AdsDesc" = "修改配置模板屏蔽广告"
"Family" = "启用家庭友好配置" "Family" = "阻止恶意软件和成人内容"
"FamilyDesc" = "避免为家人连接到不安全的网站" "FamilyDesc" = "Cloudflare DNS 解析器可阻止恶意软件和成人内容以保护家庭."
"Security" = "阻止恶意软件、网络钓鱼和加密货币挖矿网站"
"SecurityDesc" = "更改安全防护配置模板."
"Speedtest" = "阻止测速网站" "Speedtest" = "阻止测速网站"
"SpeedtestDesc" = "更改配置模板以避免连接到速度测试网站。 重新启动面板以应用更改。" "SpeedtestDesc" = "更改配置模板以避免连接到速度测试网站。 重新启动面板以应用更改。"
"IRIp" = "禁止伊朗 IP 范围连接" "IRIp" = "禁止伊朗 IP 范围连接"
@ -377,7 +379,7 @@
"SpotifyWARPDesc" = "为Spotify添加路由到WARP" "SpotifyWARPDesc" = "为Spotify添加路由到WARP"
"IRWARP" = "将伊朗域名路由到 WARP" "IRWARP" = "将伊朗域名路由到 WARP"
"IRWARPDesc" = "将伊朗域的路由添加到 WARP。 重启面板生效" "IRWARPDesc" = "将伊朗域的路由添加到 WARP。 重启面板生效"
"Inbounds" = "界内" "Inbounds" = "入站"
"InboundsDesc" = "更改配置模板接受特殊客户端" "InboundsDesc" = "更改配置模板接受特殊客户端"
"Outbounds" = "出站" "Outbounds" = "出站"
"OutboundsDesc" = "更改配置模板定义此服务器的传出方式" "OutboundsDesc" = "更改配置模板定义此服务器的传出方式"
@ -405,7 +407,7 @@
"editOutbound" = "编辑出站" "editOutbound" = "编辑出站"
"editReverse" = "编辑反向" "editReverse" = "编辑反向"
"tag" = "标签" "tag" = "标签"
"tagDesc" = "独特的标签" "tagDesc" = "唯一标记"
"address" = "地址" "address" = "地址"
"reverse" = "反转" "reverse" = "反转"
"domain" = "域名" "domain" = "域名"

112
x-ui.sh
View file

@ -54,6 +54,10 @@ elif [[ "${release}" == "debian" ]]; then
if [[ ${os_version} -lt 10 ]]; then if [[ ${os_version} -lt 10 ]]; then
echo -e "${red} Please use Debian 10 or higher ${plain}\n" && exit 1 echo -e "${red} Please use Debian 10 or higher ${plain}\n" && exit 1
fi fi
elif [[ "${release}" == "almalinux" ]]; then
if [[ ${os_version} -lt 9 ]]; then
echo -e "${red} Please use Almalinux 9 or higher ${plain}\n" && exit 1
fi
elif [[ "${release}" == "arch" ]]; then elif [[ "${release}" == "arch" ]]; then
echo "Your OS is ArchLinux" echo "Your OS is ArchLinux"
elif [[ "${release}" == "manjaro" ]]; then elif [[ "${release}" == "manjaro" ]]; then
@ -126,6 +130,24 @@ update() {
fi fi
} }
custom_version() {
echo "Enter the panel version (like 2.0.0):"
read panel_version
if [ -z "$panel_version" ]; then
echo "Panel version cannot be empty. Exiting."
exit 1
fi
download_link="https://raw.githubusercontent.com/mhsanaei/3x-ui/master/install.sh"
# Use the entered panel version in the download link
install_command="bash <(curl -Ls $download_link) v$panel_version"
echo "Downloading and installing panel version $panel_version..."
eval $install_command
}
uninstall() { uninstall() {
confirm "Are you sure you want to uninstall the panel? xray will also uninstalled!" "n" confirm "Are you sure you want to uninstall the panel? xray will also uninstalled!" "n"
if [[ $? != 0 ]]; then if [[ $? != 0 ]]; then
@ -1035,36 +1057,37 @@ show_menu() {
${green}3X-ui Panel Management Script${plain} ${green}3X-ui Panel Management Script${plain}
${green}0.${plain} Exit Script ${green}0.${plain} Exit Script
———————————————— ————————————————
${green}1.${plain} Install x-ui ${green}1.${plain} Install
${green}2.${plain} Update x-ui ${green}2.${plain} Update
${green}3.${plain} Uninstall x-ui ${green}3.${plain} Custom Version
${green}4.${plain} Uninstall
———————————————— ————————————————
${green}4.${plain} Reset Username & Password & Secret Token ${green}5.${plain} Reset Username & Password & Secret Token
${green}5.${plain} Reset Panel Settings ${green}6.${plain} Reset Settings
${green}6.${plain} Change Panel Port ${green}7.${plain} Change Port
${green}7.${plain} View Current Panel Settings ${green}8.${plain} View Current Settings
———————————————— ————————————————
${green}8.${plain} Start x-ui ${green}9.${plain} Start
${green}9.${plain} Stop x-ui ${green}10.${plain} Stop
${green}10.${plain} Restart x-ui ${green}11.${plain} Restart
${green}11.${plain} Check x-ui Status ${green}12.${plain} Check Status
${green}12.${plain} Check x-ui Logs ${green}13.${plain} Check Logs
———————————————— ————————————————
${green}13.${plain} Enable x-ui On System Startup ${green}14.${plain} Enable x-ui On System Startup
${green}14.${plain} Disable x-ui On System Startup ${green}15.${plain} Disable x-ui On System Startup
———————————————— ————————————————
${green}15.${plain} SSL Certificate Management ${green}16.${plain} SSL Certificate Management
${green}16.${plain} Cloudflare SSL Certificate ${green}17.${plain} Cloudflare SSL Certificate
${green}17.${plain} IP Limit Management ${green}18.${plain} IP Limit Management
${green}18.${plain} WARP Management ${green}19.${plain} WARP Management
———————————————— ————————————————
${green}19.${plain} Enable BBR ${green}20.${plain} Enable BBR
${green}20.${plain} Update Geo Files ${green}21.${plain} Update Geo Files
${green}21.${plain} Active Firewall and open ports ${green}22.${plain} Active Firewall and open ports
${green}22.${plain} Speedtest by Ookla ${green}23.${plain} Speedtest by Ookla
" "
show_status show_status
echo && read -p "Please enter your selection [0-22]: " num echo && read -p "Please enter your selection [0-23]: " num
case "${num}" in case "${num}" in
0) 0)
@ -1077,67 +1100,70 @@ show_menu() {
check_install && update check_install && update
;; ;;
3) 3)
check_install && uninstall check_install && custom_version
;; ;;
4) 4)
check_install && reset_user check_install && uninstall
;; ;;
5) 5)
check_install && reset_config check_install && reset_user
;; ;;
6) 6)
check_install && set_port check_install && reset_config
;; ;;
7) 7)
check_install && check_config check_install && set_port
;; ;;
8) 8)
check_install && start check_install && check_config
;; ;;
9) 9)
check_install && stop check_install && start
;; ;;
10) 10)
check_install && restart check_install && stop
;; ;;
11) 11)
check_install && status check_install && restart
;; ;;
12) 12)
check_install && show_log check_install && status
;; ;;
13) 13)
check_install && enable check_install && show_log
;; ;;
14) 14)
check_install && disable check_install && enable
;; ;;
15) 15)
ssl_cert_issue_main check_install && disable
;; ;;
16) 16)
ssl_cert_issue_CF ssl_cert_issue_main
;; ;;
17) 17)
iplimit_main ssl_cert_issue_CF
;; ;;
18) 18)
warp_cloudflare iplimit_main
;; ;;
19) 19)
enable_bbr warp_cloudflare
;; ;;
20) 20)
update_geo enable_bbr
;; ;;
21) 21)
open_ports update_geo
;; ;;
22) 22)
open_ports
;;
23)
run_speedtest run_speedtest
;; ;;
*) *)
LOGE "Please enter the correct number [0-22]" LOGE "Please enter the correct number [0-23]"
;; ;;
esac esac
} }