From 9caafc4303981929b18e06cdee6248b1966d5192 Mon Sep 17 00:00:00 2001 From: 2dust <31833384+2dust@users.noreply.github.com> Date: Sun, 27 Oct 2024 20:44:57 +0800 Subject: [PATCH] Add toast insecure protocol --- .../main/kotlin/com/v2ray/ang/ui/SubEditActivity.kt | 13 ++++++++++--- V2rayNG/app/src/main/res/values-ar/strings.xml | 1 + V2rayNG/app/src/main/res/values-bn/strings.xml | 1 + V2rayNG/app/src/main/res/values-fa/strings.xml | 1 + V2rayNG/app/src/main/res/values-ru/strings.xml | 1 + V2rayNG/app/src/main/res/values-vi/strings.xml | 1 + V2rayNG/app/src/main/res/values-zh-rCN/strings.xml | 1 + V2rayNG/app/src/main/res/values-zh-rTW/strings.xml | 1 + V2rayNG/app/src/main/res/values/strings.xml | 1 + 9 files changed, 18 insertions(+), 3 deletions(-) diff --git a/V2rayNG/app/src/main/kotlin/com/v2ray/ang/ui/SubEditActivity.kt b/V2rayNG/app/src/main/kotlin/com/v2ray/ang/ui/SubEditActivity.kt index 880a7b29..5cc73f67 100644 --- a/V2rayNG/app/src/main/kotlin/com/v2ray/ang/ui/SubEditActivity.kt +++ b/V2rayNG/app/src/main/kotlin/com/v2ray/ang/ui/SubEditActivity.kt @@ -81,9 +81,16 @@ class SubEditActivity : BaseActivity() { toast(R.string.sub_setting_remarks) return false } - if (!Utils.isValidSubUrl(subItem.url)) { - toast(R.string.toast_invalid_url) - return false + if (subItem.url.isNotEmpty()) { + if (!Utils.isValidUrl(subItem.url)) { + toast(R.string.toast_invalid_url) + return false + } + + if (!Utils.isValidSubUrl(subItem.url)) { + toast(R.string.toast_insecure_url_protocol) + //return false + } } MmkvManager.encodeSubscription(editSubId, subItem) diff --git a/V2rayNG/app/src/main/res/values-ar/strings.xml b/V2rayNG/app/src/main/res/values-ar/strings.xml index 029afdf0..2a786376 100644 --- a/V2rayNG/app/src/main/res/values-ar/strings.xml +++ b/V2rayNG/app/src/main/res/values-ar/strings.xml @@ -99,6 +99,7 @@ المحتوى لا توجد بيانات في الحافظة رابط URL غير صالح + Please do not use the insecure HTTP protocol subscription address تأكد من أن منفذ الاتصالات الواردة يتوافق مع الإعدادات تكوين مشوه مضيف (SNI) (اختياري) diff --git a/V2rayNG/app/src/main/res/values-bn/strings.xml b/V2rayNG/app/src/main/res/values-bn/strings.xml index 80673935..59b2e78d 100644 --- a/V2rayNG/app/src/main/res/values-bn/strings.xml +++ b/V2rayNG/app/src/main/res/values-bn/strings.xml @@ -98,6 +98,7 @@ কনটেন্ট ক্লিপবোর্ডে কোনও তথ্য নেই অবৈধ URL + Please do not use the insecure HTTP protocol subscription address ইনবাউন্ড পোর্ট নিশ্চিত করুন সেটিংসের সাথে সামঞ্জস্যপূর্ণ কনফিগারেশন বিকৃত হোস্ট (SNI) (ঐচ্ছিক) diff --git a/V2rayNG/app/src/main/res/values-fa/strings.xml b/V2rayNG/app/src/main/res/values-fa/strings.xml index 9d32ebe5..0427db03 100644 --- a/V2rayNG/app/src/main/res/values-fa/strings.xml +++ b/V2rayNG/app/src/main/res/values-fa/strings.xml @@ -97,6 +97,7 @@ محتوا هیچ داده‌ای در کلیپ‌بورد وجود ندارد نشانی اینترنتی معتبر نیست + Please do not use the insecure HTTP protocol subscription address اطمینان حاصل کنید که پورت ورودی با تنظیمات مطابقت دارد کانفیگ درست نیست میزبان (SNI) (اختیاری) diff --git a/V2rayNG/app/src/main/res/values-ru/strings.xml b/V2rayNG/app/src/main/res/values-ru/strings.xml index 1713d4e4..261926e6 100644 --- a/V2rayNG/app/src/main/res/values-ru/strings.xml +++ b/V2rayNG/app/src/main/res/values-ru/strings.xml @@ -97,6 +97,7 @@ Данные В буфере обмена нет данных Неправильный URL + Please do not use the insecure HTTP protocol subscription address Убедитесь, что входящий порт соответствует настройкам Профиль повреждён Узел (SNI) (необязательно) diff --git a/V2rayNG/app/src/main/res/values-vi/strings.xml b/V2rayNG/app/src/main/res/values-vi/strings.xml index 6fd61e59..6ca4cd2f 100644 --- a/V2rayNG/app/src/main/res/values-vi/strings.xml +++ b/V2rayNG/app/src/main/res/values-vi/strings.xml @@ -97,6 +97,7 @@ Nội dung Không có dữ liệu nào trong Clipboard! URL không hợp lệ hoặc trống! + Please do not use the insecure HTTP protocol subscription address Vui lòng đảm bảo cấu hình tùy chỉnh này không bị lỗi trước khi sử dụng! Cấu hình không hợp lệ! Host (SNI) (Không bắt buộc) diff --git a/V2rayNG/app/src/main/res/values-zh-rCN/strings.xml b/V2rayNG/app/src/main/res/values-zh-rCN/strings.xml index 722d8b36..bc70548f 100644 --- a/V2rayNG/app/src/main/res/values-zh-rCN/strings.xml +++ b/V2rayNG/app/src/main/res/values-zh-rCN/strings.xml @@ -97,6 +97,7 @@ 内容 剪贴板中没有数据 无效的网址 + 请不要使用不安全的HTTP协议订阅地址 确保inbounds port和设置中的一致 配置格式错误 Host(SNI)(可选) diff --git a/V2rayNG/app/src/main/res/values-zh-rTW/strings.xml b/V2rayNG/app/src/main/res/values-zh-rTW/strings.xml index 5203d048..a6ff1296 100644 --- a/V2rayNG/app/src/main/res/values-zh-rTW/strings.xml +++ b/V2rayNG/app/src/main/res/values-zh-rTW/strings.xml @@ -97,6 +97,7 @@ 內容 剪貼簿內無資料 URL 無效 + 請不要使用不安全的HTTP協定訂閱位址 ​​確保 inbounds port 和設定中的一致 設定格式不正確 Host(SNI)(可選) diff --git a/V2rayNG/app/src/main/res/values/strings.xml b/V2rayNG/app/src/main/res/values/strings.xml index 5219f804..7195f19f 100644 --- a/V2rayNG/app/src/main/res/values/strings.xml +++ b/V2rayNG/app/src/main/res/values/strings.xml @@ -98,6 +98,7 @@ Content There is no data in the clipboard Invalid URL + Please do not use the insecure HTTP protocol subscription address Ensure inbounds port is consistent with the settings Config malformed Host(SNI)(Optional)