mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-04-19 21:42:24 +00:00
Compare commits
3 commits
3eda1bf5da
...
2425b10549
Author | SHA1 | Date | |
---|---|---|---|
![]() |
2425b10549 | ||
![]() |
19f7938617 | ||
![]() |
6545d8b61d |
9 changed files with 60 additions and 184 deletions
83
install.sh
83
install.sh
|
@ -37,83 +37,20 @@ arch() {
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "arch: $(arch)"
|
echo "Arch: $(arch)"
|
||||||
|
|
||||||
os_version=""
|
check_glibc_version() {
|
||||||
os_version=$(grep "^VERSION_ID" /etc/os-release | cut -d '=' -f2 | tr -d '"' | tr -d '.')
|
glibc_version=$(ldd --version | head -n1 | awk '{print $NF}')
|
||||||
|
|
||||||
if [[ "${release}" == "arch" ]]; then
|
required_version="2.32"
|
||||||
echo "Your OS is Arch Linux"
|
if [[ "$(printf '%s\n' "$required_version" "$glibc_version" | sort -V | head -n1)" != "$required_version" ]]; then
|
||||||
elif [[ "${release}" == "parch" ]]; then
|
echo -e "${red}GLIBC version $glibc_version is too old! Required: 2.32 or higher${plain}"
|
||||||
echo "Your OS is Parch Linux"
|
echo "Please upgrade to a newer version of your operating system to get a higher GLIBC version."
|
||||||
elif [[ "${release}" == "manjaro" ]]; then
|
|
||||||
echo "Your OS is Manjaro"
|
|
||||||
elif [[ "${release}" == "armbian" ]]; then
|
|
||||||
echo "Your OS is Armbian"
|
|
||||||
elif [[ "${release}" == "alpine" ]]; then
|
|
||||||
echo "Your OS is Alpine Linux"
|
|
||||||
elif [[ "${release}" == "opensuse-tumbleweed" ]]; then
|
|
||||||
echo "Your OS is OpenSUSE Tumbleweed"
|
|
||||||
elif [[ "${release}" == "openEuler" ]]; then
|
|
||||||
if [[ ${os_version} -lt 2203 ]]; then
|
|
||||||
echo -e "${red} Please use OpenEuler 22.03 or higher ${plain}\n" && exit 1
|
|
||||||
fi
|
|
||||||
elif [[ "${release}" == "centos" ]]; then
|
|
||||||
if [[ ${os_version} -lt 8 ]]; then
|
|
||||||
echo -e "${red} Please use CentOS 8 or higher ${plain}\n" && exit 1
|
|
||||||
fi
|
|
||||||
elif [[ "${release}" == "ubuntu" ]]; then
|
|
||||||
if [[ ${os_version} -lt 2204 ]]; then
|
|
||||||
echo -e "${red} Please use Ubuntu 22 or higher version!${plain}\n" && exit 1
|
|
||||||
fi
|
|
||||||
elif [[ "${release}" == "fedora" ]]; then
|
|
||||||
if [[ ${os_version} -lt 36 ]]; then
|
|
||||||
echo -e "${red} Please use Fedora 36 or higher version!${plain}\n" && exit 1
|
|
||||||
fi
|
|
||||||
elif [[ "${release}" == "amzn" ]]; then
|
|
||||||
if [[ ${os_version} != "2023" ]]; then
|
|
||||||
echo -e "${red} Please use Amazon Linux 2023!${plain}\n" && exit 1
|
|
||||||
fi
|
|
||||||
elif [[ "${release}" == "debian" ]]; then
|
|
||||||
if [[ ${os_version} -lt 12 ]]; then
|
|
||||||
echo -e "${red} Please use Debian 12 or higher ${plain}\n" && exit 1
|
|
||||||
fi
|
|
||||||
elif [[ "${release}" == "almalinux" ]]; then
|
|
||||||
if [[ ${os_version} -lt 95 ]]; then
|
|
||||||
echo -e "${red} Please use AlmaLinux 9.5 or higher ${plain}\n" && exit 1
|
|
||||||
fi
|
|
||||||
elif [[ "${release}" == "rocky" ]]; then
|
|
||||||
if [[ ${os_version} -lt 95 ]]; then
|
|
||||||
echo -e "${red} Please use Rocky Linux 9.5 or higher ${plain}\n" && exit 1
|
|
||||||
fi
|
|
||||||
elif [[ "${release}" == "ol" ]]; then
|
|
||||||
if [[ ${os_version} -lt 8 ]]; then
|
|
||||||
echo -e "${red} Please use Oracle Linux 8 or higher ${plain}\n" && exit 1
|
|
||||||
fi
|
|
||||||
elif [[ "${release}" == "virtuozzo" ]]; then
|
|
||||||
if [[ ${os_version} -lt 8 ]]; then
|
|
||||||
echo -e "${red} Please use Virtuozzo Linux 8 or higher ${plain}\n" && exit 1
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo -e "${red}Your operating system is not supported by this script.${plain}\n"
|
|
||||||
echo "Please ensure you are using one of the following supported operating systems:"
|
|
||||||
echo "- Ubuntu 22.04+"
|
|
||||||
echo "- Debian 12+"
|
|
||||||
echo "- CentOS 8+"
|
|
||||||
echo "- OpenEuler 22.03+"
|
|
||||||
echo "- Fedora 36+"
|
|
||||||
echo "- Arch Linux"
|
|
||||||
echo "- Parch Linux"
|
|
||||||
echo "- Manjaro"
|
|
||||||
echo "- Armbian"
|
|
||||||
echo "- AlmaLinux 9.5+"
|
|
||||||
echo "- Rocky Linux 9.5+"
|
|
||||||
echo "- Oracle Linux 8+"
|
|
||||||
echo "- OpenSUSE Tumbleweed"
|
|
||||||
echo "- Amazon Linux 2023"
|
|
||||||
echo "- Virtuozzo Linux 8+"
|
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
echo "GLIBC version: $glibc_version (meets requirement of 2.32+)"
|
||||||
|
}
|
||||||
|
check_glibc_version
|
||||||
|
|
||||||
install_base() {
|
install_base() {
|
||||||
case "${release}" in
|
case "${release}" in
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{{define "settings/panel/general"}}
|
{{define "settings/panel/general"}}
|
||||||
<a-collapse>
|
<a-collapse default-active-key="1">
|
||||||
<a-collapse-panel header='{{ i18n "pages.xray.generalConfigs"}}'>
|
<a-collapse-panel key="1" header='{{ i18n "pages.xray.generalConfigs"}}'>
|
||||||
<a-setting-list-item paddings="small">
|
<a-setting-list-item paddings="small">
|
||||||
<template #title>
|
<template #title>
|
||||||
{{ i18n "pages.settings.remarkModel"}}
|
{{ i18n "pages.settings.remarkModel"}}
|
||||||
|
@ -76,7 +76,7 @@
|
||||||
</template>
|
</template>
|
||||||
</a-setting-list-item>
|
</a-setting-list-item>
|
||||||
</a-collapse-panel>
|
</a-collapse-panel>
|
||||||
<a-collapse-panel header='{{ i18n "pages.settings.notifications" }}'>
|
<a-collapse-panel key="2" header='{{ i18n "pages.settings.notifications" }}'>
|
||||||
<a-setting-list-item paddings="small">
|
<a-setting-list-item paddings="small">
|
||||||
<template #title>{{ i18n "pages.settings.expireTimeDiff" }}</template>
|
<template #title>{{ i18n "pages.settings.expireTimeDiff" }}</template>
|
||||||
<template #description>{{ i18n "pages.settings.expireTimeDiffDesc" }}</template>
|
<template #description>{{ i18n "pages.settings.expireTimeDiffDesc" }}</template>
|
||||||
|
@ -92,7 +92,7 @@
|
||||||
</template>
|
</template>
|
||||||
</a-setting-list-item>
|
</a-setting-list-item>
|
||||||
</a-collapse-panel>
|
</a-collapse-panel>
|
||||||
<a-collapse-panel header='{{ i18n "pages.settings.certs" }}'>
|
<a-collapse-panel key="3" header='{{ i18n "pages.settings.certs" }}'>
|
||||||
<a-setting-list-item paddings="small">
|
<a-setting-list-item paddings="small">
|
||||||
<template #title>{{ i18n "pages.settings.publicKeyPath"}}</template>
|
<template #title>{{ i18n "pages.settings.publicKeyPath"}}</template>
|
||||||
<template #description>{{ i18n "pages.settings.publicKeyPathDesc"}}</template>
|
<template #description>{{ i18n "pages.settings.publicKeyPathDesc"}}</template>
|
||||||
|
@ -108,7 +108,7 @@
|
||||||
</template>
|
</template>
|
||||||
</a-setting-list-item>
|
</a-setting-list-item>
|
||||||
</a-collapse-panel>
|
</a-collapse-panel>
|
||||||
<a-collapse-panel header='{{ i18n "pages.settings.externalTraffic" }}'>
|
<a-collapse-panel key="4" header='{{ i18n "pages.settings.externalTraffic" }}'>
|
||||||
<a-setting-list-item paddings="small">
|
<a-setting-list-item paddings="small">
|
||||||
<template #title>{{ i18n "pages.settings.externalTrafficInformEnable"}}</template>
|
<template #title>{{ i18n "pages.settings.externalTrafficInformEnable"}}</template>
|
||||||
<template #description>{{ i18n "pages.settings.externalTrafficInformEnableDesc"}}</template>
|
<template #description>{{ i18n "pages.settings.externalTrafficInformEnableDesc"}}</template>
|
||||||
|
@ -125,7 +125,7 @@
|
||||||
</template>
|
</template>
|
||||||
</a-setting-list-item>
|
</a-setting-list-item>
|
||||||
</a-collapse-panel>
|
</a-collapse-panel>
|
||||||
<a-collapse-panel header='{{ i18n "pages.settings.dateAndTime" }}'>
|
<a-collapse-panel key="5" header='{{ i18n "pages.settings.dateAndTime" }}'>
|
||||||
<a-setting-list-item paddings="small">
|
<a-setting-list-item paddings="small">
|
||||||
<template #title>{{ i18n "pages.settings.timeZone"}}</template>
|
<template #title>{{ i18n "pages.settings.timeZone"}}</template>
|
||||||
<template #description>{{ i18n "pages.settings.timeZoneDesc"}}</template>
|
<template #description>{{ i18n "pages.settings.timeZoneDesc"}}</template>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{{define "settings/panel/security"}}
|
{{define "settings/panel/security"}}
|
||||||
<a-collapse>
|
<a-collapse default-active-key="1">
|
||||||
<a-collapse-panel header='{{ i18n "pages.settings.security.admin"}}'>
|
<a-collapse-panel key="1" header='{{ i18n "pages.settings.security.admin"}}'>
|
||||||
<a-setting-list-item paddings="small">
|
<a-setting-list-item paddings="small">
|
||||||
<template #title>{{ i18n "pages.settings.oldUsername"}}</template>
|
<template #title>{{ i18n "pages.settings.oldUsername"}}</template>
|
||||||
<template #control>
|
<template #control>
|
||||||
|
@ -31,7 +31,7 @@
|
||||||
</a-space>
|
</a-space>
|
||||||
</a-list-item>
|
</a-list-item>
|
||||||
</a-collapse-panel>
|
</a-collapse-panel>
|
||||||
<a-collapse-panel header='{{ i18n "pages.settings.security.secret"}}'>
|
<a-collapse-panel key="2" header='{{ i18n "pages.settings.security.secret"}}'>
|
||||||
<a-setting-list-item paddings="small">
|
<a-setting-list-item paddings="small">
|
||||||
<template #title>{{ i18n "pages.settings.security.loginSecurity" }}</template>
|
<template #title>{{ i18n "pages.settings.security.loginSecurity" }}</template>
|
||||||
<template #description>{{ i18n "pages.settings.security.loginSecurityDesc" }}</template>
|
<template #description>{{ i18n "pages.settings.security.loginSecurityDesc" }}</template>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{{define "settings/panel/subscription/general"}}
|
{{define "settings/panel/subscription/general"}}
|
||||||
<a-collapse>
|
<a-collapse default-active-key="1">
|
||||||
<a-collapse-panel header='{{ i18n "pages.xray.generalConfigs"}}'>
|
<a-collapse-panel key="1" header='{{ i18n "pages.xray.generalConfigs"}}'>
|
||||||
<a-setting-list-item paddings="small">
|
<a-setting-list-item paddings="small">
|
||||||
<template #title>{{ i18n "pages.settings.subEnable"}}</template>
|
<template #title>{{ i18n "pages.settings.subEnable"}}</template>
|
||||||
<template #description>{{ i18n "pages.settings.subEnableDesc"}}</template>
|
<template #description>{{ i18n "pages.settings.subEnableDesc"}}</template>
|
||||||
|
@ -53,7 +53,7 @@
|
||||||
</template>
|
</template>
|
||||||
</a-setting-list-item>
|
</a-setting-list-item>
|
||||||
</a-collapse-panel>
|
</a-collapse-panel>
|
||||||
<a-collapse-panel header='{{ i18n "pages.settings.information" }}'>
|
<a-collapse-panel key="2" header='{{ i18n "pages.settings.information" }}'>
|
||||||
<a-setting-list-item paddings="small">
|
<a-setting-list-item paddings="small">
|
||||||
<template #title>{{ i18n "pages.settings.subEncrypt"}}</template>
|
<template #title>{{ i18n "pages.settings.subEncrypt"}}</template>
|
||||||
<template #description>{{ i18n "pages.settings.subEncryptDesc"}}</template>
|
<template #description>{{ i18n "pages.settings.subEncryptDesc"}}</template>
|
||||||
|
@ -69,7 +69,7 @@
|
||||||
</template>
|
</template>
|
||||||
</a-setting-list-item>
|
</a-setting-list-item>
|
||||||
</a-collapse-panel>
|
</a-collapse-panel>
|
||||||
<a-collapse-panel header='{{ i18n "pages.settings.certs" }}'>
|
<a-collapse-panel key="3" header='{{ i18n "pages.settings.certs" }}'>
|
||||||
<a-setting-list-item paddings="small">
|
<a-setting-list-item paddings="small">
|
||||||
<template #title>{{ i18n "pages.settings.subCertPath"}}</template>
|
<template #title>{{ i18n "pages.settings.subCertPath"}}</template>
|
||||||
<template #description>{{ i18n "pages.settings.subCertPathDesc"}}</template>
|
<template #description>{{ i18n "pages.settings.subCertPathDesc"}}</template>
|
||||||
|
@ -85,7 +85,7 @@
|
||||||
</template>
|
</template>
|
||||||
</a-setting-list-item>
|
</a-setting-list-item>
|
||||||
</a-collapse-panel>
|
</a-collapse-panel>
|
||||||
<a-collapse-panel header='{{ i18n "pages.settings.intervals"}}'>
|
<a-collapse-panel key="4" header='{{ i18n "pages.settings.intervals"}}'>
|
||||||
<a-setting-list-item paddings="small">
|
<a-setting-list-item paddings="small">
|
||||||
<template #title>{{ i18n "pages.settings.subUpdates"}}</template>
|
<template #title>{{ i18n "pages.settings.subUpdates"}}</template>
|
||||||
<template #description>{{ i18n "pages.settings.subUpdatesDesc"}}</template>
|
<template #description>{{ i18n "pages.settings.subUpdatesDesc"}}</template>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{{define "settings/panel/subscription/json"}}
|
{{define "settings/panel/subscription/json"}}
|
||||||
<a-collapse>
|
<a-collapse default-active-key="1">
|
||||||
<a-collapse-panel header='{{ i18n "pages.xray.generalConfigs"}}'>
|
<a-collapse-panel key="1" header='{{ i18n "pages.xray.generalConfigs"}}'>
|
||||||
<a-setting-list-item paddings="small">
|
<a-setting-list-item paddings="small">
|
||||||
<template #title>{{ i18n "pages.settings.subPath"}}</template>
|
<template #title>{{ i18n "pages.settings.subPath"}}</template>
|
||||||
<template #description>{{ i18n "pages.settings.subPathDesc"}}</template>
|
<template #description>{{ i18n "pages.settings.subPathDesc"}}</template>
|
||||||
|
@ -17,7 +17,7 @@
|
||||||
</template>
|
</template>
|
||||||
</a-setting-list-item>
|
</a-setting-list-item>
|
||||||
</a-collapse-panel>
|
</a-collapse-panel>
|
||||||
<a-collapse-panel header='{{ i18n "pages.settings.fragment"}}'>
|
<a-collapse-panel key="2" header='{{ i18n "pages.settings.fragment"}}'>
|
||||||
<a-setting-list-item paddings="small">
|
<a-setting-list-item paddings="small">
|
||||||
<template #title>{{ i18n "pages.settings.fragment"}}</template>
|
<template #title>{{ i18n "pages.settings.fragment"}}</template>
|
||||||
<template #description>{{ i18n "pages.settings.fragmentDesc"}}</template>
|
<template #description>{{ i18n "pages.settings.fragmentDesc"}}</template>
|
||||||
|
@ -51,7 +51,7 @@
|
||||||
</a-collapse>
|
</a-collapse>
|
||||||
</a-list-item>
|
</a-list-item>
|
||||||
</a-collapse-panel>
|
</a-collapse-panel>
|
||||||
<a-collapse-panel header="Noises">
|
<a-collapse-panel key="3" header="Noises">
|
||||||
<a-setting-list-item paddings="small">
|
<a-setting-list-item paddings="small">
|
||||||
<template #title>Noises</template>
|
<template #title>Noises</template>
|
||||||
<template #description>{{ i18n "pages.settings.noisesDesc"}}</template>
|
<template #description>{{ i18n "pages.settings.noisesDesc"}}</template>
|
||||||
|
@ -99,7 +99,7 @@
|
||||||
<a-button v-if="noises" type="primary" @click="addNoise" style="margin-top: 10px">Add Noise</a-button>
|
<a-button v-if="noises" type="primary" @click="addNoise" style="margin-top: 10px">Add Noise</a-button>
|
||||||
</a-list-item>
|
</a-list-item>
|
||||||
</a-collapse-panel>
|
</a-collapse-panel>
|
||||||
<a-collapse-panel header='{{ i18n "pages.settings.mux"}}'>
|
<a-collapse-panel key="4" header='{{ i18n "pages.settings.mux"}}'>
|
||||||
<a-setting-list-item paddings="small">
|
<a-setting-list-item paddings="small">
|
||||||
<template #title>{{ i18n "pages.settings.mux"}}</template>
|
<template #title>{{ i18n "pages.settings.mux"}}</template>
|
||||||
<template #description>{{ i18n "pages.settings.muxDesc"}}</template>
|
<template #description>{{ i18n "pages.settings.muxDesc"}}</template>
|
||||||
|
@ -139,7 +139,7 @@
|
||||||
</a-collapse>
|
</a-collapse>
|
||||||
</a-list-item>
|
</a-list-item>
|
||||||
</a-collapse-panel>
|
</a-collapse-panel>
|
||||||
<a-collapse-panel header='{{ i18n "pages.settings.direct" }}'>
|
<a-collapse-panel key="5" header='{{ i18n "pages.settings.direct" }}'>
|
||||||
<a-setting-list-item paddings="small">
|
<a-setting-list-item paddings="small">
|
||||||
<template #title>{{ i18n "pages.settings.direct"}}</template>
|
<template #title>{{ i18n "pages.settings.direct"}}</template>
|
||||||
<template #description>{{ i18n "pages.settings.directDesc"}}</template>
|
<template #description>{{ i18n "pages.settings.directDesc"}}</template>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{{define "settings/panel/telegram"}}
|
{{define "settings/panel/telegram"}}
|
||||||
<a-collapse>
|
<a-collapse default-active-key="1">
|
||||||
<a-collapse-panel header='{{ i18n "pages.xray.generalConfigs"}}'>
|
<a-collapse-panel key="1" header='{{ i18n "pages.xray.generalConfigs"}}'>
|
||||||
<a-setting-list-item paddings="small">
|
<a-setting-list-item paddings="small">
|
||||||
<template #title>{{ i18n "pages.settings.telegramBotEnable" }}</template>
|
<template #title>{{ i18n "pages.settings.telegramBotEnable" }}</template>
|
||||||
<template #description>{{ i18n "pages.settings.telegramBotEnableDesc" }}</template>
|
<template #description>{{ i18n "pages.settings.telegramBotEnableDesc" }}</template>
|
||||||
|
@ -35,7 +35,7 @@
|
||||||
</template>
|
</template>
|
||||||
</a-setting-list-item>
|
</a-setting-list-item>
|
||||||
</a-collapse-panel>
|
</a-collapse-panel>
|
||||||
<a-collapse-panel header='{{ i18n "pages.settings.notifications" }}'>
|
<a-collapse-panel key="2" header='{{ i18n "pages.settings.notifications" }}'>
|
||||||
<a-setting-list-item paddings="small">
|
<a-setting-list-item paddings="small">
|
||||||
<template #title>{{ i18n "pages.settings.telegramNotifyTime"}}</template>
|
<template #title>{{ i18n "pages.settings.telegramNotifyTime"}}</template>
|
||||||
<template #description>{{ i18n "pages.settings.telegramNotifyTimeDesc"}}</template>
|
<template #description>{{ i18n "pages.settings.telegramNotifyTimeDesc"}}</template>
|
||||||
|
@ -65,7 +65,7 @@
|
||||||
</template>
|
</template>
|
||||||
</a-setting-list-item>
|
</a-setting-list-item>
|
||||||
</a-collapse-panel>
|
</a-collapse-panel>
|
||||||
<a-collapse-panel header='{{ i18n "pages.settings.proxyAndServer" }}'>
|
<a-collapse-panel key="3" header='{{ i18n "pages.settings.proxyAndServer" }}'>
|
||||||
<a-setting-list-item paddings="small">
|
<a-setting-list-item paddings="small">
|
||||||
<template #title>{{ i18n "pages.settings.telegramProxy"}}</template>
|
<template #title>{{ i18n "pages.settings.telegramProxy"}}</template>
|
||||||
<template #description>{{ i18n "pages.settings.telegramProxyDesc"}}</template>
|
<template #description>{{ i18n "pages.settings.telegramProxyDesc"}}</template>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{{define "settings/xray/basics"}}
|
{{define "settings/xray/basics"}}
|
||||||
<a-collapse>
|
<a-collapse default-active-key="1">
|
||||||
<a-collapse-panel header='{{ i18n "pages.xray.generalConfigs"}}'>
|
<a-collapse-panel key="1" header='{{ i18n "pages.xray.generalConfigs"}}'>
|
||||||
<a-row :xs="24" :sm="24" :lg="12">
|
<a-row :xs="24" :sm="24" :lg="12">
|
||||||
<a-alert type="warning" style="text-align: center;">
|
<a-alert type="warning" style="text-align: center;">
|
||||||
<template slot="message">
|
<template slot="message">
|
||||||
|
@ -34,7 +34,7 @@
|
||||||
</template>
|
</template>
|
||||||
</a-setting-list-item>
|
</a-setting-list-item>
|
||||||
</a-collapse-panel>
|
</a-collapse-panel>
|
||||||
<a-collapse-panel header='{{ i18n "pages.xray.statistics" }}'>
|
<a-collapse-panel key="2" header='{{ i18n "pages.xray.statistics" }}'>
|
||||||
<a-setting-list-item paddings="small">
|
<a-setting-list-item paddings="small">
|
||||||
<template #title>{{ i18n "pages.xray.statsInboundUplink" }}</template>
|
<template #title>{{ i18n "pages.xray.statsInboundUplink" }}</template>
|
||||||
<template #description>{{ i18n "pages.xray.statsInboundUplinkDesc" }}</template>
|
<template #description>{{ i18n "pages.xray.statsInboundUplinkDesc" }}</template>
|
||||||
|
@ -64,7 +64,7 @@
|
||||||
</template>
|
</template>
|
||||||
</a-setting-list-item>
|
</a-setting-list-item>
|
||||||
</a-collapse-panel>
|
</a-collapse-panel>
|
||||||
<a-collapse-panel header='{{ i18n "pages.xray.logConfigs" }}'>
|
<a-collapse-panel key="3" header='{{ i18n "pages.xray.logConfigs" }}'>
|
||||||
<a-row :xs="24" :sm="24" :lg="12">
|
<a-row :xs="24" :sm="24" :lg="12">
|
||||||
<a-alert type="warning" style="text-align: center;">
|
<a-alert type="warning" style="text-align: center;">
|
||||||
<template slot="message">
|
<template slot="message">
|
||||||
|
@ -135,7 +135,7 @@
|
||||||
</template>
|
</template>
|
||||||
</a-setting-list-item>
|
</a-setting-list-item>
|
||||||
</a-collapse-panel>
|
</a-collapse-panel>
|
||||||
<a-collapse-panel header='{{ i18n "pages.xray.blockConfigs"}}'>
|
<a-collapse-panel key="4" header='{{ i18n "pages.xray.blockConfigs"}}'>
|
||||||
<a-row :xs="24" :sm="24" :lg="12">
|
<a-row :xs="24" :sm="24" :lg="12">
|
||||||
<a-alert type="warning" style="text-align: center;">
|
<a-alert type="warning" style="text-align: center;">
|
||||||
<template slot="message">
|
<template slot="message">
|
||||||
|
@ -159,7 +159,7 @@
|
||||||
</template>
|
</template>
|
||||||
</a-setting-list-item>
|
</a-setting-list-item>
|
||||||
</a-collapse-panel>
|
</a-collapse-panel>
|
||||||
<a-collapse-panel header='{{ i18n "pages.xray.basicRouting"}}'>
|
<a-collapse-panel key="5" header='{{ i18n "pages.xray.basicRouting"}}'>
|
||||||
<a-row :xs="24" :sm="24" :lg="12">
|
<a-row :xs="24" :sm="24" :lg="12">
|
||||||
<a-alert type="warning" style="text-align: center;">
|
<a-alert type="warning" style="text-align: center;">
|
||||||
<template slot="message">
|
<template slot="message">
|
||||||
|
@ -264,7 +264,7 @@
|
||||||
</template>
|
</template>
|
||||||
</a-setting-list-item>
|
</a-setting-list-item>
|
||||||
</a-collapse-panel>
|
</a-collapse-panel>
|
||||||
<a-collapse-panel header='{{ i18n "pages.settings.resetDefaultConfig"}}'>
|
<a-collapse-panel key="6" header='{{ i18n "pages.settings.resetDefaultConfig"}}'>
|
||||||
<a-space direction="horizontal" style="padding: 0 20px">
|
<a-space direction="horizontal" style="padding: 0 20px">
|
||||||
<a-button type="danger" @click="resetXrayConfigToDefault">
|
<a-button type="danger" @click="resetXrayConfigToDefault">
|
||||||
<span>{{ i18n "pages.settings.resetDefaultConfig" }}</span>
|
<span>{{ i18n "pages.settings.resetDefaultConfig" }}</span>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{{define "settings/xray/dns"}}
|
{{define "settings/xray/dns"}}
|
||||||
<a-collapse>
|
<a-collapse default-active-key="1">
|
||||||
<a-collapse-panel header='{{ i18n "pages.xray.generalConfigs"}}'>
|
<a-collapse-panel key="1" header='{{ i18n "pages.xray.generalConfigs"}}'>
|
||||||
<a-setting-list-item paddings="small">
|
<a-setting-list-item paddings="small">
|
||||||
<template #title>{{ i18n "pages.xray.dns.enable" }}</template>
|
<template #title>{{ i18n "pages.xray.dns.enable" }}</template>
|
||||||
<template #description>{{ i18n "pages.xray.dns.enableDesc" }}</template>
|
<template #description>{{ i18n "pages.xray.dns.enableDesc" }}</template>
|
||||||
|
@ -59,7 +59,7 @@
|
||||||
</template>
|
</template>
|
||||||
</a-collapse-panel>
|
</a-collapse-panel>
|
||||||
<template v-if="enableDNS">
|
<template v-if="enableDNS">
|
||||||
<a-collapse-panel header='DNS'>
|
<a-collapse-panel key="2" header='DNS'>
|
||||||
<template v-if="dnsServers.length > 0">
|
<template v-if="dnsServers.length > 0">
|
||||||
<a-space direction="vertical" size="middle">
|
<a-space direction="vertical" size="middle">
|
||||||
<a-button type="primary" icon="plus" @click="addDNSServer()">
|
<a-button type="primary" icon="plus" @click="addDNSServer()">
|
||||||
|
@ -107,7 +107,7 @@
|
||||||
</a-empty>
|
</a-empty>
|
||||||
</template>
|
</template>
|
||||||
</a-collapse-panel>
|
</a-collapse-panel>
|
||||||
<a-collapse-panel header='Fake DNS'>
|
<a-collapse-panel key="3" header='Fake DNS'>
|
||||||
<template v-if="fakeDns && fakeDns.length > 0">
|
<template v-if="fakeDns && fakeDns.length > 0">
|
||||||
<a-space direction="vertical" size="middle">
|
<a-space direction="vertical" size="middle">
|
||||||
<a-button type="primary" icon="plus" @click="addFakedns()">{{ i18n "pages.xray.fakedns.add"
|
<a-button type="primary" icon="plus" @click="addFakedns()">{{ i18n "pages.xray.fakedns.add"
|
||||||
|
|
87
x-ui.sh
87
x-ui.sh
|
@ -33,85 +33,24 @@ else
|
||||||
echo "Failed to check the system OS, please contact the author!" >&2
|
echo "Failed to check the system OS, please contact the author!" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "The OS release is: $release"
|
echo "The OS release is: $release"
|
||||||
|
|
||||||
|
check_glibc_version() {
|
||||||
|
glibc_version=$(ldd --version | head -n1 | awk '{print $NF}')
|
||||||
|
|
||||||
|
required_version="2.32"
|
||||||
|
if [[ "$(printf '%s\n' "$required_version" "$glibc_version" | sort -V | head -n1)" != "$required_version" ]]; then
|
||||||
|
echo -e "${red}GLIBC version $glibc_version is too old! Required: 2.32 or higher${plain}"
|
||||||
|
echo "Please upgrade to a newer version of your operating system to get a higher GLIBC version."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
echo "GLIBC version: $glibc_version (meets requirement of 2.32+)"
|
||||||
|
}
|
||||||
|
check_glibc_version
|
||||||
|
|
||||||
os_version=""
|
os_version=""
|
||||||
os_version=$(grep "^VERSION_ID" /etc/os-release | cut -d '=' -f2 | tr -d '"' | tr -d '.')
|
os_version=$(grep "^VERSION_ID" /etc/os-release | cut -d '=' -f2 | tr -d '"' | tr -d '.')
|
||||||
|
|
||||||
if [[ "${release}" == "arch" ]]; then
|
|
||||||
echo "Your OS is Arch Linux"
|
|
||||||
elif [[ "${release}" == "parch" ]]; then
|
|
||||||
echo "Your OS is Parch Linux"
|
|
||||||
elif [[ "${release}" == "manjaro" ]]; then
|
|
||||||
echo "Your OS is Manjaro"
|
|
||||||
elif [[ "${release}" == "armbian" ]]; then
|
|
||||||
echo "Your OS is Armbian"
|
|
||||||
elif [[ "${release}" == "alpine" ]]; then
|
|
||||||
echo "Your OS is Alpine Linux"
|
|
||||||
elif [[ "${release}" == "opensuse-tumbleweed" ]]; then
|
|
||||||
echo "Your OS is OpenSUSE Tumbleweed"
|
|
||||||
elif [[ "${release}" == "openEuler" ]]; then
|
|
||||||
if [[ ${os_version} -lt 2203 ]]; then
|
|
||||||
echo -e "${red} Please use OpenEuler 22.03 or higher ${plain}\n" && exit 1
|
|
||||||
fi
|
|
||||||
elif [[ "${release}" == "centos" ]]; then
|
|
||||||
if [[ ${os_version} -lt 8 ]]; then
|
|
||||||
echo -e "${red} Please use CentOS 8 or higher ${plain}\n" && exit 1
|
|
||||||
fi
|
|
||||||
elif [[ "${release}" == "ubuntu" ]]; then
|
|
||||||
if [[ ${os_version} -lt 2204 ]]; then
|
|
||||||
echo -e "${red} Please use Ubuntu 22 or higher version!${plain}\n" && exit 1
|
|
||||||
fi
|
|
||||||
elif [[ "${release}" == "fedora" ]]; then
|
|
||||||
if [[ ${os_version} -lt 36 ]]; then
|
|
||||||
echo -e "${red} Please use Fedora 36 or higher version!${plain}\n" && exit 1
|
|
||||||
fi
|
|
||||||
elif [[ "${release}" == "amzn" ]]; then
|
|
||||||
if [[ ${os_version} != "2023" ]]; then
|
|
||||||
echo -e "${red} Please use Amazon Linux 2023!${plain}\n" && exit 1
|
|
||||||
fi
|
|
||||||
elif [[ "${release}" == "debian" ]]; then
|
|
||||||
if [[ ${os_version} -lt 12 ]]; then
|
|
||||||
echo -e "${red} Please use Debian 12 or higher ${plain}\n" && exit 1
|
|
||||||
fi
|
|
||||||
elif [[ "${release}" == "almalinux" ]]; then
|
|
||||||
if [[ ${os_version} -lt 95 ]]; then
|
|
||||||
echo -e "${red} Please use AlmaLinux 9.5 or higher ${plain}\n" && exit 1
|
|
||||||
fi
|
|
||||||
elif [[ "${release}" == "rocky" ]]; then
|
|
||||||
if [[ ${os_version} -lt 95 ]]; then
|
|
||||||
echo -e "${red} Please use Rocky Linux 9.5 or higher ${plain}\n" && exit 1
|
|
||||||
fi
|
|
||||||
elif [[ "${release}" == "ol" ]]; then
|
|
||||||
if [[ ${os_version} -lt 8 ]]; then
|
|
||||||
echo -e "${red} Please use Oracle Linux 8 or higher ${plain}\n" && exit 1
|
|
||||||
fi
|
|
||||||
elif [[ "${release}" == "virtuozzo" ]]; then
|
|
||||||
if [[ ${os_version} -lt 8 ]]; then
|
|
||||||
echo -e "${red} Please use Virtuozzo Linux 8 or higher ${plain}\n" && exit 1
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo -e "${red}Your operating system is not supported by this script.${plain}\n"
|
|
||||||
echo "Please ensure you are using one of the following supported operating systems:"
|
|
||||||
echo "- Ubuntu 22.04+"
|
|
||||||
echo "- Debian 12+"
|
|
||||||
echo "- CentOS 8+"
|
|
||||||
echo "- OpenEuler 22.03+"
|
|
||||||
echo "- Fedora 36+"
|
|
||||||
echo "- Arch Linux"
|
|
||||||
echo "- Parch Linux"
|
|
||||||
echo "- Manjaro"
|
|
||||||
echo "- Armbian"
|
|
||||||
echo "- AlmaLinux 9.5+"
|
|
||||||
echo "- Rocky Linux 9.5+"
|
|
||||||
echo "- Oracle Linux 8+"
|
|
||||||
echo "- OpenSUSE Tumbleweed"
|
|
||||||
echo "- Amazon Linux 2023"
|
|
||||||
echo "- Virtuozzo Linux 8+"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Declare Variables
|
# Declare Variables
|
||||||
log_folder="${XUI_LOG_FOLDER:=/var/log}"
|
log_folder="${XUI_LOG_FOLDER:=/var/log}"
|
||||||
iplimit_log_path="${log_folder}/3xipl.log"
|
iplimit_log_path="${log_folder}/3xipl.log"
|
||||||
|
|
Loading…
Reference in a new issue