From ee0e3093bad498b0fef77f8e314d1a9d6b9b7376 Mon Sep 17 00:00:00 2001 From: mhsanaei Date: Thu, 25 Sep 2025 14:34:12 +0200 Subject: [PATCH 1/3] Add IPv4 for wget in install --- install.sh | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/install.sh b/install.sh index 2c1a6822..58d5aa0b 100644 --- a/install.sh +++ b/install.sh @@ -149,11 +149,15 @@ install_x-ui() { if [ $# == 0 ]; then tag_version=$(curl -Ls "https://api.github.com/repos/MHSanaei/3x-ui/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/') if [[ ! -n "$tag_version" ]]; then - echo -e "${red}Failed to fetch x-ui version, it may be due to GitHub API restrictions, please try it later${plain}" - exit 1 + echo -e "${yellow}Trying to fetch version with IPv4...${plain}" + tag_version=$(curl -4 -Ls "https://api.github.com/repos/MHSanaei/3x-ui/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/') + if [[ ! -n "$tag_version" ]]; then + echo -e "${red}Failed to fetch x-ui version, it may be due to GitHub API restrictions, please try it later${plain}" + exit 1 + fi fi echo -e "Got x-ui latest version: ${tag_version}, beginning the installation..." - wget -N -O /usr/local/x-ui-linux-$(arch).tar.gz https://github.com/MHSanaei/3x-ui/releases/download/${tag_version}/x-ui-linux-$(arch).tar.gz + wget --inet4-only -N -O /usr/local/x-ui-linux-$(arch).tar.gz https://github.com/MHSanaei/3x-ui/releases/download/${tag_version}/x-ui-linux-$(arch).tar.gz if [[ $? -ne 0 ]]; then echo -e "${red}Downloading x-ui failed, please be sure that your server can access GitHub ${plain}" exit 1 @@ -170,13 +174,17 @@ install_x-ui() { url="https://github.com/MHSanaei/3x-ui/releases/download/${tag_version}/x-ui-linux-$(arch).tar.gz" echo -e "Beginning to install x-ui $1" - wget -N -O /usr/local/x-ui-linux-$(arch).tar.gz ${url} + wget --inet4-only -N -O /usr/local/x-ui-linux-$(arch).tar.gz ${url} if [[ $? -ne 0 ]]; then echo -e "${red}Download x-ui $1 failed, please check if the version exists ${plain}" exit 1 fi fi - wget -O /usr/bin/x-ui-temp https://raw.githubusercontent.com/MHSanaei/3x-ui/main/x-ui.sh + wget --inet4-only -O /usr/bin/x-ui-temp https://raw.githubusercontent.com/MHSanaei/3x-ui/main/x-ui.sh + if [[ $? -ne 0 ]]; then + echo -e "${red}Failed to download x-ui.sh${plain}" + exit 1 + fi # Stop x-ui service and remove old resources if [[ -e /usr/local/x-ui/ ]]; then @@ -209,7 +217,11 @@ install_x-ui() { config_after_install if [[ $release == "alpine" ]]; then - wget -O /etc/init.d/x-ui https://raw.githubusercontent.com/MHSanaei/3x-ui/main/x-ui.rc + wget --inet4-only -O /etc/init.d/x-ui https://raw.githubusercontent.com/MHSanaei/3x-ui/main/x-ui.rc + if [[ $? -ne 0 ]]; then + echo -e "${red}Failed to download x-ui.rc${plain}" + exit 1 + fi chmod +x /etc/init.d/x-ui rc-update add x-ui rc-service x-ui start From d69af328dcd39f95470e920df64b59476cbd2df5 Mon Sep 17 00:00:00 2001 From: Tara Rostami <132676256+TaraRostami@users.noreply.github.com> Date: Thu, 25 Sep 2025 08:16:50 -0500 Subject: [PATCH 2/3] fix: login animation (#3559) * Add IPv4 for wget in install * fix: login animation --- web/html/login.html | 87 ++++++++++++++++++--------------------------- 1 file changed, 34 insertions(+), 53 deletions(-) diff --git a/web/html/login.html b/web/html/login.html index a09ec915..6d98e6b1 100644 --- a/web/html/login.html +++ b/web/html/login.html @@ -108,17 +108,11 @@ el: '#app', data: { themeSwitcher, - loadingStates: { - fetched: false, - spinning: false - }, - user: { - username: "", - password: "", - twoFactorCode: "" - }, + loadingStates: { fetched: false, spinning: false }, + user: { username: "", password: "", twoFactorCode: "" }, twoFactorEnable: false, - lang: "" + lang: "", + animationStarted: false }, async mounted() { this.lang = LanguageManager.getLanguage(); @@ -127,65 +121,52 @@ methods: { async login() { this.loadingStates.spinning = true; - const msg = await HttpUtil.post('/login', this.user); - if (msg.success) { location.href = basePath + 'panel/'; } - this.loadingStates.spinning = false; }, async getTwoFactorEnable() { const msg = await HttpUtil.post('/getTwoFactorEnable'); - if (msg.success) { this.twoFactorEnable = msg.obj; this.loadingStates.fetched = true; - + this.$nextTick(() => { + if (!this.animationStarted) { + this.animationStarted = true; + this.initHeadline(); + } + }); return msg.obj; } }, + initHeadline() { + const animationDelay = 2000; + const headlines = this.$el.querySelectorAll('.headline'); + headlines.forEach((headline) => { + const first = headline.querySelector('.is-visible'); + if (!first) return; + setTimeout(() => this.hideWord(first, animationDelay), animationDelay); + }); + }, + hideWord(word, delay) { + const nextWord = this.takeNext(word); + this.switchWord(word, nextWord); + setTimeout(() => this.hideWord(nextWord, delay), delay); + }, + takeNext(word) { + return word.nextElementSibling || word.parentElement.firstElementChild; + }, + switchWord(oldWord, newWord) { + oldWord.classList.remove('is-visible'); + oldWord.classList.add('is-hidden'); + newWord.classList.remove('is-hidden'); + newWord.classList.add('is-visible'); + } }, }); - document.addEventListener("DOMContentLoaded", function () { - var animationDelay = 2000; - initHeadline(); - - function initHeadline() { - animateHeadline(document.querySelectorAll('.headline')); - } - - function animateHeadline(headlines) { - var duration = animationDelay; - headlines.forEach(function (headline) { - setTimeout(function () { - hideWord(headline.querySelector('.is-visible')); - }, duration); - }); - } - - function hideWord(word) { - var nextWord = takeNext(word); - switchWord(word, nextWord); - setTimeout(function () { - hideWord(nextWord); - }, animationDelay); - } - - function takeNext(word) { - return word.nextElementSibling ? word.nextElementSibling : word.parentElement.firstElementChild; - } - - function switchWord(oldWord, newWord) { - oldWord.classList.remove('is-visible'); - oldWord.classList.add('is-hidden'); - newWord.classList.remove('is-hidden'); - newWord.classList.add('is-visible'); - } - }); - const pm_input_selector = 'input.ant-input, textarea.ant-input'; const pm_strip_props = [ 'background', @@ -261,4 +242,4 @@ pm_init(); } -{{ template "page/body_end" .}} \ No newline at end of file +{{ template "page/body_end" .}} From 172f2ddaa78cc850d4eefcf4fe3df0f8c79f16a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=BC=D0=B8=D1=82=D1=80=D0=B8=D0=B9=20=D0=9E=D0=BB?= =?UTF-8?q?=D0=B5=D0=B3=D0=BE=D0=B2=D0=B8=D1=87=20=D0=A1=D0=B0=D0=B5=D0=BD?= =?UTF-8?q?=D0=BA=D0=BE?= Date: Thu, 25 Sep 2025 16:21:40 +0300 Subject: [PATCH 3/3] fix russian translate in tgbot (#3557) --- web/translation/translate.ru_RU.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/translation/translate.ru_RU.toml b/web/translation/translate.ru_RU.toml index 49ea872c..c75ae649 100644 --- a/web/translation/translate.ru_RU.toml +++ b/web/translation/translate.ru_RU.toml @@ -648,7 +648,7 @@ "ips" = "🔢 IP-адреса:\r\n{{ .IPs }}\r\n" "serverUpTime" = "⏳ Время работы сервера: {{ .UpTime }} {{ .Unit }}\r\n" "serverLoad" = "📈 Нагрузка сервера: {{ .Load1 }}, {{ .Load2 }}, {{ .Load3 }}\r\n" -"serverMemory" = "📋 Диск сервера: {{ .Current }}/{{ .Total }}\r\n" +"serverMemory" = "📋 ОЗУ сервера: {{ .Current }}/{{ .Total }}\r\n" "tcpCount" = "🔹 Количество TCP-соединений: {{ .Count }}\r\n" "udpCount" = "🔸 Количество UDP-соединений: {{ .Count }}\r\n" "traffic" = "🚦 Трафик: {{ .Total }} (↑{{ .Upload }},↓{{ .Download }})\r\n"