diff options
| author | MHSanaei <ho3ein.sanaei@gmail.com> | 2024-02-21 11:36:49 +0300 |
|---|---|---|
| committer | MHSanaei <ho3ein.sanaei@gmail.com> | 2024-02-21 11:36:49 +0300 |
| commit | f3eb4f055db80372298d60c073870a5af1431785 (patch) | |
| tree | b7314d9dda7bc6ec4fee55ac9e72945b195d00a7 /web | |
| parent | c61575ac9aca81b9b17fbcdb9f8a66195466abab (diff) | |
SSL Security Alert
Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
Diffstat (limited to 'web')
| -rw-r--r-- | web/html/xui/inbounds.html | 13 | ||||
| -rw-r--r-- | web/html/xui/index.html | 20 | ||||
| -rw-r--r-- | web/html/xui/settings.html | 16 | ||||
| -rw-r--r-- | web/html/xui/xray.html | 13 | ||||
| -rw-r--r-- | web/translation/translate.en_US.toml | 2 | ||||
| -rw-r--r-- | web/translation/translate.es_ES.toml | 2 | ||||
| -rw-r--r-- | web/translation/translate.fa_IR.toml | 2 | ||||
| -rw-r--r-- | web/translation/translate.id_ID.toml | 2 | ||||
| -rw-r--r-- | web/translation/translate.ru_RU.toml | 2 | ||||
| -rw-r--r-- | web/translation/translate.vi_VN.toml | 2 | ||||
| -rw-r--r-- | web/translation/translate.zh_Hans.toml | 2 |
11 files changed, 69 insertions, 7 deletions
diff --git a/web/html/xui/inbounds.html b/web/html/xui/inbounds.html index b0426e4f..f1f14275 100644 --- a/web/html/xui/inbounds.html +++ b/web/html/xui/inbounds.html @@ -56,6 +56,15 @@ <a-layout-content> <a-spin :spinning="spinning" :delay="500" tip='{{ i18n "loading"}}'> <transition name="list" appear> + <a-alert type="error" v-if="showAlert" style="margin-bottom: 10px" + message='{{ i18n "secAlertTitle" }}' + color="red" + description='{{ i18n "secAlertSsl" }}' + show-icon closable + > + </a-alert> + </transition> + <transition name="list" appear> <a-tag v-if="false" color="red" style="margin-bottom: 10px"> Please go to the panel settings as soon as possible to modify the username and password, otherwise there may be a risk of leaking account information </a-tag> @@ -572,6 +581,7 @@ remarkModel: '-ieo', datepicker: 'gregorian', tgBotEnable: false, + showAlert: false, pageSize: 0, isMobile: window.innerWidth <= 768, }, @@ -1319,6 +1329,9 @@ }, 500) }, mounted() { + if (window.location.protocol !== "https:") { + this.showAlert = true; + } window.addEventListener('resize', this.onResize); this.onResize(); this.loading(); diff --git a/web/html/xui/index.html b/web/html/xui/index.html index 30ca4490..1bc0dfa4 100644 --- a/web/html/xui/index.html +++ b/web/html/xui/index.html @@ -35,6 +35,15 @@ <a-layout-content> <a-spin :spinning="spinning" :delay="200" :tip="loadingTip"/> <transition name="list" appear> + <a-alert type="error" v-if="showAlert" style="margin-bottom: 10px" + message='{{ i18n "secAlertTitle" }}' + color="red" + description='{{ i18n "secAlertSsl" }}' + show-icon closable + > + </a-alert> + </transition> + <transition name="list" appear> <a-row> <a-card hoverable> <a-row> @@ -532,6 +541,7 @@ backupModal, spinning: false, loadingTip: '{{ i18n "loading"}}', + showAlert: false, }, methods: { loading(spinning, tip = '{{ i18n "loading"}}') { @@ -655,14 +665,14 @@ }, }, async mounted() { - let retries = 0; - while (retries < 5) { + if (window.location.protocol !== "https:") { + this.showAlert = true; + } + while (true) { try { await this.getStatus(); - retries = 0; } catch (e) { - console.error("Error occurred while fetching status:", e); - retries++; + console.error(e); } await PromiseUtil.sleep(2000); } diff --git a/web/html/xui/settings.html b/web/html/xui/settings.html index 533553c5..a7c72f73 100644 --- a/web/html/xui/settings.html +++ b/web/html/xui/settings.html @@ -75,6 +75,15 @@ <a-layout id="content-layout"> <a-layout-content> <a-spin :spinning="spinning" :delay="500" tip='{{ i18n "loading"}}'> + <transition name="list" appear> + <a-alert type="error" v-if="showAlert" style="margin-bottom: 10px" + message='{{ i18n "secAlertTitle" }}' + color="red" + description='{{ i18n "secAlertSsl" }}' + show-icon closable + > + </a-alert> + </transition> <a-space direction="vertical"> <a-card hoverable style="margin-bottom: .5rem; overflow-x: hidden;"> <a-row style="display: flex; flex-wrap: wrap; align-items: center;"> @@ -444,12 +453,15 @@ }, }, async mounted() { + if (window.location.protocol !== "https:") { + this.showAlert = true; + } await this.getAllSetting(); while (true) { - await PromiseUtil.sleep(600); + await PromiseUtil.sleep(1000); this.saveBtnDisable = this.oldAllSetting.equals(this.allSetting); } - }, + } }); </script> </body> diff --git a/web/html/xui/xray.html b/web/html/xui/xray.html index 0ceafeab..6f21d005 100644 --- a/web/html/xui/xray.html +++ b/web/html/xui/xray.html @@ -63,6 +63,15 @@ <a-layout id="content-layout"> <a-layout-content> <a-spin :spinning="spinning" :delay="500" tip='{{ i18n "loading"}}'> + <transition name="list" appear> + <a-alert type="error" v-if="showAlert" style="margin-bottom: 10px" + message='{{ i18n "secAlertTitle" }}' + color="red" + description='{{ i18n "secAlertSsl" }}' + show-icon closable + > + </a-alert> + </transition> <a-space direction="vertical"> <a-card hoverable style="margin-bottom: .5rem;"> <a-row> @@ -664,6 +673,7 @@ saveBtnDisable: true, refreshing: false, restartResult: '', + showAlert: false, isMobile: window.innerWidth <= 768, advSettings: 'xraySetting', cm: null, @@ -1293,6 +1303,9 @@ } }, async mounted() { + if (window.location.protocol !== "https:") { + this.showAlert = true; + } await this.getXraySetting(); await this.getXrayResult(); await this.getOutboundsTraffic(); diff --git a/web/translation/translate.en_US.toml b/web/translation/translate.en_US.toml index 354cda48..4c642396 100644 --- a/web/translation/translate.en_US.toml +++ b/web/translation/translate.en_US.toml @@ -52,6 +52,8 @@ "secretToken" = "Secret Token" "remained" = "Remained" "security" = "Security" +"secAlertTitle" = "Security Alert" +"secAlertSsl" = "This connection is not secure. Please avoid entering sensitive information until TLS is activated for data protection." [menu] "dashboard" = "Overview" diff --git a/web/translation/translate.es_ES.toml b/web/translation/translate.es_ES.toml index 5fb3eb71..23667a2d 100644 --- a/web/translation/translate.es_ES.toml +++ b/web/translation/translate.es_ES.toml @@ -52,6 +52,8 @@ "secretToken" = "Token Secreto" "remained" = "Restante" "security" = "Seguridad" +"secAlertTitle" = "Alerta de seguridad" +"secAlertSsl" = "Esta conexión no es segura. Evite ingresar información confidencial hasta que TLS esté activado para la protección de datos." [menu] "dashboard" = "Estado del Sistema" diff --git a/web/translation/translate.fa_IR.toml b/web/translation/translate.fa_IR.toml index ca9241e0..7d2780d2 100644 --- a/web/translation/translate.fa_IR.toml +++ b/web/translation/translate.fa_IR.toml @@ -52,6 +52,8 @@ "secretToken" = "توکن امنیتی" "remained" = "باقیمانده" "security" = "امنیت" +"secAlertTitle" = "هشدارامنیتی" +"secAlertSsl" = "ایناتصالامن نیست. لطفا تازمانیکه تیالاس برای محافظت از دادهها فعال نشدهاست، از وارد کردن اطلاعات حساس خودداری کنید" [menu] "dashboard" = "نمای کلی" diff --git a/web/translation/translate.id_ID.toml b/web/translation/translate.id_ID.toml index 0ee07462..3c7881d0 100644 --- a/web/translation/translate.id_ID.toml +++ b/web/translation/translate.id_ID.toml @@ -52,6 +52,8 @@ "secretToken" = "Token Rahasia" "remained" = "Tersisa" "security" = "Keamanan" +"secAlertTitle" = "Peringatan keamanan" +"secAlertSsl" = "Koneksi ini tidak aman. Harap hindari memasukkan informasi sensitif sampai TLS diaktifkan untuk perlindungan data." [menu] "dashboard" = "Ikhtisar" diff --git a/web/translation/translate.ru_RU.toml b/web/translation/translate.ru_RU.toml index ea14a6a5..c75a25b8 100644 --- a/web/translation/translate.ru_RU.toml +++ b/web/translation/translate.ru_RU.toml @@ -52,6 +52,8 @@ "secretToken" = "Секретный токен" "remained" = "остались" "security" = "Безопасность" +"secAlertTitle" = "Предупреждение системы безопасности" +"secAlertSsl" = "Это соединение не защищено. Пожалуйста, воздержитесь от ввода конфиденциальной информации до тех пор, пока не будет активирован TLS для защиты данных" [menu] "dashboard" = "Статус системы" diff --git a/web/translation/translate.vi_VN.toml b/web/translation/translate.vi_VN.toml index 52b655e9..04be32a1 100644 --- a/web/translation/translate.vi_VN.toml +++ b/web/translation/translate.vi_VN.toml @@ -52,6 +52,8 @@ "secretToken" = "Mã bí mật"
"remained" = "Còn lại"
"security" = "Bảo vệ"
+"secAlertTitle" = "Cảnh báo an ninh-Tiếng Việt by Ohoang7"
+"secAlertSsl" = "Kết nối này không an toàn; Vui lòng không nhập thông tin nhạy cảm cho đến khi TLS được kích hoạt để bảo vệ dữ liệu của Bạn"
[menu]
"dashboard" = "Trạng thái hệ thống"
diff --git a/web/translation/translate.zh_Hans.toml b/web/translation/translate.zh_Hans.toml index 0f0afc19..22befcd3 100644 --- a/web/translation/translate.zh_Hans.toml +++ b/web/translation/translate.zh_Hans.toml @@ -52,6 +52,8 @@ "secretToken" = "安全密钥" "remained" = "剩余" "security" = "安全" +"secAlertTitle" = "安全警报" +"secAlertSsl" = "此连接不安全;在激活 TLS 进行数据保护之前,请勿输入敏感信息" [menu] "dashboard" = "系统状态" |
